fix no permission template (#4256)

rename correctly template demo
This commit is contained in:
Eugenio Romano
2019-02-04 21:05:07 +00:00
committed by GitHub
parent 16b6c1dcb2
commit bb770a5df9
9 changed files with 30 additions and 13 deletions

View File

@@ -0,0 +1,57 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component, ViewChild, AfterViewChecked } from '@angular/core';
import { DocumentListComponent } from '@alfresco/adf-content-services';
import { ObjectDataTableAdapter } from '@alfresco/adf-core';
@Component({
selector: 'app-template-list',
templateUrl: './template-demo.component.html'
})
export class TemplateDemoComponent implements AfterViewChecked {
@ViewChild('defaultDocumentList')
defaultDocumentListComponent: DocumentListComponent;
@ViewChild('customLoadingDocumentList')
customLoadingDocumentList: DocumentListComponent;
@ViewChild('customNoPermissionDocumentList')
customNoPermissionDocumentList: DocumentListComponent;
@ViewChild('defaultNoPermissionDocumentList')
defaultNoPermissionDocumentList: DocumentListComponent;
@ViewChild('customEmptyDocumentList')
customEmptyDocumentList: DocumentListComponent;
@ViewChild('defaultEmptyDocumentList')
defaultEmptyDocumentList: DocumentListComponent;
constructor() {
}
ngAfterViewChecked(): void {
this.defaultDocumentListComponent.dataTable.loading = true;
this.customLoadingDocumentList.dataTable.loading = true;
this.customEmptyDocumentList.dataTable.data = new ObjectDataTableAdapter();
this.defaultEmptyDocumentList.dataTable.data = new ObjectDataTableAdapter();
this.customNoPermissionDocumentList.dataTable.noPermission = true;
this.defaultNoPermissionDocumentList.dataTable.noPermission = true;
}
}