diff --git a/src/addon/calendar/pages/list/list.html b/src/addon/calendar/pages/list/list.html
index 6eaaeb367..de5065205 100644
--- a/src/addon/calendar/pages/list/list.html
+++ b/src/addon/calendar/pages/list/list.html
@@ -20,7 +20,7 @@
-
+
diff --git a/src/components/navbar-buttons/navbar-buttons.ts b/src/components/navbar-buttons/navbar-buttons.ts
index 28c1f9fcf..98edb3421 100644
--- a/src/components/navbar-buttons/navbar-buttons.ts
+++ b/src/components/navbar-buttons/navbar-buttons.ts
@@ -85,7 +85,7 @@ export class CoreNavBarButtonsComponent implements OnInit {
selector += '[end]';
}
- buttonsContainer = header.querySelector(selector);
+ buttonsContainer = header.querySelector(selector);
if (buttonsContainer) {
this.domUtils.moveChildren(this.element, buttonsContainer);
}
diff --git a/src/components/split-view/split-view.scss b/src/components/split-view/split-view.scss
index 4383232eb..580884451 100644
--- a/src/components/split-view/split-view.scss
+++ b/src/components/split-view/split-view.scss
@@ -36,4 +36,16 @@ core-split-view {
}
}
}
+}
+
+.ios ion-header + core-split-view ion-menu.split-pane-side ion-content{
+ top: $navbar-ios-height;
+}
+
+.md ion-header + core-split-view ion-menu.split-pane-side ion-content{
+ top: $navbar-md-height;
+}
+
+.wp ion-header + core-split-view ion-menu.split-pane-side ion-content{
+ top: $navbar-wp-height;
}
\ No newline at end of file
diff --git a/src/components/split-view/split-view.ts b/src/components/split-view/split-view.ts
index 5d4709d20..9ddf22670 100644
--- a/src/components/split-view/split-view.ts
+++ b/src/components/split-view/split-view.ts
@@ -47,6 +47,7 @@ export class CoreSplitViewComponent implements OnInit {
@Input() when?: string | boolean = 'md';
protected isEnabled = false;
protected masterPageName = '';
+ protected masterPageIndex = 0;
protected loadDetailPage: any = false;
protected element: HTMLElement; // Current element.
@@ -63,6 +64,7 @@ export class CoreSplitViewComponent implements OnInit {
ngOnInit(): void {
// Get the master page name and set an empty page as a placeholder.
this.masterPageName = this.masterNav.getActive().component.name;
+ this.masterPageIndex = this.masterNav.indexOf(this.masterNav.getActive());
this.emptyDetails();
}
@@ -141,17 +143,19 @@ export class CoreSplitViewComponent implements OnInit {
activateSplitView(): void {
const currentView = this.masterNav.getActive(),
currentPageName = currentView.component.name;
- if (currentPageName != this.masterPageName) {
- // CurrentView is a 'Detail' page remove it from the 'master' nav stack.
- this.masterNav.pop();
+ if (this.masterNav.getPrevious().component.name == this.masterPageName) {
+ if (currentPageName != this.masterPageName) {
+ // CurrentView is a 'Detail' page remove it from the 'master' nav stack.
+ this.masterNav.pop();
- // And add it to the 'detail' nav stack.
- this.detailNav.setRoot(currentView.component, currentView.data);
- } else if (this.loadDetailPage) {
- // MasterPage is shown, load the last detail page if found.
- this.detailNav.setRoot(this.loadDetailPage.component, this.loadDetailPage.data);
+ // And add it to the 'detail' nav stack.
+ this.detailNav.setRoot(currentView.component, currentView.data);
+ } else if (this.loadDetailPage) {
+ // MasterPage is shown, load the last detail page if found.
+ this.detailNav.setRoot(this.loadDetailPage.component, this.loadDetailPage.data);
+ }
+ this.loadDetailPage = false;
}
- this.loadDetailPage = false;
}
/**
@@ -162,7 +166,7 @@ export class CoreSplitViewComponent implements OnInit {
currentPageName = detailView.component.name;
if (currentPageName != 'CoreSplitViewPlaceholderPage') {
// Current detail view is a 'Detail' page so, not the placeholder page, push it on 'master' nav stack.
- this.masterNav.push(detailView.component, detailView.data);
+ this.masterNav.insert(this.masterPageIndex + 1, detailView.component, detailView.data);
}
}
}
diff --git a/src/components/tabs/tabs.ts b/src/components/tabs/tabs.ts
index 04f744e0d..9c9cee453 100644
--- a/src/components/tabs/tabs.ts
+++ b/src/components/tabs/tabs.ts
@@ -60,13 +60,8 @@ export class CoreTabsComponent implements OnInit, AfterViewInit, OnChanges {
protected tabsShown = true;
protected scroll: HTMLElement; // Parent scroll element (if core-tabs is inside a ion-content).
- constructor(element: ElementRef, content: Content) {
+ constructor(element: ElementRef, protected content: Content) {
this.tabBarElement = element.nativeElement;
- setTimeout(() => {
- if (content) {
- this.scroll = content.getScrollElement();
- }
- }, 1);
}
/**
@@ -168,8 +163,11 @@ export class CoreTabsComponent implements OnInit, AfterViewInit, OnChanges {
// Setup tab scrolling.
this.tabBarHeight = this.topTabsElement.offsetHeight;
this.originalTabsContainer.style.paddingBottom = this.tabBarHeight + 'px';
- if (this.scroll) {
- this.scroll.classList.add('no-scroll');
+ if (this.content) {
+ this.scroll = this.content.getScrollElement();
+ if (this.scroll) {
+ this.scroll.classList.add('no-scroll');
+ }
}
this.initialized = true;
diff --git a/src/core/user/components/participants/participants.html b/src/core/user/components/participants/participants.html
index 9364acc74..f089dd40f 100644
--- a/src/core/user/components/participants/participants.html
+++ b/src/core/user/components/participants/participants.html
@@ -7,7 +7,7 @@
- 0">
+ 0" no-margin>
diff --git a/src/core/user/components/participants/participants.ts b/src/core/user/components/participants/participants.ts
index 5c9a2f75a..675be0144 100644
--- a/src/core/user/components/participants/participants.ts
+++ b/src/core/user/components/participants/participants.ts
@@ -49,7 +49,7 @@ export class CoreUserParticipantsComponent implements OnInit {
this.gotoParticipant(this.participants[0].id);
}
// Add log in Moodle.
- this.userProvider.logView(this.courseId).catch(() => {
+ this.userProvider.logParticipantsView(this.courseId).catch(() => {
// Ignore errors.
});
}).finally(() => {
diff --git a/src/core/user/pages/profile/profile.ts b/src/core/user/pages/profile/profile.ts
index 7feb85a75..0c188c07c 100644
--- a/src/core/user/pages/profile/profile.ts
+++ b/src/core/user/pages/profile/profile.ts
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-import { Component } from '@angular/core';
+import { Component, Optional } from '@angular/core';
import { IonicPage, NavParams, NavController } from 'ionic-angular';
import { CoreUserProvider } from '../../providers/user';
import { CoreUserHelperProvider } from '../../providers/helper';
@@ -54,7 +54,8 @@ export class CoreUserProfilePage {
private domUtils: CoreDomUtilsProvider, private translate: TranslateService, private eventsProvider: CoreEventsProvider,
private coursesProvider: CoreCoursesProvider, private sitesProvider: CoreSitesProvider,
private mimetypeUtils: CoreMimetypeUtilsProvider, private fileUploaderHelper: CoreFileUploaderHelperProvider,
- private userDelegate: CoreUserDelegate, private svComponent: CoreSplitViewComponent, private navCtrl: NavController) {
+ private userDelegate: CoreUserDelegate, private navCtrl: NavController,
+ @Optional() private svComponent: CoreSplitViewComponent) {
this.userId = navParams.get('userId');
this.courseId = navParams.get('courseId');