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

(-)a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss (-5 / +29 lines)
Lines 24-34 $footer-height: 45px; Link Here
24
}
24
}
25
25
26
.js {
26
.js {
27
    .dateformat {
27
    .dateformat,
28
        display: none;
28
    #sorting-form {
29
    }
30
31
    #sortsubmit {
32
        display: none;
29
        display: none;
33
    }
30
    }
34
}
31
}
Lines 609-614 th { Link Here
609
    color: #333;
606
    color: #333;
610
}
607
}
611
608
609
/* Add style for Bootstrap dropdown-header class */
610
.dropdown-header {
611
    border-top: 1px solid #eee;
612
    color: #000;
613
    display: block;
614
    font-size: 90%;
615
    font-weight: 700;
616
    line-height: 1.42857143;
617
    padding: 3px 20px;
618
    padding-left: 10px;
619
    white-space: nowrap;
620
}
621
622
.btn-group.open {
623
    .btn-link {
624
        &.dropdown-toggle {
625
            background-image: none;
626
            box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25);
627
        }
628
    }
629
}
630
631
612
.breadcrumb {
632
.breadcrumb {
613
    background-color: #F0F3F3;
633
    background-color: #F0F3F3;
614
    font-size: 85%;
634
    font-size: 85%;
Lines 1361-1366 div { Link Here
1361
                border-left: 0;
1381
                border-left: 0;
1362
            }
1382
            }
1363
        }
1383
        }
1384
1385
        &.dropdown-header {
1386
            display: block;
1387
        }
1364
    }
1388
    }
1365
1389
1366
    ul {
1390
    ul {
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt (-11 / +31 lines)
Lines 247-272 Link Here
247
                                        </optgroup>
247
                                        </optgroup>
248
                                        <optgroup label="Copyright date">
248
                                        <optgroup label="Copyright date">
249
                                            [% IF sortfield == 'copyrightdate' && direction == 'asc' %]
249
                                            [% IF sortfield == 'copyrightdate' && direction == 'asc' %]
250
                                                <option value="copyrightdate:asc" selected="selected">Copyright date (newest to oldest)</option>
250
                                                <option value="copyrightdate:desc" selected="selected">Copyright date (newest to oldest)</option>
251
                                            [% ELSE %]
251
                                            [% ELSE %]
252
                                                <option value="copyrightdate:asc">Copyright date (newest to oldest)</option>
252
                                                <option value="copyrightdate:desc">Copyright date (newest to oldest)</option>
253
                                            [% END %]
253
                                            [% END %]
254
                                            [% IF sortfield == 'copyrightdate' && direction == 'desc' %]
254
                                            [% IF sortfield == 'copyrightdate' && direction == 'desc' %]
255
                                                <option value="copyrightdate:desc" selected="selected">Copyright date (oldest to newest)</option>
255
                                                <option value="copyrightdate:asc" selected="selected">Copyright date (oldest to newest)</option>
256
                                            [% ELSE %]
256
                                            [% ELSE %]
257
                                                <option value="copyrightdate:desc">Copyright date (oldest to newest)</option>
257
                                                <option value="copyrightdate:asc">Copyright date (oldest to newest)</option>
258
                                            [% END %]
258
                                            [% END %]
259
                                        </optgroup>
259
                                        </optgroup>
260
                                        <optgroup label="Date added">
260
                                        <optgroup label="Date added">
261
                                            [% IF sortfield == "dateadded" && direction == 'asc' %]
261
                                            [% IF sortfield == "dateadded" && direction == 'asc' %]
262
                                                <option value="dateadded:asc" selected="selected">Date added (newest to oldest)</option>
262
                                                <option value="dateadded:desc" selected="selected">Date added (newest to oldest)</option>
263
                                            [% ELSE %]
263
                                            [% ELSE %]
264
                                                <option value="dateadded:asc">Date added (newest to oldest)</option>
264
                                                <option value="dateadded:desc">Date added (newest to oldest)</option>
265
                                            [% END %]
265
                                            [% END %]
266
                                            [% IF sortfield == "dateadded" && direction == 'desc' %]
266
                                            [% IF sortfield == "dateadded" && direction == 'desc' %]
267
                                                <option value="dateadded:desc" selected="selected">Date added (oldest to newest)</option>
267
                                                <option value="dateadded:asc" selected="selected">Date added (oldest to newest)</option>
268
                                            [% ELSE %]
268
                                            [% ELSE %]
269
                                                <option value="dateadded:desc">Date added (oldest to newest)</option>
269
                                                <option value="dateadded:asc">Date added (oldest to newest)</option>
270
                                            [% END %]
270
                                            [% END %]
271
                                        </optgroup>
271
                                        </optgroup>
272
                                    </select>
272
                                    </select>
Lines 929-936 $(function() { Link Here
929
        KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
929
        KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]');
930
    [% END %]
930
    [% END %]
931
931
932
    $('#sort-submit').hide();
933
934
    [% IF print %]
932
    [% IF print %]
935
        window.print();
933
        window.print();
936
        window.onafterprint = function () {
934
        window.onafterprint = function () {
Lines 947-958 $(function() { Link Here
947
        stickyClass: "floating"
945
        stickyClass: "floating"
948
    });
946
    });
949
947
948
    sortMenu( $("#sorting-form") );
949
950
    $("#sortfield").on("change", function(){
950
    $("#sortfield").on("change", function(){
951
        $('#sorting-form').submit();
951
        $('#sorting-form').submit();
952
    });
952
    });
953
953
954
}); // document.ready
954
}); // document.ready
955
955
956
function sortMenu( sorting_form ){
957
    var shelfnumber = sorting_form.find("input[name='shelfnumber']").val();
958
    var sort_link = "/cgi-bin/koha/opac-shelves.pl?op=view&amp;shelfnumber=" + shelfnumber + "&sortfield=";
959
    var menu = "<div class=\"btn-group\"><button type=\"button\" class=\"btn btn-link dropdown-toggle\" data-toggle=\"dropdown\" id=\"sortmenu\" aria-haspopup=\"true\" aria-expanded=\"false\"><i class=\"fa fa-sort\"></i> " + _("Sort") + "</span></button><ul class=\"dropdown-menu dropdown-menu-right\" aria-labelledby=\"sortmenu\">";
960
    $("#sortfield").children().each(function(){
961
        if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
962
            menu += "<li><a href=\"" + sort_link + $(this).val() + "\">" + $(this).text() + "</a></li>";
963
        } else if( $(this)[0].tagName.toUpperCase() == "OPTGROUP" ){
964
            menu += "<li class=\"dropdown-header\">" + $(this).attr("label") + "</li>";
965
            $(this).children().each(function(){
966
                if( $(this)[0].tagName.toUpperCase() == "OPTION" ){
967
                    menu += "<li><a href=\"" + sort_link + $(this).val() + "\">" + $(this).text() + "</a></li>";
968
                }
969
            });
970
        }
971
    });
972
    menu += "</ul></div>";
973
    $(".list-actions").append( menu );
974
    sorting_form.remove();
975
}
976
956
function AdjustRemark() {
977
function AdjustRemark() {
957
    var category;
978
    var category;
958
    if( $("#category").length > 0 ) {
979
    if( $("#category").length > 0 ) {
959
- 

Return to bug 23915