From fc106961f383d8786dd8220a8fa794987262316a Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Mon, 26 Oct 2015 12:13:45 -0400 Subject: [PATCH] webstaff: Wire up statcat filtering in item attribute editor Signed-off-by: Mike Rylander --- Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 | 2 +- Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 b/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 index 4d1ec8e817..553cb252a8 100644 --- a/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 +++ b/Open-ILS/src/templates/staff/cat/volcopy/t_attr_edit.tt2 @@ -385,7 +385,7 @@
-
+
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 be13592874..7d92f9eb39 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 @@ -1295,6 +1295,15 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , $scope.workingGridDataProvider.refresh(); }); + $scope.statcat_visible = function (sc_owner) { + var visible = typeof $scope.working.statcat_filter === 'undefined' || !$scope.working.statcat_filter; + angular.forEach(egCore.org.ancestors(sc_owner), function (anscestor_org) { + if ($scope.working.statcat_filter == anscestor_org.id()) + visible = true; + }); + return visible; + } + $scope.suffix_list = []; itemSvc.get_suffixes(egCore.auth.user().ws_ou()).then(function(list){ $scope.suffix_list = list; -- 2.11.0