/*!\r
* jQuery blockUI plugin\r
- * Version 2.28 (02-DEC-2009)\r
+ * Version 2.31 (06-JAN-2010)\r
* @requires jQuery v1.2.3 or later\r
*\r
* Examples at: http://malsup.com/jquery/block/\r
\r
$.fn._fadeIn = $.fn.fadeIn;\r
\r
+var noOp = function() {};\r
+\r
// this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle\r
// retarded userAgent strings on Vista)\r
var mode = document.documentMode || 0;\r
});\r
};\r
\r
-$.blockUI.version = 2.28; // 2nd generation blocking at no extra cost!\r
+$.blockUI.version = 2.31; // 2nd generation blocking at no extra cost!\r
\r
// override these in your code to change the default behavior and style\r
$.blockUI.defaults = {\r
\r
// suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)\r
applyPlatformOpacityRules: true,\r
+ \r
+ // callback method invoked when fadeIn has completed and blocking message is visible\r
+ onBlock: null,\r
\r
// callback method invoked when unblocking has completed; the callback is\r
// passed the element that has been unblocked (which is the window object for page\r
if ($.browser.msie || opts.forceIframe)\r
lyr1.css('opacity',0.0);\r
\r
- $([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);\r
+ //$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);\r
+ var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el);\r
+ $.each(layers, function() {\r
+ this.appendTo($par);\r
+ });\r
\r
if (opts.theme && opts.draggable && $.fn.draggable) {\r
lyr3.draggable({\r
if (($.browser.msie || opts.forceIframe) && opts.showOverlay)\r
lyr1.show(); // opacity is zero\r
if (opts.fadeIn) {\r
+ var cb = opts.onBlock ? opts.onBlock : noOp;\r
+ var cb1 = (opts.showOverlay && !msg) ? cb : noOp;\r
+ var cb2 = msg ? cb : noOp;\r
if (opts.showOverlay)\r
- lyr2._fadeIn(opts.fadeIn);\r
+ lyr2._fadeIn(opts.fadeIn, cb1);\r
if (msg)\r
- lyr3.fadeIn(opts.fadeIn);\r
+ lyr3._fadeIn(opts.fadeIn, cb2);\r
}\r
else {\r
if (opts.showOverlay)\r
lyr2.show();\r
if (msg)\r
lyr3.show();\r
+ if (opts.onBlock)\r
+ opts.onBlock();\r
}\r
\r
// bind key and mouse events\r
return parseInt($.css(el,p))||0;\r
};\r
\r
-})(jQuery);\r
+})(jQuery);
\ No newline at end of file