From 558c22c3b37f6403bbb7d07ed4ab63dc17f52266 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 28 Aug 2018 15:30:21 +0200 Subject: [PATCH 1/6] MOBILE-2567 login: Escape mail to avoid regexp compare --- src/core/login/pages/email-signup/email-signup.html | 2 +- src/core/login/pages/email-signup/email-signup.ts | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/core/login/pages/email-signup/email-signup.html b/src/core/login/pages/email-signup/email-signup.html index ef62fd8f8..2e810dc57 100644 --- a/src/core/login/pages/email-signup/email-signup.html +++ b/src/core/login/pages/email-signup/email-signup.html @@ -87,7 +87,7 @@ {{ 'core.user.emailagain' | translate }} - + diff --git a/src/core/login/pages/email-signup/email-signup.ts b/src/core/login/pages/email-signup/email-signup.ts index 4f14c5407..d48fdc609 100644 --- a/src/core/login/pages/email-signup/email-signup.ts +++ b/src/core/login/pages/email-signup/email-signup.ts @@ -283,6 +283,16 @@ export class CoreLoginEmailSignupPage { } } + /** + * Escape mail to avoid special characters to be treated as a RegExp. + * + * @param {string} text Initial mail. + * @return {string} Escaped mail. + */ + escapeMail(text: string): string { + return this.textUtils.escapeForRegex(text); + } + /** * Show authentication instructions. */ From 63b932910deeb798129ebae7ec3d68d0c4a0dbe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 28 Aug 2018 16:12:49 +0200 Subject: [PATCH 2/6] MOBILE-2567 sitemenu: Add activated background style --- src/core/mainmenu/pages/more/more.scss | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/core/mainmenu/pages/more/more.scss b/src/core/mainmenu/pages/more/more.scss index 8d19b0b4d..d8baa9e9e 100644 --- a/src/core/mainmenu/pages/more/more.scss +++ b/src/core/mainmenu/pages/more/more.scss @@ -3,6 +3,9 @@ page-core-mainmenu-more { $core-more-background-ios: $list-ios-background-color !default; $core-more-background-md: $list-md-background-color !default; $core-more-background-wp: $item-wp-body-background-color !default; + $core-more-activated-background-ios: color-shade($core-more-background-ios) !default; + $core-more-activated-background-md: color-shade($core-more-background-md) !default; + $core-more-activated-background-wp: color-shade($core-more-background-wp) !default; $core-more-divider-ios: $item-ios-divider-background !default; $core-more-divider-md: $item-md-divider-background !default; $core-more-divider-wp: $item-wp-divider-background !default; @@ -14,7 +17,7 @@ page-core-mainmenu-more { $core-more-color-wp: $item-wp-body-text-color !default; .item-block { - &.item-ios, &.item-ios p { + &.item-ios { background-color: $core-more-background-ios; color: $core-more-color-ios; @@ -22,7 +25,7 @@ page-core-mainmenu-more { border-bottom: $hairlines-width solid $core-more-border-ios; } } - &.item-md, &.item-md p { + &.item-md { background-color: $core-more-background-md; color: $core-more-color-md; @@ -30,7 +33,7 @@ page-core-mainmenu-more { border-bottom: 1px solid $core-more-border-md; } } - &.item-wp, &.item-wp p { + &.item-wp { background-color: $core-more-background-wp; color: $core-more-color-wp; @@ -38,6 +41,18 @@ page-core-mainmenu-more { border-bottom: 1px solid $core-more-border-wp; } } + + &.activated { + &.item-ios { + background-color: $core-more-activated-background-ios; + } + &.item-md { + background-color: $core-more-activated-background-md; + } + &.item-wp { + background-color: $core-more-activated-background-wp; + } + } } ion-icon { From e97f87e021bc193f476d1730b29c838f62108d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 28 Aug 2018 17:03:34 +0200 Subject: [PATCH 3/6] MOBILE-2567 login: Fix forgot password avalaibility detection --- src/core/login/providers/helper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/login/providers/helper.ts b/src/core/login/providers/helper.ts index 844c446fa..35be01e17 100644 --- a/src/core/login/providers/helper.ts +++ b/src/core/login/providers/helper.ts @@ -203,7 +203,7 @@ export class CoreLoginHelperProvider { return this.requestPasswordReset(siteUrl).then(() => { return true; }).catch((error) => { - return error.available == 1 || error.errorcode != 'invalidrecord'; + return error.available == 1 || (error.errorcode != 'invalidrecord' && error.errorcode != ''); }); } From 3c83a984fda840f0f15655593d690d1cff73a09a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Wed, 29 Aug 2018 09:14:42 +0200 Subject: [PATCH 4/6] MOBILE-2567 rte: Fix RTE size on tables --- src/components/rich-text-editor/rich-text-editor.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/rich-text-editor/rich-text-editor.scss b/src/components/rich-text-editor/rich-text-editor.scss index f6bd913d1..baa715a62 100644 --- a/src/components/rich-text-editor/rich-text-editor.scss +++ b/src/components/rich-text-editor/rich-text-editor.scss @@ -5,6 +5,7 @@ core-rich-text-editor { min-height: 40vh; width: 100%; position: relative; + display: block; > div { position: absolute; From 41d5431fab7a4b2d7e4d3ec6d5669b9c16f9df3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Wed, 29 Aug 2018 15:44:19 +0200 Subject: [PATCH 5/6] MOBILE-2567 ux: Fix margin when keyboard is open --- src/app/app.scss | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/app/app.scss b/src/app/app.scss index 79ae83fe0..17509e20f 100644 --- a/src/app/app.scss +++ b/src/app/app.scss @@ -886,8 +886,14 @@ ion-alert.core-inapp-notification { } } -body.keyboard-is-open core-ion-tabs .tabbar { - display: none; +body.keyboard-is-open { + .scroll-content, .fixed-content { + margin-bottom: 0 !important; + } + + core-ion-tabs .tabbar { + display: none; + } } .item.item-radio, .item.item-checkbox { From d615a6d0ff4d3b11e48fa3554de34decff1def61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 30 Aug 2018 09:51:42 +0200 Subject: [PATCH 6/6] MOBILE-2567 ux: Make show password button rtl compatible --- src/components/show-password/show-password.scss | 6 ++---- src/core/course/components/module/module.scss | 2 +- src/core/courses/pages/my-overview/my-overview.html | 2 +- src/core/login/pages/credentials/credentials.html | 2 +- src/core/login/pages/reconnect/reconnect.html | 2 +- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/components/show-password/show-password.scss b/src/components/show-password/show-password.scss index fd66ae745..f02632d8e 100644 --- a/src/components/show-password/show-password.scss +++ b/src/components/show-password/show-password.scss @@ -11,8 +11,7 @@ core-show-password { background: transparent; padding: 0 ($content-padding / 2); position: absolute; - bottom: $content-padding / 2; - right: 0; + @include position(null, 0, $content-padding / 2, null); margin-top: 0; margin-bottom: 0; } @@ -43,7 +42,6 @@ core-show-password { bottom: 7px; } core-show-password .button[icon-only] { - bottom: 12px; - right: 5px; + @include position(null, 5px, 12px, null); } } diff --git a/src/core/course/components/module/module.scss b/src/core/course/components/module/module.scss index b77077df8..f7203aa18 100644 --- a/src/core/course/components/module/module.scss +++ b/src/core/course/components/module/module.scss @@ -45,7 +45,7 @@ core-course-module { } .core-module-buttons-more .spinner { - right: 13px; + @include position(null, 13px, null, null); position: absolute; } } diff --git a/src/core/courses/pages/my-overview/my-overview.html b/src/core/courses/pages/my-overview/my-overview.html index 0a9acea64..99400fe6a 100644 --- a/src/core/courses/pages/my-overview/my-overview.html +++ b/src/core/courses/pages/my-overview/my-overview.html @@ -37,7 +37,7 @@
- + {{ 'core.courses.inprogress' | translate }} {{ 'core.courses.future' | translate }} {{ 'core.courses.past' | translate }} diff --git a/src/core/login/pages/credentials/credentials.html b/src/core/login/pages/credentials/credentials.html index e7160fbc8..fbde4964c 100644 --- a/src/core/login/pages/credentials/credentials.html +++ b/src/core/login/pages/credentials/credentials.html @@ -21,7 +21,7 @@ - + diff --git a/src/core/login/pages/reconnect/reconnect.html b/src/core/login/pages/reconnect/reconnect.html index ca9d980b1..95b6a5593 100644 --- a/src/core/login/pages/reconnect/reconnect.html +++ b/src/core/login/pages/reconnect/reconnect.html @@ -31,7 +31,7 @@

{{username}}

- +