From dcec83759fa91b59fa3ddbc46b95f5aa32f34195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 13 Aug 2019 13:24:31 +0200 Subject: [PATCH] MOBILE-3104 calendar: Fix calendar month mini param --- src/addon/calendar/pages/index/index.scss | 3 +++ src/addon/calendar/providers/calendar.ts | 9 +++++++-- src/directives/format-text.ts | 2 -- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 src/addon/calendar/pages/index/index.scss diff --git a/src/addon/calendar/pages/index/index.scss b/src/addon/calendar/pages/index/index.scss new file mode 100644 index 000000000..213b8abe5 --- /dev/null +++ b/src/addon/calendar/pages/index/index.scss @@ -0,0 +1,3 @@ +page-addon-calendar-index .toolbar-ios ion-title { + @include padding-horizontal(null, 120px); +} \ No newline at end of file diff --git a/src/addon/calendar/providers/calendar.ts b/src/addon/calendar/providers/calendar.ts index 7b09df4a8..17f372590 100644 --- a/src/addon/calendar/providers/calendar.ts +++ b/src/addon/calendar/providers/calendar.ts @@ -1176,10 +1176,15 @@ export class AddonCalendarProvider { const data: any = { year: year, - month: month, - mini: 1 // Set mini to 1 to prevent returning the course selector HTML. + month: month }; + // This parameter requires Moodle 3.5. + if ( site.isVersionGreaterEqualThan('3.5')) { + // Set mini to 1 to prevent returning the course selector HTML. + data.mini = 1; + } + if (courseId) { data.courseid = courseId; } diff --git a/src/directives/format-text.ts b/src/directives/format-text.ts index ada6cea19..ea7b02b9a 100644 --- a/src/directives/format-text.ts +++ b/src/directives/format-text.ts @@ -160,7 +160,6 @@ 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; } @@ -199,7 +198,6 @@ 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); }); }