From: Bill Erickson Date: Sat, 14 Apr 2018 19:45:01 +0000 (+0000) Subject: i18n cleanup/ accesskey X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c1a8f40a737a459ce569421ca6eac6b65ebe7550;p=working%2FEvergreen.git i18n cleanup/ accesskey Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/eg2/src/app/share/accesskey/accesskey.directive.ts b/Open-ILS/src/eg2/src/app/share/accesskey/accesskey.directive.ts new file mode 100644 index 0000000000..440b312c6e --- /dev/null +++ b/Open-ILS/src/eg2/src/app/share/accesskey/accesskey.directive.ts @@ -0,0 +1,29 @@ +/** + * Allows for in-template hotkey configuration. Reads hotkey maps and + * passes them off to the hotkey service. + * + * Listens and responds to global keyboard events. + */ +import {Directive, ElementRef, Input, OnInit} from '@angular/core'; +import {EgAccessKeyService} from '@eg/share/accesskey/accesskey.service'; + +@Directive({ + selector: '[egAccessKey]' +}) +export class EgAccessKeyDirective implements OnInit { + + constructor( + private elm: ElementRef, + private keyService: EgAccessKeyService + ) { } + + @Input() keySpec: string; + @Input() keyDesc: string; + + ngOnInit() { + + console.debug(`Assigning access key '${this.keySpec}' => ${this.keyDesc}`); + } + +} + diff --git a/Open-ILS/src/eg2/src/app/share/accesskey/accesskey.service.ts b/Open-ILS/src/eg2/src/app/share/accesskey/accesskey.service.ts new file mode 100644 index 0000000000..82f7395eca --- /dev/null +++ b/Open-ILS/src/eg2/src/app/share/accesskey/accesskey.service.ts @@ -0,0 +1,19 @@ +import {Injectable, EventEmitter, HostListener} from '@angular/core'; + +export interface EgAccessKeyAssignment { + key: string, + action: () => void +}; + +@Injectable() +export class EgAccessKeyService { + + handlers: {[key: string] : Function} = {}; + + constructor() {} + + fire(evt: KeyboardEvent): void { + } + +} + diff --git a/Open-ILS/src/eg2/src/app/staff/admin/workstation/workstations/workstations.component.html b/Open-ILS/src/eg2/src/app/staff/admin/workstation/workstations/workstations.component.html index 490f9a614c..d9007234a8 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/workstation/workstations/workstations.component.html +++ b/Open-ILS/src/eg2/src/app/staff/admin/workstation/workstations/workstations.component.html @@ -27,7 +27,6 @@ (onChange)="orgOnChange($event)" [hideOrgs]="hideOrgs" [disableOrgs]="disableOrgs" - [initialOrg]="initialOrg" [placeholder]="'Owner'" > @@ -81,7 +80,7 @@ diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/record/copies.component.html b/Open-ILS/src/eg2/src/app/staff/catalog/record/copies.component.html index 84e9d8e8a5..8c7a4f3204 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/record/copies.component.html +++ b/Open-ILS/src/eg2/src/app/staff/catalog/record/copies.component.html @@ -45,7 +45,7 @@ {{copy.call_number_label}} {{copy.call_number_suffix_label}} -
+
{{copy.barcode}} View | diff --git a/Open-ILS/src/eg2/src/app/staff/common.module.ts b/Open-ILS/src/eg2/src/app/staff/common.module.ts index f44f97ddd9..cddd063ed7 100644 --- a/Open-ILS/src/eg2/src/app/staff/common.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/common.module.ts @@ -5,6 +5,8 @@ import {EgOrgSelectComponent} from '@eg/share/org-select.component'; import {EgDialogComponent} from '@eg/share/dialog/dialog.component'; import {EgConfirmDialogComponent} from '@eg/share/dialog/confirm.component'; import {EgPromptDialogComponent} from '@eg/share/dialog/prompt.component'; +import {EgAccessKeyDirective} from '@eg/share/accesskey/accesskey.directive'; +import {EgAccessKeyService} from '@eg/share/accesskey/accesskey.service'; /** * Imports the EG common modules and adds modules common to all staff UI's. @@ -16,7 +18,8 @@ import {EgPromptDialogComponent} from '@eg/share/dialog/prompt.component'; EgOrgSelectComponent, EgDialogComponent, EgConfirmDialogComponent, - EgPromptDialogComponent + EgPromptDialogComponent, + EgAccessKeyDirective ], imports: [ EgCommonModule @@ -27,7 +30,8 @@ import {EgPromptDialogComponent} from '@eg/share/dialog/prompt.component'; EgOrgSelectComponent, EgDialogComponent, EgConfirmDialogComponent, - EgPromptDialogComponent + EgPromptDialogComponent, + EgAccessKeyDirective ] }) @@ -36,6 +40,7 @@ export class EgStaffCommonModule { return { ngModule: EgStaffCommonModule, providers: [ + EgAccessKeyService /* placeholder for exporting staff-wide services */ ] }; diff --git a/Open-ILS/src/eg2/src/app/staff/nav.component.html b/Open-ILS/src/eg2/src/app/staff/nav.component.html index f85a6e1232..803e173730 100644 --- a/Open-ILS/src/eg2/src/app/staff/nav.component.html +++ b/Open-ILS/src/eg2/src/app/staff/nav.component.html @@ -191,11 +191,11 @@ more_vert