From 334350403e19f54284cc29f98e87a05d1e0175b3 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 4 Nov 2014 12:03:13 -0500 Subject: [PATCH] Bug 13196 - "Always show checkouts immediately" cookie should persist across sessions Content-Type: text/plain; charset="utf-8" This patch modifies the way the checkouts script sets the "Always show checkouts" cookie so that it is set with an explicit expiration date (+365 days). This will allow the cookie to persist across browser sesssions. To test, apply the patch and clear your browser cookies to start with a clean slate. - Check out to a patron who has existing checkouts. Their checkouts should not load by default. - Check the "Always show checkouts immediately" checkbox. - Close your browser. - Reopen your browser and check out to that patron again. Checkouts should now be displayed by default. --- koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js index e333776..89fc21e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js @@ -143,7 +143,7 @@ $(document).ready(function() { $('#issues-table-load-immediately').prop('checked', true); } $('#issues-table-load-immediately').on( "change", function(){ - $.cookie("issues-table-load-immediately-" + script, $(this).is(':checked')); + $.cookie("issues-table-load-immediately-" + script, $(this).is(':checked'), { expires: 365 }); }); function LoadIssuesTable() { -- 1.7.9.5