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

(-)a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss (-45 / +42 lines)
Lines 427-451 th { Link Here
427
    color: #727272;
427
    color: #727272;
428
}
428
}
429
429
430
#selections {
431
    color: #727272;
432
    font-weight: bold;
433
}
434
435
#selections-toolbar {
436
    background: #e2e8e8 none;
437
    border-bottom: none;
438
    margin-top: 3px;
439
}
440
441
.selections {
442
    font-weight: bold;
443
}
444
445
.selections-toolbar.toolbar {
446
    background: #e2e8e8 none;
447
}
448
449
.actions-menu {
430
.actions-menu {
450
    padding-top: 5px;
431
    padding-top: 5px;
451
}
432
}
Lines 486-491 th { Link Here
486
        &.disabled,
467
        &.disabled,
487
        &[disabled] {
468
        &[disabled] {
488
            color: #333;
469
            color: #333;
470
            filter: alpha(opacity=65);
471
            opacity: 0.65;
489
472
490
            &:hover {
473
            &:hover {
491
                i {
474
                i {
Lines 889-895 div { Link Here
889
        display: inline;
872
        display: inline;
890
        font-size: 100%;
873
        font-size: 100%;
891
        font-weight: bold;
874
        font-weight: bold;
892
        margin-left: .5em;
893
    }
875
    }
894
876
895
    select {
877
    select {
Lines 901-919 div { Link Here
901
    }
883
    }
902
884
903
    li {
885
    li {
904
        // display: inline;
905
        // list-style: none;
906
907
        // a {
908
        //     border-left: 1px solid #E8E8E8;
909
        // }
910
911
        // &:first-child {
912
        //     a {
913
        //         border-left: 0;
914
        //     }
915
        // }
916
917
        &.dropdown-header {
886
        &.dropdown-header {
918
            display: block;
887
            display: block;
919
        }
888
        }
Lines 930-951 div { Link Here
930
    }
899
    }
931
}
900
}
932
901
933
#selections-toolbar,
902
.selections {
903
    color: #727272;
904
    font-weight: bold;
905
906
    &::before {
907
        color: #6c757d;
908
        content: "|";
909
        display: inline-block;
910
        font-weight: normal;
911
        padding: 0 .5rem;
912
        text-shadow: 1px 1px 0 #fff;
913
    }
914
}
915
916
.check_control {
917
    &::before {
918
        color: #6c757d;
919
        content: "|";
920
        display: inline-block;
921
        font-weight: normal;
922
        padding: 0 .5rem;
923
        text-shadow: 1px 1px 0 #fff;
924
    }
925
}
926
934
.selections-toolbar {
927
.selections-toolbar {
935
    background: linear-gradient( #B2B2B2 0%, #E0E0E0 14%, #E8E8E8 100% );
928
    background: linear-gradient(#B2B2B2 0%, #E0E0E0 14%, #E8E8E8 100%);
929
    border-bottom: none;
930
    margin-top: 3px;
931
    display: flex;
936
    margin: 0;
932
    margin: 0;
937
    padding-left: 10px;
933
    padding-left: 10px;
938
    padding-top: .5em;
934
    padding-top: .5em;
939
935
936
    > div:first-child::before {
937
        content: "";
938
        padding: 0;
939
    }
940
940
    a,
941
    a,
941
    button,
942
    button,
942
    input {
943
    input {
943
        font-size: .9rem;
944
        font-size: .9rem;
944
    }
945
    }
945
946
    .btn-sm {
947
        padding: 0.1rem 0.5rem;
948
    }
949
}
946
}
950
947
951
.list-actions {
948
.list-actions {
Lines 1279-1291 nav { Link Here
1279
    font-size: 90%;
1276
    font-size: 90%;
1280
}
1277
}
1281
1278
1282
.highlight_controls {
1279
.links {
1283
    float: left;
1280
    flex-grow: 1;
1284
    margin-top: 3px;
1285
}
1286
1281
1287
.links a {
1282
    a {
1288
    font-weight: bold;
1283
        font-weight: bold;
1284
    }
1289
}
1285
}
1290
1286
1291
#tagslist {
1287
#tagslist {
Lines 1659-1664 nav { Link Here
1659
}
1655
}
1660
1656
1661
#addto {
1657
#addto {
1658
    display: inline-block;
1662
    max-width: 10em;
1659
    max-width: 10em;
1663
}
1660
}
1664
1661
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt (-9 / +10 lines)
Lines 48-59 Link Here
48
                                [% END %]
48
                                [% END %]
49
                            </div>
49
                            </div>
50
50
51
                            <div id="selections-toolbar" class="toolbar noprint">
51
                            <div class="selections-toolbar toolbar noprint">
52
                                <a id="CheckAll" class="btn btn-link btn-sm btn-sm" href="#">Select all</a>
52
                                <div class="check_control">
53
                                <a id="CheckNone" class="btn btn-link btn-sm btn-sm" href="#">Clear all</a>
53
                                    <a id="CheckAll" class="btn btn-link btn-sm btn-sm" href="#">Select all</a>
54
                                <span class="sep">|</span>
54
                                    <a id="CheckNone" class="btn btn-link btn-sm btn-sm" href="#">Clear all</a>
55
                                </div>
55
                                <span class="links" id="tag_hides">
56
                                <span class="links" id="tag_hides">
56
                                    <span id="selections">Select titles to: </span>
57
                                    <span class="selections">Select titles to: </span>
57
                                    <a href="#" class="btn btn-link btn-sm remove deleteshelf disabled"><i class="fa fa-remove" aria-hidden="true"></i> Remove</a>
58
                                    <a href="#" class="btn btn-link btn-sm remove deleteshelf disabled"><i class="fa fa-remove" aria-hidden="true"></i> Remove</a>
58
                                    [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) %]
59
                                    [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) %]
59
                                        [% IF ( ( Koha.Preference( 'virtualshelves' ) == 1 ) && loggedinusername ) %]
60
                                        [% IF ( ( Koha.Preference( 'virtualshelves' ) == 1 ) && loggedinusername ) %]
Lines 485-495 Link Here
485
                // Enable/disable controls if checkboxes are checked
486
                // Enable/disable controls if checkboxes are checked
486
                var checkedBoxes = $(".cb:checked");
487
                var checkedBoxes = $(".cb:checked");
487
                if ( checkedBoxes.length ) {
488
                if ( checkedBoxes.length ) {
488
                  $("#selections").html(_("With selected titles: "));
489
                  $(".selections").html(_("With selected titles: "));
489
                  $("#selections-toolbar .links a").removeClass("disabled");
490
                  $(".selections-toolbar .links a").removeClass("disabled");
490
                } else {
491
                } else {
491
                  $("#selections").html(_("Select titles to: "));
492
                  $(".selections").html(_("Select titles to: "));
492
                  $("#selections-toolbar .links a").addClass("disabled");
493
                  $(".selections-toolbar .links a").addClass("disabled");
493
                }
494
                }
494
            }
495
            }
495
        </script>
496
        </script>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-95 / +97 lines)
Lines 205-244 Link Here
205
                                        [% END # /UNLESS tag %]
205
                                        [% END # /UNLESS tag %]
206
                                    </div> <!-- / #toolbar -->
206
                                    </div> <!-- / #toolbar -->
207
207
208
                                    <div id="selections-toolbar" class="toolbar noprint">
208
                                    <div class="selections-toolbar toolbar noprint">
209
                                        [% IF ( OpacHighlightedWords ) %]
209
                                        [% IF ( OpacHighlightedWords ) %]
210
                                            <div class="highlight_controls noprint">
210
                                            <div class="highlight_controls noprint">
211
                                                <a href="#" class="btn btn-link btn-sm highlight_toggle" id="highlight_toggle_off"><i class="fa fa-fw fa-pencil" aria-hidden="true"></i> Unhighlight</a>
211
                                                <a href="#" class="btn btn-link btn-sm highlight_toggle" id="highlight_toggle_off"><i class="fa fa-fw fa-pencil" aria-hidden="true"></i> Unhighlight</a>
212
                                                <a href="#" class="btn btn-link btn-sm highlight_toggle" id="highlight_toggle_on"><i class="fa fa-fw fa-pencil" aria-hidden="true"></i> Highlight</a>
212
                                                <a href="#" class="btn btn-link btn-sm highlight_toggle" id="highlight_toggle_on"><i class="fa fa-fw fa-pencil" aria-hidden="true"></i> Highlight</a>
213
                                            </div>
213
                                            </div>
214
                                            <span class="sep">|</span>
215
                                        [% END %]
214
                                        [% END %]
216
                                        <!-- checkall, clearall are now needed for placehold -->
217
                                        <span class="checkall"></span>
218
                                        <span class="clearall"></span> <span class="sep">|</span>
219
215
220
                                            <span class="links">
216
                                        <div class="check_control">
221
                                                [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
217
                                            <!-- checkall, clearall are now needed for placehold -->
222
                                                    <span class="addto"></span>
218
                                            <span class="clearall">
223
                                                [% END %]
219
                                                <a id="CheckAll" class="btn btn-link btn-sm" href="#">Select all</a>
224
                                                <span id="placehold"></span>
220
                                            </span>
221
                                            <span class="checkall">
222
                                                <a id="CheckNone" class="btn btn-link btn-sm" href="#">Clear all</a>
223
                                            </span>
224
                                        </div>
225
225
226
                                                [% IF ( TagsInputEnabled && loggedinusername ) %]
226
                                        <div class="links">
227
                                                    <span id="tagsel_span">
227
                                            [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) || loggedinusername ) %]
228
                                                        <button id="tagsel_tag" class="btn btn-link btn-sm disabled" type="submit" style="display:none"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</button>
228
                                                <span class="selections">Select titles to:</span>
229
                                                    </span>
229
                                            [% END %]
230
                                                    <div id="tagsel_form" style="display:none">
230
                                            [% IF Koha.Preference( 'opacbookbag' ) == 1 OR Koha.Preference('virtualshelves') %]
231
                                                        <label for="tagsel_new">New tag:</label>
231
                                                <span class="addto">
232
                                                        <input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
232
                                                    <select class="disabled form-control form-control-sm" name="addto" id="addto">
233
                                                        <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-sm btn-primary" title="Add" type="submit" value="Add" />
233
                                                        <option>Add to...</option>
234
                                                        <a href="#" id="tagsel_cancel">(done)</a>
234
                                                        [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
235
                                                    </div>
235
                                                            <option value="addtocart">Cart</option>
236
                                                    <div id="tagsel_status" class="tagsel_tatus" style="display:none;">
236
                                                        [% END %]
237
                                                        Tag status here.
237
                                                        [% IF Koha.Preference('virtualshelves') %]
238
                                                    </div>
238
                                                            [% IF loggedinusername AND add_to_some_private_shelves.count %]
239
                                                [% END %]
239
                                                                <optgroup label="Your lists:">
240
                                            </span> <!-- / .links -->
240
                                                                [% SET number_of_private_shelves = 0 %]
241
                                    </div> <!-- / #selections-toolbar -->
241
                                                                [% FOREACH s IN add_to_some_private_shelves %]
242
                                                                    [% IF shelfnumber != s.shelfnumber %]
243
                                                                        <option id="s[% s.shelfnumber | html %]" value="addtolist">[% s.shelfname | html %]</option>
244
                                                                        [% SET number_of_private_shelves = number_of_private_shelves + 1 %]
245
                                                                        [% IF number_of_private_shelves == 10 %][% LAST %][% END %]
246
                                                                    [% END %]
247
                                                                [% END %]
248
                                                                </optgroup>
249
                                                            [% END %]
250
                                                            [% IF add_to_some_public_shelves.count %]
251
                                                                <optgroup label="Public lists:">
252
                                                                [% SET number_of_public_shelves = 0 %]
253
                                                                [% FOREACH s IN add_to_some_public_shelves %]
254
                                                                    [% IF shelfnumber != s.shelfnumber %]
255
                                                                        <option id="s[% s.shelfnumber | html %]" value="addtolist">[% s.shelfname | html %]</option>
256
                                                                        [% SET number_of_public_shelves = number_of_public_shelves + 1 %]
257
                                                                        [% IF number_of_public_shelves == 10 %][% LAST %][% END %]
258
                                                                    [% END %]
259
                                                                [% END %]
260
                                                                </optgroup>
261
                                                            [% END %]
262
                                                            [% IF ( add_to_some_private_shelves and add_to_some_private_shelves.count > 10 ) or ( add_to_some_public_shelves and add_to_some_public_shelves.count > 10 ) %]
263
                                                                <option value="morelists">[ More lists ]</option>
264
                                                            [% END %]
265
                                                            <option value="newlist">[ New list ]</option>"
266
                                                        [% END # /IF virtualshelves %]
267
                                                    </select>
268
                                                    <input type="submit" class="btn btn-sm btn-primary" value="Save" />
269
                                                </span>
270
                                            [% END # /IF opacbookbag || virtualshelves %]
271
272
                                            [% IF ( ( Koha.Preference( 'RequestOnOpac' ) == 1 ) && ( Koha.Preference( 'opacuserlogin' ) == 1 ) && DisplayMultiPlaceHold ) %]
273
                                                <button class="btn btn-link btn-sm hold disabled" type="button">
274
                                                    <i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold
275
                                                </button>
276
                                            [% END %]
277
278
                                            [% IF ( TagsInputEnabled && loggedinusername ) %]
279
                                                <span id="tagsel_span">
280
                                                    <button id="tagsel_tag" class="btn btn-link btn-sm disabled" type="submit" style="display:none"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</button>
281
                                                </span>
282
                                            [% END %]
283
                                        </div> <!-- / .links -->
284
                                        [% IF ( TagsInputEnabled && loggedinusername ) %]
285
                                            <div id="tagsel_form" style="display:none">
286
                                                <label for="tagsel_new">New tag:</label>
287
                                                <input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
288
                                                <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-sm btn-primary" title="Add" type="submit" value="Add" />
289
                                                <a href="#" id="tagsel_cancel">(done)</a>
290
                                            </div>
291
                                            <div id="tagsel_status" class="tagsel_tatus" style="display:none;">
292
                                                Tag status here.
293
                                            </div>
294
                                        [% END %]
295
                                    </div> <!-- / .selections-toolbar -->
242
                                </div> <!-- /#floating -->
296
                                </div> <!-- /#floating -->
243
297
244
                                <!-- TABLE RESULTS START -->
298
                                <!-- TABLE RESULTS START -->
Lines 714-726 Link Here
714
        function enableCheckboxActions(){
768
        function enableCheckboxActions(){
715
            // Enable/disable controls if checkboxes are checked
769
            // Enable/disable controls if checkboxes are checked
716
            var checkedBoxes = $(".cb:checked");
770
            var checkedBoxes = $(".cb:checked");
717
            var controls = $("#selections-toolbar .links a, #selections-toolbar .links input, #selections-toolbar .links select, #selections-toolbar .links label, #selections-toolbar .links button");
771
            var controls = $(".selections-toolbar .links a, .selections-toolbar .links input, .selections-toolbar .links select, .selections-toolbar .links label, .selections-toolbar .links button");
718
            if ($(checkedBoxes).size()) {
772
            if ($(checkedBoxes).size()) {
719
            $("#selections").html(_("With selected titles: "));
773
                $(".selections").html(_("With selected titles: "));
720
            $(controls).removeClass("disabled");
774
                $(controls).removeClass("disabled");
721
            } else {
775
            } else {
722
            $("#selections").html(_("Select titles to: "));
776
                $(".selections").html(_("Select titles to: "));
723
            $(controls).addClass("disabled");
777
                $(controls).addClass("disabled");
724
            }
778
            }
725
        }
779
        }
726
780
Lines 771-820 Link Here
771
                e.preventDefault();
825
                e.preventDefault();
772
            });
826
            });
773
827
774
            var param1 = "";
775
            [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) || loggedinusername ) %]
