LPXXX Marc enriched more fields displaying
authorBill Erickson <berickxx@gmail.com>
Fri, 15 Nov 2019 23:12:36 +0000 (18:12 -0500)
committerBill Erickson <berickxx@gmail.com>
Fri, 6 Dec 2019 15:37:03 +0000 (10:37 -0500)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/staff/share/marc-edit/editable-content.component.html
Open-ILS/src/eg2/src/app/staff/share/marc-edit/editable-content.component.ts
Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor.component.ts
Open-ILS/src/eg2/src/app/staff/share/marc-edit/fixed-field.component.ts
Open-ILS/src/eg2/src/app/staff/share/marc-edit/rich-editor.component.html

index 687a5a6..0f64141 100644 (file)
@@ -1,10 +1,12 @@
 
 <input 
   id='marc-editable-content-{{randId}}' 
-  class="p-0 pl-1 pr-1 rounded-0 form-control"
+  class="p-0 pl-1 rounded-0 form-control {{moreClasses}}"
   [size]="inputSize()" 
   [maxlength]="maxLength || ''"
   [disabled]="readOnly" 
+  [attr.tabindex]="readOnly ? -1 : ''"
+  (focus)="$event.target.select()"
   (blur)="propagateTouch()"
   [(ngModel)]="content"
 />
index f1725e6..791a55d 100644 (file)
@@ -24,6 +24,9 @@ export class EditableContentComponent implements OnInit, ControlValueAccessor {
     @Input() content: string;
     @Input() maxLength: number;
 
+    // space-separated list of additional CSS classes to append
+    @Input() moreClasses: string;
+
     get record(): MarcRecord { return this.context.record; }
 
     randId: string;
@@ -47,7 +50,7 @@ export class EditableContentComponent implements OnInit, ControlValueAccessor {
     }
 
     writeValue(content: string) {
-                  this.content = content;
+        this.content = content;
     }
 
     registerOnChange(fn) {
index 361a4fb..f75e453 100644 (file)
@@ -90,7 +90,7 @@ export class MarcEditorComponent implements OnInit {
     ngOnInit() {
 
         this.store.getItem('cat.marcedit.flateditor').then(
-            useFlat => this.editorTab = useFlat ? 'flat' : 'rich')
+            useFlat => this.editorTab = useFlat ? 'flat' : 'rich');
 
         this.pcrud.retrieveAll('cbs').subscribe(
             src => this.sources.push({id: +src.id(), label: src.source()}),
index 4a46730..28ad9d3 100644 (file)
@@ -71,10 +71,10 @@ export class FixedFieldComponent implements OnInit {
 
             // Shuffling may occur with our fixed field as a result of
             // external changes.
-            this.record.fixedFieldChange.subscribe(_ => {
+            this.record.fixedFieldChange.subscribe(_ =>
                 this.fieldValue =
                     this.context.record.extractFixedField(this.fieldCode)
-            });
+            );
 
             return this.tagTable.getFFValueTable(this.record.recordType());
 
index 73d0cb7..37a2f3b 100644 (file)
@@ -12,7 +12,7 @@
       </div>
     </div>
     <div class="row pt-0 pb-0 pl-3 form-horizontal">
-      <eg-marc-editable-content [context]="context" [ngModel]="'LDR'" 
+      <eg-marc-editable-content [context]="context" i18n-ngModel [ngModel]="'LDR'" 
         [maxLength]="3" [readOnly]="true"></eg-marc-editable-content>
       <eg-marc-editable-content [context]="context" [(ngModel)]="record.leader" 
         [maxLength]="record.leader.length"></eg-marc-editable-content>
         [maxLength]="1"></eg-marc-editable-content>
 
       <ng-container *ngFor="let subfield of field.subfields">
+
         <!-- subfield character -->
+        <eg-marc-editable-content [readOnly]="true" 
+          moreClasses="text-primary border-right-0 bg-transparent" 
+          i18n-ngModel [ngModel]="'‡'"></eg-marc-editable-content>
         <eg-marc-editable-content [context]="context" [(ngModel)]="subfield[0]"
+          moreClasses="text-info border-left-0"
           [maxLength]="1"></eg-marc-editable-content>
+
         <!-- subfield value -->
         <eg-marc-editable-content [context]="context" [(ngModel)]="subfield[1]">
         </eg-marc-editable-content>