diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2014-02-21 08:59:03 +0200 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2014-02-21 13:12:48 +0200 |
commit | 870d9c2e141d9fd494657f36c8c8e162eb446dff (patch) | |
tree | 402bdcebb1dfa9e3fba8c25406d9243662eacb86 /web/client.js | |
parent | 551561b94a7d594a12ba8114f57d8f3ef6d1db71 (diff) | |
download | aconf-870d9c2e141d9fd494657f36c8c8e162eb446dff.tar.bz2 aconf-870d9c2e141d9fd494657f36c8c8e162eb446dff.tar.xz |
web client: fix path escaping problems
Diffstat (limited to 'web/client.js')
-rw-r--r-- | web/client.js | 16 |
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"); |