diff --git a/src/addon/mod/data/pages/entry/entry.ts b/src/addon/mod/data/pages/entry/entry.ts
index 815611c97..1b2b721eb 100644
--- a/src/addon/mod/data/pages/entry/entry.ts
+++ b/src/addon/mod/data/pages/entry/entry.ts
@@ -215,6 +215,7 @@ export class AddonModDataEntryPage implements OnDestroy {
*/
gotoEntry(entry: number): Promise
{
this.entryId = entry;
+ this.entry = null;
this.page = null;
this.entryLoaded = false;
diff --git a/src/addon/mod/workshop/components/assessment/assessment.scss b/src/addon/mod/workshop/components/assessment/assessment.scss
index bacc18ee2..f7d3ed7f2 100644
--- a/src/addon/mod/workshop/components/assessment/assessment.scss
+++ b/src/addon/mod/workshop/components/assessment/assessment.scss
@@ -1,35 +1,4 @@
-ion-app.app-root addon-mod-workshop-assessment {
- .item-md.item-block .item-inner {
- border-bottom: 1px solid $list-md-border-color;
- }
-
- .item-ios.item-block .item-inner {
- border-bottom: $hairlines-width solid $list-ios-border-color;
- }
-
- .item-wp.item-block .item-inner {
- border-bottom: 1px solid $list-wp-border-color;
- }
-
- &:last-child .item .item-inner {
- border-bottom: 0;
- }
-}
-
+ion-app.app-root addon-mod-workshop-assessment,
ion-app.app-root .card.with-borders addon-mod-workshop-assessment {
- .item-md.item-block .item-inner {
- border-bottom: 1px solid $list-md-border-color;
- }
-
- .item-ios.item-block .item-inner {
- border-bottom: $hairlines-width solid $list-ios-border-color;
- }
-
- .item-wp.item-block .item-inner {
- border-bottom: 1px solid $list-wp-border-color;
- }
-
- &:last-child .item .item-inner {
- border-bottom: 0;
- }
+ @include core-as-items();
}
\ No newline at end of file
diff --git a/src/addon/mod/workshop/components/submission/submission.scss b/src/addon/mod/workshop/components/submission/submission.scss
index 2dac5ff4e..6775a13ac 100644
--- a/src/addon/mod/workshop/components/submission/submission.scss
+++ b/src/addon/mod/workshop/components/submission/submission.scss
@@ -1,35 +1,4 @@
-ion-app.app-root addon-mod-workshop-submission {
- .item-md.item-block .item-inner {
- border-bottom: 1px solid $list-md-border-color;
- }
-
- .item-ios.item-block .item-inner {
- border-bottom: $hairlines-width solid $list-ios-border-color;
- }
-
- .item-wp.item-block .item-inner {
- border-bottom: 1px solid $list-wp-border-color;
- }
-
- &:last-child .item .item-inner {
- border-bottom: 0;
- }
-}
-
+ion-app.app-root addon-mod-workshop-submission,
ion-app.app-root .card.with-borders addon-mod-workshop-submission {
- .item-md.item-block .item-inner {
- border-bottom: 1px solid $list-md-border-color;
- }
-
- .item-ios.item-block .item-inner {
- border-bottom: $hairlines-width solid $list-ios-border-color;
- }
-
- .item-wp.item-block .item-inner {
- border-bottom: 1px solid $list-wp-border-color;
- }
-
- &:last-child .item .item-inner {
- border-bottom: 0;
- }
+ @include core-as-items();
}
\ No newline at end of file
diff --git a/src/addon/mod/workshop/providers/prefetch-handler.ts b/src/addon/mod/workshop/providers/prefetch-handler.ts
index 651e1b735..d7e213044 100644
--- a/src/addon/mod/workshop/providers/prefetch-handler.ts
+++ b/src/addon/mod/workshop/providers/prefetch-handler.ts
@@ -297,13 +297,13 @@ export class AddonModWorkshopPrefetchHandler extends CoreCourseActivityPrefetchH
userIds.push(grade.userid);
userIds.push(grade.gradeoverby);
- grade.reviewedby.forEach((assessment) => {
+ grade.reviewedby && grade.reviewedby.forEach((assessment) => {
userIds.push(assessment.userid);
userIds.push(assessment.gradinggradeoverby);
assessments[assessment.assessmentid] = assessment;
});
- grade.reviewerof.forEach((assessment) => {
+ grade.reviewerof && grade.reviewerof.forEach((assessment) => {
userIds.push(assessment.userid);
userIds.push(assessment.gradinggradeoverby);
assessments[assessment.assessmentid] = assessment;
diff --git a/src/app/app.ios.scss b/src/app/app.ios.scss
index 3a6213ed1..a2f7085af 100644
--- a/src/app/app.ios.scss
+++ b/src/app/app.ios.scss
@@ -70,15 +70,6 @@ ion-app.app-root.ios {
}
}
- // Recover borders on items inside cards.
- .card-ios.with-borders .item-ios.item-block .item-inner {
- border-bottom: $hairlines-width solid $list-ios-border-color;
- }
- .card-ios.with-borders .item-ios:last-child .item-inner {
- border-bottom: 0;
- }
-
-
.radio-ios .radio-icon {
@include position(0, null, null, 0);
@include margin(0);
diff --git a/src/app/app.md.scss b/src/app/app.md.scss
index c718b691c..8fe5fb096 100644
--- a/src/app/app.md.scss
+++ b/src/app/app.md.scss
@@ -48,14 +48,6 @@ ion-app.app-root.md {
}
}
- // Recover borders on items inside cards.
- .card-md.with-borders .item-md.item-block .item-inner {
- border-bottom: 1px solid $list-md-border-color;
- }
- .card-md.with-borders .item-md:last-child .item-inner {
- border-bottom: 0;
- }
-
.action-sheet-md {
.action-sheet-title,
.action-sheet-container > .action-sheet-group:first-child {
diff --git a/src/app/app.scss b/src/app/app.scss
index 839ceb389..0889d3c2f 100644
--- a/src/app/app.scss
+++ b/src/app/app.scss
@@ -96,6 +96,16 @@ ion-app.app-root {
border: 0;
}
+ // Recover borders on items inside cards.
+ .card.with-borders .core-as-item,
+ .core-as-item {
+ @include core-as-items();
+ }
+
+ .card.with-borders .item {
+ @include core-items();
+ }
+
.core-oauth-icon, .item.core-oauth-icon, .list .item.core-oauth-icon {
min-height: 32px;
img, .label {
@@ -842,7 +852,6 @@ ion-app.app-root {
core-loading {
flex-grow: 1;
- position: relative !important;
.core-loading-content {
position: absolute;
diff --git a/src/app/app.wp.scss b/src/app/app.wp.scss
index f8156ec7c..e64c3726a 100644
--- a/src/app/app.wp.scss
+++ b/src/app/app.wp.scss
@@ -47,12 +47,4 @@ ion-app.app-root.wp {
@include padding(null, null, null, 15px * $i + $item-wp-padding-start);
}
}
-
- // Recover borders on items inside cards.
- .card-wp.with-borders .item-wp.item-block .item-inner {
- border-bottom: 1px solid $list-wp-border-color;
- }
- .card-wp.with-borders .item-wp:last-child .item-inner {
- border-bottom: 0;
- }
}
\ No newline at end of file
diff --git a/src/components/file/file.scss b/src/components/file/file.scss
index 0c7c1f2cb..a39dcde10 100644
--- a/src/components/file/file.scss
+++ b/src/components/file/file.scss
@@ -13,4 +13,8 @@ ion-app.app-root {
core-file + core-file > .item-wp.item-block > .item-inner {
border-top: 1px solid $list-wp-border-color;
}
+
+ core-file > .item.item-block > .item-inner {
+ border-bottom: 0;
+ }
}
\ No newline at end of file
diff --git a/src/components/tabs/core-tabs.html b/src/components/tabs/core-tabs.html
index 7b0e2954b..5799c09bd 100644
--- a/src/components/tabs/core-tabs.html
+++ b/src/components/tabs/core-tabs.html
@@ -5,7 +5,7 @@
-
+
diff --git a/src/components/tabs/tabs.scss b/src/components/tabs/tabs.scss
index a33a2bfae..4c2cfc506 100644
--- a/src/components/tabs/tabs.scss
+++ b/src/components/tabs/tabs.scss
@@ -62,18 +62,6 @@ ion-app.app-root .core-tabs-bar {
}
}
-
- @include rtl() {
- .swiper-container-horizontal {
- transform: scaleX(-1);
- .swiper-wrapper {
- flex-direction: row-reverse;
- ion-slide {
- transform: scaleX(-1);
- }
- }
- }
- }
}
ion-app.app-root.md .core-tabs-bar a.tab-slide {
diff --git a/src/components/tabs/tabs.ts b/src/components/tabs/tabs.ts
index 2dc4faf73..d46d12170 100644
--- a/src/components/tabs/tabs.ts
+++ b/src/components/tabs/tabs.ts
@@ -16,7 +16,9 @@ import {
Component, Input, Output, EventEmitter, OnInit, OnChanges, OnDestroy, AfterViewInit, ViewChild, ElementRef,
SimpleChange
} from '@angular/core';
-import { Content, Slides } from 'ionic-angular';
+import { Content, Slides, Platform } from 'ionic-angular';
+import { TranslateService } from '@ngx-translate/core';
+import { Subscription } from 'rxjs';
import { CoreDomUtilsProvider } from '@providers/utils/dom';
import { CoreAppProvider } from '@providers/app';
import { CoreTabComponent } from './tab';
@@ -59,6 +61,7 @@ export class CoreTabsComponent implements OnInit, AfterViewInit, OnChanges, OnDe
maxSlides = 3;
slidesShown = this.maxSlides;
numTabsShown = 0;
+ direction = 'ltr';
protected originalTabsContainer: HTMLElement; // The container of the original tabs. It will include each tab's content.
protected initialized = false;
@@ -77,10 +80,20 @@ export class CoreTabsComponent implements OnInit, AfterViewInit, OnChanges, OnDe
protected firstSelectedTab: number;
protected unregisterBackButtonAction: any;
+ protected languageChangedSubscription: Subscription;
constructor(element: ElementRef, protected content: Content, protected domUtils: CoreDomUtilsProvider,
- protected appProvider: CoreAppProvider) {
+ protected appProvider: CoreAppProvider, platform: Platform, translate: TranslateService) {
this.tabBarElement = element.nativeElement;
+
+ this.direction = platform.isRTL ? 'rtl' : 'ltr';
+
+ // Change the side when the language changes.
+ this.languageChangedSubscription = translate.onLangChange.subscribe((event: any) => {
+ setTimeout(() => {
+ this.direction = platform.isRTL ? 'rtl' : 'ltr';
+ });
+ });
}
/**
diff --git a/src/providers/utils/dom.ts b/src/providers/utils/dom.ts
index faf948769..f08e51cb0 100644
--- a/src/providers/utils/dom.ts
+++ b/src/providers/utils/dom.ts
@@ -1034,6 +1034,9 @@ export class CoreDomUtilsProvider {
if (error.backtrace) {
extraInfo += '
' + this.textUtils.replaceNewLines(this.textUtils.escapeHTML(error.backtrace), '
');
}
+
+ // tslint:disable-next-line
+ console.error(error);
}
// We received an object instead of a string. Search for common properties.
diff --git a/src/theme/variables.scss b/src/theme/variables.scss
index 3e0d624a2..f3fbdfd3e 100644
--- a/src/theme/variables.scss
+++ b/src/theme/variables.scss
@@ -433,6 +433,42 @@ $core-question-state-incorrect-color: $red-light !default;
}
}
+@mixin core-as-items() {
+ .item-md.item-block > .item-inner {
+ border-bottom: 1px solid $list-md-border-color;
+ }
+
+ .item-ios.item-block > .item-inner {
+ border-bottom: $hairlines-width solid $list-ios-border-color;
+ }
+
+ .item-wp.item-block > .item-inner {
+ border-bottom: 1px solid $list-wp-border-color;
+ }
+
+ &:last-child .item > .item-inner {
+ border-bottom: 0;
+ }
+}
+
+@mixin core-items() {
+ &.item-md.item-block > .item-inner {
+ border-bottom: 1px solid $list-md-border-color;
+ }
+
+ &.item-ios.item-block > .item-inner {
+ border-bottom: $hairlines-width solid $list-ios-border-color;
+ }
+
+ &.item-wp.item-block > .item-inner {
+ border-bottom: 1px solid $list-wp-border-color;
+ }
+
+ &:last-child > .item-inner {
+ border-bottom: 0;
+ }
+}
+
// Font Awesome
$fa-font-path: $font-path;
@import "font-awesome";