From 88542c700e01eb17ee885ac887007bff8dc51f02 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 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. Signed-off-by: Frederic Demians Works as described. I confirm that without this patch, the un-persistance of "show checkouts" choice is very perturbing for librarians coming from previous version of Koha. --- 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() { -- 2.1.2