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 439-463 th { Link Here
439
    color: #727272;
439
    color: #727272;
440
}
440
}
441
441
442
#selections {
443
    color: #727272;
444
    font-weight: bold;
445
}
446
447
#selections-toolbar {
448
    background: #e2e8e8 none;
449
    border-bottom: none;
450
    margin-top: 3px;
451
}
452
453
.selections {
454
    font-weight: bold;
455
}
456
457
.selections-toolbar.toolbar {
458
    background: #e2e8e8 none;
459
}
460
461
.actions-menu {
442
.actions-menu {
462
    padding-top: 5px;
443
    padding-top: 5px;
463
}
444
}
Lines 498-503 th { Link Here
498
        &.disabled,
479
        &.disabled,
499
        &[disabled] {
480
        &[disabled] {
500
            color: #333;
481
            color: #333;
482
            filter: alpha(opacity=65);
483
            opacity: 0.65;
501
484
502
            &:hover {
485
            &:hover {
503
                i {
486
                i {
Lines 901-907 div { Link Here
901
        display: inline;
884
        display: inline;
902
        font-size: 100%;
885
        font-size: 100%;
903
        font-weight: bold;
886
        font-weight: bold;
904
        margin-left: .5em;
905
    }
887
    }
906
888
907
    select {
889
    select {
Lines 913-931 div { Link Here
913
    }
895
    }
914
896
915
    li {
897
    li {
916
        // display: inline;
917
        // list-style: none;
918
919
        // a {
920
        //     border-left: 1px solid #E8E8E8;
921
        // }
922
923
        // &:first-child {
924
        //     a {
925
        //         border-left: 0;
926
        //     }
927
        // }
928
929
        &.dropdown-header {
898
        &.dropdown-header {
930
            display: block;
899
            display: block;
931
        }
900
        }
Lines 942-963 div { Link Here
942
    }
911
    }
943
}
912
}
944
913
945
#selections-toolbar,
914
.selections {
915
    color: #727272;
916
    font-weight: bold;
917
918
    &::before {
919
        color: #6c757d;
920
        content: "|";
921
        display: inline-block;
922
        font-weight: normal;
923
        padding: 0 .5rem;
924
        text-shadow: 1px 1px 0 #fff;
925
    }
926
}
927
928
.check_control {
929
    &::before {
930
        color: #6c757d;
931
        content: "|";
932
        display: inline-block;
933
        font-weight: normal;
934
        padding: 0 .5rem;
935
        text-shadow: 1px 1px 0 #fff;
936
    }
937
}
938
946
.selections-toolbar {
939
.selections-toolbar {
947
    background: linear-gradient( #B2B2B2 0%, #E0E0E0 14%, #E8E8E8 100% );
940
    background: linear-gradient(#B2B2B2 0%, #E0E0E0 14%, #E8E8E8 100%);
941
    border-bottom: none;
942
    margin-top: 3px;
943
    display: flex;
948
    margin: 0;
944
    margin: 0;
949
    padding-left: 10px;
945
    padding-left: 10px;
950
    padding-top: .5em;
946
    padding-top: .5em;
951
947
948
    > div:first-child::before {
949
        content: "";
950
        padding: 0;
951
    }
952
952
    a,
953
    a,
953
    button,
954
    button,
954
    input {
955
    input {
955
        font-size: .9rem;
956
        font-size: .9rem;
956
    }
957
    }
957
958
    .btn-sm {
959
        padding: 0.1rem 0.5rem;
960
    }
961
}
958
}
962
959
963
.list-actions {
960
.list-actions {
Lines 1291-1303 nav { Link Here
1291
    font-size: 90%;
1288
    font-size: 90%;
1292
}
1289
}
1293
1290
1294
.highlight_controls {
1291
.links {
1295
    float: left;
1292
    flex-grow: 1;
1296
    margin-top: 3px;
1297
}
1298
1293
1299
.links a {
1294
    a {
1300
    font-weight: bold;
1295
        font-weight: bold;
1296
    }
1301
}
1297
}
1302
1298
1303
#tagslist {
1299
#tagslist {
Lines 1671-1676 nav { Link Here
1671
}
1667
}
1672
1668
1673
#addto {
1669
#addto {
1670
    display: inline-block;
1674
    max-width: 10em;
1671
    max-width: 10em;
1675
}
1672
}
1676
1673
(-)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 329-340 Link Here
329
                                    [% END %]
329
                                    [% END %]
330
330
331
                                    [% IF ( loggedinusername ) %]
331
                                    [% IF ( loggedinusername ) %]
332
                                        <div id="selections-toolbar" class="toolbar">
332
                                        <div class="selections-toolbar toolbar">
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"></span> <span class="clearall"></span>
335
                                                <span id="selections">Select suggestions to: </span>
335
                                            </div>
336
                                                <span id="removeitems"></span>
336
                                            <div class="links">
337
                                            </span>
337
                                                <span class="selections">Select suggestions to: </span>
338
                                                <span id="removeitems">
339
                                                    <a href="#" class="btn btn-link removeitems tag_hides disabled"><i class="fa fa-trash" aria-hidden="true"></i> Delete</a>
340
                                                </span>
341
                                            </div>
338
                                        </div>
342
                                        </div>
339
                                    [% END %]
343
                                    [% END %]
340
344
Lines 473-483 Link Here
473
            // Enable/disable controls if checkboxes are checked
477
            // Enable/disable controls if checkboxes are checked
474
            var checkedBoxes = $(".cb:checked");
478
            var checkedBoxes = $(".cb:checked");
475
            if ($(checkedBoxes).size()) {
479
            if ($(checkedBoxes).size()) {
476
              $("#selections").html(_("With selected suggestions: "));
480
              $(".selections").html(_("With selected suggestions: "));
477
              $("#selections-toolbar .links a").removeClass("disabled");
481
              $(".selections-toolbar .links a").removeClass("disabled");
478
            } else {
482
            } else {
479
              $("#selections").html(_("Select suggestions to: "));
483
              $(".selections").html(_("Select suggestions to: "));
480
              $("#selections-toolbar .links a").addClass("disabled");
484
              $(".selections-toolbar .links a").addClass("disabled");
481
            }
485
            }
482
        }
486
        }
483
    [% END %]
487
    [% END %]
Lines 515-521 Link Here
515
        $(".cb").click(function(){
519
        $(".cb").click(function(){
516
          enableCheckboxActions();
520
          enableCheckboxActions();
517
        });
521
        });
518
        $("#removeitems").html("<a href=\"#\" class=\"btn btn-link removeitems tag_hides btn-disabled\"><i class=\"fa fa-trash\" aria-hidden=\"true\"></i> "+_("Delete")+"</a>");
519
522
520
        enableCheckboxActions();
523
        enableCheckboxActions();
521
524
522
- 

Return to bug 27440