From d6ef80f21ec65edb9586b2d76f3c8a90b9353548 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Tue, 24 Jul 2012 15:24:14 +0200 Subject: [IMP] Changed throbber bzr revid: nicolas.vanhoren@openerp.com-20120724132414-27ylo4ls48agwnel --- addons/web/static/src/js/coresetup.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'addons/web/static/src/js/coresetup.js') diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js index a5a62b9bcc1..801ce50bc2d 100644 --- a/addons/web/static/src/js/coresetup.js +++ b/addons/web/static/src/js/coresetup.js @@ -551,6 +551,8 @@ $.async_when = function() { if ($.blockUI) { $.blockUI.defaults.baseZ = 1100; $.blockUI.defaults.message = ''; + $.blockUI.defaults.css.border = '0'; + $.blockUI.defaults.css["background-color"] = ''; } /** Setup default session */ -- cgit v1.2.3 From b98723a1fed138068b1b1db936ab0f0ca704bb93 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Tue, 24 Jul 2012 16:12:20 +0200 Subject: [IMP] improved throbber bzr revid: nicolas.vanhoren@openerp.com-20120724141220-1u0odsgsxzjtc5xn --- addons/web/static/src/js/coresetup.js | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'addons/web/static/src/js/coresetup.js') diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js index 801ce50bc2d..24441dc509f 100644 --- a/addons/web/static/src/js/coresetup.js +++ b/addons/web/static/src/js/coresetup.js @@ -550,9 +550,39 @@ $.async_when = function() { /** Setup blockui */ if ($.blockUI) { $.blockUI.defaults.baseZ = 1100; - $.blockUI.defaults.message = ''; + $.blockUI.defaults.message = '
'; $.blockUI.defaults.css.border = '0'; $.blockUI.defaults.css["background-color"] = ''; + $.blockUI.spinners = []; +} +instance.web.blockUI = function() { + 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); } /** Setup default session */ -- cgit v1.2.3 From a4f1ce69ab01818fce1a23fc3744865bcc4fd85c Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Wed, 25 Jul 2012 10:04:39 +0200 Subject: [FIX] throbber use an image. fva will fix the aliasing. Also check http://commons.wikimedia.org/wiki/Category:Throbbers bzr revid: al@openerp.com-20120725080439-j7f44tb0fbp90cm0 --- addons/web/static/src/js/coresetup.js | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) (limited to 'addons/web/static/src/js/coresetup.js') diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js index 24441dc509f..9d365a0a2b3 100644 --- a/addons/web/static/src/js/coresetup.js +++ b/addons/web/static/src/js/coresetup.js @@ -550,38 +550,14 @@ $.async_when = function() { /** Setup blockui */ if ($.blockUI) { $.blockUI.defaults.baseZ = 1100; - $.blockUI.defaults.message = '
'; + $.blockUI.defaults.message = ''; $.blockUI.defaults.css.border = '0'; $.blockUI.defaults.css["background-color"] = ''; - $.blockUI.spinners = []; } instance.web.blockUI = function() { - 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; + $.blockUI.apply($, arguments); } instance.web.unblockUI = function() { - _.each($.blockUI.spinners, function(el) { - el.stop(); - }); return $.unblockUI.apply($, arguments); } -- cgit v1.2.3