summaryrefslogtreecommitdiffstats
path: root/web/client.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/client.js')
-rw-r--r--web/client.js28
1 files changed, 20 insertions, 8 deletions
diff --git a/web/client.js b/web/client.js
index 346e458..0dd510a 100644
--- a/web/client.js
+++ b/web/client.js
@@ -1,10 +1,11 @@
/*
- * Copyright (c) 2012-2014 Kaarle Ritvanen
+ * Copyright (c) 2012-2015 Kaarle Ritvanen
* See LICENSE file for license details
*/
define(
[
+ "aconf/blocking",
"aconf/dom",
"aconf/error",
"aconf/navigation",
@@ -17,11 +18,20 @@ define(
"underscore",
"aconf/layout/stacked",
"aconf/layout/tabular",
- "domReady",
- "jquery-blockui"
+ "domReady"
],
function(
- dom, formatError, navi, pth, statusBar, txnMgr, type, Inline, $, _
+ blocking,
+ dom,
+ formatError,
+ navi,
+ pth,
+ statusBar,
+ txnMgr,
+ type,
+ Inline,
+ $,
+ _
) {
return function() {
$("#login").submit(function() {
@@ -194,11 +204,11 @@ define(
function clearState() {
statusBar.reset();
render();
- $.unblockUI();
+ blocking.disable();
}
$("#commit").click(function() {
- $.blockUI();
+ blocking.enable();
txnMgr.commit().done(clearState).fail(function(xhr) {
statusBar.setError(
formatError("Commit failed", xhr), "txn"
@@ -206,7 +216,7 @@ define(
})
});
$("#revert").click(function() {
- $.blockUI();
+ blocking.enable();
txnMgr.abort();
clearState();
});
@@ -220,7 +230,9 @@ define(
statusBar.reset();
$("#content").empty();
- $(window).bind("hashchange", render);
+ $(window).bind("hashchange", function() {
+ if (!blocking.isEnabled()) render();
+ });
navi.setPath("/");
}).fail(function() {