2 <eg-staff-banner bannerText="Sandbox" i18n-bannerText>
6 i18n-prefix i18n-suffix
7 prefix=":) {{dynamicTitleText}}"
11 <div class="row flex pt-2">
12 <div i18n> Modify Page Title: </div>
13 <div class="col-lg-2">
14 <input type="text" [(ngModel)]="dynamicTitleText" class="form-control"/>
18 <!-- FM Editor Experiments ----------------------------- -->
19 <div class="row mb-3">
20 <ng-template #descriptionTemplate
21 let-field="field" let-record="record" let-hello="hello">
22 <!-- example custom template for editing the 'description' field -->
24 placeholder="{{hello}}"
27 [readonly]="field.readOnly"
28 [required]="field.isRequired()"
29 [ngModel]="record[field.name]()"
30 (ngModelChange)="record[field.name]($event)">
33 <!-- note: fieldOptions would be best defined in the .ts file, but
34 want to demostrate it can be set in the template as well -->
35 <eg-fm-record-editor #fmRecordEditor
36 idlClass="cmrcfld" mode="create"
37 [fieldOptions]="{marc_record_type:{customValues:[{id:'biblio'},{id:'serial'},{id:'authority'}]},description:{customTemplate:{template:descriptionTemplate,context:{'hello':'goodbye'}}}}"
38 recordId="1" orgDefaultAllowed="owner">
39 </eg-fm-record-editor>
40 <button class="btn btn-dark" (click)="openEditor()">
44 <!-- / FM Editor Experiments ----------------------------- -->
46 <!-- Progress Dialog Experiments ----------------------------- -->
47 <div class="row mb-3">
48 <div class="col-lg-3">
49 <button class="btn btn-outline-danger" (click)="progress.increment()">Increment Inline</button>
51 <div class="col-lg-3">
52 <eg-progress-inline [max]="100" [value]="1" #progress></eg-progress-inline>
55 <div class="row mb-3">
56 <div class="col-lg-4">
57 <eg-progress-dialog #progressDialog>
59 <button class="btn btn-light" (click)="showProgress()">Test Progress Dialog</button>
61 <div class="col-lg-3">
62 <eg-combobox [allowFreeText]="true"
63 placeholder="Combobox with static data"
64 [entries]="cbEntries"></eg-combobox>
66 <div class="col-lg-3">
68 placeholder="Combobox with dynamic data"
69 [asyncDataSource]="cbAsyncSource"></eg-combobox>
72 <div class="row mb-3">
73 <div class="col-lg-4">
74 <button class="btn btn-info" (click)="testToast()">Test Toast Message</button>
76 <div class="col-lg-2">
77 Org select with limit perms
79 <div class="col-lg-2">
80 <eg-org-select [limitPerms]="['REGISTER_WORKSTATION']">
84 <!-- /Progress Dialog Experiments ----------------------------- -->
88 <div class="row mb-3">
89 <eg-string #helloString text="Hello, {{name}}" i18n-text></eg-string>
90 <button class="btn btn-success" (click)="testStrings()">Test Strings</button>
94 <div class="row mb-3">
95 <ng-template #helloStrTmpl let-name="name" i18n>Hello, {{name}}</ng-template>
97 <eg-string #helloStr key="helloKey" [template]="helloStrTmpl"></eg-string>
99 <eg-string key="staff.sandbox.test" [template]="helloStrTmpl"></eg-string>
100 <button class="btn btn-success" (click)="testStrings()">Test Strings</button>
104 <div class="form-group">
105 <eg-date-select (onChangeAsDate)="changeDate($event)"
106 initialYmd="2017-03-04">
109 <div>HERE: {{testDate}}</div>
114 <button class="btn btn-secondary" (click)="doPrint()">Test Print</button>
115 <ng-template #printTemplate let-context>Hello, {{context.world}}!</ng-template>
117 <button class="btn btn-secondary" (click)="printWithDialog()">Print with dialog</button>
121 <div class="col-lg-3">
122 <eg-translate #translate [idlObject]="oneBtype" fieldName="name"></eg-translate>
123 <button class="btn btn-info"
124 (click)="translate.open({size:'lg'})">Translate</button>
130 <h4>Cross-tab communications example</h4>
131 <p>To test, open this sandbox in a second browser tab. Enter something in the input box below, then switch to the other tab and click anywhere on the page.
132 You should see the message that you sent to the other browser tab.</p>
135 <div class="col-lg-3">
136 <input type="text" #sendSbMessage placeholder="message to send to another tab" size="40" (change)="sendMessage($event)">
138 <div class="col-lg-3">
139 message received: {{sbChannelText}}
144 <ng-template #cellTmpl let-row="row" let-col="col" let-userContext="userContext">
145 HELLO {{userContext.hello}}
146 <button>{{row.id()}}</button>
148 <eg-grid #cbtGrid idlClass="cbt"
149 [dataSource]="btSource"
150 [rowClassCallback]="btGridRowClassCallback"
151 [rowFlairIsEnabled]="true"
152 [rowFlairCallback]="btGridRowFlairCallback"
153 [cellClassCallback]="btGridCellClassCallback"
155 <eg-grid-toolbar-action label="Action that needs a single row" i18n-label
156 [action]="complimentEvergreen" [disableOnRows]="notOneSelectedRow">
157 </eg-grid-toolbar-action>
158 <eg-grid-column name="test" [cellTemplate]="cellTmpl"
159 [cellContext]="btGridTestContext" [sortable]="false">
161 <eg-grid-column [sortable]="false" path="owner.name"></eg-grid-column>
162 <eg-grid-column [sortable]="false" path="datetime_test"
163 datatype="timestamp" [datePlusTime]="true"></eg-grid-column>
168 <h4>PCRUD auto flesh and FormatService detection</h4>
169 <div *ngIf="aMetarecord">Fingerprint: {{aMetarecord}}</div>