diff --git a/demo-shell-ng2/app/app.component.html b/demo-shell-ng2/app/app.component.html
index 177abb6cec..4eec51ebb4 100644
--- a/demo-shell-ng2/app/app.component.html
+++ b/demo-shell-ng2/app/app.component.html
@@ -8,7 +8,8 @@
Alfresco
diff --git a/demo-shell-ng2/app/app.component.ts b/demo-shell-ng2/app/app.component.ts
index 9ee34cfbdd..89bc40c2a7 100644
--- a/demo-shell-ng2/app/app.component.ts
+++ b/demo-shell-ng2/app/app.component.ts
@@ -14,16 +14,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import {Component} from 'angular2/core';
-import {Router, RouteConfig, ROUTER_DIRECTIVES} from 'angular2/router';
-import {AlfrescoAuthenticationService} from 'ng2-alfresco-login/ng2-alfresco-login';
-import {MDL} from 'ng2-alfresco-core/material';
-import {FilesComponent} from './components/files/files.component';
-import {AlfrescoLoginComponent} from 'ng2-alfresco-login/ng2-alfresco-login';
-import {AuthRouterOutlet} from './components/router/AuthRouterOutlet';
-import {AlfrescoSettingsService} from 'ng2-alfresco-core/services';
-import {TranslateService, TranslatePipe} from 'ng2-translate/ng2-translate';
-import {UploadButtonComponent} from 'ng2-alfresco-upload/ng2-alfresco-upload';
+
+import { Component } from 'angular2/core';
+import { Router, RouteConfig, ROUTER_DIRECTIVES } from 'angular2/router';
+import { AlfrescoAuthenticationService } from 'ng2-alfresco-login/ng2-alfresco-login';
+import { MDL } from 'ng2-alfresco-core/material';
+import { FilesComponent } from './components/files/files.component';
+import { AlfrescoLoginComponent } from 'ng2-alfresco-login/ng2-alfresco-login';
+import { AuthRouterOutlet } from './components/router/AuthRouterOutlet';
+import { AlfrescoSettingsService } from 'ng2-alfresco-core/services';
+import { TranslateService, TranslatePipe } from 'ng2-translate/ng2-translate';
+import { UploadButtonComponent } from 'ng2-alfresco-upload/ng2-alfresco-upload';
+import { DataTableDemoComponent } from './components/datatable/datatable-demo.component';
declare var document: any;
@@ -36,26 +38,27 @@ declare var document: any;
@RouteConfig([
{path: '/home', name: 'Home', component: FilesComponent},
{path: '/', name: 'Files', component: FilesComponent, useAsDefault: true},
+ {path: '/datatable', name: 'DataTable', component: DataTableDemoComponent},
{path: '/uploader', name: 'Uploader', component: UploadButtonComponent},
{path: '/login', name: 'Login', component: AlfrescoLoginComponent}
])
export class AppComponent {
translate: TranslateService;
- constructor(public auth:AlfrescoAuthenticationService,
- public router:Router,
+ constructor(public auth: AlfrescoAuthenticationService,
+ public router: Router,
translate: TranslateService,
- alfrescoSettingsService:AlfrescoSettingsService) {
+ alfrescoSettingsService: AlfrescoSettingsService) {
alfrescoSettingsService.host = 'http://192.168.99.100:8080';
this.translationInit(translate);
}
- isActive(instruction:any[]):boolean {
+ isActive(instruction: any[]): boolean {
return this.router.isRouteActive(this.router.generate(instruction));
}
- isLoggedIn():boolean {
+ isLoggedIn(): boolean {
return this.auth.isLoggedIn();
}
@@ -67,7 +70,7 @@ export class AppComponent {
);
}
- changeLanguage(lang:string) {
+ changeLanguage(lang: string) {
this.translate.use(lang);
}
diff --git a/demo-shell-ng2/app/components/datatable/datatable-demo.component.html b/demo-shell-ng2/app/components/datatable/datatable-demo.component.html
new file mode 100644
index 0000000000..c018d6a9a8
--- /dev/null
+++ b/demo-shell-ng2/app/components/datatable/datatable-demo.component.html
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demo-shell-ng2/app/components/datatable/datatable-demo.component.ts b/demo-shell-ng2/app/components/datatable/datatable-demo.component.ts
new file mode 100644
index 0000000000..180e29e910
--- /dev/null
+++ b/demo-shell-ng2/app/components/datatable/datatable-demo.component.ts
@@ -0,0 +1,38 @@
+/**
+ * @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 {TranslatePipe} from 'ng2-translate/ng2-translate';
+
+import {
+ ALFRESCO_DATATABLE_DIRECTIVES,
+ ALFRESCO_DATATABLE_PROVIDERS
+} from 'ng2-alfresco-datatable/ng2-alfresco-datatable';
+
+declare let __moduleName:string;
+
+@Component({
+ moduleId: __moduleName,
+ selector: 'datatable-demo',
+ templateUrl: './datatable-demo.component.html',
+ directives: [ALFRESCO_DATATABLE_DIRECTIVES],
+ providers: [ALFRESCO_DATATABLE_PROVIDERS],
+ pipes: [TranslatePipe]
+})
+export class DataTableDemoComponent {
+
+}
diff --git a/demo-shell-ng2/app/css/app.css b/demo-shell-ng2/app/css/app.css
index 7b218e4b67..af87c72028 100644
--- a/demo-shell-ng2/app/css/app.css
+++ b/demo-shell-ng2/app/css/app.css
@@ -2,4 +2,8 @@
.p-10 {
padding: 10px;
-}
\ No newline at end of file
+}
+
+.m-10 {
+ margin: 10px;
+}
diff --git a/demo-shell-ng2/i18n/en.json b/demo-shell-ng2/i18n/en.json
index 8478e0ba6b..f5bbbccf7d 100644
--- a/demo-shell-ng2/i18n/en.json
+++ b/demo-shell-ng2/i18n/en.json
@@ -18,5 +18,24 @@
"CUSTOM": "Custom action"
}
}
+ },
+
+ "DATATABLE": {
+ "COLUMNS": {
+ "DISPLAY_NAME": "Display name",
+ "CREATED_BY": "Created by",
+ "CREATED_ON": "Created on"
+ },
+ "ACTIONS": {
+ "FOLDER": {
+ "SYSTEM_1": "System folder action 1",
+ "CUSTOM": "Custom folder action"
+ },
+ "DOCUMENT": {
+ "DOWNLOAD": "Download",
+ "SYSTEM_2": "System document action 2",
+ "CUSTOM": "Custom action"
+ }
+ }
}
}
diff --git a/demo-shell-ng2/index.html b/demo-shell-ng2/index.html
index 3bb44e5850..b337e0dcf9 100644
--- a/demo-shell-ng2/index.html
+++ b/demo-shell-ng2/index.html
@@ -37,6 +37,7 @@
map: {
'ng2-uploader': 'node_modules/ng2-uploader',
'ng2-alfresco-core': 'node_modules/ng2-alfresco-core',
+ 'ng2-alfresco-datatable': 'node_modules/ng2-alfresco-datatable',
'ng2-alfresco-documentlist': 'node_modules/ng2-alfresco-documentlist',
'ng2-alfresco-login': 'node_modules/ng2-alfresco-login',
'ng2-alfresco-upload': 'node_modules/ng2-alfresco-upload',
@@ -48,27 +49,14 @@
format: 'register',
defaultExtension: 'js'
},
- 'ng2-uploader': {
- defaultExtension: 'js'
- },
- 'ng2-alfresco-core': {
- defaultExtension: 'js'
- },
- 'ng2-alfresco-documentlist': {
- defaultExtension: 'js'
- },
- 'ng2-alfresco-login': {
- defaultExtension: 'js'
- },
- 'ng2-alfresco-upload': {
- defaultExtension: 'js'
- },
- 'ng2-translate': {
- defaultExtension: 'js'
- },
- 'rxjs': {
- defaultExtension: 'js'
- }
+ 'ng2-uploader': {defaultExtension: 'js'},
+ 'ng2-alfresco-core': {defaultExtension: 'js'},
+ 'ng2-alfresco-documentlist': {defaultExtension: 'js'},
+ 'ng2-alfresco-login': {defaultExtension: 'js'},
+ 'ng2-alfresco-upload': {defaultExtension: 'js'},
+ 'ng2-alfresco-datatable': {defaultExtension: 'js'},
+ 'ng2-translate': {defaultExtension: 'js'},
+ 'rxjs': {defaultExtension: 'js'}
}
});
System.import('app/main')