From 5891f536200c7fe20883d289dbd04182a4cdaa9b Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 14 Aug 2019 16:45:20 -0400 Subject: [PATCH] LP1840050 FM Editor WIP Signed-off-by: Bill Erickson --- .../fm-editor/fm-editor-action.component.html | 2 ++ .../share/fm-editor/fm-editor-action.component.ts | 26 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor-action.component.html create mode 100644 Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor-action.component.ts diff --git a/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor-action.component.html b/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor-action.component.html new file mode 100644 index 0000000000..139597f9cb --- /dev/null +++ b/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor-action.component.html @@ -0,0 +1,2 @@ + + diff --git a/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor-action.component.ts b/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor-action.component.ts new file mode 100644 index 0000000000..fbc718fc75 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor-action.component.ts @@ -0,0 +1,26 @@ +import {Component, Input, Output, EventEmitter, Host} from '@angular/core'; +import {FmRecordEditorComponent} from './fm-editor.component'; + +@Component({ + selector: 'eg-fm-record-editor-action', + template: '' // no-op +}) + +export class FmRecordEditorActionComponent { + + // unique identifier + @Input() key: string; + + @Input() label: string; + + // Emits the 'key' of the clicked action. + @Output() actionClick: EventEmitter; + + @Input() disabled: boolean; + + constructor(@Host() private editor: FmRecordEditorComponent) { + this.actionClick = new EventEmitter(); + this.editor.actions.push(this); + } +} + -- 2.11.0