Verified Commit 1d51a69f authored by Alex ORLUC's avatar Alex ORLUC

FIX #11296 TIME 0:20 fix css + lauch select if dnd

parent 66da1a22
......@@ -140,7 +140,7 @@
</ng-container>
<tr mat-row *matRowDef="let row; columns: displayedColumnsBasket;"
(contextmenu)="open($event,row);" class="rowData" [class.locked]="row.isLocked == true"
cdkDrag [cdkDragData]="row">
cdkDrag (cdkDragStarted)="selectSpecificRes(row);" [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}} :
......
......@@ -306,6 +306,14 @@ export class FolderDocumentListComponent implements OnInit {
}
}
selectSpecificRes(row: any) {
let thisSelect = { checked : true };
let thisDeselect = { checked : false };
this.toggleAllRes(thisDeselect);
this.toggleRes(thisSelect, row);
}
open({ x, y }: MouseEvent, row: any) {
let thisSelect = { checked : true };
......
......@@ -3,5 +3,5 @@
<span>{{lang.classifyIn}}</span>
</button>
<mat-menu #folders="matMenu">
<button mat-menu-item *ngFor="let folder of foldersList | sortBy : 'label'" class="labelFolder" [class.private]="!folder.public" (click)="classifyDocuments(folder)" [title]="folder.label">{{folder.label}}</button>
<button mat-menu-item *ngFor="let folder of foldersList | sortBy : 'label'" class="labelFolder" (click)="classifyDocuments(folder)" [title]="folder.label">{{folder.label}} <i class="fa fa-users private" *ngIf="folder.public" title="{{lang.sharedFolder}}"></i></button>
</mat-menu>
\ No newline at end of file
......@@ -10,9 +10,11 @@
}
.labelFolder {
color: $primary;
color: rgb(102, 102, 102);
font-size: 12px;
font-weight: bold;
}
.private {
color: $warn;
color: $secondary;
}
\ No newline at end of file
......@@ -6,7 +6,7 @@
matTreeNodePadding matTreeNodePaddingIndent="20px">
<!-- use a disabled button to provide padding for tree leaf -->
<button class="expandButton" mat-icon-button disabled></button>
<a mat-list-item disableRipple [class.selectedFolder]="node.selected" (mouseenter)="showAction(node)"
<a mat-list-item disableRipple [class.selectedFolder]="node.selected" [class.empty]="node.countResources === 0" (mouseenter)="showAction(node)"
(mouseleave)="hideAction(node)" (click)="selectFolder(node)">
<span style="flex:1;overflow: hidden;text-overflow: ellipsis;">
<span class="treeLabel" [title]="node.label" [class.drag]="node.drag">
......@@ -46,7 +46,7 @@
<mat-icon class="mat-icon-rtl-mirror fa {{treeControl.isExpanded(node) ? 'fa-chevron-down' : 'fa-chevron-right'}}">
</mat-icon>
</button>
<a mat-list-item disableRipple [class.selectedFolder]="node.selected" (mouseleave)="hideAction(node)"
<a mat-list-item disableRipple [class.selectedFolder]="node.selected" [class.empty]="node.countResources === 0" (mouseleave)="hideAction(node)"
(mouseenter)="showAction(node)" (click)="selectFolder(node)">
<span style="flex:1;overflow: hidden;text-overflow: ellipsis;">
<span class="treeLabel" [title]="node.label" [class.drag]="node.drag">
......
......@@ -95,4 +95,22 @@ form {
button:disabled {
opacity: 1;
}
.countResources {
font-weight: bold;
}
:not(.empty) {
.countResources {
color: $primary;
}
}
.empty {
opacity: 0.5;
.countResources {
font-size: 12px;
color: rgb(102, 102, 102);
}
}
\ No newline at end of file
......@@ -172,7 +172,7 @@
</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" >
(contextmenu)="open($event,row);" class="rowData" [class.locked]="row.isLocked == true" cdkDrag (cdkDragStarted)="selectSpecificRes(row);" [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>
......
......@@ -403,6 +403,14 @@ export class BasketListComponent implements OnInit {
}
}
selectSpecificRes(row: any) {
let thisSelect = { checked : true };
let thisDeselect = { checked : false };
this.toggleAllRes(thisDeselect);
this.toggleRes(thisSelect, row);
}
open({ x, y }: MouseEvent, row: any) {
let thisSelect = { checked : true };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment