[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:
Vito
2017-11-21 17:41:43 +00:00
committed by Eugenio Romano
parent c605ee38a7
commit 4fbd9f5d62
5 changed files with 50 additions and 3 deletions

View File

@@ -83,7 +83,8 @@
"LOGIN_FOOTER": "Login footer"
},
"SEARCH": {
"RESULTS": "Search results"
"RESULTS": "Search results",
"NO_RESULT": "No results found"
},
"SOCIAL": {
"LIKE":"Like component",

View File

@@ -5,6 +5,7 @@
</div>
<div class="document-list-container" fxLayout="row" fxLayoutAlign="start stretch" fxLayoutGap="16px">
<adf-upload-drag-area fxFlex="1 1 auto"
[disabled]="disableDragArea"
[parentId]="getDocumentListCurrentFolderId()"
[versioning]="versioning"
[adf-node-permission]="'create'"
@@ -15,7 +16,7 @@
</button>
<span class="error-message--text">{{errorMessage}}</span>
</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-breadcrumb fxShow fxHide.lt-sm="true"
class="files-breadcrumb"
@@ -132,6 +133,13 @@
(preview)="showFile($event)"
(folderChange)="onFolderChange($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-column
key="$thumbnail"

View File

@@ -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) {
adf-document-list ::ng-deep adf-datatable {
& ::ng-deep .adf-data-table-cell--fileSize {

View File

@@ -96,6 +96,9 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
@Input()
pagination: Pagination;
@Input()
disableDragArea: boolean = false;
@Output()
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.fileUploadDeleted.subscribe((value) => this.onFileUploadEvent(value));
this.contentService.folderCreated.subscribe(value => this.onFolderCreated(value));
@@ -197,6 +201,18 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
this.nodeResult = <NodePaging>changes.nodeResult.currentValue;
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[] {

View File

@@ -8,6 +8,7 @@
<adf-files-component
[currentFolderId]="null"
[nodeResult]="resultNodePageList"
[disableDragArea]="true"
(documentListReady)="refreshResults($event)"
(changedPageSize)="refreshPage($event)"
(changedPageNumber)="refreshPage($event)"