]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1030 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Fri, 2 Mar 2007 22:28:57 +0000 (22:28 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Fri, 2 Mar 2007 22:28:57 +0000 (22:28 +0000)
ChangeLog
UI/MailPartViewers/UIxMailPartHTMLViewer.m
UI/Templates/ContactsUI/UIxContactView.wox
UI/Templates/MailPartViewers/UIxMailPartHTMLViewer.wox
UI/WebServerResources/event-gradient.png [new file with mode: 0644]

index 711bd8747f54854cc255a84f27c3dbe874fc510a..f96850412459ff9122254d734d95a7e3974f3b95 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-02-26  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
+
+       * UI/MailPartViewers/UIxMailPartHTMLViewer.m
+       ([_UIxHTMLMailContentHandler -_appendStyle:_charslength:_len]):
+       don't prepend anything to the class and id named. Instead, we
+       make each style embedded in the ".SOGoHTMLMail-CSS-Delimiter"
+       class.
+
 2007-02-21  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
 
        * SoObjects/SOGo/SOGoContentObject.m ([SOGoContentObject
index 4b926e1e18ec1f35eaee1521fd59fbe23819834c..5203d85e5fbc77dc069b1323d68aa8d630d036cd 100644 (file)
@@ -42,6 +42,7 @@
   BOOL inStyle;
   BOOL inScript;
   BOOL inCSSDeclaration;
+  BOOL hasEmbeddedCSS;
   NSMutableArray *crumb;
 }
 
   inStyle = NO;
   inScript = NO;
   inCSSDeclaration = NO;
+  hasEmbeddedCSS = NO;
 }
 
 - (void) endDocument
   showWhoWeAre();
 }
 
