mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
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:
parent
991c215b05
commit
f6b6861d9d
@ -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>";
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user