From 0b1b87063ccb064c9bdb3c152828f188abb7c5f0 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Tue, 3 May 2016 17:01:05 +0100 Subject: [PATCH] Initial support for configurable columns refs #51 --- .../app/components/files/files.component.html | 4 + .../ng2-alfresco-documentlist.d.ts | 6 +- .../ng2-alfresco-documentlist.js | 20 ++++- .../ng2-alfresco-documentlist.js.map | 2 +- .../ng2-alfresco-documentlist.ts | 12 ++- .../src/components/content-column-list.d.ts | 7 ++ .../src/components/content-column-list.js | 64 ++++++++++++++++ .../src/components/content-column-list.js.map | 1 + .../src/components/content-column-list.ts | 37 +++++++++ .../src/components/content-column.d.ts | 25 +++++++ .../src/components/content-column.js | 75 +++++++++++++++++++ .../src/components/content-column.js.map | 1 + .../src/components/content-column.ts | 41 ++++++++++ .../src/components/document-list.d.ts | 2 + .../src/components/document-list.html | 8 +- .../src/components/document-list.js | 1 + .../src/components/document-list.js.map | 2 +- .../src/components/document-list.ts | 2 + .../src/models/content-column.model.d.ts | 20 +++++ .../src/models/content-column.model.js | 33 ++++++++ .../src/models/content-column.model.js.map | 1 + .../src/models/content-column.model.ts | 21 ++++++ 22 files changed, 375 insertions(+), 10 deletions(-) create mode 100644 ng2-components/ng2-alfresco-documentlist/src/components/content-column-list.d.ts create mode 100644 ng2-components/ng2-alfresco-documentlist/src/components/content-column-list.js create mode 100644 ng2-components/ng2-alfresco-documentlist/src/components/content-column-list.js.map create mode 100644 ng2-components/ng2-alfresco-documentlist/src/components/content-column-list.ts create mode 100644 ng2-components/ng2-alfresco-documentlist/src/components/content-column.d.ts create mode 100644 ng2-components/ng2-alfresco-documentlist/src/components/content-column.js create mode 100644 ng2-components/ng2-alfresco-documentlist/src/components/content-column.js.map create mode 100644 ng2-components/ng2-alfresco-documentlist/src/components/content-column.ts create mode 100644 ng2-components/ng2-alfresco-documentlist/src/models/content-column.model.d.ts create mode 100644 ng2-components/ng2-alfresco-documentlist/src/models/content-column.model.js create mode 100644 ng2-components/ng2-alfresco-documentlist/src/models/content-column.model.js.map create mode 100644 ng2-components/ng2-alfresco-documentlist/src/models/content-column.model.ts diff --git a/demo-shell-ng2/app/components/files/files.component.html b/demo-shell-ng2/app/components/files/files.component.html index d56c955db8..f3d35ca923 100644 --- a/demo-shell-ng2/app/components/files/files.component.html +++ b/demo-shell-ng2/app/components/files/files.component.html @@ -35,6 +35,10 @@ [navigate]="navigation" folder-icon="" (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 8085f80ba4..d95b6035b6 100644 --- a/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.d.ts +++ b/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.d.ts @@ -7,6 +7,8 @@ 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 { FolderActionsService } from './src/services/folder-actions.service'; import { DocumentActionsService } from './src/services/document-actions.service'; import { AlfrescoService } from './src/services/alfresco.service'; @@ -19,11 +21,13 @@ 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/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)[]; + directives: (typeof DocumentList | typeof DocumentAction | typeof DocumentActionList | typeof QuickDocumentAction | typeof QuickDocumentActionList | typeof FolderAction | typeof FolderActionList | typeof QuickFolderAction | typeof QuickFolderActionList | typeof ContentColumn | typeof ContentColumnList)[]; providers: (typeof AlfrescoService | typeof FolderActionsService | typeof DocumentActionsService)[]; }; export default _default; diff --git a/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.js b/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.js index b50c261648..05e2d886ef 100644 --- a/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.js +++ b/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.js @@ -1,7 +1,7 @@ -System.register(['./src/components/document-list', './src/components/document-action', './src/components/document-action-list', './src/components/quick-document-action', './src/components/quick-document-action-list', './src/components/folder-action', './src/components/folder-action-list', './src/components/quick-folder-action', './src/components/quick-folder-action-list', './src/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/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) { "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, folder_actions_service_1, document_actions_service_1, alfresco_service_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, content_column_1, content_column_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, @@ -52,6 +52,14 @@ System.register(['./src/components/document-list', './src/components/document-ac 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); + }, + function (content_column_list_1_1) { + content_column_list_1 = content_column_list_1_1; + exportStar_1(content_column_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); @@ -75,7 +83,9 @@ System.register(['./src/components/document-list', './src/components/document-ac folder_action_1.FolderAction, folder_action_list_1.FolderActionList, quick_folder_action_1.QuickFolderAction, - quick_folder_action_list_1.QuickFolderActionList + quick_folder_action_list_1.QuickFolderActionList, + content_column_1.ContentColumn, + content_column_list_1.ContentColumnList ], providers: [ alfresco_service_1.AlfrescoService, @@ -92,7 +102,9 @@ System.register(['./src/components/document-list', './src/components/document-ac folder_action_1.FolderAction, folder_action_list_1.FolderActionList, quick_folder_action_1.QuickFolderAction, - quick_folder_action_list_1.QuickFolderActionList + quick_folder_action_list_1.QuickFolderActionList, + content_column_1.ContentColumn, + content_column_list_1.ContentColumnList ]); exports_1("DOCUMENT_LIST_PROVIDERS", DOCUMENT_LIST_PROVIDERS = [ alfresco_service_1.AlfrescoService, diff --git a/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.js.map b/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.js.map index e193925b3f..6d4ef69ba8 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":";;;;QAgDa,wBAAwB,EAYxB,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA/BpC,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;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;aACxB,CAAA,CAAC;YAEW,qCAAA,uBAAuB,GAAU;gBAC1C,kCAAe;gBACf,6CAAoB;gBACpB,iDAAsB;aACzB,CAAA,CAAC"} \ No newline at end of file +{"version":3,"file":"ng2-alfresco-documentlist.js","sourceRoot":"","sources":["ng2-alfresco-documentlist.ts"],"names":[],"mappings":";;;;QAsDa,wBAAwB,EAcxB,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAnCpC,oBAAe;gBACX,UAAU,EAAE;oBACR,4BAAY;oBACZ,gCAAc;oBACd,yCAAkB;oBAClB,2CAAmB;oBACnB,oDAAuB;oBACvB,4BAAY;oBACZ,qCAAgB;oBAChB,uCAAiB;oBACjB,gDAAqB;oBACrB,8BAAa;oBACb,uCAAiB;iBACpB;gBACD,SAAS,EAAE;oBACP,kCAAe;oBACf,6CAAoB;oBACpB,iDAAsB;iBACzB;aACJ,EAAA;YAEY,sCAAA,wBAAwB,GAAU;gBAC3C,4BAAY;gBACZ,gCAAc;gBACd,yCAAkB;gBAClB,2CAAmB;gBACnB,oDAAuB;gBACvB,4BAAY;gBACZ,qCAAgB;gBAChB,uCAAiB;gBACjB,gDAAqB;gBACrB,8BAAa;gBACb,uCAAiB;aACpB,CAAA,CAAC;YAEW,qCAAA,uBAAuB,GAAU;gBAC1C,kCAAe;gBACf,6CAAoB;gBACpB,iDAAsB;aACzB,CAAA,CAAC"} \ No newline at end of file diff --git a/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.ts b/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.ts index 0915658b9d..4d7a8d2ac9 100644 --- a/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.ts +++ b/ng2-components/ng2-alfresco-documentlist/ng2-alfresco-documentlist.ts @@ -7,6 +7,8 @@ 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 {FolderActionsService} from './src/services/folder-actions.service'; import {DocumentActionsService} from './src/services/document-actions.service'; @@ -22,6 +24,8 @@ 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'; // services export * from './src/services/folder-actions.service'; export * from './src/services/document-actions.service'; @@ -37,7 +41,9 @@ export default { FolderAction, FolderActionList, QuickFolderAction, - QuickFolderActionList + QuickFolderActionList, + ContentColumn, + ContentColumnList ], providers: [ AlfrescoService, @@ -55,7 +61,9 @@ export const DOCUMENT_LIST_DIRECTIVES: [any] = [ FolderAction, FolderActionList, QuickFolderAction, - QuickFolderActionList + QuickFolderActionList, + ContentColumn, + ContentColumnList ]; export const DOCUMENT_LIST_PROVIDERS: [any] = [ diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/content-column-list.d.ts b/ng2-components/ng2-alfresco-documentlist/src/components/content-column-list.d.ts new file mode 100644 index 0000000000..8a757b5c32 --- /dev/null +++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-column-list.d.ts @@ -0,0 +1,7 @@ +import { DocumentList } from './document-list'; +import { ContentColumnModel } from './../models/content-column.model'; +export declare class ContentColumnList { + private documentList; + constructor(documentList: DocumentList); + registerColumn(column: ContentColumnModel): void; +} diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/content-column-list.js b/ng2-components/ng2-alfresco-documentlist/src/components/content-column-list.js new file mode 100644 index 0000000000..41e35c9438 --- /dev/null +++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-column-list.js @@ -0,0 +1,64 @@ +/** + * @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 ContentColumnList; + 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() { + ContentColumnList = (function () { + function ContentColumnList(documentList) { + this.documentList = documentList; + // saves reference to parent container + // so that content children can access it + } + ContentColumnList.prototype.registerColumn = function (column) { + if (column) { + this.documentList.columns.push(column); + } + }; + ContentColumnList = __decorate([ + core_1.Component({ + selector: 'content-columns', + template: '' + }), + __metadata('design:paramtypes', [document_list_1.DocumentList]) + ], ContentColumnList); + return ContentColumnList; + }()); + exports_1("ContentColumnList", ContentColumnList); + } + } +}); +//# sourceMappingURL=content-column-list.js.map \ No newline at end of file diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/content-column-list.js.map b/ng2-components/ng2-alfresco-documentlist/src/components/content-column-list.js.map new file mode 100644 index 0000000000..42ad335fcd --- /dev/null +++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-column-list.js.map @@ -0,0 +1 @@ +{"version":3,"file":"content-column-list.js","sourceRoot":"","sources":["content-column-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBACI,2BAAoB,YAA0B;oBAA1B,iBAAY,GAAZ,YAAY,CAAc;oBAC1C,sCAAsC;oBACtC,yCAAyC;gBAC7C,CAAC;gBAED,0CAAc,GAAd,UAAe,MAA0B;oBACrC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;wBACT,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBAC3C,CAAC;gBACL,CAAC;gBAdL;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,iBAAiB;wBAC3B,QAAQ,EAAE,EAAE;qBACf,CAAC;;qCAAA;gBAYF,wBAAC;YAAD,CAAC,AAXD,IAWC;YAXD,iDAWC,CAAA"} \ No newline at end of file diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/content-column-list.ts b/ng2-components/ng2-alfresco-documentlist/src/components/content-column-list.ts new file mode 100644 index 0000000000..0ad9d62688 --- /dev/null +++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-column-list.ts @@ -0,0 +1,37 @@ +/** + * @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 {ContentColumnModel} from './../models/content-column.model'; + +@Component({ + selector: 'content-columns', + template: '' +}) +export class ContentColumnList { + constructor(private documentList: DocumentList) { + // saves reference to parent container + // so that content children can access it + } + + registerColumn(column: ContentColumnModel) { + if (column) { + this.documentList.columns.push(column); + } + } +} diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/content-column.d.ts b/ng2-components/ng2-alfresco-documentlist/src/components/content-column.d.ts new file mode 100644 index 0000000000..a2b4424dc2 --- /dev/null +++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-column.d.ts @@ -0,0 +1,25 @@ +/** + * @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 } from 'angular2/core'; +import { ContentColumnList } from './content-column-list'; +export declare class ContentColumn implements OnInit { + private list; + title: string; + source: string; + constructor(list: ContentColumnList); + ngOnInit(): void; +} diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/content-column.js b/ng2-components/ng2-alfresco-documentlist/src/components/content-column.js new file mode 100644 index 0000000000..31c87549af --- /dev/null +++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-column.js @@ -0,0 +1,75 @@ +/** + * @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', './content-column-list', './../models/content-column.model'], 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_column_list_1, content_column_model_1; + var ContentColumn; + return { + setters:[ + function (core_1_1) { + core_1 = core_1_1; + }, + function (content_column_list_1_1) { + content_column_list_1 = content_column_list_1_1; + }, + function (content_column_model_1_1) { + content_column_model_1 = content_column_model_1_1; + }], + execute: function() { + ContentColumn = (function () { + function ContentColumn(list) { + this.list = list; + this.title = ''; + } + ContentColumn.prototype.ngOnInit = function () { + var model = new content_column_model_1.ContentColumnModel(); + model.title = this.title; + model.source = this.source; + this.list.registerColumn(model); + }; + __decorate([ + core_1.Input(), + __metadata('design:type', String) + ], ContentColumn.prototype, "title", void 0); + __decorate([ + core_1.Input(), + __metadata('design:type', String) + ], ContentColumn.prototype, "source", void 0); + ContentColumn = __decorate([ + core_1.Component({ + selector: 'content-column', + template: '' + }), + __metadata('design:paramtypes', [content_column_list_1.ContentColumnList]) + ], ContentColumn); + return ContentColumn; + }()); + exports_1("ContentColumn", ContentColumn); + } + } +}); +//# sourceMappingURL=content-column.js.map \ No newline at end of file diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/content-column.js.map b/ng2-components/ng2-alfresco-documentlist/src/components/content-column.js.map new file mode 100644 index 0000000000..7666a9467f --- /dev/null +++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-column.js.map @@ -0,0 +1 @@ +{"version":3,"file":"content-column.js","sourceRoot":"","sources":["content-column.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;YAUH;gBAII,uBACY,IAAuB;oBAAvB,SAAI,GAAJ,IAAI,CAAmB;oBAJ1B,UAAK,GAAW,EAAE,CAAC;gBAK5B,CAAC;gBAED,gCAAQ,GAAR;oBACI,IAAI,KAAK,GAAG,IAAI,yCAAkB,EAAE,CAAC;oBACrC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;oBACzB,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;oBAE3B,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;gBACpC,CAAC;gBAbD;oBAAC,YAAK,EAAE;;4DAAA;gBACR;oBAAC,YAAK,EAAE;;6DAAA;gBANZ;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,gBAAgB;wBAC1B,QAAQ,EAAE,EAAE;qBACf,CAAC;;iCAAA;gBAgBF,oBAAC;YAAD,CAAC,AAfD,IAeC;YAfD,yCAeC,CAAA"} \ No newline at end of file diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/content-column.ts b/ng2-components/ng2-alfresco-documentlist/src/components/content-column.ts new file mode 100644 index 0000000000..af91a443df --- /dev/null +++ b/ng2-components/ng2-alfresco-documentlist/src/components/content-column.ts @@ -0,0 +1,41 @@ +/** + * @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} from 'angular2/core'; +import {ContentColumnList} from './content-column-list' +import {ContentColumnModel} from './../models/content-column.model'; + +@Component({ + selector: 'content-column', + template: '' +}) +export class ContentColumn implements OnInit { + @Input() title: string = ''; + @Input() source: string; + + constructor( + private list: ContentColumnList) { + } + + ngOnInit() { + let model = new ContentColumnModel(); + model.title = this.title; + model.source = this.source; + + this.list.registerColumn(model); + } +} diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.d.ts b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.d.ts index 8b0389e53b..47b2d5fdbb 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.d.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.d.ts @@ -19,6 +19,7 @@ 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'; +import { ContentColumnModel } from './../models/content-column.model'; export declare class DocumentList implements OnInit, AfterViewChecked { private _alfrescoService; navigate: boolean; @@ -38,6 +39,7 @@ export declare class DocumentList implements OnInit, AfterViewChecked { quickDocumentActions: ContentActionModel[]; folderActions: ContentActionModel[]; quickFolderActions: ContentActionModel[]; + columns: ContentColumnModel[]; canNavigateParent(): boolean; constructor(_alfrescoService: AlfrescoService); ngOnInit(): void; diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.html b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.html index eb39fa7873..056d555e01 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.html +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.html @@ -11,13 +11,15 @@ Name + + {{col.title}} - +