summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-12-17 20:35:49 +0300
committerAndrew Dolgov <[email protected]>2009-12-17 20:35:49 +0300
commit3e0923463f1cc0ec3943cd7e7d8f1e194a2c9015 (patch)
tree1db5fbeea24b6d60a88b3a9a2d6d909775d584ef /lib
parentea520dd6acc5e535f8554b8bb4e72ee16de10fc8 (diff)
mobile: fix page to page navigation
Diffstat (limited to 'lib')
-rw-r--r--lib/iui/iui.js26
1 files changed, 24 insertions, 2 deletions
diff --git a/lib/iui/iui.js b/lib/iui/iui.js
index 6001b27bc..d47cbddb2 100644
--- a/lib/iui/iui.js
+++ b/lib/iui/iui.js
@@ -203,7 +203,7 @@ addEventListener("click", function(event)
iui.showPage($(link.hash.substr(1)));
setTimeout(unselect, 500);
}
- else if (link == $("backButton")) {
+ if (link == $("backButton")) {
history.back();
} else if (link.getAttribute("type") == "submit")
{
@@ -233,7 +233,10 @@ addEventListener("click", function(event)
else if (!link.target)
{
link.setAttribute("selected", "progress");
- iui.showPageByHref(link.href, null, null, null, unselect);
+
+ var backwards = link.getAttribute("backwards");
+
+ iui.showPageByHref(link.href, null, null, null, unselect, backwards);
}
else
return;
@@ -361,6 +364,25 @@ function updatePage(page, fromPage)
else
backButton.style.display = "none";
}
+
+
+ var backButton = $("myBackButton");
+ if (backButton)
+ {
+ var label = page.getAttribute("myBackLabel");
+
+ if (label)
+ {
+ backButton.style.display = "inline";
+ backButton.innerHTML = label;
+ backButton.href = page.getAttribute("myBackHref");
+ backButton.target = page.getAttribute("myBackTarget");
+ backButton.setAttribute("backwards", "true");
+ }
+ else
+ backButton.style.display = "none";
+ }
+
}
function slidePages(fromPage, toPage, backwards)