From: Bill Erickson Date: Fri, 23 Sep 2016 16:05:21 +0000 (-0400) Subject: LP#1539089 Webstaff grid actions disabled until selected. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=33a071a1adada515f6f89ab8a59c4574e5462ff3;p=contrib%2FConifer.git 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 --- 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;