summaryrefslogtreecommitdiffstats
path: root/web/blocking.js
blob: d45992fd8300d911773a81db9ea9736fd10ecfd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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; }
    };
});