From 1ebb2bd3afed6016d16fc89252f5203e2005ad97 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Thu, 14 Apr 2016 16:07:08 -0400 Subject: [PATCH] webstaff: Make alert type selection sticky when an alert is saved Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton --- Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 36827fe60a..1e2131990b 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 @@ -1894,6 +1894,10 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , temp : false }; + egCore.hatch.getItem('cat.copy.alerts.last_type').then(function(t) { + if (t) $scope.copy_alert.alert_type = t; + }); + if (copy_list.length == 1) { $scope.copy_alert_list = copy_list[0].copy_alerts(); } @@ -1917,6 +1921,14 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , ); cp.copy_alerts().push( a ); }); + + if (copy_alert.alert_type) { + egCore.hatch.setItem( + 'cat.copy.alerts.last_type', + copy_alert.alert_type + ); + } + } $modalInstance.close(); -- 2.11.0