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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt (-16 / +17 lines)
Lines 455-477 Link Here
455
[% Asset.js("lib/jquery/plugins/jquery.deserialize.min.js") | $raw %]
455
[% Asset.js("lib/jquery/plugins/jquery.deserialize.min.js") | $raw %]
456
[% Asset.js("lib/jquery/plugins/jquery.cookie.min.js") | $raw %]
456
[% Asset.js("lib/jquery/plugins/jquery.cookie.min.js") | $raw %]
457
<script>
457
<script>
458
    function branch_limit() {
459
        if( $("#branchloop").val() != "" ){
460
            $("#categoryloop").val("").prop('disabled',true);
461
        } else {
462
            $("#categoryloop").prop('disabled',false);
463
        }
464
        if ( $("#categoryloop").val() != "" ){
465
            $("#branchloop").val("").prop('disabled',true);
466
        } else {
467
            $("#branchloop").prop('disabled',false);
468
        }
469
    }
470
$(document).ready(function() {
458
$(document).ready(function() {
471
    branch_limit();
459
    [% IF search_groups %]
472
    $("#branchloop,#categoryloop").on("change",function(){
460
        function branch_limit() {
461
            if( $("#branchloop").val() != "" ){
462
                $("#categoryloop").val("").prop('disabled',true);
463
            } else {
464
                $("#categoryloop").prop('disabled',false);
465
            }
466
            if ( $("#categoryloop").val() != "" ){
467
                $("#branchloop").val("").prop('disabled',true);
468
            } else {
469
                $("#branchloop").prop('disabled',false);
470
            }
471
        }
473
        branch_limit();
472
        branch_limit();
474
    });
473
        $("#branchloop,#categoryloop").on("change",function(){
474
            branch_limit();
475
        });
476
    [% END %]
475
477
476
    $('#advsearches').tabs();
478
    $('#advsearches').tabs();
477
    jQuery.cookie.json = true;
479
    jQuery.cookie.json = true;
478
- 

Return to bug 28847