From 251bbb2eb9069841d065b0ba915fb757672a2179 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 28 Oct 2019 17:57:20 +0000 Subject: [PATCH] Bug 23915: Replace OPAC list sort menu with Bootstrap menu button This patch adds JavaScript to the list contents page which converts the resort form's @@ -929,8 +929,6 @@ $(function() { KOHA.coce.getURL('[% Koha.Preference('CoceHost') | html %]', '[% Koha.Preference('CoceProviders') | html %]'); [% END %] - $('#sort-submit').hide(); - [% IF print %] window.print(); window.onafterprint = function () { @@ -947,12 +945,35 @@ $(function() { stickyClass: "floating" }); + sortMenu( $("#sorting-form") ); + $("#sortfield").on("change", function(){ $('#sorting-form').submit(); }); }); // document.ready +function sortMenu( sorting_form ){ + var shelfnumber = sorting_form.find("input[name='shelfnumber']").val(); + var sort_link = "/cgi-bin/koha/opac-shelves.pl?op=view&shelfnumber=" + shelfnumber + "&sortfield="; + var menu = "
"; + $(".list-actions").append( menu ); + sorting_form.remove(); +} + function AdjustRemark() { var category; if( $("#category").length > 0 ) { -- 2.39.5