Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/updraftp.../vendor/componen.../jquery-b...
File: jquery.blockUI.js
/*!
[0] Fix | Delete
* jQuery blockUI plugin
[1] Fix | Delete
* Version 2.71.0-2020.12.08
[2] Fix | Delete
* Requires jQuery v1.12 or later
[3] Fix | Delete
*
[4] Fix | Delete
* Examples at: http://malsup.com/jquery/block/
[5] Fix | Delete
* Copyright (c) 2007-2013 M. Alsup
[6] Fix | Delete
* Dual licensed under the MIT and GPL licenses:
[7] Fix | Delete
* http://www.opensource.org/licenses/mit-license.php
[8] Fix | Delete
* http://www.gnu.org/licenses/gpl.html
[9] Fix | Delete
*
[10] Fix | Delete
* Thanks to Amir-Hossein Sobhi for some excellent contributions!
[11] Fix | Delete
*/
[12] Fix | Delete
[13] Fix | Delete
;(function() {
[14] Fix | Delete
/*jshint eqeqeq:false curly:false latedef:false */
[15] Fix | Delete
"use strict";
[16] Fix | Delete
[17] Fix | Delete
function setup($) {
[18] Fix | Delete
var migrateDeduplicateWarnings = jQuery.migrateDeduplicateWarnings || false;
[19] Fix | Delete
jQuery.migrateDeduplicateWarnings = false;
[20] Fix | Delete
[21] Fix | Delete
$.fn._fadeIn = $.fn.fadeIn;
[22] Fix | Delete
[23] Fix | Delete
var noOp = $.noop || function() {};
[24] Fix | Delete
[25] Fix | Delete
// this bit is to ensure we don't call setExpression when we shouldn't (with extra muscle to handle
[26] Fix | Delete
// confusing userAgent strings on Vista)
[27] Fix | Delete
var msie = /MSIE/.test(navigator.userAgent);
[28] Fix | Delete
var ie6 = /MSIE 6.0/.test(navigator.userAgent) && ! /MSIE 8.0/.test(navigator.userAgent);
[29] Fix | Delete
var mode = document.documentMode || 0;
[30] Fix | Delete
var setExpr = "function" === typeof document.createElement('div').style.setExpression;
[31] Fix | Delete
[32] Fix | Delete
// global $ methods for blocking/unblocking the entire page
[33] Fix | Delete
$.blockUI = function(opts) { install(window, opts); };
[34] Fix | Delete
$.unblockUI = function(opts) { remove(window, opts); };
[35] Fix | Delete
[36] Fix | Delete
// convenience method for quick growl-like notifications (http://www.google.com/search?q=growl)
[37] Fix | Delete
$.growlUI = function(title, message, timeout, onClose) {
[38] Fix | Delete
var $m = $('<div class="growlUI"></div>');
[39] Fix | Delete
if (title) $m.append('<h1>'+title+'</h1>');
[40] Fix | Delete
if (message) $m.append('<h2>'+message+'</h2>');
[41] Fix | Delete
if (timeout === undefined) timeout = 3000;
[42] Fix | Delete
[43] Fix | Delete
// Added by konapun: Set timeout to 30 seconds if this growl is moused over, like normal toast notifications
[44] Fix | Delete
var callBlock = function(opts) {
[45] Fix | Delete
opts = opts || {};
[46] Fix | Delete
[47] Fix | Delete
$.blockUI({
[48] Fix | Delete
message: $m,
[49] Fix | Delete
fadeIn : typeof opts.fadeIn !== 'undefined' ? opts.fadeIn : 700,
[50] Fix | Delete
fadeOut: typeof opts.fadeOut !== 'undefined' ? opts.fadeOut : 1000,
[51] Fix | Delete
timeout: typeof opts.timeout !== 'undefined' ? opts.timeout : timeout,
[52] Fix | Delete
centerY: false,
[53] Fix | Delete
showOverlay: false,
[54] Fix | Delete
onUnblock: onClose,
[55] Fix | Delete
css: $.blockUI.defaults.growlCSS
[56] Fix | Delete
});
[57] Fix | Delete
};
[58] Fix | Delete
[59] Fix | Delete
callBlock();
[60] Fix | Delete
var nonmousedOpacity = $m.css('opacity');
[61] Fix | Delete
$m.on('mouseover', function() {
[62] Fix | Delete
callBlock({
[63] Fix | Delete
fadeIn: 0,
[64] Fix | Delete
timeout: 30000
[65] Fix | Delete
});
[66] Fix | Delete
[67] Fix | Delete
var displayBlock = $('.blockMsg');
[68] Fix | Delete
displayBlock.stop(); // cancel fadeout if it has started
[69] Fix | Delete
displayBlock.fadeTo(300, 1); // make it easier to read the message by removing transparency
[70] Fix | Delete
}).on('mouseout', function() {
[71] Fix | Delete
$('.blockMsg').fadeOut(1000);
[72] Fix | Delete
});
[73] Fix | Delete
// End konapun additions
[74] Fix | Delete
};
[75] Fix | Delete
[76] Fix | Delete
// plugin method for blocking element content
[77] Fix | Delete
$.fn.block = function(opts) {
[78] Fix | Delete
if ( this[0] === window ) {
[79] Fix | Delete
$.blockUI( opts );
[80] Fix | Delete
return this;
[81] Fix | Delete
}
[82] Fix | Delete
var fullOpts = $.extend({}, $.blockUI.defaults, opts || {});
[83] Fix | Delete
this.each(function() {
[84] Fix | Delete
var $el = $(this);
[85] Fix | Delete
if (fullOpts.ignoreIfBlocked && $el.data('blockUI.isBlocked'))
[86] Fix | Delete
return;
[87] Fix | Delete
$el.unblock({ fadeOut: 0 });
[88] Fix | Delete
});
[89] Fix | Delete
[90] Fix | Delete
return this.each(function() {
[91] Fix | Delete
if ($.css(this,'position') == 'static') {
[92] Fix | Delete
this.style.position = 'relative';
[93] Fix | Delete
$(this).data('blockUI.static', true);
[94] Fix | Delete
}
[95] Fix | Delete
this.style.zoom = 1; // force 'hasLayout' in ie
[96] Fix | Delete
install(this, opts);
[97] Fix | Delete
});
[98] Fix | Delete
};
[99] Fix | Delete
[100] Fix | Delete
// plugin method for unblocking element content
[101] Fix | Delete
$.fn.unblock = function(opts) {
[102] Fix | Delete
if ( this[0] === window ) {
[103] Fix | Delete
$.unblockUI( opts );
[104] Fix | Delete
return this;
[105] Fix | Delete
}
[106] Fix | Delete
return this.each(function() {
[107] Fix | Delete
remove(this, opts);
[108] Fix | Delete
});
[109] Fix | Delete
};
[110] Fix | Delete
[111] Fix | Delete
$.blockUI.version = 2.70; // 2nd generation blocking at no extra cost!
[112] Fix | Delete
[113] Fix | Delete
// override these in your code to change the default behavior and style
[114] Fix | Delete
$.blockUI.defaults = {
[115] Fix | Delete
// message displayed when blocking (use null for no message)
[116] Fix | Delete
message: '<h1>Please wait...</h1>',
[117] Fix | Delete
[118] Fix | Delete
title: null, // title string; only used when theme == true
[119] Fix | Delete
draggable: true, // only used when theme == true (requires jquery-ui.js to be loaded)
[120] Fix | Delete
[121] Fix | Delete
theme: false, // set to true to use with jQuery UI themes
[122] Fix | Delete
[123] Fix | Delete
// styles for the message when blocking; if you wish to disable
[124] Fix | Delete
// these and use an external stylesheet then do this in your code:
[125] Fix | Delete
// $.blockUI.defaults.css = {};
[126] Fix | Delete
css: {
[127] Fix | Delete
padding: 0,
[128] Fix | Delete
margin: 0,
[129] Fix | Delete
width: '30%',
[130] Fix | Delete
top: '40%',
[131] Fix | Delete
left: '35%',
[132] Fix | Delete
textAlign: 'center',
[133] Fix | Delete
color: '#000',
[134] Fix | Delete
border: '3px solid #aaa',
[135] Fix | Delete
backgroundColor:'#fff',
[136] Fix | Delete
cursor: 'wait'
[137] Fix | Delete
},
[138] Fix | Delete
[139] Fix | Delete
// minimal style set used when themes are used
[140] Fix | Delete
themedCSS: {
[141] Fix | Delete
width: '30%',
[142] Fix | Delete
top: '40%',
[143] Fix | Delete
left: '35%'
[144] Fix | Delete
},
[145] Fix | Delete
[146] Fix | Delete
// styles for the overlay
[147] Fix | Delete
overlayCSS: {
[148] Fix | Delete
backgroundColor: '#000',
[149] Fix | Delete
opacity: 0.6,
[150] Fix | Delete
cursor: 'wait'
[151] Fix | Delete
},
[152] Fix | Delete
[153] Fix | Delete
// style to replace wait cursor before unblocking to correct issue
[154] Fix | Delete
// of lingering wait cursor
[155] Fix | Delete
cursorReset: 'default',
[156] Fix | Delete
[157] Fix | Delete
// styles applied when using $.growlUI
[158] Fix | Delete
growlCSS: {
[159] Fix | Delete
width: '350px',
[160] Fix | Delete
top: '10px',
[161] Fix | Delete
left: '',
[162] Fix | Delete
right: '10px',
[163] Fix | Delete
border: 'none',
[164] Fix | Delete
padding: '5px',
[165] Fix | Delete
opacity: 0.6,
[166] Fix | Delete
cursor: 'default',
[167] Fix | Delete
color: '#fff',
[168] Fix | Delete
backgroundColor: '#000',
[169] Fix | Delete
'-webkit-border-radius':'10px',
[170] Fix | Delete
'-moz-border-radius': '10px',
[171] Fix | Delete
'border-radius': '10px'
[172] Fix | Delete
},
[173] Fix | Delete
[174] Fix | Delete
// IE issues: 'about:blank' fails on HTTPS and javascript:false is s-l-o-w
[175] Fix | Delete
// (hat tip to Jorge H. N. de Vasconcelos)
[176] Fix | Delete
/*jshint scripturl:true */
[177] Fix | Delete
iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank',
[178] Fix | Delete
[179] Fix | Delete
// force usage of iframe in non-IE browsers (handy for blocking applets)
[180] Fix | Delete
forceIframe: false,
[181] Fix | Delete
[182] Fix | Delete
// z-index for the blocking overlay
[183] Fix | Delete
baseZ: 1000,
[184] Fix | Delete
[185] Fix | Delete
// set these to true to have the message automatically centered
[186] Fix | Delete
centerX: true, // <-- only effects element blocking (page block controlled via css above)
[187] Fix | Delete
centerY: true,
[188] Fix | Delete
[189] Fix | Delete
// allow body element to be stetched in ie6; this makes blocking look better
[190] Fix | Delete
// on "short" pages. disable if you wish to prevent changes to the body height
[191] Fix | Delete
allowBodyStretch: true,
[192] Fix | Delete
[193] Fix | Delete
// enable if you want key and mouse events to be disabled for content that is blocked
[194] Fix | Delete
bindEvents: true,
[195] Fix | Delete
[196] Fix | Delete
// be default blockUI will supress tab navigation from leaving blocking content
[197] Fix | Delete
// (if bindEvents is true)
[198] Fix | Delete
constrainTabKey: true,
[199] Fix | Delete
[200] Fix | Delete
// fadeIn time in millis; set to 0 to disable fadeIn on block
[201] Fix | Delete
fadeIn: 200,
[202] Fix | Delete
[203] Fix | Delete
// fadeOut time in millis; set to 0 to disable fadeOut on unblock
[204] Fix | Delete
fadeOut: 400,
[205] Fix | Delete
[206] Fix | Delete
// time in millis to wait before auto-unblocking; set to 0 to disable auto-unblock
[207] Fix | Delete
timeout: 0,
[208] Fix | Delete
[209] Fix | Delete
// disable if you don't want to show the overlay
[210] Fix | Delete
showOverlay: true,
[211] Fix | Delete
[212] Fix | Delete
// if true, focus will be placed in the first available input field when
[213] Fix | Delete
// page blocking
[214] Fix | Delete
focusInput: true,
[215] Fix | Delete
[216] Fix | Delete
// elements that can receive focus
[217] Fix | Delete
focusableElements: ':input:enabled:visible',
[218] Fix | Delete
[219] Fix | Delete
// suppresses the use of overlay styles on FF/Linux (due to performance issues with opacity)
[220] Fix | Delete
// no longer needed in 2012
[221] Fix | Delete
// applyPlatformOpacityRules: true,
[222] Fix | Delete
[223] Fix | Delete
// callback method invoked when fadeIn has completed and blocking message is visible
[224] Fix | Delete
onBlock: null,
[225] Fix | Delete
[226] Fix | Delete
// callback method invoked when unblocking has completed; the callback is
[227] Fix | Delete
// passed the element that has been unblocked (which is the window object for page
[228] Fix | Delete
// blocks) and the options that were passed to the unblock call:
[229] Fix | Delete
// onUnblock(element, options)
[230] Fix | Delete
onUnblock: null,
[231] Fix | Delete
[232] Fix | Delete
// callback method invoked when the overlay area is clicked.
[233] Fix | Delete
// setting this will turn the cursor to a pointer, otherwise cursor defined in overlayCss will be used.
[234] Fix | Delete
onOverlayClick: null,
[235] Fix | Delete
[236] Fix | Delete
// don't ask; if you really must know: http://groups.google.com/group/jquery-en/browse_thread/thread/36640a8730503595/2f6a79a77a78e493#2f6a79a77a78e493
[237] Fix | Delete
quirksmodeOffsetHack: 4,
[238] Fix | Delete
[239] Fix | Delete
// class name of the message block
[240] Fix | Delete
blockMsgClass: 'blockMsg',
[241] Fix | Delete
[242] Fix | Delete
// if it is already blocked, then ignore it (don't unblock and reblock)
[243] Fix | Delete
ignoreIfBlocked: false
[244] Fix | Delete
};
[245] Fix | Delete
[246] Fix | Delete
// private data and functions follow...
[247] Fix | Delete
[248] Fix | Delete
var pageBlock = null;
[249] Fix | Delete
var pageBlockEls = [];
[250] Fix | Delete
[251] Fix | Delete
function install(el, opts) {
[252] Fix | Delete
var css, themedCSS;
[253] Fix | Delete
var full = (el == window);
[254] Fix | Delete
var msg = (opts && opts.message !== undefined ? opts.message : undefined);
[255] Fix | Delete
opts = $.extend({}, $.blockUI.defaults, opts || {});
[256] Fix | Delete
[257] Fix | Delete
if (opts.ignoreIfBlocked && $(el).data('blockUI.isBlocked'))
[258] Fix | Delete
return;
[259] Fix | Delete
[260] Fix | Delete
opts.overlayCSS = $.extend({}, $.blockUI.defaults.overlayCSS, opts.overlayCSS || {});
[261] Fix | Delete
css = $.extend({}, $.blockUI.defaults.css, opts.css || {});
[262] Fix | Delete
if (opts.onOverlayClick)
[263] Fix | Delete
opts.overlayCSS.cursor = 'pointer';
[264] Fix | Delete
[265] Fix | Delete
themedCSS = $.extend({}, $.blockUI.defaults.themedCSS, opts.themedCSS || {});
[266] Fix | Delete
msg = msg === undefined ? opts.message : msg;
[267] Fix | Delete
[268] Fix | Delete
// remove the current block (if there is one)
[269] Fix | Delete
if (full && pageBlock)
[270] Fix | Delete
remove(window, {fadeOut:0});
[271] Fix | Delete
[272] Fix | Delete
// if an existing element is being used as the blocking content then we capture
[273] Fix | Delete
// its current place in the DOM (and current display style) so we can restore
[274] Fix | Delete
// it when we unblock
[275] Fix | Delete
if (msg && typeof msg != 'string' && (msg.parentNode || msg.jquery)) {
[276] Fix | Delete
var node = msg.jquery ? msg[0] : msg;
[277] Fix | Delete
var data = {};
[278] Fix | Delete
$(el).data('blockUI.history', data);
[279] Fix | Delete
data.el = node;
[280] Fix | Delete
data.parent = node.parentNode;
[281] Fix | Delete
data.display = node.style.display;
[282] Fix | Delete
data.position = node.style.position;
[283] Fix | Delete
if (data.parent)
[284] Fix | Delete
data.parent.removeChild(node);
[285] Fix | Delete
}
[286] Fix | Delete
[287] Fix | Delete
$(el).data('blockUI.onUnblock', opts.onUnblock);
[288] Fix | Delete
var z = opts.baseZ;
[289] Fix | Delete
[290] Fix | Delete
// blockUI uses 3 layers for blocking, for simplicity they are all used on every platform;
[291] Fix | Delete
// layer1 is the iframe layer which is used to supress bleed through of underlying content
[292] Fix | Delete
// layer2 is the overlay layer which has opacity and a wait cursor (by default)
[293] Fix | Delete
// layer3 is the message content that is displayed while blocking
[294] Fix | Delete
var lyr1, lyr2, lyr3, s;
[295] Fix | Delete
if (msie || opts.forceIframe)
[296] Fix | Delete
lyr1 = $('<iframe class="blockUI" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>');
[297] Fix | Delete
else
[298] Fix | Delete
lyr1 = $('<div class="blockUI" style="display:none"></div>');
[299] Fix | Delete
[300] Fix | Delete
if (opts.theme)
[301] Fix | Delete
lyr2 = $('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+ (z++) +';display:none"></div>');
[302] Fix | Delete
else
[303] Fix | Delete
lyr2 = $('<div class="blockUI blockOverlay" style="z-index:'+ (z++) +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
[304] Fix | Delete
[305] Fix | Delete
if (opts.theme && full) {
[306] Fix | Delete
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:fixed">';
[307] Fix | Delete
if ( opts.title ) {
[308] Fix | Delete
s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || '&nbsp;')+'</div>';
[309] Fix | Delete
}
[310] Fix | Delete
s += '<div class="ui-widget-content ui-dialog-content"></div>';
[311] Fix | Delete
s += '</div>';
[312] Fix | Delete
}
[313] Fix | Delete
else if (opts.theme) {
[314] Fix | Delete
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(z+10)+';display:none;position:absolute">';
[315] Fix | Delete
if ( opts.title ) {
[316] Fix | Delete
s += '<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(opts.title || '&nbsp;')+'</div>';
[317] Fix | Delete
}
[318] Fix | Delete
s += '<div class="ui-widget-content ui-dialog-content"></div>';
[319] Fix | Delete
s += '</div>';
[320] Fix | Delete
}
[321] Fix | Delete
else if (full) {
[322] Fix | Delete
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockPage" style="z-index:'+(z+10)+';display:none;position:fixed"></div>';
[323] Fix | Delete
}
[324] Fix | Delete
else {
[325] Fix | Delete
s = '<div class="blockUI ' + opts.blockMsgClass + ' blockElement" style="z-index:'+(z+10)+';display:none;position:absolute"></div>';
[326] Fix | Delete
}
[327] Fix | Delete
lyr3 = $(s);
[328] Fix | Delete
[329] Fix | Delete
// if we have a message, style it
[330] Fix | Delete
if (msg) {
[331] Fix | Delete
if (opts.theme) {
[332] Fix | Delete
lyr3.css(themedCSS);
[333] Fix | Delete
lyr3.addClass('ui-widget-content');
[334] Fix | Delete
}
[335] Fix | Delete
else
[336] Fix | Delete
lyr3.css(css);
[337] Fix | Delete
}
[338] Fix | Delete
[339] Fix | Delete
// style the overlay
[340] Fix | Delete
if (!opts.theme /*&& (!opts.applyPlatformOpacityRules)*/)
[341] Fix | Delete
lyr2.css(opts.overlayCSS);
[342] Fix | Delete
lyr2.css('position', full ? 'fixed' : 'absolute');
[343] Fix | Delete
[344] Fix | Delete
// make iframe layer transparent in IE
[345] Fix | Delete
if (msie || opts.forceIframe)
[346] Fix | Delete
lyr1.css('opacity',0.0);
[347] Fix | Delete
[348] Fix | Delete
//$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full ? 'body' : el);
[349] Fix | Delete
var layers = [lyr1,lyr2,lyr3], $par = full ? $('body') : $(el);
[350] Fix | Delete
$.each(layers, function() {
[351] Fix | Delete
this.appendTo($par);
[352] Fix | Delete
});
[353] Fix | Delete
[354] Fix | Delete
if (opts.theme && opts.draggable && $.fn.draggable) {
[355] Fix | Delete
lyr3.draggable({
[356] Fix | Delete
handle: '.ui-dialog-titlebar',
[357] Fix | Delete
cancel: 'li'
[358] Fix | Delete
});
[359] Fix | Delete
}
[360] Fix | Delete
[361] Fix | Delete
// ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
[362] Fix | Delete
var expr = setExpr && ( "CSS1Compat" !== document.compatMode || $('object,embed', full ? null : el).length > 0);
[363] Fix | Delete
if (ie6 || expr) {
[364] Fix | Delete
// give body 100% height
[365] Fix | Delete
if (full && opts.allowBodyStretch && "CSS1Compat" === document.compatMode)
[366] Fix | Delete
$('html,body').css('height','100%');
[367] Fix | Delete
[368] Fix | Delete
// fix ie6 issue when blocked element has a border width
[369] Fix | Delete
if ((ie6 || "CSS1Compat" !== document.compatMode) && !full) {
[370] Fix | Delete
var t = sz(el,'borderTopWidth'), l = sz(el,'borderLeftWidth');
[371] Fix | Delete
var fixT = t ? '(0 - '+t+')' : 0;
[372] Fix | Delete
var fixL = l ? '(0 - '+l+')' : 0;
[373] Fix | Delete
}
[374] Fix | Delete
[375] Fix | Delete
// simulate fixed position
[376] Fix | Delete
$.each(layers, function(i,o) {
[377] Fix | Delete
var s = o[0].style;
[378] Fix | Delete
s.position = 'absolute';
[379] Fix | Delete
if (i < 2) {
[380] Fix | Delete
if (full)
[381] Fix | Delete
s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - ("CSS1Compat" === document.compatMode?0:'+opts.quirksmodeOffsetHack+') + "px"');
[382] Fix | Delete
else
[383] Fix | Delete
s.setExpression('height','this.parentNode.offsetHeight + "px"');
[384] Fix | Delete
if (full)
[385] Fix | Delete
s.setExpression('width','"CSS1Compat" === document.compatMode && document.documentElement.clientWidth || document.body.clientWidth + "px"');
[386] Fix | Delete
else
[387] Fix | Delete
s.setExpression('width','this.parentNode.offsetWidth + "px"');
[388] Fix | Delete
if (fixL) s.setExpression('left', fixL);
[389] Fix | Delete
if (fixT) s.setExpression('top', fixT);
[390] Fix | Delete
}
[391] Fix | Delete
else if (opts.centerY) {
[392] Fix | Delete
if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
[393] Fix | Delete
s.marginTop = 0;
[394] Fix | Delete
}
[395] Fix | Delete
else if (!opts.centerY && full) {
[396] Fix | Delete
var top = (opts.css && opts.css.top) ? parseInt(opts.css.top, 10) : 0;
[397] Fix | Delete
var expression = '((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';
[398] Fix | Delete
s.setExpression('top',expression);
[399] Fix | Delete
}
[400] Fix | Delete
});
[401] Fix | Delete
}
[402] Fix | Delete
[403] Fix | Delete
// show the message
[404] Fix | Delete
if (msg) {
[405] Fix | Delete
if (opts.theme)
[406] Fix | Delete
lyr3.find('.ui-widget-content').append(msg);
[407] Fix | Delete
else
[408] Fix | Delete
lyr3.append(msg);
[409] Fix | Delete
if (msg.jquery || msg.nodeType)
[410] Fix | Delete
$(msg).show();
[411] Fix | Delete
}
[412] Fix | Delete
[413] Fix | Delete
if ((msie || opts.forceIframe) && opts.showOverlay)
[414] Fix | Delete
lyr1.show(); // opacity is zero
[415] Fix | Delete
if (opts.fadeIn) {
[416] Fix | Delete
var cb = opts.onBlock ? opts.onBlock : noOp;
[417] Fix | Delete
var cb1 = (opts.showOverlay && !msg) ? cb : noOp;
[418] Fix | Delete
var cb2 = msg ? cb : noOp;
[419] Fix | Delete
if (opts.showOverlay)
[420] Fix | Delete
lyr2._fadeIn(opts.fadeIn, cb1);
[421] Fix | Delete
if (msg)
[422] Fix | Delete
lyr3._fadeIn(opts.fadeIn, cb2);
[423] Fix | Delete
}
[424] Fix | Delete
else {
[425] Fix | Delete
if (opts.showOverlay)
[426] Fix | Delete
lyr2.show();
[427] Fix | Delete
if (msg)
[428] Fix | Delete
lyr3.show();
[429] Fix | Delete
if (opts.onBlock)
[430] Fix | Delete
opts.onBlock.bind(lyr3)();
[431] Fix | Delete
}
[432] Fix | Delete
[433] Fix | Delete
// bind key and mouse events
[434] Fix | Delete
bind(1, el, opts);
[435] Fix | Delete
[436] Fix | Delete
if (full) {
[437] Fix | Delete
pageBlock = lyr3[0];
[438] Fix | Delete
pageBlockEls = $(opts.focusableElements,pageBlock);
[439] Fix | Delete
if (opts.focusInput)
[440] Fix | Delete
setTimeout(focus, 20);
[441] Fix | Delete
}
[442] Fix | Delete
else
[443] Fix | Delete
center(lyr3[0], opts.centerX, opts.centerY);
[444] Fix | Delete
[445] Fix | Delete
if (opts.timeout) {
[446] Fix | Delete
// auto-unblock
[447] Fix | Delete
var to = setTimeout(function() {
[448] Fix | Delete
if (full)
[449] Fix | Delete
$.unblockUI(opts);
[450] Fix | Delete
else
[451] Fix | Delete
$(el).unblock(opts);
[452] Fix | Delete
}, opts.timeout);
[453] Fix | Delete
$(el).data('blockUI.timeout', to);
[454] Fix | Delete
}
[455] Fix | Delete
}
[456] Fix | Delete
[457] Fix | Delete
// remove the block
[458] Fix | Delete
function remove(el, opts) {
[459] Fix | Delete
var count;
[460] Fix | Delete
var full = (el == window);
[461] Fix | Delete
var $el = $(el);
[462] Fix | Delete
var data = $el.data('blockUI.history');
[463] Fix | Delete
var to = $el.data('blockUI.timeout');
[464] Fix | Delete
if (to) {
[465] Fix | Delete
clearTimeout(to);
[466] Fix | Delete
$el.removeData('blockUI.timeout');
[467] Fix | Delete
}
[468] Fix | Delete
opts = $.extend({}, $.blockUI.defaults, opts || {});
[469] Fix | Delete
bind(0, el, opts); // unbind events
[470] Fix | Delete
[471] Fix | Delete
if (opts.onUnblock === null) {
[472] Fix | Delete
opts.onUnblock = $el.data('blockUI.onUnblock');
[473] Fix | Delete
$el.removeData('blockUI.onUnblock');
[474] Fix | Delete
}
[475] Fix | Delete
[476] Fix | Delete
var els;
[477] Fix | Delete
if (full) // crazy selector to handle odd field errors in ie6/7
[478] Fix | Delete
els = $('body').children().filter('.blockUI').add('body > .blockUI');
[479] Fix | Delete
else
[480] Fix | Delete
els = $el.find('>.blockUI');
[481] Fix | Delete
[482] Fix | Delete
// fix cursor issue
[483] Fix | Delete
if ( opts.cursorReset ) {
[484] Fix | Delete
if ( els.length > 1 )
[485] Fix | Delete
els[1].style.cursor = opts.cursorReset;
[486] Fix | Delete
if ( els.length > 2 )
[487] Fix | Delete
els[2].style.cursor = opts.cursorReset;
[488] Fix | Delete
}
[489] Fix | Delete
[490] Fix | Delete
if (full)
[491] Fix | Delete
pageBlock = pageBlockEls = null;
[492] Fix | Delete
[493] Fix | Delete
if (opts.fadeOut) {
[494] Fix | Delete
count = els.length;
[495] Fix | Delete
els.stop().fadeOut(opts.fadeOut, function() {
[496] Fix | Delete
if ( --count === 0)
[497] Fix | Delete
reset(els,data,opts,el);
[498] Fix | Delete
});
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function