From: Bill Erickson Date: Wed, 14 Aug 2019 20:45:20 +0000 (-0400) Subject: LP1840050 FM Editor WIP X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f27ed6fdad7d94c0420a350fd542a3180eec2eae;p=working%2FEvergreen.git LP1840050 FM Editor WIP Signed-off-by: Bill Erickson --- 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..298856d684 --- /dev/null +++ b/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor-action.component.ts @@ -0,0 +1,31 @@ +import {Component, Input, Output, EventEmitter, Host, OnInit} from '@angular/core'; +import {FmRecordEditorComponent} from './fm-editor.component'; + +@Component({ + selector: 'eg-fm-record-editor-action', + template: '' // no-op +}) + +export class FmRecordEditorActionComponent implements OnInit { + + // unique identifier + @Input() key: string; + + @Input() label: string; + + @Input() buttonCss = 'btn-outline-dark'; + + // Emits the 'key' of the clicked action. + @Output() actionClick: EventEmitter; + + @Input() disabled: boolean; + + constructor(@Host() private editor: FmRecordEditorComponent) { + this.actionClick = new EventEmitter(); + } + + ngOnInit() { + this.editor.actions.push(this); + } +} + diff --git a/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.html b/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.html index 2621b3e948..afae0effb1 100644 --- a/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.html +++ b/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.html @@ -4,6 +4,11 @@ + + +