Skip to content

Commit 6c0363f

Browse files
committed
Added logic for image
1 parent 2082cbf commit 6c0363f

File tree

10 files changed

+64
-23
lines changed

10 files changed

+64
-23
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<div class="mat-checkbox">
2-
<input id="isChecked" (click)="checkBoxChanged($event)"
3-
[checked]="isChecked" [value]="isChecked" color="primary" type="checkbox">
2+
<input id="isChecked" [disabled]="true" color="primary" type="checkbox">
43
<label for="isChecked"></label>
54
</div>

eform-client/src/app/modules/eforms/eform-report/components/eform-report-header/eform-report-header.component.html

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<div class="card-body">
1515
<div class="card z-depth-2 mb-3" style="width: 100%">
1616
<div class="card-header hoverable" (click)="showCropper()" style="border: 2px dashed #c5c5c5; cursor: pointer">
17-
<img [src]="headerImage" width="200" height="70"/>
17+
<img [src]="reportModel.headerImage || '../../../../../../assets/images/img-placeholder.png'" width="200" height="70"/>
1818
</div>
1919
</div>
2020
</div>
@@ -31,9 +31,11 @@
3131
yyyy-mm-dd; tt:mm:ss
3232
</div>
3333
<div class="col-md-1 text-center">
34-
<i class="material-icons material-icon-success align-middle" *ngIf="reportModel.isDateVisible"
34+
<i class="material-icons material-icon-success material-icon-pointer align-middle"
35+
*ngIf="reportModel.isDateVisible"
3536
(click)="reportModel.isDateVisible = !reportModel.isDateVisible"> visibility </i>
36-
<i class="material-icons material-icon-danger align-middle" *ngIf="!reportModel.isDateVisible"
37+
<i class="material-icons material-icon-danger material-icon-pointer align-middle"
38+
*ngIf="!reportModel.isDateVisible"
3739
(click)="reportModel.isDateVisible = !reportModel.isDateVisible"> visibility_off </i>
3840
</div>
3941
</div>
@@ -49,9 +51,11 @@
4951
WorkerName
5052
</div>
5153
<div class="col-md-1 text-center">
52-
<i class="material-icons material-icon-success align-middle" *ngIf="reportModel.isWorkerNameVisible"
54+
<i class="material-icons material-icon-success material-icon-pointer align-middle"
55+
*ngIf="reportModel.isWorkerNameVisible"
5356
(click)="reportModel.isWorkerNameVisible = !reportModel.isWorkerNameVisible"> visibility </i>
54-
<i class="material-icons material-icon-danger align-middle" *ngIf="!reportModel.isWorkerNameVisible"
57+
<i class="material-icons material-icon-danger material-icon-pointer align-middle"
58+
*ngIf="!reportModel.isWorkerNameVisible"
5559
(click)="reportModel.isWorkerNameVisible = !reportModel.isWorkerNameVisible"> visibility_off </i>
5660
</div>
5761
</div>

