mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Fix wrapping with multiple tags, embiggen tags, pretty icons
This commit is contained in:
		| @@ -1,7 +1,7 @@ | ||||
| <div class="form-group paperless-input-select paperless-input-tags"> | ||||
|   <label for="tags">Tags</label> | ||||
|  | ||||
|   <div class="input-group"> | ||||
|   <div class="input-group flex-nowrap"> | ||||
|     <ng-select name="tags" [items]="tags" bindLabel="name" bindValue="id" [(ngModel)]="displayValue" | ||||
|       [multiple]="true" | ||||
|       [closeOnSelect]="false" | ||||
| @@ -9,15 +9,22 @@ | ||||
|       (change)="ngSelectChange()"> | ||||
|  | ||||
|       <ng-template ng-label-tmp let-item="item"> | ||||
|           <app-tag style="background-color: none;" [tag]="getTag(item.id)" (click)="removeTag(item.id)"></app-tag> | ||||
|         <span class="tag-wrap tag-wrap-delete" (click)="removeTag(item.id)"> | ||||
|           <svg width="1.2em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> | ||||
|             <use xlink:href="assets/bootstrap-icons.svg#x"/> | ||||
|           </svg> | ||||
|           <app-tag style="background-color: none;" [tag]="getTag(item.id)"></app-tag> | ||||
|         </span> | ||||
|       </ng-template> | ||||
|       <ng-template ng-option-tmp let-item="item" let-index="index" let-search="searchTerm"> | ||||
|         <div class="selected-icon d-inline-block mr-1"> | ||||
|           <svg *ngIf="displayValue.includes(item.id)" width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-check" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> | ||||
|             <path fill-rule="evenodd" d="M10.97 4.97a.75.75 0 0 1 1.071 1.05l-3.992 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.236.236 0 0 1 .02-.022z"/> | ||||
|           </svg> | ||||
|         <div class="tag-wrap"> | ||||
|           <div class="selected-icon d-inline-block mr-1"> | ||||
|             <svg *ngIf="displayValue.includes(item.id)" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> | ||||
|               <use xlink:href="assets/bootstrap-icons.svg#check"/> | ||||
|             </svg> | ||||
|           </div> | ||||
|           <app-tag class="mr-2" [tag]="getTag(item.id)"></app-tag> | ||||
|         </div> | ||||
|         <app-tag class="mr-2" [tag]="getTag(item.id)"></app-tag> | ||||
|       </ng-template> | ||||
|     </ng-select> | ||||
|  | ||||
|   | ||||
| @@ -2,3 +2,11 @@ | ||||
|   min-width: 1em; | ||||
|   min-height: 1em; | ||||
| } | ||||
|  | ||||
| .tag-wrap { | ||||
|   font-size: 1rem; | ||||
| } | ||||
|  | ||||
| .tag-wrap-delete { | ||||
|   cursor: pointer; | ||||
| } | ||||
|   | ||||
| @@ -71,7 +71,7 @@ body { | ||||
|     position: relative; | ||||
|     flex: 1 1 auto; | ||||
|     margin-bottom: 0; | ||||
|     height: calc(1.5em + 0.75rem + 5px); | ||||
|     min-height: calc(1.5em + 0.75rem + 5px); | ||||
|     line-height: 1.5; | ||||
|  | ||||
|     .ng-select-container { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Michael Shamoon
					Michael Shamoon