javascript: MDL-18568 We don't need a function called uncheckall, as well as one called checknone!

Also, clean up coding style in the popupchecker function.
This commit is contained in:
tjhunt 2009-03-16 02:11:15 +00:00
parent 991c215b05
commit f6b6861d9d
2 changed files with 4 additions and 20 deletions

View File

@ -302,7 +302,7 @@
echo "<tr>\n<td colspan=\"4\" style=\"text-align:center\">\n";
echo "<br />";
echo "<input type=\"button\" onclick=\"checkall()\" value=\"$strselectall\" />\n";
echo "<input type=\"button\" onclick=\"uncheckall()\" value=\"$strdeselectall\" />\n";
echo "<input type=\"button\" onclick=\"checknone()\" value=\"$strdeselectall\" />\n";
choose_from_menu ($displaylist, "moveto", "", get_string("moveselectedcoursesto"), "javascript: getElementById('movecourses').submit()");
echo "</td>\n</tr>\n";
echo "</table>\n</form>";

View File

@ -2,9 +2,9 @@
function popupchecker(msg) {
var testwindow = window.open('itestwin.html', '', 'width=1,height=1,left=0,top=0,scrollbars=no');
if (testwindow == null)
{alert(msg);}
else {
if (!testwindow) {
alert(msg);
} else {
testwindow.close();
}
}
@ -654,22 +654,6 @@ function addonload(fn) {
}
}
function uncheckall() {
void(d=document);
void(el=d.getElementsByTagName('INPUT'));
for(i=0;i<el.length;i++) {
void(el[i].checked=0);
}
}
function checkall() {
void(d=document);
void(el=d.getElementsByTagName('INPUT'));
for(i=0;i<el.length;i++) {
void(el[i].checked=1);
}
}
function getElementsByClassName(oElm, strTagName, oClassNames){
var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
var arrReturnElements = new Array();