Bug 23944: (follow-up) Update circulation to use new library
This patch updates the circulation page to use the new JavaScript Cookie library for cookie management. To test, apply the patch and open a patron record for checkout in the staff client. - Click "Search to hold" in the toolbar and perform a catalog search which will return results. - On the search results page, the toolbar at the top of the results should include a split "Place hold" button. The button's menu should include "Place hold for <patron>" and "Forget <patron>" options. Test that these work correctly. - In the table of search results each title should include a "Place hold for <patron>" link. - Go to the checkouts page for a patron with one or more checked-out items. - Check the "Always show checkouts immediately" checkbox. - The patron's checkouts should load. - Open another patron for checkout who has checked-out items. - The table of checkouts should load automatically. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
68c9273fa7
commit
54c821a9e8
|
|
@ -1049,11 +1049,11 @@
|
|||
columns_settings_borrowers_table = [% ColumnsSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
|
||||
|
||||
[% IF borrowernumber and patron %]
|
||||
if($.cookie("holdfor") != [% patron.borrowernumber | html %]){
|
||||
$.removeCookie("holdfor", { path: '/' });
|
||||
if( Cookies.get("holdfor") != [% patron.borrowernumber | html %]){
|
||||
Cookies.remove("holdfor", { path: '/' });
|
||||
}
|
||||
[% ELSE %]
|
||||
$.removeCookie("holdfor", { path: '/' });
|
||||
Cookies.remove("holdfor", { path: '/' });
|
||||
[% END %]
|
||||
|
||||
[% UNLESS ( patron.borrowernumber ) %][% UNLESS ( borrowers ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
|
||||
|
|
|
|||
|
|
@ -220,12 +220,12 @@ $(document).ready(function() {
|
|||
return false;
|
||||
});
|
||||
|
||||
if ( $.cookie("issues-table-load-immediately-" + script) == "true" ) {
|
||||
if ( Cookies.get("issues-table-load-immediately-" + script) == "true" ) {
|
||||
LoadIssuesTable();
|
||||
$('#issues-table-load-immediately').prop('checked', true);
|
||||
}
|
||||
$('#issues-table-load-immediately').on( "change", function(){
|
||||
$.cookie("issues-table-load-immediately-" + script, $(this).is(':checked'), { expires: 365 });
|
||||
Cookies.set("issues-table-load-immediately-" + script, $(this).is(':checked'), { expires: 365 });
|
||||
});
|
||||
|
||||
function LoadIssuesTable() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue