www/assets/js/scripts.js
/**
 * Checks or unckecks all checkboxes with name "check_name" in form "form" 
 */
Checks or unckecks all checkboxes with name "check_name" in form "form"
Checks or unckecks all checkboxes with name " check_name " in form " form "
function checkAll( form, check_name, handler ) 
{
    var _form = typeof(form)=='object' ? form : eval("document."+form);
    var check_all = handler || check_name+'_all',
        form_chkall = typeof(form)=='object' ? form.check_all : eval("document."+form+"."+check_all);
    if (form_chkall == undefined) {
        for (i = _form.elements.length - 1; i >= 0; i = i - 1) {
            if (_form.elements[i].name == check_all) {
                form_chkall = _form.elements[i];
            }
        }
    }
    if (form_chkall != undefined) {
        setTimeout(function(){
            for (i = _form.elements.length - 1; i >= 0; i = i - 1) {
                var el = _form.elements[i];
                if (el.name == check_name)
                    el.checked = form_chkall.checked;
                else if (el.name == check_name+"[]")
                    el.checked = form_chkall.checked;
            }
        },10);
        return true;
    }
    return false;
}
function checkAll ( form , check_name , handler ) { var _form = typeof ( form ) == 'object' ? form : eval ( "document." + form ) ; var check_all = handler || check_name + '_all' , form_chkall = typeof ( form ) == 'object' ? form . check_all : eval ( "document." + form + "." + check_all ) ; if ( form_chkall == undefined ) { for ( i = _form . elements . length - 1 ; i >= 0 ; i = i - 1 ) { if ( _form . elements [ i ] . name == check_all ) { form_chkall = _form . elements [ i ] ; } } } if ( form_chkall != undefined ) { setTimeout ( function ( ) { for ( i = _form . elements . length - 1 ; i >= 0 ; i = i - 1 ) { var el = _form . elements [ i ] ; if ( el . name == check_name ) el . checked = form_chkall . checked ; else if ( el . name == check_name + "[]" ) el . checked = form_chkall . checked ; } } , 10 ) ; return true ; } return false ; }
Checks or unckecks all checkboxes with name "check_name" in form "form"
Checks or unckecks all checkboxes with name " check_name " in form " form "