776
                param1 += "<span id=\"selections\">"+_("Select titles to: ")+"</span>";
777
            [% END %]
778
779
            [% IF Koha.Preference( 'opacbookbag' ) == 1 OR Koha.Preference('virtualshelves') %]
780
                param1 += "<select class=\"disabled\" name=\"addto\" id=\"addto\"><option>"+_("Add to...")+"</option>";
781
782
                [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
783
                    param1 += "<option value=\"addtocart\">"+_("Cart")+"<\/option>";
784
                [% END %]
785
                [% IF Koha.Preference('virtualshelves') %]
786
                    [% IF loggedinusername AND add_to_some_private_shelves.count %]
787
                        param1 += "<optgroup label=\""+_("Your lists:")+"\">";
788
                        [% SET number_of_private_shelves = 0 %]
789
                        [% FOREACH s IN add_to_some_private_shelves %]
790
                            [% IF shelfnumber != s.shelfnumber %]
791
                                param1 += "<option id=\"s[% s.shelfnumber | html %]\" value=\"addtolist\">[% s.shelfname | html %]<\/option>";
792
                                [% SET number_of_private_shelves = number_of_private_shelves + 1 %]
793
                                [% IF number_of_private_shelves == 10 %][% LAST %][% END %]
794
                            [% END %]
795
                        [% END %]
796
                        param1 += "<\/optgroup>";
797
                    [% END %]
798
                    [% IF add_to_some_public_shelves.count %]
799
                        param1 += "<optgroup label=\""+_("Public lists:")+"\">";
800
                        [% SET number_of_public_shelves = 0 %]
801
                        [% FOREACH s IN add_to_some_public_shelves %]
802
                            [% IF shelfnumber != s.shelfnumber %]
803
                                param1 += "<option id=\"s[% s.shelfnumber | html %]\" value=\"addtolist\">[% s.shelfname | html %]<\/option>";
804
                                [% SET number_of_public_shelves = number_of_public_shelves + 1 %]
805
                                [% IF number_of_public_shelves == 10 %][% LAST %][% END %]
806
                            [% END %]
807
                        [% END %]
808
                        param1 += "<\/optgroup>";
809
                    [% END %]
810
                    [% IF ( add_to_some_private_shelves and add_to_some_private_shelves.count > 10 ) or ( add_to_some_public_shelves and add_to_some_public_shelves.count > 10 ) %]
811
                        param1 += "<option value=\"morelists\">[ "+_("More lists")+" ]<\/option>";
812
                    [% END %]
813
                    param1 +="<option value=\"newlist\">"+_("[ New list ]")+"<\/option>"
814
                [% END # /IF virtualshelves %]
815
                param1 += "<\/select> <input type=\"submit\" class=\"btn btn-sm btn-primary\" value=\""+_("Save")+"\" />";
816
            [% END # /IF opacbookbag || virtualshelves %]
817
818
            $('.resort').change(function() {
828
            $('.resort').change(function() {
819
                $('#bookbag_form').submit();
829
                $('#bookbag_form').submit();
820
            });
830
            });
Lines 823-839 Link Here
823
                $('#bookbag_form').submit();
833
                $('#bookbag_form').submit();
824
            });
834
            });
