From: Mike Rylander Date: Thu, 14 Apr 2016 20:07:08 +0000 (-0400) Subject: webstaff: Make alert type selection sticky when an alert is saved X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b38c8ec111ceb1471cda4b7c547cf0350e0d4156;p=working%2FEvergreen.git webstaff: Make alert type selection sticky when an alert is saved 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 f6717bbfc6..65032788db 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 @@ -1642,6 +1642,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(); } @@ -1665,6 +1669,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();