From 979ffc07d9462238b464ba29a1c249f5c7e8d852 Mon Sep 17 00:00:00 2001 From: Boris Voropaev Date: Tue, 9 Jan 2024 11:19:49 +0300 Subject: [PATCH] wating --- .../tree/item/pages-tree-item.component.ts | 14 ++++++++++---- .../cms-dialog/cms-dialog.component.html | 10 ++++++++++ .../widjet/cms-dialog/cms-dialog.component.ts | 14 +++++++++++++- .../widjet/cms-modal/cms-modal.component.html | 2 +- .../widjet/cms-modal/cms-modal.component.ts | 3 ++- src/app/_services/dialog.service.ts | 6 ++++++ src/app/_services/licence.service.ts | 2 +- src/assets/css/_basics.scss | 18 ++++++++++++++++++ src/nir/css/_basics.scss | 11 +++++++++++ src/vniigaz-v2/css/_basics.scss | 10 ++++++++++ 10 files changed, 82 insertions(+), 8 deletions(-) diff --git a/src/app/_modules/pages/tree/item/pages-tree-item.component.ts b/src/app/_modules/pages/tree/item/pages-tree-item.component.ts index baa13dc..845547c 100644 --- a/src/app/_modules/pages/tree/item/pages-tree-item.component.ts +++ b/src/app/_modules/pages/tree/item/pages-tree-item.component.ts @@ -111,10 +111,16 @@ export class PagesTreeItemComponent { clone() { this.dialog.confirm(`Копировать страницу ${this.page.name}?`).subscribe( resp=>{ - if (resp) this.pagesService.clone(this.page.id, {recursive: true}).subscribe(res => { - this.listsService.refresh(this.parentListId); - this.refresh(); - }); + + if (resp) { + this.dialog.waiting('Осуществляется копирование выбранных страниц') + this.pagesService.clone(this.page.id, {recursive: true}).subscribe(res => { + this.dialog.waiting(null) + console.log('end') + this.listsService.refresh(this.parentListId); + this.refresh(); + }); + } } ) } diff --git a/src/app/_modules/widjet/cms-dialog/cms-dialog.component.html b/src/app/_modules/widjet/cms-dialog/cms-dialog.component.html index 9db534c..b4c757b 100644 --- a/src/app/_modules/widjet/cms-dialog/cms-dialog.component.html +++ b/src/app/_modules/widjet/cms-dialog/cms-dialog.component.html @@ -28,3 +28,13 @@ + + +
+

Ожидание

+
+
+ {{waiting}} +
+
+ diff --git a/src/app/_modules/widjet/cms-dialog/cms-dialog.component.ts b/src/app/_modules/widjet/cms-dialog/cms-dialog.component.ts index e92ee26..3ee77ef 100644 --- a/src/app/_modules/widjet/cms-dialog/cms-dialog.component.ts +++ b/src/app/_modules/widjet/cms-dialog/cms-dialog.component.ts @@ -14,12 +14,14 @@ export class CmsDialogComponent { allert: string; prompt: string; + waiting: string; resp: BehaviorSubject; showAllert: boolean; showPrompt: boolean; + showWaiting: boolean; ngOnInit(){ - this.dialog.modalAllertSubject.subscribe( + this.dialog.modalAllertSubject.subscribe( allert=>{ if (allert) { this.allert = allert; @@ -35,6 +37,16 @@ export class CmsDialogComponent { } } ) + this.dialog.modalWaitingSubject.subscribe( + waiting=>{ + if (waiting) { + this.waiting = waiting; + this.showWaiting = true; + } else { + this.showWaiting = false; + } + } + ) } respYes(){ diff --git a/src/app/_modules/widjet/cms-modal/cms-modal.component.html b/src/app/_modules/widjet/cms-modal/cms-modal.component.html index 3338f00..7735517 100644 --- a/src/app/_modules/widjet/cms-modal/cms-modal.component.html +++ b/src/app/_modules/widjet/cms-modal/cms-modal.component.html @@ -4,7 +4,7 @@
- +
diff --git a/src/app/_modules/widjet/cms-modal/cms-modal.component.ts b/src/app/_modules/widjet/cms-modal/cms-modal.component.ts index 8bb76b8..ea14631 100644 --- a/src/app/_modules/widjet/cms-modal/cms-modal.component.ts +++ b/src/app/_modules/widjet/cms-modal/cms-modal.component.ts @@ -1,4 +1,4 @@ -import { Component, Output, EventEmitter } from '@angular/core'; +import { Component, Input, Output, EventEmitter } from '@angular/core'; import {WindowScrollingService} from "@app/_services/window-scrolling.service"; @Component({ @@ -8,6 +8,7 @@ import {WindowScrollingService} from "@app/_services/window-scrolling.service"; }) export class CmsModalComponent { @Output() close = new EventEmitter(); + @Input() blocked:boolean; constructor( private windowScrollingService: WindowScrollingService ){} diff --git a/src/app/_services/dialog.service.ts b/src/app/_services/dialog.service.ts index 7a869ad..90684c3 100644 --- a/src/app/_services/dialog.service.ts +++ b/src/app/_services/dialog.service.ts @@ -8,6 +8,7 @@ export class DialogService { public modalAllertSubject = new BehaviorSubject(null) public modalPromptSubject = new BehaviorSubject(null); + public modalWaitingSubject = new BehaviorSubject(null); public modalRespSubject = new BehaviorSubject(null); private userResp: BehaviorSubject @@ -26,10 +27,15 @@ export class DialogService { alert(txt:string){ this.modalAllertSubject.next(txt) } + confirm(txt:string){ this.modalPromptSubject.next(txt); this.userResp = new BehaviorSubject(null) return this.userResp; } + waiting(txt:string){ + this.modalWaitingSubject.next(txt); + } + } \ No newline at end of file diff --git a/src/app/_services/licence.service.ts b/src/app/_services/licence.service.ts index c0296f6..f4cf84f 100644 --- a/src/app/_services/licence.service.ts +++ b/src/app/_services/licence.service.ts @@ -58,7 +58,7 @@ export class LicenceService { } public checkEditAvailability(page?: any) { - if (!this.isActive) return this.error('Licence not active'); + if (!this.isActive) return this.error('Срок действия лицензии истек. Режим редактирования не доступен. Продлите лицензию или обратитесь в службу поддержки НИР (+7 499 490 04 65, help@nirgroup.ru)'); if ((page?.type?.name === 'registry') && !this.hasOption('registries')) return this.error('Срок действия лицензии истек. Режим редактирования не доступен. Продлите лицензию или обратитесь в службу поддержки НИР (+7 499 490 04 65, help@nirgroup.ru)'); if ((page?.type?.name === 'publications') && !this.hasOption('publications')) return this.error('Данная опция не входит в Вашу лицензию. Для включения опции обратитесь в службу поддержки НИР (+7 499 490 04 65, help@nirgroup.ru)'); return null; diff --git a/src/assets/css/_basics.scss b/src/assets/css/_basics.scss index c438a1a..c8e2ad8 100644 --- a/src/assets/css/_basics.scss +++ b/src/assets/css/_basics.scss @@ -172,6 +172,24 @@ button.mat-calendar-body-cell{ font-weight: 400; } +.mat-calendar-body-cell-content{ + font-family: PT Sans; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: 24px; + width: 32px !important; + height: 32px !important; +} + +.mat-calendar-body-cell-preview{ + font-family: PT Sans; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: 24px; +} + .tox-promotion, .tox-statusbar__branding { display: none!important; } diff --git a/src/nir/css/_basics.scss b/src/nir/css/_basics.scss index 8e5c301..5547ccd 100644 --- a/src/nir/css/_basics.scss +++ b/src/nir/css/_basics.scss @@ -161,6 +161,17 @@ button.mat-calendar-body-cell{ font-weight: 400; } + +.mat-calendar-body-cell-content{ + font-family: PT Sans; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: 24px; + width: 32px !important; + height: 32px !important; +} + .tox-promotion, .tox-statusbar__branding { display: none!important; } diff --git a/src/vniigaz-v2/css/_basics.scss b/src/vniigaz-v2/css/_basics.scss index c4544e7..f15618a 100644 --- a/src/vniigaz-v2/css/_basics.scss +++ b/src/vniigaz-v2/css/_basics.scss @@ -157,6 +157,16 @@ button.mat-calendar-body-cell{ font-weight: 400; } +.mat-calendar-body-cell-content{ + font-family: PT Sans; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: 24px; + width: 32px !important; + height: 32px !important; +} + .tox-promotion, .tox-statusbar__branding { display: none!important; }