diff --git a/client/forbidden-markers-configuration-map.html b/client/forbidden-markers-configuration-map.html index 3efc1de7..5d5369f8 100644 --- a/client/forbidden-markers-configuration-map.html +++ b/client/forbidden-markers-configuration-map.html @@ -29,7 +29,8 @@ const topPage = fn.getTopPage(); map.initCanvas(topPage.data.map, {metaData: false, noGotoPoints: true}); - window.fn.map = map; + + document.querySelector("#forbidden-markers-configuration-map-page ons-back-button").onClick = () => fn.popPage(); // case matters! if (topPage.data.map.no_go_areas) for (let zone of topPage.data.map.no_go_areas) { diff --git a/client/index.html b/client/index.html index ae707e5d..f4addf4b 100644 --- a/client/index.html +++ b/client/index.html @@ -50,6 +50,12 @@ window.fn.popPage = function() { document.getElementById('appNavigator').popPage(); + let stateObj = {moveView: (history.state && history.state.moveView || 0)}; + if (history.state && history.state.moveSubPage && history.state.moveSubPage.length > 1) { + stateObj.moveSubPage = history.state.moveSubPage.splice(0); + stateObj.moveSubPage.shift(); + } + history.pushState(stateObj, ""); } window.fn.getTopPage = function() { diff --git a/client/settings-access-control.html b/client/settings-access-control.html index 84f72f19..96bb7850 100644 --- a/client/settings-access-control.html +++ b/client/settings-access-control.html @@ -108,6 +108,8 @@ var sshKeysTitle = document.getElementById('settings-access-control-ssh-keys-title'); var sshKeysList = document.getElementById('settings-access-control-ssh-keys-list'); + document.querySelector("#settings-access-control ons-back-button").onClick = () => fn.popPage(); // case matters! + ons.getScriptPage().onShow = function() { updateSettingsAccessControlPage(); }; diff --git a/client/settings-carpet-mode.html b/client/settings-carpet-mode.html index f805d0ea..94b6bdc7 100644 --- a/client/settings-carpet-mode.html +++ b/client/settings-carpet-mode.html @@ -62,6 +62,8 @@