[fieldOptions]="{marc_record_type:{customValues:[{id:'biblio'},{id:'serial'},{id:'authority'}]},description:{customTemplate:{template:descriptionTemplate,context:{'hello':'goodbye'}}}}"
recordId="1" orgDefaultAllowed="owner">
</eg-fm-record-editor>
- <button class="btn btn-dark" (click)="fmRecordEditor.open({size:'lg'})">
+ <button class="btn btn-dark" (click)="openEditor()">
Fm Record Editor
</button>
</div>
import {PrintService} from '@eg/share/print/print.service';
import {ComboboxEntry} from '@eg/share/combobox/combobox.component';
import {FormatService} from '@eg/core/format.service';
+import {FmRecordEditorComponent} from '@eg/share/fm-editor/fm-editor.component';
@Component({
templateUrl: 'sandbox.component.html'
@ViewChild('printTemplate')
private printTemplate: TemplateRef<any>;
+ @ViewChild('fmRecordEditor')
+ private fmRecordEditor: FmRecordEditorComponent;
+
// @ViewChild('helloStr') private helloStr: StringComponent;
gridDataSource: GridDataSource = new GridDataSource();
});
}
+ openEditor() {
+ this.fmRecordEditor.open({size: 'lg'}).then(
+ ok => { console.debug(ok); },
+ err => {
+ if (err && err.dismissed) {
+ console.debug('dialog was dismissed');
+ } else {
+ console.error(err);
+ }
+ }
+ );
+ }
+
btGridRowClassCallback(row: any): string {
if (row.id() === 1) {
return 'text-uppercase font-weight-bold text-danger';