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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt (-7 / +6 lines)
Lines 290-296 Link Here
290
290
291
[% INCLUDE 'opac-bottom.inc' %]
291
[% INCLUDE 'opac-bottom.inc' %]
292
[% BLOCK jsinclude %]
292
[% BLOCK jsinclude %]
293
    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
294
    <script>
293
    <script>
295
        var q_array = new Array();  // will hold the search terms, if possible
294
        var q_array = new Array();  // will hold the search terms, if possible
296
        $(document).ready(function(){
295
        $(document).ready(function(){
Lines 331-343 Link Here
331
                    return false;
330
                    return false;
332
                }
331
                }
333
            }
332
            }
334
            $("#CheckAll").click(function(){
333
            $("#CheckAll").on("click", function(e){
335
                $("#bookbag_form").checkCheckboxes();
334
                e.preventDefault();
336
                return false;
335
                $("#bookbag_form").find("input:checkbox").prop("checked", true);
337
            });
336
            });
338
            $("#CheckNone").click(function(){
337
            $("#CheckNone").on("click", function(e){
339
                $("#bookbag_form").unCheckCheckboxes();
338
                e.preventDefault();
340
                return false;
339
                $("#bookbag_form").find("input:checkbox").prop("checked", true);
341
            });
340
            });
342
            [% IF ( query_desc ) %]
341
            [% IF ( query_desc ) %]
343
            var query_desc = "[% query_desc |replace("'", "\'") |replace('\n', '\\n') |replace('\r', '\\r') | html %]";
342
            var query_desc = "[% query_desc |replace("'", "\'") |replace('\n', '\\n') |replace('\r', '\\r') | html %]";
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-8 / +11 lines)
Lines 160-166 Link Here
160
                    [% IF ( total ) %]
160
                    [% IF ( total ) %]
161
161
162
                        <div class="searchresults">
162
                        <div class="searchresults">
163
                            <form action="/cgi-bin/koha/opac-search.pl" method="get" name="bookbag_form" id="bookbag_form" class="checkboxed">
163
                            <form action="/cgi-bin/koha/opac-search.pl" method="get" name="bookbag_form" id="bookbag_form">
164
                                [% IF ( searchdesc ) %]
164
                                [% IF ( searchdesc ) %]
165
                                    [% FOREACH QUERY_INPUT IN QUERY_INPUTS %]
165
                                    [% FOREACH QUERY_INPUT IN QUERY_INPUTS %]
166
                                        <input type="hidden" name="[% QUERY_INPUT.input_name | html %]" value="[% QUERY_INPUT.input_value | html %]"/>
166
                                        <input type="hidden" name="[% QUERY_INPUT.input_name | html %]" value="[% QUERY_INPUT.input_value | html %]"/>
Lines 625-631 Link Here
625
    [% END %]
625
    [% END %]
626
    [% IF ( OverDriveEnabled ) %][% Asset.js("js/overdrive.js") | $raw %][% END %]
626
    [% IF ( OverDriveEnabled ) %][% Asset.js("js/overdrive.js") | $raw %][% END %]
627
    [% IF ( RecordedBooksEnabled ) %][% Asset.js("js/recordedbooks.js") | $raw %][% END %]
627
    [% IF ( RecordedBooksEnabled ) %][% Asset.js("js/recordedbooks.js") | $raw %][% END %]
628
    [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
629
    [% Asset.js("js/authtoresults.js") | $raw %]
628
    [% Asset.js("js/authtoresults.js") | $raw %]
630
    [% Asset.js("lib/hc-sticky.js") | $raw %]
629
    [% Asset.js("lib/hc-sticky.js") | $raw %]
631
    [% IF ( OpacHighlightedWords ) %]
630
    [% IF ( OpacHighlightedWords ) %]
Lines 879-893 Link Here
879
                    return false;
878
                    return false;
880
                }
879
                }
881
            }
880
            }
882
            $("#CheckAll").click(function(){
881
            $("#CheckAll").on("click",function(e){
883
                $("#bookbag_form").checkCheckboxes();
882
                e.preventDefault();
883
                $(".cb").each(function(){
884
                    $(this).prop("checked", true);
885
                });
884
                enableCheckboxActions();
886
                enableCheckboxActions();
885
                return false;
886
            });
887
            });
