diff --git a/src/frontend/app/app.module.ts b/src/frontend/app/app.module.ts index 816313c48b49c25a946438c78d5af414ed9efecb..1fecd88464f38f0f80798f160b31e9db8ed6e3df 100755 --- a/src/frontend/app/app.module.ts +++ b/src/frontend/app/app.module.ts @@ -28,6 +28,7 @@ import { FolderDocumentListComponent } from './folder/document-l import { PanelFolderComponent } from './folder/panel/panel-folder.component'; import { FolderMenuComponent } from './folder/folder-menu/folder-menu.component'; import { FolderUpdateComponent } from './folder/folder-update/folder-update.component'; +import { FolderActionListComponent } from './folder/folder-action-list/folder-action-list.component'; /*ACTIONS PAGES */ import { ConfirmActionComponent } from './actions/confirm-action/confirm-action.component'; @@ -121,7 +122,8 @@ import { PrintSeparatorComponent } from './separator/prin PanelFolderComponent, FolderDocumentListComponent, FolderMenuComponent, - FolderUpdateComponent + FolderUpdateComponent, + FolderActionListComponent ], entryComponents: [ CustomSnackbarComponent, diff --git a/src/frontend/app/folder/document-list/folder-document-list.component.html b/src/frontend/app/folder/document-list/folder-document-list.component.html index b379aa33fca03e60c491f37de29ad9e4d768e6e0..a58d0021e07ae75ebc55d0a681871060a59e7ca5 100644 --- a/src/frontend/app/folder/document-list/folder-document-list.component.html +++ b/src/frontend/app/folder/document-list/folder-document-list.component.html @@ -1,23 +1,25 @@ <mat-sidenav-container class="maarch-container"> <mat-sidenav #snavLeft class="panel-left" #snav [mode]="appService.getViewMode() ? 'over' : 'side'" - [fixedInViewport]="appService.getViewMode()" [opened]="appService.getViewMode() ? false : true" autoFocus="false" - style="overflow-x:hidden;" [ngStyle]="{'width': appService.getViewMode() ? '80%' : '350px'}"> + [fixedInViewport]="appService.getViewMode()" [opened]="appService.getViewMode() ? false : true" + autoFocus="false" style="overflow-x:hidden;" [ngStyle]="{'width': appService.getViewMode() ? '80%' : '350px'}"> <header-panel [snavLeft]="snav"></header-panel> <menu-shortcut></menu-shortcut> <menu-nav></menu-nav> <basket-home *ngIf="homeData" #basketHome [homeData]="homeData" [snavL]="snav"></basket-home> <mat-divider></mat-divider> - <panel-folder #panelFolder *ngIf="folderInfo.id !== '' && folderInfo.id !== undefined" [selectedId]="folderInfo.id"></panel-folder> + <panel-folder #panelFolder *ngIf="folderInfo.id !== '' && folderInfo.id !== undefined" + [selectedId]="folderInfo.id"></panel-folder> </mat-sidenav> <mat-sidenav-content> - <mat-card id="viewThumbnail" style="display:none;position: fixed;z-index: 2;margin-left: 1px;"><img style="max-height: 100vh;" src="{{thumbnailUrl}}" /></mat-card> + <mat-card id="viewThumbnail" style="display:none;position: fixed;z-index: 2;margin-left: 1px;"><img + style="max-height: 100vh;" src="{{thumbnailUrl}}" /></mat-card> <div class="bg-head"> <div class="bg-head-title" [class.customContainerRight]="appService.getViewMode()"> <div class="bg-head-title-label"> <header-left [snavLeft]="snav"></header-left> </div> <div class="bg-head-title-tool"> - <header-right></header-right> + <header-right></header-right> </div> </div> <div class="bg-head-content" [class.fullContainer]="appService.getViewMode()"> @@ -36,15 +38,15 @@ [indeterminate]="selectedRes.length > 0 && selectedRes.length < allResInBasket.length" style="margin: 10px;padding-right: 10px;" title="{{lang.selectAllResInBasket}}" (change)="toggleAllRes($event)"></mat-checkbox> {{resultsLength}} - {{lang.records | ucfirst}} <small - *ngIf="selectedRes.length > 0">- {{selectedRes.length}} + {{lang.records | ucfirst}} <small *ngIf="selectedRes.length > 0">- {{selectedRes.length}} {{lang.selected}}</small> </div> <div class="table-head-tool"> <span> - <button mat-raised-button color="primary" (click)="unclassify();" *ngIf="selectedRes.length > 0"> - {{lang.removeFromFolder}} - </button> + <app-folder-action-list #actionsList [contextMode]="false" [currentFolderInfo]="folderInfo" + [totalRes]="allResInBasket.length" [selectedRes]="selectedRes" (refreshEvent)="refreshDaoAfterAction()" + (refreshPanelFolders)="panelFolder.refreshFoldersTree()"> + </app-folder-action-list> <!--<app-tools-list #actionsList [selectedRes]="selectedRes" [currentBasketInfo]="currentBasketInfo"></app-tools-list>--> </span> @@ -55,8 +57,10 @@ </div> </div> <div style="height:90%;overflow:auto;position:absolute;width:100%;"> - <table #tableBasketListSort="matSort" cdkDropList id="folder-list" [cdkDropListConnectedTo]="listTodrag()" [cdkDropListData]="data" [cdkDropListDisabled]="dragInit" mat-table [dataSource]="data" matSort - matSortActive="res_id" matSortDisableClear matSortDirection="asc" style="width:100%;"> + <table #tableBasketListSort="matSort" cdkDropList id="folder-list" + [cdkDropListConnectedTo]="listTodrag()" [cdkDropListData]="data" + [cdkDropListDisabled]="dragInit" mat-table [dataSource]="data" matSort matSortActive="res_id" + matSortDisableClear matSortDirection="asc" style="width:100%;"> <ng-container matColumnDef="res_id"> <td mat-cell *matCellDef="let row" @@ -68,18 +72,25 @@ (change)="toggleRes($event,row)" (click)="$event.stopPropagation();"> </mat-checkbox> </span> - <span *ngIf="!appService.getViewMode()" style="cursor:pointer;" class="main-info-status" (click)="launch(defaultAction,row);"> - <mat-icon *ngIf="row.isLocked !== true" title="{{row.statusLabel}}" [ngStyle]="{'color': row.priorityColor}" color="primary" + <span *ngIf="!appService.getViewMode()" style="cursor:pointer;" + class="main-info-status" (click)="launch(defaultAction,row);"> + <mat-icon *ngIf="row.isLocked !== true" title="{{row.statusLabel}}" + [ngStyle]="{'color': row.priorityColor}" color="primary" class="{{row.statusImage.charAt(0)}}{{row.statusImage.charAt(1)}} {{row.statusImage}} {{row.statusImage.charAt(0)}}{{row.statusImage.charAt(1)}}-2x statusIcon"> </mat-icon> - <mat-icon *ngIf="row.isLocked !== true" title="{{row.statusLabel}}" [ngStyle]="{'color': row.priorityColor}" color="primary" + <mat-icon *ngIf="row.isLocked !== true" title="{{row.statusLabel}}" + [ngStyle]="{'color': row.priorityColor}" color="primary" class="fa fa-folder-open fa-2x"> </mat-icon> - <span *ngIf="row.confidentiality === 'Y'" class="watermark">{{lang.confidential}}</span> - <mat-icon *ngIf="row.isLocked === true" title="{{lang.warnLockResInProgress}} : {{row.locker}}" style="color: red;" class="fa fa-lock fa-2x"> + <span *ngIf="row.confidentiality === 'Y'" + class="watermark">{{lang.confidential}}</span> + <mat-icon *ngIf="row.isLocked === true" + title="{{lang.warnLockResInProgress}} : {{row.locker}}" style="color: red;" + class="fa fa-lock fa-2x"> </mat-icon> </span> - <span *ngIf="!appService.getViewMode()" class="main-info-data" style="width:200px;text-align:center;cursor:pointer;"> + <span *ngIf="!appService.getViewMode()" class="main-info-data" + style="width:200px;text-align:center;cursor:pointer;"> <ng-container *ngIf="row.alt_identifier == lang.undefined && row.barcode != lang.undefined"> <span style="color: rgba(0,0,0,0.4);font-size: 90%;"><i @@ -91,26 +102,30 @@ </ng-container> </span> <span class="main-info-data" style="font-weight:bold;flex:1;cursor:pointer;" - [class.undefined]="row.subject == lang.undefined" - title="{{row.subject}}" (click)="launch(defaultAction,row);">{{row.subject | shorten: 150: '...'}}</span> + [class.undefined]="row.subject == lang.undefined" title="{{row.subject}}" + (click)="launch(defaultAction,row);">{{row.subject | shorten: 150: '...'}}</span> <span class="main-info-action"> <button mat-icon-button title="{{lang.notes}}" (click)="$event.stopPropagation();togglePanel('note',row)" [class.noData]="row.countNotes == 0"> <mat-icon matBadgeHidden="{{row.countNotes == 0}}" fontSet="fas" - matBadge="{{row.countNotes}}" fontIcon="fa-comments fa-2x" [color]="snav2.opened && row.checked && currentMode == 'note' ? 'primary' : ''"> + matBadge="{{row.countNotes}}" fontIcon="fa-comments fa-2x" + [color]="snav2.opened && row.checked && currentMode == 'note' ? 'primary' : ''"> </mat-icon> </button> <button mat-icon-button title="{{lang.attachments}}" (click)="$event.stopPropagation();togglePanel('attachment',row)" [class.noData]="row.countAttachments == 0"> <mat-icon matBadgeHidden="{{row.countAttachments == 0}}" fontSet="fas" - matBadge="{{row.countAttachments}}" fontIcon="fa-paperclip fa-2x" [color]="snav2.opened && row.checked && currentMode == 'attachment' ? 'primary' : ''"> + matBadge="{{row.countAttachments}}" fontIcon="fa-paperclip fa-2x" + [color]="snav2.opened && row.checked && currentMode == 'attachment' ? 'primary' : ''"> </mat-icon> </button> <button mat-icon-button title="{{lang.diffusionList}}" (click)="$event.stopPropagation();togglePanel('diffusion',row)"> - <mat-icon fontSet="fas" fontIcon="fa-sitemap fa-2x" [color]="snav2.opened && row.checked && currentMode == 'diffusion' ? 'primary' : ''"></mat-icon> + <mat-icon fontSet="fas" fontIcon="fa-sitemap fa-2x" + [color]="snav2.opened && row.checked && currentMode == 'diffusion' ? 'primary' : ''"> + </mat-icon> </button> <button mat-icon-button title="{{lang.linkDetails}}" (click)="$event.stopPropagation();goToDetail(row);" @@ -122,10 +137,13 @@ </td> </ng-container> <tr mat-row *matRowDef="let row; columns: displayedColumnsBasket;" - (contextmenu)="open($event,row);" class="rowData" [class.locked]="row.isLocked == true" cdkDrag [cdkDragData]="row" > - <div class="example-custom-placeholder" *cdkDragPlaceholder></div> - <div class="dragPreview" *cdkDragPreview><i class="fas fa-envelope-open-text fa-2x"></i><br/>{{lang.classifyInFolder}} : <b>{{row.alt_identifier}}</b></div> - </tr> + (contextmenu)="open($event,row);" class="rowData" [class.locked]="row.isLocked == true" + cdkDrag [cdkDragData]="row"> + <div class="example-custom-placeholder" *cdkDragPlaceholder></div> + <div class="dragPreview" *cdkDragPreview><i + class="fas fa-envelope-open-text fa-2x"></i><br />{{lang.classifyInFolder}} : + <b>{{row.alt_identifier}}</b></div> + </tr> </table> </div> <div class="table-head"> @@ -134,11 +152,11 @@ </div> </mat-sidenav-content> <mat-sidenav #snav2 [fixedInViewport]="appService.getViewMode()" position='end' - [opened]="appService.getViewMode() ? false : false" [mode]="appService.getViewMode() ? 'over' : 'side'" class="panel-right" style="overflow-x:hidden;" - [class.docView]="innerHtml" [ngStyle]="{'width': appService.getViewMode() ? '80%' : '30%'}" - autoFocus="false"> - <div *ngIf="innerHtml" [matTooltip]="currentChrono" - [innerHTML]="innerHtml" style="height: 100%;overflow: hidden;"></div> + [opened]="appService.getViewMode() ? false : false" [mode]="appService.getViewMode() ? 'over' : 'side'" + class="panel-right" style="overflow-x:hidden;" [class.docView]="innerHtml" + [ngStyle]="{'width': appService.getViewMode() ? '80%' : '30%'}" autoFocus="false"> + <div *ngIf="innerHtml" [matTooltip]="currentChrono" [innerHTML]="innerHtml" + style="height: 100%;overflow: hidden;"></div> <div style="display:flex;"> <button mat-icon-button (click)="snav2.close()" style="font-size: 20px;color:#666;"> @@ -148,4 +166,7 @@ <app-panel-list #appPanelList (refreshBadgeNotes)="refreshBadgeNotes($event)"></app-panel-list> <mat-divider></mat-divider> </mat-sidenav> -</mat-sidenav-container> \ No newline at end of file +</mat-sidenav-container> +<app-folder-action-list #actionsListContext [contextMode]="true" [currentFolderInfo]="folderInfo" [totalRes]="allResInBasket.length" + [selectedRes]="selectedRes" (refreshEvent)="refreshDaoAfterAction()" (refreshPanelFolders)="panelFolder.refreshFoldersTree()"> +</app-folder-action-list> \ No newline at end of file diff --git a/src/frontend/app/folder/document-list/folder-document-list.component.ts b/src/frontend/app/folder/document-list/folder-document-list.component.ts index 8baaf595f3bcbee993bc9b01d09488422bd7675f..400b09061ee2b3e38d99086b8281fe5ecad8f7d2 100644 --- a/src/frontend/app/folder/document-list/folder-document-list.component.ts +++ b/src/frontend/app/folder/document-list/folder-document-list.component.ts @@ -19,6 +19,7 @@ import { AppService } from '../../../service/app.service'; import { PanelFolderComponent } from '../panel/panel-folder.component'; import { BasketHomeComponent } from '../../basket/basket-home.component'; import { ConfirmComponent } from '../../../plugins/modal/confirm.component'; +import { FolderActionListComponent } from '../folder-action-list/folder-action-list.component'; declare function $j(selector: any): any; @@ -87,6 +88,7 @@ export class FolderDocumentListComponent implements OnInit { private destroy$ = new Subject<boolean>(); + @ViewChild('actionsListContext', { static: true }) actionsList: FolderActionListComponent; @ViewChild('appPanelList', { static: true }) appPanelList: PanelListComponent; currentSelectedChrono: string = ''; @@ -298,23 +300,19 @@ export class FolderDocumentListComponent implements OnInit { } } - unclassify() { - this.dialogRef = this.dialog.open(ConfirmComponent, { autoFocus: false, disableClose: true, data: { title: this.lang.delete, msg: 'Voulez-vous enlever <b>' + this.selectedRes.length + '</b> document(s) du classement ?' } }); - - this.dialogRef.afterClosed().pipe( - filter((data: string) => data === 'ok'), - exhaustMap(() => this.http.request('DELETE', '../../rest/folders/' + this.folderInfo.id + '/resources', { body: { resources: this.selectedRes } })), - tap((data: any) => { - this.notify.success(this.lang.removedFromFolder); - this.resultsLength = data.countResources; - this.data.forEach((resource: any, key: number) => { - if (this.selectedRes.indexOf(resource.res_id) != -1) { - this.data.splice(key, 1); - } - }); - this.refreshDaoAfterAction(); - }) - ).subscribe(); + open({ x, y }: MouseEvent, row: any) { + + let thisSelect = { checked : true }; + let thisDeselect = { checked : false }; + if ( row.checked === false) { + row.checked = true; + this.toggleAllRes(thisDeselect); + this.toggleRes(thisSelect, row); + } + this.actionsList.open(x, y, row) + + // prevents default + return false; } listTodrag() { diff --git a/src/frontend/app/folder/folder-action-list/folder-action-list.component.html b/src/frontend/app/folder/folder-action-list/folder-action-list.component.html new file mode 100644 index 0000000000000000000000000000000000000000..f10c01b2c3531df91990b614e334e97d348fba0e --- /dev/null +++ b/src/frontend/app/folder/folder-action-list/folder-action-list.component.html @@ -0,0 +1,22 @@ +<button *ngIf="!contextMode" mat-stroked-button [matMenuTriggerFor]="menu">Actions <mat-icon matSuffix + class="fa fa-caret-down"></mat-icon> +</button> +<span *ngIf="contextMode" [matMenuTriggerFor]="menu" #menu2 style="position: absolute;" + [style.left]="contextMenuPosition.x" [style.top]="contextMenuPosition.y"></span> + +<mat-menu #menu="matMenu" [class]="'actionListMenu'"> + <div *ngIf="contextMode && this.selectedRes.length == 1" + style="text-align: center;font-size: 10px;color: white;background: #135F7F;padding: 5px;font-weight: bold;"> + {{this.contextMenuTitle}} + </div> + <!--<button *ngFor="let action of actionsList" [disabled]="action.component == '' || this.selectedRes.length == 0" + mat-menu-item (click)="launchEvent(action);"> + <span>{{action.label_action}}</span> + </button> + <mat-divider></mat-divider>--> + <button mat-menu-item class="folderAction" (click)="unclassify()" [disabled]="selectedRes.length === 0"> + <mat-icon class="fa fa-folder-minus fa-2x"></mat-icon> + <span>Retirer du dossier</span> + </button> + <folder-menu [resIds]="selectedRes" (refreshFolders)="refreshFolders()"></folder-menu> +</mat-menu> \ No newline at end of file diff --git a/src/frontend/app/folder/folder-action-list/folder-action-list.component.scss b/src/frontend/app/folder/folder-action-list/folder-action-list.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..aa740d0dfd723e4de6ecdeeff7af7cc07abd6e9c --- /dev/null +++ b/src/frontend/app/folder/folder-action-list/folder-action-list.component.scss @@ -0,0 +1,25 @@ +@import '../../../css/vars.scss'; + +.mat-icon { + height: auto; +} + +.mat-stroked-button { + border-radius: 20px; + border-color: #135F7F; + color: #135F7F; +} + +::ng-deep.actionListMenu { + .mat-menu-content { + padding-top: 0; + padding-bottom: 0; + } +} + +.folderAction { + .mat-icon { + font-size:20px; + color: $warn; + } +} \ No newline at end of file diff --git a/src/frontend/app/folder/folder-action-list/folder-action-list.component.ts b/src/frontend/app/folder/folder-action-list/folder-action-list.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..da85510c367a5d830fb780689f2b2ac4641bd8d9 --- /dev/null +++ b/src/frontend/app/folder/folder-action-list/folder-action-list.component.ts @@ -0,0 +1,180 @@ +import { Component, OnInit, Input, ViewChild, Output, EventEmitter } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { LANG } from '../../translate.component'; +import { NotificationService } from '../../notification.service'; +import { MatDialog, MatDialogRef } from '@angular/material/dialog'; +import { MatMenuTrigger } from '@angular/material/menu'; + +import { Router } from '@angular/router'; +import { ConfirmComponent } from '../../../plugins/modal/confirm.component'; +import { filter, exhaustMap, tap } from 'rxjs/operators'; + +@Component({ + selector: 'app-folder-action-list', + templateUrl: "folder-action-list.component.html", + styleUrls: ['folder-action-list.component.scss'], + providers: [NotificationService], +}) +export class FolderActionListComponent implements OnInit { + + lang: any = LANG; + loading: boolean = false; + + @ViewChild(MatMenuTrigger, { static: false }) contextMenu: MatMenuTrigger; + @Output() triggerEvent = new EventEmitter<string>(); + + contextMenuPosition = { x: '0px', y: '0px' }; + contextMenuTitle = ''; + currentAction: any = {}; + basketInfo: any = {}; + contextResId = 0; + currentLock: any = null; + arrRes: any[] = []; + + actionsList: any[] = []; + + @Input('selectedRes') selectedRes: any; + @Input('totalRes') totalRes: number; + @Input('contextMode') contextMode: boolean; + @Input('currentFolderInfo') currentFolderInfo: any; + + @Output('refreshEvent') refreshEvent = new EventEmitter<string>(); + @Output('refreshPanelFolders') refreshPanelFolders = new EventEmitter<string>(); + + constructor(public http: HttpClient, private notify: NotificationService, public dialog: MatDialog, private router: Router) { } + + dialogRef: MatDialogRef<any>; + + ngOnInit(): void { } + + open(x: number, y: number, row: any) { + + //this.loadActionList(); + + // Adjust the menu anchor position + this.contextMenuPosition.x = x + 'px'; + this.contextMenuPosition.y = y + 'px'; + + this.contextMenuTitle = row.alt_identifier; + this.contextResId = row.res_id; + + // Opens the menu + this.contextMenu.openMenu(); + + // prevents default + return false; + } + + /*launchEvent(action: any, row: any) { + this.arrRes = []; + this.currentAction = action; + + this.arrRes = this.selectedRes; + + + if (this.contextMode && this.selectedRes.length > 1) { + this.contextMenuTitle = ''; + this.contextResId = 0; + } + + if (row !== undefined){ + this.contextMenuTitle = row.alt_identifier; + } + + if (action.component == 'v1Action' && this.arrRes.length > 1) { + alert(this.lang.actionMassForbidden); + } else if (action.component !== null) { + + this.http.put('../../rest/resourcesList/users/' + this.currentBasketInfo.ownerId + '/groups/' + this.currentBasketInfo.groupId + '/baskets/' + this.currentBasketInfo.basketId + '/lock', { resources: this.arrRes }) + .subscribe((data: any) => { + try { + let msgWarn = this.lang.warnLockRes + ' : ' + data.lockers.join(', '); + + if (data.lockedResources != this.arrRes.length) { + msgWarn += this.lang.warnLockRes2 + '.'; + } + + if (data.lockedResources > 0) { + alert(data.lockedResources + ' ' + msgWarn); + } + + if (data.lockedResources != this.arrRes.length) { + this.lock(); + this[action.component](); + } + } + catch (error) { + console.log(error); + console.log(action.component); + alert(this.lang.actionNotExist); + } + this.loading = false; + }, (err: any) => { + this.notify.handleErrors(err); + }); + } + + } + + loadActionList() { + + if (JSON.stringify(this.basketInfo) != JSON.stringify(this.currentBasketInfo)) { + + this.basketInfo = JSON.parse(JSON.stringify(this.currentBasketInfo)); + + this.http.get('../../rest/resourcesList/users/' + this.currentBasketInfo.ownerId + '/groups/' + this.currentBasketInfo.groupId + '/baskets/' + this.currentBasketInfo.basketId + '/actions') + .subscribe((data: any) => { + if (data.actions.length > 0) { + this.actionsList = data.actions; + } else { + this.actionsList = [{ + id: 0, + label_action: this.lang.noAction, + component: '' + }]; + } + this.loading = false; + }, (err: any) => { + this.notify.handleErrors(err); + }); + } + } + + lock() { + this.currentLock = setInterval(() => { + this.http.put('../../rest/resourcesList/users/' + this.currentBasketInfo.ownerId + '/groups/' + this.currentBasketInfo.groupId + '/baskets/' + this.currentBasketInfo.basketId + '/lock', { resources: this.arrRes }) + .subscribe((data: any) => { }, (err: any) => { }); + }, 50000); + } + + unlock() { + clearInterval(this.currentLock); + } + + unlockRest() { + this.http.put('../../rest/resourcesList/users/' + this.currentBasketInfo.ownerId + '/groups/' + this.currentBasketInfo.groupId + '/baskets/' + this.currentBasketInfo.basketId + '/unlock', { resources: this.arrRes }) + .subscribe((data: any) => { }, (err: any) => { }); + }*/ + + refreshFolders() { + this.refreshPanelFolders.emit(); + } + + refreshDaoAfterAction() { + this.refreshEvent.emit(); + } + + unclassify() { + this.dialogRef = this.dialog.open(ConfirmComponent, { autoFocus: false, disableClose: true, data: { title: this.lang.delete, msg: 'Voulez-vous enlever <b>' + this.selectedRes.length + '</b> document(s) du classement ?' } }); + + this.dialogRef.afterClosed().pipe( + filter((data: string) => data === 'ok'), + exhaustMap(() => this.http.request('DELETE', '../../rest/folders/' + this.currentFolderInfo.id + '/resources', { body: { resources: this.selectedRes } })), + tap((data: any) => { + this.notify.success(this.lang.removedFromFolder); + this.refreshFolders(); + this.refreshDaoAfterAction(); + }) + ).subscribe(); + } +} diff --git a/src/frontend/app/folder/folder-menu/folder-menu.component.html b/src/frontend/app/folder/folder-menu/folder-menu.component.html index bfd26e6b94fb1565f51b2d352376d193d4a1a5ef..d7721298c2b2764fa06619ec386cf053038b83b1 100644 --- a/src/frontend/app/folder/folder-menu/folder-menu.component.html +++ b/src/frontend/app/folder/folder-menu/folder-menu.component.html @@ -1,5 +1,5 @@ -<button mat-menu-item [matMenuTriggerFor]="folders" class="folderAction" (menuOpened)="getFolders()"> - <mat-icon class="fa fa-folder fa-2x"></mat-icon> +<button mat-menu-item [matMenuTriggerFor]="folders" class="folderAction" (menuOpened)="getFolders()" [disabled]="resIds.length === 0"> + <mat-icon class="fa fa-folder-open fa-2x"></mat-icon> <span>{{lang.classifyIn}}</span> </button> <mat-menu #folders="matMenu"> diff --git a/src/frontend/app/menu/menuNav.component.html b/src/frontend/app/menu/menuNav.component.html index 5af98c6652622206bc4c9c767bf9006830969098..65570821dfcf8088bd591b11af58eed0c3292ad7 100755 --- a/src/frontend/app/menu/menuNav.component.html +++ b/src/frontend/app/menu/menuNav.component.html @@ -1,4 +1,4 @@ -<mat-nav-list *ngIf="router.url != '/home' && router.url != '/profile' && router.url != '/about-us' && router.url != '/administration' && router.url.indexOf('/basketList') == -1"> +<mat-nav-list *ngIf="router.url != '/home' && router.url != '/profile' && router.url != '/about-us' && router.url != '/administration' && router.url.indexOf('/basketList') == -1 && router.url.indexOf('/folders') == -1"> <a mat-list-item (click)="backClicked()"> <mat-icon color="primary" mat-list-icon class="fa fa-chevron-left"></mat-icon> <p mat-line> @@ -6,4 +6,4 @@ </p> </a> </mat-nav-list> -<mat-divider *ngIf="router.url != '/home' && router.url != '/about-us' && router.url != '/administration' && router.url.indexOf('/basketList') == -1"></mat-divider> \ No newline at end of file +<mat-divider *ngIf="router.url != '/home' && router.url != '/about-us' && router.url != '/administration' && router.url.indexOf('/basketList') == -1 && router.url.indexOf('/folders') == -1"></mat-divider> \ No newline at end of file diff --git a/src/frontend/css/maarch-material-table.scss b/src/frontend/css/maarch-material-table.scss index 3b52950e61a5a85f6b009a36abf3a55ec51ce41f..b71c8fdc9abb3aa3cc675b1b49749952c003323f 100644 --- a/src/frontend/css/maarch-material-table.scss +++ b/src/frontend/css/maarch-material-table.scss @@ -30,7 +30,7 @@ .mat-icon { font-size: 25px; - color: green; + //color: green; } }