From: Zavier Banks Date: Thu, 5 Mar 2020 16:19:49 +0000 (+0000) Subject: LP1670457 Action Menu Grid Selection Change X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=92ae6a97cdffc19529321bba3356c9c6a566be55;p=evergreen%2Fpines.git 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 --- 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; }