LP1840050 FM Editor WIP
authorBill Erickson <berickxx@gmail.com>
Wed, 14 Aug 2019 20:45:20 +0000 (16:45 -0400)
committerBill Erickson <berickxx@gmail.com>
Wed, 14 Aug 2019 20:45:20 +0000 (16:45 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor-action.component.html [new file with mode: 0644]
Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor-action.component.ts [new file with mode: 0644]

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 (file)
index 0000000..139597f
--- /dev/null
@@ -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 (file)
index 0000000..fbc718f
--- /dev/null
@@ -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: '<ng-template></ng-template>' // no-op
+})
+
+export class FmRecordEditorActionComponent {
+
+    // unique identifier
+    @Input() key: string;
+
+    @Input() label: string;
+
+    // Emits the 'key' of the clicked action.
+    @Output() actionClick: EventEmitter<string>;
+
+    @Input() disabled: boolean;
+
+    constructor(@Host() private editor: FmRecordEditorComponent) {
+        this.actionClick = new EventEmitter<string>();
+        this.editor.actions.push(this);
+    }
+}
+