From: Galen Charlton Date: Tue, 29 Aug 2017 20:11:13 +0000 (-0400) Subject: LP#1708291: tweak to subscription selector X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b437f50243e90b63dd3ba6f9532448df8c601a5f;p=working%2FEvergreen.git LP#1708291: tweak to subscription selector When entering the Manage Predictions or Manage Issues tab and only one subscription is present in the current OU scope, automatically select it rather than making the operator have to select it manually. Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier Signed-off-by: Dan Wells --- diff --git a/Open-ILS/web/js/ui/default/staff/serials/directives/sub_selector.js b/Open-ILS/web/js/ui/default/staff/serials/directives/sub_selector.js index 7556046419..2918e784e5 100644 --- a/Open-ILS/web/js/ui/default/staff/serials/directives/sub_selector.js +++ b/Open-ILS/web/js/ui/default/staff/serials/directives/sub_selector.js @@ -24,6 +24,9 @@ function($scope , $q , egSerialsCoreSvc , egCore , egGridDataProvider , function reload() { egSerialsCoreSvc.fetch($scope.bibId, $scope.selected_owning_ou).then(function() { $scope.subscriptions = egCore.idl.toTypedHash(egSerialsCoreSvc.subTree); + if ($scope.subscriptions.length == 1 && !$scope.ssubId) { + $scope.ssubId = $scope.subscriptions[0].id; + } }); } }]