View | Details | Raw Unified | Return to bug 25250
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/js/viewlog.js (-7 / +6 lines)
Lines 1-18 Link Here
1
function tickAll(section){
1
function tickAll(section){
2
    $("input[name='" + section + "']").prop("checked", true);
2
    $("input[type='checkbox'][name='" + section + "']").prop("checked", true);
3
    $("#" + section.slice(0,-1) + "ALL").prop("checked", true);
3
    $("#" + section.slice(0,-1) + "ALL").prop("checked", true);
4
    $("input[name='" + section + "']").prop("disabled", true);
4
    $("input[type='checkbox'][name='" + section + "']").prop("disabled", true);
5
    $("#" + section.slice(0,-1) + "ALL").prop("disabled", false);
5
    $("#" + section.slice(0,-1) + "ALL").prop("disabled", false);
6
}
6
}
7
7
8
function untickAll(section){
8
function untickAll(section){
9
    $("input[name='" + section + "']").prop("checked", false);
9
    $("input[type='checkbox'][name='" + section + "']").prop("checked", false);
10
    $("input[name='" + section + "']").prop("disabled", false);
10
    $("input[type='checkbox'][name='" + section + "']").prop("disabled", false);
11
}
11
}
12
12
13
$(document).ready(function(){
13
$(document).ready(function(){
14
14
15
    if ( $('input[name="modules"]:checked').length == 0 ) {
15
    if ( $('input[type="checkbox"][name="modules"]:checked').length == 0 ) {
16
        tickAll('modules');
16
        tickAll('modules');
17
    }
17
    }
18
    $("#moduleALL").change(function(){
18
    $("#moduleALL").change(function(){
Lines 22-28 $(document).ready(function(){ Link Here
22
            untickAll('modules');
22
            untickAll('modules');
23
        }
23
        }
24
    });
24
    });
25
    $("input[name='modules']").change(function(){
25
    $("input[type='checkbox'][name='modules']").change(function(){
26
        if ( $("input[name='modules']:checked").length == $("input[name='modules']").length - 1 ){
26
        if ( $("input[name='modules']:checked").length == $("input[name='modules']").length - 1 ){
27
            tickAll('modules');
27
            tickAll('modules');
28
        }
28
        }
29
- 

Return to bug 25250