diff --git a/.gitignore b/.gitignore
index b54c390925a..1d7f61df3b3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,4 +16,6 @@ src/environments/
/demo-shell-ng2/ng2-components/
.happypack/
.happypack/
-.history
\ No newline at end of file
+.history
+package-lock.*
+/ng2-components/ng2-alfresco-core/prebuilt-themes/
diff --git a/.travis.yml b/.travis.yml
index fea7da6b574..0a8fb4f28f0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,7 +19,7 @@ install:
if ([ "$TRAVIS_BRANCH" = "master" ]); then
(./scripts/npm-build-all.sh || exit 1;);
else
- (./scripts/npm-build-all.sh -gitjsapi development || exit 1;);
+ (./scripts/npm-build-all.sh -vjsapi alpha || exit 1;);
fi
fi
@@ -34,7 +34,7 @@ script:
if ([ "$TRAVIS_BRANCH" = "master" ]); then
(./scripts/start.sh -t -ss || exit 1;);
else
- (./scripts/start.sh -dev -t -ss -gitjsapi development || exit 1;);
+ (./scripts/start.sh -dev -t -ss -vjsapi alpha || exit 1;);
fi
fi
diff --git a/demo-shell-ng2/app.config-dev.json b/demo-shell-ng2/app.config-dev.json
index d596b1c58b6..e62d118d6e9 100644
--- a/demo-shell-ng2/app.config-dev.json
+++ b/demo-shell-ng2/app.config-dev.json
@@ -2,7 +2,7 @@
"ecmHost": "http://{hostname}:{port}/ecm",
"bpmHost": "http://{hostname}:{port}/bpm",
"application": {
- "name": "Alfresco"
+ "name": "Alfresco ADF Appplication"
},
"pagination": {
"size": 25
@@ -25,5 +25,231 @@
}
]
}
+ },
+ "document-list": {
+ "supportedPageSizes": [5, 10, 15, 20],
+ "presets": {
+ "-trashcan-": [
+ {
+ "key": "$thumbnail",
+ "type": "image",
+ "srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
+ "sortable": false
+ },
+ {
+ "key": "name",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
+ "cssClass": "full-width ellipsis-cell",
+ "sortable": true
+ },
+ {
+ "key": "path",
+ "type": "location",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
+ "format": "/files",
+ "sortable": true
+ },
+ {
+ "key": "content.sizeInBytes",
+ "type": "fileSize",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
+ "sortable": true
+ },
+ {
+ "key": "archivedAt",
+ "type": "date",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.DELETED_ON",
+ "format": "timeAgo",
+ "sortable": true
+ },
+ {
+ "key": "archivedByUser.displayName",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.DELETED_BY",
+ "sortable": true
+ }
+ ],
+ "-sites-": [
+ {
+ "key": "$thumbnail",
+ "type": "image",
+ "srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
+ "sortable": false
+ },
+ {
+ "key": "title",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
+ "cssClass": "full-width ellipsis-cell",
+ "sortable": true
+ },
+ {
+ "key": "visibility",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.STATUS",
+ "sortable": true
+ }
+ ],
+ "-favorites-": [
+ {
+ "key": "$thumbnail",
+ "type": "image",
+ "srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
+ "sortable": false
+ },
+ {
+ "key": "name",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
+ "cssClass": "full-width ellipsis-cell",
+ "sortable": true
+ },
+ {
+ "key": "path",
+ "type": "location",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
+ "format": "/files",
+ "sortable": true
+ },
+ {
+ "key": "content.sizeInBytes",
+ "type": "fileSize",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
+ "sortable": true
+ },
+ {
+ "key": "modifiedAt",
+ "type": "date",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
+ "format": "timeAgo",
+ "sortable": true
+ },
+ {
+ "key": "modifiedByUser.displayName",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_BY",
+ "sortable": true
+ }
+ ],
+ "-recent-": [
+ {
+ "key": "$thumbnail",
+ "type": "image",
+ "srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
+ "sortable": false
+ },
+ {
+ "key": "name",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
+ "cssClass": "full-width ellipsis-cell",
+ "sortable": true
+ },
+ {
+ "key": "path",
+ "type": "location",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
+ "cssClass": "ellipsis-cell",
+ "format": "/files",
+ "sortable": true
+ },
+ {
+ "key": "content.sizeInBytes",
+ "type": "fileSize",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
+ "sortable": true
+ },
+ {
+ "key": "modifiedAt",
+ "type": "date",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
+ "format": "timeAgo",
+ "sortable": true
+ }
+ ],
+ "-sharedlinks-": [
+ {
+ "key": "$thumbnail",
+ "type": "image",
+ "srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
+ "sortable": false
+ },
+ {
+ "key": "name",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
+ "cssClass": "full-width ellipsis-cell",
+ "sortable": true
+ },
+ {
+ "key": "path",
+ "type": "location",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
+ "cssClass": "ellipsis-cell",
+ "format": "/files",
+ "sortable": true
+ },
+ {
+ "key": "content.sizeInBytes",
+ "type": "fileSize",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
+ "sortable": true
+ },
+ {
+ "key": "modifiedAt",
+ "type": "date",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
+ "format": "timeAgo",
+ "sortable": true
+ },
+ {
+ "key": "modifiedByUser.displayName",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_BY",
+ "sortable": true
+ },
+ {
+ "key": "sharedByUser.displayName",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.SHARED_BY",
+ "sortable": true
+ }
+ ],
+ "default": [
+ {
+ "key": "$thumbnail",
+ "type": "image",
+ "srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
+ "sortable": false
+ },
+ {
+ "key": "name",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
+ "cssClass": "full-width ellipsis-cell",
+ "sortable": true
+ },
+ {
+ "key": "content.sizeInBytes",
+ "type": "fileSize",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
+ "sortable": true
+ },
+ {
+ "key": "modifiedAt",
+ "type": "date",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
+ "format": "timeAgo",
+ "sortable": true
+ },
+ {
+ "key": "modifiedByUser.displayName",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_BY",
+ "sortable": true
+ }
+ ]
+ }
}
}
diff --git a/demo-shell-ng2/app.config-prod.json b/demo-shell-ng2/app.config-prod.json
index fb64e6299ff..5cb0efa9dd9 100644
--- a/demo-shell-ng2/app.config-prod.json
+++ b/demo-shell-ng2/app.config-prod.json
@@ -2,7 +2,7 @@
"ecmHost": "http://{hostname}",
"bpmHost": "http://{hostname}",
"application": {
- "name": "Alfresco"
+ "name": "Alfresco ADF Appplication"
},
"pagination": {
"size": 25
@@ -25,5 +25,231 @@
}
]
}
+ },
+ "document-list": {
+ "supportedPageSizes": [5, 10, 15, 20],
+ "presets": {
+ "-trashcan-": [
+ {
+ "key": "$thumbnail",
+ "type": "image",
+ "srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
+ "sortable": false
+ },
+ {
+ "key": "name",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
+ "cssClass": "full-width ellipsis-cell",
+ "sortable": true
+ },
+ {
+ "key": "path",
+ "type": "location",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
+ "format": "/files",
+ "sortable": true
+ },
+ {
+ "key": "content.sizeInBytes",
+ "type": "fileSize",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
+ "sortable": true
+ },
+ {
+ "key": "archivedAt",
+ "type": "date",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.DELETED_ON",
+ "format": "timeAgo",
+ "sortable": true
+ },
+ {
+ "key": "archivedByUser.displayName",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.DELETED_BY",
+ "sortable": true
+ }
+ ],
+ "-sites-": [
+ {
+ "key": "$thumbnail",
+ "type": "image",
+ "srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
+ "sortable": false
+ },
+ {
+ "key": "title",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
+ "cssClass": "full-width ellipsis-cell",
+ "sortable": true
+ },
+ {
+ "key": "visibility",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.STATUS",
+ "sortable": true
+ }
+ ],
+ "-favorites-": [
+ {
+ "key": "$thumbnail",
+ "type": "image",
+ "srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
+ "sortable": false
+ },
+ {
+ "key": "name",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
+ "cssClass": "full-width ellipsis-cell",
+ "sortable": true
+ },
+ {
+ "key": "path",
+ "type": "location",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
+ "format": "/files",
+ "sortable": true
+ },
+ {
+ "key": "content.sizeInBytes",
+ "type": "fileSize",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
+ "sortable": true
+ },
+ {
+ "key": "modifiedAt",
+ "type": "date",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
+ "format": "timeAgo",
+ "sortable": true
+ },
+ {
+ "key": "modifiedByUser.displayName",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_BY",
+ "sortable": true
+ }
+ ],
+ "-recent-": [
+ {
+ "key": "$thumbnail",
+ "type": "image",
+ "srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
+ "sortable": false
+ },
+ {
+ "key": "name",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
+ "cssClass": "full-width ellipsis-cell",
+ "sortable": true
+ },
+ {
+ "key": "path",
+ "type": "location",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
+ "cssClass": "ellipsis-cell",
+ "format": "/files",
+ "sortable": true
+ },
+ {
+ "key": "content.sizeInBytes",
+ "type": "fileSize",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
+ "sortable": true
+ },
+ {
+ "key": "modifiedAt",
+ "type": "date",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
+ "format": "timeAgo",
+ "sortable": true
+ }
+ ],
+ "-sharedlinks-": [
+ {
+ "key": "$thumbnail",
+ "type": "image",
+ "srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
+ "sortable": false
+ },
+ {
+ "key": "name",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
+ "cssClass": "full-width ellipsis-cell",
+ "sortable": true
+ },
+ {
+ "key": "path",
+ "type": "location",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.LOCATION",
+ "cssClass": "ellipsis-cell",
+ "format": "/files",
+ "sortable": true
+ },
+ {
+ "key": "content.sizeInBytes",
+ "type": "fileSize",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
+ "sortable": true
+ },
+ {
+ "key": "modifiedAt",
+ "type": "date",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
+ "format": "timeAgo",
+ "sortable": true
+ },
+ {
+ "key": "modifiedByUser.displayName",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_BY",
+ "sortable": true
+ },
+ {
+ "key": "sharedByUser.displayName",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.SHARED_BY",
+ "sortable": true
+ }
+ ],
+ "default": [
+ {
+ "key": "$thumbnail",
+ "type": "image",
+ "srTitle": "ADF-DOCUMENT-LIST.LAYOUT.THUMBNAIL",
+ "sortable": false
+ },
+ {
+ "key": "name",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.NAME",
+ "cssClass": "full-width ellipsis-cell",
+ "sortable": true
+ },
+ {
+ "key": "content.sizeInBytes",
+ "type": "fileSize",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.SIZE",
+ "sortable": true
+ },
+ {
+ "key": "modifiedAt",
+ "type": "date",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_ON",
+ "format": "timeAgo",
+ "sortable": true
+ },
+ {
+ "key": "modifiedByUser.displayName",
+ "type": "text",
+ "title": "ADF-DOCUMENT-LIST.LAYOUT.MODIFIED_BY",
+ "sortable": true
+ }
+ ]
+ }
}
}
diff --git a/demo-shell-ng2/app/app.component.html b/demo-shell-ng2/app/app.component.html
index 92feb690989..90c6b646328 100644
--- a/demo-shell-ng2/app/app.component.html
+++ b/demo-shell-ng2/app/app.component.html
@@ -1,80 +1 @@
-
-
-
-
- ADF Demo Application
-
-
-
-
-
- Home
- Content Services
- Process Services
- Login
-
-
-
-
-
-
-
-
-
-
-
-
- extension
- DL: Custom Sources
-
-
- view_module
- DataTable
-
-
- poll
- Form
-
-
- library_books
- Form List
-
-
- file_upload
- Uploader
-
-
- extension
- Webscript
-
-
- local_offer
- Tag
-
-
- thumb_up
- Social
-
-
- settings
- Settings
-
-
- info_outline
- About
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/demo-shell-ng2/app/app.component.scss b/demo-shell-ng2/app/app.component.scss
deleted file mode 100644
index 66c299f9010..00000000000
--- a/demo-shell-ng2/app/app.component.scss
+++ /dev/null
@@ -1,24 +0,0 @@
-.user-profile {
- margin-right: 10px;
-}
-
-.app-menu--spacer {
- flex: 1 1 auto;
-}
-
-.p-10 {
- padding: 10px;
-}
-
-.m-10 {
- margin: 10px;
-}
-
-._dialog_overlay {
- position: static !important;
-}
-
-.md-simple-snackbar-action {
- border: 0px;
- cursor: pointer;
-}
diff --git a/demo-shell-ng2/app/app.component.ts b/demo-shell-ng2/app/app.component.ts
index c95712a3c2e..d25c345123a 100644
--- a/demo-shell-ng2/app/app.component.ts
+++ b/demo-shell-ng2/app/app.component.ts
@@ -16,73 +16,25 @@
*/
import { Component, ViewEncapsulation } from '@angular/core';
-import { Router } from '@angular/router';
-import {
- AlfrescoAuthenticationService,
- AlfrescoSettingsService,
- AlfrescoTranslationService,
- LogService,
- StorageService
-} from 'ng2-alfresco-core';
-
-declare var document: any;
+import { ActivatedRoute, Router } from '@angular/router';
+import { AlfrescoSettingsService, PageTitleService, StorageService } from 'ng2-alfresco-core';
@Component({
selector: 'adf-app',
templateUrl: './app.component.html',
- styleUrls: ['./app.component.scss', './theme.scss'],
+ styleUrls: ['./theme.scss'],
encapsulation: ViewEncapsulation.None
})
export class AppComponent {
searchTerm: string = '';
- constructor(private authService: AlfrescoAuthenticationService,
- private router: Router,
- private settingsService: AlfrescoSettingsService,
- private translateService: AlfrescoTranslationService,
+ constructor(private settingsService: AlfrescoSettingsService,
private storage: StorageService,
- private logService: LogService) {
+ pageTitleService: PageTitleService,
+ route: ActivatedRoute,
+ router: Router) {
this.setProvider();
- }
-
- isAPageWithHeaderBar(): boolean {
- return location.pathname === '/login' || location.pathname === '/settings';
- }
-
- onLogout(event) {
- event.preventDefault();
- this.authService.logout()
- .subscribe(
- () => {
- this.navigateToLogin();
- },
- (error: any) => {
- if (error && error.response && error.response.status === 401) {
- this.navigateToLogin();
- } else {
- this.logService.error('An unknown error occurred while logging out', error);
- this.navigateToLogin();
- }
- }
- );
- }
-
- navigateToLogin() {
- this.router.navigate(['/login']);
- }
-
- onToggleSearch(event) {
- let expandedHeaderClass = 'header-search-expanded',
- header = document.querySelector('header');
- if (event.expanded) {
- header.classList.add(expandedHeaderClass);
- } else {
- header.classList.remove(expandedHeaderClass);
- }
- }
-
- changeLanguage(lang: string) {
- this.translateService.use(lang);
+ pageTitleService.setTitle();
}
private setProvider() {
diff --git a/demo-shell-ng2/app/app.module.ts b/demo-shell-ng2/app/app.module.ts
index d184360c00c..c5073419f35 100644
--- a/demo-shell-ng2/app/app.module.ts
+++ b/demo-shell-ng2/app/app.module.ts
@@ -31,15 +31,18 @@ import { SearchModule } from 'ng2-alfresco-search';
import { SocialModule } from 'ng2-alfresco-social';
import { TagModule } from 'ng2-alfresco-tag';
import { UploadModule } from 'ng2-alfresco-upload';
-import { UserInfoComponentModule } from 'ng2-alfresco-userinfo';
+import { UserInfoModule } from 'ng2-alfresco-userinfo';
import { ViewerModule } from 'ng2-alfresco-viewer';
import { WebScriptModule } from 'ng2-alfresco-webscript';
+import { FlexLayoutModule } from '@angular/flex-layout';
import { Editor3DModule } from 'ng2-3d-editor';
import { ChartsModule } from 'ng2-charts';
import { AppComponent } from './app.component';
import { routing } from './app.routes';
import { CustomEditorsModule } from './components/activiti/custom-editor/custom-editor.component';
+import { AppLayoutComponent } from './components/app-layout/app-layout.component';
+import { FileViewComponent } from './components/file-view/file-view.component';
import { FormListDemoComponent } from './components/form/form-list-demo.component';
import { ThemePickerModule } from './components/theme-picker/theme-picker';
import { MaterialModule } from './material.module';
@@ -69,38 +72,32 @@ import {
WebscriptComponent
} from './components/index';
-let appConfigFile = 'app.config-dev.json';
-if (process.env.ENV === 'production') {
- appConfigFile = 'app.config-prod.json';
-}
-
@NgModule({
imports: [
BrowserModule,
routing,
- CoreModule.forRoot({
- appConfigFile: appConfigFile
- }),
+ CoreModule,
MaterialModule,
- LoginModule.forRoot(),
- SearchModule.forRoot(),
- DataTableModule.forRoot(),
- DocumentListModule.forRoot(),
- UploadModule.forRoot(),
- TagModule.forRoot(),
- SocialModule.forRoot(),
- WebScriptModule.forRoot(),
- ViewerModule.forRoot(),
- ActivitiFormModule.forRoot(),
- ActivitiTaskListModule.forRoot(),
- ActivitiProcessListModule.forRoot(),
- UserInfoComponentModule.forRoot(),
- AnalyticsModule.forRoot(),
- DiagramsModule.forRoot(),
+ LoginModule,
+ SearchModule,
+ DataTableModule,
+ DocumentListModule,
+ UploadModule,
+ TagModule,
+ SocialModule,
+ WebScriptModule,
+ ViewerModule,
+ ActivitiFormModule,
+ ActivitiTaskListModule,
+ ActivitiProcessListModule,
+ UserInfoModule,
+ AnalyticsModule,
+ DiagramsModule,
CustomEditorsModule,
- Editor3DModule.forRoot(),
+ Editor3DModule,
ChartsModule,
- ThemePickerModule
+ ThemePickerModule,
+ FlexLayoutModule
],
declarations: [
AppComponent,
@@ -124,7 +121,9 @@ if (process.env.ENV === 'production') {
SettingsComponent,
FormDemoComponent,
FormListDemoComponent,
- CustomSourcesComponent
+ CustomSourcesComponent,
+ FileViewComponent,
+ AppLayoutComponent
],
providers: [
{ provide: AppConfigService, useClass: DebugAppConfigService },
diff --git a/demo-shell-ng2/app/app.routes.ts b/demo-shell-ng2/app/app.routes.ts
index ecc6bea0a93..829aab11ada 100644
--- a/demo-shell-ng2/app/app.routes.ts
+++ b/demo-shell-ng2/app/app.routes.ts
@@ -18,6 +18,7 @@
import { ModuleWithProviders } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AuthGuard, AuthGuardBpm, AuthGuardEcm } from 'ng2-alfresco-core';
+import { AppLayoutComponent } from './components/app-layout/app-layout.component';
import {
AboutComponent,
@@ -39,113 +40,119 @@ import {
} from './components/index';
import { UploadButtonComponent } from 'ng2-alfresco-upload';
+import { FileViewComponent } from './components/file-view/file-view.component';
import { CustomSourcesComponent } from './components/files/custom-sources.component';
import { FormListDemoComponent } from './components/form/form-list-demo.component';
export const appRoutes: Routes = [
{ path: 'login', component: LoginDemoComponent },
+ { path: 'settings', component: SettingsComponent },
+ { path: 'files/:nodeId/view', component: FileViewComponent, canActivate: [ AuthGuardEcm ] },
{
path: '',
- component: HomeComponent,
- canActivate: [AuthGuard]
- },
- {
- path: 'home',
- component: HomeComponent,
- canActivate: [AuthGuard]
- },
- {
- path: 'files',
- component: FilesComponent,
- canActivate: [AuthGuardEcm]
- },
- {
- path: 'files/:id',
- component: FilesComponent,
- canActivate: [AuthGuardEcm]
- },
- {
- path: 'dl-custom-sources',
- component: CustomSourcesComponent,
- canActivate: [AuthGuardEcm]
- },
- {
- path: 'datatable',
- component: DataTableDemoComponent,
- canActivate: [AuthGuard]
- },
- {
- path: 'uploader',
- component: UploadButtonComponent,
- canActivate: [AuthGuardEcm]
- },
- {
- path: 'search',
- component: SearchComponent,
- canActivate: [AuthGuardEcm]
- },
- {
- path: 'activiti',
- component: ActivitiAppsViewComponent,
- canActivate: [AuthGuardBpm]
- },
- {
- path: 'activiti/apps',
- component: ActivitiAppsViewComponent,
- canActivate: [AuthGuardBpm]
- },
- {
- path: 'activiti/apps/:appId/tasks',
- component: ActivitiDemoComponent,
- canActivate: [AuthGuardBpm]
- },
- {
- path: 'activiti/apps/:appId/processes',
- component: ActivitiDemoComponent,
- canActivate: [AuthGuardBpm]
- },
- {
- path: 'activiti/apps/:appId/diagram/:processDefinitionId',
- component: ActivitiShowDiagramComponent,
- canActivate: [AuthGuardBpm]
- },
- // TODO: check if neeeded
- {
- path: 'activiti/appId/:appId',
- component: ActivitiDemoComponent,
- canActivate: [AuthGuardBpm]
- },
- // TODO: check if needed
- {
- path: 'activiti/tasks/:id',
- component: FormViewerComponent,
- canActivate: [AuthGuardBpm]
- },
- // TODO: check if needed
- {
- path: 'activiti/tasksnode/:id',
- component: FormNodeViewerComponent,
- canActivate: [AuthGuardBpm]
- },
- {
- path: 'webscript',
- component: WebscriptComponent,
- canActivate: [AuthGuardEcm]
- },
- {
- path: 'tag',
- component: TagComponent,
- canActivate: [AuthGuardEcm]
- },
- {
- path: 'social',
- component: SocialComponent,
- canActivate: [AuthGuardEcm]
- },
- { path: 'about', component: AboutComponent },
- { path: 'settings', component: SettingsComponent },
- { path: 'form', component: FormDemoComponent },
- { path: 'form-list', component: FormListDemoComponent }
+ component: AppLayoutComponent,
+ canActivate: [AuthGuard],
+ children: [
+ {
+ path: '',
+ component: HomeComponent
+ },
+ {
+ path: 'home',
+ component: HomeComponent
+ },
+ {
+ path: 'files',
+ component: FilesComponent,
+ canActivate: [AuthGuardEcm]
+ },
+ {
+ path: 'files/:id',
+ component: FilesComponent,
+ canActivate: [AuthGuardEcm]
+ },
+ {
+ path: 'dl-custom-sources',
+ component: CustomSourcesComponent,
+ canActivate: [AuthGuardEcm]
+ },
+ {
+ path: 'datatable',
+ component: DataTableDemoComponent
+ },
+ {
+ path: 'uploader',
+ component: UploadButtonComponent,
+ canActivate: [AuthGuardEcm]
+ },
+ {
+ path: 'search',
+ component: SearchComponent,
+ canActivate: [AuthGuardEcm]
+ },
+ {
+ path: 'activiti',
+ component: ActivitiAppsViewComponent,
+ canActivate: [AuthGuardBpm]
+ },
+ {
+ path: 'activiti/apps',
+ component: ActivitiAppsViewComponent,
+ canActivate: [AuthGuardBpm]
+ },
+ {
+ path: 'activiti/apps/:appId/tasks',
+ component: ActivitiDemoComponent,
+ canActivate: [AuthGuardBpm]
+ },
+ {
+ path: 'activiti/apps/:appId/processes',
+ component: ActivitiDemoComponent,
+ canActivate: [AuthGuardBpm]
+ },
+ {
+ path: 'activiti/apps/:appId/diagram/:processDefinitionId',
+ component: ActivitiShowDiagramComponent,
+ canActivate: [AuthGuardBpm]
+ },
+ // TODO: check if neeeded
+ {
+ path: 'activiti/appId/:appId',
+ component: ActivitiDemoComponent,
+ canActivate: [AuthGuardBpm]
+ },
+ // TODO: check if needed
+ {
+ path: 'activiti/tasks/:id',
+ component: FormViewerComponent,
+ canActivate: [AuthGuardBpm]
+ },
+ // TODO: check if needed
+ {
+ path: 'activiti/tasksnode/:id',
+ component: FormNodeViewerComponent,
+ canActivate: [AuthGuardBpm]
+ },
+ {
+ path: 'webscript',
+ component: WebscriptComponent,
+ canActivate: [AuthGuardEcm]
+ },
+ {
+ path: 'tag',
+ component: TagComponent,
+ canActivate: [AuthGuardEcm]
+ },
+ {
+ path: 'social',
+ component: SocialComponent,
+ canActivate: [AuthGuardEcm]
+ },
+ { path: 'about', component: AboutComponent },
+ { path: 'form', component: FormDemoComponent },
+ { path: 'form-list', component: FormListDemoComponent }
+ ]
+ }
];
export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes);
diff --git a/demo-shell-ng2/app/components/about/about.component.html b/demo-shell-ng2/app/components/about/about.component.html
index 284fd42d37e..ac9815a75f7 100644
--- a/demo-shell-ng2/app/components/about/about.component.html
+++ b/demo-shell-ng2/app/components/about/about.component.html
@@ -16,20 +16,7 @@
Product Versions
BPM
{{ bpmVersion.edition }}
-
-
- Major Version |
- Revision Version |
- Minor Version |
- Type |
-
-
- {{ bpmVersion.majorVersion }} |
- {{ bpmVersion.revisionVersion }} |
- {{ bpmVersion.minorVersion }} |
- {{ bpmVersion.type }} |
-
-
+ {{ bpmVersion.majorVersion }}.{{ bpmVersion.minorVersion }}.{{ bpmVersion.revisionVersion }}
ECM
@@ -38,64 +25,14 @@
ECM
{{ ecmVersion.version.display }}
License
-
-
- Issued At |
- Expires At |
- Remaining Days |
- Holder |
- Mode |
- Is Cluster Enabled |
- Is Cryptodoc Enable |
-
-
- {{ ecmVersion.license.issuedAt }} |
- {{ ecmVersion.license.expiresAt }} |
- {{ ecmVersion.license.remainingDays }} |
- {{ ecmVersion.license.holder }} |
- {{ ecmVersion.license.mode }} |
- {{ ecmVersion.license.isClusterEnabled }} |
- {{ ecmVersion.license.isCryptodocEnabled }} |
-
-
+
+
Status
-
-
- ReadOnly |
- Is Audit Enable |
- Is quick shared enable |
- Thumbnail Generation |
-
-
- {{ ecmVersion.status.isReadOnly }} |
- {{ ecmVersion.status.isAuditEnabled }} |
- {{ ecmVersion.status.isQuickShareEnabled }} |
- {{ ecmVersion.status.isThumbnailGenerationEnabled }} |
-
-
+
+
Modules
-
-
- ID |
- Title |
- Description |
- Version |
- Install Date |
- Install State |
- Version Minor |
- Version Max |
-
-
- {{ module.id }} |
- {{ module.title }} |
- {{ module.description }} |
- {{ module.version }} |
- {{ module.installDate }} |
- {{ module.installState }} |
- {{ module.versionMin }} |
- {{ module.versionMax }} |
-
-
+
+
@@ -108,5 +45,5 @@
Source code
Packages
Current project is using the following ADF libraries:
-
+
diff --git a/demo-shell-ng2/app/components/about/about.component.ts b/demo-shell-ng2/app/components/about/about.component.ts
index 5b54dc5b33a..130b6f72e12 100644
--- a/demo-shell-ng2/app/components/about/about.component.ts
+++ b/demo-shell-ng2/app/components/about/about.component.ts
@@ -17,20 +17,23 @@
import { Component, OnInit } from '@angular/core';
import { Http } from '@angular/http';
-import { AlfrescoAuthenticationService, AppConfigService, BpmProductVersionModel, DiscoveryApiService, EcmProductVersionModel, LogService } from 'ng2-alfresco-core';
+import { AlfrescoAuthenticationService, AppConfigService, BpmProductVersionModel, DiscoveryApiService, EcmProductVersionModel } from 'ng2-alfresco-core';
import { ObjectDataTableAdapter } from 'ng2-alfresco-datatable';
@Component({
- selector: 'about-page',
+ selector: 'adf-about-page',
templateUrl: './about.component.html',
styleUrls: ['./about.component.css']
})
export class AboutComponent implements OnInit {
data: ObjectDataTableAdapter;
+ status: ObjectDataTableAdapter;
+ license: ObjectDataTableAdapter;
+ modules: ObjectDataTableAdapter;
githubUrlCommitAlpha: string = 'https://github.com/Alfresco/alfresco-ng2-components/commits/';
- configFile: string = '';
+ configFile: string = 'app.config.json';
ecmHost: string = '';
bpmHost: string = '';
@@ -40,7 +43,6 @@ export class AboutComponent implements OnInit {
constructor(private http: Http,
private appConfig: AppConfigService,
private authService: AlfrescoAuthenticationService,
- private logService: LogService,
private discovery: DiscoveryApiService) {
}
@@ -49,6 +51,33 @@ export class AboutComponent implements OnInit {
if (this.authService.isEcmLoggedIn()) {
this.discovery.getEcmProductInfo().subscribe((ecmVers) => {
this.ecmVersion = ecmVers;
+
+ this.modules = new ObjectDataTableAdapter(this.ecmVersion.modules, [
+ {type: 'text', key: 'id', title: 'ID', sortable: true},
+ {type: 'text', key: 'title', title: 'Title', sortable: true},
+ {type: 'text', key: 'version', title: 'Description', sortable: true},
+ {type: 'text', key: 'installDate', title: 'Install Date', sortable: true},
+ {type: 'text', key: 'installState', title: 'Install State', sortable: true},
+ {type: 'text', key: 'versionMin', title: 'Version Minor', sortable: true},
+ {type: 'text', key: 'versionMax', title: 'Version Max', sortable: true}
+ ]);
+
+ this.status = new ObjectDataTableAdapter([this.ecmVersion.status], [
+ {type: 'text', key: 'isReadOnly', title: 'ReadOnly', sortable: true},
+ {type: 'text', key: 'isAuditEnabled', title: 'Is Audit Enable', sortable: true},
+ {type: 'text', key: 'isQuickShareEnabled', title: 'Is quick shared enable', sortable: true},
+ {type: 'text', key: 'isThumbnailGenerationEnabled', title: 'Thumbnail Generation', sortable: true}
+ ]);
+
+ this.license = new ObjectDataTableAdapter([this.ecmVersion.license], [
+ {type: 'text', key: 'issuedAt', title: 'Issued At', sortable: true},
+ {type: 'text', key: 'expiresAt', title: 'Expires At', sortable: true},
+ {type: 'text', key: 'remainingDays', title: 'Remaining Days', sortable: true},
+ {type: 'text', key: 'holder', title: 'Holder', sortable: true},
+ {type: 'text', key: 'mode', title: 'Is Cluster Enabled', sortable: true},
+ {type: 'text', key: 'isClusterEnabled', title: 'Is Cluster Enabled', sortable: true},
+ {type: 'text', key: 'isCryptodocEnabled', title: 'Is Cryptodoc Enable', sortable: true}
+ ]);
});
}
@@ -62,13 +91,11 @@ export class AboutComponent implements OnInit {
let regexp = new RegExp('^(ng2-activiti|ng2-alfresco|alfresco-)');
let alfrescoPackages = Object.keys(response.json().dependencies).filter((val) => {
- this.logService.log(val);
return regexp.test(val);
});
let alfrescoPackagesTableRepresentation = [];
alfrescoPackages.forEach((val) => {
- this.logService.log(response.json().dependencies[val]);
alfrescoPackagesTableRepresentation.push({
name: val,
version: response.json().dependencies[val].version
@@ -77,15 +104,13 @@ export class AboutComponent implements OnInit {
this.gitHubLinkCreation(alfrescoPackagesTableRepresentation);
- this.logService.log(alfrescoPackagesTableRepresentation);
-
this.data = new ObjectDataTableAdapter(alfrescoPackagesTableRepresentation, [
{type: 'text', key: 'name', title: 'Name', sortable: true},
{type: 'text', key: 'version', title: 'Version', sortable: true}
]);
+
});
- this.configFile = this.appConfig.configFile;
this.ecmHost = this.appConfig.get('ecmHost');
this.bpmHost = this.appConfig.get('bpmHost');
}
diff --git a/demo-shell-ng2/app/components/activiti/activiti-demo.component.css b/demo-shell-ng2/app/components/activiti/activiti-demo.component.css
deleted file mode 100644
index cb7bea8cf30..00000000000
--- a/demo-shell-ng2/app/components/activiti/activiti-demo.component.css
+++ /dev/null
@@ -1,88 +0,0 @@
-.activiti-task-list__item:hover {
- cursor: pointer;
- font-weight: bold;
-}
-
-.task-column {
- padding: 10px 10px 10px 10px;
-}
-
-.mdl-layout__header {
- z-index: 1;
-}
-
-.list-buttons {
- text-align: left;
- margin-bottom: 5px;
-}
-
-.adf-no-form-container {
- text-align: center;
- font-weight: 600;
- font-size: 18px;
- font-family: Muli;
- padding: 16px;
-}
-
-.action-header {
- border: 1px solid ;
- text-align: left;
-}
-
-.activiti-demo-grid {
- display: flex;
-}
-
-.activiti-demo-grid-item {
- margin: 4px;
- box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12);
- padding: 10px 10px 10px 10px;
-}
-
-.activiti-demo-list-buttons {
- margin-bottom: 24px;
-}
-
-.activiti-demo-list-buttons-start {
- width: 100%;
-}
-
-.activiti-demo-tasks-menu {
- min-width: 170px;
-}
-
-.activiti-demo-tasks-list {
- min-width: 510px;
- padding: 0;
-}
-
-.activiti-demo-tasks-details,
-.activiti-demo-tasks-start {
- flex-grow: 1;
- min-width: 680px;
-}
-
-.activiti-demo-tasks-list >>> .adf-data-table {
- border: none;
-}
-
-.activiti-demo-tasks-list >>> .adf-data-table tr,
-.activiti-demo-tasks-list >>> .adf-data-table td {
- height: 36px;
- font-size: 14px;
-}
-
-.activiti-demo-tasks-list >>> .adf-data-table td {
- padding-top: 0;
- padding-bottom: 0;
- border-bottom: none;
-}
-
-.activiti-demo-tasks-list >>> .adf-data-table th {
- padding-top: 0;
- padding-bottom: 0;
- height: 40px;
- vertical-align: middle;
- font-size: 14px;
-}
-
diff --git a/demo-shell-ng2/app/components/activiti/activiti-demo.component.html b/demo-shell-ng2/app/components/activiti/activiti-demo.component.html
index 168554bf11c..b91c008e984 100644
--- a/demo-shell-ng2/app/components/activiti/activiti-demo.component.html
+++ b/demo-shell-ng2/app/components/activiti/activiti-demo.component.html
@@ -1,8 +1,8 @@