Revert "Print loading indicator"
This reverts commit d3747f40f20a06a9f070365604b8c572abb942bb.
This commit is contained in:
parent
5828d5bcdc
commit
ca5a5e79b6
@ -135,7 +135,6 @@ import localeSv from '@angular/common/locales/sv'
|
||||
import localeTr from '@angular/common/locales/tr'
|
||||
import localeUk from '@angular/common/locales/uk'
|
||||
import localeZh from '@angular/common/locales/zh'
|
||||
import { LoadingDialogComponent } from './components/common/loading-dialog/loading-dialog.component'
|
||||
|
||||
registerLocaleData(localeAf)
|
||||
registerLocaleData(localeAr)
|
||||
@ -257,7 +256,6 @@ function initializeApp(settings: SettingsService) {
|
||||
CustomFieldsComponent,
|
||||
CustomFieldEditDialogComponent,
|
||||
CustomFieldsDropdownComponent,
|
||||
LoadingDialogComponent,
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
|
@ -1,14 +0,0 @@
|
||||
<div class="modal-header">
|
||||
<h6 class="modal-title" id="modal-basic-title">Please wait</h6>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="mb-2" i18n>{{verb}} {{current}} of {{total}}</div>
|
||||
<div class="progress" role="progressbar" aria-label="Basic example" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
|
||||
<div class="progress-bar bg-primary"
|
||||
role="progressbar"
|
||||
[style.width]="(current / total) * 100 + '%'"
|
||||
[attr.aria-valuenow]="(current / total) * 100">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer"></div>
|
@ -1,21 +0,0 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing'
|
||||
|
||||
import { LoadingDialogComponent } from './loading-dialog.component'
|
||||
|
||||
describe('LoadingDialogComponent', () => {
|
||||
let component: LoadingDialogComponent
|
||||
let fixture: ComponentFixture<LoadingDialogComponent>
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [LoadingDialogComponent],
|
||||
})
|
||||
fixture = TestBed.createComponent(LoadingDialogComponent)
|
||||
component = fixture.componentInstance
|
||||
fixture.detectChanges()
|
||||
})
|
||||
|
||||
it('needs tests', () => {
|
||||
expect(false).toBeTruthy()
|
||||
})
|
||||
})
|
@ -1,20 +0,0 @@
|
||||
import { Component, Input } from '@angular/core'
|
||||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
|
||||
|
||||
@Component({
|
||||
selector: 'pngx-loading-dialog',
|
||||
templateUrl: './loading-dialog.component.html',
|
||||
styleUrls: ['./loading-dialog.component.scss'],
|
||||
})
|
||||
export class LoadingDialogComponent {
|
||||
constructor(public activeModal: NgbActiveModal) {}
|
||||
|
||||
@Input()
|
||||
verb: string = $localize`Loading`
|
||||
|
||||
@Input()
|
||||
total: number
|
||||
|
||||
@Input()
|
||||
current: number
|
||||
}
|
@ -15,7 +15,7 @@
|
||||
<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">
|
||||
<button class="btn btn-sm btn-outline-secondary me-5" (click)="print()">
|
||||
<svg class="buttonicon-sm" fill="currentColor">
|
||||
<use xlink:href="assets/bootstrap-icons.svg#printer" />
|
||||
</svg><span class="ps-2" i18n>Print</span>
|
||||
@ -257,9 +257,6 @@
|
||||
(pagesLoaded)="onPagesLoaded($event)"
|
||||
(pdfLoadingStarts)="onPdfLoadingStarts()"
|
||||
(pdfLoadingFailed)="onPdfLoadingFailed($event)"
|
||||
(beforePrint)="onBeforePrint()"
|
||||
(afterPrint)="onAfterPrint()"
|
||||
(progress)="onProgress($event)"
|
||||
[(page)]="previewCurrentPage">
|
||||
</ngx-extended-pdf-viewer>
|
||||
</div>
|
||||
|
@ -20,10 +20,6 @@
|
||||
top: 0 !important;
|
||||
background-color: gray !important;
|
||||
}
|
||||
|
||||
::ng-deep #printServiceDialog {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
::ng-deep .ng-select-taggable {
|
||||
|
@ -10,7 +10,6 @@ import { ActivatedRoute, Router } from '@angular/router'
|
||||
import {
|
||||
NgbDateStruct,
|
||||
NgbModal,
|
||||
NgbModalRef,
|
||||
NgbNav,
|
||||
NgbNavChangeEvent,
|
||||
} from '@ng-bootstrap/ng-bootstrap'
|
||||
@ -79,8 +78,6 @@ import { InvalidPDFException } from 'ngx-extended-pdf-viewer/lib/events/invalid-
|
||||
import { PagesLoadedEvent } from 'ngx-extended-pdf-viewer/lib/events/pages-loaded-event'
|
||||
import { NgxExtendedPdfViewerService } from 'ngx-extended-pdf-viewer'
|
||||
import { pdfDefaultOptions } from 'ngx-extended-pdf-viewer'
|
||||
import { LoadingDialogComponent } from '../common/loading-dialog/loading-dialog.component'
|
||||
import { ProgressBarEvent } from 'ngx-extended-pdf-viewer/lib/events/progress-bar-event'
|
||||
|
||||
enum DocumentDetailNavIDs {
|
||||
Details = 1,
|
||||
@ -159,8 +156,6 @@ export class DocumentDetailComponent
|
||||
previewZoomSetting: ZoomSetting = ZoomSetting.Width
|
||||
previewLoading: boolean = true
|
||||
|
||||
printLoadingModal: NgbModalRef
|
||||
|
||||
store: BehaviorSubject<any>
|
||||
isDirty$: Observable<boolean>
|
||||
unsubscribeNotifier: Subject<any> = new Subject()
|
||||
@ -844,29 +839,6 @@ export class DocumentDetailComponent
|
||||
this.printService.print()
|
||||
}
|
||||
|
||||
onBeforePrint(): void {
|
||||
this.printLoadingModal = this.modalService.open(LoadingDialogComponent, {
|
||||
backdrop: 'static',
|
||||
})
|
||||
const loadingDialog = this.printLoadingModal
|
||||
.componentInstance as LoadingDialogComponent
|
||||
loadingDialog.verb = $localize`Processing page`
|
||||
}
|
||||
|
||||
onProgress(event: ProgressBarEvent): void {
|
||||
if (event.type === 'print' && this.printLoadingModal) {
|
||||
const loadingDialog = this.printLoadingModal
|
||||
.componentInstance as LoadingDialogComponent
|
||||
loadingDialog.current = event.page ?? 0
|
||||
loadingDialog.total = event.total
|
||||
}
|
||||
}
|
||||
|
||||
onAfterPrint(): void {
|
||||
this.printLoadingModal.close()
|
||||
this.printLoadingModal = null
|
||||
}
|
||||
|
||||
get showPermissions(): boolean {
|
||||
return (
|
||||
this.permissionsService.currentUserCan(
|
||||
|
Loading…
x
Reference in New Issue
Block a user