From 92ae6a97cdffc19529321bba3356c9c6a566be55 Mon Sep 17 00:00:00 2001 From: Zavier Banks Date: Thu, 5 Mar 2020 16:19:49 +0000 Subject: [PATCH] LP1670457 Action Menu Grid Selection Change I reworked the grid to disable certain actions, if an item was needed. However, if there were actions, were there was no item needed, they would still be available. Signed-off-by: Zavier Banks Signed-off-by: Terran McCanna Signed-off-by: Jason Boyer --- Open-ILS/src/templates/staff/share/t_autogrid.tt2 | 3 +-- Open-ILS/web/js/ui/default/staff/services/grid.js | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 b/Open-ILS/src/templates/staff/share/t_autogrid.tt2 index 38e9a00313..1ded8b7a37 100644 --- a/Open-ILS/src/templates/staff/share/t_autogrid.tt2 +++ b/Open-ILS/src/templates/staff/share/t_autogrid.tt2 @@ -92,8 +92,7 @@
-
    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 ce84caa657..57d93c8259 100644 --- a/Open-ILS/web/js/ui/default/staff/services/grid.js +++ b/Open-ILS/web/js/ui/default/staff/services/grid.js @@ -658,6 +658,9 @@ angular.module('egGridMod', // fires the disable handler function for a context action $scope.actionDisable = function(action) { + if(grid.getSelectedItems().length == 0 && action.handler.length > 0) { + return true; + } if (typeof action.disabled == 'undefined') { return false; } -- 2.11.0