From: Mike Rylander Date: Mon, 15 May 2017 20:28:29 +0000 (-0400) Subject: webstaff: serials code cleanup and removing an inf digest loop X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6f9c07f29b9aec3adb5f2adf86faa37dd4a1995d;p=working%2FEvergreen.git webstaff: serials code cleanup and removing an inf digest loop Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/web/js/ui/default/staff/serials/directives/item_manager.js b/Open-ILS/web/js/ui/default/staff/serials/directives/item_manager.js index 2ada6a40f5..bedc656b12 100644 --- a/Open-ILS/web/js/ui/default/staff/serials/directives/item_manager.js +++ b/Open-ILS/web/js/ui/default/staff/serials/directives/item_manager.js @@ -15,45 +15,6 @@ function($scope , $q , egSerialsCoreSvc , egCore , $uibModal) { egSerialsCoreSvc.fetch($scope.bibId); - // convert to sitem funcs - $scope.createScap = function(pred) { - var scap = egCore.idl.fromTypedHash(pred); - egCore.pcrud.create(scap).then(function() { - // completely reset the model in order to reset the - // forms; causes a blink, alas - $scope.predictions = []; - $scope.new_prediction = null; - egSerialsCoreSvc.fetch($scope.bibId).then(function() { - reload($scope.ssubId); - }); - }); - } - $scope.updateScap = function(pred) { - var scap = egCore.idl.fromTypedHash(pred); - egCore.pcrud.update(scap).then(function() { - // completely reset the model in order to reset the - // forms; causes a blink, alas - $scope.predictions = []; - egSerialsCoreSvc.fetch($scope.bibId).then(function() { - reload($scope.ssubId); - }); - }); - } - $scope.deleteScap = function(pred) { - var scap = egCore.idl.fromTypedHash(pred); - // TODO ask to confirm - // TODO check whether there are linked issuances - egCore.pcrud.remove(scap).then(function() { - // completely reset the model in order to reset the - // forms; causes a blink, alas - $scope.predictions = []; - egSerialsCoreSvc.fetch($scope.bibId).then(function() { - reload($scope.ssubId); - }); - }); - } - - }] } }) diff --git a/Open-ILS/web/js/ui/default/staff/serials/services/core.js b/Open-ILS/web/js/ui/default/staff/serials/services/core.js index 62d76593c0..c935fcc79a 100644 --- a/Open-ILS/web/js/ui/default/staff/serials/services/core.js +++ b/Open-ILS/web/js/ui/default/staff/serials/services/core.js @@ -283,7 +283,9 @@ function(egCore , orderByFilter , $q , $filter , $uibModal) { date : $scope.pubdate, prev_iss : options.prev_iss }); - $scope.pubdate = $scope.args.date; + if ($scope.args.date) + $scope.pubdate = $scope.args.date; + delete options.prev_iss; // only use this once } }