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 @@
* @return {object} navigation object
**/
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(
url.replace($.mobile.dialogHashKey, "")
).hash.replace("#", "");
// decode = /^[^\/]*%2[^\/]*$/.test(hash);
decode = /%[0-9a-f]{2}/i.test(hash);
backup = 0;
// decode (allowing URI encoded identifiers)
if (decode) {
......@@ -6746,25 +6745,13 @@
}
// check for mode
path = clean_hash.split("/");
// 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;
}
}
last = path.length -1;
return {
"mode": mode,
"mode": path[last],
"fragment_list": path,
"data_url": clean_hash,
"layout_level": path.length - 1 - backup,
"layout_level": last,
"deeplink": true,
"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