mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1911] disabled toolbar and drag area on search results page (#2689)
* [ADF-1911] disabled toolbar and drag area on search results page * [ADF-1911] removed color added to style
This commit is contained in:
@@ -83,7 +83,8 @@
|
|||||||
"LOGIN_FOOTER": "Login footer"
|
"LOGIN_FOOTER": "Login footer"
|
||||||
},
|
},
|
||||||
"SEARCH": {
|
"SEARCH": {
|
||||||
"RESULTS": "Search results"
|
"RESULTS": "Search results",
|
||||||
|
"NO_RESULT": "No results found"
|
||||||
},
|
},
|
||||||
"SOCIAL": {
|
"SOCIAL": {
|
||||||
"LIKE":"Like component",
|
"LIKE":"Like component",
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="document-list-container" fxLayout="row" fxLayoutAlign="start stretch" fxLayoutGap="16px">
|
<div class="document-list-container" fxLayout="row" fxLayoutAlign="start stretch" fxLayoutGap="16px">
|
||||||
<adf-upload-drag-area fxFlex="1 1 auto"
|
<adf-upload-drag-area fxFlex="1 1 auto"
|
||||||
|
[disabled]="disableDragArea"
|
||||||
[parentId]="getDocumentListCurrentFolderId()"
|
[parentId]="getDocumentListCurrentFolderId()"
|
||||||
[versioning]="versioning"
|
[versioning]="versioning"
|
||||||
[adf-node-permission]="'create'"
|
[adf-node-permission]="'create'"
|
||||||
@@ -15,7 +16,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="error-message--text">{{errorMessage}}</span>
|
<span class="error-message--text">{{errorMessage}}</span>
|
||||||
</div>
|
</div>
|
||||||
<adf-toolbar [color]="toolbarColor" class="adf-files-toolbar">
|
<adf-toolbar *ngIf="!disableDragArea" [color]="toolbarColor" class="adf-files-toolbar">
|
||||||
<adf-toolbar-title fxFlex="0 1 auto">
|
<adf-toolbar-title fxFlex="0 1 auto">
|
||||||
<adf-breadcrumb fxShow fxHide.lt-sm="true"
|
<adf-breadcrumb fxShow fxHide.lt-sm="true"
|
||||||
class="files-breadcrumb"
|
class="files-breadcrumb"
|
||||||
@@ -132,6 +133,13 @@
|
|||||||
(preview)="showFile($event)"
|
(preview)="showFile($event)"
|
||||||
(folderChange)="onFolderChange($event)"
|
(folderChange)="onFolderChange($event)"
|
||||||
(permissionError)="handlePermissionError($event)">
|
(permissionError)="handlePermissionError($event)">
|
||||||
|
<empty-folder-content *ngIf="disableDragArea">
|
||||||
|
<ng-template>
|
||||||
|
<div class="adf-empty_template">
|
||||||
|
<div class="adf-no-result-message">{{ 'SEARCH.NO_RESULT' | translate }}</div>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
</empty-folder-content>
|
||||||
<data-columns>
|
<data-columns>
|
||||||
<data-column
|
<data-column
|
||||||
key="$thumbnail"
|
key="$thumbnail"
|
||||||
|
@@ -95,6 +95,27 @@ adf-document-list ::ng-deep adf-datatable > table > tbody > tr.is-selected > td.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.adf-no-result__empty_doc_lib {
|
||||||
|
width: 565px;
|
||||||
|
height: 161px;
|
||||||
|
object-fit: contain;
|
||||||
|
margin-top: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.adf-empty_template {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.adf-no-result-message{
|
||||||
|
height: 32px;
|
||||||
|
opacity: 0.26;
|
||||||
|
font-size: 24px;
|
||||||
|
line-height: 1.33;
|
||||||
|
letter-spacing: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: $minimumDocumentListWidth) {
|
@media (max-width: $minimumDocumentListWidth) {
|
||||||
adf-document-list ::ng-deep adf-datatable {
|
adf-document-list ::ng-deep adf-datatable {
|
||||||
& ::ng-deep .adf-data-table-cell--fileSize {
|
& ::ng-deep .adf-data-table-cell--fileSize {
|
||||||
|
@@ -96,6 +96,9 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
|||||||
@Input()
|
@Input()
|
||||||
pagination: Pagination;
|
pagination: Pagination;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
disableDragArea: boolean = false;
|
||||||
|
|
||||||
@Output()
|
@Output()
|
||||||
documentListReady: EventEmitter<any> = new EventEmitter();
|
documentListReady: EventEmitter<any> = new EventEmitter();
|
||||||
|
|
||||||
@@ -177,6 +180,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// this.disableDragArea = false;
|
||||||
this.uploadService.fileUploadComplete.asObservable().debounceTime(300).subscribe(value => this.onFileUploadEvent(value));
|
this.uploadService.fileUploadComplete.asObservable().debounceTime(300).subscribe(value => this.onFileUploadEvent(value));
|
||||||
this.uploadService.fileUploadDeleted.subscribe((value) => this.onFileUploadEvent(value));
|
this.uploadService.fileUploadDeleted.subscribe((value) => this.onFileUploadEvent(value));
|
||||||
this.contentService.folderCreated.subscribe(value => this.onFolderCreated(value));
|
this.contentService.folderCreated.subscribe(value => this.onFolderCreated(value));
|
||||||
@@ -194,9 +198,21 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
|||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
ngOnChanges(changes: SimpleChanges) {
|
||||||
if (changes.nodeResult && changes.nodeResult.currentValue) {
|
if (changes.nodeResult && changes.nodeResult.currentValue) {
|
||||||
this.nodeResult = <NodePaging> changes.nodeResult.currentValue;
|
this.nodeResult = <NodePaging>changes.nodeResult.currentValue;
|
||||||
this.pagination = this.nodeResult.list.pagination;
|
this.pagination = this.nodeResult.list.pagination;
|
||||||
}
|
}
|
||||||
|
if (!this.pagination) {
|
||||||
|
this.giveDefaultPaginationWhenNotDefined();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
giveDefaultPaginationWhenNotDefined() {
|
||||||
|
this.pagination = <Pagination> {
|
||||||
|
maxItems: this.preference.paginationSize,
|
||||||
|
skipCount: 0,
|
||||||
|
totalItems: 0,
|
||||||
|
hasMoreItems: false
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
getCurrentDocumentListNode(): MinimalNodeEntity[] {
|
getCurrentDocumentListNode(): MinimalNodeEntity[] {
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
<adf-files-component
|
<adf-files-component
|
||||||
[currentFolderId]="null"
|
[currentFolderId]="null"
|
||||||
[nodeResult]="resultNodePageList"
|
[nodeResult]="resultNodePageList"
|
||||||
|
[disableDragArea]="true"
|
||||||
(documentListReady)="refreshResults($event)"
|
(documentListReady)="refreshResults($event)"
|
||||||
(changedPageSize)="refreshPage($event)"
|
(changedPageSize)="refreshPage($event)"
|
||||||
(changedPageNumber)="refreshPage($event)"
|
(changedPageNumber)="refreshPage($event)"
|
||||||
|
Reference in New Issue
Block a user