From 55a999b492e1b908b1c70e0dc0341e5025b98cb4 Mon Sep 17 00:00:00 2001 From: Maurizio Vitale Date: Tue, 3 Oct 2017 11:54:31 +0100 Subject: [PATCH] Revert "Adding some responsiveness to demo shell app (#2408)" (#2410) This reverts commit 6fa135faf317ed3bd5aa976e8fcbf38930b1a1c2. --- demo-shell-ng2/app/app.component.html | 131 ++++++++++++------ demo-shell-ng2/app/app.component.scss | 79 +++-------- demo-shell-ng2/app/app.component.ts | 20 --- demo-shell-ng2/app/app.routes.ts | 12 +- .../app/components/files/files.component.html | 68 +++++---- .../app/components/files/files.component.ts | 1 + demo-shell-ng2/app/material.module.ts | 2 - demo-shell-ng2/app/theme.scss | 2 - 8 files changed, 146 insertions(+), 169 deletions(-) diff --git a/demo-shell-ng2/app/app.component.html b/demo-shell-ng2/app/app.component.html index a509f46b33..6ecf0aadbc 100644 --- a/demo-shell-ng2/app/app.component.html +++ b/demo-shell-ng2/app/app.component.html @@ -1,50 +1,97 @@ - - - - - {{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 6fe2bff64b..35a7d0c51f 100644 --- a/demo-shell-ng2/app/app.component.scss +++ b/demo-shell-ng2/app/app.component.scss @@ -1,72 +1,29 @@ @import '~@angular/material/theming'; -@mixin adf-app-theme($theme) { - $primary: map-get($theme, primary); - $minimumAppWidth: 320px; - $toolbarHeight: 64px; - .adf-app { - display: block; - min-width: $minimumAppWidth; - height: 100%; +.adf-app-user-profile { + margin-right: 10px; +} - .adf-nav-container { - display: block; - min-width: $minimumAppWidth; - height: 100%; - } +.adf-app-menu-spacer { + flex: 1 1 auto; +} - .adf-sidenav-link { - &.active { - color: mat-color($primary); - } - } +.adf-app-toolbar { + overflow: hidden; +} - &-user-profile { - margin-right: 10px; - } +@media ($mat-small) { - &-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); - } - } - } + .adf-app-hide-small{ + display: none !important; } - @media (max-width: $minimumAppWidth) { - adf-datatable & /deep/ { - max-width: $minimumAppWidth; +} +@media ($mat-xsmall) { - .adf-data-table-cell--fileSize { - display: none; - } - - .adf-empty-folder-drag-drop { - font-size: 46px; - } - - .adf-empty-folder-image { - width: $minimumAppWidth - 10px; - height: auto; - } - } + .adf-app-hide-xsmall{ + display: none !important; } -} \ 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 cc75243d83..3ad93d556f 100644 --- a/demo-shell-ng2/app/app.component.ts +++ b/demo-shell-ng2/app/app.component.ts @@ -22,31 +22,11 @@ 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 20918aa27e..ecc6bea0a9 100644 --- a/demo-shell-ng2/app/app.routes.ts +++ b/demo-shell-ng2/app/app.routes.ts @@ -44,6 +44,11 @@ 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, @@ -140,12 +145,7 @@ export const appRoutes: Routes = [ { path: 'about', component: AboutComponent }, { path: 'settings', component: SettingsComponent }, { path: 'form', component: FormDemoComponent }, - { path: 'form-list', component: FormListDemoComponent }, - { - path: '', - component: HomeComponent, - canActivate: [AuthGuard] - } + { path: 'form-list', component: FormListDemoComponent } ]; 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 e2c7b01f85..14450ea3b6 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,23 +31,21 @@ -
- - - -
+ + + - + - - - -
@@ -245,6 +237,10 @@ 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 1926101e57..d6c40ce37c 100644 --- a/demo-shell-ng2/app/components/files/files.component.ts +++ b/demo-shell-ng2/app/components/files/files.component.ts @@ -45,6 +45,7 @@ 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 68d96368d0..98ef17108b 100644 --- a/demo-shell-ng2/app/material.module.ts +++ b/demo-shell-ng2/app/material.module.ts @@ -21,7 +21,6 @@ import { MdInputModule, MdProgressBarModule, MdSelectModule, - MdSidenavModule, MdSlideToggleModule } from '@angular/material'; @@ -30,7 +29,6 @@ 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 7c795d21a8..afe0b34b12 100644 --- a/demo-shell-ng2/app/theme.scss +++ b/demo-shell-ng2/app/theme.scss @@ -11,7 +11,6 @@ @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(); @@ -28,7 +27,6 @@ $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);