Revert "Move print button, close loading dialog earlier"
This reverts commit 30af7047c7a962c0d142db1ff811b0231a82d7ff.
This commit is contained in:
parent
75d23be6fe
commit
a9dc8be1f7
@ -5,15 +5,22 @@
|
||||
<input class="form-control flex-grow-0 w-auto" type="number" min="1" [max]="previewNumPages" [(ngModel)]="previewCurrentPage" />
|
||||
<div class="input-group-text" i18n>of {{previewNumPages}}</div>
|
||||
</div>
|
||||
<div class="input-group input-group-sm me-5 d-none d-md-flex">
|
||||
<div class="input-group input-group-sm me-2 d-none d-md-flex">
|
||||
<button class="btn btn-outline-secondary" (click)="decreaseZoom()" i18n>-</button>
|
||||
<select class="form-select" (change)="onZoomSelect($event)">
|
||||
<option *ngFor="let setting of zoomSettings" [value]="setting" [selected]="previewZoomSetting === setting">
|
||||
<option *ngFor="let setting of zoomSettings" [value]="setting" [selected]="previewZoomSetting == setting">
|
||||
{{ getZoomSettingTitle(setting) }}
|
||||
</option>
|
||||
</select>
|
||||
<button class="btn btn-outline-secondary" (click)="increaseZoom()" i18n>+</button>
|
||||
</div>
|
||||
<div class="input-group input-group-sm me-5 d-none d-md-flex">
|
||||
<button class="btn btn-sm btn-outline-secondary me-5" (click)="print()" [disabled]="printLoadingModal">
|
||||
<svg class="buttonicon-sm" fill="currentColor">
|
||||
<use xlink:href="assets/bootstrap-icons.svg#printer" />
|
||||
</svg><span class="ps-2" i18n>Print</span>
|
||||
</button>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<button type="button" class="btn btn-sm btn-outline-danger me-4" (click)="delete()" [disabled]="!userIsOwner" *pngxIfPermissions="{ action: PermissionAction.Delete, type: PermissionType.Document }">
|
||||
@ -37,12 +44,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-sm btn-outline-primary me-2" (click)="print()" [disabled]="printLoadingModal">
|
||||
<svg class="buttonicon-sm" fill="currentColor">
|
||||
<use xlink:href="assets/bootstrap-icons.svg#printer" />
|
||||
</svg><span class="ps-2" i18n>Print</span>
|
||||
</button>
|
||||
|
||||
<div class="ms-auto" ngbDropdown>
|
||||
<button class="btn btn-sm btn-outline-primary me-2" id="actionsDropdown" ngbDropdownToggle>
|
||||
<svg class="toolbaricon" fill="currentColor">
|
||||
|
@ -45,7 +45,3 @@
|
||||
textarea.rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
.form-select {
|
||||
padding-right: 2.5em;
|
||||
}
|
||||
|
@ -749,7 +749,6 @@ describe('DocumentDetailComponent', () => {
|
||||
expect(openModal.componentInstance.verb).toEqual('Processing page')
|
||||
expect(openModal.componentInstance.current).toEqual(10)
|
||||
expect(openModal.componentInstance.total).toEqual(100)
|
||||
component.onProgress({ type: 'print', total: 100, page: 100 } as any)
|
||||
component.onAfterPrint()
|
||||
expect(openModal.closed).toBeTruthy()
|
||||
})
|
||||
|
@ -853,11 +853,10 @@ export class DocumentDetailComponent
|
||||
loadingDialog.current = event.page ?? 0
|
||||
loadingDialog.total = event.total
|
||||
}
|
||||
if (event.total === event.page) this.onAfterPrint()
|
||||
}
|
||||
|
||||
onAfterPrint(): void {
|
||||
this.printLoadingModal?.close()
|
||||
this.printLoadingModal.close()
|
||||
this.printLoadingModal = null
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user