diff --git a/demo-shell-ng2/app/app.component.html b/demo-shell-ng2/app/app.component.html index 6ecf0aadbc..a509f46b33 100644 --- a/demo-shell-ng2/app/app.component.html +++ b/demo-shell-ng2/app/app.component.html @@ -1,97 +1,50 @@ - - - + + + + + {{link.icon}} + {{link.title}} + + + exit_to_app + Logout + + + - ADF Demo Application + + -
+ ADF Demo Application - +
- Home - Content Services - Process Services - Login + - - - - - - - + Home + Content Services + Process Services + Login - - - - - home - Home - - - folder_open - Content Services - - - device_hub - Process Services - - - vpn_key - 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 - - - -
+ + + + + + + +
+ + + - diff --git a/demo-shell-ng2/app/app.component.scss b/demo-shell-ng2/app/app.component.scss index 35a7d0c51f..6fe2bff64b 100644 --- a/demo-shell-ng2/app/app.component.scss +++ b/demo-shell-ng2/app/app.component.scss @@ -1,29 +1,72 @@ @import '~@angular/material/theming'; +@mixin adf-app-theme($theme) { + $primary: map-get($theme, primary); + $minimumAppWidth: 320px; + $toolbarHeight: 64px; -.adf-app-user-profile { - margin-right: 10px; -} + .adf-app { + display: block; + min-width: $minimumAppWidth; + height: 100%; -.adf-app-menu-spacer { - flex: 1 1 auto; -} + .adf-nav-container { + display: block; + min-width: $minimumAppWidth; + height: 100%; + } -.adf-app-toolbar { - overflow: hidden; -} + .adf-sidenav-link { + &.active { + color: mat-color($primary); + } + } -@media ($mat-small) { + &-user-profile { + margin-right: 10px; + } - .adf-app-hide-small{ - display: none !important; + &-menu-spacer { + flex: 1 1 auto; + } + + &-toolbar { + height: $toolbarHeight; + line-height: $toolbarHeight; + overflow: hidden; + + md-toolbar-row { + align-items: stretch; + justify-content: space-between; + } + + .adf-toolbar-link { + min-width: 0; + line-height: $toolbarHeight; + + &.active { + background-color: rgba(0,0,0,.12); + } + } + } } -} -@media ($mat-xsmall) { + @media (max-width: $minimumAppWidth) { + adf-datatable & /deep/ { + max-width: $minimumAppWidth; - .adf-app-hide-xsmall{ - display: none !important; + .adf-data-table-cell--fileSize { + display: none; + } + + .adf-empty-folder-drag-drop { + font-size: 46px; + } + + .adf-empty-folder-image { + width: $minimumAppWidth - 10px; + height: auto; + } + } } - -} +} \ No newline at end of file diff --git a/demo-shell-ng2/app/app.component.ts b/demo-shell-ng2/app/app.component.ts index 3ad93d556f..cc75243d83 100644 --- a/demo-shell-ng2/app/app.component.ts +++ b/demo-shell-ng2/app/app.component.ts @@ -22,11 +22,31 @@ import { AlfrescoSettingsService, AlfrescoTranslationService, PageTitle, Storage selector: 'adf-app', templateUrl: './app.component.html', styleUrls: ['./app.component.scss', './theme.scss'], + host: { + 'class': 'adf-app' + }, encapsulation: ViewEncapsulation.None }) export class AppComponent { searchTerm: string = ''; + links: Array = [ + { href: '/home', icon: 'home', title: 'Home' }, + { href: '/files', icon: 'folder_open', title: 'Content Services' }, + { href: '/activiti', icon: 'device_hub', title: 'Process Services' }, + { href: '/login', icon: 'vpn_key', title: 'Login' }, + { href: '/dl-custom-sources', icon: 'extension', title: 'DL: Custom Sources' }, + { href: '/datatable', icon: 'view_module', title: 'DataTable' }, + { href: '/form', icon: 'poll', title: 'Form' }, + { href: '/form-list', icon: 'library_books', title: 'Form List' }, + { href: '/uploader', icon: 'file_upload', title: 'Uploader' }, + { href: '/webscript', icon: 'extension', title: 'Webscript' }, + { href: '/tag', icon: 'local_offer', title: 'Tag' }, + { href: '/social', icon: 'thumb_up', title: 'Social' }, + { href: '/settings', icon: 'settings', title: 'Settings' }, + { href: '/about', icon: 'info_outline', title: 'About' } + ]; + constructor(private settingsService: AlfrescoSettingsService, private translateService: AlfrescoTranslationService, private storage: StorageService, diff --git a/demo-shell-ng2/app/app.routes.ts b/demo-shell-ng2/app/app.routes.ts index ecc6bea0a9..20918aa27e 100644 --- a/demo-shell-ng2/app/app.routes.ts +++ b/demo-shell-ng2/app/app.routes.ts @@ -44,11 +44,6 @@ import { FormListDemoComponent } from './components/form/form-list-demo.componen export const appRoutes: Routes = [ { path: 'login', component: LoginDemoComponent }, - { - path: '', - component: HomeComponent, - canActivate: [AuthGuard] - }, { path: 'home', component: HomeComponent, @@ -145,7 +140,12 @@ export const appRoutes: Routes = [ { path: 'about', component: AboutComponent }, { path: 'settings', component: SettingsComponent }, { path: 'form', component: FormDemoComponent }, - { path: 'form-list', component: FormListDemoComponent } + { path: 'form-list', component: FormListDemoComponent }, + { + path: '', + component: HomeComponent, + canActivate: [AuthGuard] + } ]; export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes); diff --git a/demo-shell-ng2/app/components/files/files.component.html b/demo-shell-ng2/app/components/files/files.component.html index 14450ea3b6..e2c7b01f85 100644 --- a/demo-shell-ng2/app/components/files/files.component.html +++ b/demo-shell-ng2/app/components/files/files.component.html @@ -16,13 +16,13 @@ - - @@ -31,21 +31,23 @@ - - - +
+ + + +
- + - - - -
@@ -237,10 +245,6 @@ Multiselect (with checkboxes) -
- Dropdown breadcrumb -
-
Multiple File Upload
diff --git a/demo-shell-ng2/app/components/files/files.component.ts b/demo-shell-ng2/app/components/files/files.component.ts index d6c40ce37c..1926101e57 100644 --- a/demo-shell-ng2/app/components/files/files.component.ts +++ b/demo-shell-ng2/app/components/files/files.component.ts @@ -45,7 +45,6 @@ export class FilesComponent implements OnInit { showViewer: boolean = false; toolbarColor = 'default'; - useDropdownBreadcrumb = false; useViewerDialog = true; useInlineViewer = false; diff --git a/demo-shell-ng2/app/material.module.ts b/demo-shell-ng2/app/material.module.ts index 98ef17108b..68d96368d0 100644 --- a/demo-shell-ng2/app/material.module.ts +++ b/demo-shell-ng2/app/material.module.ts @@ -21,6 +21,7 @@ import { MdInputModule, MdProgressBarModule, MdSelectModule, + MdSidenavModule, MdSlideToggleModule } from '@angular/material'; @@ -29,6 +30,7 @@ const MATERIAL_MODULES = [ MdInputModule, MdSelectModule, MdDialogModule, + MdSidenavModule, MdProgressBarModule ]; diff --git a/demo-shell-ng2/app/theme.scss b/demo-shell-ng2/app/theme.scss index afe0b34b12..7c795d21a8 100644 --- a/demo-shell-ng2/app/theme.scss +++ b/demo-shell-ng2/app/theme.scss @@ -11,6 +11,7 @@ @import '~ng2-alfresco-upload/styles/index'; @import '~ng2-alfresco-userinfo/styles/index'; @import '~ng2-alfresco-search/styles/index'; +@import './app.component.scss'; @include mat-core(); @@ -27,6 +28,7 @@ $theme: mat-light-theme($primary, $accent, $warn); @include angular-material-theme($theme); +@include adf-app-theme($theme); @include alfresco-core-theme($theme); @include alfresco-activity-analytics-theme($theme); @include alfresco-activity-diagrams-theme($theme);