diff --git a/demo-shell-ng2/app/components/files/files.component.html b/demo-shell-ng2/app/components/files/files.component.html
index f3d35ca923..6e541afcb1 100644
--- a/demo-shell-ng2/app/components/files/files.component.html
+++ b/demo-shell-ng2/app/components/files/files.component.html
@@ -39,22 +39,20 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.d.ts b/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.d.ts
index d95b6035b6..3dea91ed0b 100644
--- a/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.d.ts
+++ b/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.d.ts
@@ -1,33 +1,21 @@
import { DocumentList } from './src/components/document-list';
-import { DocumentAction } from './src/components/document-action';
-import { DocumentActionList } from './src/components/document-action-list';
-import { QuickDocumentAction } from './src/components/quick-document-action';
-import { QuickDocumentActionList } from './src/components/quick-document-action-list';
-import { FolderAction } from './src/components/folder-action';
-import { FolderActionList } from './src/components/folder-action-list';
-import { QuickFolderAction } from './src/components/quick-folder-action';
-import { QuickFolderActionList } from './src/components/quick-folder-action-list';
import { ContentColumn } from './src/components/content-column';
import { ContentColumnList } from './src/components/content-column-list';
+import { ContentAction } from './src/components/content-action';
+import { ContentActionList } from './src/components/content-action-list';
import { FolderActionsService } from './src/services/folder-actions.service';
import { DocumentActionsService } from './src/services/document-actions.service';
import { AlfrescoService } from './src/services/alfresco.service';
export * from './src/components/document-list';
-export * from './src/components/document-action';
-export * from './src/components/document-action-list';
-export * from './src/components/quick-document-action';
-export * from './src/components/quick-document-action-list';
-export * from './src/components/folder-action';
-export * from './src/components/folder-action-list';
-export * from './src/components/quick-folder-action';
-export * from './src/components/quick-folder-action-list';
export * from './src/components/content-column';
export * from './src/components/content-column-list';
+export * from './src/components/content-action';
+export * from './src/components/content-action-list';
export * from './src/services/folder-actions.service';
export * from './src/services/document-actions.service';
export * from './src/services/alfresco.service';
declare var _default: {
- directives: (typeof DocumentList | typeof DocumentAction | typeof DocumentActionList | typeof QuickDocumentAction | typeof QuickDocumentActionList | typeof FolderAction | typeof FolderActionList | typeof QuickFolderAction | typeof QuickFolderActionList | typeof ContentColumn | typeof ContentColumnList)[];
+ directives: (typeof DocumentList | typeof ContentColumn | typeof ContentColumnList | typeof ContentAction | typeof ContentActionList)[];
providers: (typeof AlfrescoService | typeof FolderActionsService | typeof DocumentActionsService)[];
};
export default _default;
diff --git a/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.js b/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.js
index 05e2d886ef..e4c2d7309e 100644
--- a/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.js
+++ b/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.js
@@ -1,7 +1,7 @@
-System.register(['./src/components/document-list', './src/components/document-action', './src/components/document-action-list', './src/components/quick-document-action', './src/components/quick-document-action-list', './src/components/folder-action', './src/components/folder-action-list', './src/components/quick-folder-action', './src/components/quick-folder-action-list', './src/components/content-column', './src/components/content-column-list', './src/services/folder-actions.service', './src/services/document-actions.service', './src/services/alfresco.service'], function(exports_1, context_1) {
+System.register(['./src/components/document-list', './src/components/content-column', './src/components/content-column-list', './src/components/content-action', './src/components/content-action-list', './src/services/folder-actions.service', './src/services/document-actions.service', './src/services/alfresco.service'], function(exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
- var document_list_1, document_action_1, document_action_list_1, quick_document_action_1, quick_document_action_list_1, folder_action_1, folder_action_list_1, quick_folder_action_1, quick_folder_action_list_1, content_column_1, content_column_list_1, folder_actions_service_1, document_actions_service_1, alfresco_service_1;
+ var document_list_1, content_column_1, content_column_list_1, content_action_1, content_action_list_1, folder_actions_service_1, document_actions_service_1, alfresco_service_1;
var DOCUMENT_LIST_DIRECTIVES, DOCUMENT_LIST_PROVIDERS;
var exportedNames_1 = {
'DOCUMENT_LIST_DIRECTIVES': true,
@@ -20,38 +20,6 @@ System.register(['./src/components/document-list', './src/components/document-ac
document_list_1 = document_list_1_1;
exportStar_1(document_list_1_1);
},
- function (document_action_1_1) {
- document_action_1 = document_action_1_1;
- exportStar_1(document_action_1_1);
- },
- function (document_action_list_1_1) {
- document_action_list_1 = document_action_list_1_1;
- exportStar_1(document_action_list_1_1);
- },
- function (quick_document_action_1_1) {
- quick_document_action_1 = quick_document_action_1_1;
- exportStar_1(quick_document_action_1_1);
- },
- function (quick_document_action_list_1_1) {
- quick_document_action_list_1 = quick_document_action_list_1_1;
- exportStar_1(quick_document_action_list_1_1);
- },
- function (folder_action_1_1) {
- folder_action_1 = folder_action_1_1;
- exportStar_1(folder_action_1_1);
- },
- function (folder_action_list_1_1) {
- folder_action_list_1 = folder_action_list_1_1;
- exportStar_1(folder_action_list_1_1);
- },
- function (quick_folder_action_1_1) {
- quick_folder_action_1 = quick_folder_action_1_1;
- exportStar_1(quick_folder_action_1_1);
- },
- function (quick_folder_action_list_1_1) {
- quick_folder_action_list_1 = quick_folder_action_list_1_1;
- exportStar_1(quick_folder_action_list_1_1);
- },
function (content_column_1_1) {
content_column_1 = content_column_1_1;
exportStar_1(content_column_1_1);
@@ -60,6 +28,14 @@ System.register(['./src/components/document-list', './src/components/document-ac
content_column_list_1 = content_column_list_1_1;
exportStar_1(content_column_list_1_1);
},
+ function (content_action_1_1) {
+ content_action_1 = content_action_1_1;
+ exportStar_1(content_action_1_1);
+ },
+ function (content_action_list_1_1) {
+ content_action_list_1 = content_action_list_1_1;
+ exportStar_1(content_action_list_1_1);
+ },
function (folder_actions_service_1_1) {
folder_actions_service_1 = folder_actions_service_1_1;
exportStar_1(folder_actions_service_1_1);
@@ -76,16 +52,10 @@ System.register(['./src/components/document-list', './src/components/document-ac
exports_1("default",{
directives: [
document_list_1.DocumentList,
- document_action_1.DocumentAction,
- document_action_list_1.DocumentActionList,
- quick_document_action_1.QuickDocumentAction,
- quick_document_action_list_1.QuickDocumentActionList,
- folder_action_1.FolderAction,
- folder_action_list_1.FolderActionList,
- quick_folder_action_1.QuickFolderAction,
- quick_folder_action_list_1.QuickFolderActionList,
content_column_1.ContentColumn,
- content_column_list_1.ContentColumnList
+ content_column_list_1.ContentColumnList,
+ content_action_1.ContentAction,
+ content_action_list_1.ContentActionList
],
providers: [
alfresco_service_1.AlfrescoService,
@@ -95,16 +65,10 @@ System.register(['./src/components/document-list', './src/components/document-ac
});
exports_1("DOCUMENT_LIST_DIRECTIVES", DOCUMENT_LIST_DIRECTIVES = [
document_list_1.DocumentList,
- document_action_1.DocumentAction,
- document_action_list_1.DocumentActionList,
- quick_document_action_1.QuickDocumentAction,
- quick_document_action_list_1.QuickDocumentActionList,
- folder_action_1.FolderAction,
- folder_action_list_1.FolderActionList,
- quick_folder_action_1.QuickFolderAction,
- quick_folder_action_list_1.QuickFolderActionList,
content_column_1.ContentColumn,
- content_column_list_1.ContentColumnList
+ content_column_list_1.ContentColumnList,
+ content_action_1.ContentAction,
+ content_action_list_1.ContentActionList
]);
exports_1("DOCUMENT_LIST_PROVIDERS", DOCUMENT_LIST_PROVIDERS = [
alfresco_service_1.AlfrescoService,
diff --git a/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.js.map b/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.js.map
index 6d4ef69ba8..30dd8f10e1 100644
--- a/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.js.map
+++ b/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.js.map
@@ -1 +1 @@
-{"version":3,"file":"ng2-alfresco-documentlist.js","sourceRoot":"","sources":["ng2-alfresco-documentlist.ts"],"names":[],"mappings":";;;;QAsDa,wBAAwB,EAcxB,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAnCpC,oBAAe;gBACX,UAAU,EAAE;oBACR,4BAAY;oBACZ,gCAAc;oBACd,yCAAkB;oBAClB,2CAAmB;oBACnB,oDAAuB;oBACvB,4BAAY;oBACZ,qCAAgB;oBAChB,uCAAiB;oBACjB,gDAAqB;oBACrB,8BAAa;oBACb,uCAAiB;iBACpB;gBACD,SAAS,EAAE;oBACP,kCAAe;oBACf,6CAAoB;oBACpB,iDAAsB;iBACzB;aACJ,EAAA;YAEY,sCAAA,wBAAwB,GAAU;gBAC3C,4BAAY;gBACZ,gCAAc;gBACd,yCAAkB;gBAClB,2CAAmB;gBACnB,oDAAuB;gBACvB,4BAAY;gBACZ,qCAAgB;gBAChB,uCAAiB;gBACjB,gDAAqB;gBACrB,8BAAa;gBACb,uCAAiB;aACpB,CAAA,CAAC;YAEW,qCAAA,uBAAuB,GAAU;gBAC1C,kCAAe;gBACf,6CAAoB;gBACpB,iDAAsB;aACzB,CAAA,CAAC"}
\ No newline at end of file
+{"version":3,"file":"ng2-alfresco-documentlist.js","sourceRoot":"","sources":["ng2-alfresco-documentlist.ts"],"names":[],"mappings":";;;;QAqCa,wBAAwB,EAQxB,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAvBpC,oBAAe;gBACX,UAAU,EAAE;oBACR,4BAAY;oBACZ,8BAAa;oBACb,uCAAiB;oBACjB,8BAAa;oBACb,uCAAiB;iBACpB;gBACD,SAAS,EAAE;oBACP,kCAAe;oBACf,6CAAoB;oBACpB,iDAAsB;iBACzB;aACJ,EAAA;YAEY,sCAAA,wBAAwB,GAAU;gBAC3C,4BAAY;gBACZ,8BAAa;gBACb,uCAAiB;gBACjB,8BAAa;gBACb,uCAAiB;aACpB,CAAA,CAAC;YAEW,qCAAA,uBAAuB,GAAU;gBAC1C,kCAAe;gBACf,6CAAoB;gBACpB,iDAAsB;aACzB,CAAA,CAAC"}
\ No newline at end of file
diff --git a/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.ts b/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.ts
index 4d7a8d2ac9..e6beb28e36 100644
--- a/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.ts
+++ b/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.ts
@@ -1,14 +1,8 @@
import {DocumentList} from './src/components/document-list';
-import {DocumentAction} from './src/components/document-action';
-import {DocumentActionList} from './src/components/document-action-list';
-import {QuickDocumentAction} from './src/components/quick-document-action';
-import {QuickDocumentActionList} from './src/components/quick-document-action-list';
-import {FolderAction} from './src/components/folder-action';
-import {FolderActionList} from './src/components/folder-action-list';
-import {QuickFolderAction} from './src/components/quick-folder-action';
-import {QuickFolderActionList} from './src/components/quick-folder-action-list';
import {ContentColumn} from './src/components/content-column';
import {ContentColumnList} from './src/components/content-column-list';
+import {ContentAction} from './src/components/content-action';
+import {ContentActionList} from './src/components/content-action-list';
import {FolderActionsService} from './src/services/folder-actions.service';
import {DocumentActionsService} from './src/services/document-actions.service';
@@ -16,16 +10,11 @@ import {AlfrescoService} from './src/services/alfresco.service';
// components
export * from './src/components/document-list';
-export * from './src/components/document-action';
-export * from './src/components/document-action-list';
-export * from './src/components/quick-document-action';
-export * from './src/components/quick-document-action-list';
-export * from './src/components/folder-action';
-export * from './src/components/folder-action-list';
-export * from './src/components/quick-folder-action'
-export * from './src/components/quick-folder-action-list';
export * from './src/components/content-column';
export * from './src/components/content-column-list';
+export * from './src/components/content-action';
+export * from './src/components/content-action-list';
+
// services
export * from './src/services/folder-actions.service';
export * from './src/services/document-actions.service';
@@ -34,16 +23,10 @@ export * from './src/services/alfresco.service';
export default {
directives: [
DocumentList,
- DocumentAction,
- DocumentActionList,
- QuickDocumentAction,
- QuickDocumentActionList,
- FolderAction,
- FolderActionList,
- QuickFolderAction,
- QuickFolderActionList,
ContentColumn,
- ContentColumnList
+ ContentColumnList,
+ ContentAction,
+ ContentActionList
],
providers: [
AlfrescoService,
@@ -54,16 +37,10 @@ export default {
export const DOCUMENT_LIST_DIRECTIVES: [any] = [
DocumentList,
- DocumentAction,
- DocumentActionList,
- QuickDocumentAction,
- QuickDocumentActionList,
- FolderAction,
- FolderActionList,
- QuickFolderAction,
- QuickFolderActionList,
ContentColumn,
- ContentColumnList
+ ContentColumnList,
+ ContentAction,
+ ContentActionList
];
export const DOCUMENT_LIST_PROVIDERS: [any] = [
diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/folder-action-list.d.ts b/ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.d.ts
similarity index 85%
rename from ng2-components/ng2-alfresco-documentlist/src/components/folder-action-list.d.ts
rename to ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.d.ts
index dee8c35a38..1702e2bef4 100644
--- a/ng2-components/ng2-alfresco-documentlist/src/components/folder-action-list.d.ts
+++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.d.ts
@@ -1,6 +1,6 @@
import { DocumentList } from './document-list';
import { ContentActionModel } from './../models/content-action.model';
-export declare class FolderActionList {
+export declare class ContentActionList {
private documentList;
constructor(documentList: DocumentList);
registerAction(action: ContentActionModel): void;
diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/folder-action-list.js b/ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.js
similarity index 80%
rename from ng2-components/ng2-alfresco-documentlist/src/components/folder-action-list.js
rename to ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.js
index 70eb1cc241..2d782a4a00 100644
--- a/ng2-components/ng2-alfresco-documentlist/src/components/folder-action-list.js
+++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.js
@@ -27,7 +27,7 @@ System.register(['angular2/core', './document-list'], function(exports_1, contex
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1, document_list_1;
- var FolderActionList;
+ var ContentActionList;
return {
setters:[
function (core_1_1) {
@@ -37,28 +37,28 @@ System.register(['angular2/core', './document-list'], function(exports_1, contex
document_list_1 = document_list_1_1;
}],
execute: function() {
- FolderActionList = (function () {
- function FolderActionList(documentList) {
+ ContentActionList = (function () {
+ function ContentActionList(documentList) {
this.documentList = documentList;
// saves reference to parent container
// so that content children can access it
}
- FolderActionList.prototype.registerAction = function (action) {
+ ContentActionList.prototype.registerAction = function (action) {
if (action) {
- this.documentList.folderActions.push(action);
+ this.documentList.actions.push(action);
}
};
- FolderActionList = __decorate([
+ ContentActionList = __decorate([
core_1.Component({
- selector: 'folder-actions',
+ selector: 'content-actions',
template: ''
}),
__metadata('design:paramtypes', [document_list_1.DocumentList])
- ], FolderActionList);
- return FolderActionList;
+ ], ContentActionList);
+ return ContentActionList;
}());
- exports_1("FolderActionList", FolderActionList);
+ exports_1("ContentActionList", ContentActionList);
}
}
});
-//# sourceMappingURL=folder-action-list.js.map
\ No newline at end of file
+//# sourceMappingURL=content-action-list.js.map
\ No newline at end of file
diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.js.map b/ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.js.map
new file mode 100644
index 0000000000..3fda05607d
--- /dev/null
+++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"content-action-list.js","sourceRoot":"","sources":["content-action-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBACI,2BAAoB,YAA0B;oBAA1B,iBAAY,GAAZ,YAAY,CAAc;oBAC1C,sCAAsC;oBACtC,yCAAyC;gBAC7C,CAAC;gBAED,0CAAc,GAAd,UAAe,MAA0B;oBACrC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;wBACT,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBAC3C,CAAC;gBACL,CAAC;gBAdL;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,iBAAiB;wBAC3B,QAAQ,EAAE,EAAE;qBACf,CAAC;;qCAAA;gBAYF,wBAAC;YAAD,CAAC,AAXD,IAWC;YAXD,iDAWC,CAAA"}
\ No newline at end of file
diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/folder-action-list.ts b/ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.ts
similarity index 89%
rename from ng2-components/ng2-alfresco-documentlist/src/components/folder-action-list.ts
rename to ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.ts
index 58e075c1e6..6db6571894 100644
--- a/ng2-components/ng2-alfresco-documentlist/src/components/folder-action-list.ts
+++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-action-list.ts
@@ -20,10 +20,10 @@ import {DocumentList} from './document-list';
import {ContentActionModel} from './../models/content-action.model';
@Component({
- selector: 'folder-actions',
+ selector: 'content-actions',
template: ''
})
-export class FolderActionList {
+export class ContentActionList {
constructor(private documentList: DocumentList) {
// saves reference to parent container
// so that content children can access it
@@ -31,7 +31,7 @@ export class FolderActionList {
registerAction(action: ContentActionModel) {
if (action) {
- this.documentList.folderActions.push(action);
+ this.documentList.actions.push(action);
}
}
}
diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/quick-document-action.d.ts b/ng2-components/ng2-alfresco-documentlist/src/components/content-action.d.ts
similarity index 68%
rename from ng2-components/ng2-alfresco-documentlist/src/components/quick-document-action.d.ts
rename to ng2-components/ng2-alfresco-documentlist/src/components/content-action.d.ts
index 5499e2957e..471fd24868 100644
--- a/ng2-components/ng2-alfresco-documentlist/src/components/quick-document-action.d.ts
+++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-action.d.ts
@@ -15,15 +15,20 @@
* limitations under the License.
*/
import { OnInit, EventEmitter } from 'angular2/core';
-import { QuickDocumentActionList } from './quick-document-action-list';
+import { ContentActionList } from './content-action-list';
import { DocumentActionsService } from '../services/document-actions.service';
-export declare class QuickDocumentAction implements OnInit {
+import { FolderActionsService } from '../services/folder-actions.service';
+export declare class ContentAction implements OnInit {
private list;
private documentActions;
- icon: string;
+ private folderActions;
title: string;
+ icon: string;
handler: string;
+ type: string;
+ target: string;
execute: EventEmitter<{}>;
- constructor(list: QuickDocumentActionList, documentActions: DocumentActionsService);
+ constructor(list: ContentActionList, documentActions: DocumentActionsService, folderActions: FolderActionsService);
ngOnInit(): void;
+ private getSystemHandler(target, name);
}
diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/quick-document-action.js b/ng2-components/ng2-alfresco-documentlist/src/components/content-action.js
similarity index 55%
rename from ng2-components/ng2-alfresco-documentlist/src/components/quick-document-action.js
rename to ng2-components/ng2-alfresco-documentlist/src/components/content-action.js
index 88407767f2..ae5f4cd340 100644
--- a/ng2-components/ng2-alfresco-documentlist/src/components/quick-document-action.js
+++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-action.js
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-System.register(['angular2/core', '../models/content-action.model', './quick-document-action-list', '../services/document-actions.service'], function(exports_1, context_1) {
+System.register(['angular2/core', './../models/content-action.model', './content-action-list', '../services/document-actions.service', '../services/folder-actions.service'], function(exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
@@ -26,8 +26,8 @@ System.register(['angular2/core', '../models/content-action.model', './quick-doc
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
- var core_1, content_action_model_1, quick_document_action_list_1, document_actions_service_1;
- var QuickDocumentAction;
+ var core_1, content_action_model_1, content_action_list_1, document_actions_service_1, folder_actions_service_1;
+ var ContentAction;
return {
setters:[
function (core_1_1) {
@@ -36,26 +36,33 @@ System.register(['angular2/core', '../models/content-action.model', './quick-doc
function (content_action_model_1_1) {
content_action_model_1 = content_action_model_1_1;
},
- function (quick_document_action_list_1_1) {
- quick_document_action_list_1 = quick_document_action_list_1_1;
+ function (content_action_list_1_1) {
+ content_action_list_1 = content_action_list_1_1;
},
function (document_actions_service_1_1) {
document_actions_service_1 = document_actions_service_1_1;
+ },
+ function (folder_actions_service_1_1) {
+ folder_actions_service_1 = folder_actions_service_1_1;
}],
execute: function() {
- QuickDocumentAction = (function () {
- function QuickDocumentAction(list, documentActions) {
+ ContentAction = (function () {
+ function ContentAction(list, documentActions, folderActions) {
this.list = list;
this.documentActions = documentActions;
+ this.folderActions = folderActions;
+ this.title = 'Action';
this.execute = new core_1.EventEmitter();
}
- QuickDocumentAction.prototype.ngOnInit = function () {
+ ContentAction.prototype.ngOnInit = function () {
var _this = this;
var model = new content_action_model_1.ContentActionModel();
- model.icon = this.icon;
+ model.type = this.type;
model.title = this.title;
+ model.icon = this.icon;
+ model.target = this.target;
if (this.handler) {
- model.handler = this.documentActions.getHandler(this.handler);
+ model.handler = this.getSystemHandler(this.target, this.handler);
}
else if (this.execute) {
model.handler = function (document) {
@@ -66,33 +73,53 @@ System.register(['angular2/core', '../models/content-action.model', './quick-doc
}
this.list.registerAction(model);
};
+ ContentAction.prototype.getSystemHandler = function (target, name) {
+ if (target) {
+ var ltarget = target.toLowerCase();
+ if (ltarget === 'document') {
+ return this.documentActions.getHandler(name);
+ }
+ if (ltarget === 'folder') {
+ return this.folderActions.getHandler(name);
+ }
+ }
+ return null;
+ };
__decorate([
core_1.Input(),
__metadata('design:type', String)
- ], QuickDocumentAction.prototype, "icon", void 0);
+ ], ContentAction.prototype, "title", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', String)
- ], QuickDocumentAction.prototype, "title", void 0);
+ ], ContentAction.prototype, "icon", void 0);
__decorate([
core_1.Input(),
__metadata('design:type', String)
- ], QuickDocumentAction.prototype, "handler", void 0);
+ ], ContentAction.prototype, "handler", void 0);
+ __decorate([
+ core_1.Input(),
+ __metadata('design:type', String)
+ ], ContentAction.prototype, "type", void 0);
+ __decorate([
+ core_1.Input(),
+ __metadata('design:type', String)
+ ], ContentAction.prototype, "target", void 0);
__decorate([
core_1.Output(),
__metadata('design:type', Object)
- ], QuickDocumentAction.prototype, "execute", void 0);
- QuickDocumentAction = __decorate([
+ ], ContentAction.prototype, "execute", void 0);
+ ContentAction = __decorate([
core_1.Component({
- selector: 'quick-document-action',
+ selector: 'content-action',
template: ''
}),
- __metadata('design:paramtypes', [quick_document_action_list_1.QuickDocumentActionList, document_actions_service_1.DocumentActionsService])
- ], QuickDocumentAction);
- return QuickDocumentAction;
+ __metadata('design:paramtypes', [content_action_list_1.ContentActionList, document_actions_service_1.DocumentActionsService, folder_actions_service_1.FolderActionsService])
+ ], ContentAction);
+ return ContentAction;
}());
- exports_1("QuickDocumentAction", QuickDocumentAction);
+ exports_1("ContentAction", ContentAction);
}
}
});
-//# sourceMappingURL=quick-document-action.js.map
\ No newline at end of file
+//# sourceMappingURL=content-action.js.map
\ No newline at end of file
diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/content-action.js.map b/ng2-components/ng2-alfresco-documentlist/src/components/content-action.js.map
new file mode 100644
index 0000000000..63be1348a9
--- /dev/null
+++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-action.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"content-action.js","sourceRoot":"","sources":["content-action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAYH;gBAQI,uBACY,IAAuB,EACvB,eAAuC,EACvC,aAAmC;oBAFnC,SAAI,GAAJ,IAAI,CAAmB;oBACvB,oBAAe,GAAf,eAAe,CAAwB;oBACvC,kBAAa,GAAb,aAAa,CAAsB;oBAVtC,UAAK,GAAW,QAAQ,CAAC;oBAKxB,YAAO,GAAG,IAAI,mBAAY,EAAE,CAAC;gBAMvC,CAAC;gBAED,gCAAQ,GAAR;oBAAA,iBAkBC;oBAjBG,IAAI,KAAK,GAAG,IAAI,yCAAkB,EAAE,CAAC;oBACrC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;oBACvB,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;oBACzB,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;oBACvB,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;oBAE3B,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;wBACf,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;oBACrE,CAAC;oBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;wBACtB,KAAK,CAAC,OAAO,GAAG,UAAC,QAAa;4BAC1B,KAAI,CAAC,OAAO,CAAC,IAAI,CAAC;gCACd,KAAK,EAAE,QAAQ;6BAClB,CAAC,CAAC;wBACP,CAAC,CAAC;oBACN,CAAC;oBAED,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;gBACpC,CAAC;gBAEO,wCAAgB,GAAxB,UAAyB,MAAc,EAAE,IAAY;oBACjD,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;wBACT,IAAI,OAAO,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;wBAEnC,EAAE,CAAC,CAAC,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC;4BACzB,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;wBACjD,CAAC;wBAED,EAAE,CAAC,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC;4BACvB,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;wBAC/C,CAAC;oBACL,CAAC;oBACD,MAAM,CAAC,IAAI,CAAC;gBAChB,CAAC;gBA9CD;oBAAC,YAAK,EAAE;;4DAAA;gBACR;oBAAC,YAAK,EAAE;;2DAAA;gBACR;oBAAC,YAAK,EAAE;;8DAAA;gBACR;oBAAC,YAAK,EAAE;;2DAAA;gBACR;oBAAC,YAAK,EAAE;;6DAAA;gBACR;oBAAC,aAAM,EAAE;;8DAAA;gBAVb;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,gBAAgB;wBAC1B,QAAQ,EAAE,EAAE;qBACf,CAAC;;iCAAA;gBAiDF,oBAAC;YAAD,CAAC,AAhDD,IAgDC;YAhDD,yCAgDC,CAAA"}
\ No newline at end of file
diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/folder-action.ts b/ng2-components/ng2-alfresco-documentlist/src/components/content-action.ts
similarity index 59%
rename from ng2-components/ng2-alfresco-documentlist/src/components/folder-action.ts
rename to ng2-components/ng2-alfresco-documentlist/src/components/content-action.ts
index 990e414374..efe2c873b3 100644
--- a/ng2-components/ng2-alfresco-documentlist/src/components/folder-action.ts
+++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-action.ts
@@ -17,29 +17,37 @@
import {Component, OnInit, Input, Output, EventEmitter} from 'angular2/core';
import {ContentActionModel} from './../models/content-action.model';
-import {FolderActionList} from './folder-action-list';
+import {ContentActionList} from './content-action-list';
+import {DocumentActionsService} from '../services/document-actions.service';
import {FolderActionsService} from '../services/folder-actions.service';
@Component({
- selector: 'folder-action',
+ selector: 'content-action',
template: ''
})
-export class FolderAction implements OnInit {
+export class ContentAction implements OnInit {
@Input() title: string = 'Action';
+ @Input() icon: string;
@Input() handler: string;
+ @Input() type: string;
+ @Input() target: string;
@Output() execute = new EventEmitter();
constructor(
- private list: FolderActionList,
+ private list: ContentActionList,
+ private documentActions: DocumentActionsService,
private folderActions: FolderActionsService) {
}
ngOnInit() {
let model = new ContentActionModel();
+ model.type = this.type;
model.title = this.title;
+ model.icon = this.icon;
+ model.target = this.target;
if (this.handler) {
- model.handler = this.folderActions.getHandler(this.handler);
+ model.handler = this.getSystemHandler(this.target, this.handler);
} else if (this.execute) {
model.handler = (document: any): void => {
this.execute.emit({
@@ -50,4 +58,19 @@ export class FolderAction implements OnInit {
this.list.registerAction(model);
}
+
+ private getSystemHandler(target: string, name: string) {
+ if (target) {
+ let ltarget = target.toLowerCase();
+
+ if (ltarget === 'document') {
+ return this.documentActions.getHandler(name);
+ }
+
+ if (ltarget === 'folder') {
+ return this.folderActions.getHandler(name);
+ }
+ }
+ return null;
+ }
}
diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.d.ts b/ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.d.ts
deleted file mode 100644
index 5cebcf751e..0000000000
--- a/ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { DocumentList } from './document-list';
-import { ContentActionModel } from './../models/content-action.model';
-export declare class DocumentActionList {
- private documentList;
- constructor(documentList: DocumentList);
- registerAction(action: ContentActionModel): void;
-}
diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.js b/ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.js
deleted file mode 100644
index 3932d9f646..0000000000
--- a/ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * @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.
- */
-System.register(['angular2/core', './document-list'], function(exports_1, context_1) {
- "use strict";
- var __moduleName = context_1 && context_1.id;
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
- };
- var __metadata = (this && this.__metadata) || function (k, v) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
- };
- var core_1, document_list_1;
- var DocumentActionList;
- return {
- setters:[
- function (core_1_1) {
- core_1 = core_1_1;
- },
- function (document_list_1_1) {
- document_list_1 = document_list_1_1;
- }],
- execute: function() {
- DocumentActionList = (function () {
- function DocumentActionList(documentList) {
- this.documentList = documentList;
- // saves reference to parent container
- // so that content children can access it
- }
- DocumentActionList.prototype.registerAction = function (action) {
- if (action) {
- this.documentList.documentActions.push(action);
- }
- };
- DocumentActionList = __decorate([
- core_1.Component({
- selector: 'document-actions',
- template: ''
- }),
- __metadata('design:paramtypes', [document_list_1.DocumentList])
- ], DocumentActionList);
- return DocumentActionList;
- }());
- exports_1("DocumentActionList", DocumentActionList);
- }
- }
-});
-//# sourceMappingURL=document-action-list.js.map
\ No newline at end of file
diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.js.map b/ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.js.map
deleted file mode 100644
index b775ca0a95..0000000000
--- a/ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"document-action-list.js","sourceRoot":"","sources":["document-action-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBACI,4BAAoB,YAA0B;oBAA1B,iBAAY,GAAZ,YAAY,CAAc;oBAC1C,sCAAsC;oBACtC,yCAAyC;gBAC7C,CAAC;gBAED,2CAAc,GAAd,UAAe,MAA0B;oBACrC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;wBACT,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBACnD,CAAC;gBACL,CAAC;gBAdL;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,kBAAkB;wBAC5B,QAAQ,EAAE,EAAE;qBACf,CAAC;;sCAAA;gBAYF,yBAAC;YAAD,CAAC,AAXD,IAWC;YAXD,mDAWC,CAAA"}
\ No newline at end of file
diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.ts b/ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.ts
deleted file mode 100644
index 9622460ae9..0000000000
--- a/ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * @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} from 'angular2/core';
-import {DocumentList} from './document-list';
-import {ContentActionModel} from './../models/content-action.model';
-
-@Component({
- selector: 'document-actions',
- template: ''
-})
-export class DocumentActionList {
- constructor(private documentList: DocumentList) {
- // saves reference to parent container
- // so that content children can access it
- }
-
- registerAction(action: ContentActionModel) {
- if (action) {
- this.documentList.documentActions.push(action);
- }
- }
-}
diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-action.d.ts b/ng2-components/ng2-alfresco-documentlist/src/components/document-action.d.ts
deleted file mode 100644
index 8e5731bfbc..0000000000
--- a/ng2-components/ng2-alfresco-documentlist/src/components/document-action.d.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * @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 { OnInit, EventEmitter } from 'angular2/core';
-import { DocumentActionList } from './document-action-list';
-import { DocumentActionsService } from '../services/document-actions.service';
-export declare class DocumentAction implements OnInit {
- private list;
- private documentActions;
- title: string;
- handler: string;
- execute: EventEmitter<{}>;
- constructor(list: DocumentActionList, documentActions: DocumentActionsService);
- ngOnInit(): void;
-}
diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-action.js b/ng2-components/ng2-alfresco-documentlist/src/components/document-action.js
deleted file mode 100644
index 2902643ac0..0000000000
--- a/ng2-components/ng2-alfresco-documentlist/src/components/document-action.js
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * @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.
- */
-System.register(['angular2/core', './../models/content-action.model', './document-action-list', '../services/document-actions.service'], function(exports_1, context_1) {
- "use strict";
- var __moduleName = context_1 && context_1.id;
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
- return c > 3 && r && Object.defineProperty(target, key, r), r;
- };
- var __metadata = (this && this.__metadata) || function (k, v) {
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
- };
- var core_1, content_action_model_1, document_action_list_1, document_actions_service_1;
- var DocumentAction;
- return {
- setters:[
- function (core_1_1) {
- core_1 = core_1_1;
- },
- function (content_action_model_1_1) {
- content_action_model_1 = content_action_model_1_1;
- },
- function (document_action_list_1_1) {
- document_action_list_1 = document_action_list_1_1;
- },
- function (document_actions_service_1_1) {
- document_actions_service_1 = document_actions_service_1_1;
- }],
- execute: function() {
- DocumentAction = (function () {
- function DocumentAction(list, documentActions) {
- this.list = list;
- this.documentActions = documentActions;
- this.title = 'Action';
- this.execute = new core_1.EventEmitter();
- }
- DocumentAction.prototype.ngOnInit = function () {
- var _this = this;
- var model = new content_action_model_1.ContentActionModel();
- model.title = this.title;
- if (this.handler) {
- model.handler = this.documentActions.getHandler(this.handler);
- }
- else if (this.execute) {
- model.handler = function (document) {
- _this.execute.emit({
- value: document
- });
- };
- }
- this.list.registerAction(model);
- };
- __decorate([
- core_1.Input(),
- __metadata('design:type', String)
- ], DocumentAction.prototype, "title", void 0);
- __decorate([
- core_1.Input(),
- __metadata('design:type', String)
- ], DocumentAction.prototype, "handler", void 0);
- __decorate([
- core_1.Output(),
- __metadata('design:type', Object)
- ], DocumentAction.prototype, "execute", void 0);
- DocumentAction = __decorate([
- core_1.Component({
- selector: 'document-action',
- template: ''
- }),
- __metadata('design:paramtypes', [document_action_list_1.DocumentActionList, document_actions_service_1.DocumentActionsService])
- ], DocumentAction);
- return DocumentAction;
- }());
- exports_1("DocumentAction", DocumentAction);
- }
- }
-});
-//# sourceMappingURL=document-action.js.map
\ No newline at end of file
diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-action.js.map b/ng2-components/ng2-alfresco-documentlist/src/components/document-action.js.map
deleted file mode 100644
index c06ac87af8..0000000000
--- a/ng2-components/ng2-alfresco-documentlist/src/components/document-action.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"document-action.js","sourceRoot":"","sources":["document-action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAWH;gBAKI,wBACY,IAAwB,EACxB,eAAuC;oBADvC,SAAI,GAAJ,IAAI,CAAoB;oBACxB,oBAAe,GAAf,eAAe,CAAwB;oBAN1C,UAAK,GAAW,QAAQ,CAAC;oBAExB,YAAO,GAAG,IAAI,mBAAY,EAAE,CAAC;gBAKvC,CAAC;gBAED,iCAAQ,GAAR;oBAAA,iBAeC;oBAdG,IAAI,KAAK,GAAG,IAAI,yCAAkB,EAAE,CAAC;oBACrC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;oBAEzB,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;wBACf,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBAClE,CAAC;oBAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;wBACtB,KAAK,CAAC,OAAO,GAAG,UAAC,QAAa;4BAC1B,KAAI,CAAC,OAAO,CAAC,IAAI,CAAC;gCACd,KAAK,EAAE,QAAQ;6BAClB,CAAC,CAAC;wBACP,CAAC,CAAC;oBACN,CAAC;oBAED,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;gBACpC,CAAC;gBAxBD;oBAAC,YAAK,EAAE;;6DAAA;gBACR;oBAAC,YAAK,EAAE;;+DAAA;gBACR;oBAAC,aAAM,EAAE;;+DAAA;gBAPb;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,iBAAiB;wBAC3B,QAAQ,EAAE,EAAE;qBACf,CAAC;;kCAAA;gBA2BF,qBAAC;YAAD,CAAC,AA1BD,IA0BC;YA1BD,2CA0BC,CAAA"}
\ No newline at end of file
diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-action.ts b/ng2-components/ng2-alfresco-documentlist/src/components/document-action.ts
deleted file mode 100644
index bafe47d88f..0000000000
--- a/ng2-components/ng2-alfresco-documentlist/src/components/document-action.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * @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, OnInit, Input, Output, EventEmitter} from 'angular2/core';
-import {ContentActionModel} from './../models/content-action.model';
-import {DocumentActionList} from './document-action-list';
-import {DocumentActionsService} from '../services/document-actions.service';
-
-@Component({
- selector: 'document-action',
- template: ''
-})
-export class DocumentAction implements OnInit {
- @Input() title: string = 'Action';
- @Input() handler: string;
- @Output() execute = new EventEmitter();
-
- constructor(
- private list: DocumentActionList,
- private documentActions: DocumentActionsService) {
- }
-
- ngOnInit() {
- let model = new ContentActionModel();
- model.title = this.title;
-
- if (this.handler) {
- model.handler = this.documentActions.getHandler(this.handler);
- } else if (this.execute) {
- model.handler = (document: any): void => {
- this.execute.emit({
- value: document
- });
- };
- }
-
- this.list.registerAction(model);
- }
-}
diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.d.ts b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.d.ts
index 47b2d5fdbb..3229eb4726 100644
--- a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.d.ts
+++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.d.ts
@@ -35,21 +35,18 @@ export declare class DocumentList implements OnInit, AfterViewChecked {
folder: FolderEntity;
errorMessage: any;
route: any[];
- documentActions: ContentActionModel[];
- quickDocumentActions: ContentActionModel[];
- folderActions: ContentActionModel[];
- quickFolderActions: ContentActionModel[];
+ actions: ContentActionModel[];
columns: ContentColumnModel[];
canNavigateParent(): boolean;
constructor(_alfrescoService: AlfrescoService);
ngOnInit(): void;
ngAfterViewChecked(): void;
+ getContentActions(target: string, type: string): ContentActionModel[];
onNavigateParentClick($event: any): void;
onItemClick(item: DocumentEntity, $event: any): void;
goToRoute(r: any, $event: any): void;
getContentUrl(document: DocumentEntity): string;
getDocumentThumbnailUrl(document: DocumentEntity): string;
- registerDocumentAction(action: ContentActionModel): void;
executeContentAction(document: DocumentEntity, action: ContentActionModel): void;
private getItemPath(item);
private displayFolderContent(path);
diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.html b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.html
index d2780dd7b0..cc5f3cfef4 100644
--- a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.html
+++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.html
@@ -62,11 +62,11 @@
{{content[col.source]}}
-
+
-
+
@@ -78,17 +78,17 @@
|
-
+
-
+
@@ -100,7 +100,7 @@
|