mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Allow select anywhere in tr or card
This commit is contained in:
		| @@ -1,11 +1,11 @@ | |||||||
| <div class="card mb-3 shadow-sm" [class.card-selected]="selected" [class.document-card]="selectable"> | <div class="card mb-3 shadow-sm" [class.card-selected]="selected" [class.document-card]="selectable" (click)="this.toggleSelected.emit($event)"> | ||||||
|   <div class="row no-gutters"> |   <div class="row no-gutters"> | ||||||
|     <div class="col-md-2 d-none d-lg-block doc-img-background rounded-left" [class.doc-img-background-selected]="selected"> |     <div class="col-md-2 d-none d-lg-block doc-img-background rounded-left" [class.doc-img-background-selected]="selected"> | ||||||
|       <img [src]="getThumbUrl()" class="card-img doc-img border-right rounded-left" (click)="toggleSelected.emit($event)"> |       <img [src]="getThumbUrl()" class="card-img doc-img border-right rounded-left"> | ||||||
|  |  | ||||||
|       <div style="top: 0; left: 0" class="position-absolute border-right border-bottom bg-light p-1" [class.document-card-check]="!selected"> |       <div style="top: 0; left: 0" class="position-absolute border-right border-bottom bg-light p-1" [class.document-card-check]="!selected"> | ||||||
|         <div class="custom-control custom-checkbox"> |         <div class="custom-control custom-checkbox"> | ||||||
|           <input type="checkbox" class="custom-control-input" id="smallCardCheck{{document.id}}" [checked]="selected" (click)="toggleSelected.emit($event)"> |           <input type="checkbox" class="custom-control-input" id="smallCardCheck{{document.id}}" [checked]="selected" (click)="this.toggleSelected.emit($event)"> | ||||||
|           <label class="custom-control-label" for="smallCardCheck{{document.id}}"></label> |           <label class="custom-control-label" for="smallCardCheck{{document.id}}"></label> | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
| @@ -17,11 +17,11 @@ | |||||||
|         <div class="d-flex justify-content-between align-items-center"> |         <div class="d-flex justify-content-between align-items-center"> | ||||||
|           <h5 class="card-title"> |           <h5 class="card-title"> | ||||||
|             <ng-container *ngIf="document.correspondent"> |             <ng-container *ngIf="document.correspondent"> | ||||||
|               <a *ngIf="clickCorrespondent.observers.length ; else nolink" [routerLink]="" title="Filter by correspondent" i18n-title (click)="clickCorrespondent.emit(document.correspondent)" class="font-weight-bold">{{(document.correspondent$ | async)?.name}}</a> |               <a *ngIf="clickCorrespondent.observers.length ; else nolink" [routerLink]="" title="Filter by correspondent" i18n-title (click)="clickCorrespondent.emit(document.correspondent);$event.stopPropagation()" class="font-weight-bold">{{(document.correspondent$ | async)?.name}}</a> | ||||||
|               <ng-template #nolink>{{(document.correspondent$ | async)?.name}}</ng-template>: |               <ng-template #nolink>{{(document.correspondent$ | async)?.name}}</ng-template>: | ||||||
|             </ng-container> |             </ng-container> | ||||||
|             {{document.title | documentTitle}} |             {{document.title | documentTitle}} | ||||||
|             <app-tag [tag]="t" linkTitle="Filter by tag" i18n-linkTitle *ngFor="let t of document.tags$ | async" class="ml-1" (click)="clickTag.emit(t.id)" [clickable]="clickTag.observers.length"></app-tag> |             <app-tag [tag]="t" linkTitle="Filter by tag" i18n-linkTitle *ngFor="let t of document.tags$ | async" class="ml-1" (click)="clickTag.emit(t.id);$event.stopPropagation()" [clickable]="clickTag.observers.length"></app-tag> | ||||||
|           </h5> |           </h5> | ||||||
|           <h5 class="card-title" *ngIf="document.archive_serial_number">#{{document.archive_serial_number}}</h5> |           <h5 class="card-title" *ngIf="document.archive_serial_number">#{{document.archive_serial_number}}</h5> | ||||||
|         </div> |         </div> | ||||||
|   | |||||||
| @@ -1,18 +1,18 @@ | |||||||
| <div class="col p-2 h-100"> | <div class="col p-2 h-100"> | ||||||
|   <div class="card h-100 shadow-sm document-card" [class.card-selected]="selected"> |   <div class="card h-100 shadow-sm document-card" [class.card-selected]="selected" (click)="this.toggleSelected.emit($event)"> | ||||||
|     <div class="border-bottom doc-img-container" [class.doc-img-background-selected]="selected"> |     <div class="border-bottom doc-img-container" [class.doc-img-background-selected]="selected"> | ||||||
|       <img class="card-img doc-img rounded-top" [src]="getThumbUrl()" (click)="toggleSelected.emit($event)"> |       <img class="card-img doc-img rounded-top" [src]="getThumbUrl()"> | ||||||
|  |  | ||||||
|       <div class="border-right border-bottom bg-light p-1 rounded document-card-check"> |       <div class="border-right border-bottom bg-light p-1 rounded document-card-check"> | ||||||
|         <div class="custom-control custom-checkbox"> |         <div class="custom-control custom-checkbox"> | ||||||
|           <input type="checkbox" class="custom-control-input" id="smallCardCheck{{document.id}}" [checked]="selected" (click)="toggleSelected.emit($event)"> |           <input type="checkbox" class="custom-control-input" id="smallCardCheck{{document.id}}" [checked]="selected" (click)="this.toggleSelected.emit($event)"> | ||||||
|           <label class="custom-control-label" for="smallCardCheck{{document.id}}"></label> |           <label class="custom-control-label" for="smallCardCheck{{document.id}}"></label> | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|  |  | ||||||
|       <div style="top: 0; right: 0; font-size: large" class="text-right position-absolute mr-1"> |       <div style="top: 0; right: 0; font-size: large" class="text-right position-absolute mr-1"> | ||||||
|         <div *ngFor="let t of getTagsLimited$() | async"> |         <div *ngFor="let t of getTagsLimited$() | async"> | ||||||
|           <app-tag [tag]="t" (click)="clickTag.emit(t.id)" [clickable]="true" linkTitle="Filter by tag" i18n-linkTitle></app-tag> |           <app-tag [tag]="t" (click)="clickTag.emit(t.id);$event.stopPropagation()" [clickable]="true" linkTitle="Filter by tag" i18n-linkTitle></app-tag> | ||||||
|         </div> |         </div> | ||||||
|         <div *ngIf="moreTags"> |         <div *ngIf="moreTags"> | ||||||
|           <span class="badge badge-secondary">+ {{moreTags}}</span> |           <span class="badge badge-secondary">+ {{moreTags}}</span> | ||||||
| @@ -23,7 +23,7 @@ | |||||||
|     <div class="card-body p-2"> |     <div class="card-body p-2"> | ||||||
|       <p class="card-text"> |       <p class="card-text"> | ||||||
|         <ng-container *ngIf="document.correspondent"> |         <ng-container *ngIf="document.correspondent"> | ||||||
|           <a [routerLink]="" title="Filter by correspondent" i18n-title (click)="clickCorrespondent.emit(document.correspondent)" class="font-weight-bold">{{(document.correspondent$ | async)?.name}}</a>: |           <a [routerLink]="" title="Filter by correspondent" i18n-title (click)="clickCorrespondent.emit(document.correspondent);$event.stopPropagation()" class="font-weight-bold">{{(document.correspondent$ | async)?.name}}</a>: | ||||||
|         </ng-container> |         </ng-container> | ||||||
|         {{document.title | documentTitle}} <span *ngIf="document.archive_serial_number">(#{{document.archive_serial_number}})</span> |         {{document.title | documentTitle}} <span *ngIf="document.archive_serial_number">(#{{document.archive_serial_number}})</span> | ||||||
|       </p> |       </p> | ||||||
| @@ -43,7 +43,7 @@ | |||||||
|               <path fill-rule="evenodd" d="M6.5 12a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11zM13 6.5a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0z"/> |               <path fill-rule="evenodd" d="M6.5 12a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11zM13 6.5a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0z"/> | ||||||
|             </svg> |             </svg> | ||||||
|           </a> |           </a> | ||||||
|           <a [href]="getDownloadUrl()" class="btn btn-sm btn-outline-secondary" title="Download" i18n-title> |           <a [href]="getDownloadUrl()" class="btn btn-sm btn-outline-secondary" title="Download" (click)="$event.stopPropagation()" i18n-title> | ||||||
|             <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-download" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> |             <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-download" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> | ||||||
|               <path fill-rule="evenodd" d="M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5z"/> |               <path fill-rule="evenodd" d="M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5z"/> | ||||||
|               <path fill-rule="evenodd" d="M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3z"/> |               <path fill-rule="evenodd" d="M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3z"/> | ||||||
|   | |||||||
| @@ -135,7 +135,7 @@ | |||||||
|       i18n>Added</th> |       i18n>Added</th> | ||||||
|   </thead> |   </thead> | ||||||
|   <tbody> |   <tbody> | ||||||
|     <tr *ngFor="let d of list.documents; trackBy: trackByDocumentId" [ngClass]="list.isSelected(d) ? 'table-row-selected' : ''"> |     <tr *ngFor="let d of list.documents; trackBy: trackByDocumentId" (click)="toggleSelected(d, $event)" [ngClass]="list.isSelected(d) ? 'table-row-selected' : ''"> | ||||||
|       <td> |       <td> | ||||||
|         <div class="custom-control custom-checkbox"> |         <div class="custom-control custom-checkbox"> | ||||||
|           <input type="checkbox" class="custom-control-input" id="docCheck{{d.id}}" [checked]="list.isSelected(d)" (click)="toggleSelected(d, $event)"> |           <input type="checkbox" class="custom-control-input" id="docCheck{{d.id}}" [checked]="list.isSelected(d)" (click)="toggleSelected(d, $event)"> | ||||||
| @@ -147,7 +147,7 @@ | |||||||
|       </td> |       </td> | ||||||
|       <td class="d-none d-md-table-cell"> |       <td class="d-none d-md-table-cell"> | ||||||
|         <ng-container *ngIf="d.correspondent"> |         <ng-container *ngIf="d.correspondent"> | ||||||
|           <a [routerLink]="" (click)="clickCorrespondent(d.correspondent)" title="Filter by correspondent">{{(d.correspondent$ | async)?.name}}</a> |           <a [routerLink]="" (click)="clickCorrespondent(d.correspondent);$event.stopPropagation()" title="Filter by correspondent">{{(d.correspondent$ | async)?.name}}</a> | ||||||
|         </ng-container> |         </ng-container> | ||||||
|       </td> |       </td> | ||||||
|       <td> |       <td> | ||||||
| @@ -156,7 +156,7 @@ | |||||||
|       </td> |       </td> | ||||||
|       <td class="d-none d-xl-table-cell"> |       <td class="d-none d-xl-table-cell"> | ||||||
|         <ng-container *ngIf="d.document_type"> |         <ng-container *ngIf="d.document_type"> | ||||||
|           <a [routerLink]="" (click)="clickDocumentType(d.document_type)" title="Filter by document type">{{(d.document_type$ | async)?.name}}</a> |           <a [routerLink]="" (click)="clickDocumentType(d.document_type);$event.stopPropagation()" title="Filter by document type">{{(d.document_type$ | async)?.name}}</a> | ||||||
|         </ng-container> |         </ng-container> | ||||||
|       </td> |       </td> | ||||||
|       <td> |       <td> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Michael Shamoon
					Michael Shamoon