diff --git a/src/app/layout/blocks/block.html b/src/app/layout/blocks/block.html index b6b1e2b..13a6067 100644 --- a/src/app/layout/blocks/block.html +++ b/src/app/layout/blocks/block.html @@ -1,4 +1,4 @@ -
+
diff --git a/src/app/profile/custom-content/custom-content.component.spec.ts b/src/app/profile/custom-content/custom-content.component.spec.ts index e310380..58c31bc 100644 --- a/src/app/profile/custom-content/custom-content.component.spec.ts +++ b/src/app/profile/custom-content/custom-content.component.spec.ts @@ -15,6 +15,7 @@ describe("Components", () => { beforeEach((done) => { let profileService = jasmine.createSpyObj("profileService", ["update"]); let notificationService = jasmine.createSpyObj("notificationService", ["success"]); + let designModeService = { isInDesignMode: () => { return true; }}; let properties = { profile: { custom_footer: "footer" } }; let cls = createClass({ template: htmlTemplate, @@ -24,7 +25,8 @@ describe("Components", () => { helpers.createProviderToValue("$uibModal", helpers.mocks.$modal), helpers.createProviderToValue("ProfileService", profileService), helpers.createProviderToValue("NotificationService", notificationService), - helpers.createProviderToValue("DesignModeService", helpers.mocks.designModeService) + //helpers.createProviderToValue("DesignModeService", helpers.mocks.designModeService) + helpers.createProviderToValue("DesignModeService", designModeService) ] }); helper = new ComponentTestHelper(cls, done); diff --git a/src/app/profile/custom-content/custom-content.component.ts b/src/app/profile/custom-content/custom-content.component.ts index 289f6f3..569fb0b 100644 --- a/src/app/profile/custom-content/custom-content.component.ts +++ b/src/app/profile/custom-content/custom-content.component.ts @@ -20,7 +20,6 @@ export class CustomContentComponent { content: string; originalContent: string; - editionMode = false; private modalInstance: any = null; constructor(private $uibModal: any, @@ -35,9 +34,10 @@ export class CustomContentComponent { }, () => { if (this.profile) this.content = (this.profile)[this.attribute]; }); - this.designModeService.onToggle.subscribe((designModeOn: boolean) => { - this.editionMode = designModeOn; - }); + } + + inEditMode() { + return this.designModeService.isInDesignMode(); } openEdit() { diff --git a/src/app/profile/custom-content/custom-content.html b/src/app/profile/custom-content/custom-content.html index 6ca137d..4ad9cc7 100644 --- a/src/app/profile/custom-content/custom-content.html +++ b/src/app/profile/custom-content/custom-content.html @@ -1,5 +1,5 @@
-
+
-- libgit2 0.21.2