From: Bill Erickson Date: Tue, 13 Apr 2021 17:05:18 +0000 (-0400) Subject: LP1923640 Grid option to hide action menu entries WIP X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d72d807f25bb35bcf151675446a4d256746c743b;p=working%2FEvergreen.git LP1923640 Grid option to hide action menu entries WIP Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar-actions-editor.component.html b/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar-actions-editor.component.html new file mode 100644 index 0000000000..0a56bc5066 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar-actions-editor.component.html @@ -0,0 +1,37 @@ + + + + + diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar-actions-editor.component.ts b/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar-actions-editor.component.ts new file mode 100644 index 0000000000..8385e388e1 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar-actions-editor.component.ts @@ -0,0 +1,17 @@ +import {Component, Input, OnInit, Host} from '@angular/core'; +import {GridToolbarAction, GridContext} from '@eg/share/grid/grid'; +import {DialogComponent} from '@eg/share/dialog/dialog.component'; + +/** Allows users to show/hide toolbar action entries */ + +@Component({ + selector: 'eg-grid-toolbar-actions-editor', + templateUrl: 'grid-toolbar-actions-editor.component.html' +}) + +export class GridToolbarActionsEditorComponent extends DialogComponent { + + @Input() gridContext: GridContext; + +} + diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar.component.html b/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar.component.html index eb701ce233..f6459035f1 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar.component.html +++ b/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar.component.html @@ -1,3 +1,5 @@ + +
@@ -114,6 +116,11 @@ compare_arrows Manage Column Widths + + menu + Manage Actions Menu + diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid.module.ts b/Open-ILS/src/eg2/src/app/share/grid/grid.module.ts index b738ac6302..0757fab28e 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid.module.ts +++ b/Open-ILS/src/eg2/src/app/share/grid/grid.module.ts @@ -15,6 +15,7 @@ import {GridColumnConfigComponent} from './grid-column-config.component'; import {GridColumnWidthComponent} from './grid-column-width.component'; import {GridPrintComponent} from './grid-print.component'; import {GridFilterControlComponent} from './grid-filter-control.component'; +import {GridToolbarActionsEditorComponent} from './grid-toolbar-actions-editor.component'; @NgModule({ @@ -33,7 +34,8 @@ import {GridFilterControlComponent} from './grid-filter-control.component'; GridColumnConfigComponent, GridColumnWidthComponent, GridPrintComponent, - GridFilterControlComponent + GridFilterControlComponent, + GridToolbarActionsEditorComponent ], imports: [ EgCommonModule, diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid.ts b/Open-ILS/src/eg2/src/app/share/grid/grid.ts index c45acb39f8..60e8c4a8b4 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid.ts +++ b/Open-ILS/src/eg2/src/app/share/grid/grid.ts @@ -1142,6 +1142,7 @@ export class GridToolbarAction { isGroup: boolean; // used for group placeholder entries isSeparator: boolean; disableOnRows: (rows: any[]) => boolean; + hidden?: boolean; } // Buttons are global actions