svn commit: samba r7134 - in branches/SAMBA_4_0/swat: . docs
esptest scripting
tridge at samba.org
tridge at samba.org
Tue May 31 03:37:04 GMT 2005
Author: tridge
Date: 2005-05-31 03:37:01 +0000 (Tue, 31 May 2005)
New Revision: 7134
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7134
Log:
a number of small changes to make the pages HTML compliant. The
builtin web validator in firefox sure is useful!
Modified:
branches/SAMBA_4_0/swat/docs/menu.js
branches/SAMBA_4_0/swat/esptest/include.esp
branches/SAMBA_4_0/swat/esptest/session.esp
branches/SAMBA_4_0/swat/esptest/showvars.esp
branches/SAMBA_4_0/swat/login.esp
branches/SAMBA_4_0/swat/scripting/common.js
branches/SAMBA_4_0/swat/scripting/test.ejs
Changeset:
Modified: branches/SAMBA_4_0/swat/docs/menu.js
===================================================================
--- branches/SAMBA_4_0/swat/docs/menu.js 2005-05-31 03:31:54 UTC (rev 7133)
+++ branches/SAMBA_4_0/swat/docs/menu.js 2005-05-31 03:37:01 UTC (rev 7134)
@@ -4,9 +4,9 @@
m.element[0].label = "Samba4 development";
m.element[0].link = "http://devel.samba.org/";
m.element[1].label = "Recent Checkins";
-m.element[1].link = "http://build.samba.org/?tree=samba4&function=Recent+Checkins";
+m.element[1].link = "http://build.samba.org/?tree=samba4;function=Recent+Checkins";
m.element[2].label = "Recent Builds";
-m.element[2].link = "http://build.samba.org/?tree=samba4&function=Recent+Builds";
+m.element[2].link = "http://build.samba.org/?tree=samba4;function=Recent+Builds";
m.element[3].label = "EJS Information";
m.element[3].link = "http://www.appwebserver.org/products/ejs/ejs.html";
m.element[4].label = "ESP Information";
Modified: branches/SAMBA_4_0/swat/esptest/include.esp
===================================================================
--- branches/SAMBA_4_0/swat/esptest/include.esp 2005-05-31 03:31:54 UTC (rev 7133)
+++ branches/SAMBA_4_0/swat/esptest/include.esp 2005-05-31 03:37:01 UTC (rev 7134)
@@ -1,13 +1,13 @@
<% page_header("columns", "ESP Include Test"); %>
-including /scripting/test.ejs<p>
+including /scripting/test.ejs<p/>
<% include("/scripting/test.ejs"); %>
-calling a function from test.ejs ...<p>
+calling a function from test.ejs ...<p/>
<% showArray("request", request); %>
-including /scripting/test.esp<p>
+including /scripting/test.esp<p/>
<% include /scripting/test.esp %>
-calling a function from test.esp ...<p>
+calling a function from test.esp ...<p/>
<% res = testfn('foo'); %>
result is: @@res
Modified: branches/SAMBA_4_0/swat/esptest/session.esp
===================================================================
--- branches/SAMBA_4_0/swat/esptest/session.esp 2005-05-31 03:31:54 UTC (rev 7133)
+++ branches/SAMBA_4_0/swat/esptest/session.esp 2005-05-31 03:37:01 UTC (rev 7134)
@@ -45,7 +45,7 @@
}
simple_table(session);
-write("SessionId=" + request['SESSION_ID'] + "<br>\n");
+write("SessionId=" + request['SESSION_ID'] + "<br/>\n");
%>
<% page_footer(); %>
Modified: branches/SAMBA_4_0/swat/esptest/showvars.esp
===================================================================
--- branches/SAMBA_4_0/swat/esptest/showvars.esp 2005-05-31 03:31:54 UTC (rev 7133)
+++ branches/SAMBA_4_0/swat/esptest/showvars.esp 2005-05-31 03:37:01 UTC (rev 7134)
@@ -21,6 +21,4 @@
showArray("session", session);
%>
-</ul>
-
<% page_footer(); %>
Modified: branches/SAMBA_4_0/swat/login.esp
===================================================================
--- branches/SAMBA_4_0/swat/login.esp 2005-05-31 03:31:54 UTC (rev 7133)
+++ branches/SAMBA_4_0/swat/login.esp 2005-05-31 03:37:01 UTC (rev 7134)
@@ -3,7 +3,7 @@
<%
if (request['SESSION_EXPIRED'] == "True") {
- write("<b>Your session has expired - please authenticate again<br>\n");
+ write("<b>Your session has expired - please authenticate again<br /></b>\n");
}
var f = FormObj("login", 2, 1);
Modified: branches/SAMBA_4_0/swat/scripting/common.js
===================================================================
--- branches/SAMBA_4_0/swat/scripting/common.js 2005-05-31 03:31:54 UTC (rev 7133)
+++ branches/SAMBA_4_0/swat/scripting/common.js 2005-05-31 03:37:01 UTC (rev 7134)
@@ -129,10 +129,25 @@
}
write("</td></tr>\n");
}
+
/*
+ return the number of elements in an object
+*/
+function elcount(o) {
+ var count = 0;
+ for (i in o) {
+ count++;
+ }
+ return count;
+}
+
+/*
display a ejs object as a table. The header is optional
*/
function simple_table(v) {
+ if (elcount(v) == 0) {
+ return;
+ }
write("<table class=\"data\">\n");
for (r in v) {
table_element(r, v);
@@ -145,10 +160,13 @@
attribute
*/
function multi_table(array, header) {
+ if (elcount(v) == 0) {
+ return;
+ }
write("<table class=\"data\">\n");
for (i in array) {
var v = array[i];
- write("<tr><th colspan=2>" + v[header] + "</th></tr>\n");
+ write('<tr><th colspan="2">' + v[header] + "</th></tr>\n");
for (r in v) {
if (r != header) {
table_element(r, v);
@@ -168,7 +186,7 @@
f.element = new Array(num_elements);
f.submit = new Array(num_submits);
f.action = session_uri(request.REQUEST_URI);
- f.class = "form";
+ f.class = "defaultform";
for (i in f.element) {
f.element[i] = new Object();
f.element[i].type = "text";
@@ -193,14 +211,16 @@
write('<form name="' + f.name +
'" method="post" action="' + f.action +
'" class="' + f.class + '">\n');
- write("<table>\n");
+ if (f.element.length > 0) {
+ write("<table>\n");
+ }
for (i in f.element) {
var e = f.element[i];
if (e.name == undefined) {
e.name = e.label;
}
if (e.value == undefined) {
- e.value = '""';
+ e.value = "";
}
write("<tr>");
write("<td>" + e.label + "</td>");
@@ -216,12 +236,15 @@
write('</select></td>\n');
} else {
write('<td><input name="' + e.name + '" type="' +
- e.type + '" value="' + e.value + '"></td>\n');
+ e.type + '" value="' + e.value + '" /></td>\n');
}
+ write("</tr>");
}
- write("</table>\n");
+ if (f.element.length > 0) {
+ write("</table>\n");
+ }
for (i in f.submit) {
- write('<input name="submit" type="submit" value="' + f.submit[i] + '">\n');
+ write('<input name="submit" type="submit" value="' + f.submit[i] + '" />\n');
}
write("</form>\n");
}
Modified: branches/SAMBA_4_0/swat/scripting/test.ejs
===================================================================
--- branches/SAMBA_4_0/swat/scripting/test.ejs 2005-05-31 03:31:54 UTC (rev 7133)
+++ branches/SAMBA_4_0/swat/scripting/test.ejs 2005-05-31 03:37:01 UTC (rev 7134)
@@ -5,6 +5,6 @@
function showArray(name, array) {
write("<h3>Array: " + name + "</h3>\n");
for (v in array) {
- write(name + "[" + v + "]=" + array[v] + "<br>\n");
+ write(name + "[" + v + "]=" + array[v] + "<br/>\n");
}
}
More information about the samba-cvs
mailing list