Merge pull request #2076 from crazyserver/MOBILE-3068

Mobile 3068
main
Dani Palou 2019-08-26 13:53:33 +02:00 committed by GitHub
commit 1c088deeed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 2 deletions

View File

@ -65,6 +65,19 @@ export class MoodleMobileApp implements OnInit {
app.setElementClass('platform-windows', true);
}
}
// Register back button action to allow closing modals before anything else.
this.appProvider.registerBackButtonAction(() => {
// Following function is hidden in Ionic Code, however there's no solution for that.
const portal = app._getActivePortal();
if (portal) {
portal.pop();
return true;
}
return false;
}, 2000);
});
}

View File

@ -1012,6 +1012,11 @@ ion-app.app-root {
ion-alert .alert-checkbox-button .alert-checkbox-label {
white-space: normal;
}
ion-backdrop {
transition: opacity 100ms ease-in-out;
opacity: .1;
}
}
@each $color-name, $color-base, $color-contrast in get-colors($colors) {

View File

@ -178,7 +178,7 @@ export class CoreContextMenuComponent implements OnInit, OnDestroy {
showContextMenu(event: MouseEvent): void {
if (!this.expanded) {
const popover = this.popoverCtrl.create(CoreContextMenuPopoverComponent,
{ title: this.title, items: this.items, id: this.uniqueId });
{ title: this.title, items: this.items, id: this.uniqueId, showBackdrop: true });
popover.onDidDismiss(() => {
this.expanded = false;

View File

@ -1170,7 +1170,7 @@ export class CoreCourseHelperProvider {
module.handlerData = this.moduleDelegate.getModuleDataFor(module.modname, module, courseId, sectionId);
if (navCtrl) {
if (navCtrl && module.handlerData && module.handlerData.action) {
// If the link handler for this module passed through navCtrl, we can use the module's handler to navigate cleanly.
// Otherwise, we will redirect below.
modal.dismiss();