|
|
@ -33,7 +33,7 @@ export class WorkPackageZenModeButtonController extends WorkPackageButtonControl |
|
|
|
public buttonId:string = 'work-packages-zen-mode-toggle-button'; |
|
|
|
public buttonId:string = 'work-packages-zen-mode-toggle-button'; |
|
|
|
public iconClass:string = 'icon-zen-mode'; |
|
|
|
public iconClass:string = 'icon-zen-mode'; |
|
|
|
|
|
|
|
|
|
|
|
public inZenMode:boolean = false; |
|
|
|
static inZenMode:boolean = false; |
|
|
|
|
|
|
|
|
|
|
|
private activateLabel:string; |
|
|
|
private activateLabel:string; |
|
|
|
private deactivateLabel:string; |
|
|
|
private deactivateLabel:string; |
|
|
@ -58,17 +58,17 @@ export class WorkPackageZenModeButtonController extends WorkPackageButtonControl |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public isActive():boolean { |
|
|
|
public isActive():boolean { |
|
|
|
return this.inZenMode; |
|
|
|
return WorkPackageZenModeButtonController.inZenMode; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public performAction() { |
|
|
|
public performAction() { |
|
|
|
if (this.inZenMode) { |
|
|
|
if (WorkPackageZenModeButtonController.inZenMode) { |
|
|
|
// deactivate Zen Mode
|
|
|
|
// deactivate Zen Mode
|
|
|
|
this.inZenMode = false; |
|
|
|
WorkPackageZenModeButtonController.inZenMode = false; |
|
|
|
angular.element('body').removeClass('zen-mode'); |
|
|
|
angular.element('body').removeClass('zen-mode'); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// activate Zen Mode
|
|
|
|
// activate Zen Mode
|
|
|
|
this.inZenMode = true; |
|
|
|
WorkPackageZenModeButtonController.inZenMode = true; |
|
|
|
angular.element('body').addClass('zen-mode'); |
|
|
|
angular.element('body').addClass('zen-mode'); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|