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 <zbanks@catalyte.io>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Jason Boyer <JBoyer@EquinoxInitiative.org>
<!-- actions drop-down menu -->
<div class="btn-group" ng-show="showActions" ng-if="actionGroups.length > 1 || actionGroups[0].actions.length" uib-dropdown>
- <button type="button" class="btn btn-default" uib-dropdown-toggle
- ng-disabled="!hasSelected()">
+ <button type="button" class="btn btn-default" uib-dropdown-toggle>
[% l('Actions') %] <span class="caret"></span>
</button>
<ul class="pull-right grid-action-dropdown scrollable-menu" uib-dropdown-menu>
// 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;
}