From 6c0594431db94803cc10cab7773c9265523487ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Mon, 12 Aug 2019 12:45:20 +0200 Subject: [PATCH 1/2] MOBILE-1927 calendar: Fix error on description sync --- src/addon/calendar/providers/calendar-sync.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/addon/calendar/providers/calendar-sync.ts b/src/addon/calendar/providers/calendar-sync.ts index 6b81d39ae..457c25bb3 100644 --- a/src/addon/calendar/providers/calendar-sync.ts +++ b/src/addon/calendar/providers/calendar-sync.ts @@ -248,6 +248,11 @@ export class AddonCalendarSyncProvider extends CoreSyncBaseProvider { // Try to send the data. const data = this.utils.clone(event); // Clone the object because it will be modified in the submit function. + data.description = { + text: data.description, + format: 1 + }; + return this.calendarProvider.submitEventOnline(eventId > 0 ? eventId : undefined, data, siteId).then((newEvent) => { result.updated = true; result.events.push(newEvent); From 2aa37308ef056f53a4512fca994acc003cd4c70f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Mon, 12 Aug 2019 15:30:43 +0200 Subject: [PATCH 2/2] MOBILE-3074 format-text: Add magnifying glass when no height --- src/app/app.scss | 1 - src/directives/format-text.ts | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/app.scss b/src/app/app.scss index f2e7d5892..8bbc87959 100644 --- a/src/app/app.scss +++ b/src/app/app.scss @@ -226,7 +226,6 @@ ion-app.app-root { user-select: text; word-break: break-word; word-wrap: break-word; - white-space: normal; &[maxHeight], &[ng-reflect-max-height] { diff --git a/src/directives/format-text.ts b/src/directives/format-text.ts index d9977a388..ada6cea19 100644 --- a/src/directives/format-text.ts +++ b/src/directives/format-text.ts @@ -160,6 +160,7 @@ export class CoreFormatTextDirective implements OnChanges { */ addMagnifyingGlasses(): void { const imgs = Array.from(this.element.querySelectorAll('.core-adapted-img-container > img')); + console.error(this.element, imgs); if (!imgs.length) { return; } @@ -198,6 +199,7 @@ export class CoreFormatTextDirective implements OnChanges { this.domUtils.viewImage(imgSrc, img.getAttribute('alt'), this.component, this.componentId); }); + console.error(img.parentNode, anchor); img.parentNode.appendChild(anchor); }); } @@ -339,6 +341,9 @@ export class CoreFormatTextDirective implements OnChanges { } } else { this.domUtils.moveChildren(div, this.element); + + // Add magnifying glasses to images. + this.addMagnifyingGlasses(); } this.element.classList.remove('core-disable-media-adapt');