From 601f011a113d14faaeac7d0f33201c61fc7348ae Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Wed, 14 Jan 2015 15:05:14 -0500 Subject: [PATCH] LP#1402797 Implement "Retrieve Last Bib Record" using localStorage record cache Signed-off-by: Mike Rylander Signed-off-by: Bill Erickson --- Open-ILS/src/templates/staff/navbar.tt2 | 6 ++++++ Open-ILS/web/js/ui/default/staff/services/navbar.js | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/Open-ILS/src/templates/staff/navbar.tt2 b/Open-ILS/src/templates/staff/navbar.tt2 index fe0695ad0c..018a93f98d 100644 --- a/Open-ILS/src/templates/staff/navbar.tt2 +++ b/Open-ILS/src/templates/staff/navbar.tt2 @@ -169,6 +169,12 @@ [% l('Record Buckets') %] +
  • + + + [% l('Retrieve Last Bib Record') %] + +
  • diff --git a/Open-ILS/web/js/ui/default/staff/services/navbar.js b/Open-ILS/web/js/ui/default/staff/services/navbar.js index 8806d65bed..ba168cbb8a 100644 --- a/Open-ILS/web/js/ui/default/staff/services/navbar.js +++ b/Open-ILS/web/js/ui/default/staff/services/navbar.js @@ -45,6 +45,15 @@ angular.module('egCoreMod') hotkeys.add(key, desc, function() { navTo(path) }); }; + $scope.retrieveLastRecord = function() { + var last_record = egCore.hatch.getLocalItem("eg.cat.last_record_retrieved"); + if (last_record) { + var reg = new RegExp($location.path()); + $window.location.href = + $window.location.href + 'cat/catalog/record/' + last_record; + } + } + $scope.applyLocale = function(locale) { // EGWeb.pm can change the locale for us w/ the right param // Note: avoid using $location.search() to derive a new -- 2.43.2