887
            $("#CheckNone").click(function(){
888
            $("#CheckNone").on("click",function(e){
888
                $("#bookbag_form").unCheckCheckboxes();
889
                e.preventDefault();
890
                $(".cb").each(function(){
891
                    $(this).prop("checked", false);
892
                });
889
                enableCheckboxActions();
893
                enableCheckboxActions();
890
                return false;
891
            });
894
            });
892
895
893
            [% IF ( ( Koha.Preference( 'RequestOnOpac' ) == 1 ) && ( Koha.Preference( 'opacuserlogin' ) == 1 ) && DisplayMultiPlaceHold ) %]
896
            [% IF ( ( Koha.Preference( 'RequestOnOpac' ) == 1 ) && ( Koha.Preference( 'opacuserlogin' ) == 1 ) && DisplayMultiPlaceHold ) %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt (-2 / +2 lines)
Lines 261-273 Link Here
261
        $(".CheckNone").click(function(e){
261
        $(".CheckNone").click(function(e){
262
            e.preventDefault();
262
            e.preventDefault();
263
            var form = $(this).parents("form").get(0);
263
            var form = $(this).parents("form").get(0);
264
            $(form).unCheckCheckboxes();
264
            $(form).find("input:checkbox").prop("checked", false);
265
            enableCheckboxActions(form);
265
            enableCheckboxActions(form);
266
        });
266
        });
267
        $(".CheckAll").click(function(e){
267
        $(".CheckAll").click(function(e){
268
            e.preventDefault();
268
            e.preventDefault();
269
            var form = $(this).parents("form").get(0);
269
            var form = $(this).parents("form").get(0);
270
            $(form).checkCheckboxes();
270
            $(form).find("input:checkbox").prop("checked", true);
271
            enableCheckboxActions(form);
271
            enableCheckboxActions(form);
272
        });
272
        });
273
273
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt (-8 / +11 lines)
Lines 343-349 Link Here
343
                                </div> <!-- / #selections-toolbar -->
343
                                </div> <!-- / #selections-toolbar -->
344
                            </div> <!-- /#floating -->
344
                            </div> <!-- /#floating -->
345
345
346
                            <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform" class="checkboxed">
346
                            <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform">
347
                                [% IF can_manage_shelf %]
347
                                [% IF can_manage_shelf %]
348
                                    <input type="hidden" name="op" value="remove_biblios" />
348
                                    <input type="hidden" name="op" value="remove_biblios" />
349
                                    <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
349
                                    <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
Lines 798-804 Link Here
798
798
799
[% INCLUDE 'opac-bottom.inc' %]
799
[% INCLUDE 'opac-bottom.inc' %]
800
[% BLOCK jsinclude %]
800
[% BLOCK jsinclude %]
801
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
802
[% Asset.js("lib/hc-sticky.js") | $raw %]
801
[% Asset.js("lib/hc-sticky.js") | $raw %]
803
[% IF OpenLibraryCovers || OpenLibrarySearch %]
802
[% IF OpenLibraryCovers || OpenLibrarySearch %]
804
    [% Asset.js("js/openlibrary.js") | $raw %]
803
    [% Asset.js("js/openlibrary.js") | $raw %]
Lines 893-907 $(function() { Link Here
893
        });
892
        });
894
    [% END %]
893
    [% END %]
895
894
896
    $("#CheckAll").click(function(){
895
    $("#CheckAll").on("click",function(e){
897
        $(".checkboxed").checkCheckboxes();
896
        e.preventDefault();
897
        $(".cb").each(function(){
898
            $(this).prop("checked", true);
899
        });
898
        enableCheckboxActions();
900
        enableCheckboxActions();
899
        return false;
900
    });
901
    });
901
    $("#CheckNone").click(function(){
902
    $("#CheckNone").on("click",function(e){
902
        $(".checkboxed").unCheckCheckboxes();
903
        e.preventDefault();
904
        $(".cb").each(function(){
905
            $(this).prop("checked", false);
906
        });
903
        enableCheckboxActions();
907
        enableCheckboxActions();
904
        return false;
905
    });
908
    });
