custom-sample-html.raw
22.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
<!--=======================================================================-->
<!--=================== New TB 3.0 / Angular 8 Example =================-->
<!--=======================================================================-->
<!--<form #editEntityForm="ngForm" [formGroup]="editEntityFormGroup"-->
<!-- class="edit-entity-form"-->
<!-- (ngSubmit)="save()" style="width: 600px;">-->
<!-- <mat-toolbar fxLayout="row" color="primary">-->
<!-- <h2>Edit {{entityType.toLowerCase()}} {{entityName}}</h2>-->
<!-- <span fxFlex></span>-->
<!-- <button mat-button mat-icon-button-->
<!-- (click)="cancel()"-->
<!-- type="button">-->
<!-- <mat-icon class="material-icons">close</mat-icon>-->
<!-- </button>-->
<!-- </mat-toolbar>-->
<!-- <mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async">-->
<!-- </mat-progress-bar>-->
<!-- <div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div>-->
<!-- <div mat-dialog-content>-->
<!-- <div class="mat-padding" fxLayout="column">-->
<!-- <mat-form-field class="mat-block">-->
<!-- <mat-label>Entity name</mat-label>-->
<!-- <input matInput formControlName="entityName" required>-->
<!-- <mat-error *ngIf="editEntityFormGroup.get('entityName').hasError('required')">-->
<!-- Entity name required-->
<!-- </mat-error>-->
<!-- </mat-form-field>-->
<!-- </div> -->
<!-- </div>-->
<!-- <div mat-dialog-actions fxLayout="row">-->
<!-- <span fxFlex></span>-->
<!-- <button mat-button mat-raised-button color="primary"-->
<!-- type="submit"-->
<!-- [disabled]="(isLoading$ | async) || editEntityForm.invalid || !editEntityForm.dirty">-->
<!-- {{ 'action.save' | translate }}-->
<!-- </button>-->
<!-- <button mat-button color="primary"-->
<!-- style="margin-right: 20px;"-->
<!-- type="button"-->
<!-- [disabled]="(isLoading$ | async)"-->
<!-- (click)="cancel()" cdkFocusInitial>-->
<!-- {{ 'action.cancel' | translate }}-->
<!-- </button>-->
<!-- </div>-->
<!--</form>-->
<!--=======================================================================-->
<!--===== There are two example templates: for edit and add entity =====-->
<!--=======================================================================-->
<!--======================== Edit entity example ========================-->
<!--=======================================================================-->
<!-- -->
<!--<md-dialog aria-label="Edit entity">-->
<!-- <form name="editEntityForm" class="edit-entity-form" ng-submit="vm.save()">-->
<!-- <md-toolbar>-->
<!-- <div class="md-toolbar-tools">-->
<!-- <h2>Edit {{vm.entityType.toLowerCase()}} {{vm.entityName}}</h2>-->
<!-- <span flex></span>-->
<!-- <md-button class="md-icon-button" ng-click="vm.cancel()">-->
<!-- <ng-md-icon icon="close" aria-label="Close"></ng-md-icon>-->
<!-- </md-button>-->
<!-- </div>-->
<!-- </md-toolbar>-->
<!-- <md-dialog-content>-->
<!-- <div class="md-dialog-content">-->
<!-- <div layout="row">-->
<!-- <md-input-container flex class="md-block">-->
<!-- <label>Entity Name</label>-->
<!-- <input ng-model="vm.entityName" readonly>-->
<!-- </md-input-container>-->
<!-- <md-input-container flex class="md-block">-->
<!-- <label>Entity Type</label>-->
<!-- <input ng-model="vm.entityType" readonly>-->
<!-- </md-input-container>-->
<!-- <md-input-container flex class="md-block">-->
<!-- <label>Type</label>-->
<!-- <input ng-model="vm.type" readonly>-->
<!-- </md-input-container>-->
<!-- </div>-->
<!-- <div layout="row">-->
<!-- <md-input-container flex class="md-block">-->
<!-- <label>Latitude</label>-->
<!-- <input name="latitude" type="number" step="any" ng-model="vm.attributes.latitude">-->
<!-- </md-input-container>-->
<!-- <md-input-container flex class="md-block">-->
<!-- <label>Longitude</label>-->
<!-- <input name="longitude" type="number" step="any" ng-model="vm.attributes.longitude">-->
<!-- </md-input-container>-->
<!-- </div>-->
<!-- <div layout="row">-->
<!-- <md-input-container flex class="md-block">-->
<!-- <label>Address</label>-->
<!-- <input ng-model="vm.attributes.address">-->
<!-- </md-input-container>-->
<!-- <md-input-container flex class="md-block">-->
<!-- <label>Owner</label>-->
<!-- <input ng-model="vm.attributes.owner">-->
<!-- </md-input-container>-->
<!-- </div>-->
<!-- <div layout="row">-->
<!-- <md-input-container flex class="md-block">-->
<!-- <label>Integer Value</label>-->
<!-- <input name="integerNumber" type="number" step="1" ng-pattern="/^-?[0-9]+$/" ng-model="vm.attributes.number">-->
<!-- <div ng-messages="editEntityForm.integerNumber.$error">-->
<!-- <div ng-message="pattern">Invalid integer value.</div>-->
<!-- </div>-->
<!-- </md-input-container>-->
<!-- <div class="boolean-value-input" layout="column" layout-align="center start" flex>-->
<!-- <label class="checkbox-label">Boolean Value</label>-->
<!-- <md-checkbox ng-model="vm.attributes.booleanValue" style="margin-bottom: 40px;">-->
<!-- {{ (vm.attributes.booleanValue ? "value.true" : "value.false") | translate }}-->
<!-- </md-checkbox>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="relations-list old-relations">-->
<!-- <div class="md-body-1" style="padding-bottom: 10px; color: rgba(0,0,0,0.57);">Relations</div>-->
<!-- <div class="body" ng-show="vm.relations.length">-->
<!-- <div class="row" layout="row" layout-align="start center" ng-repeat="relation in vm.relations track by $index">-->
<!-- <div class="md-whiteframe-1dp" flex layout="row" style="padding-left: 5px; margin-bottom: 3px;">-->
<!-- <div flex layout="column">-->
<!-- <div layout="row">-->
<!-- <md-input-container class="md-block" style="min-width: 100px;">-->
<!-- <label>Direction</label>-->
<!-- <md-select ng-disabled="true" required ng-model="relation.direction">-->
<!-- <md-option ng-repeat="direction in vm.entitySearchDirection" ng-value="direction">-->
<!-- {{ ("relation.search-direction." + direction) | translate}}-->
<!-- </md-option>-->
<!-- </md-select>-->
<!-- </md-input-container>-->
<!-- <tb-relation-type-autocomplete ng-disabled="true" flex class="md-block"-->
<!-- the-form="editEntityForm"-->
<!-- ng-model="relation.relationType"-->
<!-- tb-required="true">-->
<!-- </tb-relation-type-autocomplete>-->
<!-- </div>-->
<!-- <div layout="row">-->
<!-- <tb-entity-select flex class="md-block"-->
<!-- the-form="editEntityForm"-->
<!-- ng-disabled="true"-->
<!-- tb-required="true"-->
<!-- ng-model="relation.relatedEntity">-->
<!-- </tb-entity-select>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div layout="column" layout-align="center center">-->
<!-- <md-button class="md-icon-button md-primary" style="width: 40px; min-width: 40px;"-->
<!-- ng-click="vm.removeOldRelation($index,relation)" aria-label="Remove">-->
<!-- <md-tooltip md-direction="top">Remove relation</md-tooltip>-->
<!-- <md-icon aria-label="Remove" class="material-icons">-->
<!-- close-->
<!-- </md-icon>-->
<!-- </md-button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="relations-list">-->
<!-- <div class="md-body-1" style="padding-bottom: 10px; color: rgba(0,0,0,0.57);">New Relations</div>-->
<!-- <div class="body" ng-show="vm.newRelations.length">-->
<!-- <div class="row" layout="row" layout-align="start center" ng-repeat="relation in vm.newRelations track by $index">-->
<!-- <div class="md-whiteframe-1dp" flex layout="row" style="padding-left: 5px; margin-bottom: 3px;">-->
<!-- <div flex layout="column">-->
<!-- <div layout="row">-->
<!-- <md-input-container class="md-block" style="min-width: 100px;">-->
<!-- <label>Direction</label>-->
<!-- <md-select name="direction" required ng-model="relation.direction">-->
<!-- <md-option ng-repeat="direction in vm.entitySearchDirection" ng-value="direction">-->
<!-- {{ ("relation.search-direction." + direction) | translate}}-->
<!-- </md-option>-->
<!-- </md-select>-->
<!-- <div ng-messages="editEntityForm.direction.$error">-->
<!-- <div ng-message="required">Relation direction is required.</div>-->
<!-- </div>-->
<!-- </md-input-container>-->
<!-- <tb-relation-type-autocomplete flex class="md-block"-->
<!-- the-form="editEntityForm"-->
<!-- ng-model="relation.relationType"-->
<!-- tb-required="true">-->
<!-- </tb-relation-type-autocomplete>-->
<!-- </div>-->
<!-- <div layout="row">-->
<!-- <tb-entity-select flex class="md-block"-->
<!-- the-form="editEntityForm"-->
<!-- tb-required="true"-->
<!-- ng-model="relation.relatedEntity">-->
<!-- </tb-entity-select>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div layout="column" layout-align="center center">-->
<!-- <md-button class="md-icon-button md-primary" style="width: 40px; min-width: 40px;"-->
<!-- ng-click="vm.removeRelation($index)" aria-label="Remove">-->
<!-- <md-tooltip md-direction="top">Remove relation</md-tooltip>-->
<!-- <md-icon aria-label="Remove" class="material-icons">-->
<!-- close-->
<!-- </md-icon>-->
<!-- </md-button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div>-->
<!-- <md-button class="md-primary md-raised" ng-click="vm.addRelation()" aria-label="Add">-->
<!-- <md-tooltip md-direction="top">Add Relation</md-tooltip>-->
<!-- Add-->
<!-- </md-button>-->
<!-- </div> -->
<!-- </div>-->
<!-- </div>-->
<!-- </md-dialog-content>-->
<!-- <md-dialog-actions>-->
<!-- <md-button type="submit" ng-disabled="editEntityForm.$invalid || !editEntityForm.$dirty" class="md-raised md-primary">Save</md-button>-->
<!-- <md-button ng-click="vm.cancel()" class="md-primary">Cancel</md-button>-->
<!-- </md-dialog-actions>-->
<!-- </form>-->
<!--</md-dialog>-->
<!---->
<!--========================================================================-->
<!--========================= Add entity example =========================-->
<!--========================================================================-->
<!---->
<!--<md-dialog aria-label="Add entity">-->
<!-- <form name="addEntityForm" class="add-entity-form" ng-submit="vm.save()">-->
<!-- <md-toolbar>-->
<!-- <div class="md-toolbar-tools">-->
<!-- <h2>Add entity</h2>-->
<!-- <span flex></span>-->
<!-- <md-button class="md-icon-button" ng-click="vm.cancel()">-->
<!-- <ng-md-icon icon="close" aria-label="Close"></ng-md-icon>-->
<!-- </md-button>-->
<!-- </div>-->
<!-- </md-toolbar>-->
<!-- <md-dialog-content>-->
<!-- <div class="md-dialog-content">-->
<!-- <div layout="row">-->
<!-- <md-input-container flex class="md-block">-->
<!-- <label>Entity Name</label>-->
<!-- <input ng-model="vm.entityName" name=entityName required>-->
<!-- <div ng-messages="addEntityForm.entityName.$error">-->
<!-- <div ng-message="required">Entity name is required.</div>-->
<!-- </div>-->
<!-- </md-input-container>-->
<!-- <tb-entity-type-select class="md-block" style="min-width: 100px; width: 100px;"-->
<!-- the-form="addEntityForm"-->
<!-- tb-required="true"-->
<!-- allowed-entity-types="vm.allowedEntityTypes"-->
<!-- ng-model="vm.entityType">-->
<!-- </tb-entity-type-select>-->
<!-- <md-input-container flex class="md-block">-->
<!-- <label>Entity Subtype</label>-->
<!-- <input ng-model="vm.type" name=type required>-->
<!-- <div ng-messages="addEntityForm.type.$error">-->
<!-- <div ng-message="required">Entity subtype is required.</div>-->
<!-- </div>-->
<!-- </md-input-container>-->
<!-- </div>-->
<!-- <div layout="row">-->
<!-- <md-input-container flex class="md-block">-->
<!-- <label>Latitude</label>-->
<!-- <input name="latitude" type="number" step="any" ng-model="vm.attributes.latitude">-->
<!-- </md-input-container>-->
<!-- <md-input-container flex class="md-block">-->
<!-- <label>Longitude</label>-->
<!-- <input name="longitude" type="number" step="any" ng-model="vm.attributes.longitude">-->
<!-- </md-input-container>-->
<!-- </div>-->
<!-- <div layout="row">-->
<!-- <md-input-container flex class="md-block">-->
<!-- <label>Address</label>-->
<!-- <input ng-model="vm.attributes.address">-->
<!-- </md-input-container>-->
<!-- <md-input-container flex class="md-block">-->
<!-- <label>Owner</label>-->
<!-- <input ng-model="vm.attributes.owner">-->
<!-- </md-input-container>-->
<!-- </div>-->
<!-- <div layout="row">-->
<!-- <md-input-container flex class="md-block">-->
<!-- <label>Integer Value</label>-->
<!-- <input name="integerNumber" type="number" step="1" ng-pattern="/^-?[0-9]+$/" ng-model="vm.attributes.number">-->
<!-- <div ng-messages="addEntityForm.integerNumber.$error">-->
<!-- <div ng-message="pattern">Invalid integer value.</div>-->
<!-- </div>-->
<!-- </md-input-container>-->
<!-- <div class="boolean-value-input" layout="column" layout-align="center start" flex>-->
<!-- <label class="checkbox-label">Boolean Value</label>-->
<!-- <md-checkbox ng-model="vm.attributes.booleanValue" style="margin-bottom: 40px;">-->
<!-- {{ (vm.attributes.booleanValue ? "value.true" : "value.false") | translate }}-->
<!-- </md-checkbox>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="relations-list">-->
<!-- <div class="md-body-1" style="padding-bottom: 10px; color: rgba(0,0,0,0.57);">Relations</div>-->
<!-- <div class="body" ng-show="vm.relations.length">-->
<!-- <div class="row" layout="row" layout-align="start center" ng-repeat="relation in vm.relations track by $index">-->
<!-- <div class="md-whiteframe-1dp" flex layout="row" style="padding-left: 5px;">-->
<!-- <div flex layout="column">-->
<!-- <div layout="row">-->
<!-- <md-input-container class="md-block" style="min-width: 100px;">-->
<!-- <label>Direction</label>-->
<!-- <md-select name="direction" required ng-model="relation.direction">-->
<!-- <md-option ng-repeat="direction in vm.entitySearchDirection" ng-value="direction">-->
<!-- {{ ("relation.search-direction." + direction) | translate}}-->
<!-- </md-option>-->
<!-- </md-select>-->
<!-- <div ng-messages="addEntityForm.direction.$error">-->
<!-- <div ng-message="required">Relation direction is required.</div>-->
<!-- </div>-->
<!-- </md-input-container>-->
<!-- <tb-relation-type-autocomplete flex class="md-block"-->
<!-- the-form="addEntityForm"-->
<!-- ng-model="relation.relationType"-->
<!-- tb-required="true">-->
<!-- </tb-relation-type-autocomplete>-->
<!-- </div>-->
<!-- <div layout="row">-->
<!-- <tb-entity-select flex class="md-block"-->
<!-- the-form="addEntityForm"-->
<!-- tb-required="true"-->
<!-- ng-model="relation.relatedEntity">-->
<!-- </tb-entity-select>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div layout="column" layout-align="center center">-->
<!-- <md-button class="md-icon-button md-primary" style="width: 40px; min-width: 40px;"-->
<!-- ng-click="vm.removeRelation($index)" aria-label="Remove">-->
<!-- <md-tooltip md-direction="top">Remove relation</md-tooltip>-->
<!-- <md-icon aria-label="Remove" class="material-icons">-->
<!-- close-->
<!-- </md-icon>-->
<!-- </md-button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div>-->
<!-- <md-button class="md-primary md-raised" ng-click="vm.addRelation()" aria-label="Add">-->
<!-- <md-tooltip md-direction="top">Add Relation</md-tooltip>-->
<!-- Add-->
<!-- </md-button>-->
<!-- </div> -->
<!-- </div>-->
<!-- </div>-->
<!-- </md-dialog-content>-->
<!-- <md-dialog-actions>-->
<!-- <md-button type="submit" ng-disabled="addEntityForm.$invalid || !addEntityForm.$dirty" class="md-raised md-primary">Create</md-button>-->
<!-- <md-button ng-click="vm.cancel()" class="md-primary">Cancel</md-button>-->
<!-- </md-dialog-actions>-->
<!-- </form>-->
<!--</md-dialog>-->