From 33a071a1adada515f6f89ab8a59c4574e5462ff3 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 23 Sep 2016 12:05:21 -0400 Subject: [PATCH] LP#1539089 Webstaff grid actions disabled until selected. The grid "Actions" menu is disabled until one or more rows are selected. Signed-off-by: Bill Erickson Signed-off-by: Jeanette Lundgren Signed-off-by: Kathy Lussier --- Open-ILS/src/templates/staff/share/t_autogrid.tt2 | 3 ++- Open-ILS/web/js/ui/default/staff/services/grid.js | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 b/Open-ILS/src/templates/staff/share/t_autogrid.tt2 index 82fa3b2bf9..acf3b5cd41 100644 --- a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 +++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2 @@ -86,7 +86,8 @@
-
    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 6c3e07527f..8828456f03 100644 --- a/Open-ILS/web/js/ui/default/staff/services/grid.js +++ b/Open-ILS/web/js/ui/default/staff/services/grid.js @@ -127,6 +127,10 @@ angular.module('egGridMod', $scope.actionGroups = [{actions:[]}]; // Grouped actions for selected items $scope.menuItems = []; // global actions + // returns true if any rows are selected. + $scope.hasSelected = function() { + return grid.getSelectedItems().length > 0 }; + var features = ($scope.features) ? $scope.features.split(',') : []; delete $scope.features; -- 2.43.2