pageTop -> baPageTop

This commit is contained in:
nixa 2016-05-18 17:19:24 +03:00
parent 12a1056c12
commit fd8f21aaff
8 changed files with 15 additions and 15 deletions

View file

@ -1,7 +1,7 @@
import {Component, ViewEncapsulation} from '@angular/core'; import {Component, ViewEncapsulation} from '@angular/core';
import {RouteConfig} from '@angular/router-deprecated'; import {RouteConfig} from '@angular/router-deprecated';
import {PageTop, BaContentTop, Sidebar, BaBackTop} from '../theme/components'; import {BaPageTop, BaContentTop, Sidebar, BaBackTop} from '../theme/components';
import {Dashboard} from './dashboard'; import {Dashboard} from './dashboard';
import {Ui} from './ui'; import {Ui} from './ui';
@ -14,10 +14,10 @@ import {Tables} from './tables';
selector: 'pages', selector: 'pages',
encapsulation: ViewEncapsulation.None, encapsulation: ViewEncapsulation.None,
styles: [], styles: [],
directives: [PageTop, Sidebar, BaContentTop, BaBackTop], directives: [BaPageTop, Sidebar, BaContentTop, BaBackTop],
template: ` template: `
<sidebar></sidebar> <sidebar></sidebar>
<page-top></page-top> <ba-page-top></ba-page-top>
<div class="al-main"> <div class="al-main">
<div class="al-content"> <div class="al-content">
<ba-content-top></ba-content-top> <ba-content-top></ba-content-top>

View file

@ -4,7 +4,7 @@ import {BaMsgCenterService} from './baMsgCenter.service';
import {BaProfilePicturePipe} from '../../pipes'; import {BaProfilePicturePipe} from '../../pipes';
@Component({ @Component({
selector: 'msg-center', selector: 'ba-msg-center',
providers: [BaMsgCenterService], providers: [BaMsgCenterService],
styles: [require('./baMsgCenter.scss')], styles: [require('./baMsgCenter.scss')],
template: require('./baMsgCenter.html'), template: require('./baMsgCenter.html'),

View file

@ -6,17 +6,17 @@ import {BaMsgCenter} from '../../components/baMsgCenter';
import {BaScrollPosition} from '../../directives'; import {BaScrollPosition} from '../../directives';
@Component({ @Component({
selector: 'page-top', selector: 'ba-page-top',
styles: [require('./pageTop.scss')], styles: [require('./baPageTop.scss')],
template: require('./pageTop.html'), template: require('./baPageTop.html'),
directives: [BaMsgCenter, BaScrollPosition], directives: [BaMsgCenter, BaScrollPosition],
pipes: [BaProfilePicturePipe], pipes: [BaProfilePicturePipe],
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None
}) })
export class PageTop { export class BaPageTop {
isScrolled:Boolean = false; public isScrolled:boolean = false;
isMenuCollapsed:boolean = false; public isMenuCollapsed:boolean = false;
constructor(private _state:AppState) { constructor(private _state:AppState) {
this._state.subscribe('menu.isCollapsed', (isCollapsed) => { this._state.subscribe('menu.isCollapsed', (isCollapsed) => {
@ -24,12 +24,12 @@ export class PageTop {
}); });
} }
toggleMenu() { public toggleMenu() {
this.isMenuCollapsed = !this.isMenuCollapsed; this.isMenuCollapsed = !this.isMenuCollapsed;
this._state.notifyDataChanged('menu.isCollapsed', this.isMenuCollapsed); this._state.notifyDataChanged('menu.isCollapsed', this.isMenuCollapsed);
} }
scrolledChanged(isScrolled) { public scrolledChanged(isScrolled) {
this.isScrolled = isScrolled; this.isScrolled = isScrolled;
} }
} }

View file

@ -20,6 +20,6 @@
<li class="dropdown-item"><a href class="signout"><i class="fa fa-power-off"></i>Sign out</a></li> <li class="dropdown-item"><a href class="signout"><i class="fa fa-power-off"></i>Sign out</a></li>
</div> </div>
</div> </div>
<msg-center></msg-center> <ba-msg-center></ba-msg-center>
</div> </div>
</div> </div>

View file

@ -0,0 +1 @@
export * from './baPageTop.component.ts';

View file

@ -1,4 +1,4 @@
export * from './pageTop'; export * from './baPageTop';
export * from './baMsgCenter'; export * from './baMsgCenter';
export * from './sidebar'; export * from './sidebar';
export * from './baContentTop'; export * from './baContentTop';

View file

@ -1 +0,0 @@
export * from './pageTop.component.ts';