summaryrefslogtreecommitdiffstats
path: root/web/blocking.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/blocking.js')
-rw-r--r--web/blocking.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/web/blocking.js b/web/blocking.js
new file mode 100644
index 0000000..d45992f
--- /dev/null
+++ b/web/blocking.js
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2012-2015 Kaarle Ritvanen
+ * See LICENSE file for license details
+ */
+
+define(["jquery", "jquery-blockui"], function($) {
+ var enabled = false;
+
+ return {
+ enable: function() {
+ $.blockUI();
+ enabled = true;
+ },
+ disable: function() {
+ $.unblockUI();
+ enabled = false;
+ },
+ isEnabled: function() { return enabled; }
+ };
+});