From a8cd300eccfbf8ba4f9f47c0ce2bf97cfeb51c5c Mon Sep 17 00:00:00 2001 From: nixa <4dmitr@gmail.com> Date: Fri, 29 Apr 2016 17:27:19 +0300 Subject: [PATCH] code reformat to follow the styles --- src/app/app.component.ts | 23 ++++----- .../pages/dashboard/dashboard.component.ts | 23 +++++---- src/app/pages/dashboard/dashboard.scss | 10 ++-- src/app/pages/pages.component.ts | 6 ++- .../directives/scrollPosition.directive.ts | 33 ++++++------ .../theme/msgCenter/msgCenter.component.ts | 10 ++-- src/app/theme/msgCenter/msgCenter.html | 8 +-- src/app/theme/msgCenter/msgCenter.scss | 6 +-- src/app/theme/pageTop/pageTop.component.ts | 36 ++++++------- src/app/theme/pageTop/pageTop.html | 41 +++++++-------- src/app/theme/pageTop/pageTop.scss | 4 +- .../theme/pipes/image/profile-picture.pipe.ts | 2 +- src/app/theme/sass/_buttons.scss | 5 +- src/app/theme/sass/_icons.scss | 3 +- src/app/theme/sass/_layout.scss | 19 ++++--- src/app/theme/sass/_preloader.scss | 3 +- src/app/theme/sass/_table.scss | 26 +++++----- .../sass/bootstrap-overrides/_panel.scss | 15 +++--- src/app/theme/sass/conf/_mixins.scss | 19 +++---- src/app/theme/sass/conf/_variables.scss | 2 +- src/app/theme/sidebar/sidebar.component.ts | 51 ++++++++++--------- src/app/theme/sidebar/sidebar.html | 17 ++++--- src/app/theme/sidebar/sidebar.scss | 2 +- src/app/theme/sidebar/sidebar.service.ts | 13 ++--- src/app/theme/sidebar/sidebarState.service.ts | 2 +- src/app/theme/theme.scss | 1 - 26 files changed, 193 insertions(+), 187 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 72e4e8ce..a906621b 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,6 +1,3 @@ -/* - * Angular 2 decorators and services - */ import {Component, ViewEncapsulation} from 'angular2/core'; import {RouteConfig, Router} from 'angular2/router'; import {Subscription} from 'rxjs/Subscription'; @@ -12,17 +9,17 @@ import {Pages} from './pages'; // TODO: is it really the best place to globally require that dependency? require("!style!css!sass!./theme/sass/_ionicons.scss"); - /* - * App Component - * Top Level Component - * TODO: why the header and footer are not implemented? - */ +/* + * App Component + * Top Level Component + * TODO: why the header and footer are not implemented? + */ @Component({ selector: 'app', - pipes: [ ], + pipes: [], providers: [SidebarStateService], encapsulation: ViewEncapsulation.None, - styles: [ require('normalize.css'), require('./app.scss') ], + styles: [require('normalize.css'), require('./app.scss')], template: `
@@ -46,15 +43,15 @@ require("!style!css!sass!./theme/sass/_ionicons.scss"); ]) export class App { - isMenuCollapsed: boolean = false; + isMenuCollapsed:boolean = false; - private _sidebarStateSubscription: Subscription; + private _sidebarStateSubscription:Subscription; constructor(private _sidebarStateService:SidebarStateService) { this._sidebarStateSubscription = this._sidebarStateService.getStateStream().subscribe((isCollapsed) => this.isMenuCollapsed = isCollapsed); } - ngOnDestroy(){ + ngOnDestroy() { // prevent memory leak when component destroyed this._sidebarStateSubscription.unsubscribe(); } diff --git a/src/app/pages/dashboard/dashboard.component.ts b/src/app/pages/dashboard/dashboard.component.ts index 4f3e26b0..77e1cd20 100644 --- a/src/app/pages/dashboard/dashboard.component.ts +++ b/src/app/pages/dashboard/dashboard.component.ts @@ -7,19 +7,20 @@ import {Component, ViewEncapsulation} from 'angular2/core'; * Top Level Component */ @Component({ - selector: 'dashboard', - pipes: [ ], - providers: [ ], - encapsulation: ViewEncapsulation.None, - styles: [require('./dashboard.scss') ], - template: 'DASHBOARD' + selector: 'dashboard', + pipes: [], + providers: [], + encapsulation: ViewEncapsulation.None, + styles: [require('./dashboard.scss')], + template: 'DASHBOARD' }) export class Dashboard { - constructor() {} + constructor() { + } - ngOnInit() { - console.log('DASHBOARD'); - } + ngOnInit() { + console.log('DASHBOARD'); + } -} \ No newline at end of file +} diff --git a/src/app/pages/dashboard/dashboard.scss b/src/app/pages/dashboard/dashboard.scss index 592a94bb..30ac5a83 100644 --- a/src/app/pages/dashboard/dashboard.scss +++ b/src/app/pages/dashboard/dashboard.scss @@ -7,9 +7,9 @@ } @media screen and (max-width: 1620px) { - .panel.feed-panel.large-panel { - height: 824px; - } + .panel.feed-panel.large-panel { + height: 824px; + } } .user-stats-panel { @@ -18,6 +18,6 @@ } } -.blurCalendar{ +.blurCalendar { height: 475px; -} \ No newline at end of file +} diff --git a/src/app/pages/pages.component.ts b/src/app/pages/pages.component.ts index 64210826..05a89537 100644 --- a/src/app/pages/pages.component.ts +++ b/src/app/pages/pages.component.ts @@ -36,9 +36,11 @@ export class Pages { private _routeConfig; - constructor(private _router: Router) { } + constructor(private _router:Router) { + } - ngOnInit() { } + ngOnInit() { + } getRoutes() { diff --git a/src/app/theme/directives/scrollPosition.directive.ts b/src/app/theme/directives/scrollPosition.directive.ts index 6417d8bc..1b34e07a 100644 --- a/src/app/theme/directives/scrollPosition.directive.ts +++ b/src/app/theme/directives/scrollPosition.directive.ts @@ -1,23 +1,24 @@ import {Directive, Input, Output, EventEmitter, HostListener, ElementRef} from 'angular2/core'; + @Directive({ - selector: '[scrollPosition]' + selector: '[scrollPosition]' }) export class ScrollPosition { - @Input() maxHeight: Number; - @Output() scrollChange:EventEmitter = new EventEmitter(); + @Input() maxHeight:Number; + @Output() scrollChange:EventEmitter = new EventEmitter(); - private _isScrolled: Boolean; + private _isScrolled:Boolean; - ngOnInit() { - this.onWindowScroll(); + ngOnInit() { + this.onWindowScroll(); + } + + @HostListener('window:scroll') + onWindowScroll():void { + let isScrolled = window.scrollY > this.maxHeight; + if (isScrolled !== this._isScrolled) { + this._isScrolled = isScrolled; + this.scrollChange.emit(isScrolled); } - - @HostListener('window:scroll') - onWindowScroll() : void { - let isScrolled = window.scrollY > this.maxHeight; - if (isScrolled !== this._isScrolled) { - this._isScrolled = isScrolled; - this.scrollChange.emit(isScrolled); - } - } -} \ No newline at end of file + } +} diff --git a/src/app/theme/msgCenter/msgCenter.component.ts b/src/app/theme/msgCenter/msgCenter.component.ts index 3d87ee86..930ae449 100644 --- a/src/app/theme/msgCenter/msgCenter.component.ts +++ b/src/app/theme/msgCenter/msgCenter.component.ts @@ -2,12 +2,12 @@ import {Component, ViewEncapsulation} from 'angular2/core'; import {ProfilePicturePipe} from '../pipes/image/profile-picture.pipe'; @Component({ - selector: 'msg-center', - styles: [ require('./msgCenter.scss') ], - template: require('./msgCenter.html'), - pipes: [ProfilePicturePipe] + selector: 'msg-center', + styles: [require('./msgCenter.scss')], + template: require('./msgCenter.html'), + pipes: [ProfilePicturePipe] }) -export class MsgCenter { +export class MsgCenter { notifications = [ { diff --git a/src/app/theme/msgCenter/msgCenter.html b/src/app/theme/msgCenter/msgCenter.html index 2443701a..1287eba7 100644 --- a/src/app/theme/msgCenter/msgCenter.html +++ b/src/app/theme/msgCenter/msgCenter.html @@ -15,8 +15,9 @@ Settings
- -
+
+
{{ msg.text }}
{{ msg.time }} @@ -40,7 +41,8 @@
-
+
{{ msg.text }}
{{ msg.time }} diff --git a/src/app/theme/msgCenter/msgCenter.scss b/src/app/theme/msgCenter/msgCenter.scss index 4f8675b8..9a7816f0 100644 --- a/src/app/theme/msgCenter/msgCenter.scss +++ b/src/app/theme/msgCenter/msgCenter.scss @@ -113,7 +113,7 @@ left: auto; right: -47px; top: 26px; - @include scrollbars(.4em, rgba(0,0,0,0.5), #fff); + @include scrollbars(.4em, rgba(0, 0, 0, 0.5), #fff); .header { padding: 10px 12px; border-bottom: 1px solid $border-light; @@ -150,7 +150,7 @@ img { width: 36px; height: 36px; - &.photo-msg-item{ + &.photo-msg-item { border-radius: 18px; } } @@ -260,4 +260,4 @@ right: 75px; } } -} \ No newline at end of file +} diff --git a/src/app/theme/pageTop/pageTop.component.ts b/src/app/theme/pageTop/pageTop.component.ts index 2032f11d..e1bcd148 100644 --- a/src/app/theme/pageTop/pageTop.component.ts +++ b/src/app/theme/pageTop/pageTop.component.ts @@ -7,28 +7,28 @@ import {ScrollPosition} from '../directives/scrollPosition.directive'; import {SidebarStateService} from '../sidebar/sidebarState.service' @Component({ - selector: 'page-top', - styles: [ require('./pageTop.scss') ], - template: require('./pageTop.html'), - directives: [MsgCenter, ScrollPosition], - pipes: [ProfilePicturePipe] + selector: 'page-top', + styles: [require('./pageTop.scss')], + template: require('./pageTop.html'), + directives: [MsgCenter, ScrollPosition], + pipes: [ProfilePicturePipe] }) export class PageTop { - isScrolled: Boolean = false; - isMenuCollapsed: boolean = false; + isScrolled:Boolean = false; + isMenuCollapsed:boolean = false; - private _sidebarStateSubscription: Subscription; + private _sidebarStateSubscription:Subscription; - constructor(private _sidebarStateService: SidebarStateService) { - this._sidebarStateSubscription = this._sidebarStateService.getStateStream().subscribe((isCollapsed) => this.isMenuCollapsed = isCollapsed); - } + constructor(private _sidebarStateService:SidebarStateService) { + this._sidebarStateSubscription = this._sidebarStateService.getStateStream().subscribe((isCollapsed) => this.isMenuCollapsed = isCollapsed); + } - toggleMenu() { - this.isMenuCollapsed = !this.isMenuCollapsed; - this._sidebarStateService.stateChanged(this.isMenuCollapsed); - } + toggleMenu() { + this.isMenuCollapsed = !this.isMenuCollapsed; + this._sidebarStateService.stateChanged(this.isMenuCollapsed); + } - scrolledChanged(isScrolled) { - this.isScrolled = isScrolled; - } + scrolledChanged(isScrolled) { + this.isScrolled = isScrolled; + } } diff --git a/src/app/theme/pageTop/pageTop.html b/src/app/theme/pageTop/pageTop.html index d2f0a9dc..d6989b81 100644 --- a/src/app/theme/pageTop/pageTop.html +++ b/src/app/theme/pageTop/pageTop.html @@ -1,24 +1,25 @@ -
- - +
+ + - + - diff --git a/src/app/theme/pageTop/pageTop.scss b/src/app/theme/pageTop/pageTop.scss index 1abbb35b..5876d14a 100644 --- a/src/app/theme/pageTop/pageTop.scss +++ b/src/app/theme/pageTop/pageTop.scss @@ -156,7 +156,7 @@ a.collapse-menu-link { } @media (max-width: $resXXS) { - .user-profile{ + .user-profile { min-width: 136px; } a.refresh-data { @@ -171,6 +171,6 @@ a.collapse-menu-link { } } -.profile-toggle-link{ +.profile-toggle-link { cursor: pointer; } diff --git a/src/app/theme/pipes/image/profile-picture.pipe.ts b/src/app/theme/pipes/image/profile-picture.pipe.ts index 832e5344..82cec888 100644 --- a/src/app/theme/pipes/image/profile-picture.pipe.ts +++ b/src/app/theme/pipes/image/profile-picture.pipe.ts @@ -4,7 +4,7 @@ import {layoutPaths} from '../../theme.constants'; @Pipe({name: 'profilePicture'}) export class ProfilePicturePipe implements PipeTransform { - transform(input: string, args:string[]): string { + transform(input:string, args:string[]):string { let ext = args[0] || 'png'; return layoutPaths.images.profile + input + '.' + ext; } diff --git a/src/app/theme/sass/_buttons.scss b/src/app/theme/sass/_buttons.scss index af24a34e..d70b7262 100644 --- a/src/app/theme/sass/_buttons.scss +++ b/src/app/theme/sass/_buttons.scss @@ -45,7 +45,7 @@ $hover: 24; } &.btn-default { @include styleButton(transparent, $default); - &:focus, &:active:hover, &.active:hover, &:hover{ + &:focus, &:active:hover, &.active:hover, &:hover { background-color: rgba(0, 0, 0, 0.2); color: $default; } @@ -124,7 +124,6 @@ button.btn.btn-danger { } } - button.btn.btn-inverse { @include buttonColor($help-text, $help-text); color: $default; @@ -134,8 +133,6 @@ button.btn.btn-inverse { } } - - .btn-with-icon { i { margin-right: 10px; diff --git a/src/app/theme/sass/_icons.scss b/src/app/theme/sass/_icons.scss index bb92753a..40b8d264 100644 --- a/src/app/theme/sass/_icons.scss +++ b/src/app/theme/sass/_icons.scss @@ -22,7 +22,6 @@ @include svg-icon-class('person', 80, 80); @include svg-icon-class('refresh', 80, 80); - @mixin png-icon($url, $width, $height) { display: inline-block; width: $width + px; @@ -37,4 +36,4 @@ } } -//@include icon-png-class('arrival-icon', 11, 11); \ No newline at end of file +//@include icon-png-class('arrival-icon', 11, 11); diff --git a/src/app/theme/sass/_layout.scss b/src/app/theme/sass/_layout.scss index c026f502..da7258e0 100644 --- a/src/app/theme/sass/_layout.scss +++ b/src/app/theme/sass/_layout.scss @@ -1,6 +1,6 @@ $left-space: 180px; -@include scrollbars(.5em, #d9d9d9, rgba(0,0,0,0)); +@include scrollbars(.5em, #d9d9d9, rgba(0, 0, 0, 0)); html { position: relative; @@ -18,14 +18,12 @@ body { @include main-background(); } - -@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) -{ - html{ +@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { + html { overflow: hidden; height: 100%; } - body{ + body { overflow: auto; height: 100%; } @@ -36,9 +34,10 @@ a { outline: 0 !important; } -.body-bg{ +.body-bg { display: none; } + .al-header { display: block; height: 49px; @@ -194,8 +193,8 @@ a { } .full-invisible { - visibility: hidden!important; + visibility: hidden !important; * { - visibility: hidden!important; + visibility: hidden !important; } -} \ No newline at end of file +} diff --git a/src/app/theme/sass/_preloader.scss b/src/app/theme/sass/_preloader.scss index 3d0df0ef..d8adea99 100644 --- a/src/app/theme/sass/_preloader.scss +++ b/src/app/theme/sass/_preloader.scss @@ -6,6 +6,7 @@ transform: rotate(360deg); /* Firefox 16+, IE 10+, Opera */ } } + @-moz-keyframes spin { 0% { -moz-transform: rotate(0deg); /* Firefox 16+*/ @@ -74,4 +75,4 @@ animation: spin 1.5s linear infinite; /* Chrome, Firefox 16+, IE 10+, Opera */ } } -} \ No newline at end of file +} diff --git a/src/app/theme/sass/_table.scss b/src/app/theme/sass/_table.scss index 6501b72d..3a67c5e5 100644 --- a/src/app/theme/sass/_table.scss +++ b/src/app/theme/sass/_table.scss @@ -241,23 +241,23 @@ body.badmin-transparent { background-color: rgba(0, 0, 0, 0.1); } .table > tbody > tr.primary > td { - background-color: rgba($primary,0.7); + background-color: rgba($primary, 0.7); border: none; } .table > tbody > tr.success > td { - background-color: rgba($success,0.7); + background-color: rgba($success, 0.7); border: none; } .table > tbody > tr.warning > td { - background-color: rgba($warning,0.7); + background-color: rgba($warning, 0.7); border: none; } .table > tbody > tr.danger > td { - background-color: rgba($danger,0.7); + background-color: rgba($danger, 0.7); border: none; } .table > tbody > tr.info > td { - background-color: rgba($info,0.7); + background-color: rgba($info, 0.7); border: none; } @@ -282,21 +282,21 @@ th { .table-striped > tbody > tr > td { border: none; } + .pagination > li > a, -.pagination > li > span{ +.pagination > li > span { color: $default; border-color: $default; } - .pagination > li:first-of-type > a, -.pagination > li:first-of-type > span{ +.pagination > li:first-of-type > span { border-top-left-radius: 5px; border-bottom-left-radius: 5px; } .pagination > li:last-of-type > a, -.pagination > li:last-of-type > span{ +.pagination > li:last-of-type > span { border-top-right-radius: 5px; border-bottom-right-radius: 5px; } @@ -314,11 +314,11 @@ th { .pagination > li > a:hover, .pagination > li > span:hover, .pagination > li > a:focus, -.pagination > li > span:focus{ - background-color: rgba(0,0,0,.2); +.pagination > li > span:focus { + background-color: rgba(0, 0, 0, .2); color: $default; } .editable-buttons .btn-with-icon i { - margin-right: 0; -} \ No newline at end of file + margin-right: 0; +} diff --git a/src/app/theme/sass/bootstrap-overrides/_panel.scss b/src/app/theme/sass/bootstrap-overrides/_panel.scss index 98b79685..67ec8975 100644 --- a/src/app/theme/sass/bootstrap-overrides/_panel.scss +++ b/src/app/theme/sass/bootstrap-overrides/_panel.scss @@ -128,7 +128,7 @@ $panel-heading-font-size: 16px; } } -.panel.bootstrap-panel{ +.panel.bootstrap-panel { .panel-body, .panel-heading { p, div, span { color: $default-text; @@ -136,12 +136,12 @@ $panel-heading-font-size: 16px; } } -.accordion-panel.panel.bootstrap-panel{ +.accordion-panel.panel.bootstrap-panel { &.panel-primary, &.panel-success, &.panel-info, &.panel-warning, - &.panel-danger{ + &.panel-danger { .panel-heading { p, div, span { color: rgba(255, 255, 255, 0.8); @@ -150,8 +150,8 @@ $panel-heading-font-size: 16px; } } -.panel-group .panel.accordion-panel{ - .panel-heading{ +.panel-group .panel.accordion-panel { + .panel-heading { border-bottom: 0; } } @@ -170,15 +170,14 @@ $panel-heading-font-size: 16px; height: 120px; } -.footer-panel{ +.footer-panel { height: 142px; } -.light-text{ +.light-text { font-weight: $font-light; } - /* .panel-group .panel { border-radius: 0; diff --git a/src/app/theme/sass/conf/_mixins.scss b/src/app/theme/sass/conf/_mixins.scss index bf34aae7..c43ee361 100644 --- a/src/app/theme/sass/conf/_mixins.scss +++ b/src/app/theme/sass/conf/_mixins.scss @@ -41,6 +41,7 @@ @mixin bg-nr($relativeUrl) { background: url($images-root + $relativeUrl) no-repeat 0 0; } + @mixin bg($relativeUrl) { background: url($images-root + $relativeUrl); } @@ -93,22 +94,22 @@ @mixin overrideColors($color) { p, - h1,h2,h3,h4,h5,h6, + h1, h2, h3, h4, h5, h6, .pie-chart-item, - .panel-heading>.dropdown .dropdown-toggle, + .panel-heading > .dropdown .dropdown-toggle, .panel-title, ol.blur span, ul.blur, .popular-app-cost, .popular-app-info, - .panel-title>.small, - .panel-title>.small>a, - .panel-title>a, - .panel-title>small, - .panel-title>small>a, + .panel-title > .small, + .panel-title > .small > a, + .panel-title > a, + .panel-title > small, + .panel-title > small > a, .traffic-text span, .form-group label, - .help-block{ + .help-block { color: $color; } .feed-message .message-time, .text-muted { @@ -125,4 +126,4 @@ .progress { background: $color; } -} \ No newline at end of file +} diff --git a/src/app/theme/sass/conf/_variables.scss b/src/app/theme/sass/conf/_variables.scss index 2f8a3df3..6d9747be 100644 --- a/src/app/theme/sass/conf/_variables.scss +++ b/src/app/theme/sass/conf/_variables.scss @@ -1,6 +1,6 @@ $font-family: 'Roboto', sans-serif; -$view-total :rgba(0,0,0,.4); +$view-total: rgba(0, 0, 0, .4); $activelink: $primary; $hoverlink: $primary-dark; diff --git a/src/app/theme/sidebar/sidebar.component.ts b/src/app/theme/sidebar/sidebar.component.ts index 1fc788e7..11c14f7a 100644 --- a/src/app/theme/sidebar/sidebar.component.ts +++ b/src/app/theme/sidebar/sidebar.component.ts @@ -6,34 +6,35 @@ import {SidebarService} from './sidebar.service'; import {SidebarStateService} from './sidebarState.service'; @Component({ - selector: 'sidebar', - encapsulation: ViewEncapsulation.None, - styles: [ require('./sidebar.scss') ], - template: require('./sidebar.html'), - providers: [SidebarService], - directives: [], - pipes: [] + selector: 'sidebar', + encapsulation: ViewEncapsulation.None, + styles: [require('./sidebar.scss')], + template: require('./sidebar.html'), + providers: [SidebarService], + directives: [], + pipes: [] }) export class Sidebar { @Input('routes') routes; - menuItems: Array; - menuHeight: number; - isMenuCollapsed: boolean; + menuItems:Array; + menuHeight:number; + isMenuCollapsed:boolean; - showHoverElem: boolean; - hoverElemHeight: number; - hoverElemTop: number; + showHoverElem:boolean; + hoverElemHeight:number; + hoverElemTop:number; - outOfArea: number = -200; + outOfArea:number = -200; - isMenuShouldCollapsed: boolean = false; + isMenuShouldCollapsed:boolean = false; - constructor(private elementRef: ElementRef, - private router: Router, - private _sidebarService: SidebarService, - private _sidebarStateService: SidebarStateService) { } + constructor(private elementRef:ElementRef, + private router:Router, + private _sidebarService:SidebarService, + private _sidebarStateService:SidebarStateService) { + } ngOnInit() { this.menuItems = this._sidebarService.getMenuItems(this.routes); @@ -57,11 +58,11 @@ export class Sidebar { this.updateSidebarHeight(); } - menuExpand () { + menuExpand() { this.menuCollapseStateChange(false); } - menuCollapse () { + menuCollapse() { this.menuCollapseStateChange(true); } @@ -70,9 +71,9 @@ export class Sidebar { this._sidebarStateService.stateChanged(this.isMenuCollapsed); } - hoverItem ($event) { + hoverItem($event) { this.showHoverElem = true; - this.hoverElemHeight = $event.currentTarget.clientHeight; + this.hoverElemHeight = $event.currentTarget.clientHeight; // TODO: get rid of magic 66 constant this.hoverElemTop = $event.currentTarget.getBoundingClientRect().top - 66; } @@ -82,7 +83,7 @@ export class Sidebar { this.menuHeight = this.elementRef.nativeElement.childNodes[0].clientHeight - 84; } - toggleSubMenu ($event, item) { + toggleSubMenu($event, item) { var submenu = $($event.currentTarget).next(); if (this.isMenuCollapsed) { @@ -99,7 +100,7 @@ export class Sidebar { } private selectMenuItem() { - let isCurrent = (instruction) => (instruction ? this.router.isRouteActive(this.router.generate([instruction])): false); + let isCurrent = (instruction) => (instruction ? this.router.isRouteActive(this.router.generate([instruction])) : false); this.menuItems.forEach(function (menu) { diff --git a/src/app/theme/sidebar/sidebar.html b/src/app/theme/sidebar/sidebar.html index 7bc04535..1b51071e 100644 --- a/src/app/theme/sidebar/sidebar.html +++ b/src/app/theme/sidebar/sidebar.html @@ -7,22 +7,27 @@ {{ item.title }} - + {{ item.title }} - +
    -
  • +
  • {{ subitem.title }} - + diff --git a/src/app/theme/sidebar/sidebar.scss b/src/app/theme/sidebar/sidebar.scss index 87f5e542..bdfb2c1f 100644 --- a/src/app/theme/sidebar/sidebar.scss +++ b/src/app/theme/sidebar/sidebar.scss @@ -146,7 +146,7 @@ a.al-sidebar-list-link { @include default-sublist(); } -.sidebar-hover-elem{ +.sidebar-hover-elem { width: 4px; background: $primary; position: absolute; diff --git a/src/app/theme/sidebar/sidebar.service.ts b/src/app/theme/sidebar/sidebar.service.ts index 3b31cf23..3e140b7e 100644 --- a/src/app/theme/sidebar/sidebar.service.ts +++ b/src/app/theme/sidebar/sidebar.service.ts @@ -53,17 +53,18 @@ export class SidebarService { }] } ] - }]; + }]; - constructor() { } + constructor() { + } getMenuItems(routes) { let menuItems = routes.configs - .filter(function(s) { + .filter(function (s) { return s.data.sidebarMeta != null; }) - .map(function(s) { + .map(function (s) { var meta = s.data.sidebarMeta; return { title: s.data.title, @@ -73,10 +74,10 @@ export class SidebarService { icon: meta.icon }; }) - .sort(function(a, b) { + .sort(function (a, b) { return (a.level - b.level) * 100 + a.order - b.order; }) - .filter(function(item) { + .filter(function (item) { return item.level == 0; }); diff --git a/src/app/theme/sidebar/sidebarState.service.ts b/src/app/theme/sidebar/sidebarState.service.ts index 81860e1e..6facaf27 100644 --- a/src/app/theme/sidebar/sidebarState.service.ts +++ b/src/app/theme/sidebar/sidebarState.service.ts @@ -11,7 +11,7 @@ export class SidebarStateService { isCollapsedStream$ = this._isCollapsed.asObservable(); // Service message commands - stateChanged(isCollapsed: boolean) { + stateChanged(isCollapsed:boolean) { this._isCollapsed.next(isCollapsed) } diff --git a/src/app/theme/theme.scss b/src/app/theme/theme.scss index 90593f57..9a9647cc 100644 --- a/src/app/theme/theme.scss +++ b/src/app/theme/theme.scss @@ -1,6 +1,5 @@ @import "sass/conf/conf"; @import "sass/bootstrap-overrides/overrides"; - @import "sass/blur-admin-theme"; @import "sass/buttons"; @import "sass/icons";