diff --git a/demo-shell-ng2/app/components/files/files.component.html b/demo-shell-ng2/app/components/files/files.component.html index cc4cdca0dc..d34a950bc3 100644 --- a/demo-shell-ng2/app/components/files/files.component.html +++ b/demo-shell-ng2/app/components/files/files.component.html @@ -3,10 +3,6 @@ [rootFolderId]="documentList.currentFolderId" [versioning]="versioning" [enabled]="documentList.hasCreatePermission()"> - -
- + + + + + diff --git a/ng2-components/ng2-alfresco-core/index.ts b/ng2-components/ng2-alfresco-core/index.ts index e9ca504161..25dcfce0ea 100644 --- a/ng2-components/ng2-alfresco-core/index.ts +++ b/ng2-components/ng2-alfresco-core/index.ts @@ -24,14 +24,14 @@ import { TranslateLoader, TranslateModule } from '@ngx-translate/core'; import { CollapsableModule } from './src/components/collapsable/collapsable.module'; import { ContextMenuModule } from './src/components/context-menu/context-menu.module'; -import { ToolbarComponent } from './src/components/toolbar/toolbar.component'; +import { ToolbarModule } from './src/components/toolbar/toolbar.module'; import { CardViewModule } from './src/components/view/card-view.module'; import { MaterialModule } from './src/material.module'; +import { AppConfigModule } from './src/services/app-config.service'; import { AlfrescoApiService } from './src/services/alfresco-api.service'; import { AlfrescoContentService } from './src/services/alfresco-content.service'; import { AlfrescoSettingsService } from './src/services/alfresco-settings.service'; -import { AppConfigModule } from './src/services/app-config.service'; import { AppConfigService } from './src/services/app-config.service'; import { InitAppConfigServiceProvider } from './src/services/app-config.service'; import { AuthGuardBpm } from './src/services/auth-guard-bpm.service'; @@ -145,6 +145,7 @@ export function createTranslateLoader(http: Http, logService: LogService) { }), MaterialModule, AppConfigModule, + ToolbarModule, ContextMenuModule, CardViewModule, CollapsableModule @@ -155,8 +156,7 @@ export function createTranslateLoader(http: Http, logService: LogService) { DataColumnComponent, DataColumnListComponent, FileSizePipe, - HighlightPipe, - ToolbarComponent + HighlightPipe ], providers: providers(), exports: [ @@ -170,13 +170,13 @@ export function createTranslateLoader(http: Http, logService: LogService) { ContextMenuModule, CardViewModule, CollapsableModule, + ToolbarModule, ...obsoleteMdlDirectives(), UploadDirective, DataColumnComponent, DataColumnListComponent, FileSizePipe, - HighlightPipe, - ToolbarComponent + HighlightPipe ] }) export class CoreModule { diff --git a/ng2-components/ng2-alfresco-core/src/components/toolbar/toolbar-title.component.ts b/ng2-components/ng2-alfresco-core/src/components/toolbar/toolbar-title.component.ts new file mode 100644 index 0000000000..36711cfc31 --- /dev/null +++ b/ng2-components/ng2-alfresco-core/src/components/toolbar/toolbar-title.component.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 { Component } from '@angular/core'; + +@Component({ + selector: 'adf-toolbar-title', + template: '', + host: { 'class': 'adf-toolbar-title' } +}) +export class ToolbarTitleComponent {} diff --git a/ng2-components/ng2-alfresco-core/src/components/toolbar/toolbar.component.css b/ng2-components/ng2-alfresco-core/src/components/toolbar/toolbar.component.css deleted file mode 100644 index e9670861e6..0000000000 --- a/ng2-components/ng2-alfresco-core/src/components/toolbar/toolbar.component.css +++ /dev/null @@ -1,3 +0,0 @@ -.adf-toolbar--spacer { - flex: 1 1 auto; -} diff --git a/ng2-components/ng2-alfresco-core/src/components/toolbar/toolbar.component.html b/ng2-components/ng2-alfresco-core/src/components/toolbar/toolbar.component.html index 8b6c270678..1426aed65b 100644 --- a/ng2-components/ng2-alfresco-core/src/components/toolbar/toolbar.component.html +++ b/ng2-components/ng2-alfresco-core/src/components/toolbar/toolbar.component.html @@ -1,5 +1,6 @@ - {{ title }} + {{ title }} + diff --git a/ng2-components/ng2-alfresco-core/src/components/toolbar/toolbar.component.scss b/ng2-components/ng2-alfresco-core/src/components/toolbar/toolbar.component.scss new file mode 100644 index 0000000000..9e8d5e26bb --- /dev/null +++ b/ng2-components/ng2-alfresco-core/src/components/toolbar/toolbar.component.scss @@ -0,0 +1,30 @@ +@import 'theming'; + +$adf-toolbar-height: 48px; +$adf-toolbar-font-size: 14px; + +.adf-toolbar--spacer { + flex: 1 1 auto; +} + +.adf-toolbar { + + .mat-toolbar { + min-height: $adf-toolbar-height; + border: 1px solid $alfresco-divider-color; + } + + .mat-toolbar-row { + height: $adf-toolbar-height; + font-size: $adf-toolbar-font-size; + + & > button { + color: $alfresco-secondary-text-color; + @include material-animation-default(0.28s); + + &:hover { + color: $alfresco-primary-text-color; + } + } + } +} diff --git a/ng2-components/ng2-alfresco-core/src/components/toolbar/toolbar.component.ts b/ng2-components/ng2-alfresco-core/src/components/toolbar/toolbar.component.ts index 00ac80c681..40bb8eb7e4 100644 --- a/ng2-components/ng2-alfresco-core/src/components/toolbar/toolbar.component.ts +++ b/ng2-components/ng2-alfresco-core/src/components/toolbar/toolbar.component.ts @@ -20,9 +20,10 @@ import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@a @Component({ selector: 'adf-toolbar', templateUrl: './toolbar.component.html', - styleUrls: ['./toolbar.component.css'], + styleUrls: ['./toolbar.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, - encapsulation: ViewEncapsulation.None + encapsulation: ViewEncapsulation.None, + host: { 'class': 'adf-toolbar' } }) export class ToolbarComponent { diff --git a/ng2-components/ng2-alfresco-core/src/components/toolbar/toolbar.module.ts b/ng2-components/ng2-alfresco-core/src/components/toolbar/toolbar.module.ts new file mode 100644 index 0000000000..fd2af1f57e --- /dev/null +++ b/ng2-components/ng2-alfresco-core/src/components/toolbar/toolbar.module.ts @@ -0,0 +1,40 @@ +/*! + * @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 { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { MdToolbarModule } from '@angular/material'; + +import { ToolbarTitleComponent } from './toolbar-title.component'; +import { ToolbarComponent } from './toolbar.component'; + +@NgModule({ + imports: [ + CommonModule, + MdToolbarModule + ], + declarations: [ + ToolbarComponent, + ToolbarTitleComponent + ], + exports: [ + MdToolbarModule, + ToolbarComponent, + ToolbarTitleComponent + ] +}) +export class ToolbarModule {}