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 977-984
$(function() {
Link Here
|
977 |
KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]'); |
977 |
KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]'); |
978 |
[% END %] |
978 |
[% END %] |
979 |
|
979 |
|
980 |
$('#sort-submit').hide(); |
|
|
981 |
|
982 |
[% IF print %] |
980 |
[% IF print %] |
983 |
window.print(); |
981 |
window.print(); |
984 |
window.onafterprint = function () { |
982 |
window.onafterprint = function () { |
Lines 995-1006
$(function() {
Link Here
|
995 |
stickyClass: "floating" |
993 |
stickyClass: "floating" |
996 |
}); |
994 |
}); |
997 |
|
995 |
|
|
|
996 |
sortMenu( $("#sorting-form") ); |
997 |
|
998 |
$("#sortfield").on("change", function(){ |
998 |
$("#sortfield").on("change", function(){ |
999 |
$('#sorting-form').submit(); |
999 |
$('#sorting-form').submit(); |
1000 |
}); |
1000 |
}); |
1001 |
|
1001 |
|
1002 |
}); // document.ready |
1002 |
}); // document.ready |
1003 |
|
1003 |
|
|
|
1004 |
function sortMenu( sorting_form ){ |
1005 |
var shelfnumber = sorting_form.find("input[name='shelfnumber']").val(); |
1006 |
var sort_link = "/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=" + shelfnumber + "&sortfield="; |
1007 |
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\">"; |
1008 |
$("#sortfield").children().each(function(){ |
1009 |
if( $(this)[0].tagName.toUpperCase() == "OPTION" ){ |
1010 |
menu += "<li><a href=\"" + sort_link + $(this).val() + "\">" + $(this).text() + "</a></li>"; |
1011 |
} else if( $(this)[0].tagName.toUpperCase() == "OPTGROUP" ){ |
1012 |
menu += "<li class=\"dropdown-header\">" + $(this).attr("label") + "</li>"; |
1013 |
$(this).children().each(function(){ |
1014 |
if( $(this)[0].tagName.toUpperCase() == "OPTION" ){ |
1015 |
menu += "<li><a href=\"" + sort_link + $(this).val() + "\">" + $(this).text() + "</a></li>"; |
1016 |
} |
1017 |
}); |
1018 |
} |
1019 |
}); |
1020 |
menu += "</ul></div>"; |
1021 |
$(".list-actions").append( menu ); |
1022 |
sorting_form.remove(); |
1023 |
} |
1024 |
|
1004 |
function AdjustRemark() { |
1025 |
function AdjustRemark() { |
1005 |
var category; |
1026 |
var category; |
1006 |
if( $("#category").length > 0 ) { |
1027 |
if( $("#category").length > 0 ) { |
1007 |
- |
|
|