Commit a0dcef93 authored by Sven Franck's avatar Sven Franck

app: removed dismal view selection, now test for view or show default

parent d93a00dc
...@@ -6721,14 +6721,13 @@ ...@@ -6721,14 +6721,13 @@
* @return {object} navigation object * @return {object} navigation object
**/ **/
app.util.parseLink = function (url) { app.util.parseLink = function (url) {
var i, hash, path, clean_hash, backup, decode, mode, root; var i, hash, path, clean_hash, decode, root, last;
hash = $.mobile.path.parseUrl( hash = $.mobile.path.parseUrl(
url.replace($.mobile.dialogHashKey, "") url.replace($.mobile.dialogHashKey, "")
).hash.replace("#", ""); ).hash.replace("#", "");
// decode = /^[^\/]*%2[^\/]*$/.test(hash); // decode = /^[^\/]*%2[^\/]*$/.test(hash);
decode = /%[0-9a-f]{2}/i.test(hash); decode = /%[0-9a-f]{2}/i.test(hash);
backup = 0;
// decode (allowing URI encoded identifiers) // decode (allowing URI encoded identifiers)
if (decode) { if (decode) {
...@@ -6746,25 +6745,13 @@ ...@@ -6746,25 +6745,13 @@
} }
// check for mode // check for mode
path = clean_hash.split("/"); path = clean_hash.split("/");
last = path.length -1;
// TODO: this should be generic and without a backup....
// TODO: REFACTOR!!!
for (i = 0; i < path.length; i += 1) {
switch (path[i]) {
case "plan":
case "personal":
case "order":
backup = 1;
mode = path[i];
break;
}
}
return { return {
"mode": mode, "mode": path[last],
"fragment_list": path, "fragment_list": path,
"data_url": clean_hash, "data_url": clean_hash,
"layout_level": path.length - 1 - backup, "layout_level": last,
"deeplink": true, "deeplink": true,
"root": path[0] "root": path[0]
}; };
......
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