eform-client/src/app/modules/eforms/eform-report/components/eform-report-header/eform-report-header.component.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {EformReportModel} from 'src/app/common/models/eforms/report';
99
export class EformReportHeaderComponent implements OnInit {
1010
@Input() reportModel: EformReportModel = new EformReportModel();
1111
@ViewChild('reportCropperModal') reportCropperModal;
12-
headerImage = '../../../../../../assets/images/img-placeholder.png';
1312
constructor() { }
1413

1514
ngOnInit() {
@@ -20,7 +19,6 @@ export class EformReportHeaderComponent implements OnInit {
2019
}
2120

2221
updateHeaderImage(e: string) {
23-
this.headerImage = e;
24-
this.reportModel.headerImage = this.headerImage;
22+
this.reportModel.headerImage = e;
2523
}
2624
}

eform-client/src/app/modules/eforms/eform-report/components/eform-report-page/eform-report-page.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</div>
1717
<div class="card-body">
1818
<ul class="list-group">
19-
<li style="cursor: pointer;" dragula="dataItems"
19+
<li style="cursor: pointer;"
2020
class="list-group-item list-group-item-action waves-light"
2121
mdbWavesEffect>
2222
<a>

eform-client/src/app/modules/eforms/eform-report/components/eform-report-switch/eform-report-switch.component.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<report-element-checkbox></report-element-checkbox>
2222
</ng-container>
2323
<ng-container *ngSwitchCase="'Number'">
24-
<report-element-text [placeholder]="'Number'"></report-element-text>
24+
<report-element-text [placeholder]="'Number' | translate"></report-element-text>
2525
</ng-container>
2626
<ng-container *ngSwitchCase="'NumberStepper'">
2727
<report-element-text [placeholder]="'Number'"></report-element-text>
@@ -67,17 +67,17 @@
6767
</report-element-text>
6868
</ng-container>
6969
<ng-container *ngSwitchCase="'Audio'">
70-
<report-element-text [placeholder]="'Audio'">
70+
<report-element-text [placeholder]="'Audio'" [prefixIcon]="'audio'">
7171
</report-element-text>
7272
</ng-container>
7373
<div *ngSwitchDefault></div>
7474
</ng-container>
7575
</div>
7676
<div class="col-md-1 text-center">
77-
<i class="material-icons material-icon-success align-middle" *ngIf="dataItem.visibility"
78-
(click)="visibilityTest = !visibilityTest" style="cursor: pointer"> visibility </i>
79-
<i class="material-icons material-icon-danger align-middle" *ngIf="!dataItem.visibility"
80-
(click)="visibilityTest = !visibilityTest" style="cursor: pointer"> visibility_off </i>
77+
<i class="material-icons material-icon-success material-icon-pointer align-middle" *ngIf="dataItem.visibility"
78+
(click)="onVisibilityChanged(dataItem.id, !dataItem.visibility)"> visibility </i>
79+
<i class="material-icons material-icon-danger material-icon-pointer align-middle" *ngIf="!dataItem.visibility"
80+
(click)="onVisibilityChanged(dataItem.id, !dataItem.visibility)"> visibility_off </i>
8181
</div>
8282
</div>
8383
</div>

eform-client/src/app/modules/eforms/eform-report/components/eform-report-switch/eform-report-switch.component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ export class EformReportSwitchComponent implements OnInit {
3939
this.dataItemListChanged.emit(this.dataItemList);
4040
}
4141

42-
onDataItemChanged(e: any) {
43-
this.dataItemList = e;
42+
onVisibilityChanged(id: number, visibility: boolean) {
43+
const itemIndex = this.dataItemList.findIndex(x => x.id == id);
44+
this.dataItemList[itemIndex].visibility = visibility;
45+
this.dataItemListChanged.emit(this.dataItemList);
4446
}
4547
}

eform-client/src/assets/i18n/da-DK.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,5 +231,16 @@
231231
"PluginsSettings": "Plugin Indstillinger",
232232
"Edit Settings": "Rediger Indstillinger",
233233
"Connection String": "Forbindelsesstreng",
234-
"Version": "Version"
234+
"Version": "Version",
235+
"Header Picture": "Hovedbillede",
236+
"Preview": "Eksempel",
237+
"Number": "Nummer",
238+
"Commentary": "Kommentar",
239+
"Text": "Tekst",
240+
"Selected Value": "Udvalgt Værdi",
241+
"PDF Link": "PDF Link",
242+
"Information": "Information",
243+
"Duration": "Varighed",
244+
"Signature": "Underskrift",
245+
"Audio": "Audio"
235246
}

eform-client/src/assets/i18n/de-DE.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,5 +229,16 @@
229229
"PluginsSettings": "Plugin-Einstellungen",
230230
"Edit Settings": "Einstellungen bearbeiten",
231231
"Connection String": "Verbindungszeichenfolge",
232-
"Version": "Version"
233-
}
232+
"Version": "Version",
233+
"Header Picture": "Kopfbild",
234+
"Preview": "Vorschau",
235+
"Number": "Nummer",
236+
"Commentary": "Kommentar",
237+
"Text": "Text",
238+
"Selected Value": "Ausgewählter Wert",
239+
"PDF Link": "PDF Link",
240+
"Information": "Information",
241+
"Duration": "Dauer",
242+
"Signature": "Signature",
243+
"Audio": "Audio"
244+
}

eform-client/src/assets/i18n/en-US.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,19 @@
233233
"PluginsSettings": "Plugins Settings",
234234
"Edit Settings": "Edit Settings",
235235
"Connection String": "Connection String",
236-
"Version": "Version"
236+
"Version": "Version",
237+
238+
"Header Picture": "Header Picture",
239+
"Preview": "Preview",
240+
"Number": "Number",
241+
"Commentary": "Commentary",
242+
"Text": "Text",
243+
"Selected Value": "Selected Value",
244+
"PDF Link": "PDF Link",
245+
"Information": "Information",
246+
"Duration": "Duration",
247+
"Signature": "Signature",
248+
"Audio": "Audio"
237249
}
238250

239251

eform-client/src/scss/components/_icon.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ i {
66
&.md-24 { font-size: 24px; }
77
&.md-36 { font-size: 36px; }
88
&.md-48 { font-size: 48px; }
9+
10+
&.material-icon-pointer {
11+
cursor: pointer;
12+
}
913

1014
&.material-icon-danger {
1115
color: $eform-red-dark

0 commit comments

Comments
 (0)