summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/coresetup.js
diff options
context:
space:
mode:
authorAntony Lesuisse <al@openerp.com>2012-08-01 12:46:57 +0200
committerAntony Lesuisse <al@openerp.com>2012-08-01 12:46:57 +0200
commit574f3891a550cfda0b07b397f390c543cb897601 (patch)
tree20e2c55a666cc131521e44a6b64f05345054981a /addons/web/static/src/js/coresetup.js
parenteafee2f60265a89567cf56d9b9b5161f93fbe663 (diff)
parenta36ca8974a54273d43e59f64708e0afc34817551 (diff)
[MERGE] trunk
bzr revid: al@openerp.com-20120801104657-cinfl0svpnc8njs5
Diffstat (limited to 'addons/web/static/src/js/coresetup.js')
-rw-r--r--addons/web/static/src/js/coresetup.js28
1 files changed, 26 insertions, 2 deletions
diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js
index 181364ba533..12eeb1d79b4 100644
--- a/addons/web/static/src/js/coresetup.js
+++ b/addons/web/static/src/js/coresetup.js
@@ -549,14 +549,38 @@ $.async_when = function() {
/** Setup blockui */
if ($.blockUI) {
$.blockUI.defaults.baseZ = 1100;
- $.blockUI.defaults.message = '<img src="/web/static/src/img/throbber.gif">';
+ $.blockUI.defaults.message = '<div class="oe_blockui_spin" style="height: 50px">';
$.blockUI.defaults.css.border = '0';
$.blockUI.defaults.css["background-color"] = '';
+ $.blockUI.spinners = [];
}
instance.web.blockUI = function() {
- $.blockUI.apply($, arguments);
+ var tmp = $.blockUI.apply($, arguments);
+ var target = $(".oe_blockui_spin")[0];
+ var opts = {
+ lines: 13, // The number of lines to draw
+ length: 7, // The length of each line
+ width: 4, // The line thickness
+ radius: 10, // The radius of the inner circle
+ rotate: 0, // The rotation offset
+ color: '#FFF', // #rgb or #rrggbb
+ speed: 1, // Rounds per second
+ trail: 60, // Afterglow percentage
+ shadow: false, // Whether to render a shadow
+ hwaccel: false, // Whether to use hardware acceleration
+ className: 'spinner', // The CSS class to assign to the spinner
+ zIndex: 2e9, // The z-index (defaults to 2000000000)
+ top: 'auto', // Top position relative to parent in px
+ left: 'auto' // Left position relative to parent in px
+ };
+ var spinner = new Spinner(opts).spin(target);
+ $.blockUI.spinners.push(spinner);
+ return tmp;
}
instance.web.unblockUI = function() {
+ _.each($.blockUI.spinners, function(el) {
+ el.stop();
+ });
return $.unblockUI.apply($, arguments);
}