mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
@@ -39,22 +39,20 @@
|
||||
<content-column title="Created By" source="createdBy"></content-column>
|
||||
<content-column title="Created On" source="createdOn"></content-column>
|
||||
</content-columns>
|
||||
<quick-folder-actions>
|
||||
<quick-folder-action icon="delete" title="Delete" handler="system1"></quick-folder-action>
|
||||
</quick-folder-actions>
|
||||
<folder-actions>
|
||||
<folder-action title="Default folder action 1" handler="system1"></folder-action>
|
||||
<folder-action title="Custom folder action" (execute)="myFolderAction1($event)"></folder-action>
|
||||
</folder-actions>
|
||||
<quick-document-actions>
|
||||
<quick-document-action icon="account_circle" handler="my-handler"></quick-document-action>
|
||||
<quick-document-action icon="cloud_download" handler="download"></quick-document-action>
|
||||
</quick-document-actions>
|
||||
<document-actions>
|
||||
<document-action title="Download" handler="DOWNLOAD"></document-action>
|
||||
<document-action title="System action" handler="system2"></document-action>
|
||||
<document-action title="Custom action" (execute)="myCustomAction1($event)"></document-action>
|
||||
</document-actions>
|
||||
|
||||
<content-actions>
|
||||
<!-- folder actions -->
|
||||
<content-action target="folder" type="button" icon="delete" title="Delete" handler="system1"></content-action>
|
||||
<content-action target="folder" type="menu" title="Default folder action 1" handler="system1"></content-action>
|
||||
<content-action target="folder" type="menu" title="Custom folder action" (execute)="myFolderAction1($event)"></content-action>
|
||||
|
||||
<!-- document actions -->
|
||||
<content-action target="document" type="button" icon="account_circle" handler="my-handler"></content-action>
|
||||
<content-action target="document" type="button" icon="cloud_download" handler="download"></content-action>
|
||||
<content-action target="document" type="menu" title="Download" handler="download"></content-action>
|
||||
<content-action target="document" type="menu" title="System action" handler="system2"></content-action>
|
||||
<content-action target="document" type="menu" title="Custom action" (execute)="myCustomAction1($event)"></content-action>
|
||||
</content-actions>
|
||||
</alfresco-document-list>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -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;
|
||||
|
@@ -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,
|
||||
|
@@ -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"}
|
||||
{"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"}
|
@@ -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] = [
|
||||
|
@@ -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;
|
@@ -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
|
||||
//# sourceMappingURL=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"}
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
@@ -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);
|
||||
}
|
@@ -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
|
||||
//# sourceMappingURL=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,eA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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"}
|
@@ -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;
|
||||
}
|
||||
}
|
@@ -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;
|
||||
}
|
@@ -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
|
@@ -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"}
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
@@ -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;
|
||||
}
|
@@ -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
|
@@ -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"}
|
@@ -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);
|
||||
}
|
||||
}
|
@@ -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);
|
||||
|
@@ -62,11 +62,11 @@
|
||||
{{content[col.source]}}
|
||||
</td>
|
||||
|
||||
<!-- Actions: Folder cell template -->
|
||||
<!-- Actions: folder -->
|
||||
<td *ngIf="content.isFolder">
|
||||
<!-- quick action buttons -->
|
||||
<!-- action buttons -->
|
||||
<button class="mdl-button mdl-js-button mdl-button--icon"
|
||||
*ngFor="#action of quickFolderActions"
|
||||
*ngFor="#action of getContentActions('folder', 'button')"
|
||||
(click)="executeContentAction(content, action)">
|
||||
<i class="material-icons">{{action.icon}}</i>
|
||||
</button>
|
||||
@@ -78,17 +78,17 @@
|
||||
<ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect"
|
||||
[attr.for]="'folder_action_menu_' + idx">
|
||||
<li class="mdl-menu__item"
|
||||
*ngFor="#action of folderActions"
|
||||
*ngFor="#action of getContentActions('folder', 'menu')"
|
||||
(click)="executeContentAction(content, action)">
|
||||
{{action.title}}
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
<!-- Actions: Document cell template -->
|
||||
<!-- Actions: document -->
|
||||
<td *ngIf="!content.isFolder">
|
||||
<!-- quick action buttons -->
|
||||
<!-- action buttons -->
|
||||
<button class="mdl-button mdl-js-button mdl-button--icon"
|
||||
*ngFor="#action of quickDocumentActions"
|
||||
*ngFor="#action of getContentActions('document', 'button')"
|
||||
(click)="executeContentAction(content, action)">
|
||||
<i class="material-icons">{{action.icon}}</i>
|
||||
</button>
|
||||
@@ -100,7 +100,7 @@
|
||||
<ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect"
|
||||
[attr.for]="'document_action_menu_' + idx">
|
||||
<li class="mdl-menu__item"
|
||||
*ngFor="#action of documentActions"
|
||||
*ngFor="#action of getContentActions('document', 'menu')"
|
||||
(click)="executeContentAction(content, action)">
|
||||
{{action.title}}
|
||||
</li>
|
||||
|
@@ -50,10 +50,7 @@ System.register(['angular2/core', './../services/alfresco.service'], function(ex
|
||||
};
|
||||
this.currentFolderPath = 'swsdp/documentLibrary';
|
||||
this.route = [];
|
||||
this.documentActions = [];
|
||||
this.quickDocumentActions = [];
|
||||
this.folderActions = [];
|
||||
this.quickFolderActions = [];
|
||||
this.actions = [];
|
||||
this.columns = [];
|
||||
}
|
||||
DocumentList.prototype.canNavigateParent = function () {
|
||||
@@ -71,6 +68,17 @@ System.register(['angular2/core', './../services/alfresco.service'], function(ex
|
||||
componentHandler.upgradeAllRegistered();
|
||||
}
|
||||
};
|
||||
DocumentList.prototype.getContentActions = function (target, type) {
|
||||
if (target && type) {
|
||||
var ltarget_1 = target.toLowerCase();
|
||||
var ltype_1 = type.toLowerCase();
|
||||
return this.actions.filter(function (entry) {
|
||||
return entry.target.toLowerCase() === ltarget_1 &&
|
||||
entry.type.toLowerCase() === ltype_1;
|
||||
});
|
||||
}
|
||||
return [];
|
||||
};
|
||||
DocumentList.prototype.onNavigateParentClick = function ($event) {
|
||||
if ($event) {
|
||||
$event.preventDefault();
|
||||
@@ -119,11 +127,6 @@ System.register(['angular2/core', './../services/alfresco.service'], function(ex
|
||||
DocumentList.prototype.getDocumentThumbnailUrl = function (document) {
|
||||
return this._alfrescoService.getDocumentThumbnailUrl(document);
|
||||
};
|
||||
DocumentList.prototype.registerDocumentAction = function (action) {
|
||||
if (action) {
|
||||
this.documentActions.push(action);
|
||||
}
|
||||
};
|
||||
DocumentList.prototype.executeContentAction = function (document, action) {
|
||||
// todo: safety checks
|
||||
action.handler(document);
|
||||
|
@@ -1 +1 @@
|
||||
{"version":3,"file":"document-list.js","sourceRoot":"","sources":["document-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;YA0BH;gBA+BI,sBACY,gBAAiC;oBAAjC,qBAAgB,GAAhB,gBAAgB,CAAiB;oBA9BpC,aAAQ,GAAY,IAAI,CAAC;oBACzB,eAAU,GAAY,KAAK,CAAC;oBAE5B,eAAU,GAAY,IAAI,CAAC;oBAE1B,cAAS,GAAsB,IAAI,mBAAY,EAAE,CAAC;oBAE5D,eAAU,GAAG;wBACT,IAAI,EAAE,kBAAkB;wBACxB,IAAI,EAAE,uBAAuB;qBAChC,CAAC;oBACF,sBAAiB,GAAW,uBAAuB,CAAC;oBAIpD,UAAK,GAAU,EAAE,CAAC;oBAElB,oBAAe,GAAyB,EAAE,CAAC;oBAC3C,yBAAoB,GAAyB,EAAE,CAAC;oBAChD,kBAAa,GAAyB,EAAE,CAAC;oBACzC,uBAAkB,GAAyB,EAAE,CAAC;oBAC9C,YAAO,GAAyB,EAAE,CAAC;gBAUhC,CAAC;gBARJ,wCAAiB,GAAjB;oBACI,MAAM,CAAC,IAAI,CAAC,QAAQ;wBAChB,CAAC,IAAI,CAAC,UAAU;wBAChB,IAAI,CAAC,iBAAiB,KAAK,IAAI,CAAC,U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,SAAS,EAAE,CAAC,qBAAqB,CAAC;wBAClC,WAAW,EAAE,sBAAsB;wBACnC,SAAS,EAAE,CAAC,kCAAe,CAAC;qBAC/B,CAAC;;gCAAA;gBAyIF,mBAAC;YAAD,CAAC,AAxID,IAwIC;YAxID,uCAwIC,CAAA"}
|
@@ -58,10 +58,7 @@ export class DocumentList implements OnInit, AfterViewChecked {
|
||||
|
||||
route: any[] = [];
|
||||
|
||||
documentActions: ContentActionModel[] = [];
|
||||
quickDocumentActions: ContentActionModel[] = [];
|
||||
folderActions: ContentActionModel[] = [];
|
||||
quickFolderActions: ContentActionModel[] = [];
|
||||
actions: ContentActionModel[] = [];
|
||||
columns: ContentColumnModel[] = [];
|
||||
|
||||
canNavigateParent(): boolean {
|
||||
@@ -86,6 +83,20 @@ export class DocumentList implements OnInit, AfterViewChecked {
|
||||
}
|
||||
}
|
||||
|
||||
getContentActions(target: string, type: string) {
|
||||
if (target && type) {
|
||||
|
||||
let ltarget = target.toLowerCase();
|
||||
let ltype = type.toLowerCase();
|
||||
|
||||
return this.actions.filter(entry => {
|
||||
return entry.target.toLowerCase() === ltarget &&
|
||||
entry.type.toLowerCase() === ltype;
|
||||
});
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
onNavigateParentClick($event) {
|
||||
if ($event) {
|
||||
$event.preventDefault();
|
||||
@@ -143,12 +154,6 @@ export class DocumentList implements OnInit, AfterViewChecked {
|
||||
return this._alfrescoService.getDocumentThumbnailUrl(document);
|
||||
}
|
||||
|
||||
registerDocumentAction(action: ContentActionModel) {
|
||||
if (action) {
|
||||
this.documentActions.push(action);
|
||||
}
|
||||
}
|
||||
|
||||
executeContentAction(document:DocumentEntity, action: ContentActionModel) {
|
||||
// todo: safety checks
|
||||
action.handler(document);
|
||||
|
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"folder-action-list.js","sourceRoot":"","sources":["folder-action-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBACI,0BAAoB,YAA0B;oBAA1B,iBAAY,GAAZ,YAAY,CAAc;oBAC1C,sCAAsC;oBACtC,yCAAyC;gBAC7C,CAAC;gBAED,yCAAc,GAAd,UAAe,MAA0B;oBACrC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;wBACT,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBACjD,CAAC;gBACL,CAAC;gBAdL;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,gBAAgB;wBAC1B,QAAQ,EAAE,EAAE;qBACf,CAAC;;oCAAA;gBAYF,uBAAC;YAAD,CAAC,AAXD,IAWC;YAXD,+CAWC,CAAA"}
|
@@ -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 { FolderActionList } from './folder-action-list';
|
||||
import { FolderActionsService } from '../services/folder-actions.service';
|
||||
export declare class FolderAction implements OnInit {
|
||||
private list;
|
||||
private folderActions;
|
||||
title: string;
|
||||
handler: string;
|
||||
execute: EventEmitter<{}>;
|
||||
constructor(list: FolderActionList, folderActions: FolderActionsService);
|
||||
ngOnInit(): void;
|
||||
}
|
@@ -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', './folder-action-list', '../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) {
|
||||
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, folder_action_list_1, folder_actions_service_1;
|
||||
var FolderAction;
|
||||
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 (folder_action_list_1_1) {
|
||||
folder_action_list_1 = folder_action_list_1_1;
|
||||
},
|
||||
function (folder_actions_service_1_1) {
|
||||
folder_actions_service_1 = folder_actions_service_1_1;
|
||||
}],
|
||||
execute: function() {
|
||||
FolderAction = (function () {
|
||||
function FolderAction(list, folderActions) {
|
||||
this.list = list;
|
||||
this.folderActions = folderActions;
|
||||
this.title = 'Action';
|
||||
this.execute = new core_1.EventEmitter();
|
||||
}
|
||||
FolderAction.prototype.ngOnInit = function () {
|
||||
var _this = this;
|
||||
var model = new content_action_model_1.ContentActionModel();
|
||||
model.title = this.title;
|
||||
if (this.handler) {
|
||||
model.handler = this.folderActions.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)
|
||||
], FolderAction.prototype, "title", void 0);
|
||||
__decorate([
|
||||
core_1.Input(),
|
||||
__metadata('design:type', String)
|
||||
], FolderAction.prototype, "handler", void 0);
|
||||
__decorate([
|
||||
core_1.Output(),
|
||||
__metadata('design:type', Object)
|
||||
], FolderAction.prototype, "execute", void 0);
|
||||
FolderAction = __decorate([
|
||||
core_1.Component({
|
||||
selector: 'folder-action',
|
||||
template: ''
|
||||
}),
|
||||
__metadata('design:paramtypes', [folder_action_list_1.FolderActionList, folder_actions_service_1.FolderActionsService])
|
||||
], FolderAction);
|
||||
return FolderAction;
|
||||
}());
|
||||
exports_1("FolderAction", FolderAction);
|
||||
}
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=folder-action.js.map
|
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"folder-action.js","sourceRoot":"","sources":["folder-action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAWH;gBAKI,sBACY,IAAsB,EACtB,aAAmC;oBADnC,SAAI,GAAJ,IAAI,CAAkB;oBACtB,kBAAa,GAAb,aAAa,CAAsB;oBANtC,UAAK,GAAW,QAAQ,CAAC;oBAExB,YAAO,GAAG,IAAI,mBAAY,EAAE,CAAC;gBAKvC,CAAC;gBAED,+BAAQ,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,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBAChE,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;;2DAAA;gBACR;oBAAC,YAAK,EAAE;;6DAAA;gBACR;oBAAC,aAAM,EAAE;;6DAAA;gBAPb;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,eAAe;wBACzB,QAAQ,EAAE,EAAE;qBACf,CAAC;;gCAAA;gBA2BF,mBAAC;YAAD,CAAC,AA1BD,IA0BC;YA1BD,uCA0BC,CAAA"}
|
@@ -1,7 +0,0 @@
|
||||
import { DocumentList } from './document-list';
|
||||
import { ContentActionModel } from '../models/content-action.model';
|
||||
export declare class QuickDocumentActionList {
|
||||
private list;
|
||||
constructor(list: DocumentList);
|
||||
registerAction(action: ContentActionModel): void;
|
||||
}
|
@@ -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 QuickDocumentActionList;
|
||||
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() {
|
||||
QuickDocumentActionList = (function () {
|
||||
function QuickDocumentActionList(list) {
|
||||
this.list = list;
|
||||
// saves reference to parent container
|
||||
// so that content children can access it
|
||||
}
|
||||
QuickDocumentActionList.prototype.registerAction = function (action) {
|
||||
if (action) {
|
||||
this.list.quickDocumentActions.push(action);
|
||||
}
|
||||
};
|
||||
QuickDocumentActionList = __decorate([
|
||||
core_1.Component({
|
||||
selector: 'quick-document-actions',
|
||||
template: ''
|
||||
}),
|
||||
__metadata('design:paramtypes', [document_list_1.DocumentList])
|
||||
], QuickDocumentActionList);
|
||||
return QuickDocumentActionList;
|
||||
}());
|
||||
exports_1("QuickDocumentActionList", QuickDocumentActionList);
|
||||
}
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=quick-document-action-list.js.map
|
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"quick-document-action-list.js","sourceRoot":"","sources":["quick-document-action-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBACI,iCAAoB,IAAkB;oBAAlB,SAAI,GAAJ,IAAI,CAAc;oBAClC,sCAAsC;oBACtC,yCAAyC;gBAC7C,CAAC;gBAED,gDAAc,GAAd,UAAe,MAA0B;oBACrC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;wBACT,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBAChD,CAAC;gBACL,CAAC;gBAdL;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,wBAAwB;wBAClC,QAAQ,EAAE,EAAE;qBACf,CAAC;;2CAAA;gBAYF,8BAAC;YAAD,CAAC,AAXD,IAWC;YAXD,6DAWC,CAAA"}
|
@@ -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: 'quick-document-actions',
|
||||
template: ''
|
||||
})
|
||||
export class QuickDocumentActionList {
|
||||
constructor(private list: DocumentList) {
|
||||
// saves reference to parent container
|
||||
// so that content children can access it
|
||||
}
|
||||
|
||||
registerAction(action: ContentActionModel) {
|
||||
if (action) {
|
||||
this.list.quickDocumentActions.push(action);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"quick-document-action.js","sourceRoot":"","sources":["quick-document-action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAWH;gBAMI,6BACY,IAA6B,EAC7B,eAAuC;oBADvC,SAAI,GAAJ,IAAI,CAAyB;oBAC7B,oBAAe,GAAf,eAAe,CAAwB;oBAJzC,YAAO,GAAG,IAAI,mBAAY,EAAE,CAAC;gBAKvC,CAAC;gBAED,sCAAQ,GAAR;oBAAA,iBAgBC;oBAfG,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;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;gBA1BD;oBAAC,YAAK,EAAE;;iEAAA;gBACR;oBAAC,YAAK,EAAE;;kEAAA;gBACR;oBAAC,YAAK,EAAE;;oEAAA;gBACR;oBAAC,aAAM,EAAE;;oEAAA;gBARb;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,uBAAuB;wBACjC,QAAQ,EAAE,EAAE;qBACf,CAAC;;uCAAA;gBA6BF,0BAAC;YAAD,CAAC,AA5BD,IA4BC;YA5BD,qDA4BC,CAAA"}
|
@@ -1,55 +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 {QuickDocumentActionList} from './quick-document-action-list';
|
||||
import {DocumentActionsService} from '../services/document-actions.service';
|
||||
|
||||
@Component({
|
||||
selector: 'quick-document-action',
|
||||
template: ''
|
||||
})
|
||||
export class QuickDocumentAction implements OnInit {
|
||||
@Input() icon: string;
|
||||
@Input() title: string;
|
||||
@Input() handler: string;
|
||||
@Output() execute = new EventEmitter();
|
||||
|
||||
constructor(
|
||||
private list: QuickDocumentActionList,
|
||||
private documentActions: DocumentActionsService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
let model = new ContentActionModel();
|
||||
model.icon = this.icon;
|
||||
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);
|
||||
}
|
||||
}
|
@@ -1,7 +0,0 @@
|
||||
import { DocumentList } from './document-list';
|
||||
import { ContentActionModel } from '../models/content-action.model';
|
||||
export declare class QuickFolderActionList {
|
||||
private list;
|
||||
constructor(list: DocumentList);
|
||||
registerAction(action: ContentActionModel): void;
|
||||
}
|
@@ -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 QuickFolderActionList;
|
||||
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() {
|
||||
QuickFolderActionList = (function () {
|
||||
function QuickFolderActionList(list) {
|
||||
this.list = list;
|
||||
// saves reference to parent container
|
||||
// so that content children can access it
|
||||
}
|
||||
QuickFolderActionList.prototype.registerAction = function (action) {
|
||||
if (action) {
|
||||
this.list.quickFolderActions.push(action);
|
||||
}
|
||||
};
|
||||
QuickFolderActionList = __decorate([
|
||||
core_1.Component({
|
||||
selector: 'quick-folder-actions',
|
||||
template: ''
|
||||
}),
|
||||
__metadata('design:paramtypes', [document_list_1.DocumentList])
|
||||
], QuickFolderActionList);
|
||||
return QuickFolderActionList;
|
||||
}());
|
||||
exports_1("QuickFolderActionList", QuickFolderActionList);
|
||||
}
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=quick-folder-action-list.js.map
|
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"quick-folder-action-list.js","sourceRoot":"","sources":["quick-folder-action-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBACI,+BAAoB,IAAkB;oBAAlB,SAAI,GAAJ,IAAI,CAAc;oBAClC,sCAAsC;oBACtC,yCAAyC;gBAC7C,CAAC;gBAED,8CAAc,GAAd,UAAe,MAA0B;oBACrC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;wBACT,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBAC9C,CAAC;gBACL,CAAC;gBAdL;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,sBAAsB;wBAChC,QAAQ,EAAE,EAAE;qBACf,CAAC;;yCAAA;gBAYF,4BAAC;YAAD,CAAC,AAXD,IAWC;YAXD,yDAWC,CAAA"}
|
@@ -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: 'quick-folder-actions',
|
||||
template: ''
|
||||
})
|
||||
export class QuickFolderActionList {
|
||||
constructor(private list: DocumentList) {
|
||||
// saves reference to parent container
|
||||
// so that content children can access it
|
||||
}
|
||||
|
||||
registerAction(action: ContentActionModel) {
|
||||
if (action) {
|
||||
this.list.quickFolderActions.push(action);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,29 +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 { QuickFolderActionList } from './quick-folder-action-list';
|
||||
import { FolderActionsService } from '../services/folder-actions.service';
|
||||
export declare class QuickFolderAction implements OnInit {
|
||||
private list;
|
||||
private folderActions;
|
||||
icon: string;
|
||||
title: string;
|
||||
handler: string;
|
||||
execute: EventEmitter<{}>;
|
||||
constructor(list: QuickFolderActionList, folderActions: FolderActionsService);
|
||||
ngOnInit(): void;
|
||||
}
|
@@ -1,98 +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', './quick-folder-action-list', '../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) {
|
||||
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, quick_folder_action_list_1, folder_actions_service_1;
|
||||
var QuickFolderAction;
|
||||
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 (quick_folder_action_list_1_1) {
|
||||
quick_folder_action_list_1 = quick_folder_action_list_1_1;
|
||||
},
|
||||
function (folder_actions_service_1_1) {
|
||||
folder_actions_service_1 = folder_actions_service_1_1;
|
||||
}],
|
||||
execute: function() {
|
||||
QuickFolderAction = (function () {
|
||||
function QuickFolderAction(list, folderActions) {
|
||||
this.list = list;
|
||||
this.folderActions = folderActions;
|
||||
this.execute = new core_1.EventEmitter();
|
||||
}
|
||||
QuickFolderAction.prototype.ngOnInit = function () {
|
||||
var _this = this;
|
||||
var model = new content_action_model_1.ContentActionModel();
|
||||
model.icon = this.icon;
|
||||
model.title = this.title;
|
||||
if (this.handler) {
|
||||
model.handler = this.folderActions.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)
|
||||
], QuickFolderAction.prototype, "icon", void 0);
|
||||
__decorate([
|
||||
core_1.Input(),
|
||||
__metadata('design:type', String)
|
||||
], QuickFolderAction.prototype, "title", void 0);
|
||||
__decorate([
|
||||
core_1.Input(),
|
||||
__metadata('design:type', String)
|
||||
], QuickFolderAction.prototype, "handler", void 0);
|
||||
__decorate([
|
||||
core_1.Output(),
|
||||
__metadata('design:type', Object)
|
||||
], QuickFolderAction.prototype, "execute", void 0);
|
||||
QuickFolderAction = __decorate([
|
||||
core_1.Component({
|
||||
selector: 'quick-folder-action',
|
||||
template: ''
|
||||
}),
|
||||
__metadata('design:paramtypes', [quick_folder_action_list_1.QuickFolderActionList, folder_actions_service_1.FolderActionsService])
|
||||
], QuickFolderAction);
|
||||
return QuickFolderAction;
|
||||
}());
|
||||
exports_1("QuickFolderAction", QuickFolderAction);
|
||||
}
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=quick-folder-action.js.map
|
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"quick-folder-action.js","sourceRoot":"","sources":["quick-folder-action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAWH;gBAMI,2BACY,IAA2B,EAC3B,aAAmC;oBADnC,SAAI,GAAJ,IAAI,CAAuB;oBAC3B,kBAAa,GAAb,aAAa,CAAsB;oBAJrC,YAAO,GAAG,IAAI,mBAAY,EAAE,CAAC;gBAKvC,CAAC;gBAED,oCAAQ,GAAR;oBAAA,iBAgBC;oBAfG,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;oBAEzB,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;wBACf,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBAChE,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;gBA1BD;oBAAC,YAAK,EAAE;;+DAAA;gBACR;oBAAC,YAAK,EAAE;;gEAAA;gBACR;oBAAC,YAAK,EAAE;;kEAAA;gBACR;oBAAC,aAAM,EAAE;;kEAAA;gBARb;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,qBAAqB;wBAC/B,QAAQ,EAAE,EAAE;qBACf,CAAC;;qCAAA;gBA6BF,wBAAC;YAAD,CAAC,AA5BD,IA4BC;YA5BD,iDA4BC,CAAA"}
|
@@ -1,55 +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 {QuickFolderActionList} from './quick-folder-action-list';
|
||||
import {FolderActionsService} from '../services/folder-actions.service';
|
||||
|
||||
@Component({
|
||||
selector: 'quick-folder-action',
|
||||
template: ''
|
||||
})
|
||||
export class QuickFolderAction implements OnInit {
|
||||
@Input() icon: string;
|
||||
@Input() title: string;
|
||||
@Input() handler: string;
|
||||
@Output() execute = new EventEmitter();
|
||||
|
||||
constructor(
|
||||
private list: QuickFolderActionList,
|
||||
private folderActions: FolderActionsService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
let model = new ContentActionModel();
|
||||
model.icon = this.icon;
|
||||
model.title = this.title;
|
||||
|
||||
if (this.handler) {
|
||||
model.handler = this.folderActions.getHandler(this.handler);
|
||||
} else if (this.execute) {
|
||||
model.handler = (document: any): void => {
|
||||
this.execute.emit({
|
||||
value: document
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
this.list.registerAction(model);
|
||||
}
|
||||
}
|
@@ -18,6 +18,8 @@ export declare class ContentActionModel {
|
||||
icon: string;
|
||||
title: string;
|
||||
handler: ContentActionHandler;
|
||||
type: string;
|
||||
target: string;
|
||||
}
|
||||
export interface ContentActionHandler {
|
||||
(obj: any): any;
|
||||
|
@@ -1 +1 @@
|
||||
{"version":3,"file":"content-action.model.js","sourceRoot":"","sources":["content-action.model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;YAEH;gBAAA;gBAIA,CAAC;gBAAD,yBAAC;YAAD,CAAC,AAJD,IAIC;YAJD,mDAIC,CAAA"}
|
||||
{"version":3,"file":"content-action.model.js","sourceRoot":"","sources":["content-action.model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;YAEH;gBAAA;gBAMA,CAAC;gBAAD,yBAAC;YAAD,CAAC,AAND,IAMC;YAND,mDAMC,CAAA"}
|
@@ -19,6 +19,8 @@ export class ContentActionModel {
|
||||
icon: string;
|
||||
title: string;
|
||||
handler: ContentActionHandler;
|
||||
type: string;
|
||||
target: string;
|
||||
}
|
||||
|
||||
export interface ContentActionHandler {
|
||||
|
Reference in New Issue
Block a user