diff --git a/demo-shell-ng2/app/components/files/files.component.ts b/demo-shell-ng2/app/components/files/files.component.ts index 9990785764..96eae67abd 100644 --- a/demo-shell-ng2/app/components/files/files.component.ts +++ b/demo-shell-ng2/app/components/files/files.component.ts @@ -64,10 +64,16 @@ import {MDL} from 'ng2-alfresco-core/material'; [navigate]="navigation" [downloads]="downloads" (itemClick)="onItemClick($event)"> + + + + + + 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 7f991b8e18..f4c56289c2 100644 --- a/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.d.ts +++ b/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.d.ts @@ -1,15 +1,23 @@ -import { DocumentList } from './src/document-list.component'; -import { DocumentAction } from './src/document-action.component'; -import { DocumentActionList } from './src/document-action-list.component'; -import { FolderAction } from './src/folder-action.component'; -import { FolderActionList } from './src/folder-action-list.component'; -export * from './src/document-list.component'; -export * from './src/document-action.component'; -export * from './src/document-action-list.component'; -export * from './src/folder-action-list.component'; -export * from './src/folder-action-list.component'; +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'; +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'; declare var _default: { - directives: (typeof DocumentList | typeof DocumentAction | typeof DocumentActionList | typeof FolderAction | typeof FolderActionList)[]; + directives: (typeof DocumentList | typeof DocumentAction | typeof DocumentActionList | typeof QuickDocumentAction | typeof QuickDocumentActionList | typeof FolderAction | typeof FolderActionList | typeof QuickFolderAction | typeof QuickFolderActionList)[]; providers: undefined[]; }; 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 c94b76b8a0..7009b78f3d 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/document-list.component', './src/document-action.component', './src/document-action-list.component', './src/folder-action.component', './src/folder-action-list.component'], function(exports_1, context_1) { +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'], function(exports_1, context_1) { "use strict"; var __moduleName = context_1 && context_1.id; - var document_list_component_1, document_action_component_1, document_action_list_component_1, folder_action_component_1, folder_action_list_component_1; + 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; var DOCUMENT_LIST_DIRECTIVES; var exportedNames_1 = { 'DOCUMENT_LIST_DIRECTIVES': true @@ -15,37 +15,67 @@ System.register(['./src/document-list.component', './src/document-action.compone } return { setters:[ - function (document_list_component_1_1) { - document_list_component_1 = document_list_component_1_1; - exportStar_1(document_list_component_1_1); + function (document_list_1_1) { + document_list_1 = document_list_1_1; + exportStar_1(document_list_1_1); }, - function (document_action_component_1_1) { - document_action_component_1 = document_action_component_1_1; - exportStar_1(document_action_component_1_1); + function (document_action_1_1) { + document_action_1 = document_action_1_1; + exportStar_1(document_action_1_1); }, - function (document_action_list_component_1_1) { - document_action_list_component_1 = document_action_list_component_1_1; - exportStar_1(document_action_list_component_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 (folder_action_component_1_1) { - folder_action_component_1 = folder_action_component_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 (folder_action_list_component_1_1) { - folder_action_list_component_1 = folder_action_list_component_1_1; - exportStar_1(folder_action_list_component_1_1); - exportStar_1(folder_action_list_component_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); }], execute: function() { exports_1("default",{ - directives: [document_list_component_1.DocumentList, document_action_component_1.DocumentAction, document_action_list_component_1.DocumentActionList, folder_action_component_1.FolderAction, folder_action_list_component_1.FolderActionList], + 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 + ], providers: [] }); exports_1("DOCUMENT_LIST_DIRECTIVES", DOCUMENT_LIST_DIRECTIVES = [ - document_list_component_1.DocumentList, - document_action_component_1.DocumentAction, - document_action_list_component_1.DocumentActionList, - folder_action_component_1.FolderAction, - folder_action_list_component_1.FolderActionList + 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 ]); } } 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 8a7285ce09..1a7125c413 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":";;;;QAiBa,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YALrC,oBAAe;gBACX,UAAU,EAAE,CAAC,sCAAY,EAAE,0CAAc,EAAE,mDAAkB,EAAE,sCAAY,EAAE,+CAAgB,CAAC;gBAC9F,SAAS,EAAE,EAAE;aAChB,EAAA;YAEY,sCAAA,wBAAwB,GAAU;gBAC3C,sCAAY;gBACZ,0CAAc;gBACd,mDAAkB;gBAClB,sCAAY;gBACZ,+CAAgB;aACnB,CAAA,CAAC"} \ No newline at end of file +{"version":3,"file":"ng2-alfresco-documentlist.js","sourceRoot":"","sources":["ng2-alfresco-documentlist.ts"],"names":[],"mappings":";;;;QAmCa,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAfrC,oBAAe;gBACX,UAAU,EAAE;oBACR,4BAAY;oBACZ,gCAAc;oBACd,yCAAkB;oBAClB,2CAAmB;oBACnB,oDAAuB;oBACvB,4BAAY;oBACZ,qCAAgB;oBAChB,uCAAiB;oBACjB,gDAAqB;iBACxB;gBACD,SAAS,EAAE,EAAE;aAChB,EAAA;YAEY,sCAAA,wBAAwB,GAAU;gBAC3C,4BAAY;gBACZ,gCAAc;gBACd,yCAAkB;gBAClB,2CAAmB;gBACnB,oDAAuB;gBACvB,4BAAY;gBACZ,qCAAgB;gBAChB,uCAAiB;gBACjB,gDAAqB;aACxB,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 6ccbbc38db..95c98b1efd 100644 --- a/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.ts +++ b/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.ts @@ -1,17 +1,35 @@ -import {DocumentList} from './src/document-list.component'; -import {DocumentAction} from './src/document-action.component'; -import {DocumentActionList} from './src/document-action-list.component'; -import {FolderAction} from './src/folder-action.component'; -import {FolderActionList} from './src/folder-action-list.component'; +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'; -export * from './src/document-list.component'; -export * from './src/document-action.component'; -export * from './src/document-action-list.component'; -export * from './src/folder-action-list.component'; -export * from './src/folder-action-list.component'; +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 default { - directives: [DocumentList, DocumentAction, DocumentActionList, FolderAction, FolderActionList], + directives: [ + DocumentList, + DocumentAction, + DocumentActionList, + QuickDocumentAction, + QuickDocumentActionList, + FolderAction, + FolderActionList, + QuickFolderAction, + QuickFolderActionList + ], providers: [] } @@ -19,6 +37,10 @@ export const DOCUMENT_LIST_DIRECTIVES: [any] = [ DocumentList, DocumentAction, DocumentActionList, + QuickDocumentAction, + QuickDocumentActionList, FolderAction, - FolderActionList + FolderActionList, + QuickFolderAction, + QuickFolderActionList ]; diff --git a/ng2-components/ng2-alfresco-documentlist/src/alfresco.service.js.map b/ng2-components/ng2-alfresco-documentlist/src/alfresco.service.js.map deleted file mode 100644 index 34514230fe..0000000000 --- a/ng2-components/ng2-alfresco-documentlist/src/alfresco.service.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"alfresco.service.js","sourceRoot":"","sources":["alfresco.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAwBA;gBACI,yBACY,IAAU,EACV,QAAiC;oBADjC,SAAI,GAAJ,IAAI,CAAM;oBACV,aAAQ,GAAR,QAAQ,CAAyB;oBAKrC,UAAK,GAAW,uBAAuB,CAAC;oBACxC,iBAAY,GAAW,sDAAsD,CAAC;oBAJlF,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC;gBAC/B,CAAC;gBAKD,sBAAW,iCAAI;yBAAf;wBACI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;oBACtB,CAAC;yBAED,UAAgB,KAAY;wBACxB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;oBACvB,CAAC;;;mBAJA;gBAMO,oCAAU,GAAlB;oBACI,MAAM,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC;gBACzC,CAAC;gBAED,mCAAS,GAAT,UAAU,MAAc;oBACpB,IAAI,OAAO,GAAG,IAAI,cAAO,CAAC;wBACtB,cAAc,EAAE,kBAAkB;wBAClC,eAAe,EAAE,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC;qBAClD,CAAC,CAAC;oBACH,IAAI,OAAO,GAAG,IAAI,qBAAc,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;oBACvD,MAAM,CAAC,IAAI,CAAC,IAAI;yBACX,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,MAAM,EAAE,OAAO,CAAC;yBACxC,GAAG,CAAC,UAAA,GAAG,IAAI,OAAe,GAAG,CAAC,IAAI,EAAE,EAAzB,CAAyB,CAAC;yBACrC,EAAE,CAAC,UAAA,IAAI,IAAI,OAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAjB,CAAiB,CAAC,CAAC,iCAAiC;yBAC/D,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBACjC,CAAC;gBAED,iDAAuB,GAAvB,UAAwB,QAAwB;oBAC5C,MAAM,CAAC,IAAI,CAAC,KAAK,GAAG,6BAA6B,GAAG,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,mEAAmE,CAAC;gBACnK,CAAC;gBAED,uCAAa,GAAb,UAAc,QAAwB;oBAClC,MAAM,CAAC,IAAI,CAAC,KAAK,GAAG,oBAAoB,GAAG,QAAQ,CAAC,UAAU,CAAC;gBACnE,CAAC;gBAEO,qCAAW,GAAnB,UAAqB,KAAe;oBAChC,mFAAmF;oBACnF,4CAA4C;oBAC5C,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;oBACrB,MAAM,CAAC,uBAAU,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,cAAc,CAAC,CAAC;gBAClE,CAAC;gBAlDL;oBAAC,iBAAU,EAAE;;mCAAA;gBAmDb,sBAAC;YAAD,CAAC,AAlDD,IAkDC;YAlDD,6CAkDC,CAAA"} \ No newline at end of file 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 new file mode 100644 index 0000000000..5cebcf751e --- /dev/null +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.d.ts @@ -0,0 +1,7 @@ +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/document-action-list.component.js b/ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.js similarity index 82% rename from ng2-components/ng2-alfresco-documentlist/src/document-action-list.component.js rename to ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.js index e5b160e749..3932d9f646 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/document-action-list.component.js +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.js @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -System.register(['angular2/core', './document-list.component'], function(exports_1, context_1) { +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) { @@ -26,32 +26,34 @@ System.register(['angular2/core', './document-list.component'], function(exports 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_component_1; + var core_1, document_list_1; var DocumentActionList; return { setters:[ function (core_1_1) { core_1 = core_1_1; }, - function (document_list_component_1_1) { - document_list_component_1 = document_list_component_1_1; + function (document_list_1_1) { + document_list_1 = document_list_1_1; }], execute: function() { DocumentActionList = (function () { - function DocumentActionList(list) { - this.list = list; + function DocumentActionList(documentList) { + this.documentList = documentList; // saves reference to parent container // so that content children can access it } DocumentActionList.prototype.registerAction = function (action) { - this.list.registerDocumentAction(action); + if (action) { + this.documentList.documentActions.push(action); + } }; DocumentActionList = __decorate([ core_1.Component({ selector: 'document-actions', template: '' }), - __metadata('design:paramtypes', [document_list_component_1.DocumentList]) + __metadata('design:paramtypes', [document_list_1.DocumentList]) ], DocumentActionList); return DocumentActionList; }()); @@ -59,4 +61,4 @@ System.register(['angular2/core', './document-list.component'], function(exports } } }); -//# sourceMappingURL=document-action-list.component.js.map \ No newline at end of file +//# 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 new file mode 100644 index 0000000000..b775ca0a95 --- /dev/null +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.js.map @@ -0,0 +1 @@ +{"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/document-action-list.component.ts b/ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.ts similarity index 77% rename from ng2-components/ng2-alfresco-documentlist/src/document-action-list.component.ts rename to ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.ts index 25265c43fd..9622460ae9 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/document-action-list.component.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-action-list.ts @@ -16,20 +16,22 @@ */ import {Component} from 'angular2/core'; -import {DocumentList} from './document-list.component'; -import {ContentActionModel} from './models/content-action.model'; +import {DocumentList} from './document-list'; +import {ContentActionModel} from './../models/content-action.model'; @Component({ selector: 'document-actions', template: '' }) export class DocumentActionList { - constructor(private list: DocumentList) { + constructor(private documentList: DocumentList) { // saves reference to parent container // so that content children can access it } registerAction(action: ContentActionModel) { - this.list.registerDocumentAction(action); + if (action) { + this.documentList.documentActions.push(action); + } } } diff --git a/ng2-components/ng2-alfresco-documentlist/src/document-action.component.d.ts b/ng2-components/ng2-alfresco-documentlist/src/components/document-action.d.ts similarity index 93% rename from ng2-components/ng2-alfresco-documentlist/src/document-action.component.d.ts rename to ng2-components/ng2-alfresco-documentlist/src/components/document-action.d.ts index 7910abf0b3..7451bfdafa 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/document-action.component.d.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-action.d.ts @@ -15,7 +15,7 @@ * limitations under the License. */ import { OnInit, EventEmitter } from 'angular2/core'; -import { DocumentActionList } from './document-action-list.component'; +import { DocumentActionList } from './document-action-list'; export declare class DocumentAction implements OnInit { private list; title: string; diff --git a/ng2-components/ng2-alfresco-documentlist/src/document-action.component.js b/ng2-components/ng2-alfresco-documentlist/src/components/document-action.js similarity index 90% rename from ng2-components/ng2-alfresco-documentlist/src/document-action.component.js rename to ng2-components/ng2-alfresco-documentlist/src/components/document-action.js index 2a93855098..a991fe629d 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/document-action.component.js +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-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', './document-action-list.component'], function(exports_1, context_1) { +System.register(['angular2/core', './../models/content-action.model', './document-action-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) { @@ -26,7 +26,7 @@ System.register(['angular2/core', './models/content-action.model', './document-a 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_component_1; + var core_1, content_action_model_1, document_action_list_1; var DocumentAction; return { setters:[ @@ -36,8 +36,8 @@ System.register(['angular2/core', './models/content-action.model', './document-a function (content_action_model_1_1) { content_action_model_1 = content_action_model_1_1; }, - function (document_action_list_component_1_1) { - document_action_list_component_1 = document_action_list_component_1_1; + function (document_action_list_1_1) { + document_action_list_1 = document_action_list_1_1; }], execute: function() { DocumentAction = (function () { @@ -92,7 +92,7 @@ System.register(['angular2/core', './models/content-action.model', './document-a selector: 'document-action', template: '' }), - __metadata('design:paramtypes', [document_action_list_component_1.DocumentActionList]) + __metadata('design:paramtypes', [document_action_list_1.DocumentActionList]) ], DocumentAction); return DocumentAction; }()); @@ -100,4 +100,4 @@ System.register(['angular2/core', './models/content-action.model', './document-a } } }); -//# sourceMappingURL=document-action.component.js.map \ No newline at end of file +//# 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 new file mode 100644 index 0000000000..936d1e051f --- /dev/null +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-action.js.map @@ -0,0 +1 @@ +{"version":3,"file":"document-action.js","sourceRoot":"","sources":["document-action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBAOI,wBAAoB,IAAwB;oBAAxB,SAAI,GAAJ,IAAI,CAAoB;oBANnC,UAAK,GAAW,QAAQ,CAAC;oBAExB,YAAO,GAAG,IAAI,mBAAY,EAAE,CAAC;oBAE/B,oBAAe,GAA4C,EAAE,CAAC;oBAGlE,qEAAqE;oBACrE,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC;oBAC7D,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC;gBACjE,CAAC;gBAED,iCAAQ,GAAR;o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fresco-documentlist/src/components/document-action.ts similarity index 92% rename from ng2-components/ng2-alfresco-documentlist/src/document-action.component.ts rename to ng2-components/ng2-alfresco-documentlist/src/components/document-action.ts index f207233fdb..7f179dca34 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/document-action.component.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-action.ts @@ -16,8 +16,8 @@ */ import {Component, OnInit, Input, Output, EventEmitter} from 'angular2/core'; -import {ContentActionModel, ContentActionHandler} from './models/content-action.model'; -import {DocumentActionList} from './document-action-list.component'; +import {ContentActionModel, ContentActionHandler} from './../models/content-action.model'; +import {DocumentActionList} from './document-action-list'; @Component({ selector: 'document-action', diff --git a/ng2-components/ng2-alfresco-documentlist/src/document-list.component.d.ts b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.d.ts similarity index 82% rename from ng2-components/ng2-alfresco-documentlist/src/document-list.component.d.ts rename to ng2-components/ng2-alfresco-documentlist/src/components/document-list.d.ts index 88251da4e3..bdc2abf3dc 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/document-list.component.d.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.d.ts @@ -15,10 +15,10 @@ * limitations under the License. */ import { OnInit, EventEmitter } from 'angular2/core'; -import { AlfrescoService } from './alfresco.service'; -import { FolderEntity } from './core/entities/folder.entity'; -import { DocumentEntity } from './core/entities/document.entity'; -import { ContentActionModel } from './models/content-action.model'; +import { AlfrescoService } from './../services/alfresco.service'; +import { FolderEntity } from './../core/entities/folder.entity'; +import { DocumentEntity } from './../core/entities/document.entity'; +import { ContentActionModel } from './../models/content-action.model'; export declare class DocumentList implements OnInit { private _alfrescoService; navigate: boolean; @@ -36,7 +36,9 @@ export declare class DocumentList implements OnInit { errorMessage: any; route: any[]; documentActions: ContentActionModel[]; + quickDocumentActions: ContentActionModel[]; folderActions: ContentActionModel[]; + quickFolderActions: ContentActionModel[]; canNavigateParent(): boolean; constructor(_alfrescoService: AlfrescoService); ngOnInit(): void; @@ -46,7 +48,6 @@ export declare class DocumentList implements OnInit { getContentUrl(document: DocumentEntity): string; getDocumentThumbnailUrl(document: DocumentEntity): string; registerDocumentAction(action: ContentActionModel): void; - registerFolderAction(action: ContentActionModel): void; executeContentAction(document: DocumentEntity, action: ContentActionModel): void; private getItemPath(item); private displayFolderContent(path); diff --git a/ng2-components/ng2-alfresco-documentlist/src/document-list.component.js b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.js similarity index 70% rename from ng2-components/ng2-alfresco-documentlist/src/document-list.component.js rename to ng2-components/ng2-alfresco-documentlist/src/components/document-list.js index 712ef3359f..94042fd2a5 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/document-list.component.js +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.js @@ -1,4 +1,4 @@ -System.register(['angular2/core', './alfresco.service'], function(exports_1, context_1) { +System.register(['angular2/core', './../services/alfresco.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) { @@ -37,7 +37,9 @@ System.register(['angular2/core', './alfresco.service'], function(exports_1, con this.currentFolderPath = 'swsdp/documentLibrary'; this.route = []; this.documentActions = []; + this.quickDocumentActions = []; this.folderActions = []; + this.quickFolderActions = []; } DocumentList.prototype.canNavigateParent = function () { return this.navigate && @@ -97,12 +99,9 @@ System.register(['angular2/core', './alfresco.service'], function(exports_1, con return this._alfrescoService.getDocumentThumbnailUrl(document); }; DocumentList.prototype.registerDocumentAction = function (action) { - // do additional registration actions here - this.documentActions.push(action); - }; - DocumentList.prototype.registerFolderAction = function (action) { - // do additional registration actions here - this.folderActions.push(action); + if (action) { + this.documentActions.push(action); + } }; DocumentList.prototype.executeContentAction = function (document, action) { // todo: safety checks @@ -151,7 +150,7 @@ System.register(['angular2/core', './alfresco.service'], function(exports_1, con styles: [ "\n :host .breadcrumb {\n margin-bottom: 4px;\n }\n\n :host .folder-icon {\n float: left;\n margin-right: 10px;\n }\n\n :host .file-icon {\n width: 52px;\n height: 52px;\n float: left;\n margin-right: 10px;\n }\n \n :host .document-header {\n font-size: 24px;\n line-height: 32px;\n }\n \n :host .document-header:hover {\n text-decoration: underline;\n }\n " ], - template: "\n
    \n
  1. \n {{r.name}}\n {{r.name}}\n
  2. \n
\n
\n \n ...\n \n \n \n \n
0\" class=\"btn-group pull-right\">\n \n \n
\n \n \n
\n \n \n
\n \n \n \n \"\"\n\n

\n {{document.displayName}}\n

\n

{{document.description}}

\n \n Modified {{document.modifiedOn}} by {{document.modifiedBy}}\n \n \n
\n ", + template: "\n
    \n
  1. \n {{r.name}}\n {{r.name}}\n
  2. \n
\n
\n \n ...\n \n \n \n \n
0\" class=\"btn-group pull-right\">\n \n \n \n
\n \n \n
\n \n \n \n
\n \n \n \n \"\"\n\n

\n {{document.displayName}}\n

\n

{{document.description}}

\n \n Modified {{document.modifiedOn}} by {{document.modifiedBy}}\n \n \n
\n ", providers: [alfresco_service_1.AlfrescoService] }), __metadata('design:paramtypes', [alfresco_service_1.AlfrescoService]) @@ -162,4 +161,4 @@ System.register(['angular2/core', './alfresco.service'], function(exports_1, con } } }); -//# sourceMappingURL=document-list.component.js.map \ No newline at end of file +//# sourceMappingURL=document-list.js.map \ No newline at end of file diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.js.map b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.js.map new file mode 100644 index 0000000000..3deecf1061 --- /dev/null +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.js.map @@ -0,0 +1 @@ +{"version":3,"file":"document-list.js","sourceRoot":"","sources":["document-list.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;YAgIA;gBA+BI,sBACY,gBAAiC;oBAAjC,qBAAgB,GAAhB,gBAAgB,CAAiB;oBA9BpC,aAAQ,GAAY,IAAI,CAAC;oBACzB,eAAU,GAAY,KAAK,CAAC;oBACT,oBAAe,GAAW,sBAAsB,CAAC;oBACpE,eAAU,GAAY,IAAI,CAAC;oB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AC9B,UAAA,KAAK,IAAI,OAAA,KAAI,CAAC,YAAY,GAAQ,KAAK,EAA9B,CAA8B,CAC1C,CAAC;gBACV,CAAC;gBAzHD;oBAAC,YAAK,EAAE;;8DAAA;gBACR;oBAAC,YAAK,EAAE;;gEAAA;gBACR;oBAAC,YAAK,CAAC,mBAAmB,CAAC;;qEAAA;gBAC3B;oBAAC,YAAK,EAAE;;gEAAA;gBACR;oBAAC,YAAK,EAAE;;+DAAA;gBAER;oBAAC,aAAM,EAAE;;+DAAA;gBAlHb;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,wBAAwB;wBAClC,MAAM,EAAE;4BACJ,uoBAyBC;yBACJ;wBACD,QAAQ,EAAE,gvIAyET;wBACD,SAAS,EAAE,CAAC,kCAAe,CAAC;qBAC/B,CAAC;;gCAAA;gBA6HF,mBAAC;YAAD,CAAC,AA5HD,IA4HC;YA5HD,uCA4HC,CAAA"} \ No newline at end of file diff --git a/ng2-components/ng2-alfresco-documentlist/src/document-list.component.ts b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.ts similarity index 87% rename from ng2-components/ng2-alfresco-documentlist/src/document-list.component.ts rename to ng2-components/ng2-alfresco-documentlist/src/components/document-list.ts index 3236ec7fe9..5d5dc9d523 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/document-list.component.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.ts @@ -15,10 +15,10 @@ * limitations under the License. */ import {Component, OnInit, Input, Output, EventEmitter} from 'angular2/core'; -import {AlfrescoService} from './alfresco.service'; -import {FolderEntity} from './core/entities/folder.entity'; -import {DocumentEntity} from './core/entities/document.entity'; -import {ContentActionModel} from './models/content-action.model'; +import {AlfrescoService} from './../services/alfresco.service'; +import {FolderEntity} from './../core/entities/folder.entity'; +import {DocumentEntity} from './../core/entities/document.entity'; +import {ContentActionModel} from './../models/content-action.model'; @Component({ selector: 'alfresco-document-list', @@ -65,6 +65,11 @@ import {ContentActionModel} from './models/content-action.model';
+