commit
1c088deeed
|
@ -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);
|
||||
});
|
||||
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue