Commit a4e6d1f3d74894c262f9ca5edd5776ae7b8c870f
1 parent
8690849b
Exists in
master
and in
7 other branches
Fix master rebase @Inject() values
Showing
1 changed file
with
6 additions
and
6 deletions
Show diff stats
src/app/admin/layout-edit/designModeToggler.component.ts
| 1 | -import {Component, Inject} from 'ng-forward'; | 1 | +import {Component, Inject, Input} from 'ng-forward'; |
| 2 | import {DesignModeService} from './designMode.service'; | 2 | import {DesignModeService} from './designMode.service'; |
| 3 | import {AuthService, AuthEvents} from '../../login'; | 3 | import {AuthService, AuthEvents} from '../../login'; |
| 4 | 4 | ||
| @@ -6,7 +6,7 @@ import {AuthService, AuthEvents} from '../../login'; | @@ -6,7 +6,7 @@ import {AuthService, AuthEvents} from '../../login'; | ||
| 6 | selector: 'noosfero-design-toggler', | 6 | selector: 'noosfero-design-toggler', |
| 7 | templateUrl: 'app/admin/layout-edit/designModeToggler.html' | 7 | templateUrl: 'app/admin/layout-edit/designModeToggler.html' |
| 8 | }) | 8 | }) |
| 9 | -@Inject(DesignModeService) | 9 | +@Inject(DesignModeService, AuthService, '$sce') |
| 10 | export class DesignModeTogglerComponent { | 10 | export class DesignModeTogglerComponent { |
| 11 | 11 | ||
| 12 | @Input() iconClass: string = ''; | 12 | @Input() iconClass: string = ''; |
| @@ -14,16 +14,16 @@ export class DesignModeTogglerComponent { | @@ -14,16 +14,16 @@ export class DesignModeTogglerComponent { | ||
| 14 | @Input() offLabel: string = ''; | 14 | @Input() offLabel: string = ''; |
| 15 | @Input() onLabel: string = ''; | 15 | @Input() onLabel: string = ''; |
| 16 | 16 | ||
| 17 | - private _inDesignMode: boolean = false; | 17 | + private _inDesignMode: boolean = false; |
| 18 | 18 | ||
| 19 | - constructor(private designModeService: DesignModeService, private authService: AuthService, private $sce: ng.ISCEService) { | 19 | + constructor(private designModeService: DesignModeService, private authService: AuthService, private $sce: ng.ISCEService) { |
| 20 | this.authService.subscribe(AuthEvents[AuthEvents.logoutSuccess], () => { | 20 | this.authService.subscribe(AuthEvents[AuthEvents.logoutSuccess], () => { |
| 21 | this.designModeService.destroy(); | 21 | this.designModeService.destroy(); |
| 22 | }); | 22 | }); |
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | get icon(): string { | 25 | get icon(): string { |
| 26 | - if (this.iconClass && this.iconClass.trim().length > 0 ) { | 26 | + if (this.iconClass && this.iconClass.trim().length > 0) { |
| 27 | return '<i class=\'design-toggle-icon ' + this.iconClass + '\'></i>'; | 27 | return '<i class=\'design-toggle-icon ' + this.iconClass + '\'></i>'; |
| 28 | } | 28 | } |
| 29 | else { | 29 | else { |
| @@ -42,4 +42,4 @@ export class DesignModeTogglerComponent { | @@ -42,4 +42,4 @@ export class DesignModeTogglerComponent { | ||
| 42 | set inDesignMode(value: boolean) { | 42 | set inDesignMode(value: boolean) { |
| 43 | this.designModeService.setInDesignMode(value); | 43 | this.designModeService.setInDesignMode(value); |
| 44 | }; | 44 | }; |
| 45 | -} | ||
| 46 | \ No newline at end of file | 45 | \ No newline at end of file |
| 46 | +} |