1 2Type.registerNamespace('dnn.dom.positioning');dnn.extend(dnn.dom.positioning,{pns:'dnn.dom',ns:'positioning',dragCtr:null,dragCtrDims:null,bodyScrollLeft:function() 3{if(window.pageYOffset) 4return window.pageYOffset;var oBody=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;return oBody.scrollLeft;},bodyScrollTop:function() 5{if(window.pageXOffset) 6return window.pageXOffset;var oBody=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;return oBody.scrollTop;},viewPortHeight:function() 7{if(window.innerHeight) 8return window.innerHeight;var oBody=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;return oBody.clientHeight;},viewPortWidth:function() 9{if(window.innerWidth) 10return window.innerWidth;var oBody=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;return oBody.clientWidth;},dragContainer:function(oCtl,e) 11{var iNewLeft=0;var iNewTop=0;var oCont=dnn.dom.getById(oCtl.contID);var oTitle=dnn.dom.positioning.dragCtr;var iScrollTop=this.bodyScrollTop();var iScrollLeft=this.bodyScrollLeft();if(oCtl.startLeft==null) 12oCtl.startLeft=e.clientX-this.elementLeft(oCont)+iScrollLeft;if(oCtl.startTop==null) 13oCtl.startTop=e.clientY-this.elementTop(oCont)+iScrollTop;if(oCont.style.position=='relative') 14oCont.style.position='absolute';iNewLeft=e.clientX-oCtl.startLeft+iScrollLeft;iNewTop=e.clientY-oCtl.startTop+iScrollTop;if(iNewLeft>this.elementWidth(document.forms[0])) 15iNewLeft=this.elementWidth(document.forms[0]);if(iNewTop>this.elementHeight(document.forms[0])) 16iNewTop=this.elementHeight(document.forms[0]);oCont.style.left=iNewLeft+'px';oCont.style.top=iNewTop+'px';if(oTitle!=null&&oTitle.dragOver!=null) 17eval(oCtl.dragOver);},elementHeight:function(eSrc) 18{if(eSrc.offsetHeight==null||eSrc.offsetHeight==0) 19{if(eSrc.offsetParent==null) 20return 0;if(eSrc.offsetParent.offsetHeight==null||eSrc.offsetParent.offsetHeight==0) 21{if(eSrc.offsetParent.offsetParent!=null) 22return eSrc.offsetParent.offsetParent.offsetHeight;else 23return 0;} 24else 25return eSrc.offsetParent.offsetHeight;} 26else 27return eSrc.offsetHeight;},elementLeft:function(eSrc) 28{return this.elementPos(eSrc).l;},elementOverlapScore:function(oDims1,oDims2) 29{var iLeftScore=0;var iTopScore=0;if(oDims1.l<=oDims2.l&&oDims2.l<=oDims1.r) 30iLeftScore+=(oDims1.r<oDims2.r?oDims1.r:oDims2.r)-oDims2.l;if(oDims2.l<=oDims1.l&&oDims1.l<=oDims2.r) 31iLeftScore+=(oDims2.r<oDims1.r?oDims2.r:oDims1.r)-oDims1.l;if(oDims1.t<=oDims2.t&&oDims2.t<=oDims1.b) 32iTopScore+=(oDims1.b<oDims2.b?oDims1.b:oDims2.b)-oDims2.t;if(oDims2.t<=oDims1.t&&oDims1.t<=oDims2.b) 33iTopScore+=(oDims2.b<oDims1.b?oDims2.b:oDims1.b)-oDims1.t;return iLeftScore*iTopScore;},elementTop:function(eSrc) 34{return this.elementPos(eSrc).t;},elementPos:function(eSrc) 35{var oPos=new Object();oPos.t=0;oPos.l=0;oPos.at=0;oPos.al=0;var eParent=eSrc;var style;var srcId=eSrc.id;if(srcId!=null&&srcId.length==0) 36srcId=null;if(eSrc.style.position=='absolute') 37{oPos.t=eParent.offsetTop;oPos.l=eParent.offsetLeft;} 38while(eParent!=null) 39{oPos.at+=eParent.offsetTop;oPos.al+=eParent.offsetLeft;if(eSrc.style.position!='absolute') 40{if(eParent.currentStyle) 41style=eParent.currentStyle;else 42style=Sys.UI.DomElement._getCurrentStyle(eParent);if(eParent.id==srcId||style.position!='relative') 43{oPos.t+=eParent.offsetTop;oPos.l+=eParent.offsetLeft;}} 44eParent=eParent.offsetParent;if(eParent==null||(eParent.tagName.toUpperCase()=="BODY"&&dnn.dom.browser.isType(dnn.dom.browser.Konqueror))) 45break;} 46return oPos;},elementWidth:function(eSrc) 47{if(eSrc.offsetWidth==null||eSrc.offsetWidth==0) 48{if(eSrc.offsetParent==null) 49return 0;if(eSrc.offsetParent.offsetWidth==null||eSrc.offsetParent.offsetWidth==0) 50{if(eSrc.offsetParent.offsetParent!=null) 51return eSrc.offsetParent.offsetParent.offsetWidth;else 52return 0;} 53else 54return eSrc.offsetParent.offsetWidth} 55else 56return eSrc.offsetWidth;},enableDragAndDrop:function(oContainer,oTitle,sDragCompleteEvent,sDragOverEvent) 57{dnn.dom.addSafeHandler(document.body,'onmousemove',dnn.dom.positioning,'__dnn_bodyMouseMove');dnn.dom.addSafeHandler(document.body,'onmouseup',dnn.dom.positioning,'__dnn_bodyMouseUp');dnn.dom.addSafeHandler(oTitle,'onmousedown',dnn.dom.positioning,'__dnn_containerMouseDownDelay');if(dnn.dom.browser.type==dnn.dom.browser.InternetExplorer) 58oTitle.style.cursor='hand';else 59oTitle.style.cursor='pointer';if(oContainer.id.length==0) 60oContainer.id=oTitle.id+'__dnnCtr';oTitle.contID=oContainer.id;if(sDragCompleteEvent!=null) 61oTitle.dragComplete=sDragCompleteEvent;if(sDragOverEvent!=null) 62oTitle.dragOver=sDragOverEvent;return true;},placeOnTop:function(oCont,bShow,sSrc) 63{if(dnn.dom.browser.isType(dnn.dom.browser.Opera,dnn.dom.browser.Mozilla,dnn.dom.browser.Netscape,dnn.dom.browser.Safari)||(dnn.dom.browser.isType(dnn.dom.browser.InternetExplorer)&&dnn.dom.browser.version>=7)) 64return;var oIFR=dnn.dom.getById('ifr'+oCont.id);if(oIFR==null) 65{var oIFR=document.createElement('iframe');oIFR.id='ifr'+oCont.id;if(sSrc!=null) 66oIFR.src=sSrc;oIFR.style.top='0px';
66oIFR.style.left='0px';oIFR.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=0)";oIFR.scrolling='no';oIFR.frameBorder='no';oIFR.style.display='none';oIFR.style.position='absolute';oCont.parentNode.appendChild(oIFR);} 67var oDims=new dnn.dom.positioning.dims(oCont);oIFR.style.width=oDims.w;oIFR.style.height=oDims.h;oIFR.style.top=oDims.t+'px';oIFR.style.left=oDims.l+'px';var iIndex=dnn.dom.getCurrentStyle(oCont,'zIndex');if(iIndex==null||iIndex==0||isNaN(iIndex)) 68iIndex=1;oCont.style.zIndex=iIndex;oIFR.style.zIndex=iIndex-1;if(bShow) 69oIFR.style.display="block";else if(oIFR!=null) 70oIFR.style.display='none';},__dnn_containerMouseDown:function(oCtl) 71{while(oCtl.contID==null) 72{oCtl=oCtl.parentNode;if(oCtl.tagName.toUpperCase()=='BODY') 73return;} 74dnn.dom.positioning.dragCtr=oCtl;oCtl.startTop=null;oCtl.startLeft=null;var oCont=dnn.dom.getById(oCtl.contID);if(oCont.style.position==null||oCont.style.position.length==0) 75oCont.style.position='relative';dnn.dom.positioning.dragCtrDims=new dnn.dom.positioning.dims(oCont);if(oCont.getAttribute('_b')==null) 76{oCont.setAttribute('_b',oCont.style.backgroundColor);oCont.setAttribute('_z',oCont.style.zIndex);oCont.setAttribute('_w',oCont.style.width);oCont.setAttribute('_d',oCont.style.border);oCont.style.zIndex=9999;oCont.style.backgroundColor=DNN_HIGHLIGHT_COLOR;oCont.style.border='4px outset '+DNN_HIGHLIGHT_COLOR;oCont.style.width=dnn.dom.positioning.elementWidth(oCont);if(dnn.dom.browser.type==dnn.dom.browser.InternetExplorer) 77oCont.style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity=80)';}},__dnn_containerMouseDownDelay:function(e) 78{var oTitle=e.srcElement;if(oTitle==null) 79oTitle=e.target;dnn.doDelay('__dnn_dragdrop',500,this.__dnn_containerMouseDown,oTitle);},__dnn_bodyMouseUp:function() 80{dnn.cancelDelay('__dnn_dragdrop');var oCtl=dnn.dom.positioning.dragCtr;if(oCtl!=null&&oCtl.dragComplete!=null) 81{eval(oCtl.dragComplete);var oCont=dnn.dom.getById(oCtl.contID);oCont.style.backgroundColor=oCont.getAttribute('_b');oCont.style.zIndex=oCont.getAttribute('_z');oCont.style.width=oCont.getAttribute('_w');oCont.style.border=oCont.getAttribute('_d');oCont.setAttribute('_b',null);oCont.setAttribute('_z',null);if(dnn.dom.browser.type==dnn.dom.browser.InternetExplorer) 82oCont.style.filter=null;} 83dnn.dom.positioning.dragCtr=null;},__dnn_bodyMouseMove:function(e) 84{if(this.dragCtr!=null) 85this.dragContainer(this.dragCtr,e);}});dnn.dom.positioning.dims=function(eSrc) 86{var bHidden=(eSrc.style.display=='none');if(bHidden) 87eSrc.style.display="";this.w=dnn.dom.positioning.elementWidth(eSrc);this.h=dnn.dom.positioning.elementHeight(eSrc);var oPos=dnn.dom.positioning.elementPos(eSrc);this.t=oPos.t;this.l=oPos.l;this.at=oPos.at;this.al=oPos.al;this.rot=this.at-this.t;this.rol=this.al-this.l;this.r=this.l+this.w;this.b=this.t+this.h;if(bHidden) 88eSrc.style.display="none";} 89dnn.dom.positioning.dims.registerClass('dnn.dom.positioning.dims');
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.