svn commit: samba r13415 - in branches/tmp/deryck-samba4-swat/swat: . ejs

deryck at samba.org deryck at samba.org
Thu Feb 9 21:03:30 GMT 2006


Author: deryck
Date: 2006-02-09 21:03:29 +0000 (Thu, 09 Feb 2006)
New Revision: 13415

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13415

Log:
Fix simple_table() and table_element() to return 
the table as a string.  Thanks, Derrell, for clearing
up my stupidity.

deryck

Modified:
   branches/tmp/deryck-samba4-swat/swat/ejs/common.ejs
   branches/tmp/deryck-samba4-swat/swat/index.esp


Changeset:
Modified: branches/tmp/deryck-samba4-swat/swat/ejs/common.ejs
===================================================================
--- branches/tmp/deryck-samba4-swat/swat/ejs/common.ejs	2006-02-09 19:37:58 UTC (rev 13414)
+++ branches/tmp/deryck-samba4-swat/swat/ejs/common.ejs	2006-02-09 21:03:29 UTC (rev 13415)
@@ -99,21 +99,21 @@
   display a table element
 */
 function table_element(i, o, t) {
-	t + "<tr><td>" + i + "</td><td>";
+	t = t + "<tr><td>" + i + "</td><td>";
 	if (typeof(o[i]) == "object") {
 		var j, first;
 		first = true;
 		for (j in o[i]) {
 			if (first == false) {
-				t + "<br />";
+				t = t + "<br />";
 			}
-			t + o[i][j];
+			t = t + o[i][j];
 			first = false;
 		}
 	} else {
-		t + o[i];
+		t = t + o[i];
 	}
-	t + "</td></tr>\n";
+	t = t + "</td></tr>\n";
 
 	return t;
 }
@@ -130,7 +130,7 @@
 	for (r in v) {
 		ret = table_element(r, v, ret);
 	}
-	ret + '</table>\n';
+	ret = ret + '</table>\n';
 	
 	return ret;
 }

Modified: branches/tmp/deryck-samba4-swat/swat/index.esp
===================================================================
--- branches/tmp/deryck-samba4-swat/swat/index.esp	2006-02-09 19:37:58 UTC (rev 13414)
+++ branches/tmp/deryck-samba4-swat/swat/index.esp	2006-02-09 21:03:29 UTC (rev 13415)
@@ -21,9 +21,7 @@
 
 	
 	global.page.title = "Samba Web Administration Tool";
-	global.page.content = ' 
-    <h1>Samba Web Administration Tool</h1>
-    <h3>Options Will Follow Soon</h3>' + simple_table(info);
+	global.page.content = '<h1>Samba Web Administration Tool</h1>\n' + simple_table(info);
 
 	include("/template.esp");
 %>



More information about the samba-cvs mailing list