-- (NSString *) _valueForCSSIdentifier: (NSString *) primaryValue
-{
-  NSMutableString *value;
-  NSEnumerator *classes;
-  NSString *currentValue;
-
-  value = [NSMutableString new];
-  [value autorelease];
-
-  classes = [[primaryValue componentsSeparatedByString: @" "] objectEnumerator];
-  currentValue = [classes nextObject];
-  while (currentValue)
-    {
-      [value appendFormat: @"SOGoHTMLMail-%@ ", currentValue];
-      currentValue = [classes nextObject];
-    }
-
-  return value;
-}
-
 - (void) _appendStyle: (unichar *) _chars
                length: (int) _len
 {
       if (inCSSDeclaration)
         {
           if (*(char *) currentChar == '}')
-            inCSSDeclaration = NO;
+            {
+              inCSSDeclaration = NO;
+              hasEmbeddedCSS = NO;
+            }
         }
       else
         {
           if (*(char *) currentChar == '{')
             inCSSDeclaration = YES;
-          else if (*(char *) currentChar == '.'
-                   || *(char *) currentChar == '#')
+          if (*(char *) currentChar == ',')
+            hasEmbeddedCSS = NO;
+          else if (!hasEmbeddedCSS)
             {
-              [css appendString: [NSString stringWithCharacters: start
-                                           length: (currentChar - start + 1)]];
-              [css appendString: @"SOGoHTMLMail-"];
-              start = currentChar + 1;
+              if (*(char *) currentChar == '@')
+                hasEmbeddedCSS = YES;
+              else
+                if (*(char *) currentChar > 32)
+                  {
+                    [css appendString: [NSString stringWithCharacters: start
+                                                 length: (currentChar - start)]];
+                    [css appendString: @".SOGoHTMLMail-CSS-Delimiter "];
+                    hasEmbeddedCSS = YES;
+                    start = currentChar;
+                  }
             }
         }
     }
   [css appendString: [NSString stringWithCharacters: start
-                               length: (currentChar - start + 1)]];
+                               length: (currentChar - start)]];
 }
 
 - (void) startElement: (NSString *) _localName
         {
           skipAttribute = NO;
           name = [_attributes nameAtIndex: count];
-          if ([name caseInsensitiveCompare: @"class"] == NSOrderedSame
-              || [name caseInsensitiveCompare: @"id"] == NSOrderedSame)
-            value = [self _valueForCSSIdentifier: [_attributes valueAtIndex: count]];
-          else if ([[name lowercaseString] hasPrefix: @"on"])
+          if ([[name lowercaseString] hasPrefix: @"on"])
             skipAttribute = YES;
           else if ([name caseInsensitiveCompare: @"src"] == NSOrderedSame)
             {
index 934ca7b5a4248b257731132d64aa71fd99c77c48..7d3e078d71478557504798993b87872033572d06 100644 (file)
@@ -9,67 +9,66 @@
     className="UIxPageFrame"
     title="name"
     const:popup="YES"
-    >
     
-    <h3 class="contactCardTitle"><var:string value="contactCardTitle" /></h3>
-
-    <div id="leftContactColumn" class="contactColumn">
-      <div id="primaryInfos">
-        <h4><var:string label:value="Contact" /></h4>
-        <var:string value="displayName" escapeHTML="NO" />
-        <var:string value="nickName" escapeHTML="NO" />
-        <var:string value="preferredEmail" escapeHTML="NO" />
-        <var:string value="preferredTel" escapeHTML="NO" />
-        <var:string value="preferredAddress" escapeHTML="NO" />
-      </div>
-
-      <var:if condition="hasHomeInfos">
-        <div id="homeInfos">
-          <h4><var:string label:value="Home" /></h4>
-          <var:string value="homePobox" escapeHTML="NO" />
-          <var:string value="homeExtendedAddress" escapeHTML="NO" />
-          <var:string value="homeStreetAddress" escapeHTML="NO" />
-          <var:string value="homeCityAndProv" escapeHTML="NO" />
-          <var:string value="homePostalCodeAndCountry" escapeHTML="NO" />
-          <var:string value="homeUrl" escapeHTML="NO" />
-        </div>
-      </var:if>
-
-      <var:if condition="hasOtherInfos">
-        <div id="otherInfos">
-          <h4><var:string label:value="Other Infos" /></h4>
-          <var:string value="bday" escapeHTML="NO" />
-          <var:string value="tz" escapeHTML="NO" />
-          <var:string value="note" escapeHTML="NO" />
-        </div>
-      </var:if>
-    </div>
-
-    <div id="rightContactColumn" class="contactColumn">
-      <var:if condition="hasTelephones">
-        <div id="phoneInfos">
-          <h4><var:string label:value="Telephone" /></h4>
-          <var:string value="workPhone" escapeHTML="NO" />
-          <var:string value="homePhone" escapeHTML="NO" />
-          <var:string value="fax" escapeHTML="NO" />
-          <var:string value="mobile" escapeHTML="NO" />
-          <var:string value="pager" escapeHTML="NO" />
-        </div>
-      </var:if>
-
-      <var:if condition="hasWorkInfos">
-        <div id="workInfos">
-          <h4><var:string label:value="Work" /></h4>
-          <var:string value="workTitle" escapeHTML="NO" />
-          <var:string value="workService" escapeHTML="NO" />
-          <var:string value="workCompany" escapeHTML="NO" />
-          <var:string value="workPobox" escapeHTML="NO" />
-          <var:string value="workExtendedAddress" escapeHTML="NO" />
-          <var:string value="workStreetAddress" escapeHTML="NO" />
-          <var:string value="workCityAndProv" escapeHTML="NO" />
-          <var:string value="workPostalCodeAndCountry" escapeHTML="NO" />
-          <var:string value="workUrl" escapeHTML="NO" />
-        </div>
-      </var:if>
-    </div>
-  </var:component>
+    ><h3 class="contactCardTitle"><var:string value="contactCardTitle" /></h3
+      
+      ><div id="leftContactColumn" class="contactColumn"
+      ><div id="primaryInfos"
+        ><h4><var:string label:value="Contact" /></h4
+          ><var:string value="displayName" escapeHTML="NO"
+          /><var:string value="nickName" escapeHTML="NO"
+          /><var:string value="preferredEmail" escapeHTML="NO"
+          /><var:string value="preferredTel" escapeHTML="NO"
+          /><var:string value="preferredAddress" escapeHTML="NO"
+          /></div
+        
+        ><var:if condition="hasHomeInfos"
+        ><div id="homeInfos"
+          ><h4><var:string label:value="Home" /></h4
+            ><var:string value="homePobox" escapeHTML="NO"
+            /><var:string value="homeExtendedAddress" escapeHTML="NO"
+            /><var:string value="homeStreetAddress" escapeHTML="NO"
+            /><var:string value="homeCityAndProv" escapeHTML="NO"
+            /><var:string value="homePostalCodeAndCountry" escapeHTML="NO"
+            /><var:string value="homeUrl" escapeHTML="NO"
+            /></div
+          ></var:if
+        
+        ><var:if condition="hasOtherInfos"
+        ><div id="otherInfos"
+          ><h4><var:string label:value="Other Infos" /></h4
+            ><var:string value="bday" escapeHTML="NO"
+            /><var:string value="tz" escapeHTML="NO"
+            /><var:string value="note" escapeHTML="NO"
+            /></div
+          ></var:if
+        ></div
+      
+      ><div id="rightContactColumn" class="contactColumn"
+      ><var:if condition="hasTelephones"
+        ><div id="phoneInfos"
+          ><h4><var:string label:value="Telephone" /></h4
+            ><var:string value="workPhone" escapeHTML="NO"
+            /><var:string value="homePhone" escapeHTML="NO"
+            /><var:string value="fax" escapeHTML="NO"
+            /><var:string value="mobile" escapeHTML="NO"
+            /><var:string value="pager" escapeHTML="NO"
+            /></div
+          ></var:if
+        
+        ><var:if condition="hasWorkInfos"
+        ><div id="workInfos"
+          ><h4><var:string label:value="Work" /></h4
+            ><var:string value="workTitle" escapeHTML="NO"
+            /><var:string value="workService" escapeHTML="NO"
+            /><var:string value="workCompany" escapeHTML="NO"
+            /><var:string value="workPobox" escapeHTML="NO"
+            /><var:string value="workExtendedAddress" escapeHTML="NO"
+            /><var:string value="workStreetAddress" escapeHTML="NO"
+            /><var:string value="workCityAndProv" escapeHTML="NO"
+            /><var:string value="workPostalCodeAndCountry" escapeHTML="NO"
+            /><var:string value="workUrl" escapeHTML="NO"
+            /></div
+          ></var:if
+        ></div
+      ></var:component>
index bafb0547038625b140fd6a937caf541e0ea6ffd5..ba3db2f038d699b0fdb747fff6cf3ab2510c3e49 100644 (file)
@@ -5,5 +5,5 @@
   xmlns:const="http://www.skyrix.com/od/constant"
   xmlns:rsrc="OGo:url"
   xmlns:label="OGo:label"
-  class="mailer_htmlcontent"
+  class="mailer_htmlcontent SOGoHTMLMail-CSS-Delimiter"
 ><var:string value="flatContentAsString" const:escapeHTML="NO" /></div>
diff --git a/UI/WebServerResources/event-gradient.png b/UI/WebServerResources/event-gradient.png
new file mode 100644 (file)
index 0000000..86d169c
Binary files /dev/null and b/UI/WebServerResources/event-gradient.png differ