Merge branch 'dev' into feature-bulk-edit

This commit is contained in:
jonaswinkler
2020-12-26 01:09:12 +01:00
4 changed files with 12 additions and 20 deletions

View File

@@ -1,11 +1,11 @@
<div class="col p-2 h-100">
<div class="card h-100 shadow-sm" [class.card-selected]="selected">
<div class="border-bottom" [class.doc-img-background-selected]="selected">
<img class="card-img doc-img" [src]="getThumbUrl()" (click)="selected = !selected">
<img class="card-img doc-img" [src]="getThumbUrl()" (click)="setSelected(!selected)">
<div class="border-right border-bottom bg-light p-1 rounded document-card-check">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="smallCardCheck{{document.id}}" [checked]="selected" (change)="selected = $event.target.checked">
<input type="checkbox" class="custom-control-input" id="smallCardCheck{{document.id}}" [checked]="selected" (change)="setSelected($event.target.checked)">
<label class="custom-control-label" for="smallCardCheck{{document.id}}"></label>
</div>
</div>

View File

@@ -12,15 +12,11 @@ export class DocumentCardSmallComponent implements OnInit {
constructor(private documentService: DocumentService) { }
_selected = false
get selected() {
return this._selected
}
@Input()
set selected(value: boolean) {
this._selected = value
selected = false
setSelected(value: boolean) {
this.selected = value
this.selectedChange.emit(value)
}