906
909
907
    $(".cb").click(function(){
910
    $(".cb").click(function(){
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt (-8 / +11 lines)
Lines 337-343 Link Here
337
                                        </div>
337
                                        </div>
338
                                    [% END %]
338
                                    [% END %]
339
339
340
                                    <table id="suggestt" class="checkboxed table table-bordered table-striped">
340
                                    <table id="suggestt" class="table table-bordered table-striped">
341
                                        <thead>
341
                                        <thead>
342
                                            <tr>
342
                                            <tr>
343
                                                [% IF ( loggedinusername ) %]<th>&nbsp;</th>[% END %]
343
                                                [% IF ( loggedinusername ) %]<th>&nbsp;</th>[% END %]
Lines 465-471 Link Here
465
465
466
[% INCLUDE 'opac-bottom.inc' %]
466
[% INCLUDE 'opac-bottom.inc' %]
467
[% BLOCK jsinclude %]
467
[% BLOCK jsinclude %]
468
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
469
[% INCLUDE 'datatables.inc' %]
468
[% INCLUDE 'datatables.inc' %]
470
<script>
469
<script>
471
    [% IF ( loggedinusername ) %]
470
    [% IF ( loggedinusername ) %]
Lines 501-515 Link Here
501
        }));
500
        }));
502
        [% IF ( loggedinusername ) %]$("span.clearall").html("<a id=\"CheckNone\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Clear all")+"<\/a>");
501
        [% IF ( loggedinusername ) %]$("span.clearall").html("<a id=\"CheckNone\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Clear all")+"<\/a>");
503
        $("span.checkall").html("<a id=\"CheckAll\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Select all")+"<\/a>");
502
        $("span.checkall").html("<a id=\"CheckAll\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Select all")+"<\/a>");
504
        $("#CheckAll").click(function(){
503
        $("#CheckAll").on("click",function(e){
505
            $(".checkboxed").checkCheckboxes();
504
            e.preventDefault();
505
            $(".cb").each(function(){
506
                $(this).prop("checked", true);
507
            });
506
            enableCheckboxActions();
508
            enableCheckboxActions();
507
            return false;
508
        });
509
        });
509
        $("#CheckNone").click(function(){
510
        $("#CheckNone").on("click",function(e){
510
            $(".checkboxed").unCheckCheckboxes();
511
            e.preventDefault();
512
            $(".cb").each(function(){
513
                $(this).prop("checked", false);
514
            });
511
            enableCheckboxActions();
515
            enableCheckboxActions();
512
            return false;
513
        });
516
        });
514
        $(".cb").click(function(){
517
        $(".cb").click(function(){
515
          enableCheckboxActions();
518
          enableCheckboxActions();
(-)a/koha-tmpl/opac-tmpl/bootstrap/lib/jquery/plugins/jquery.checkboxes.min.js (-14 lines)
Lines 1-13 Link Here
1
/*
2
 *
3
 * Copyright (c) 2006-2008 Sam Collett (http://www.texotela.co.uk)
4
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
5
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
6
 *
7
 * Version 2.1
8
 * Demo: http://www.texotela.co.uk/code/jquery/checkboxes/
9
 *
10
 * $LastChangedDate$
11
 * $Rev$
12
 */
13
;(function(d){d.fn.toggleCheckboxes=function(a,b){a=a||"*";b=b||false;var c=d([]);this.each(function(){var e=d("input[type=checkbox]",this).filter(a).each(function(){this.checked=!this.checked}).filter(":checked");c=e});if(!b){c=this}return c};d.fn.checkCheckboxes=function(a,b){a=a||"*";b=b||false;var c=d([]);this.each(function(){var e=d("input[type=checkbox]",this).filter(a).each(function(){this.checked=true}).filter(":checked");c=e});if(!b){c=this}return c};d.fn.unCheckCheckboxes=function(a,b){a=a||"*";b=b||false;var c=d([]);this.each(function(){var e=d("input[type=checkbox]",this).filter(a).each(function(){this.checked=false}).filter(":not(:checked)");c=e});if(!b){c=this}return c};d.radioCheckboxGroup=function(e,a){a=a||"*";var b="input[type=checkbox]";if(e){b+="[name="+e+"]"}var c=d(b).filter(a);c.click(function(){c.not(this).each(function(){this.checked=false}).end()})}})(jQuery);
14
- 

Return to bug 26805