mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Code improvements
This commit is contained in:
@@ -15,12 +15,20 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Component, OnInit, OnChanges, Input, Output, EventEmitter} from '@angular/core';
|
||||
import {ContentActionModel} from './../models/content-action.model';
|
||||
import {ContentActionList} from './content-action-list';
|
||||
import {DocumentActionsService} from '../services/document-actions.service';
|
||||
import {FolderActionsService} from '../services/folder-actions.service';
|
||||
import {ContentActionHandler} from '../models/content-action.model';
|
||||
import {
|
||||
Component,
|
||||
OnInit,
|
||||
OnChanges,
|
||||
Input,
|
||||
Output,
|
||||
EventEmitter
|
||||
} from '@angular/core';
|
||||
|
||||
import { ContentActionModel } from './../models/content-action.model';
|
||||
import { ContentActionList } from './content-action-list';
|
||||
import { DocumentActionsService } from '../services/document-actions.service';
|
||||
import { FolderActionsService } from '../services/folder-actions.service';
|
||||
import { ContentActionHandler } from '../models/content-action.model';
|
||||
|
||||
@Component({
|
||||
selector: 'content-action',
|
||||
|
@@ -34,7 +34,6 @@ import { CONTEXT_MENU_DIRECTIVES } from 'ng2-alfresco-core';
|
||||
|
||||
import {
|
||||
ALFRESCO_DATATABLE_DIRECTIVES,
|
||||
DataSorting,
|
||||
DataRowEvent,
|
||||
DataTableComponent,
|
||||
ObjectDataColumn
|
||||
@@ -128,7 +127,7 @@ export class DocumentList implements OnInit, AfterViewInit, AfterViewChecked, Af
|
||||
private documentListService: DocumentListService,
|
||||
private ngZone: NgZone) {
|
||||
|
||||
this.setupData();
|
||||
this.data = new ShareDataTableAdapter(this.documentListService, this.baseComponentPath, []);
|
||||
}
|
||||
|
||||
getContextActions(node: MinimalNodeEntity) {
|
||||
@@ -328,11 +327,6 @@ export class DocumentList implements OnInit, AfterViewInit, AfterViewChecked, Af
|
||||
}
|
||||
}
|
||||
|
||||
private setupData() {
|
||||
this.data = new ShareDataTableAdapter(this.documentListService, this.baseComponentPath, []);
|
||||
this.data.setSorting(new DataSorting('id', 'asc'));
|
||||
}
|
||||
|
||||
onShowRowContextMenu(event) {
|
||||
if (this.contextMenuActions) {
|
||||
let args = event.args;
|
||||
|
Reference in New Issue
Block a user