LinkStack/studio/js/jquery-block-ui.js

16 lines
9.3 KiB
JavaScript
Raw Normal View History

2022-08-14 21:05:26 +02:00
/*!
* jQuery blockUI plugin
* Version 2.70.0-2014.11.23
* Requires jQuery v1.7 or later
*
* Examples at: http://malsup.com/jquery/block/
* Copyright (c) 2007-2013 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!
*/
/*jshint eqeqeq:false curly:false latedef:false */
!function(){"use strict";function a($){$.fn._fadeIn=$.fn.fadeIn;var a=$.noop||function(){},b=/MSIE/.test(navigator.userAgent),c=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent);document.documentMode;var d=$.isFunction(document.createElement("div").style.setExpression);$.blockUI=function(a){g(window,a)},$.unblockUI=function(a){h(window,a)},$.growlUI=function(b,c,d,f){var a=$('<div class="growlUI"></div>');b&&a.append("<h1>"+b+"</h1>"),c&&a.append("<h2>"+c+"</h2>"),void 0===d&&(d=3e3);var e=function(b){b=b||{},$.blockUI({message:a,fadeIn:void 0!==b.fadeIn?b.fadeIn:700,fadeOut:void 0!==b.fadeOut?b.fadeOut:1e3,timeout:void 0!==b.timeout?b.timeout:d,centerY:!1,showOverlay:!1,onUnblock:f,css:$.blockUI.defaults.growlCSS})};e(),a.css("opacity"),a.mouseover(function(){e({fadeIn:0,timeout:3e4});var a=$(".blockMsg");a.stop(),a.fadeTo(300,1)}).mouseout(function(){$(".blockMsg").fadeOut(1e3)})},$.fn.block=function(a){if(this[0]===window)return $.blockUI(a),this;var b=$.extend({},$.blockUI.defaults,a||{});return this.each(function(){var a=$(this);b.ignoreIfBlocked&&a.data("blockUI.isBlocked")||a.unblock({fadeOut:0})}),this.each(function(){"static"==$.css(this,"position")&&(this.style.position="relative",$(this).data("blockUI.static",!0)),this.style.zoom=1,g(this,a)})},$.fn.unblock=function(a){return this[0]===window?($.unblockUI(a),this):this.each(function(){h(this,a)})},$.blockUI.version=2.7,$.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var e=null,f=[];function g(o,g){var w,x,v,t,k,p,q=o==window,i=g&& void 0!==g.message?g.message:void 0;if(!((g=$.extend({},$.blockUI.defaults,g||{})).ignoreIfBlocked&&$(o).data("blockUI.isBlocked"))){if(g.overlayCSS=$.extend({},$.blockUI.defaults.overlayCSS,g.overlayCSS||{}),w=$.extend({},$.blockUI.defaults.css,g.css||{}),g.onOverlayClick&&(g.overlayCSS.cursor="pointer"),x=$.extend({},$.blockUI.defaults.themedCSS,g.themedCSS||{}),i=void 0===i?g.message:i,q&&e&&h(window,{fadeOut:0}),i&&"string"!=typeof i&&(i.parentNode||i.jquery)){var u=i.jquery?i[0]:i,r={};$(o).data("blockUI.history",r),r.el=u,r.parent=u.parentNode,r.display=u.style.display,r.position=u.style.position,r.parent&&r.parent.removeChild(u)}$(o).data("blockUI.onUnblock",g.onUnblock);var s=g.baseZ;v=b||g.forceIframe?$('<iframe class="blockUI" style="z-index:'+s+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+g.iframeSrc+'"></iframe>'):$('<div class="blockUI" style="display:none"></div>'),t=g.theme?$('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+s+++';display:none"></div>'):$('<div class="blockUI blockOverlay" style="z-index:'+s+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),g.theme&&q?(p='<div class="blockUI '+g.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(s+10)+';display:none;position:fixed">',g.title&&(p+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(g.title||"&nbsp;")+"</div>"),p+='<div class="ui-widget-content ui-dialog-content"></div>',p+="</div>"):g.theme?(p='<div class="block