Opener.js
1.69 KB
//>>built
define("dojo/_base/declare dojo/_base/Deferred dojo/_base/lang dojo/_base/window dojo/dom-class dojo/dom-construct dojo/dom-style dojo/dom-geometry ./Tooltip ./Overlay ./lazyLoadUtils".split(" "),function(c,g,h,b,k,l,d,m,n,p,q){var f=k.contains(b.doc.documentElement,"dj_phone");c=c("dojox.mobile.Opener",f?p:n,{lazy:!1,requires:"",buildRendering:function(){this.inherited(arguments);this.cover=l.create("div",{onclick:h.hitch(this,"_onBlur"),"class":"mblOpenerUnderlay",style:{position:f?"absolute":"fixed",
backgroundColor:"transparent",overflow:"hidden",zIndex:"-1"}},this.domNode,"first")},onShow:function(a){},onHide:function(a,e){},show:function(a,e){if(this.lazy){this.lazy=!1;var b=this;return g.when(q.instantiateLazyWidgets(this.domNode,this.requires),function(){return b.show(a,e)})}this.node=a;this.onShow(a);d.set(this.cover,{top:"0px",left:"0px",width:"0px",height:"0px"});this._resizeCover(m.position(this.domNode,!1));return this.inherited(arguments)},hide:function(a){this.inherited(arguments);
this.onHide(this.node,a)},_reposition:function(){var a=this.inherited(arguments);this._resizeCover(a);return a},_resizeCover:function(a){if(f){if(parseInt(d.get(this.cover,"top"))!=-a.y||parseInt(d.get(this.cover,"height"))!=a.y){var e=Math.max(a.x,0);d.set(this.cover,{top:-a.y+"px",left:-e+"px",width:a.w+e+"px",height:a.y+"px"})}}else d.set(this.cover,{width:Math.max(b.doc.documentElement.scrollWidth||b.body().scrollWidth||b.doc.documentElement.clientWidth)+"px",height:Math.max(b.doc.documentElement.scrollHeight||
b.body().scrollHeight||b.doc.documentElement.clientHeight)+"px"})},_onBlur:function(a){var b=this.onBlur(a);!1!==b&&this.hide(a);return b}});c.prototype.baseClass+=" mblOpener";return c});