825
835
826
            $("span.clearall").html("<a id=\"CheckNone\" class=\"btn btn-link btn-sm \" href=\"#\">"+_("Clear all")+"<\/a>");
827
            $("span.checkall").html("<a id=\"CheckAll\" class=\"btn btn-link btn-sm \" href=\"#\">"+_("Select all")+"<\/a>");
828
829
            [% IF Koha.Preference( 'opacbookbag' ) == 1 %]
830
                $("span.addto").html(param1);
831
            [% ELSE %]
832
                [% IF ( ( Koha.Preference( 'virtualshelves' ) == 1 ) && loggedinusername ) %]
833
                    $("span.addto").html(param1);
834
                [% END %]
835
            [% END %]
836
837
            [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
836
            [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
838
                [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
837
                [% IF Koha.Preference( 'virtualshelves' ) == 1 %]
839
                    $("#addto").on("change",function(){
838
                    $("#addto").on("change",function(){
Lines 893-905 Link Here
893
                enableCheckboxActions();
892
                enableCheckboxActions();
894
            });
893
            });
895
894
896
            [% IF ( ( Koha.Preference( 'RequestOnOpac' ) == 1 ) && ( Koha.Preference( 'opacuserlogin' ) == 1 ) && DisplayMultiPlaceHold ) %]
895
            $(".hold").on("click", function(e){
897
                $("#placehold").html("<button class=\"btn btn-link btn-sm hold disabled\" type=\"submit\"><i class=\"fa fa-fw fa-bookmark\" aria-hidden=\"true\"></i>" + _("Place hold") + "</button>");
896
                e.preventDefault();
898
                $("#placehold").find("button.hold").click(function(){
897
                holdMultiple();
899
                    holdMultiple();
898
            });
900
                    return false;
901
                });
902
            [% END %]
903
899
904
            [% IF ( query_desc ) %]
900
            [% IF ( query_desc ) %]
905
                [% IF ( OpacHighlightedWords ) %]
901
                [% IF ( OpacHighlightedWords ) %]
Lines 910-917 Link Here
910
                        q_array = q_array.splice(0,-1);
906
                        q_array = q_array.splice(0,-1);
911
                    }
907
                    }
912
                    highlightOn();
908
                    highlightOn();
913
                    $("#highlight_toggle_on" ).hide().click(function() {highlightOn() ;});
909
                    $("#highlight_toggle_on" ).hide().click(function(e) {
914
                    $("#highlight_toggle_off").show().click(function() {highlightOff();});
910
                        e.preventDefault();
911
                        highlightOn();
912
                    });
913
                    $("#highlight_toggle_off").show().click(function(e) {
914
                        e.preventDefault();
915
                        highlightOff();
916
                    });
915
                [% END # /IF OpacHighlightedWords %]
917
                [% END # /IF OpacHighlightedWords %]
916
                [% IF ( OverDriveEnabled ) %]
918
                [% IF ( OverDriveEnabled ) %]
917
                    var $overdrive_results = $( '<div id="overdrive-results">' + MSG_SEARCHING.format('OverDrive') + ' <img class="throbber" src="[% interface | html %]/lib/jquery/plugins/themes/classic/throbber.gif" /></div>' );
919
                    var $overdrive_results = $( '<div id="overdrive-results">' + MSG_SEARCHING.format('OverDrive') + ' <img class="throbber" src="[% interface | html %]/lib/jquery/plugins/themes/classic/throbber.gif" /></div>' );
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt (-36 / +20 lines)
Lines 58-72 Link Here
58
                                [% IF ( current_biblio_searches ) %]
58
                                [% IF ( current_biblio_searches ) %]
59
                                    <h2>Current session</h2>
59
                                    <h2>Current session</h2>
60
                                    <form action="/cgi-bin/koha/opac-search-history.pl" method="post">
60
                                    <form action="/cgi-bin/koha/opac-search-history.pl" method="post">
61
                                        <div class="selections-toolbar toolbar">
61
62
                                            <a class="CheckAll btn btn-link btn-sm" href="#">Select all</a>
62
                                        [% INCLUDE 'toolbar_controls' %]
63
                                            <a class="CheckNone btn btn-link btn-sm" href="#">Clear all</a>
64
                                            <span class="sep">|</span>
65
                                            <span class="links">
66
                                                <span class="selections">Select searches to: </span>
67
                                                <a href="#" class="removeitems disabled">Delete</a>
68
                                            </span>
69
                                        </div>
70
                                        <input type="hidden" name="action" value="delete" />
63
                                        <input type="hidden" name="action" value="delete" />
71
                                        <table class="historyt table table-bordered table-striped">
64
                                        <table class="historyt table table-bordered table-striped">
72
                                            <thead>
65
                                            <thead>
Lines 102-116 Link Here
102
                                [% IF ( previous_biblio_searches ) %]
95
                                [% IF ( previous_biblio_searches ) %]
103
                                    <h2>Previous sessions</h2>
96
                                    <h2>Previous sessions</h2>
104
                                    <form action="/cgi-bin/koha/opac-search-history.pl" method="post">
97
                                    <form action="/cgi-bin/koha/opac-search-history.pl" method="post">
105
                                        <div class="selections-toolbar toolbar">
98
                                        [% INCLUDE 'toolbar_controls' %]
106
                                            <a class="CheckAll btn btn-link btn-sm" href="#">Select all</a>
107
                                            <a class="CheckNone btn btn-link btn-sm" href="#">Clear all</a>
108
                                            <span class="sep">|</span>
109
                                            <span class="links">
110
                                                <span class="selections">Select searches to: </span>
111
                                                <a href="#" class="btn btn-link btn-sm removeitems disabled"><i class="fa fa-trash" aria-hidden="true"></i> Delete</a>
112
                                            </span>
113
                                        </div>
114
99
115
                                        <input type="hidden" name="action" value="delete" />
100
                                        <input type="hidden" name="action" value="delete" />
116
                                        <table class="historyt table table-bordered table-striped">
101
                                        <table class="historyt table table-bordered table-striped">
Lines 155-169 Link Here
155
                                [% IF ( current_authority_searches ) %]
140
                                [% IF ( current_authority_searches ) %]
156
                                    <h2>Current session</h2>
141
                                    <h2>Current session</h2>
157
                                    <form action="/cgi-bin/koha/opac-search-history.pl" method="post">
142
                                    <form action="/cgi-bin/koha/opac-search-history.pl" method="post">
158
                                        <div class="selections-toolbar toolbar">
143
                                        [% INCLUDE 'toolbar_controls' %]
159
                                            <a class="CheckAll" href="#">Select all</a>
160
                                            <a class="CheckNone" href="#">Clear all</a>
161
                                            <span class="sep">|</span>
162
                                            <span class="links">
163
                                                <span class="selections">Select searches to: </span>
164
                                                <a href="#" class="btn btn-link btn-sm removeitems disabled"><i class="fa fa-trash" aria-hidden="true"></i> Delete</a>
165
                                            </span>
166
                                        </div>
167
                                        <input type="hidden" name="action" value="delete" />
144
                                        <input type="hidden" name="action" value="delete" />
168
                                        <table class="historyt table table-bordered table-striped">
145
                                        <table class="historyt table table-bordered table-striped">
169
                                            <thead>
146
                                            <thead>
Lines 192-206 Link Here
192
                                [% IF ( previous_authority_searches ) %]
169
                                [% IF ( previous_authority_searches ) %]
193
                                    <h2>Previous sessions</h2>
170
                                    <h2>Previous sessions</h2>
194
                                    <form action="/cgi-bin/koha/opac-search-history.pl" method="post">
171
                                    <form action="/cgi-bin/koha/opac-search-history.pl" method="post">
195
                                        <div class="selections-toolbar toolbar">
172
                                        [% INCLUDE 'toolbar_controls' %]
196
                                            <a class="CheckAll" href="#">Select all</a>
197
                                            <a class="CheckNone" href="#">Clear all</a>
198
                                            <span class="sep">|</span>
199
                                            <span class="links">
200
                                                <span class="selections">Select searches to: </span>
201
                                                <a href="#" class="removeitems disabled">Delete</a>
202
                                            </span>
203
                                        </div>
204
                                        <input type="hidden" name="action" value="delete" />
173
                                        <input type="hidden" name="action" value="delete" />
205
                                        <table class="historyt table table-bordered table-striped">
174
                                        <table class="historyt table table-bordered table-striped">
206
                                            <thead>
175
                                            <thead>
Lines 239-244 Link Here
239
</div> <!-- / #main -->
208
</div> <!-- / #main -->
240
209
241
[% INCLUDE 'opac-bottom.inc' %]
210
[% INCLUDE 'opac-bottom.inc' %]
211
212
[% BLOCK toolbar_controls %]
213
    [% # Identical controls shown at the top of each table of search history %]
214
    <div class="selections-toolbar toolbar">
215
        <div class="check_control">
216
            <a class="CheckAll btn btn-link btn-sm" href="#">Select all</a>
217
            <a class="CheckNone btn btn-link btn-sm" href="#">Clear all</a>
218
        </div>
219
        <div class="links">
220
            <span class="selections">Select searches to: </span>
221
            <a href="#" class="removeitems disabled btn btn-sm btn-link"><i class="fa fa-trash" aria-hidden="true"></i> Delete</a>
222
        </div>
223
    </div>
224
[% END %]
225
242
[% BLOCK jsinclude %]
226
[% BLOCK jsinclude %]
243
[% INCLUDE 'datatables.inc' %]
227
[% INCLUDE 'datatables.inc' %]
244
<script>
228
<script>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt (-19 / +27 lines)
Lines 329-344 Link Here
329
329
330
                                </div> <!-- / #toolbar -->
330
                                </div> <!-- / #toolbar -->
331
331
332
                                <div id="selections-toolbar" class="toolbar noprint">
332
                                <div class="selections-toolbar toolbar noprint">
333
                                    <span class="checkall"></span> <span class="clearall"></span> <span class="sep">|</span>
333
                                    <div class="check_control">
334
                                    <span class="links">
334
                                        <span class="checkall">
335
                                        <span id="selections">Select titles to: </span>
335
                                            <a id="CheckAll" class="btn btn-link btn-sm" href="#">Select all</a>
336
                                        [% IF Koha.Preference( 'RequestOnOpac' ) == 1 %]
336
                                        </span>
337
                                            <span id="placehold"></span>
337
                                        <span class="clearall">
338
                                            <a id="CheckNone" class="btn btn-link btn-sm" href="#">Clear all</a>
339
                                        </span>
340
                                    </div>
341
                                    <div class="links">
342
                                        <span class="selections">Select titles to: </span>
343
                                        [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
344
                                            <span id="placehold">
345
                                                <a href="#" class="btn btn-link hold tag_hides disabled"><i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold</a>
346
                                            </span>
338
                                        [% END %]
347
                                        [% END %]
348
339
                                        [% IF ( TagsInputEnabled && loggedinusername ) %]
349
                                        [% IF ( TagsInputEnabled && loggedinusername ) %]
340
                                            <span id="addtags">
350
                                            <span id="addtags">
341
                                                <a id="tagsel_tag" href="#" class="btn btn-link btn-disabled"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</a>
351
                                                <a id="tagsel_tag" href="#" class="btn btn-link disabled"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</a>
342
                                            </span>
352
                                            </span>
343
                                            <span id="tagsel_form" class="form-inline" style="display:none">
353
                                            <span id="tagsel_form" class="form-inline" style="display:none">
344
                                                <label for="tagsel_new">New tag(s), separated by a comma:</label>
354
                                                <label for="tagsel_new">New tag(s), separated by a comma:</label>
Lines 350-357 Link Here
350
                                        [% IF loggedinusername && can_remove_biblios %]
360
                                        [% IF loggedinusername && can_remove_biblios %]
351
                                            <span id="removeitems"></span>
361
                                            <span id="removeitems"></span>
352
                                        [% END %]
362
                                        [% END %]
353
                                    </span> <!-- / .links -->
363
                                    </div> <!-- / .links -->
354
                                </div> <!-- / #selections-toolbar -->
364
                                </div> <!-- / .selections-toolbar -->
355
                            </div> <!-- /#floating -->
365
                            </div> <!-- /#floating -->
356
366
357
                            <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform">
367
                            <form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform">
Lines 879-906 function enableCheckboxActions(){ Link Here
879
    // Enable/disable controls if checkboxes are checked
889
    // Enable/disable controls if checkboxes are checked
880
    var checkedBoxes = $(".cb:checked");
890
    var checkedBoxes = $(".cb:checked");
881
    if ($(checkedBoxes).size()) {
891
    if ($(checkedBoxes).size()) {
882
      $("#selections").html(_("With selected titles: "));
892
      $(".selections").html(_("With selected titles: "));
883
      $("#selections-toolbar .links a").removeClass("disabled");
893
      $(".selections-toolbar .links a").removeClass("disabled");
884
    } else {
894
    } else {
885
      $("#selections").html(_("Select titles to: "));
895
      $(".selections").html(_("Select titles to: "));
886
      $("#selections-toolbar .links a").addClass("disabled");
896
      $(".selections-toolbar .links a").addClass("disabled");
887
    }
897
    }
888
}
898
}
889
899
890
$(function() {
900
$(function() {
891
    [% IF Koha.Preference( 'opacbookbag' ) == 1 %]$(".addtocart,.cartRemove").removeClass("hidden");[% END %]
901
    [% IF Koha.Preference( 'opacbookbag' ) == 1 %]$(".addtocart,.cartRemove").removeClass("hidden");[% END %]
892
    $("span.clearall").html("<a id=\"CheckNone\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Clear all")+"<\/a>");
893
    $("span.checkall").html("<a id=\"CheckAll\" class=\"btn btn-link btn-sm\" href=\"#\">"+_("Select all")+"<\/a>");
894
    $("a.print").show();
895
902
896
    [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
903
    [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'RequestOnOpac' ) == 1 ) ) %]
897
        $("#placehold").html("<a href=\"#\" class=\"btn btn-link hold tag_hides btn-disabled\"><i class=\"fa fa-fw fa-bookmark\" aria-hidden=\"true\"></i> "+_("Place hold")+"<\/a>");
904
        $(".selections-toolbar a.hold").click(function(e){
898
        $("#selections-toolbar a.hold").click(function(){
905
            e.preventDefault();
899
            holdSelections();
906
            holdSelections();
900
            return false;
901
        });
907
        });
902
    [% END %]
908
    [% END %]
903
909
910
    $("a.print").show();
911
904
    $("#CheckAll").on("click",function(e){
912
    $("#CheckAll").on("click",function(e){
905
        e.preventDefault();
913
        e.preventDefault();
906
        $(".cb").prop("checked", true);
914
        $(".cb").prop("checked", true);
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt (-12 / +14 lines)
Lines 328-339 Link Here
328
                                    [% END %]
328
                                    [% END %]
329
329
330
                                    [% IF ( loggedinusername ) %]
330
                                    [% IF ( loggedinusername ) %]
331
                                        <div id="selections-toolbar" class="toolbar">
331
                                        <div class="selections-toolbar toolbar">
332
                                            <span class="checkall"></span> <span class="clearall"></span> <span class="sep">|</span>
332
                                            <div class="check_control">
333
                                            <span class="links">
333
                                                <span class="checkall"></span> <span class="clearall"></span>
334
                                                <span id="selections">Select suggestions to: </span>
334
                                            </div>
335
                                                <span id="removeitems"></span>
335
                                            <div class="links">
336
                                            </span>
336
                                                <span class="selections">Select suggestions to: </span>
337
                                                <span id="removeitems">
338
                                                    <a href="#" class="btn btn-link removeitems tag_hides disabled"><i class="fa fa-trash" aria-hidden="true"></i> Delete</a>
339
                                                </span>
340
                                            </div>
337
                                        </div>
341
                                        </div>
338
                                    [% END %]
342
                                    [% END %]
339
343
Lines 472-482 Link Here
472
            // Enable/disable controls if checkboxes are checked
476
            // Enable/disable controls if checkboxes are checked
473
            var checkedBoxes = $(".cb:checked");
477
            var checkedBoxes = $(".cb:checked");
474
            if ($(checkedBoxes).size()) {
478
            if ($(checkedBoxes).size()) {
475
              $("#selections").html(_("With selected suggestions: "));
479
              $(".selections").html(_("With selected suggestions: "));
476
              $("#selections-toolbar .links a").removeClass("disabled");
480
              $(".selections-toolbar .links a").removeClass("disabled");
477
            } else {
481
            } else {
478
              $("#selections").html(_("Select suggestions to: "));
482
              $(".selections").html(_("Select suggestions to: "));
479
              $("#selections-toolbar .links a").addClass("disabled");
483
              $(".selections-toolbar .links a").addClass("disabled");
480
            }
484
            }
481
        }
485
        }
482
    [% END %]
486
    [% END %]
Lines 513-519 Link Here
513
        $(".cb").click(function(){
517
        $(".cb").click(function(){
514
          enableCheckboxActions();
518
          enableCheckboxActions();
515
        });
519
        });
516
        $("#removeitems").html("<a href=\"#\" class=\"btn btn-link removeitems tag_hides btn-disabled\"><i class=\"fa fa-trash\" aria-hidden=\"true\"></i> "+_("Delete")+"</a>");
517
520
518
        enableCheckboxActions();
521
        enableCheckboxActions();
519
522
520
- 

Return to bug 27440