From: Galen Charlton Date: Tue, 25 Apr 2017 21:28:19 +0000 (-0400) Subject: webstaff: serials: add egSubSelector directive X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b19088a6c6910accd50afcac0410462d862751d2;p=working%2FEvergreen.git webstaff: serials: add egSubSelector directive This directive allows the operator to select the subscription they want to work on in contexts such as the prediction manager. Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/templates/staff/serials/index.tt2 b/Open-ILS/src/templates/staff/serials/index.tt2 index d380a387d8..692e57d5b8 100644 --- a/Open-ILS/src/templates/staff/serials/index.tt2 +++ b/Open-ILS/src/templates/staff/serials/index.tt2 @@ -9,6 +9,7 @@ + diff --git a/Open-ILS/src/templates/staff/serials/t_sub_selector.tt2 b/Open-ILS/src/templates/staff/serials/t_sub_selector.tt2 new file mode 100644 index 0000000000..99f3e0d7ee --- /dev/null +++ b/Open-ILS/src/templates/staff/serials/t_sub_selector.tt2 @@ -0,0 +1,10 @@ + + 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 new file mode 100644 index 0000000000..7dfab83bd2 --- /dev/null +++ b/Open-ILS/web/js/ui/default/staff/serials/directives/sub_selector.js @@ -0,0 +1,22 @@ +angular.module('egSerialsAppDep') + +.directive('egSubSelector', function() { + return { + transclude: true, + restrict: 'E', + scope: { + bibId : '=', + ssubId : '=' + }, + templateUrl: './serials/t_sub_selector', + controller: + ['$scope','$q','egSerialsCoreSvc','egCore','egGridDataProvider', + '$uibModal', +function($scope , $q , egSerialsCoreSvc , egCore , egGridDataProvider , + $uibModal) { + egSerialsCoreSvc.fetch($scope.bibId).then(function() { + $scope.subscriptions = egCore.idl.toTypedHash(egSerialsCoreSvc.subTree); + }); +}] + } +})