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&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 |
- |
|
|