min-height: calc(1.5em + .75rem + 2px);
}
-/* snuggle the delimiter and subfield codes */
-.sf-delimiter { margin-right: -0.4rem; }
-.sf-code { margin-left: -0.4rem; }
+.sf-delimiter {
+ /* match angjs color */
+ color: rgb(0, 0, 255);
+ /* snuggle up to my subfield code */
+ margin-right: -1rem;
+}
+
+.sf-code {
+ /* match angjs color */
+ color: rgb(0, 0, 255);
+}
<ng-container *ngIf="bigText">
<div contenteditable
id='{{randId}}'
- class="d-inline-block p-1 text-break {{moreClasses}}"
+ class="d-inline-block p-1 pt-2 text-dark text-break {{moreClasses}}"
[attr.tabindex]="fieldText ? -1 : ''"
(keydown)="inputKeyDown($event)"
(focus)="focusBigText()"
<ng-container *ngIf="!bigText">
<input
id='{{randId}}'
- class="p-0 pl-1 text-break rounded-0 form-control {{moreClasses}}"
+ class="p-0 pl-1 text-dark rounded-0 form-control {{moreClasses}}"
[size]="inputSize()"
[maxlength]="maxLength || ''"
[disabled]="fieldText"
}
inputSize(): number {
- // give at least 2 chars space and grow with the content
+ if (this.maxLength) {
+ return this.maxLength;
+ }
+ // give at least 2+ chars space and grow with the content
return Math.max(2, (this.getContent() || '').length) * 1.1;
}
case 'Delete': return this.keyDelete(evt);
case 'ArrowDown': return this.keyArrowDown(evt);
case 'ArrowUp': return this.keyArrowUp(evt);
+ case 'F6': return this.keyF6(evt);
+ case 'F7': return this.keyF7(evt);
+ case 'F8': return this.keyF8(evt);
}
}
this.field,
this.context.record.cloneField(this.field)
);
+ }
- const field = this.record.getNextField(this.field.fieldId);
- if (field) {
- this.context.requestFieldFocus(
- {fieldId: field.fieldId, target: 'tag'});
- }
+ const field = this.record.getNextField(this.field.fieldId);
+ if (field) {
+ this.context.requestFieldFocus(
+ {fieldId: field.fieldId, target: 'tag'});
}
evt.preventDefault();
this.field,
this.context.record.cloneField(this.field)
);
+ }
- const field = this.record.getPreviousField(this.field.fieldId);
- if (field) {
- this.context.requestFieldFocus(
- {fieldId: field.fieldId, target: 'tag'});
- }
+ const field = this.record.getPreviousField(this.field.fieldId);
+ if (field) {
+ this.context.requestFieldFocus(
+ {fieldId: field.fieldId, target: 'tag'});
}
evt.preventDefault();
}
+
+ keyF6(evt: KeyboardEvent) {
+ console.log('f6');
+
+ if (evt.shiftKey) {
+
+ evt.preventDefault();
+ evt.stopPropagation();
+ }
+ }
+
+ keyF7(evt: KeyboardEvent) {
+ console.log('f7');
+
+ if (evt.shiftKey) {
+
+ evt.preventDefault();
+ evt.stopPropagation();
+ }
+ }
+
+ keyF8(evt: KeyboardEvent) {
+ console.log('f8');
+
+ if (evt.shiftKey) {
+ evt.preventDefault();
+ evt.stopPropagation();
+ }
+ }
}
+
</div>
</ng-template>
- <div class="form-inline d-flex border-bottom">
- <label for='fixed-field-input-{{field}}' class="pr-2 flex-1">
- {{fieldLabel}}
- </label>
- <input id='fixed-field-input-{{fieldCode}}-{{randId}}'
+ <div class="form-inline d-flex">
+ <div class="pr-2 flex-1">
+ <span id='label-{{randId}}' class="text-left font-weight-bold">
+ {{fieldLabel}}
+ </span>
+ </div>
+ <input
+ [attr.aria-labelledby]="'label-' + randId"
class="form-control rounded-0 flex-1 pl-1" type="text"
(change)="valueChange()"
[(ngModel)]="fieldValue"
fieldLength: number = null;
fieldValues: FixedFieldValue[] = null;
popOver: NgbPopover;
- randId: string;
+ randId = Math.floor(Math.random() * 10000000);
- constructor(
- private tagTable: TagTableService
- ) {
- this.randId = Math.random().toFixed(5);
- }
+ constructor(private tagTable: TagTableService) {}
ngOnInit() {
this.init().then(_ =>
-<div class="row pb-1">
+<div class="row p-0">
<div class="col-lg-2">
<eg-fixed-field i18n-fieldLabel [context]="context"
fieldCode="Type" fieldLabel="Type"></eg-fixed-field>
fieldCode="Lang" fieldLabel="Lang"></eg-fixed-field>
</div>
</div>
-<div class="row pb-1">
+<div class="row p-0">
<div class="col-lg-2">
<eg-fixed-field i18n-fieldLabel [context]="context"
fieldCode="BLvl" fieldLabel="BLvl"></eg-fixed-field>
fieldCode="Ctry" fieldLabel="Ctry"></eg-fixed-field>
</div>
</div>
-<div class="row pb-1">
+<div class="row p-0">
<div class="col-lg-2">
<eg-fixed-field i18n-fieldLabel [context]="context"
fieldCode="s_l" fieldLabel="s_l"></eg-fixed-field>
fieldCode="Alph" fieldLabel="Alph"></eg-fixed-field>
</div>
</div>
-<div class="row pb-1">
+<div class="row p-0">
<div class="col-lg-2">
<eg-fixed-field i18n-fieldLabel [context]="context"
fieldCode="Desc" fieldLabel="Desc"></eg-fixed-field>
fieldCode="Date2" fieldLabel="Date2"></eg-fixed-field>
</div>
</div>
-<div class="row pb-1">
+<div class="row p-0">
<div class="col-lg-2">
<eg-fixed-field i18n-fieldLabel [context]="context"
fieldCode="SrTp" fieldLabel="SrTp"></eg-fixed-field>
fieldCode="EntW" fieldLabel="EntW"></eg-fixed-field>
</div>
</div>
-<div class="row pb-1">
+<div class="row p-0">
<div class="col-lg-2">
<eg-fixed-field i18n-fieldLabel [context]="context"
fieldCode="TrAr" fieldLabel="TrAr"></eg-fixed-field>
fieldCode="Comp" fieldLabel="Comp"></eg-fixed-field>
</div>
</div>
-<div class="row pb-1">
+<div class="row p-0">
<div class="col-lg-2">
<eg-fixed-field i18n-fieldLabel [context]="context"
fieldCode="SpFm" fieldLabel="SpFm"></eg-fixed-field>
fieldCode="CrTp" fieldLabel="CrTp"></eg-fixed-field>
</div>
</div>
-<div class="row pb-1">
+<div class="row p-0">
<div class="col-lg-2">
<eg-fixed-field i18n-fieldLabel [context]="context"
fieldCode="TMat" fieldLabel="TMat"></eg-fixed-field>
fieldCode="File" fieldLabel="File"></eg-fixed-field>
</div>
</div>
-<div class="row pb-1">
+<div class="row p-0">
<div class="col-lg-2">
<eg-fixed-field i18n-fieldLabel [context]="context"
fieldCode="Type_tbmfhd" fieldLabel="Type_tbmfhd"></eg-fixed-field>
fieldCode="CatLang" fieldLabel="CatLang"></eg-fixed-field>
</div>
</div>
-<div class="row pb-1">
+<div class="row p-0">
<div class="col-lg-2">
<eg-fixed-field i18n-fieldLabel [context]="context"
fieldCode="Kind" fieldLabel="Kind"></eg-fixed-field>
fieldCode="NameUse" fieldLabel="NameUse"></eg-fixed-field>
</div>
</div>
-<div class="row pb-1">
+<div class="row p-0">
<div class="col-lg-2">
<eg-fixed-field i18n-fieldLabel [context]="context"
fieldCode="SubjUse" fieldLabel="SubjUse"></eg-fixed-field>
fieldCode="UpdStatus" fieldLabel="UpdStatus"></eg-fixed-field>
</div>
</div>
-<div class="row pb-1">
+<div class="row p-0">
<div class="col-lg-2">
<eg-fixed-field i18n-fieldLabel [context]="context"
fieldCode="Name" fieldLabel="Name"></eg-fixed-field>
+
+.fixed-fields-container {
+ /*
+ * wait for https://bugs.launchpad.net/evergreen/+bug/1735568 approval
+ background-color: lightcyan;
+ border-bottom: 1px solid gray;
+ */
+}
</ng-container>
<ng-container *ngIf="dataLoaded">
- <div class="mt-3 text-monospace"
+ <div class="mt-3 text-monospace"
(contextmenu)="$event.preventDefault()">
- <div class="row">
- <div class="col-lg-9">
+ <div class="row pb-2">
+ <div class="col-lg-9 fixed-fields-container">
<eg-fixed-fields-editor [context]="context"></eg-fixed-fields-editor>
</div>
</div>
<!-- SUBFIELD DECORATOR/DELIMITER -->
<eg-marc-editable-content fieldText="‡" i18n-fieldText
- moreClasses="sf-delimiter text-primary border-right-0 bg-transparent">
+ moreClasses="sf-delimiter border-right-0 bg-transparent">
</eg-marc-editable-content>
<!-- SUBFIELD CHARACTER -->
<eg-marc-editable-content [context]="context" fieldType="sfc"
[field]="field" [subfield]="subfield"
- moreClasses="sf-code text-primary border-left-0">
+ moreClasses="sf-code border-left-0">
</eg-marc-editable-content>
<!-- SUBFIELD VALUE -->