From 7c2b5a004f2490e41a1142e460d8fa81929f78a7 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Mon, 31 Aug 2015 13:22:10 -0400 Subject: [PATCH] webstaff: Unbreak grid feature detection Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton Signed-off-by: Jason Stephenson --- Open-ILS/web/js/ui/default/staff/services/grid.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Open-ILS/web/js/ui/default/staff/services/grid.js b/Open-ILS/web/js/ui/default/staff/services/grid.js index 5e399b05ab..02e462cc76 100644 --- a/Open-ILS/web/js/ui/default/staff/services/grid.js +++ b/Open-ILS/web/js/ui/default/staff/services/grid.js @@ -126,14 +126,18 @@ angular.module('egGridMod', $scope.actionGroups = [{actions:[]}]; // Grouped actions for selected items $scope.menuItems = []; // global actions - $scope.showIndex = ($scope.features.indexOf('-index') == -1); + var features = ($scope.features) ? + $scope.features.split(',') : []; + delete $scope.features; + + $scope.showIndex = (features.indexOf('-index') == -1); - $scope.startSelected = $scope.selectAll = ($scope.features.indexOf('startSelected') > -1); - $scope.showActions = ($scope.features.indexOf('-actions') == -1); - $scope.showPagination = ($scope.features.indexOf('-pagination') == -1); - $scope.showPicker = ($scope.features.indexOf('-picker') == -1); + $scope.startSelected = $scope.selectAll = (features.indexOf('startSelected') > -1); + $scope.showActions = (features.indexOf('-actions') == -1); + $scope.showPagination = (features.indexOf('-pagination') == -1); + $scope.showPicker = (features.indexOf('-picker') == -1); - $scope.showMenu = ($scope.features.indexOf('-menu') == -1); + $scope.showMenu = (features.indexOf('-menu') == -1); // remove some unneeded values from the scope to reduce bloat @@ -161,10 +165,6 @@ angular.module('egGridMod', grid.dataProvider = $scope.itemsProvider; - var features = ($scope.features) ? - $scope.features.split(',') : []; - delete $scope.features; - if (!grid.indexField && grid.idlClass) grid.indexField = egCore.idl.classes[grid.idlClass].pkey; -- 2.11.0