From e63d6949f43c8901dc9f0495de3c7968890ca276 Mon Sep 17 00:00:00 2001 From: sudip-mukherjee Date: Wed, 13 Feb 2019 15:04:17 +0530 Subject: [PATCH 1/9] Issue #SB-10304 feat: Changed BG for buttons --- src/service/common-util.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/service/common-util.service.ts b/src/service/common-util.service.ts index 672b85479..a1f5ef42a 100644 --- a/src/service/common-util.service.ts +++ b/src/service/common-util.service.ts @@ -250,7 +250,7 @@ export class CommonUtilService implements OnDestroy { buttons: [ { text: this.translateMessage('YES'), - cssClass: 'alert-btn-delete', + cssClass: 'alert-btn-cancel', handler: () => { this.telemetryGeneratorService.generateBackClickedTelemetry(pageId, environment, isNavBack); this.platform.exitApp(); @@ -259,7 +259,7 @@ export class CommonUtilService implements OnDestroy { }, { text: this.translateMessage('NO'), - cssClass: 'alert-btn-cancel', + cssClass: 'alert-btn-delete', handler: () => { // telemetry if (this.alert) { From 6b4c75cfca9e5372f5bf295cdd5d7907f02f0b50 Mon Sep 17 00:00:00 2001 From: ankur01oct Date: Wed, 13 Feb 2019 18:09:27 +0530 Subject: [PATCH 2/9] Issue SB-10325 feat: ETB Consumption v2 Library Page UI --- .../card/resource/resource-card.scss | 218 +++++++++--------- src/pages/resources/resources.html | 4 +- src/pages/resources/resources.scss | 28 +-- src/pages/resources/resources.ts | 22 +- 4 files changed, 132 insertions(+), 140 deletions(-) diff --git a/src/component/card/resource/resource-card.scss b/src/component/card/resource/resource-card.scss index 3bf6c42b8..497218620 100644 --- a/src/component/card/resource/resource-card.scss +++ b/src/component/card/resource/resource-card.scss @@ -1,124 +1,124 @@ - - .resource-card{ - box-shadow: none; - } - .app-icon{ - width:100%; - min-height:70px; - max-height:70px; +.resource-card{ + box-shadow: none; +} +.app-icon{ + width:100%; + min-height:70px; + max-height:70px; +} +.custom.card { + width: 282px; + border-radius: 2px; + height: 80px; + // box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.12); + grid-gap: 13px; + background-color: #fff; + &.saved { + border-radius: 2px; + background-color: rgba(0, 136, 68, 0.1); + border: 0.5px solid #008844; } - .custom.card { - width: 282px; + &.recent { border-radius: 2px; - height: 80px; - // box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.12); - grid-gap: 13px; - background-color: #fff; - &.saved { - border-radius: 2px; - background-color: rgba(0, 136, 68, 0.1); - border: 0.5px solid #008844; + background-color: rgba(2, 79, 157, 0.1); + border: 0.5px solid #024f9d; + } + @include margin(0, 16px, 0, 0); + @include padding(15px, 16px); + display: grid; + grid-template-columns: 1fr 2.9fr; + &.about{ + display: block; + ion-label{ + margin-bottom: 1px; + font-size: 12px; + font-weight: bold; + font-style: normal; + font-stretch: normal; + line-height: normal; + letter-spacing: -0.4px; + color: #a4a4a4; } - &.recent { - border-radius: 2px; - background-color: rgba(2, 79, 157, 0.1); - border: 0.5px solid #024f9d; + p{ + margin-top: 0; + font-size: 14px; + font-weight: normal; + font-style: normal; + font-stretch: normal; + line-height: normal; + letter-spacing: -0.4px; + color: #000000; } - @include margin(0, 16px, 0, 0); - @include padding(15px, 16px); + } + // &:first-child { + // @include margin(null, null, null, 21px !important); + // } + // &:last-child { + // @include margin(null, 16px, null, null !important); + // } + .left { + overflow:hidden; display: grid; - grid-template-columns: 1fr 2.9fr; - &.about{ - display: block; - ion-label{ - margin-bottom: 1px; - font-size: 12px; - font-weight: bold; - font-style: normal; - font-stretch: normal; - line-height: normal; - letter-spacing: -0.4px; - color: #a4a4a4; - } - p{ - margin-top: 0; - font-size: 14px; - font-weight: normal; - font-style: normal; - font-stretch: normal; - line-height: normal; - letter-spacing: -0.4px; - color: #000000; - } - } - // &:first-child { - // @include margin(null, null, null, 21px !important); - // } - // &:last-child { - // @include margin(null, 16px, null, null !important); - // } - .left { - overflow:hidden; - display: grid; - grid-template-columns: 1fr; - grid-template-rows: 1fr; + grid-template-columns: 1fr; + grid-template-rows: 1fr; - .img-container { - background-color: grey; - width:100%; - min-height:70px; - } + .img-container { + background-color: grey; + width:100%; + width: 56px; + height: 56px; } - .right { - overflow:hidden; - display: grid; - grid-template-columns: 1fr; - grid-template-rows: 1fr; + } + .right { + overflow:hidden; + display: grid; + grid-template-columns: 1fr; + grid-template-rows: 1fr; - .title { - width:100%; - overflow:hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; - margin:0; - margin-bottom: 3px; - padding:0; - font-weight: 500; - font-style: normal; - font-stretch: normal; - line-height: normal; - letter-spacing: -0.4px; - color: #333333; - } - .info{ - font-size: 12px; - font-weight: 500; - font-style: normal; - font-stretch: normal; - line-height: normal; - letter-spacing: -0.4px; - color: #979797; - } + .title { + width:100%; + overflow:hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + margin:0; + margin-bottom: 3px; + padding:0; + font-weight: 500; + font-style: normal; + font-stretch: normal; + line-height: normal; + letter-spacing: -0.4px; + color: #333333; } + .info{ + font-size: 12px; + font-weight: 500; + font-style: normal; + font-stretch: normal; + line-height: normal; + letter-spacing: -0.4px; + color: #979797; + } + } - &.offline{ - .left{ - margin: -16px 0 -15px -16px; + &.offline{ + .left{ + margin: -16px 0 -15px -16px; - .img-container { - display: flex; - align-items: center; - background-color: map-get($colors, danger); - .icon{ - margin: auto; - font-size: 25px; - } + .img-container { + display: flex; + align-items: center; + background-color: map-get($colors, danger); + .icon{ + margin: auto; + font-size: 25px; } } - .right{ - opacity: 0.5; - } + } + .right{ + opacity: 0.5; } } +} diff --git a/src/pages/resources/resources.html b/src/pages/resources/resources.html index 62f1088e6..7254d0092 100644 --- a/src/pages/resources/resources.html +++ b/src/pages/resources/resources.html @@ -21,10 +21,10 @@ -
+
{{grade?.name}} diff --git a/src/pages/resources/resources.scss b/src/pages/resources/resources.scss index 5debd2417..2f31f436b 100644 --- a/src/pages/resources/resources.scss +++ b/src/pages/resources/resources.scss @@ -105,8 +105,9 @@ page-resources { .scroll-heading { padding-top: 10px; @extend .NotoSans-bold; - font-size: 1.350em; width: 60%; + color: #333333; + font-size: 16px; } .view-all-link { font-size: 1.2rem; @@ -232,8 +233,8 @@ page-resources { .class-filter-cotainer { box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2); background-color: #f4f4f4; + margin-bottom: 4px; } - .class-pill { min-width: 75px; // height: 30px; @@ -256,25 +257,23 @@ page-resources { // box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.19); // background-color: #024f9d; // color: #ffffff; - opacity: 1; + opacity: 1.5; } &:last-child { @include margin(0, 30, 0, 0); } } - .app-icon{ - width:100%; - height:50px; - } .section-solid{ + background-color: #ffffff; .heading{ - font-size: 18px; + font-size: 16px; font-weight: bold; font-style: normal; font-stretch: normal; line-height: normal; letter-spacing: -0.5px; - color: #024f9d; + color: #333333; + padding-bottom: 4px; } .card-container { width:100%; @@ -318,10 +317,9 @@ page-resources { grid-template-columns: 1fr; grid-template-rows: 1fr; .img-container { - background-color: grey; - width:100%; - min-height:70px; - max-height:70px; + background-color: #d8d8d8; + width: 56px; + height: 56px; } } .right { @@ -359,6 +357,4 @@ page-resources { } } } -} - - +} \ No newline at end of file diff --git a/src/pages/resources/resources.ts b/src/pages/resources/resources.ts index b9b87752c..5fa59f736 100644 --- a/src/pages/resources/resources.ts +++ b/src/pages/resources/resources.ts @@ -421,14 +421,10 @@ export class ResourcesPage implements OnInit, AfterViewInit { } console.log('pageAssembleCriteria', contentSearchCriteria); // swipe down to refresh should not over write current selected options - if (this.currentGrade && this.currentGrade.name) { - this.getGroupByPageReq.grade = [this.currentGrade.name]; - } else if (contentSearchCriteria.grade) { + if (contentSearchCriteria.grade) { this.getGroupByPageReq.grade = [contentSearchCriteria.grade[0]]; } - if (this.currentMedium) { - this.getGroupByPageReq.medium = [this.currentMedium]; - } else if (contentSearchCriteria.medium) { + if (contentSearchCriteria.medium) { this.getGroupByPageReq.medium = [contentSearchCriteria.medium[0]]; } if (contentSearchCriteria.board) { @@ -624,6 +620,7 @@ export class ResourcesPage implements OnInit, AfterViewInit { } this.getPopularContent(false); + this.getCategoryData(); } @@ -706,7 +703,7 @@ export class ResourcesPage implements OnInit, AfterViewInit { for (let i = 0, len = this.categoryMediums.length; i < len; i++) { if (this.getGroupByPageReq.medium[0].toLowerCase().trim() === this.categoryMediums[i].name.toLowerCase().trim() ) { - this.mediumClick(i); + this.mediumClick(this.categoryMediums[i].name); } } } @@ -780,21 +777,20 @@ export class ResourcesPage implements OnInit, AfterViewInit { } document.getElementById('gradeScroll').scrollTo({top: 0, left: index * 75, behavior: 'smooth'}); } - mediumClick(index) { - this.getGroupByPageReq.medium = [this.categoryMediums[index].name]; - if ( this.currentMedium !== this.categoryMediums[index].name) { + mediumClick(mediumName: string) { + this.getGroupByPageReq.medium = [mediumName]; + if ( this.currentMedium !== mediumName) { this.getGroupByPage(); } for (let i = 0, len = this.categoryMediums.length; i < len; i++) { - if (i === index ) { - this.currentMedium = this.categoryMediums[index].name; + if (this.categoryMediums[i].name === mediumName ) { + this.currentMedium = this.categoryMediums[i].name; this.categoryMediums[i].selected = true; } else { this.categoryMediums[i].selected = false; } } - console.log('medium', this.categoryMediums[index]); } navigateToDetailPage(item, index, sectionName) { From 686e023d68509506234bc10107d574b78c40bdc9 Mon Sep 17 00:00:00 2001 From: ankur01oct Date: Wed, 13 Feb 2019 19:05:45 +0530 Subject: [PATCH 3/9] Issue SB-10325 feat: ETB Consumption v2 Library Page UI --- src/assets/styles/_helper.scss | 8 +++++++- src/component/card/resource/resource-card.html | 2 +- src/pages/resources/resources.html | 10 +++++----- src/pages/resources/resources.scss | 4 ++-- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/assets/styles/_helper.scss b/src/assets/styles/_helper.scss index d22e9d0c1..73278232a 100644 --- a/src/assets/styles/_helper.scss +++ b/src/assets/styles/_helper.scss @@ -80,6 +80,9 @@ .MR5{ margin-right: 5px; } +.MR4{ + @include margin(null, 4px, null, null); +} .MR6{ @include margin(null, 6px, null, null); @@ -96,6 +99,9 @@ .MR20{ @include margin(null, 20px, null, null); } +.MR26{ + @include margin(null, 26px, null, null); +} .MT5{ margin-top: 5px; @@ -217,7 +223,7 @@ } .PR10{ - padding-right: 10px; + @include padding(null, 10px, null, null) } .PR15{ diff --git a/src/component/card/resource/resource-card.html b/src/component/card/resource/resource-card.html index 6c08463a4..6b82c82ca 100644 --- a/src/component/card/resource/resource-card.html +++ b/src/component/card/resource/resource-card.html @@ -13,7 +13,7 @@
{{course?.gradeLevel}} - + {{course?.subject}}
diff --git a/src/pages/resources/resources.html b/src/pages/resources/resources.html index 7254d0092..c5a1bfb10 100644 --- a/src/pages/resources/resources.html +++ b/src/pages/resources/resources.html @@ -20,12 +20,12 @@ -
- {{medium?.name}} Medium + -
- + {{grade?.name}} @@ -96,7 +96,7 @@
{{item?.gradeLevel}} - + {{item?.subject}}
diff --git a/src/pages/resources/resources.scss b/src/pages/resources/resources.scss index 2f31f436b..a311fec87 100644 --- a/src/pages/resources/resources.scss +++ b/src/pages/resources/resources.scss @@ -197,7 +197,7 @@ page-resources { } .medium-pill { - min-width: 120px; + min-width: 106px; // height: 30px; height: 100%; // border-radius: 2px !important; @@ -236,7 +236,7 @@ page-resources { margin-bottom: 4px; } .class-pill { - min-width: 75px; + min-width: 37px; // height: 30px; // border-radius: 15px !important; // box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.12); From 13842655723348c674541a343c79935b454559c8 Mon Sep 17 00:00:00 2001 From: ankur01oct Date: Wed, 13 Feb 2019 19:14:24 +0530 Subject: [PATCH 4/9] Issue SB-10325 feat: ETB Consumption v2 Library Page UI --- src/component/card/resource/resource-card.html | 2 +- src/component/card/resource/resource-card.scss | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/component/card/resource/resource-card.html b/src/component/card/resource/resource-card.html index 6b82c82ca..7a03142d6 100644 --- a/src/component/card/resource/resource-card.html +++ b/src/component/card/resource/resource-card.html @@ -3,7 +3,7 @@
- +
diff --git a/src/component/card/resource/resource-card.scss b/src/component/card/resource/resource-card.scss index 497218620..1bfc37be6 100644 --- a/src/component/card/resource/resource-card.scss +++ b/src/component/card/resource/resource-card.scss @@ -1,11 +1,6 @@ .resource-card{ box-shadow: none; } -.app-icon{ - width:100%; - min-height:70px; - max-height:70px; -} .custom.card { width: 282px; border-radius: 2px; From 19845c58d892d01bfa0db8b77acff7813a6df415 Mon Sep 17 00:00:00 2001 From: ankur01oct Date: Wed, 13 Feb 2019 20:07:47 +0530 Subject: [PATCH 5/9] Issue SB-10325 feat: ETB Consumption v2 Library Page UI --- src/pages/resources/resources.html | 2 +- src/pages/resources/resources.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/resources/resources.html b/src/pages/resources/resources.html index c5a1bfb10..d6b1fd9e2 100644 --- a/src/pages/resources/resources.html +++ b/src/pages/resources/resources.html @@ -25,7 +25,7 @@
- {{grade?.name}} diff --git a/src/pages/resources/resources.scss b/src/pages/resources/resources.scss index a311fec87..30f10ccf8 100644 --- a/src/pages/resources/resources.scss +++ b/src/pages/resources/resources.scss @@ -236,7 +236,7 @@ page-resources { margin-bottom: 4px; } .class-pill { - min-width: 37px; + min-width: 47px; // height: 30px; // border-radius: 15px !important; // box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.12); From aa8fc9a9bf68dcc644e9219bbd4cb15378a964a6 Mon Sep 17 00:00:00 2001 From: sudip-mukherjee Date: Wed, 13 Feb 2019 22:11:16 +0530 Subject: [PATCH 6/9] Issue #SB-9620 fix: Changed Key for translation --- .../add-or-remove-group-user/add-or-remove-group-user.ts | 2 +- src/pages/user-and-groups/group-details/group-details.ts | 4 ++-- src/pages/user-and-groups/user-and-groups.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/user-and-groups/add-or-remove-group-user/add-or-remove-group-user.ts b/src/pages/user-and-groups/add-or-remove-group-user/add-or-remove-group-user.ts index 72ca22c75..5917c7e17 100644 --- a/src/pages/user-and-groups/add-or-remove-group-user/add-or-remove-group-user.ts +++ b/src/pages/user-and-groups/add-or-remove-group-user/add-or-remove-group-user.ts @@ -238,7 +238,7 @@ export class AddOrRemoveGroupUserPage { } }, { - text: this.commonUtilService.translateMessage('Yes'), + text: this.commonUtilService.translateMessage('YES'), cssClass: 'alert-btn-delete', handler: () => { this.deleteUsersFromGroup(); diff --git a/src/pages/user-and-groups/group-details/group-details.ts b/src/pages/user-and-groups/group-details/group-details.ts index a4be9e999..6246f578f 100644 --- a/src/pages/user-and-groups/group-details/group-details.ts +++ b/src/pages/user-and-groups/group-details/group-details.ts @@ -372,7 +372,7 @@ export class GroupDetailsPage { } }, { - text: this.translateMessage('Yes'), + text: this.translateMessage('YES'), cssClass: 'alert-btn-delete', handler: () => { this.deleteGroup(); @@ -424,7 +424,7 @@ export class GroupDetailsPage { } }, { - text: this.translateMessage('Yes'), + text: this.translateMessage('YES'), cssClass: 'alert-btn-delete', handler: () => { this.deleteUsersinGroup(index); diff --git a/src/pages/user-and-groups/user-and-groups.ts b/src/pages/user-and-groups/user-and-groups.ts index 9ff8a0fcd..c3b69cffa 100644 --- a/src/pages/user-and-groups/user-and-groups.ts +++ b/src/pages/user-and-groups/user-and-groups.ts @@ -555,7 +555,7 @@ export class UserAndGroupsPage { } }, { - text: this.translateMessage('Yes'), + text: this.translateMessage('YES'), cssClass: 'alert-btn-delete', handler: () => { this.deleteGroup(index); @@ -618,7 +618,7 @@ export class UserAndGroupsPage { } }, { - text: this.translateMessage('Yes'), + text: this.translateMessage('YES'), cssClass: 'alert-btn-delete', handler: () => { this.deleteUser(index); From ac9e4f717c006cdd8e3129daf645469563f201bd Mon Sep 17 00:00:00 2001 From: sudip-mukherjee Date: Wed, 13 Feb 2019 22:17:42 +0530 Subject: [PATCH 7/9] Issue #SB-3607 fix: Modified backbutton functionality --- src/pages/search/filters/filter.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/pages/search/filters/filter.ts b/src/pages/search/filters/filter.ts index db509c851..b505d1003 100644 --- a/src/pages/search/filters/filter.ts +++ b/src/pages/search/filters/filter.ts @@ -3,6 +3,7 @@ import { NavParams, PopoverController, NavController, Events, Platform } from 'i import { CommonUtilService } from '../../../service/common-util.service'; import * as _ from 'lodash'; import { FilterOptions } from './options/options'; +import { IonicApp } from 'ionic-angular'; @Component({ selector: 'page-filter', @@ -22,7 +23,8 @@ export class FilterPage { private navCtrl: NavController, private events: Events, private commonUtilService: CommonUtilService, - private platform: Platform + private platform: Platform, + private ionicApp: IonicApp ) { this.init(); this.handleBackButton(); @@ -105,7 +107,13 @@ export class FilterPage { */ handleBackButton() { this.unregisterBackButton = this.platform.registerBackButtonAction(() => { - this.navCtrl.pop(); + const activePortal = this.ionicApp._modalPortal.getActive() || + this.ionicApp._toastPortal.getActive() || this.ionicApp._overlayPortal.getActive(); + if (activePortal) { + activePortal.dismiss(); + } else if (this.navCtrl.canGoBack()) { + this.navCtrl.pop(); + } this.unregisterBackButton(); }, 11); } From 61b175b193b372514590b0804c73675739887437 Mon Sep 17 00:00:00 2001 From: sudip-mukherjee Date: Wed, 13 Feb 2019 22:30:21 +0530 Subject: [PATCH 8/9] Issue #SB-9923 feat: Added RTL support for name field. --- .../personal-details-edit.profile.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/profile/personal-details-edit.profile/personal-details-edit.profile.html b/src/pages/profile/personal-details-edit.profile/personal-details-edit.profile.html index bf67b4b4c..5afce4ee9 100644 --- a/src/pages/profile/personal-details-edit.profile/personal-details-edit.profile.html +++ b/src/pages/profile/personal-details-edit.profile/personal-details-edit.profile.html @@ -14,7 +14,7 @@ {{'ERROR_NAME_INVALID' | translate}}
+ (ionChange)="enableSubmitButton();" dir="{{commonUtilService.getAppDirection()}}"> {{'STATE' | translate}} From 2283a03e5c379307a17dbec2ce68492851c119b4 Mon Sep 17 00:00:00 2001 From: ankur01oct Date: Thu, 14 Feb 2019 11:55:29 +0530 Subject: [PATCH 9/9] Issue SB-10325 feat: ETB Consumption v2 Library Page UI --- src/assets/styles/_helper.scss | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/assets/styles/_helper.scss b/src/assets/styles/_helper.scss index 73278232a..07c5bfcbf 100644 --- a/src/assets/styles/_helper.scss +++ b/src/assets/styles/_helper.scss @@ -92,6 +92,11 @@ @include margin(null, 10px, null, null); } + +.MR12{ + @include margin(null, 12px, null, null); +} + .MR15{ @include margin(null, 15px, null, null); } @@ -99,9 +104,6 @@ .MR20{ @include margin(null, 20px, null, null); } -.MR26{ - @include margin(null, 26px, null, null); -} .MT5{ margin-top: 5px;