From: Mike Rylander Date: Tue, 29 Sep 2015 18:01:42 +0000 (-0400) Subject: Make the last applied template sticky X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ea2239b9cfb12c559fecb4c4a4c69cbac96c9205;p=working%2FEvergreen.git Make the last applied template sticky Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js index 22984b0c93..f6534af698 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js @@ -844,10 +844,13 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , $scope.template_name_list = Object.keys(t); } }); + egCore.hatch.getItem('cat.copy.last_template').then(function(t) { + if (t) $scope.template_name = t; + }); } $scope.fetchTemplates(); - $scope.applyTemplate = function (n) { + $scope.applyTemplate = function (n) { angular.forEach($scope.templates[n], function (v,k) { if (k == 'circ_lib') { $scope.working[k] = egCore.org.get(v); @@ -867,7 +870,7 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , }); } }); - $scope.template_name = ''; + egCore.hatch.setItem('cat.copy.last_template', n); } $scope.copytab = 'working';