summaryrefslogtreecommitdiffstats
path: root/web/client.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/client.js')
-rw-r--r--web/client.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/web/client.js b/web/client.js
index d62a678..9bbe75c 100644
--- a/web/client.js
+++ b/web/client.js
@@ -22,6 +22,7 @@ require(
[
"acf2/dom",
"acf2/error",
+ "acf2/navigation",
"acf2/path",
"acf2/statusbar",
"acf2/transaction",
@@ -31,10 +32,11 @@ require(
"underscore",
"acf2/layout/stacked",
"acf2/layout/tabular",
- "jquery-bbq",
"jquery-blockui"
],
- function(dom, formatError, pth, statusBar, txnMgr, type, Inline, $, _) {
+ function(
+ dom, formatError, navi, pth, statusBar, txnMgr, type, Inline, $, _
+ ) {
$("#login").submit(function() {
$.ajax("/login", {
@@ -51,10 +53,8 @@ require(
);
- function redirect(path) { $.bbq.pushState("#" + path); }
-
function renderObject(path, data) {
- path = path || $.param.fragment();
+ path = path || navi.getPath();
return (
data ? $.Deferred().resolve(data) : txnMgr.query(path)
@@ -87,7 +87,7 @@ require(
var comps = pth.split(path);
comps.pop();
comps.unshift("/");
- redirect(pth.join.apply(undefined, comps));
+ navi.setPath(pth.join.apply(undefined, comps));
});
};
@@ -99,7 +99,7 @@ require(
function render() {
- var path = $.param.fragment();
+ var path = navi.getPath();
function renderMenu(target, path, current, selectFirst) {
var def = $.Deferred();
@@ -222,7 +222,7 @@ require(
$("#content").empty();
$(window).bind("hashchange", render);
- redirect("/");
+ navi.setPath("/");
}).fail(function() {
statusBar.setError("Login failed", "login");