
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Evergreen ILS". The branch, rel_3_15 has been updated via 28d354cc5c3d6474948803c55b200cace3082c19 (commit) via 766a367a8ab87a350508dfafed9ea7caa15c0ea5 (commit) from 78f0af8eaa290216e3ac0b8fed676dfa9407bd66 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 28d354cc5c3d6474948803c55b200cace3082c19 Author: Stephanie Leary <stephanie.leary@equinoxoli.org> Date: Mon Feb 17 22:44:47 2025 +0000 LP2080373 Right-click menus for grid utility columns Sets up the right-click context menu actions in grid checkbox, flair, and row counter columns. Release-note: Right-click menu support for grid utility columns Signed-off-by: Stephanie Leary <stephanie.leary@equinoxoli.org> Signed-off-by: Lindsay Stratton <lstratton@wlsmail.org> Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org> diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid-body.component.html b/Open-ILS/src/eg2/src/app/share/grid/grid-body.component.html index 1090490d33..3ea17e1433 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid-body.component.html +++ b/Open-ILS/src/eg2/src/app/share/grid/grid-body.component.html @@ -4,29 +4,41 @@ <ng-container *ngIf="!context.disableSelect"> <td role="gridcell" class="eg-grid-cell eg-grid-checkbox-cell"> - <div class="eg-grid-cell-contents"> + <div class="eg-grid-cell-contents" #rowContextMenu="ngbPopover" + popoverTitle="Actions for Selected Rows" i18n-popoverTitle + (contextmenu)="onRowContextClick($event, row, rowContextMenu)" + [ngbPopover]="contextMenu" + placement="right" + triggers="manual"> <input type='checkbox' [ngModel]="context.rowSelector.indexes[context.getRowIndex(row)]" (ngModelChange)="context.rowSelector.toggle(context.getRowIndex(row))" - i18n-aria-label="e.g. Row 13" attr.aria-label="Row {{context.pager.rowNumber(idx)}}" - #rowContextMenu="ngbPopover" + i18n-aria-label="e.g. Row 13" attr.aria-label="Row {{context.pager.rowNumber(idx)}}"> + </div> + </td> + </ng-container> + <td role="gridcell" class="eg-grid-cell eg-grid-number-cell alphanumeric" (click)="onRowClick($event, row, idx)"> + <div class="eg-grid-cell-contents" #rowContextMenu="ngbPopover" popoverTitle="Actions for Selected Rows" i18n-popoverTitle (contextmenu)="onRowContextClick($event, row, rowContextMenu)" [ngbPopover]="contextMenu" placement="right" triggers="manual"> - </div> - </td> - </ng-container> - <td role="gridcell" class="eg-grid-cell eg-grid-number-cell alphanumeric"> - <div class="eg-grid-cell-contents">{{context.pager.rowNumber(idx)}}</div> + {{context.pager.rowNumber(idx)}} + </div> </td> - <td role="gridcell" *ngIf="context.rowFlairIsEnabled" class="eg-grid-cell eg-grid-flair-cell"> + <td role="gridcell" *ngIf="context.rowFlairIsEnabled" class="eg-grid-cell eg-grid-flair-cell" + (click)="onRowClick($event, row, idx)"> <!-- using *ngIf allows us to assign the flair callback to a value, obviating the need for multiple calls of the same function --> <ng-container *ngIf="context.rowFlairCallback(row); let flair"> <ng-container *ngIf="flair.icon"> - <div class="eg-grid-cell-contents"> + <div class="eg-grid-cell-contents" #rowContextMenu="ngbPopover" + popoverTitle="Actions for Selected Rows" i18n-popoverTitle + (contextmenu)="onRowContextClick($event, row, rowContextMenu)" + [ngbPopover]="contextMenu" + placement="right" + triggers="manual"> <span class="material-icons" aria-hidden="true" title="{{flair.title}}" i18n-title> {{flair.icon}} @@ -46,9 +58,9 @@ <!-- eslint-disable @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/accessibility-interactive-supports-focus --> <td role="gridcell" *ngFor="let col of context.columnSet.displayColumns()" class="eg-grid-cell eg-grid-body-cell" - [ngClass]="context.setClassNames(row, col)"> + [ngClass]="context.setClassNames(row, col)" + (click)="onRowClick($event, row, idx)"> <div class="eg-grid-cell-contents" (dblclick)="onRowDblClick(row)" - (click)="onRowClick($event, row, idx)" #rowContextMenu="ngbPopover" popoverTitle="Actions for Selected Rows" i18n-popoverTitle (contextmenu)="onRowContextClick($event, row, rowContextMenu)" diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid-body.component.ts b/Open-ILS/src/eg2/src/app/share/grid/grid-body.component.ts index e773fc3999..917f3666a0 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid-body.component.ts +++ b/Open-ILS/src/eg2/src/app/share/grid/grid-body.component.ts @@ -29,6 +29,11 @@ export class GridBodyComponent { return; } + if (['a', 'button', 'input', 'select', 'summary'].includes($event.target.tagName.toLowerCase())) { + // avoid interrupting normal interactive elements + return; + } + const index = this.context.getRowIndex(row); if (this.context.disableMultiSelect) { commit 766a367a8ab87a350508dfafed9ea7caa15c0ea5 Author: Stephanie Leary <stephanie.leary@equinoxoli.org> Date: Mon Feb 17 22:30:26 2025 +0000 LP2080373 Expand grid row right-click area (Chrome) In Chrome, .eg-grid-cell-contents (which carries the right-click context menu handler) does not stretch to fill the available table cell height. The fix is to set an explicit, pixel-based height on the parent <table> element. Setting it to 1px works, even though this will be overridden by the child row and cell heights. Release-note: Allow right-click anywhere in grid cells in Chrome Signed-off-by: Stephanie Leary <stephanie.leary@equinoxoli.org> Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org> diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid.component.css b/Open-ILS/src/eg2/src/app/share/grid/grid.component.css index 09ba1dfaa8..5fd23552ec 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid.component.css +++ b/Open-ILS/src/eg2/src/app/share/grid/grid.component.css @@ -38,6 +38,7 @@ table.table.eg-grid { width: 100%; color: var(--grid); caption-side: block-start; + height: 1px; table-layout: auto; white-space: normal; } ----------------------------------------------------------------------- Summary of changes: .../src/app/share/grid/grid-body.component.html | 36 ++++++++++++++-------- .../eg2/src/app/share/grid/grid-body.component.ts | 5 +++ .../src/eg2/src/app/share/grid/grid.component.css | 1 + 3 files changed, 30 insertions(+), 12 deletions(-) hooks/post-receive -- Evergreen ILS