From 1b238a708654448955a4d3b69cf83136a64b8496 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 4 Sep 2012 18:34:36 +0200 Subject: [PATCH 1/4] Fix: try to use jquery blockUI --- htdocs/main.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index c756301a7628f..866e25a4abd48 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -958,13 +958,13 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs print ''."\n"; } // jQuery jnotify - if (empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY)) + if (empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY) && ! defined('DISABLE_JQUERY_JNOTIFY')) { print ''."\n"; print ''."\n"; } // jQuery blockUI - if (! empty($conf->global->MAIN_USE_JQUERY_BLOCKUI)) + if (! empty($conf->global->MAIN_USE_JQUERY_BLOCKUI) || defined('REQUIRE_JQUERY_BLOCKUI')) { print ''."\n"; print ''."\n"; From db9fe9773892bdb3c191cf5b6680e9a08b995d00 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 4 Sep 2012 19:19:30 +0200 Subject: [PATCH 2/4] New: add "please be patient" message --- htdocs/core/js/blockUI.js | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/htdocs/core/js/blockUI.js b/htdocs/core/js/blockUI.js index 9be6eaa4de1f1..f23e25881d19e 100644 --- a/htdocs/core/js/blockUI.js +++ b/htdocs/core/js/blockUI.js @@ -23,7 +23,7 @@ // Examples $(document).ready(function() { // override these in your code to change the default behavior and style - $.blockUI.defaults = { + $.blockUI.events = { // styles applied when using $.growlUI dolEventValidCSS: { @@ -70,7 +70,7 @@ $(document).ready(function() { message: $m, fadeIn: 200, fadeOut: 700, centerY: false, timeout: timeout, showOverlay: false, onUnblock: onClose, - css: $.blockUI.defaults.dolEventValidCSS + css: $.blockUI.events.dolEventValidCSS }); }; @@ -83,8 +83,28 @@ $(document).ready(function() { message: $m, fadeIn: 200, centerY: false, timeout: timeout, showOverlay: false, onUnblock: onClose, - css: $.blockUI.defaults.dolEventErrorCSS + css: $.blockUI.events.dolEventErrorCSS }); $('.dolEventError').click($.unblockUI); }; + + $.pleaseBePatient = function(message, picto) { + var img = ''; + if (picto != undefined) { + var img = picto + '    ' + } + $.blockUI({ + message: img + message, + css: { + border: 'none', + padding: '15px', + backgroundColor: '#000', + '-webkit-border-radius': '10px', + '-moz-border-radius': '10px', + 'border-radius': '10px' + opacity: .5, + color: '#fff' + } + }); + } }); \ No newline at end of file From 32421ef33c190ba3b2608a2747284b94523c12e3 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 4 Sep 2012 19:25:31 +0200 Subject: [PATCH 3/4] Fix: more simple --- htdocs/core/js/blockUI.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/htdocs/core/js/blockUI.js b/htdocs/core/js/blockUI.js index f23e25881d19e..235cf938fed86 100644 --- a/htdocs/core/js/blockUI.js +++ b/htdocs/core/js/blockUI.js @@ -88,13 +88,9 @@ $(document).ready(function() { $('.dolEventError').click($.unblockUI); }; - $.pleaseBePatient = function(message, picto) { - var img = ''; - if (picto != undefined) { - var img = picto + '    ' - } + $.pleaseBePatient = function(message) { $.blockUI({ - message: img + message, + message: message, css: { border: 'none', padding: '15px', From 58a9dc1afb2976332f74b4be0c1dc040ef020242 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 4 Sep 2012 19:33:11 +0200 Subject: [PATCH 4/4] Fix: syntax error --- htdocs/core/js/blockUI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/js/blockUI.js b/htdocs/core/js/blockUI.js index 235cf938fed86..f0a3a5ac2f9a3 100644 --- a/htdocs/core/js/blockUI.js +++ b/htdocs/core/js/blockUI.js @@ -97,7 +97,7 @@ $(document).ready(function() { backgroundColor: '#000', '-webkit-border-radius': '10px', '-moz-border-radius': '10px', - 'border-radius': '10px' + 'border-radius': '10px', opacity: .5, color: '#fff' }