mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
Update minifying JavaScript files
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8483 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
8f7335c776
commit
df0465716e
3 changed files with 147 additions and 123 deletions
84
common/js/x.min.js
vendored
84
common/js/x.min.js
vendored
|
|
@ -3,54 +3,36 @@
|
|||
* Distributed by GNU LGPL. For copyrights, license, documentation and more visit Cross-Browser.com
|
||||
* Copyright 2001-2005 Michael Foster (Cross-Browser.com)
|
||||
**/
|
||||
function xDeprecate(funcName){var msg='DEPRECATED : '+funcName+'() is deprecated function.';if(typeof console=='object'&&typeof console.log=='function')console.log(msg)};var xOp7Up,xOp6Dn,xIE4Up,xIE4,xIE5,xIE6,xNN4,xUA=navigator.userAgent.toLowerCase();if(window.opera){var i=xUA.indexOf('opera');if(i!=-1){var v=parseInt(xUA.charAt(i+6));xOp7Up=v>=7;xOp6Dn=v<7}}else if(navigator.vendor!='KDE'&&document.all&&xUA.indexOf('msie')!=-1){xIE4Up=parseFloat(navigator.appVersion)>=4;xIE4=xUA.indexOf('msie 4')!=-1;xIE5=xUA.indexOf('msie 5')!=-1;xIE6=xUA.indexOf('msie 6')!=-1}else if(document.layers)xNN4=true;var xMac=xUA.indexOf('mac')!=-1,xFF=xUA.indexOf('firefox')!=-1
|
||||
function xAddEventListener(e,eT,eL,cap){xDeprecate('xAddEventListener');if(!(e=xGetElementById(e)))return;eT=eT.toLowerCase();if((!xIE4Up&&!xOp7Up)&&e==window){if(eT=='resize'){window.xPCW=xClientWidth();window.xPCH=xClientHeight();window.xREL=eL;xResizeEvent();return};if(eT=='scroll'){window.xPSL=xScrollLeft();window.xPST=xScrollTop();window.xSEL=eL;xScrollEvent();return}};var eh='e.on'+eT+'=eL';if(e.addEventListener){e.addEventListener(eT,eL,cap)}else if(e.attachEvent){e.attachEvent('on'+eT,eL)}else eval(eh)}
|
||||
function xResizeEvent(){xDeprecate('xResizeEvent');if(window.xREL)setTimeout('xResizeEvent()',250);var cw=xClientWidth(),ch=xClientHeight();if(window.xPCW!=cw||window.xPCH!=ch){window.xPCW=cw;window.xPCH=ch;if(window.xREL)window.xREL()}}
|
||||
function xScrollEvent(){xDeprecate('xScrollEvent');if(window.xSEL)setTimeout('xScrollEvent()',250);var sl=xScrollLeft(),st=xScrollTop();if(window.xPSL!=sl||window.xPST!=st){window.xPSL=sl;window.xPST=st;if(window.xSEL)window.xSEL()}}
|
||||
function xAppendChild(oParent,oChild){xDeprecate('xAppendChild');if(oParent.appendChild){return oParent.appendChild(oChild)}else return null}
|
||||
function xClientHeight(){xDeprecate('xClientHeight');var h=0;if(xOp6Dn){h=window.innerHeight}else if(document.compatMode=='CSS1Compat'&&!window.opera&&document.documentElement&&document.documentElement.clientHeight){h=document.documentElement.clientHeight}else if(document.body&&document.body.clientHeight){h=document.body.clientHeight}else if(xDef(window.innerWidth,window.innerHeight,document.width)){h=window.innerHeight;if(document.width>window.innerWidth)h-=16};return h}
|
||||
function xClientWidth(){xDeprecate('xClientWidth');var w=0;if(xOp6Dn){w=window.innerWidth}else if(document.compatMode=='CSS1Compat'&&!window.opera&&document.documentElement&&document.documentElement.clientWidth){w=document.documentElement.clientWidth}else if(document.body&&document.body.clientWidth){w=document.body.clientWidth}else if(xDef(window.innerWidth,window.innerHeight,document.height)){w=window.innerWidth;if(document.height>window.innerHeight)w-=16};return w}
|
||||
function xCreateElement(sTag){xDeprecate('xCreateElement');if(document.createElement){return document.createElement(sTag)}else return null}
|
||||
function xDef(){xDeprecate('xDef');for(var i=0;i<arguments.length;++i)if(typeof (arguments[i])=='undefined')return false;return true}
|
||||
function xDeleteCookie(name,path){xDeprecate('xDeleteCookie');if(xGetCookie(name))document.cookie=name+"=; path="+((!path)?"/":path)+"; expires="+new Date(0).toGMTString()}
|
||||
function xDisplay(e,s){xDeprecate('xDisplay');if(!(e=xGetElementById(e)))return null;if(e.style&&xDef(e.style.display)){if(xStr(s))e.style.display=s;return e.style.display};return null}
|
||||
function xEvent(evt){xDeprecate('xEvent');var e=evt||window.event;if(!e)return;if(e.type)this.type=e.type;if(e.target){this.target=e.target}else if(e.srcElement)this.target=e.srcElement;if(e.relatedTarget){this.relatedTarget=e.relatedTarget}else if(e.type=='mouseover'&&e.fromElement){this.relatedTarget=e.fromElement}else if(e.type=='mouseout')this.relatedTarget=e.toElement;if(xOp6Dn){this.pageX=e.clientX;this.pageY=e.clientY}else if(xDef(e.pageX,e.pageY)){this.pageX=e.pageX;this.pageY=e.pageY}else if(xDef(e.clientX,e.clientY)){this.pageX=e.clientX+xScrollLeft();this.pageY=e.clientY+xScrollTop()};if(xDef(e.offsetX,e.offsetY)){this.offsetX=e.offsetX;this.offsetY=e.offsetY}else if(xDef(e.layerX,e.layerY)){this.offsetX=e.layerX;this.offsetY=e.layerY}else{this.offsetX=this.pageX-xPageX(this.target);this.offsetY=this.pageY-xPageY(this.target)};if(e.keyCode){this.keyCode=e.keyCode}else if(xDef(e.which)&&e.type.indexOf('key')!=-1)this.keyCode=e.which;this.shiftKey=e.shiftKey;this.ctrlKey=e.ctrlKey;this.altKey=e.altKey}
|
||||
function xFirstChild(e,t){xDeprecate('xFirstChild');var c=e?e.firstChild:null;if(t){while(c&&c.nodeName!=t)c=c.nextSibling}else while(c&&c.nodeType!=1)c=c.nextSibling;return c}
|
||||
function xGetBodyWidth(){xDeprecate('xGetBodyWidth');var cw=xClientWidth(),sw=window.document.body.scrollWidth;return cw>sw?cw:sw}
|
||||
function xGetBodyHeight(){xDeprecate('xGetBodyHeight');var cw=xClientHeight(),sw=window.document.body.scrollHeight;return cw>sw?cw:sw}
|
||||
function xGetComputedStyle(oEle,sProp,bInt){xDeprecate('xGetComputedStyle');var s,p='undefined',dv=document.defaultView;if(dv&&dv.getComputedStyle){s=dv.getComputedStyle(oEle,'');if(s)p=s.getPropertyValue(sProp)}else if(oEle.currentStyle){var a=sProp.split('-');sProp=a[0];for(var i=1;i<a.length;++i){c=a[i].charAt(0);sProp+=a[i].replace(c,c.toUpperCase())};p=oEle.currentStyle[sProp]}else return null;return bInt?(parseInt(p)||0):p}
|
||||
function xGetCookie(name){xDeprecate('xGetCookie');var value=null,search=name+"=";if(document.cookie.length>0){var offset=document.cookie.indexOf(search);if(offset!=-1){offset+=search.length;var end=document.cookie.indexOf(";",offset);if(end==-1)end=document.cookie.length;value=unescape(document.cookie.substring(offset,end))}};return value}
|
||||
function xGetElementById(e){xDeprecate('xGetElementById');if(typeof (e)!='string')return e;if(document.getElementById){e=document.getElementById(e)}else if(document.all){e=document.all[e]}else e=null;return e}
|
||||
function xGetElementsByAttribute(sTag,sAtt,sRE,fn){xDeprecate('xGetElementsByAttribute');var a,list,found=new Array(),re=new RegExp(sRE,'i');list=xGetElementsByTagName(sTag);for(var i=0;i<list.length;++i){a=list[i].getAttribute(sAtt);if(!a)a=list[i][sAtt];if(typeof (a)=='string'&&a.search(re)!=-1){found[found.length]=list[i];if(fn)fn(list[i])}};return found}
|
||||
function xGetElementsByClassName(c,p,t,f){xDeprecate('xGetElementsByClassName');var found=new Array(),re=new RegExp('\\b'+c+'\\b','i'),list=xGetElementsByTagName(t,p);for(var i=0;i<list.length;++i)if(list[i].className&&list[i].className.search(re)!=-1){found[found.length]=list[i];if(f)f(list[i])};return found}
|
||||
function xGetElementsByTagName(t,p){xDeprecate('xGetElementsByTagName');var list=null;t=t||'*';p=p||document;if(xIE4||xIE5){if(t=='*'){list=p.all}else list=p.all.tags(t)}else if(p.getElementsByTagName)list=p.getElementsByTagName(t);return list||new Array()}
|
||||
function xGetURLArguments(){xDeprecate('xGetURLArguments');var idx=location.href.indexOf('?'),params=new Array();if(idx!=-1){var pairs=location.href.substring(idx+1,location.href.length).split('&');for(var i=0;i<pairs.length;i++){nameVal=pairs[i].split('=');params[i]=nameVal[1];params[nameVal[0]]=nameVal[1]}};return params}
|
||||
function xHeight(e,h){xDeprecate('xHeight');if(!(e=xGetElementById(e)))return 0;if(xNum(h)){if(h<0){h=0}else h=Math.round(h)}else h=-1;var css=xDef(e.style);if(e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){h=xClientHeight()}else if(css&&xDef(e.offsetHeight)&&xStr(e.style.height)){if(h>=0){var pt=0,pb=0,bt=0,bb=0;if(document.compatMode=='CSS1Compat'){var gcs=xGetComputedStyle;pt=gcs(e,'padding-top',1);if(pt!==null){pb=gcs(e,'padding-bottom',1);bt=gcs(e,'border-top-width',1);bb=gcs(e,'border-bottom-width',1)}else if(xDef(e.offsetHeight,e.style.height)){e.style.height=h+'px';pt=e.offsetHeight-h}};h-=(pt+pb+bt+bb);if(isNaN(h)||h<0){return null}else e.style.height=h+'px'};h=e.offsetHeight}else if(css&&xDef(e.style.pixelHeight)){if(h>=0)e.style.pixelHeight=h;h=e.style.pixelHeight};return h}
|
||||
function xHex(sn,digits,prefix){xDeprecate('xHex');var p='',n=Math.ceil(sn);if(prefix)p=prefix;n=n.toString(16);for(var i=0;i<digits-n.length;++i)p+='0';return p+n}
|
||||
function xHide(e){xDeprecate('xHide');return xVisibility(e,0)}
|
||||
function xInnerHtml(e,h){xDeprecate('xInnerHtml');if(!(e=xGetElementById(e))||!xStr(e.innerHTML))return null;var s=e.innerHTML;if(xStr(h))e.innerHTML=h;return s}
|
||||
function xLeft(e,iX){xDeprecate('xLeft');if(!(e=xGetElementById(e)))return 0;var css=xDef(e.style);if(css&&xStr(e.style.left)){if(xNum(iX)){e.style.left=iX+'px'}else{iX=parseInt(e.style.left);if(isNaN(iX))iX=0}}else if(css&&xDef(e.style.pixelLeft))if(xNum(iX)){e.style.pixelLeft=iX}else iX=e.style.pixelLeft;return iX}
|
||||
function xMoveTo(e,x,y){xDeprecate('xMoveTo');xLeft(e,x);xTop(e,y)}
|
||||
function xName(e){xDeprecate('xName');if(!e){return e}else if(e.id&&e.id!=""){return e.id}else if(e.name&&e.name!=""){return e.name}else if(e.nodeName&&e.nodeName!=""){return e.nodeName}else if(e.tagName&&e.tagName!=""){return e.tagName}else return e}
|
||||
function xNextSib(e,t){xDeprecate('xNextSib');var s=e?e.nextSibling:null;if(t){while(s&&s.nodeName!=t)s=s.nextSibling}else while(s&&s.nodeType!=1)s=s.nextSibling;return s}
|
||||
function xNum(){xDeprecate('xNum');for(var i=0;i<arguments.length;++i)if(isNaN(arguments[i])||typeof (arguments[i])!='number')return false;return true}
|
||||
function xOffsetLeft(e){xDeprecate('xOffsetLeft');if(!(e=xGetElementById(e)))return 0;if(xDef(e.offsetLeft)){return e.offsetLeft}else return 0}
|
||||
function xOffsetTop(e){xDeprecate('xOffsetTop');if(!(e=xGetElementById(e)))return 0;if(xDef(e.offsetTop)){return e.offsetTop}else return 0}
|
||||
function xPad(s,len,c,left){xDeprecate('xPad');if(typeof s!='string')s=s+'';if(left){for(var i=s.length;i<len;++i)s=c+s}else for(i=s.length;i<len;++i)s+=c;return s}
|
||||
function xPageX(e){xDeprecate('xPageX');if(!(e=xGetElementById(e)))return 0;var x=0;while(e){if(xDef(e.offsetLeft))x+=e.offsetLeft;e=xDef(e.offsetParent)?e.offsetParent:null};return x}
|
||||
function xPageY(e){xDeprecate('xPageY');if(!(e=xGetElementById(e)))return 0;var y=0;while(e){if(xDef(e.offsetTop))y+=e.offsetTop;e=xDef(e.offsetParent)?e.offsetParent:null};return y}
|
||||
function xParent(e,bNode){xDeprecate('xParent');if(!(e=xGetElementById(e)))return null;var p=null;if(!bNode&&xDef(e.offsetParent)){p=e.offsetParent}else if(xDef(e.parentNode)){p=e.parentNode}else if(xDef(e.parentElement))p=e.parentElement;return p}
|
||||
function xPreventDefault(e){xDeprecate('xPreventDefault');if(e&&e.preventDefault){e.preventDefault()}else if(window.event)window.event.returnValue=false}
|
||||
function xPrevSib(e,t){xDeprecate('xPrevSib');var s=e?e.previousSibling:null;if(t){while(s&&s.nodeName!=t)s=s.previousSibling}else while(s&&s.nodeType!=1)s=s.previousSibling;return s}
|
||||
function xRemoveEventListener(e,eT,eL,cap){xDeprecate('xRemoveEventListener');if(!(e=xGetElementById(e)))return;eT=eT.toLowerCase();if((!xIE4Up&&!xOp7Up)&&e==window){if(eT=='resize'){window.xREL=null;return};if(eT=='scroll'){window.xSEL=null;return}};var eh='e.on'+eT+'=null';if(e.removeEventListener){e.removeEventListener(eT,eL,cap)}else if(e.detachEvent){e.detachEvent('on'+eT,eL)}else eval(eh)}
|
||||
function xResizeTo(e,w,h){xDeprecate('xResizeTo');xWidth(e,w);xHeight(e,h)}
|
||||
function xScrollLeft(e,bWin){xDeprecate('xScrollLeft');var offset=0;if(!xDef(e)||bWin||e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){var w=window;if(bWin&&e)w=e;if(w.document.documentElement&&w.document.documentElement.scrollLeft){offset=w.document.documentElement.scrollLeft}else if(w.document.body&&xDef(w.document.body.scrollLeft))offset=w.document.body.scrollLeft}else{e=xGetElementById(e);if(e&&xNum(e.scrollLeft))offset=e.scrollLeft};return offset}
|
||||
function xScrollTop(e,bWin){xDeprecate('xScrollTop');var offset=0;if(!xDef(e)||bWin||e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){var w=window;if(bWin&&e)w=e;if(w.document.documentElement&&w.document.documentElement.scrollTop){offset=w.document.documentElement.scrollTop}else if(w.document.body&&xDef(w.document.body.scrollTop))offset=w.document.body.scrollTop}else{e=xGetElementById(e);if(e&&xNum(e.scrollTop))offset=e.scrollTop};return offset}
|
||||
function xSetCookie(name,value,expire,path){xDeprecate('xSetCookie');document.cookie=name+"="+escape(value)+((!expire)?"":("; expires="+expire.toGMTString()))+"; path="+((!path)?"/":path)}
|
||||
function xShow(e){xDeprecate('xShow');return xVisibility(e,1)}
|
||||
function xStr(s){xDeprecate('xStr');for(var i=0;i<arguments.length;++i)if(typeof (arguments[i])!='string')return false;return true}
|
||||
function xTop(e,iY){xDeprecate('xTop');if(!(e=xGetElementById(e)))return 0;var css=xDef(e.style);if(css&&xStr(e.style.top)){if(xNum(iY)){e.style.top=iY+'px'}else{iY=parseInt(e.style.top);if(isNaN(iY))iY=0}}else if(css&&xDef(e.style.pixelTop))if(xNum(iY)){e.style.pixelTop=iY}else iY=e.style.pixelTop;return iY}
|
||||
function xVisibility(e,bShow){xDeprecate('xVisibility');if(!(e=xGetElementById(e)))return null;if(e.style&&xDef(e.style.visibility)){if(xDef(bShow))e.style.visibility=bShow?'visible':'hidden';return e.style.visibility};return null}
|
||||
function xWidth(e,w){xDeprecate('xWidth');if(!(e=xGetElementById(e)))return 0;if(xNum(w)){if(w<0){w=0}else w=Math.round(w)}else w=-1;var css=xDef(e.style);if(e==document||e.tagName.toLowerCase()=='html'||e.tagName.toLowerCase()=='body'){w=xClientWidth()}else if(css&&xDef(e.offsetWidth)&&xStr(e.style.width)){if(w>=0){var pl=0,pr=0,bl=0,br=0;if(document.compatMode=='CSS1Compat'){var gcs=xGetComputedStyle;pl=gcs(e,'padding-left',1);if(pl!==null){pr=gcs(e,'padding-right',1);bl=gcs(e,'border-left-width',1);br=gcs(e,'border-right-width',1)}else if(xDef(e.offsetWidth,e.style.width)){e.style.width=w+'px';pl=e.offsetWidth-w}};w-=(pl+pr+bl+br);if(isNaN(w)||w<0){return null}else e.style.width=w+'px'};w=e.offsetWidth}else if(css&&xDef(e.style.pixelWidth)){if(w>=0)e.style.pixelWidth=w;w=e.style.pixelWidth};return w}
|
||||
function xZIndex(e,uZ){xDeprecate('xZIndex');if(!(e=xGetElementById(e)))return 0;if(e.style&&xDef(e.style.zIndex)){if(xNum(uZ))e.style.zIndex=uZ;uZ=parseInt(e.style.zIndex)};return uZ}
|
||||
function xStopPropagation(evt){xDeprecate('xStopPropagation');if(evt&&evt.stopPropagation){evt.stopPropagation()}else if(window.event)window.event.cancelBubble=true}
|
||||
function xDeprecate(a){typeof console=="object"&&typeof console.log=="function"&&console.log("DEPRECATED : "+a+"() is deprecated function.")}var xOp7Up,xOp6Dn,xIE4Up,xIE4,xIE5,xIE6,xNN4,xUA=navigator.userAgent.toLowerCase();
|
||||
if(window.opera){var i=xUA.indexOf("opera");if(i!=-1){var v=parseInt(xUA.charAt(i+6));xOp7Up=v>=7;xOp6Dn=v<7}}else navigator.vendor!="KDE"&&document.all&&xUA.indexOf("msie")!=-1?(xIE4Up=parseFloat(navigator.appVersion)>=4,xIE4=xUA.indexOf("msie 4")!=-1,xIE5=xUA.indexOf("msie 5")!=-1,xIE6=xUA.indexOf("msie 6")!=-1):document.layers&&(xNN4=!0);var xMac=xUA.indexOf("mac")!=-1,xFF=xUA.indexOf("firefox")!=-1;
|
||||
function xAddEventListener(a,b,d,e){xDeprecate("xAddEventListener");if(a=xGetElementById(a)){b=b.toLowerCase();if(!xIE4Up&&!xOp7Up&&a==window){if(b=="resize"){window.xPCW=xClientWidth();window.xPCH=xClientHeight();window.xREL=d;xResizeEvent();return}if(b=="scroll"){window.xPSL=xScrollLeft();window.xPST=xScrollTop();window.xSEL=d;xScrollEvent();return}}var f="e.on"+b+"=eL";a.addEventListener?a.addEventListener(b,d,e):a.attachEvent?a.attachEvent("on"+b,d):eval(f)}}
|
||||
function xResizeEvent(){xDeprecate("xResizeEvent");window.xREL&&setTimeout("xResizeEvent()",250);var a=xClientWidth(),b=xClientHeight();if(window.xPCW!=a||window.xPCH!=b)window.xPCW=a,window.xPCH=b,window.xREL&&window.xREL()}function xScrollEvent(){xDeprecate("xScrollEvent");window.xSEL&&setTimeout("xScrollEvent()",250);var a=xScrollLeft(),b=xScrollTop();if(window.xPSL!=a||window.xPST!=b)window.xPSL=a,window.xPST=b,window.xSEL&&window.xSEL()}
|
||||
function xAppendChild(a,b){xDeprecate("xAppendChild");return a.appendChild?a.appendChild(b):null}
|
||||
function xClientHeight(){xDeprecate("xClientHeight");var a=0;if(xOp6Dn)a=window.innerHeight;else if(document.compatMode=="CSS1Compat"&&!window.opera&&document.documentElement&&document.documentElement.clientHeight)a=document.documentElement.clientHeight;else if(document.body&&document.body.clientHeight)a=document.body.clientHeight;else if(xDef(window.innerWidth,window.innerHeight,document.width))a=window.innerHeight,document.width>window.innerWidth&&(a-=16);return a}
|
||||
function xClientWidth(){xDeprecate("xClientWidth");var a=0;if(xOp6Dn)a=window.innerWidth;else if(document.compatMode=="CSS1Compat"&&!window.opera&&document.documentElement&&document.documentElement.clientWidth)a=document.documentElement.clientWidth;else if(document.body&&document.body.clientWidth)a=document.body.clientWidth;else if(xDef(window.innerWidth,window.innerHeight,document.height))a=window.innerWidth,document.height>window.innerHeight&&(a-=16);return a}
|
||||
function xCreateElement(a){xDeprecate("xCreateElement");return document.createElement?document.createElement(a):null}function xDef(){xDeprecate("xDef");for(var a=0;a<arguments.length;++a)if(typeof arguments[a]=="undefined")return!1;return!0}function xDeleteCookie(a,b){xDeprecate("xDeleteCookie");if(xGetCookie(a))document.cookie=a+"=; path="+(!b?"/":b)+"; expires="+(new Date(0)).toGMTString()}
|
||||
function xDisplay(a,b){xDeprecate("xDisplay");if(!(a=xGetElementById(a)))return null;if(a.style&&xDef(a.style.display)){if(xStr(b))a.style.display=b;return a.style.display}return null}
|
||||
function xEvent(a){xDeprecate("xEvent");if(a=a||window.event){if(a.type)this.type=a.type;if(a.target)this.target=a.target;else if(a.srcElement)this.target=a.srcElement;if(a.relatedTarget)this.relatedTarget=a.relatedTarget;else if(a.type=="mouseover"&&a.fromElement)this.relatedTarget=a.fromElement;else if(a.type=="mouseout")this.relatedTarget=a.toElement;if(xOp6Dn)this.pageX=a.clientX,this.pageY=a.clientY;else if(xDef(a.pageX,a.pageY))this.pageX=a.pageX,this.pageY=a.pageY;else if(xDef(a.clientX,a.clientY))this.pageX=
|
||||
a.clientX+xScrollLeft(),this.pageY=a.clientY+xScrollTop();xDef(a.offsetX,a.offsetY)?(this.offsetX=a.offsetX,this.offsetY=a.offsetY):xDef(a.layerX,a.layerY)?(this.offsetX=a.layerX,this.offsetY=a.layerY):(this.offsetX=this.pageX-xPageX(this.target),this.offsetY=this.pageY-xPageY(this.target));if(a.keyCode)this.keyCode=a.keyCode;else if(xDef(a.which)&&a.type.indexOf("key")!=-1)this.keyCode=a.which;this.shiftKey=a.shiftKey;this.ctrlKey=a.ctrlKey;this.altKey=a.altKey}}
|
||||
function xFirstChild(a,b){xDeprecate("xFirstChild");var d=a?a.firstChild:null;if(b)for(;d&&d.nodeName!=b;)d=d.nextSibling;else for(;d&&d.nodeType!=1;)d=d.nextSibling;return d}function xGetBodyWidth(){xDeprecate("xGetBodyWidth");var a=xClientWidth(),b=window.document.body.scrollWidth;return a>b?a:b}function xGetBodyHeight(){xDeprecate("xGetBodyHeight");var a=xClientHeight(),b=window.document.body.scrollHeight;return a>b?a:b}
|
||||
function xGetComputedStyle(a,b,d){xDeprecate("xGetComputedStyle");var e="undefined",f=document.defaultView;if(f&&f.getComputedStyle)(a=f.getComputedStyle(a,""))&&(e=a.getPropertyValue(b));else if(a.currentStyle){e=b.split("-");b=e[0];for(f=1;f<e.length;++f)c=e[f].charAt(0),b+=e[f].replace(c,c.toUpperCase());e=a.currentStyle[b]}else return null;return d?parseInt(e)||0:e}
|
||||
function xGetCookie(a){xDeprecate("xGetCookie");var b=null,d=a+"=";if(document.cookie.length>0&&(a=document.cookie.indexOf(d),a!=-1)){a+=d.length;b=document.cookie.indexOf(";",a);if(b==-1)b=document.cookie.length;b=unescape(document.cookie.substring(a,b))}return b}function xGetElementById(a){xDeprecate("xGetElementById");if(typeof a!="string")return a;return a=document.getElementById?document.getElementById(a):document.all?document.all[a]:null}
|
||||
function xGetElementsByAttribute(a,b,d,e){xDeprecate("xGetElementsByAttribute");var f,h=[],d=RegExp(d,"i");f=xGetElementsByTagName(a);for(var g=0;g<f.length;++g)(a=f[g].getAttribute(b))||(a=f[g][b]),typeof a=="string"&&a.search(d)!=-1&&(h[h.length]=f[g],e&&e(f[g]));return h}
|
||||
function xGetElementsByClassName(a,b,d,e){xDeprecate("xGetElementsByClassName");for(var f=[],a=RegExp("\\b"+a+"\\b","i"),b=xGetElementsByTagName(d,b),d=0;d<b.length;++d)b[d].className&&b[d].className.search(a)!=-1&&(f[f.length]=b[d],e&&e(b[d]));return f}function xGetElementsByTagName(a,b){xDeprecate("xGetElementsByTagName");var d=null,a=a||"*",b=b||document;xIE4||xIE5?d=a=="*"?b.all:b.all.tags(a):b.getElementsByTagName&&(d=b.getElementsByTagName(a));return d||[]}
|
||||
function xGetURLArguments(){xDeprecate("xGetURLArguments");var a=location.href.indexOf("?"),b=[];if(a!=-1)for(var a=location.href.substring(a+1,location.href.length).split("&"),d=0;d<a.length;d++)nameVal=a[d].split("="),b[d]=nameVal[1],b[nameVal[0]]=nameVal[1];return b}
|
||||
function xHeight(a,b){xDeprecate("xHeight");if(!(a=xGetElementById(a)))return 0;var b=xNum(b)?b<0?0:Math.round(b):-1,d=xDef(a.style);if(a==document||a.tagName.toLowerCase()=="html"||a.tagName.toLowerCase()=="body")b=xClientHeight();else if(d&&xDef(a.offsetHeight)&&xStr(a.style.height)){if(b>=0){var e=d=0,f=0,h=0;if(document.compatMode=="CSS1Compat"){var g=xGetComputedStyle,d=g(a,"padding-top",1);if(d!==null)e=g(a,"padding-bottom",1),f=g(a,"border-top-width",1),h=g(a,"border-bottom-width",1);else if(xDef(a.offsetHeight,
|
||||
a.style.height))a.style.height=b+"px",d=a.offsetHeight-b}b-=d+e+f+h;if(isNaN(b)||b<0)return null;else a.style.height=b+"px"}b=a.offsetHeight}else if(d&&xDef(a.style.pixelHeight)){if(b>=0)a.style.pixelHeight=b;b=a.style.pixelHeight}return b}function xHex(a,b,d){xDeprecate("xHex");var e="",a=Math.ceil(a);d&&(e=d);a=a.toString(16);for(d=0;d<b-a.length;++d)e+="0";return e+a}function xHide(a){xDeprecate("xHide");return xVisibility(a,0)}
|
||||
function xInnerHtml(a,b){xDeprecate("xInnerHtml");if(!(a=xGetElementById(a))||!xStr(a.innerHTML))return null;var d=a.innerHTML;if(xStr(b))a.innerHTML=b;return d}function xLeft(a,b){xDeprecate("xLeft");if(!(a=xGetElementById(a)))return 0;var d=xDef(a.style);if(d&&xStr(a.style.left))xNum(b)?a.style.left=b+"px":(b=parseInt(a.style.left),isNaN(b)&&(b=0));else if(d&&xDef(a.style.pixelLeft))xNum(b)?a.style.pixelLeft=b:b=a.style.pixelLeft;return b}
|
||||
function xMoveTo(a,b,d){xDeprecate("xMoveTo");xLeft(a,b);xTop(a,d)}function xName(a){xDeprecate("xName");return a?a.id&&a.id!=""?a.id:a.name&&a.name!=""?a.name:a.nodeName&&a.nodeName!=""?a.nodeName:a.tagName&&a.tagName!=""?a.tagName:a:a}function xNextSib(a,b){xDeprecate("xNextSib");var d=a?a.nextSibling:null;if(b)for(;d&&d.nodeName!=b;)d=d.nextSibling;else for(;d&&d.nodeType!=1;)d=d.nextSibling;return d}
|
||||
function xNum(){xDeprecate("xNum");for(var a=0;a<arguments.length;++a)if(isNaN(arguments[a])||typeof arguments[a]!="number")return!1;return!0}function xOffsetLeft(a){xDeprecate("xOffsetLeft");if(!(a=xGetElementById(a)))return 0;return xDef(a.offsetLeft)?a.offsetLeft:0}function xOffsetTop(a){xDeprecate("xOffsetTop");if(!(a=xGetElementById(a)))return 0;return xDef(a.offsetTop)?a.offsetTop:0}
|
||||
function xPad(a,b,d,e){xDeprecate("xPad");typeof a!="string"&&(a+="");if(e)for(e=a.length;e<b;++e)a=d+a;else for(e=a.length;e<b;++e)a+=d;return a}function xPageX(a){xDeprecate("xPageX");if(!(a=xGetElementById(a)))return 0;for(var b=0;a;)xDef(a.offsetLeft)&&(b+=a.offsetLeft),a=xDef(a.offsetParent)?a.offsetParent:null;return b}
|
||||
function xPageY(a){xDeprecate("xPageY");if(!(a=xGetElementById(a)))return 0;for(var b=0;a;)xDef(a.offsetTop)&&(b+=a.offsetTop),a=xDef(a.offsetParent)?a.offsetParent:null;return b}function xParent(a,b){xDeprecate("xParent");if(!(a=xGetElementById(a)))return null;var d=null;if(!b&&xDef(a.offsetParent))d=a.offsetParent;else if(xDef(a.parentNode))d=a.parentNode;else if(xDef(a.parentElement))d=a.parentElement;return d}
|
||||
function xPreventDefault(a){xDeprecate("xPreventDefault");if(a&&a.preventDefault)a.preventDefault();else if(window.event)window.event.returnValue=!1}function xPrevSib(a,b){xDeprecate("xPrevSib");var d=a?a.previousSibling:null;if(b)for(;d&&d.nodeName!=b;)d=d.previousSibling;else for(;d&&d.nodeType!=1;)d=d.previousSibling;return d}
|
||||
function xRemoveEventListener(a,b,d,e){xDeprecate("xRemoveEventListener");if(a=xGetElementById(a)){b=b.toLowerCase();if(!xIE4Up&&!xOp7Up&&a==window){if(b=="resize"){window.xREL=null;return}if(b=="scroll"){window.xSEL=null;return}}var f="e.on"+b+"=null";a.removeEventListener?a.removeEventListener(b,d,e):a.detachEvent?a.detachEvent("on"+b,d):eval(f)}}function xResizeTo(a,b,d){xDeprecate("xResizeTo");xWidth(a,b);xHeight(a,d)}
|
||||
function xScrollLeft(a,b){xDeprecate("xScrollLeft");var d=0;if(!xDef(a)||b||a==document||a.tagName.toLowerCase()=="html"||a.tagName.toLowerCase()=="body"){var e=window;b&&a&&(e=a);if(e.document.documentElement&&e.document.documentElement.scrollLeft)d=e.document.documentElement.scrollLeft;else if(e.document.body&&xDef(e.document.body.scrollLeft))d=e.document.body.scrollLeft}else if((a=xGetElementById(a))&&xNum(a.scrollLeft))d=a.scrollLeft;return d}
|
||||
function xScrollTop(a,b){xDeprecate("xScrollTop");var d=0;if(!xDef(a)||b||a==document||a.tagName.toLowerCase()=="html"||a.tagName.toLowerCase()=="body"){var e=window;b&&a&&(e=a);if(e.document.documentElement&&e.document.documentElement.scrollTop)d=e.document.documentElement.scrollTop;else if(e.document.body&&xDef(e.document.body.scrollTop))d=e.document.body.scrollTop}else if((a=xGetElementById(a))&&xNum(a.scrollTop))d=a.scrollTop;return d}
|
||||
function xSetCookie(a,b,d,e){xDeprecate("xSetCookie");document.cookie=a+"="+escape(b)+(!d?"":"; expires="+d.toGMTString())+"; path="+(!e?"/":e)}function xShow(a){xDeprecate("xShow");return xVisibility(a,1)}function xStr(){xDeprecate("xStr");for(var a=0;a<arguments.length;++a)if(typeof arguments[a]!="string")return!1;return!0}
|
||||
function xTop(a,b){xDeprecate("xTop");if(!(a=xGetElementById(a)))return 0;var d=xDef(a.style);if(d&&xStr(a.style.top))xNum(b)?a.style.top=b+"px":(b=parseInt(a.style.top),isNaN(b)&&(b=0));else if(d&&xDef(a.style.pixelTop))xNum(b)?a.style.pixelTop=b:b=a.style.pixelTop;return b}function xVisibility(a,b){xDeprecate("xVisibility");if(!(a=xGetElementById(a)))return null;if(a.style&&xDef(a.style.visibility)){if(xDef(b))a.style.visibility=b?"visible":"hidden";return a.style.visibility}return null}
|
||||
function xWidth(a,b){xDeprecate("xWidth");if(!(a=xGetElementById(a)))return 0;var b=xNum(b)?b<0?0:Math.round(b):-1,d=xDef(a.style);if(a==document||a.tagName.toLowerCase()=="html"||a.tagName.toLowerCase()=="body")b=xClientWidth();else if(d&&xDef(a.offsetWidth)&&xStr(a.style.width)){if(b>=0){var e=d=0,f=0,h=0;if(document.compatMode=="CSS1Compat"){var g=xGetComputedStyle,d=g(a,"padding-left",1);if(d!==null)e=g(a,"padding-right",1),f=g(a,"border-left-width",1),h=g(a,"border-right-width",1);else if(xDef(a.offsetWidth,
|
||||
a.style.width))a.style.width=b+"px",d=a.offsetWidth-b}b-=d+e+f+h;if(isNaN(b)||b<0)return null;else a.style.width=b+"px"}b=a.offsetWidth}else if(d&&xDef(a.style.pixelWidth)){if(b>=0)a.style.pixelWidth=b;b=a.style.pixelWidth}return b}function xZIndex(a,b){xDeprecate("xZIndex");if(!(a=xGetElementById(a)))return 0;if(a.style&&xDef(a.style.zIndex)){if(xNum(b))a.style.zIndex=b;b=parseInt(a.style.zIndex)}return b}
|
||||
function xStopPropagation(a){xDeprecate("xStopPropagation");if(a&&a.stopPropagation)a.stopPropagation();else if(window.event)window.event.cancelBubble=!0};
|
||||
|
|
|
|||
|
|
@ -1194,6 +1194,10 @@ function ucfirst(str) {
|
|||
return str.charAt(0).toUpperCase() + str.slice(1);
|
||||
}
|
||||
|
||||
function xGetElementById(id) {
|
||||
return document.getElementById(id);
|
||||
}
|
||||
|
||||
jQuery(function($){
|
||||
$('.lang_code').each(
|
||||
function()
|
||||
|
|
@ -1244,6 +1248,22 @@ jQuery(function($){
|
|||
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
* Create popup windows automatically.
|
||||
* Find anchors that have the '_xe_popup' class, then add popup script to them.
|
||||
*/
|
||||
$('a._xe_popup').click(function(){
|
||||
var $this = $(this), name = $this.attr('name'), href = $this.attr('href'), win;
|
||||
|
||||
if(!name) name = '_xe_popup_'+Math.floor(Math.random()*1000);
|
||||
|
||||
win = window.open(href, name, 'left=10,top=10,width=10,hegiht=10,resizable=no,scrollbars=no,toolbars=no');
|
||||
if(win) win.focus();
|
||||
|
||||
// cancel default action
|
||||
return false;
|
||||
});
|
||||
});
|
||||
/**
|
||||
* @file common/js/xml_handler.js
|
||||
|
|
@ -1741,48 +1761,58 @@ var Validator = xe.createApp('Validator', {
|
|||
});
|
||||
},
|
||||
API_VALIDATE : function(sender, params) {
|
||||
var self = this, result = true, form = params[0], filter=null, callback=null;
|
||||
var result = true, form = params[0], filter=null, callback=null;
|
||||
var name, el, val, mod, len, lenb, max, min, maxb, minb, rules, e_el, e_val, i, c, r, result;
|
||||
|
||||
if (form.elements['_filter']) filter = form.elements['_filter'].value;
|
||||
if (!filter) return true;
|
||||
if ($.isFunction(callbacks[filter])) callback = callbacks[filter];
|
||||
filter = $.extend({}, filters[filter.toLowerCase()] || {}, extras);
|
||||
|
||||
$.each(filter, function(name) {
|
||||
var _el = form.elements[name];
|
||||
for(name in filter) {
|
||||
if(!filter.hasOwnProperty(name)) continue;
|
||||
|
||||
if (!_el) return true;
|
||||
f = filter[name];
|
||||
el = form.elements[name];
|
||||
val = el?$.trim(get_value($(el))):'';
|
||||
mod = (f.modifier||'')+',';
|
||||
|
||||
var el = $(_el), val = $.trim(get_value(el));
|
||||
var minlen = parseInt(this.minlength) || 0;
|
||||
var maxlen = parseInt(this.maxlength) || 0;
|
||||
var rule = (this.rule || '').split(',');
|
||||
|
||||
if (this.required && !val) return (result = (!!self.cast('ALERT', [form, name, 'isnull']) && false));
|
||||
if (!this.required && !val) return (result = true);
|
||||
if ((minlen && val.length < minlen) || (maxlen && val.length > maxlen)) return (result = (!!self.cast('ALERT', [form, name, 'outofrange', minlen, maxlen]) && false));
|
||||
|
||||
if (this.equalto) {
|
||||
var eq_val = get_value($(form.elements[this.equalto]));
|
||||
if (eq_val != val) return (result = (!!self.cast('ALERT', [form, name, 'equalto']) && false));
|
||||
if(!val) {
|
||||
if(f['default']) val = f['default'];
|
||||
if(f.required) return this.cast('ALERT', [form, name, 'isnull']) && false;
|
||||
else continue;
|
||||
}
|
||||
|
||||
if (rule) {
|
||||
$.each(rule, function(i,r) {
|
||||
if (!r) return true;
|
||||
|
||||
var ret = self.cast('APPLY_RULE', [r, val]);
|
||||
if (!ret) {
|
||||
self.cast('ALERT', [form, name, 'invalid_'+this]);
|
||||
return (result = false);
|
||||
}
|
||||
});
|
||||
min = parseInt(f.minlength) || 0;
|
||||
max = parseInt(f.maxlength) || 0;
|
||||
minb = /b$/.test(f.minlength||'');
|
||||
maxb = /b$/.test(f.maxlength||'');
|
||||
len = val.length;
|
||||
if(minb || maxb) lenb = get_bytes(val);
|
||||
if((min && min > (minb?lenb:len)) || (max && max < (maxb?lenb:len))) {
|
||||
return this.cast('ALERT', [form, name, 'outofrange', min, max]) && false;
|
||||
}
|
||||
|
||||
if (!result) return false;
|
||||
});
|
||||
if(f.equalto) {
|
||||
e_el = form.elements[f.equalto];
|
||||
e_val = e_el?$.trim(get_value($(e_el))):'';
|
||||
if(e_el && e_val !== val) {
|
||||
return this.cast('ALERT', [form, name, 'equalto']) && false;
|
||||
}
|
||||
}
|
||||
|
||||
rules = (f.rule || '').split(',');
|
||||
for(i=0,c=rules.length; i < c; i++) {
|
||||
if(!(r = rules[i])) continue;
|
||||
|
||||
result = this.cast('APPLY_RULE', [r, val]);
|
||||
if(mod.indexOf('not,') > -1) result = !result;
|
||||
if(!result) {
|
||||
return this.cast('ALERT', [form, name, 'invalid_'+r]) && false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!result) return false;
|
||||
if ($.isFunction(callback)) return callback(form);
|
||||
|
||||
return true;
|
||||
|
|
@ -1844,6 +1874,7 @@ var Validator = xe.createApp('Validator', {
|
|||
if(typeof(rules[name]) == 'undefined') return true; // no filter
|
||||
if($.isFunction(rules[name])) return rules[name](value);
|
||||
if(rules[name] instanceof RegExp) return rules[name].test(value);
|
||||
if($.isArray(rules[name])) return ($.inArray(value, rules[name]) > -1);
|
||||
|
||||
return true;
|
||||
},
|
||||
|
|
@ -1930,6 +1961,16 @@ function get_value(elem) {
|
|||
}
|
||||
}
|
||||
|
||||
function get_bytes(str) {
|
||||
str += '';
|
||||
if(!str.length) return 0;
|
||||
|
||||
str = encodeURI(str);
|
||||
var c = str.split('%').length - 1;
|
||||
|
||||
return str.length - c*2;
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
|
||||
/**
|
||||
|
|
|
|||
83
common/js/xe.min.js
vendored
83
common/js/xe.min.js
vendored
|
|
@ -3,71 +3,72 @@
|
|||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief XE Common JavaScript
|
||||
**/
|
||||
(function(a){function b(){return function(){var e=this;if(a.isArray(this._plugins))this._plugins=[];this._messages?this._messages={}:this._binded_fn={};a.each(this,function(c,b){if(!a.isFunction(b))return!0;if(!/^API_([A-Z0-9_]+)$/.test(c))return!0;var d=RegExp.$1,f=function(a,b){return e[c](a,b)};e._messages?e._messages[d]=[f]:e._binded_fn[d]=f});a.isFunction(this.init)&&this.init.apply(this,arguments)}}var d,c,f=[];d={_plugins:[],_messages:{},getPlugin:function(e){e=e.toLowerCase();return a.isArray(this._plugins[e])?
|
||||
(function(a){function b(){return function(){var e=this;if(a.isArray(this._plugins))this._plugins=[];this._messages?this._messages={}:this._binded_fn={};a.each(this,function(c,b){if(!a.isFunction(b))return!0;if(!/^API_([A-Z0-9_]+)$/.test(c))return!0;var d=RegExp.$1,g=function(a,b){return e[c](a,b)};e._messages?e._messages[d]=[g]:e._binded_fn[d]=g});a.isFunction(this.init)&&this.init.apply(this,arguments)}}var d,c,g=[];d={_plugins:[],_messages:{},getPlugin:function(e){e=e.toLowerCase();return a.isArray(this._plugins[e])?
|
||||
this._plugins[e]:[]},registerPlugin:function(e){var c=this,b=e.getName().toLowerCase();if(a.inArray(e,this._plugins)>=0)return!1;this._plugins.push(e);a.isArray(this._plugins[b])||(this._plugins[b]=[]);this._plugins[b].push(e);a.each(e._binded_fn,function(a,e){c.registerHandler(a,e)});e.oApp=this;a.isFunction(e.activate)&&e.activate();return!0},registerHandler:function(e,c){var b=this._messages,e=e.toUpperCase();a.isArray(b[e])||(b[e]=[]);b[e].push(c)},cast:function(a,c){return this._cast(this,a,
|
||||
c||[])},broadcast:function(a,c,b){this.parent&&this.parent._broadcast&&this.parent._broadcast(a,c,b)},_cast:function(c,b,d){var f,l=this._messages,b=b.toUpperCase();if(!l["BEFORE_"+b]&&!this["API_BEFORE_"+b]||this._cast(c,"BEFORE_"+b,d)){var g=[];if(a.isArray(l[b]))for(f=0;f<l[b].length;f++)g.push(l[b][f](c,d));g.length<2&&(g=g[0]);(l["AFTER_"+b]||this["API_AFTER_"+b])&&this._cast(c,"AFTER_"+b,d);return/^(?:AFTER|BEFORE)_/.test(b)?a.isArray(g)?a.inArray(!1,g)<0:typeof g=="undefined"?!0:!!g:g}}};c=
|
||||
{oApp:null,cast:function(a,c){if(this.oApp&&this.oApp._cast)return this.oApp._cast(this,a,c||[])},broadcast:function(a,c){this.oApp&&this.oApp.broadcast&&this.oApp.broadcast(this,mag,c||[])}};window.xe=a.extend(d,{getName:function(){return"Core"},createApp:function(c,f){var h=b();a.extend(h.prototype,d,f);h.prototype.getName=function(){return c};return h},createPlugin:function(e,d){var f=b();a.extend(f.prototype,c,d);f.prototype.getName=function(){return e};return f},getApps:function(){return a.makeArray(f)},
|
||||
getApp:function(a){a=(a||"").toLowerCase();return typeof f[a]!="undefined"?f[a]:null},registerApp:function(c){var b=c.getName().toLowerCase();f.push(c);a.isArray(f[b])||(f[b]=[]);f[b].push(c);c.parent=this;a.isFunction(c.activate)&&c.activate()},unregisterApp:function(c){var b=oPlugin.getName().toLowerCase(),d=a.inArray(c,f);d>=0&&f.splice(d,1);a.isArray(f[b])&&(d=a.inArray(c,f[b]),d>=0&&f[b].splice(d,1));a.isFunction(c.deactivate)&&c.deactivate()},broadcast:function(a,c){this._broadcast(this,a,c)},
|
||||
_broadcast:function(a,c,b){for(var d=0;d<f.length;d++)f[d]._cast(a,c,b);this._cast(a,c,b)}});window.xe.lang={};a(function(){xe.broadcast("ONREADY")});a(window).load(function(){xe.broadcast("ONLOAD")})})(jQuery);jQuery&&jQuery.noConflict();
|
||||
c||[])},broadcast:function(a,c,b){this.parent&&this.parent._broadcast&&this.parent._broadcast(a,c,b)},_cast:function(c,b,d){var g,m=this._messages,b=b.toUpperCase();if(!m["BEFORE_"+b]&&!this["API_BEFORE_"+b]||this._cast(c,"BEFORE_"+b,d)){var h=[];if(a.isArray(m[b]))for(g=0;g<m[b].length;g++)h.push(m[b][g](c,d));h.length<2&&(h=h[0]);(m["AFTER_"+b]||this["API_AFTER_"+b])&&this._cast(c,"AFTER_"+b,d);return/^(?:AFTER|BEFORE)_/.test(b)?a.isArray(h)?a.inArray(!1,h)<0:typeof h=="undefined"?!0:!!h:h}}};c=
|
||||
{oApp:null,cast:function(a,c){if(this.oApp&&this.oApp._cast)return this.oApp._cast(this,a,c||[])},broadcast:function(a,c){this.oApp&&this.oApp.broadcast&&this.oApp.broadcast(this,mag,c||[])}};window.xe=a.extend(d,{getName:function(){return"Core"},createApp:function(c,g){var j=b();a.extend(j.prototype,d,g);j.prototype.getName=function(){return c};return j},createPlugin:function(e,d){var g=b();a.extend(g.prototype,c,d);g.prototype.getName=function(){return e};return g},getApps:function(){return a.makeArray(g)},
|
||||
getApp:function(a){a=(a||"").toLowerCase();return typeof g[a]!="undefined"?g[a]:null},registerApp:function(c){var b=c.getName().toLowerCase();g.push(c);a.isArray(g[b])||(g[b]=[]);g[b].push(c);c.parent=this;a.isFunction(c.activate)&&c.activate()},unregisterApp:function(c){var b=oPlugin.getName().toLowerCase(),d=a.inArray(c,g);d>=0&&g.splice(d,1);a.isArray(g[b])&&(d=a.inArray(c,g[b]),d>=0&&g[b].splice(d,1));a.isFunction(c.deactivate)&&c.deactivate()},broadcast:function(a,c){this._broadcast(this,a,c)},
|
||||
_broadcast:function(a,c,b){for(var d=0;d<g.length;d++)g[d]._cast(a,c,b);this._cast(a,c,b)}});window.xe.lang={};a(function(){xe.broadcast("ONREADY")});a(window).load(function(){xe.broadcast("ONLOAD")})})(jQuery);jQuery&&jQuery.noConflict();
|
||||
(function(a){var b=navigator.userAgent.toLowerCase();a.os={Linux:/linux/.test(b),Unix:/x11/.test(b),Mac:/mac/.test(b),Windows:/win/.test(b)};a.os.name=a.os.Windows?"Windows":a.os.Linux?"Linux":a.os.Unix?"Unix":a.os.Mac?"Mac":"";window.XE={loaded_popup_menus:[],addedDocument:[],checkboxToggleAll:function(){var b="cart",c={wrap:null,checked:"toggle",doClick:!1};switch(arguments.length){case 1:typeof arguments[0]=="string"?b=arguments[0]:a.extend(c,arguments[0]||{});break;case 2:b=arguments[0],a.extend(c,
|
||||
arguments[1]||{})}if(c.doClick==!0)c.checked=null;if(typeof c.wrap=="string")c.wrap="#"+c.wrap;b=c.wrap?a(c.wrap).find("input[name="+b+"]:checkbox"):a("input[name="+b+"]:checkbox");c.checked=="toggle"?b.each(function(){a(this).attr("checked",a(this).attr("checked")?!1:!0)}):c.doClick==!0?b.click():b.attr("checked",c.checked)},displayPopupMenu:function(b,c,f){var c=f.menu_id,e=b.menus,b="";if(this.loaded_popup_menus[c])b=this.loaded_popup_menus[c];else{if(e){e=e.item;if(typeof e.length=="undefined"||
|
||||
e.length<1)e=Array(e);if(e.length)for(var j=0;j<e.length;j++){var h=e[j].url,k=e[j].str,l=e[j].icon,g=e[j].target,m="",o="";l&&(m=" style=\"background-image:url('"+l+"')\" ");switch(g){case "popup":o=" onclick=\"popopen(this.href,'"+g+"'); return false;\"";break;case "self":break;case "javascript":o=' onclick="'+h+'; return false; "';h="#";break;default:o=' onclick="window.open(this.href); return false;"'}b+="<li "+m+'><a href="'+h+'"'+o+">"+k+"</a></li> "}}this.loaded_popup_menus[c]=b}if(b){c=a("#popup_menu_area").html("<ul>"+
|
||||
b+"</ul>");f={top:f.page_y,left:f.page_x};if(c.outerHeight()+f.top>a(window).height()+a(window).scrollTop())f.top=a(window).height()-c.outerHeight()+a(window).scrollTop();if(c.outerWidth()+f.left>a(window).width()+a(window).scrollLeft())f.left=a(window).width()-c.outerWidth()+a(window).scrollLeft();c.css({top:f.top,left:f.left}).show()}}}})(jQuery);
|
||||
jQuery(function(a){a.browser.msie&&a("select").each(function(a,b){for(var e=!1,d=[],h=0;h<b.options.length;h++)b.options[h].disabled?(b.options[h].style.color="#CCCCCC",e=!0):d[a]=d[a]>-1?d[a]:h;if(e&&(b.oldonchange=b.onchange,b.onchange=function(){this.options[this.selectedIndex].disabled?this.selectedIndex=d[a]:this.oldonchange&&this.oldonchange()},b.selectedIndex>=0&&b.options[b.selectedIndex].disabled))b.onchange()});var b=a(".xe_content .fold_button");if(b.size()){var d=a("div.fold_container",
|
||||
arguments[1]||{})}if(c.doClick==!0)c.checked=null;if(typeof c.wrap=="string")c.wrap="#"+c.wrap;b=c.wrap?a(c.wrap).find("input[name="+b+"]:checkbox"):a("input[name="+b+"]:checkbox");c.checked=="toggle"?b.each(function(){a(this).attr("checked",a(this).attr("checked")?!1:!0)}):c.doClick==!0?b.click():b.attr("checked",c.checked)},displayPopupMenu:function(b,c,g){var c=g.menu_id,e=b.menus,b="";if(this.loaded_popup_menus[c])b=this.loaded_popup_menus[c];else{if(e){e=e.item;if(typeof e.length=="undefined"||
|
||||
e.length<1)e=Array(e);if(e.length)for(var k=0;k<e.length;k++){var j=e[k].url,l=e[k].str,m=e[k].icon,h=e[k].target,n="",r="";m&&(n=" style=\"background-image:url('"+m+"')\" ");switch(h){case "popup":r=" onclick=\"popopen(this.href,'"+h+"'); return false;\"";break;case "self":break;case "javascript":r=' onclick="'+j+'; return false; "';j="#";break;default:r=' onclick="window.open(this.href); return false;"'}b+="<li "+n+'><a href="'+j+'"'+r+">"+l+"</a></li> "}}this.loaded_popup_menus[c]=b}if(b){c=a("#popup_menu_area").html("<ul>"+
|
||||
b+"</ul>");g={top:g.page_y,left:g.page_x};if(c.outerHeight()+g.top>a(window).height()+a(window).scrollTop())g.top=a(window).height()-c.outerHeight()+a(window).scrollTop();if(c.outerWidth()+g.left>a(window).width()+a(window).scrollLeft())g.left=a(window).width()-c.outerWidth()+a(window).scrollLeft();c.css({top:g.top,left:g.left}).show()}}}})(jQuery);
|
||||
jQuery(function(a){a.browser.msie&&a("select").each(function(a,b){for(var e=!1,d=[],j=0;j<b.options.length;j++)b.options[j].disabled?(b.options[j].style.color="#CCCCCC",e=!0):d[a]=d[a]>-1?d[a]:j;if(e&&(b.oldonchange=b.onchange,b.onchange=function(){this.options[this.selectedIndex].disabled?this.selectedIndex=d[a]:this.oldonchange&&this.oldonchange()},b.selectedIndex>=0&&b.options[b.selectedIndex].disabled))b.onchange()});var b=a(".xe_content .fold_button");if(b.size()){var d=a("div.fold_container",
|
||||
b);a("button.more",b).click(function(){a(this).hide().next("button").show().parent().next(d).show()});a("button.less",b).click(function(){a(this).hide().prev("button").show().parent().next(d).hide()})}});String.prototype.getQuery=function(a){var b=this.indexOf("?");if(b==-1)return null;var d={};this.substr(b+1,this.length).replace(/([^=]+)=([^&]*)(&|$)/g,function(a,b,e){d[b]=e});a=d[a];typeof a=="undefined"&&(a="");return a};
|
||||
String.prototype.setQuery=function(a,b){var d=this.indexOf("?"),c=this.replace(/#$/,"");if(d!=-1){var f=c.substr(d+1,this.length),e={},j=[],c=this.substr(0,d);f.replace(/([^=]+)=([^&]*)(&|$)/g,function(a,b,c){e[b]=c});e[a]=b;jQuery.each(e,function(a,b){jQuery.trim(b)&&j.push(a+"="+decodeURI(b))});f=j.join("&");c+=f?"?"+f:""}else b.toString().trim()&&(c=c+"?"+a+"="+b);d=/https:\/\/([^:\/]+)(:\d+|)/i;if(f=d.exec(c))f="http://"+f[1],typeof http_port!="undefined"&&http_port!=80&&(f+=":"+http_port),c=
|
||||
c.replace(d,f);d=!1;if(typeof enforce_ssl!="undefined"&&enforce_ssl)d=!0;else if(typeof ssl_actions!="undefined"&&typeof ssl_actions.length!="undefined"&&c.getQuery("act")){f=c.getQuery("act");for(i=0;i<ssl_actions.length;i++)if(ssl_actions[i]==f){d=!0;break}}if(d&&(d=/http:\/\/([^:\/]+)(:\d+|)/i,f=d.exec(c)))f="https://"+f[1],typeof https_port!="undefined"&&https_port!=443&&(f+=":"+https_port),c=c.replace(d,f);return encodeURI(c)};
|
||||
String.prototype.setQuery=function(a,b){var d=this.indexOf("?"),c=this.replace(/#$/,"");if(d!=-1){var g=c.substr(d+1,this.length),e={},k=[],c=this.substr(0,d);g.replace(/([^=]+)=([^&]*)(&|$)/g,function(a,b,c){e[b]=c});e[a]=b;jQuery.each(e,function(a,b){jQuery.trim(b)&&k.push(a+"="+decodeURI(b))});g=k.join("&");c+=g?"?"+g:""}else b.toString().trim()&&(c=c+"?"+a+"="+b);d=/https:\/\/([^:\/]+)(:\d+|)/i;if(g=d.exec(c))g="http://"+g[1],typeof http_port!="undefined"&&http_port!=80&&(g+=":"+http_port),c=
|
||||
c.replace(d,g);d=!1;if(typeof enforce_ssl!="undefined"&&enforce_ssl)d=!0;else if(typeof ssl_actions!="undefined"&&typeof ssl_actions.length!="undefined"&&c.getQuery("act")){g=c.getQuery("act");for(i=0;i<ssl_actions.length;i++)if(ssl_actions[i]==g){d=!0;break}}if(d&&(d=/http:\/\/([^:\/]+)(:\d+|)/i,g=d.exec(c)))g="https://"+g[1],typeof https_port!="undefined"&&https_port!=443&&(g+=":"+https_port),c=c.replace(d,g);return encodeURI(c)};
|
||||
String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"")};function xSleep(a){a/=1E3;for(var b=new Date,d=new Date;d.getTime()-b.getTime()<a;)d=new Date}function isDef(){for(var a=0;a<arguments.length;++a)if(typeof arguments[a]=="undefined")return!1;return!0}var winopen_list=[];
|
||||
function winopen(a,b,d){typeof xeVid!="undefined"&&a.indexOf(request_uri)>-1&&!a.getQuery("vid")&&(a=a.setQuery("vid",xeVid));try{b!="_blank"&&winopen_list[b]&&(winopen_list[b].close(),winopen_list[b]=null)}catch(c){}typeof b=="undefined"&&(b="_blank");typeof d=="undefined"&&(d="");a=window.open(a,b,d);a.focus();b!="_blank"&&(winopen_list[b]=a)}
|
||||
function popopen(a,b){typeof b=="undefined"&&(b="_blank");typeof xeVid!="undefined"&&a.indexOf(request_uri)>-1&&!a.getQuery("vid")&&(a=a.setQuery("vid",xeVid));winopen(a,b,"left=10,top=10,width=10,height=10,scrollbars=no,resizable=yes,toolbars=no")}function sendMailTo(a){location.href="mailto:"+a}function move_url(a,b){if(!a)return!1;typeof b=="undefined"&&(b="N");b=b=="N"?!1:!0;/^\./.test(a)&&(a=request_uri+a);b?winopen(a):location.href=a;return!1}
|
||||
function displayMultimedia(a,b,d,c){(a=_displayMultimedia(a,b,d,c))&&document.writeln(a)}
|
||||
function _displayMultimedia(a,b,d,c){a.indexOf("files")==0&&(a=request_uri+a);var c=jQuery.extend({wmode:"transparent",allowScriptAccess:"sameDomain",quality:"high",flashvars:"",autostart:!1},c||{}),f=c.autostart&&c.autostart!="false"?"true":"false";delete c.autostart;var e="",e=e="";if(/\.(gif|jpg|jpeg|bmp|png)$/i.test(a))e='<img src="'+a+'" width="'+b+'" height="'+d+'" />';else if(/\.flv$/i.test(a)||/\.mov$/i.test(a)||/\.moov$/i.test(a)||/\.m4v$/i.test(a))e='<embed src="'+request_uri+'common/tpl/images/flvplayer.swf" allowfullscreen="true" autostart="'+
|
||||
f+'" width="'+b+'" height="'+d+'" flashvars="&file='+a+"&width="+b+"&height="+d+"&autostart="+f+'" wmode="'+c.wmode+'" />';else if(/\.swf/i.test(a)){e='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+(typeof enforce_ssl!="undefined"&&enforce_ssl?"https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0":"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0")+'" width="'+b+'" height="'+d+'" flashvars="'+c.flashvars+
|
||||
'">';e+='<param name="movie" value="'+a+'" />';for(var j in c)c[j]!="undefined"&&c[j]!=""&&(e+='<param name="'+j+'" value="'+c[j]+'" />');e+='<embed src="'+a+'" autostart="'+f+'" width="'+b+'" height="'+d+'" flashvars="'+c.flashvars+'" wmode="'+c.wmode+'"></embed></object>'}else{if(jQuery.browser.mozilla||jQuery.browser.opera)f=c.autostart&&c.autostart!="false"?"1":"0";e='<embed src="'+a+'" autostart="'+f+'" width="'+b+'" height="'+d+'"';c.wmode=="transparent"&&(e+=' windowlessvideo="1"');e+="></embed>"}return e}
|
||||
function _displayMultimedia(a,b,d,c){a.indexOf("files")==0&&(a=request_uri+a);var c=jQuery.extend({wmode:"transparent",allowScriptAccess:"sameDomain",quality:"high",flashvars:"",autostart:!1},c||{}),g=c.autostart&&c.autostart!="false"?"true":"false";delete c.autostart;var e="",e=e="";if(/\.(gif|jpg|jpeg|bmp|png)$/i.test(a))e='<img src="'+a+'" width="'+b+'" height="'+d+'" />';else if(/\.flv$/i.test(a)||/\.mov$/i.test(a)||/\.moov$/i.test(a)||/\.m4v$/i.test(a))e='<embed src="'+request_uri+'common/tpl/images/flvplayer.swf" allowfullscreen="true" autostart="'+
|
||||
g+'" width="'+b+'" height="'+d+'" flashvars="&file='+a+"&width="+b+"&height="+d+"&autostart="+g+'" wmode="'+c.wmode+'" />';else if(/\.swf/i.test(a)){e='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+(typeof enforce_ssl!="undefined"&&enforce_ssl?"https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0":"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0")+'" width="'+b+'" height="'+d+'" flashvars="'+c.flashvars+
|
||||
'">';e+='<param name="movie" value="'+a+'" />';for(var k in c)c[k]!="undefined"&&c[k]!=""&&(e+='<param name="'+k+'" value="'+c[k]+'" />');e+='<embed src="'+a+'" autostart="'+g+'" width="'+b+'" height="'+d+'" flashvars="'+c.flashvars+'" wmode="'+c.wmode+'"></embed></object>'}else{if(jQuery.browser.mozilla||jQuery.browser.opera)g=c.autostart&&c.autostart!="false"?"1":"0";e='<embed src="'+a+'" autostart="'+g+'" width="'+b+'" height="'+d+'"';c.wmode=="transparent"&&(e+=' windowlessvideo="1"');e+="></embed>"}return e}
|
||||
function zbxe_folder_open(a){jQuery("#folder_open_"+a).hide();jQuery("#folder_close_"+a).show();jQuery("#folder_"+a).show()}function zbxe_folder_close(a){jQuery("#folder_open_"+a).show();jQuery("#folder_close_"+a).hide();jQuery("#folder_"+a).hide()}
|
||||
function setFixedPopupSize(){var a=jQuery;a("#popHeader");var b=a("#popBody");b.length&&b.height()>400&&b.css({overflow:"auto",overflowX:"hidden",height:"400px"});var d=a(window),b=a("#popup_content"),a=Math.max(b[0].offsetWidth,600),b=b[0].offsetHeight,c=d.width(),d=d.height(),f=0,e=0;a!=c&&(f=a-c);b!=d&&(e=b-d);(f||e)&&window.resizeBy(f,e);if(!arguments.callee.executed)setTimeout(setFixedPopupSize,300),arguments.callee.executed=!0}
|
||||
function setFixedPopupSize(){var a=jQuery;a("#popHeader");var b=a("#popBody");b.length&&b.height()>400&&b.css({overflow:"auto",overflowX:"hidden",height:"400px"});var d=a(window),b=a("#popup_content"),a=Math.max(b[0].offsetWidth,600),b=b[0].offsetHeight,c=d.width(),d=d.height(),g=0,e=0;a!=c&&(g=a-c);b!=d&&(e=b-d);(g||e)&&window.resizeBy(g,e);if(!arguments.callee.executed)setTimeout(setFixedPopupSize,300),arguments.callee.executed=!0}
|
||||
function doCallModuleAction(a,b,d){var c=[];c.target_srl=d;c.cur_mid=current_mid;exec_xml(a,b,c,completeCallModuleAction)}function completeCallModuleAction(a){a.message!="success"&&alert(a.message);location.reload()}function completeMessage(a){alert(a.message);location.reload()}function doChangeLangType(a){typeof a=="string"?setLangType(a):setLangType(a.options[a.selectedIndex].value);location.href=location.href.setQuery("l","")}
|
||||
function setLangType(a){var b=new Date;b.setTime(b.getTime()+6048E8);setCookie("lang_type",a,b,"/")}
|
||||
function doDocumentPreview(a){for(;a.nodeName!="FORM";)a=a.parentNode;if(a.nodeName=="FORM"){a=a.getAttribute("editor_sequence");a=editorGetContent(a);window.open("","previewDocument","toolbars=no,width=700px;height=800px,scrollbars=yes,resizable=yes");var b=jQuery("#previewDocument");b.length||(jQuery('<form id="previewDocument" target="previewDocument" method="post" action="'+request_uri+'"><input type="hidden" name="module" value="document" /><input type="hidden" name="act" value="dispDocumentPreview" /><input type="hidden" name="content" /></form>').appendTo(document.body),b=
|
||||
jQuery("#previewDocument")[0]);if(b)b.content.value=a,b.submit()}}
|
||||
function doDocumentSave(a){var b=a.form.getAttribute("editor_sequence"),d=editorRelKeys[b].content.value;if(typeof b!="undefined"&&b&&typeof editorRelKeys!="undefined"&&typeof editorGetContent=="function"){var c=editorGetContent(b);editorRelKeys[b].content.value=c}var f={},c=jQuery(a.form).serializeArray();jQuery.each(c,function(a,b){var c=jQuery.trim(b.value);if(!c)return!0;if(/\[\]$/.test(b.name))b.name=b.name.replace(/\[\]$/,"");f[b.name]?f[b.name]+="|@|"+c:f[b.name]=b.value});exec_xml("document",
|
||||
"procDocumentTempSave",f,completeDocumentSave,["error","message","document_srl"],f,a.form);editorRelKeys[b].content.value=d;return!1}function completeDocumentSave(a){jQuery("input[name=document_srl]").eq(0).val(a.document_srl);alert(a.message)}var objForSavedDoc=null;function doDocumentLoad(a){objForSavedDoc=a.form;popopen(request_uri.setQuery("module","document").setQuery("act","dispTempSavedList"))}
|
||||
function doDocumentSave(a){var b=a.form.getAttribute("editor_sequence"),d=editorRelKeys[b].content.value;if(typeof b!="undefined"&&b&&typeof editorRelKeys!="undefined"&&typeof editorGetContent=="function"){var c=editorGetContent(b);editorRelKeys[b].content.value=c}var g={},c=jQuery(a.form).serializeArray();jQuery.each(c,function(a,b){var c=jQuery.trim(b.value);if(!c)return!0;if(/\[\]$/.test(b.name))b.name=b.name.replace(/\[\]$/,"");g[b.name]?g[b.name]+="|@|"+c:g[b.name]=b.value});exec_xml("document",
|
||||
"procDocumentTempSave",g,completeDocumentSave,["error","message","document_srl"],g,a.form);editorRelKeys[b].content.value=d;return!1}function completeDocumentSave(a){jQuery("input[name=document_srl]").eq(0).val(a.document_srl);alert(a.message)}var objForSavedDoc=null;function doDocumentLoad(a){objForSavedDoc=a.form;popopen(request_uri.setQuery("module","document").setQuery("act","dispTempSavedList"))}
|
||||
function doDocumentSelect(a){if(opener&&opener.objForSavedDoc)opener.location.href=opener.current_url.setQuery("document_srl",a).setQuery("act","dispBoardWrite");window.close()}function viewSkinInfo(a,b){popopen("./?module=module&act=dispModuleSkinInfo&selected_module="+a+"&skin="+b,"SkinInfo")}var addedDocument=[];function doAddDocumentCart(a){addedDocument[addedDocument.length]=a.value;setTimeout(function(){callAddDocumentCart(addedDocument.length)},100)}
|
||||
function callAddDocumentCart(a){if(!(addedDocument.length<1||a!=addedDocument.length))a=[],a.srls=addedDocument.join(","),exec_xml("document","procDocumentAddCart",a,null),addedDocument=[]}
|
||||
function transRGB2Hex(a){if(!a)return a;if(a.indexOf("#")>-1)return a.replace(/^#/,"");if(a.toLowerCase().indexOf("rgb")<0)return a;a=a.replace(/^rgb\(/i,"").replace(/\)$/,"");value_list=a.split(",");for(var a="",b=0;b<value_list.length;b++){var d=parseInt(value_list[b],10).toString(16);d.length==1&&(d="0"+d);a+=d}return a}function toggleSecuritySignIn(){var a=location.href;location.href=/https:\/\//i.test(a)?a.replace(/^https/i,"http"):a.replace(/^http/i,"https")}
|
||||
function reloadDocument(){location.reload()}
|
||||
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a){for(var b="",d,c,f,e,j,h,k=0,a=Base64._utf8_encode(a);k<a.length;)d=a.charCodeAt(k++),c=a.charCodeAt(k++),f=a.charCodeAt(k++),e=d>>2,d=(d&3)<<4|c>>4,j=(c&15)<<2|f>>6,h=f&63,isNaN(c)?j=h=64:isNaN(f)&&(h=64),b=b+this._keyStr.charAt(e)+this._keyStr.charAt(d)+this._keyStr.charAt(j)+this._keyStr.charAt(h);return b},decode:function(a){for(var b="",d,c,f,e,j,h=0,a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");h<
|
||||
a.length;)d=this._keyStr.indexOf(a.charAt(h++)),c=this._keyStr.indexOf(a.charAt(h++)),e=this._keyStr.indexOf(a.charAt(h++)),j=this._keyStr.indexOf(a.charAt(h++)),d=d<<2|c>>4,c=(c&15)<<4|e>>2,f=(e&3)<<6|j,b+=String.fromCharCode(d),e!=64&&(b+=String.fromCharCode(c)),j!=64&&(b+=String.fromCharCode(f));return b=Base64._utf8_decode(b)},_utf8_encode:function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",d=0;d<a.length;d++){var c=a.charCodeAt(d);c<128?b+=String.fromCharCode(c):(c>127&&c<2048?b+=String.fromCharCode(c>>
|
||||
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a){for(var b="",d,c,g,e,k,j,l=0,a=Base64._utf8_encode(a);l<a.length;)d=a.charCodeAt(l++),c=a.charCodeAt(l++),g=a.charCodeAt(l++),e=d>>2,d=(d&3)<<4|c>>4,k=(c&15)<<2|g>>6,j=g&63,isNaN(c)?k=j=64:isNaN(g)&&(j=64),b=b+this._keyStr.charAt(e)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(j);return b},decode:function(a){for(var b="",d,c,g,e,k,j=0,a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");j<
|
||||
a.length;)d=this._keyStr.indexOf(a.charAt(j++)),c=this._keyStr.indexOf(a.charAt(j++)),e=this._keyStr.indexOf(a.charAt(j++)),k=this._keyStr.indexOf(a.charAt(j++)),d=d<<2|c>>4,c=(c&15)<<4|e>>2,g=(e&3)<<6|k,b+=String.fromCharCode(d),e!=64&&(b+=String.fromCharCode(c)),k!=64&&(b+=String.fromCharCode(g));return b=Base64._utf8_decode(b)},_utf8_encode:function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",d=0;d<a.length;d++){var c=a.charCodeAt(d);c<128?b+=String.fromCharCode(c):(c>127&&c<2048?b+=String.fromCharCode(c>>
|
||||
6|192):(b+=String.fromCharCode(c>>12|224),b+=String.fromCharCode(c>>6&63|128)),b+=String.fromCharCode(c&63|128))}return b},_utf8_decode:function(a){for(var b="",d=0,c=c1=c2=0;d<a.length;)c=a.charCodeAt(d),c<128?(b+=String.fromCharCode(c),d++):c>191&&c<224?(c2=a.charCodeAt(d+1),b+=String.fromCharCode((c&31)<<6|c2&63),d+=2):(c2=a.charCodeAt(d+1),c3=a.charCodeAt(d+2),b+=String.fromCharCode((c&15)<<12|(c2&63)<<6|c3&63),d+=3);return b}};
|
||||
if(typeof resizeImageContents=="undefined")var resizeImageContents=function(){};if(typeof activateOptionDisabled=="undefined")var activateOptionDisabled=function(){};objectExtend=jQuery.extend;function toggleDisplay(a){jQuery("#"+a).toggle()}function checkboxSelectAll(a,b,d){var c={};if(typeof a!="undefined")c.wrap=a;if(typeof d!="undefined")c.checked=d;XE.checkboxToggleAll(b,c)}function clickCheckBoxAll(a,b){var d={doClick:!0};if(typeof a!="undefined")d.wrap=a;XE.checkboxToggleAll(b,d)}
|
||||
function svc_folder_open(a){jQuery("#_folder_open_"+a).hide();jQuery("#_folder_close_"+a).show();jQuery("#_folder_"+a).show()}function svc_folder_close(a){jQuery("#_folder_open_"+a).show();jQuery("#_folder_close_"+a).hide();jQuery("#_folder_"+a).hide()}function open_calendar(a,b,d){typeof b=="undefined"&&(b="");var c="./common/tpl/calendar.php?";a&&(c+="fo_id="+a);b&&(c+="&day_str="+b);d&&(c+="&callback_func="+d);popopen(c,"Calendar")}var loaded_popup_menus=XE.loaded_popup_menus;
|
||||
function createPopupMenu(){}function chkPopupMenu(){}function displayPopupMenu(a,b,d){XE.displayPopupMenu(a,b,d)}function GetObjLeft(a){return jQuery(a).offset().left}function GetObjTop(a){return jQuery(a).offset().top}function replaceOuterHTML(a,b){jQuery(a).replaceWith(b)}function getOuterHTML(a){return jQuery(a).html().trim()}function setCookie(a,b,d,c){a=a+"="+escape(b)+(!d?"":"; expires="+d.toGMTString())+"; path="+(!c?"/":c);document.cookie=a}
|
||||
function is_def(a){return typeof a!="undefined"}function ucfirst(a){return a.charAt(0).toUpperCase()+a.slice(1)}
|
||||
function is_def(a){return typeof a!="undefined"}function ucfirst(a){return a.charAt(0).toUpperCase()+a.slice(1)}function xGetElementById(a){return document.getElementById(a)}
|
||||
jQuery(function(a){a(".lang_code").each(function(){var b=a(this),d=b.attr("id");typeof d=="undefined"&&(d=b.attr("name"));typeof d!="undefined"&&b.after("<a href='"+request_uri.setQuery("module","module").setQuery("act","dispModuleAdminLangcode").setQuery("target",d)+"' class='buttonSet buttonSetting' onclick='popopen(this.href);return false;'><span>find_langcode</span></a>")});a(document).click(function(b){var d=a("#popup_menu_area");d.length||(d=a('<div id="popup_menu_area" style="display:none;z-index:9999" />').appendTo(document.body));
|
||||
d.hide();d=a(b.target).filter("a,div,span");d.length||(d=d.parents("a,div,span").eq(0));if(d.length){var d=d.attr("class"),c;d&&(c=d.match(/(?:^| )((document|comment|member)_([1-9]\d*))(?: |$)/));if(c){d="get"+ucfirst(c[2])+"Menu";b={mid:current_mid,cur_mid:current_mid,menu_id:c[1],target_srl:c[3],cur_act:current_url.getQuery("act"),page_x:b.pageX,page_y:b.pageY};c="error message menus".split(" ");if(is_def(window.xeVid))b.vid=xeVid;if(is_def(XE.loaded_popup_menus[b.menu_id]))return XE.displayPopupMenu(b,
|
||||
c,b)&&!1;show_waiting_message=!1;exec_xml("member",d,b,XE.displayPopupMenu,c,b);show_waiting_message=!0;return!1}}})});var show_waiting_message=!0;
|
||||
function xml2json(a,b,d){var c={toObj:function(a){var b={};if(a.nodeType==1){if(d&&a.attributes.length)for(var f=0;f<a.attributes.length;f++)b["@"+a.attributes[f].nodeName]=(a.attributes[f].nodeValue||"").toString();if(a.firstChild){for(var k=f=0,l=!1,g=a.firstChild;g;g=g.nextSibling)g.nodeType==1?l=!0:g.nodeType==3&&g.nodeValue.match(/[^ \f\n\r\t\v]/)?f++:g.nodeType==4&&k++;if(l)if(f<2&&k<2){c.removeWhite(a);for(g=a.firstChild;g;g=g.nextSibling)g.nodeType==3?b=c.escape(g.nodeValue):g.nodeType==4?
|
||||
b=c.escape(g.nodeValue):b[g.nodeName]?b[g.nodeName]instanceof Array?b[g.nodeName][b[g.nodeName].length]=c.toObj(g):b[g.nodeName]=[b[g.nodeName],c.toObj(g)]:b[g.nodeName]=c.toObj(g)}else a.attributes.length?b["#text"]=c.escape(c.innerXml(a)):b=c.escape(c.innerXml(a));else if(f)a.attributes.length?b["#text"]=c.escape(c.innerXml(a)):b=c.escape(c.innerXml(a));else if(k)if(k>1)b=c.escape(c.innerXml(a));else for(g=a.firstChild;g;g=g.nextSibling)b=c.escape(g.nodeValue)}!a.attributes.length&&!a.firstChild&&
|
||||
(b=null)}else a.nodeType==9?b=c.toObj(a.documentElement):alert("unhandled node type: "+a.nodeType);return b},toJson:function(a,b,d){var f=b?'"'+b+'"':"";if(a instanceof Array){for(var l=0,g=a.length;l<g;l++)a[l]=c.toJson(a[l],"",d+"\t");f+=(b?":[":"[")+(a.length>1?"\n"+d+"\t"+a.join(",\n"+d+"\t")+"\n"+d:a.join(""))+"]"}else if(a==null)f+=(b&&":")+"null";else if(typeof a=="object"){l=[];for(g in a)l[l.length]=c.toJson(a[g],g,d+"\t");f+=(b?":{":"{")+(l.length>1?"\n"+d+"\t"+l.join(",\n"+d+"\t")+"\n"+
|
||||
d:l.join(""))+"}"}else f+=typeof a=="string"?(b&&":")+'"'+a.toString()+'"':(b&&":")+a.toString();return f},innerXml:function(a){var b="";if("innerHTML"in a)b=a.innerHTML;else for(var c=function(a){var b="";if(a.nodeType==1){b+="<"+a.nodeName;for(var d=0;d<a.attributes.length;d++)b+=" "+a.attributes[d].nodeName+'="'+(a.attributes[d].nodeValue||"").toString()+'"';if(a.firstChild){b+=">";for(d=a.firstChild;d;d=d.nextSibling)b+=c(d);b+="</"+a.nodeName+">"}else b+="/>"}else a.nodeType==3?b+=a.nodeValue:
|
||||
c,b)&&!1;show_waiting_message=!1;exec_xml("member",d,b,XE.displayPopupMenu,c,b);show_waiting_message=!0;return!1}}});a("a._xe_popup").click(function(){var b=a(this),d=b.attr("name"),b=b.attr("href");d||(d="_xe_popup_"+Math.floor(Math.random()*1E3));(d=window.open(b,d,"left=10,top=10,width=10,hegiht=10,resizable=no,scrollbars=no,toolbars=no"))&&d.focus();return!1})});var show_waiting_message=!0;
|
||||
function xml2json(a,b,d){var c={toObj:function(a){var b={};if(a.nodeType==1){if(d&&a.attributes.length)for(var g=0;g<a.attributes.length;g++)b["@"+a.attributes[g].nodeName]=(a.attributes[g].nodeValue||"").toString();if(a.firstChild){for(var l=g=0,m=!1,h=a.firstChild;h;h=h.nextSibling)h.nodeType==1?m=!0:h.nodeType==3&&h.nodeValue.match(/[^ \f\n\r\t\v]/)?g++:h.nodeType==4&&l++;if(m)if(g<2&&l<2){c.removeWhite(a);for(h=a.firstChild;h;h=h.nextSibling)h.nodeType==3?b=c.escape(h.nodeValue):h.nodeType==4?
|
||||
b=c.escape(h.nodeValue):b[h.nodeName]?b[h.nodeName]instanceof Array?b[h.nodeName][b[h.nodeName].length]=c.toObj(h):b[h.nodeName]=[b[h.nodeName],c.toObj(h)]:b[h.nodeName]=c.toObj(h)}else a.attributes.length?b["#text"]=c.escape(c.innerXml(a)):b=c.escape(c.innerXml(a));else if(g)a.attributes.length?b["#text"]=c.escape(c.innerXml(a)):b=c.escape(c.innerXml(a));else if(l)if(l>1)b=c.escape(c.innerXml(a));else for(h=a.firstChild;h;h=h.nextSibling)b=c.escape(h.nodeValue)}!a.attributes.length&&!a.firstChild&&
|
||||
(b=null)}else a.nodeType==9?b=c.toObj(a.documentElement):alert("unhandled node type: "+a.nodeType);return b},toJson:function(a,b,d){var g=b?'"'+b+'"':"";if(a instanceof Array){for(var m=0,h=a.length;m<h;m++)a[m]=c.toJson(a[m],"",d+"\t");g+=(b?":[":"[")+(a.length>1?"\n"+d+"\t"+a.join(",\n"+d+"\t")+"\n"+d:a.join(""))+"]"}else if(a==null)g+=(b&&":")+"null";else if(typeof a=="object"){m=[];for(h in a)m[m.length]=c.toJson(a[h],h,d+"\t");g+=(b?":{":"{")+(m.length>1?"\n"+d+"\t"+m.join(",\n"+d+"\t")+"\n"+
|
||||
d:m.join(""))+"}"}else g+=typeof a=="string"?(b&&":")+'"'+a.toString()+'"':(b&&":")+a.toString();return g},innerXml:function(a){var b="";if("innerHTML"in a)b=a.innerHTML;else for(var c=function(a){var b="";if(a.nodeType==1){b+="<"+a.nodeName;for(var d=0;d<a.attributes.length;d++)b+=" "+a.attributes[d].nodeName+'="'+(a.attributes[d].nodeValue||"").toString()+'"';if(a.firstChild){b+=">";for(d=a.firstChild;d;d=d.nextSibling)b+=c(d);b+="</"+a.nodeName+">"}else b+="/>"}else a.nodeType==3?b+=a.nodeValue:
|
||||
a.nodeType==4&&(b+="<![CDATA["+a.nodeValue+"]]\>");return b},a=a.firstChild;a;a=a.nextSibling)b+=c(a);return b},escape:function(a){return a.replace(/[\\]/g,"\\\\").replace(/[\"]/g,'\\"').replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r")},removeWhite:function(a){a.normalize();for(var b=a.firstChild;b;)if(b.nodeType==3)if(b.nodeValue.match(/[^ \f\n\r\t\v]/))b=b.nextSibling;else{var d=b.nextSibling;a.removeChild(b);b=d}else b.nodeType==1&&c.removeWhite(b),b=b.nextSibling;return a}};if(a.nodeType==9)a=a.documentElement;
|
||||
var f=c.toObj(c.removeWhite(a));typeof JSON=="object"&&jQuery.isFunction(JSON.stringify);a=c.toJson(f,a.nodeName,"");return"{"+(b?a.replace(/\t/g,b):a.replace(/\t|\n/g,""))+"}"}
|
||||
var g=c.toObj(c.removeWhite(a));typeof JSON=="object"&&jQuery.isFunction(JSON.stringify);a=c.toJson(g,a.nodeName,"");return"{"+(b?a.replace(/\t/g,b):a.replace(/\t|\n/g,""))+"}"}
|
||||
(function(a){function b(b,d){a("#xeTmpIframe").length||a('<iframe name="%id%" id="%id%" style="position:absolute;left:-1px;top:1px;width:1px;height:1px"></iframe>'.replace(/%id%/g,"xeTmpIframe")).appendTo(document.body);a("#xeVirtualForm").remove();var e=a('<form id="%id%"></form>'.replace(/%id%/g,"xeVirtualForm")).attr({id:"xeVirtualForm",method:"post",action:b,target:"xeTmpIframe"});d.xeVirtualRequestMethod="xml";d.xeRequestURI=location.href.replace(/#(.*)$/i,"");d.xeVirtualRequestUrl=request_uri;
|
||||
a.each(d,function(b,c){a('<input type="hidden">').attr("name",b).attr("value",c).appendTo(e)});e.appendTo(document.body).submit()}function d(a){var b={},d;for(d in a)a.hasOwnProperty(d)&&(b[d]=a[d]);return b}a.exec_xml=window.exec_xml=function(c,f,e,j,h,k,l){function g(b){var b=a(b).find("response")[0],d,e="",g=[],m={};d="";t.css("visibility","hidden");if(!b)return alert(s.responseText),null;d=xml2json(b,!1,!1);d=typeof JSON=="object"&&a.isFunction(JSON.parse)?JSON.parse(d):eval("("+d+")");d=d.response;
|
||||
if(typeof d=="undefined"){g.error=-1;g.message="Unexpected error occured.";try{if(typeof(e=b.childNodes[0].firstChild.data)!="undefined")g.message+="\r\n"+e}catch(o){}return g}a.each(h,function(a,b){m[b]=!0});m.redirect_url=!0;m.act=!0;a.each(d,function(a,b){m[a]&&(g[a]=b)});if(g.error!=0){if(a.isFunction(a.exec_xml.onerror))return a.exec_xml.onerror(c,f,g,j,h,k,l);alert(g.message||"error!");return null}if(g.redirect_url)return location.href=g.redirect_url.replace(/&/g,"&"),null;a.isFunction(j)&&
|
||||
j(g,h,k,l)}var m=request_uri+"index.php";e||(e={});a.isArray(e)&&(e=d(e));e.module=c;e.act=f;typeof xeVid!="undefined"&&(e.vid=xeVid);typeof h=="undefined"||h.length<1?h=["error","message"]:h.push("error","message");if(a.isArray(ssl_actions)&&e.act&&a.inArray(e.act,ssl_actions)>=0){var m=window.https_port||443,o=a("<a>").attr("href",default_url||request_uri)[0],r="https://"+o.hostname.replace(/:\d+$/,"");m!=443&&(r+=":"+m);o.pathname[0]!="/"&&(r+="/");r+=o.pathname;m=r.replace(/\/$/,"")+"/index.php"}o=
|
||||
a("<a>").attr("href",location.href)[0];r=a("<a>").attr("href",m)[0];if(o.protocol!=r.protocol||o.port!=r.port)return b(m,e);var n=[],p=0;n[p++]='<?xml version="1.0" encoding="utf-8" ?>';n[p++]="<methodCall>";n[p++]="<params>";a.each(e,function(a,b){n[p++]="<"+a+"><![CDATA["+b+"]]\></"+a+">"});n[p++]="</params>";n[p++]="</methodCall>";var s=null;s&&s.readyState!=0&&s.abort();try{a.ajax({url:m,type:"POST",dataType:"xml",data:n.join("\n"),contentType:"text/plain",beforeSend:function(a){s=a},success:g,
|
||||
error:function(a,b){t.css("visibility","hidden");var c="";if(b=="parsererror"){c="The result is not valid XML :\n-------------------------------------\n";if(a.responseText=="")return;c+=a.responseText.replace(/<[^>]+>/g,"")}else c=b;alert(c)}})}catch(q){alert(q);return}var t=a("#waitingforserverresponse");show_waiting_message&&t.length&&(e=a(document),t.html(waiting_message).css({top:e.scrollTop()+20+"px",left:e.scrollLeft()+20+"px",visibility:"visible"}))};a.exec_json=function(b,d,e){typeof d=="undefined"&&
|
||||
a.each(d,function(b,c){a('<input type="hidden">').attr("name",b).attr("value",c).appendTo(e)});e.appendTo(document.body).submit()}function d(a){var b={},d;for(d in a)a.hasOwnProperty(d)&&(b[d]=a[d]);return b}a.exec_xml=window.exec_xml=function(c,g,e,k,j,l,m){function h(b){var b=a(b).find("response")[0],d,e="",h=[],n={};d="";o.css("visibility","hidden");if(!b)return alert(q.responseText),null;d=xml2json(b,!1,!1);d=typeof JSON=="object"&&a.isFunction(JSON.parse)?JSON.parse(d):eval("("+d+")");d=d.response;
|
||||
if(typeof d=="undefined"){h.error=-1;h.message="Unexpected error occured.";try{if(typeof(e=b.childNodes[0].firstChild.data)!="undefined")h.message+="\r\n"+e}catch(r){}return h}a.each(j,function(a,b){n[b]=!0});n.redirect_url=!0;n.act=!0;a.each(d,function(a,b){n[a]&&(h[a]=b)});if(h.error!=0){if(a.isFunction(a.exec_xml.onerror))return a.exec_xml.onerror(c,g,h,k,j,l,m);alert(h.message||"error!");return null}if(h.redirect_url)return location.href=h.redirect_url.replace(/&/g,"&"),null;a.isFunction(k)&&
|
||||
k(h,j,l,m)}var n=request_uri+"index.php";e||(e={});a.isArray(e)&&(e=d(e));e.module=c;e.act=g;typeof xeVid!="undefined"&&(e.vid=xeVid);typeof j=="undefined"||j.length<1?j=["error","message"]:j.push("error","message");if(a.isArray(ssl_actions)&&e.act&&a.inArray(e.act,ssl_actions)>=0){var n=window.https_port||443,r=a("<a>").attr("href",default_url||request_uri)[0],w="https://"+r.hostname.replace(/:\d+$/,"");n!=443&&(w+=":"+n);r.pathname[0]!="/"&&(w+="/");w+=r.pathname;n=w.replace(/\/$/,"")+"/index.php"}r=
|
||||
a("<a>").attr("href",location.href)[0];w=a("<a>").attr("href",n)[0];if(r.protocol!=w.protocol||r.port!=w.port)return b(n,e);var t=[],p=0;t[p++]='<?xml version="1.0" encoding="utf-8" ?>';t[p++]="<methodCall>";t[p++]="<params>";a.each(e,function(a,b){t[p++]="<"+a+"><![CDATA["+b+"]]\></"+a+">"});t[p++]="</params>";t[p++]="</methodCall>";var q=null;q&&q.readyState!=0&&q.abort();try{a.ajax({url:n,type:"POST",dataType:"xml",data:t.join("\n"),contentType:"text/plain",beforeSend:function(a){q=a},success:h,
|
||||
error:function(a,b){o.css("visibility","hidden");var c="";if(b=="parsererror"){c="The result is not valid XML :\n-------------------------------------\n";if(a.responseText=="")return;c+=a.responseText.replace(/<[^>]+>/g,"")}else c=b;alert(c)}})}catch(s){alert(s);return}var o=a("#waitingforserverresponse");show_waiting_message&&o.length&&(e=a(document),o.html(waiting_message).css({top:e.scrollTop()+20+"px",left:e.scrollLeft()+20+"px",visibility:"visible"}))};a.exec_json=function(b,d,e){typeof d=="undefined"&&
|
||||
(d={});b=b.split(".");b.length==2&&(show_waiting_message&&a("#waitingforserverresponse").html(waiting_message).css("top",a(document).scrollTop()+20).css("left",a(document).scrollLeft()+20).css("visibility","visible"),a.extend(d,{module:b[0],act:b[1]}),typeof xeVid!="undefined"&&a.extend(d,{vid:xeVid}),a.ajax({type:"POST",dataType:"json",url:request_uri,contentType:"application/json",data:a.param(d),success:function(b){a("#waitingforserverresponse").css("visibility","hidden");b.error>0&&alert(b.message);
|
||||
a.isFunction(e)&&e(b)}}))};a.fn.exec_html=function(b,d,e,j,h){typeof d=="undefined"&&(d={});a.inArray(e,["html","append","prepend"])||(e="html");var k=a(this),b=b.split(".");b.length==2&&(show_waiting_message&&a("#waitingforserverresponse").html(waiting_message).css("top",a(document).scrollTop()+20).css("left",a(document).scrollLeft()+20).css("visibility","visible"),a.extend(d,{module:b[0],act:b[1]}),a.ajax({type:"POST",dataType:"html",url:request_uri,data:a.param(d),success:function(b){a("#waitingforserverresponse").css("visibility",
|
||||
"hidden");k[e](b);a.isFunction(j)&&j(h)}}))}})(jQuery);
|
||||
(function(a){function b(a){var b=[];return a.is(":radio")?a.filter(":checked").val():a.is(":checkbox")?(a.filter(":checked").each(function(){b.push(this.value)}),b.join("|@|")):a.val()}var d=[],c=[],f=[],e=[],j={},h=new (xe.createApp("Validator",{init:function(){var a=/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/;this.cast("ADD_RULE",["email",a]);this.cast("ADD_RULE",["email_address",a]);a=/^[a-z]+[\w-]*[a-z0-9_]+$/i;this.cast("ADD_RULE",["userid",a]);this.cast("ADD_RULE",["user_id",a]);a=/^(https?|ftp|mms):\/\/[0-9a-z-]+(\.[_0-9a-z-\/\~]+)+(:[0-9]{2,4})*$/;
|
||||
a.isFunction(e)&&e(b)}}))};a.fn.exec_html=function(b,d,e,k,j){typeof d=="undefined"&&(d={});a.inArray(e,["html","append","prepend"])||(e="html");var l=a(this),b=b.split(".");b.length==2&&(show_waiting_message&&a("#waitingforserverresponse").html(waiting_message).css("top",a(document).scrollTop()+20).css("left",a(document).scrollLeft()+20).css("visibility","visible"),a.extend(d,{module:b[0],act:b[1]}),a.ajax({type:"POST",dataType:"html",url:request_uri,data:a.param(d),success:function(b){a("#waitingforserverresponse").css("visibility",
|
||||
"hidden");l[e](b);a.isFunction(k)&&k(j)}}))}})(jQuery);
|
||||
(function(a){function b(a){var b=[];return a.is(":radio")?a.filter(":checked").val():a.is(":checkbox")?(a.filter(":checked").each(function(){b.push(this.value)}),b.join("|@|")):a.val()}var d=[],c=[],g=[],e=[],k={},j=new (xe.createApp("Validator",{init:function(){var a=/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/;this.cast("ADD_RULE",["email",a]);this.cast("ADD_RULE",["email_address",a]);a=/^[a-z]+[\w-]*[a-z0-9_]+$/i;this.cast("ADD_RULE",["userid",a]);this.cast("ADD_RULE",["user_id",a]);a=/^(https?|ftp|mms):\/\/[0-9a-z-]+(\.[_0-9a-z-\/\~]+)+(:[0-9]{2,4})*$/;
|
||||
this.cast("ADD_RULE",["url",a]);this.cast("ADD_RULE",["homepage",a]);this.cast("ADD_RULE",["korean",/^[\uac00-\ud7a3]*$/]);this.cast("ADD_RULE",["korean_number",/^[\uac00-\ud7a30-9]*$/]);this.cast("ADD_RULE",["alpha",/^[a-z]*$/i]);this.cast("ADD_RULE",["alpha_number",/^[a-z][a-z0-9_]*$/i]);this.cast("ADD_RULE",["number",/^[0-9]*$/])},run:function(a){var b="";if(a._filter)b=a._filter.value;a=this.cast("VALIDATE",[a,b]);typeof a=="undefined"&&(a=!1);return a},API_ONREADY:function(){var b=this;a("form").each(function(){if(this.onsubmit)this["xe:onsubmit"]=
|
||||
this.onsubmit,this.onsubmit=null}).submit(function(){var c=this["xe:onsubmit"];return a.isFunction(c)?c.apply(this):b.run(this)})},API_VALIDATE:function(c,d){var m=this,h=!0,k=d[0],n=null,p=null;if(k.elements._filter)n=k.elements._filter.value;if(!n)return!0;a.isFunction(e[n])&&(p=e[n]);n=a.extend({},f[n.toLowerCase()]||{},j);a.each(n,function(c){var d=k.elements[c];if(!d)return!0;var d=a(d),e=a.trim(b(d)),d=parseInt(this.minlength)||0,g=parseInt(this.maxlength)||0,f=(this.rule||"").split(",");if(this.required&&
|
||||
!e)return h=!!m.cast("ALERT",[k,c,"isnull"])&&!1;if(!this.required&&!e)return h=!0;if(d&&e.length<d||g&&e.length>g)return h=!!m.cast("ALERT",[k,c,"outofrange",d,g])&&!1;if(this.equalto&&b(a(k.elements[this.equalto]))!=e)return h=!!m.cast("ALERT",[k,c,"equalto"])&&!1;f&&a.each(f,function(a,b){if(!b)return!0;if(!m.cast("APPLY_RULE",[b,e]))return m.cast("ALERT",[k,c,"invalid_"+this]),h=!1});if(!h)return!1});if(!h)return!1;if(a.isFunction(p))return p(k);return!0},API_ADD_RULE:function(a,b){var d=b[0].toLowerCase();
|
||||
c[d]=b[1]},API_DEL_RULE:function(a,b){var d=b[0].toLowerCase();delete c[d]},API_GET_RULE:function(a,b){var d=b[0].toLowerCase();return c[d]?c[d]:null},API_ADD_FILTER:function(a,b){var c=b[0].toLowerCase();f[c]=b[1]},API_DEL_FILTER:function(a,b){var c=b[0].toLowerCase();delete f[c]},API_GET_FILTER:function(a,b){var c=b[0].toLowerCase();return f[c]?f[c]:null},API_ADD_EXTRA_FIELD:function(a,b){var c=b[0].toLowerCase();j[c]=b[1]},API_GET_EXTRA_FIELD:function(a,b){var c=b[0].toLowerCase();return j[c]},
|
||||
API_DEL_EXTRA_FIELD:function(a,b){var c=b[0].toLowerCase();delete j[c]},API_APPLY_RULE:function(b,d){var e=d[0],f=d[1];if(typeof c[e]=="undefined")return!0;if(a.isFunction(c[e]))return c[e](f);if(c[e]instanceof RegExp)return c[e].test(f);return!0},API_ALERT:function(b,c){var d=c[0],e=c[1],f=c[2],h=c[3],j=c[4],k=this.cast("GET_MESSAGE",[e]),q=this.cast("GET_MESSAGE",[f]);q!=f&&(q=q.indexOf("%s")<0?k+q:q.replace("%s",k));if(h||j)q+="("+(h||"")+"~"+(j||"")+")";this.cast("SHOW_ALERT",[q]);a(d.elements[e]).focus()},
|
||||
API_SHOW_ALERT:function(a,b){alert(b[0])},API_ADD_MESSAGE:function(a,b){d[b[0]]=b[1]},API_GET_MESSAGE:function(a,b){var c=b[0];return d[c]||c},API_ADD_CALLBACK:function(a,b){e[b[0]]=b[1]},API_REMOVE_CALLBACK:function(a,b){delete e[b[0]]}}));xe.registerApp(h);var k=xe.createPlugin("editor_stub",{API_BEFORE_VALIDATE:function(a,b){var c=b[0].getAttribute("editor_sequence");if(c&&typeof c=="object")c=c.value;if(c)try{editorRelKeys[c].content.value=editorRelKeys[c].func(c)||""}catch(d){}}});h.registerPlugin(new k)})(jQuery);
|
||||
this.onsubmit,this.onsubmit=null}).submit(function(){var c=this["xe:onsubmit"];return a.isFunction(c)?c.apply(this):b.run(this)})},API_VALIDATE:function(c,d){var n=!0,j=d[0],l=null,t=null,p,q,s,o,u,v,y,x;if(j.elements._filter)l=j.elements._filter.value;if(!l)return!0;a.isFunction(e[l])&&(t=e[l]);l=a.extend({},g[l.toLowerCase()]||{},k);for(p in l)if(l.hasOwnProperty(p)){f=l[p];q=(q=j.elements[p])?a.trim(b(a(q))):"";s=(f.modifier||"")+",";if(!q)if(f.required)return this.cast("ALERT",[j,p,"isnull"])&&
|
||||
!1;else continue;v=parseInt(f.minlength)||0;u=parseInt(f.maxlength)||0;x=/b$/.test(f.minlength||"");y=/b$/.test(f.maxlength||"");n=q.length;if(x||y)if(o=q,o+="",o.length){o=encodeURI(o);var z=o.split("%").length-1;o=o.length-z*2}else o=0;if(v&&v>(x?o:n)||u&&u<(y?o:n))return this.cast("ALERT",[j,p,"outofrange",v,u])&&!1;if(f.equalto&&(u=(n=j.elements[f.equalto])?a.trim(b(a(n))):"",n&&u!==q))return this.cast("ALERT",[j,p,"equalto"])&&!1;u=(f.rule||"").split(",");v=0;for(y=u.length;v<y;v++)if(x=u[v])if(n=
|
||||
this.cast("APPLY_RULE",[x,q]),s.indexOf("not,")>-1&&(n=!n),!n)return this.cast("ALERT",[j,p,"invalid_"+x])&&!1}if(a.isFunction(t))return t(j);return!0},API_ADD_RULE:function(a,b){var d=b[0].toLowerCase();c[d]=b[1]},API_DEL_RULE:function(a,b){var d=b[0].toLowerCase();delete c[d]},API_GET_RULE:function(a,b){var d=b[0].toLowerCase();return c[d]?c[d]:null},API_ADD_FILTER:function(a,b){var c=b[0].toLowerCase();g[c]=b[1]},API_DEL_FILTER:function(a,b){var c=b[0].toLowerCase();delete g[c]},API_GET_FILTER:function(a,
|
||||
b){var c=b[0].toLowerCase();return g[c]?g[c]:null},API_ADD_EXTRA_FIELD:function(a,b){var c=b[0].toLowerCase();k[c]=b[1]},API_GET_EXTRA_FIELD:function(a,b){var c=b[0].toLowerCase();return k[c]},API_DEL_EXTRA_FIELD:function(a,b){var c=b[0].toLowerCase();delete k[c]},API_APPLY_RULE:function(b,d){var e=d[0],g=d[1];if(typeof c[e]=="undefined")return!0;if(a.isFunction(c[e]))return c[e](g);if(c[e]instanceof RegExp)return c[e].test(g);if(a.isArray(c[e]))return a.inArray(g,c[e])>-1;return!0},API_ALERT:function(b,
|
||||
c){var d=c[0],e=c[1],g=c[2],j=c[3],k=c[4],l=this.cast("GET_MESSAGE",[e]),s=this.cast("GET_MESSAGE",[g]);s!=g&&(s=s.indexOf("%s")<0?l+s:s.replace("%s",l));if(j||k)s+="("+(j||"")+"~"+(k||"")+")";this.cast("SHOW_ALERT",[s]);a(d.elements[e]).focus()},API_SHOW_ALERT:function(a,b){alert(b[0])},API_ADD_MESSAGE:function(a,b){d[b[0]]=b[1]},API_GET_MESSAGE:function(a,b){var c=b[0];return d[c]||c},API_ADD_CALLBACK:function(a,b){e[b[0]]=b[1]},API_REMOVE_CALLBACK:function(a,b){delete e[b[0]]}}));xe.registerApp(j);
|
||||
var l=xe.createPlugin("editor_stub",{API_BEFORE_VALIDATE:function(a,b){var c=b[0].getAttribute("editor_sequence");if(c&&typeof c=="object")c=c.value;if(c)try{editorRelKeys[c].content.value=editorRelKeys[c].func(c)||""}catch(d){}}});j.registerPlugin(new l)})(jQuery);
|
||||
function filterAlertMessage(a){var b=a.message,d=a.act,a=a.redirect_url,c=location.href;typeof b!="undefined"&&b&&b!="success"&&alert(b);typeof d!="undefined"&&d?c=current_url.setQuery("act",d):typeof a!="undefined"&&a&&(c=a);c==location.href&&(c=c.replace(/#(.*)$/,""));location.href=c}function procFilter(a,b){b(a);return!1}
|
||||
function legacy_filter(a,b,d,c,f,e,j,h){var k=xe.getApp("Validator")[0],l=jQuery,g=[];if(!k)return!1;b.elements._filter||l(b).prepend('<input type="hidden" name="_filter" />');b.elements._filter.value=a;g[0]=a;g[1]=function(a){var g={},a=l(a).serializeArray();l.each(a,function(a,b){var c=l.trim(b.value),d=b.name;if(!c||!d)return!0;h[d]&&(d=h[d]);/\[\]$/.test(d)&&(d=d.replace(/\[\]$/,""));g[d]?g[d]+="|@|"+c:g[d]=b.value});if(j&&!confirm(j))return!1;exec_xml(d,c,g,f,e,g,b)};k.cast("ADD_CALLBACK",g);
|
||||
k.cast("VALIDATE",[b,a]);return!1};
|
||||
function legacy_filter(a,b,d,c,g,e,k,j){var l=xe.getApp("Validator")[0],m=jQuery,h=[];if(!l)return!1;b.elements._filter||m(b).prepend('<input type="hidden" name="_filter" />');b.elements._filter.value=a;h[0]=a;h[1]=function(a){var h={},a=m(a).serializeArray();m.each(a,function(a,b){var c=m.trim(b.value),d=b.name;if(!c||!d)return!0;j[d]&&(d=j[d]);/\[\]$/.test(d)&&(d=d.replace(/\[\]$/,""));h[d]?h[d]+="|@|"+c:h[d]=b.value});if(k&&!confirm(k))return!1;exec_xml(d,c,h,g,e,h,b)};l.cast("ADD_CALLBACK",h);
|
||||
l.cast("VALIDATE",[b,a]);return!1};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue