Commit 667f12b7 authored by Sven Franck's avatar Sven Franck

app: enable rendering on backward transition from a deeplink

parent 3271b9d2
...@@ -5183,16 +5183,25 @@ ...@@ -5183,16 +5183,25 @@
* @param {object} data Data passed along with this (JQM) event * @param {object} data Data passed along with this (JQM) event
*/ */
app.parsePage = function (e, data) { app.parsePage = function (e, data) {
var page, base, config, raw_url, handle, clean_url, parsed_url, first; var page, base, config, raw_url, handle, clean_url, parsed_url, first,
skipper, base_page;
if (data) { if (data) {
// update page title on backwards transition to the first page (still // update page title on backwards transition to the first page (still
// is in DOM, so no new page created, so no title update...) // is in DOM, so no new page created, so no title update...)
// TODO: not bulletproof i18n handling... we expect i18n to be defined // TODO: not bulletproof i18n handling... we expect i18n to be defined
// TODO: blocker is not nice
if (typeof data.toPage === "object") { if (typeof data.toPage === "object") {
base_page = data.toPage[0];
if ($.mobile.firstPage[0].getAttribute("data-url") === if ($.mobile.firstPage[0].getAttribute("data-url") ===
data.toPage[0].getAttribute("data-url")) { base_page.getAttribute("data-url")) {
app.setPageTitle("global_dict.home"); app.setPageTitle("global_dict.home");
// NOTE: only once!
if (base_page.getAttribute("data-set") === null) {
skipper = true;
}
base_page.setAttribute("data-set", "true");
} }
} }
...@@ -5220,8 +5229,8 @@ ...@@ -5220,8 +5229,8 @@
first = $.mobile.firstPage[0].getAttribute("data-url") === first = $.mobile.firstPage[0].getAttribute("data-url") ===
config.data_url; config.data_url;
if (first || (page && base) || raw_url === $.mobile.getDocumentUrl() || if ((first || (page && base) || raw_url === $.mobile.getDocumentUrl() ||
data.options.role === "popup") { data.options.role === "popup") && !skipper) {
// stop us, JQM can go // stop us, JQM can go
return RSVP.resolve(undefined); return RSVP.resolve(undefined);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment