You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
9.4 KiB

2 years ago
  1. /*!
  2. * jQuery blockUI plugin
  3. * Version 2.70.0-2014.11.23
  4. * Requires jQuery v1.7 or later
  5. *
  6. * Examples at: http://malsup.com/jquery/block/
  7. * Copyright (c) 2007-2013 M. Alsup
  8. * Dual licensed under the MIT and GPL licenses:
  9. * http://www.opensource.org/licenses/mit-license.php
  10. * http://www.gnu.org/licenses/gpl.html
  11. *
  12. * Thanks to Amir-Hossein Sobhi for some excellent contributions!
  13. */
  14. (function(){"use strict";function n(n){function s(s,h){var rt,ut,p=s==window,l=h&&h.message!==undefined?h.message:undefined,g,k,d,tt,nt,w,b,it,ft,et,at;if(h=n.extend({},n.blockUI.defaults,h||{}),!h.ignoreIfBlocked||!n(s).data("blockUI.isBlocked")){if(h.overlayCSS=n.extend({},n.blockUI.defaults.overlayCSS,h.overlayCSS||{}),rt=n.extend({},n.blockUI.defaults.css,h.css||{}),h.onOverlayClick&&(h.overlayCSS.cursor="pointer"),ut=n.extend({},n.blockUI.defaults.themedCSS,h.themedCSS||{}),l=l===undefined?h.message:l,p&&t&&e(window,{fadeOut:0}),l&&typeof l!="string"&&(l.parentNode||l.jquery)&&(g=l.jquery?l[0]:l,k={},n(s).data("blockUI.history",k),k.el=g,k.parent=g.parentNode,k.display=g.style.display,k.position=g.style.position,k.parent&&k.parent.removeChild(g)),n(s).data("blockUI.onUnblock",h.onUnblock),d=h.baseZ,tt=f||h.forceIframe?n('<iframe class="blockUI" style="z-index:'+d+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+h.iframeSrc+'"><\/iframe>'):n('<div class="blockUI" style="display:none"><\/div>'),nt=h.theme?n('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+d+++';display:none"><\/div>'):n('<div class="blockUI blockOverlay" style="z-index:'+d+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"><\/div>'),h.theme&&p?(b='<div class="blockUI '+h.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(d+10)+';display:none;position:fixed">',h.title&&(b+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(h.title||"&nbsp;")+"<\/div>"),b+='<div class="ui-widget-content ui-dialog-content"><\/div>',b+="<\/div>"):h.theme?(b='<div class="blockUI '+h.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(d+10)+';display:none;position:absolute">',h.title&&(b+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(h.title||"&nbsp;")+"<\/div>"),b+='<div class="ui-widget-content ui-dialog-content"><\/div>',b+="<\/div>"):b=p?'<div class="blockUI '+h.blockMsgClass+' blockPage" style="z-index:'+(d+10)+';display:none;position:fixed"><\/div>':'<div class="blockUI '+h.blockMsgClass+' blockElement" style="z-index:'+(d+10)+';display:none;position:absolute"><\/div>',w=n(b),l&&(h.theme?(w.css(ut),w.addClass("ui-widget-content")):w.css(rt)),h.theme||nt.css(h.overlayCSS),nt.css("position",p?"fixed":"absolute"),(f||h.forceIframe)&&tt.css("opacity",0),it=[tt,nt,w],ft=p?n("body"):n(s),n.each(it,function(){this.appendTo(ft)}),h.theme&&h.draggable&&n.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"}),et=v&&(!n.support.boxModel||n("object,embed",p?null:s).length>0),o||et){if(p&&h.allowBodyStretch&&n.support.boxModel&&n("html,body").css("height","100%"),(o||!n.support.boxModel)&&!p)var ot=r(s,"borderTopWidth"),st=r(s,"borderLeftWidth"),ht=ot?"(0 - "+ot+")":0,ct=st?"(0 - "+st+")":0;n.each(it,function(n,t){var i=t[0].style,r,u;i.position="absolute";n<2?(p?i.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+h.quirksmodeOffsetHack+') + "px"'):i.setExpression("height",'this.parentNode.offsetHeight + "px"'),p?i.setExpression("width",'jQuery.support.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):i.setExpression("width",'this.parentNode.offsetWidth + "px"'),ct&&i.setExpression("left",ct),ht&&i.setExpression("top",ht)):h.centerY?(p&&i.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),i.marginTop=0):!h.centerY&&p&&(r=h.css&&h.css.top?parseInt(h.css.top,10):0,u="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+r+') + "px"',i.setExpression("top",u))})}if(l&&(h.theme?w.find(".ui-widget-content").append(l):w.append(l),(l.jquery||l.nodeType)&&n(l).show()),(f||h.forceIframe)&&h.showOverlay&&tt.