Update of /cvsroot/sandweb/sandweb/templates
In directory usw-pr-cvs1:/tmp/cvs-serv14814
Modified Files:
browse.html
Log Message:
added javascript selectAll/clearAll for browse template. This
was just a usability issue that was bugging me. there's no
way to do this without javascript, not sure if we should
hide things like this from browsers with js turned off.
i wrote the javascript directly into this template. in the
longer term it's probably better to have one .js file called
from the framework.
Index: browse.html
===================================================================
RCS file: /cvsroot/sandweb/sandweb/templates/browse.html,v
retrieving revision 1.29
retrieving revision 1.30
diff -U2 -r1.29 -r1.30
--- browse.html 2001/11/24 13:20:43 1.29
+++ browse.html 2001/11/28 20:59:45 1.30
@@ -1,4 +1,17 @@
+<script language="javascript">
+function selectAll(field) {
+ for (i = 0; i < field.length; i++)
+ field[i].checked = true ;
+}
+
+function clearAll(field) {
+ for (i = 0; i < field.length; i++)
+ field[i].checked = false ;
+}
+
+
+</script>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
- <form method="get" submit="<TMPL_VAR NAME=PROGNAME>">
+ <form method="get" submit="<TMPL_VAR NAME=PROGNAME>" name="browse">
<input type="hidden" name="action" value="vcsaction" />
<input type="hidden" name="location" value="<TMPL_VAR NAME=LOCATION>" />
@@ -31,4 +44,9 @@
</td>
</tr>
+ <a href="javascript:selectAll(document.browse.filename)">
+ Select All</a>
+
+ <a href="javascript:clearAll(document.browse.filename)">
+ Clear All</a>
<tr>
<td width="100%">
|