/*! * jQuery blockUI plugin * Version 2.39 (23-MAY-2011) * @requires jQuery v1.2.3 or later * * Examples at: http://malsup.com/jquery/block/ * Copyright (c) 2007-2010 M. Alsup * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Thanks to Amir-Hossein Sobhi for some excellent contributions! */(function(e){function u(n,u){var f=n==window,c=u&&u.message!==undefined?u.message:undefined;u=e.extend({},e.blockUI.defaults,u||{});u.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,u.overlayCSS||{});var v=e.extend({},e.blockUI.defaults.css,u.css||{}),m=e.extend({},e.blockUI.defaults.themedCSS,u.themedCSS||{});c=c===undefined?u.message:c;f&&s&&a(window,{fadeOut:0});if(c&&typeof c!="string"&&(c.parentNode||c.jquery)){var g=c.jquery?c[0]:c,y={};e(n).data("blockUI.history",y);y.el=g;y.parent=g.parentNode;y.display=g.style.display;y.position=g.style.position;y.parent&&y.parent.removeChild(g)}e(n).data("blockUI.onUnblock",u.onUnblock);var b=u.baseZ,w=e.browser.msie||u.forceIframe?e(''):e('
'),E=u.theme?e(''):e(''),S,x;u.theme&&f?x=' ":u.theme?x=' ":f?x='':x='';S=e(x);if(c)if(u.theme){S.css(m);S.addClass("ui-widget-content")}else S.css(v);!u.theme&&(!u.applyPlatformOpacityRules||!e.browser.mozilla||!/Linux/.test(navigator.platform))&&E.css(u.overlayCSS);E.css("position",f?"fixed":"absolute");(e.browser.msie||u.forceIframe)&&w.css("opacity",0);var T=[w,E,S],N=f?e("body"):e(n);e.each(T,function(){this.appendTo(N)});u.theme&&u.draggable&&e.fn.draggable&&S.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var C=r&&(!e.boxModel||e("object,embed",f?null:n).length>0);if(i||C){f&&u.allowBodyStretch&&e.boxModel&&e("html,body").css("height","100%");if((i||!e.boxModel)&&!f)var k=d(n,"borderTopWidth"),L=d(n,"borderLeftWidth"),A=k?"(0 - "+k+")":0,O=L?"(0 - "+L+")":0;e.each([w,E,S],function(e,t){var n=t[0].style;n.position="absolute";if(e<2){f?n.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+u.quirksmodeOffsetHack+') + "px"'):n.setExpression("height",'this.parentNode.offsetHeight + "px"');f?n.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):n.setExpression("width",'this.parentNode.offsetWidth + "px"');O&&n.setExpression("left",O);A&&n.setExpression("top",A)}else if(u.centerY){f&&n.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');n.marginTop=0}else if(!u.centerY&&f){var r=u.css&&u.css.top?parseInt(u.css.top):0,i="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+r+') + "px"';n.setExpression("top",i)}})}if(c){u.theme?S.find(".ui-widget-content").append(c):S.append(c);(c.jquery||c.nodeType)&&e(c).show()}(e.browser.msie||u.forceIframe)&&u.showOverlay&&w.show();if(u.fadeIn){var M=u.onBlock?u.onBlock:t,_=u.showOverlay&&!c?M:t,D=c?M:t;u.showOverlay&&E._fadeIn(u.fadeIn,_);c&&S._fadeIn(u.fadeIn,D)}else{u.showOverlay&&E.show();c&&S.show();u.onBlock&&u.onBlock()}l(1,n,u);if(f){s=S[0];o=e(":input:enabled:visible",s);u.focusInput&&setTimeout(h,20)}else p(S[0],u.centerX,u.centerY);if(u.timeout){var P=setTimeout(function(){f?e.unblockUI(u):e(n).unblock(u)},u.timeout);e(n).data("blockUI.timeout",P)}}function a(t,n){var r=t==window,i=e(t),u=i.data("blockUI.history"),a=i.data("blockUI.timeout");if(a){clearTimeout(a);i.removeData("blockUI.timeout")}n=e.extend({},e.blockUI.defaults,n||{});l(0,t,n);if(n.onUnblock===null){n.onUnblock=i.data("blockUI.onUnblock");i.removeData("blockUI.onUnblock")}var c;r?c=e("body").children().filter(".blockUI").add("body > .blockUI"):c=e(".blockUI",t);r&&(s=o=null);if(n.fadeOut){c.fadeOut(n.fadeOut);setTimeout(function(){f(c,u,n,t)},n.fadeOut)}else f(c,u,n,t)}function f(t,n,r,i){t.each(function(e,t){this.parentNode&&this.parentNode.removeChild(this)});if(n&&n.el){n.el.style.display=n.display;n.el.style.position=n.position;n.parent&&n.parent.appendChild(n.el);e(i).removeData("blockUI.history")}typeof r.onUnblock=="function"&&r.onUnblock(i,r)}function l(t,n,r){var i=n==window,o=e(n);if(!t&&(i&&!s||!i&&!o.data("blockUI.isBlocked")))return;i||o.data("blockUI.isBlocked",t);if(!r.bindEvents||t&&!r.showOverlay)return;var u="mousedown mouseup keydown keypress";t?e(document).bind(u,r,c):e(document).unbind(u,c)}function c(t){if(t.keyCode&&t.keyCode==9&&s&&t.data.constrainTabKey){var n=o,r=!t.shiftKey&&t.target===n[n.length-1],i=t.shiftKey&&t.target===n[0];if(r||i){setTimeout(function(){h(i)},10);return!1}}var u=t.data;return e(t.target).parents("div."+u.blockMsgClass).length>0?!0:e(t.target).parents().children().filter("div.blockUI").length==0}function h(e){if(!o)return;var t=o[e===!0?o.length-1:0];t&&t.focus()}function p(e,t,n){var r=e.parentNode,i=e.style,s=(r.offsetWidth-e.offsetWidth)/2-d(r,"borderLeftWidth"),o=(r.offsetHeight-e.offsetHeight)/2-d(r,"borderTopWidth");t&&(i.left=s>0?s+"px":"0");n&&(i.top=o>0?o+"px":"0")}function d(t,n){return parseInt(e.css(t,n))||0}if(/1\.(0|1|2)\.(0|1|2)/.test(e.fn.jquery)||/^1.1/.test(e.fn.jquery)){alert("blockUI requires jQuery v1.2.3 or later! You are using v"+e.fn.jquery);return}e.fn._fadeIn=e.fn.fadeIn;var t=function(){},n=document.documentMode||0,r=e.browser.msie&&(e.browser.version<8&&!n||n<8),i=e.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!n;e.blockUI=function(e){u(window,e)};e.unblockUI=function(e){a(window,e)};e.growlUI=function(t,n,r,i){var s=e('');t&&s.append("