]> err.no Git - sope/commitdiff
added some support for non-XML style tags
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 7 Mar 2005 19:32:54 +0000 (19:32 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 7 Mar 2005 19:32:54 +0000 (19:32 +0000)
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@631 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

sope-appserver/WEExtensions/ChangeLog
sope-appserver/WEExtensions/Version
sope-appserver/WEExtensions/WEPageView.m
sope-appserver/WEExtensions/WERichString.m
sope-appserver/WEExtensions/WETabView.m
sope-appserver/WEExtensions/WETreeData.m
sope-appserver/WEExtensions/WETreeView.m

index ff572242323b476114efc1ba3db9525498a18e45..7586f3b059e140885cc2060e9b2a8ce58d5e2938 100644 (file)
@@ -1,8 +1,12 @@
+2005-03-07  Helge Hess  <helge.hess@opengroupware.org>
+
+       * added some support for -generateXMLStyleEmptyElements (v4.5.69)
+
 2005-02-23  Helge Hess  <helge.hess@opengroupware.org>
 
        * WEResourceManager.m: lookup web resources in
          Library/AppName/WebServerResources, fixed an incorrect reference to
-         OGo (w4.5.68)
+         OGo (v4.5.68)
 
 2005-02-17  Helge Hess  <helge.hess@opengroupware.org>
 
index 853c2846d5f9ad8805302886656e4a92e41a6405..ce9f1f8e3576ba64ca8870b8b056e6e79301abb5 100644 (file)
@@ -1,5 +1,5 @@
 # version file
 
-SUBMINOR_VERSION:=68
+SUBMINOR_VERSION:=69
 
 # v4.5.65 requires libNGObjWeb v4.5.106
index c76193c3489f86b5fd4225d78ec985eb51e8810f..b72366f8e0b4cc393236f8b82bc86023eca5b933 100644 (file)
@@ -367,7 +367,10 @@ static inline NSString *WEPageLabelForKey(NSString *_key, WOContext *_ctx) {
     [_response appendContentString:img];
     [_response appendContentString:@"\" alt=\""];
     [_response appendContentString:label];
-    [_response appendContentString:@"\" />"];
+    if (_ctx->wcFlags.xmlStyleEmptyElements)
+      [_response appendContentString:@"\" />"];
+    else
+      [_response appendContentString:@"\">"];
     [_ctx deleteLastElementIDComponent];
     return;
   }
@@ -389,7 +392,10 @@ static inline NSString *WEPageLabelForKey(NSString *_key, WOContext *_ctx) {
     [_response appendContentString:img];
     [_response appendContentString:@"\" alt=\""];
     [_response appendContentString:label];
-    [_response appendContentString:@"\" />"];
+    if (_ctx->wcFlags.xmlStyleEmptyElements)
+      [_response appendContentString:@"\" />"];
+    else
+      [_response appendContentString:@"\">"];
   }
   /* close anker */
   if (!_isBlind && _info) {
index b16a01e4fd9cd5686c1b2819465b77841b394cd3..f061a995ca62eea39c45ee47e59790ddf5f842b9 100644 (file)
@@ -209,7 +209,10 @@ static inline BOOL _doShow(WERichString *self, WOContext *_ctx) {
     for (i = 0; i < count; i++) {
       NSString *line = [lines objectAtIndex:i];
 
-      if (i != 0) [_response appendContentString:@"<br />"];
+      if (i != 0) {
+       [_response appendContentString:
+                    (_ctx->wcFlags.xmlStyleEmptyElements)?@"<br />":@"<br>"];
+      }
 
       [_response appendContentHTMLString:line];
     }
index 5daec9bc1fc8a59c71db30c440f40ce9c49b8797..de3458afb718db6116bd60ac42765ff7dda564b4 100644 (file)
@@ -450,7 +450,10 @@ static NSNumber *YesNumber;
     [_response appendContentString:@"' title='"];
     [_response appendContentHTMLAttributeValue:label];
     [_response appendContentString:@"'"];
-    [_response appendContentString:@" />"];
+    if (_ctx->wcFlags.xmlStyleEmptyElements)
+      [_response appendContentString:@" />"];
+    else
+      [_response appendContentString:@">"];
   }
   else {
     NSString *fc     = [self->fontColor stringValueInComponent:comp];
@@ -719,7 +722,10 @@ static NSNumber *YesNumber;
     if ((uri = WEUriOfResource(uri, _ctx))) {
       [_response appendContentString:@"<img border=\"0\" alt=\"\" src=\""];
       [_response appendContentString:uri];
-      [_response appendContentString:@"\" />"];
+      if (_ctx->wcFlags.xmlStyleEmptyElements)
+       [_response appendContentString:@"\" />"];
+      else
+       [_response appendContentString:@"\">"];
     }
     else
       [_response appendContentString:@"&nbsp;"];
index 6fab37db5fd377d0776f2ee4859e62680821c227..100a3c4c160deacc4f6fd40123949e79f0ff6fdf 100644 (file)
@@ -128,7 +128,10 @@ static Class StrClass = Nil;
     [_response appendContentString:@"\""];
   }
   
-  [_response appendContentString:@" />"];
+  if (_ctx->wcFlags.xmlStyleEmptyElements)
+    [_response appendContentString:@" />"];
+  else
+    [_response appendContentString:@">"];
 }
 
 - (void)_appendLink:(NSString *)_icon resp:(WOResponse *)_response
@@ -146,7 +149,10 @@ static Class StrClass = Nil;
     [_response appendContentString:[_ctx elementID]];
     [_response appendContentString:@"\" src=\""];
     [_response appendContentString:_icon];
-    [_response appendContentString:@"\" />"];
+    if (_ctx->wcFlags.xmlStyleEmptyElements)
+      [_response appendContentString:@"\" />"];
+    else
+      [_response appendContentString:@"\">"];
   }
   else {
     NSString *link;
index ef70122b3098de254e70a877789a0e266e9cf815..fe4a156dc0c9d87d642b8cdab50d289ae382168a 100644 (file)
@@ -718,8 +718,10 @@ NSString *WETreeView_Space          = @"WETreeView_Space";
   [_ctx removeObjectForKey:WETreeView_HEADER_MODE];
   if (doTable)
     [_response appendContentString:@"</tr>"];
-  else
+  else if (_ctx->wcFlags.xmlStyleEmptyElements)
     [_response appendContentString:@"<br />"];
+  else
+    [_response appendContentString:@"<br>"];
 
   cnt = [self->matrix count];
 
@@ -750,8 +752,10 @@ NSString *WETreeView_Space          = @"WETreeView_Space";
     [self->template appendToResponse:_response inContext:_ctx];
     if (doTable)
       [_response appendContentString:@"</tr>"];
-    else
+    else if (_ctx->wcFlags.xmlStyleEmptyElements)
       [_response appendContentString:@"<br />"];
+    else
+      [_response appendContentString:@"<br>"];
       
     [_ctx deleteLastElementIDComponent]; // delete "end"