master
Boris Voropaev 2024-01-09 11:19:49 +03:00
parent d1e9a15e71
commit 979ffc07d9
10 changed files with 82 additions and 8 deletions

View File

@ -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();
});
}
}
)
}

View File

@ -28,3 +28,13 @@
</button>
</div>
</cms-modal>
<cms-modal *ngIf="showWaiting" [blocked]="true">
<div header>
<h4>Ожидание</h4>
</div>
<div body>
{{waiting}}
</div>
</cms-modal>

View File

@ -14,12 +14,14 @@ export class CmsDialogComponent {
allert: string;
prompt: string;
waiting: string;
resp: BehaviorSubject<string>;
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(){

View File

@ -4,7 +4,7 @@
<div class="cms-modal-bar">
<div class="cms-modal-header">
<ng-content select="[header]"></ng-content>
<ico (click)="cls()"></ico>
<ico (click)="cls()" *ngIf="!blocked"></ico>
</div>
<div class="cms-modal-body">
<ng-content></ng-content>

View File

@ -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<string>();
@Input() blocked:boolean;
constructor( private windowScrollingService: WindowScrollingService ){}

View File

@ -8,6 +8,7 @@ export class DialogService {
public modalAllertSubject = new BehaviorSubject<string>(null)
public modalPromptSubject = new BehaviorSubject<string>(null);
public modalWaitingSubject = new BehaviorSubject<string>(null);
public modalRespSubject = new BehaviorSubject<boolean>(null);
private userResp: BehaviorSubject<boolean>
@ -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);
}
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}