diff --git a/src/app/layout/blocks/block.component.ts b/src/app/layout/blocks/block.component.ts index 3cf6a16..3e397c1 100644 --- a/src/app/layout/blocks/block.component.ts +++ b/src/app/layout/blocks/block.component.ts @@ -4,13 +4,14 @@ import { BlockService } from '../../../lib/ng-noosfero-api/http/block.service'; import { NotificationService } from '../../shared/services/notification.service'; import { AuthService, SessionService, AuthEvents } from "../../login"; import { TranslatorService } from "../../shared/services/translator.service"; +import { DesignModeService } from "../../admin/layout-edit/designMode.service"; @Component({ selector: 'noosfero-block', templateUrl: 'app/layout/blocks/block.html', directives: [BlockEditionComponent] }) -@Inject("$uibModal", "$scope", "$state", "$rootScope", BlockService, NotificationService, AuthService, SessionService, TranslatorService) +@Inject("$uibModal", "$scope", "$state", "$rootScope", BlockService, NotificationService, AuthService, SessionService, TranslatorService, DesignModeService) export class BlockComponent { @Input() block: noosfero.Block; @@ -31,7 +32,8 @@ export class BlockComponent { private notificationService: NotificationService, private authService: AuthService, private session: SessionService, - private translatorService: TranslatorService) { + private translatorService: TranslatorService, + private designModeService: DesignModeService) { this.currentUser = this.session.currentUser(); this.authService.subscribe(AuthEvents[AuthEvents.loginSuccess], () => { @@ -45,6 +47,10 @@ export class BlockComponent { this.$rootScope.$on("$stateChangeSuccess", (event: ng.IAngularEvent, toState: ng.ui.IState) => { this.verifyHomepage(); }); + this.designModeService.onToggle.subscribe((designModeOn: boolean) => { + this.editionMode = designModeOn; + this.$scope.$apply(); + }); } ngOnInit() { diff --git a/src/app/layout/scss/_layout.scss b/src/app/layout/scss/_layout.scss index 8a7fd75..bc025cf 100644 --- a/src/app/layout/scss/_layout.scss +++ b/src/app/layout/scss/_layout.scss @@ -36,14 +36,6 @@ } } - -body.noosfero-design-on { - - div.content-wrapper { - opacity: 0.5; - } -} - ul.nav > li.toggler-container { position: relative; padding-top: 12px; @@ -55,4 +47,4 @@ ul.nav > li.toggler-container { margin-left: 0px; margin-right: 0px; background-color: #edecec; -} \ No newline at end of file +} -- libgit2 0.21.2