rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
"undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var Z=/^-?\d+(?:px)?$/i;this.px=function(a,b){a=w(a,b);if(a=="auto"||a==null)return 0;return Z.test(a)?parseFloat(a):0};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.pxself=function(a,b){a=a.style[b];if(a==
"undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var Z=/^-?\d+(?:px)?$/i;this.px=function(a,b){a=x(a,b);if(a=="auto"||a==null)return 0;return Z.test(a)?parseFloat(a):0};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.pxself=function(a,b){a=a.style[b];if(a==
"undefined"?a.charCode:0)>0||g.isIE?true:g.isOpera?a.keyCode==13||a.keyCode==27||a.keyCode>=32&&a.keyCode<125:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var Z=/^-?\d+(?:px)?$/i;this.px=function(a,b){a=w(a,b);if(a=="auto"||a==null)return 0;return Z.test(a)?parseFloat(a):0};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.pxself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.pctself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.IEwidth=function(a,b,f){if(a.parentNode){var k=a.parentNode.clientWidth-g.px(a,"marginLeft")-g.px(a,"marginRight")-g.px(a,"borderLeftWidth")-g.px(a,"borderRightWidth")-g.px(a.parentNode,"paddingLeft")-g.px(a.parentNode,
"undefined"?a.charCode:0)>0||h.isIE?true:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var X=/^-?\d+(?:px)?$/i;this.px=function(a,b){a=w(a,b);if(a=="auto"||a==null)return 0;return X.test(a)?parseFloat(a):0};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?h.isHidden(a):false}};this.pxself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/.exec(a))&& a.length==2?a[1]:"0")?parseFloat(a):0};this.pctself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.IEwidth=function(a,b,e){if(a.parentNode){var k=a.parentNode.clientWidth-h.px(a,"marginLeft")-h.px(a,"marginRight")-h.px(a,"borderLeftWidth")-h.px(a,"borderRightWidth")-h.px(a.parentNode,"paddingLeft")-h.px(a.parentNode,"paddingRight"),i=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(b);b=(i=i&&i.length==
"undefined"?a.charCode:0)>0||g.isIE?true:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var X=/^-?\d+(?:px)?$/i;this.px=function(a,b){a=v(a,b);if(a=="auto"||a==null)return 0;return X.test(a)?parseFloat(a):0};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.pxself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/.exec(a))&& a.length==2?a[1]:"0")?parseFloat(a):0};this.pctself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.IEwidth=function(a,b,e){if(a.parentNode){var j=a.parentNode.clientWidth-g.px(a,"marginLeft")-g.px(a,"marginRight")-g.px(a,"borderLeftWidth")-g.px(a,"borderRightWidth")-g.px(a.parentNode,"paddingLeft")-g.px(a.parentNode,"paddingRight"),i=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(b);b=(i=i&&i.length==
"undefined"?a.charCode:0)>0||h.isIE?true:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var X=/^-?\d+(?:px)?$/i;this.px=function(a,b){a=w(a,b);if(a=="auto"||a==null)return 0;return X.test(a)?parseFloat(a):0};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?h.isHidden(a):false}};this.pxself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.pctself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.IEwidth=function(a,b,e){if(a.parentNode){var k=a.parentNode.clientWidth-h.px(a,"marginLeft")-h.px(a,"marginRight")-h.px(a,"borderLeftWidth")-h.px(a,"borderRightWidth")-h.px(a.parentNode,"paddingLeft")-h.px(a.parentNode,"paddingRight"),i=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(b);b=(i=i&&i.length==
if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var Z=/^-?\d+(?:px)?$/i;this.px=function(a,b){a=w(a,b);if(a=="auto"||a==null)return 0;return Z.test(a)?parseFloat(a):0};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.pxself=function(a,b){a=a.style[b]; if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.pctself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.IEwidth=function(a,b,f){if(a.parentNode){var h=a.parentNode.clientWidth-g.px(a,"marginLeft")-g.px(a,"marginRight")-g.px(a,"borderLeftWidth")-g.px(a,"borderRightWidth")-g.px(a.parentNode,"paddingLeft")-g.px(a.parentNode,
function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.pxself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.pctself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.IEwidth=function(a,b,f){if(a.parentNode){var h=
if(a.altKey||a.ctrlKey||a.metaKey)return false;return(typeof a.charCode!=="undefined"?a.charCode:0)>0||g.isIE?true:a.keyCode==13||a.keyCode==27||a.keyCode==32||a.keyCode>46&&a.keyCode<112};var Z=/^-?\d+(?:px)?$/i;this.px=function(a,b){a=w(a,b);if(a=="auto"||a==null)return 0;return Z.test(a)?parseFloat(a):0};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?g.isHidden(a):false}};this.pxself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.pctself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.IEwidth=function(a,b,f){if(a.parentNode){var h=a.parentNode.clientWidth-g.px(a,"marginLeft")-g.px(a,"marginRight")-g.px(a,"borderLeftWidth")-g.px(a,"borderRightWidth")-g.px(a.parentNode,"paddingLeft")-g.px(a.parentNode,
2?a[1]:"0")?parseFloat(f):0};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?k.isHidden(a):false}};this.pxself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.pctself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):
"none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?k.isHidden(a):false}};this.pxself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.pctself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.IEwidth=function(a,b,f){if(a.parentNode){var m=a.parentNode.clientWidth-
2?a[1]:"0")?parseFloat(f):0};this.isHidden=function(a){if(a.style.display=="none")return true;else{a=a.parentNode;return a!=null&&a.tagName.toLowerCase()!="body"?k.isHidden(a):false}};this.pxself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*px\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):0};this.pctself=function(a,b){a=a.style[b];if(a=="auto"||a==null)return 0;return(a=(a=/^\s*(-?\d+(?:\.\d+)?)\s*\%\s*$/.exec(a))&&a.length==2?a[1]:"0")?parseFloat(a):
a.getElement(s).dirty=true;window.onresize()}function g(){var e,k=0;for(e=0;;++e){var m=b(e);if(m)k+=a.pctself(m,"width");else break}if(k!=0)for(e=0;;++e)if(m=b(e)){var n=a.pctself(m,"width");if(n)m.style.width=n*100/k+"%"}else break}function q(e,k,m){e=b(k);var n=p(e,k),r=b(k+1),u=p(r,k+1);if(a.pctself(e,"width")>0&&a.pctself(r,"width")>0){e.style.width="";g()}a.pctself(e,"width")==0&&c(k,n+m);a.pctself(r,"width")==0&&c(k+1,u-m);window.onresize()}var d=this,b=d.getColumn,l=a.getElement(s);if(l)if(!d.resizeInitialized){var t=
a.getElement(s).dirty=true;window.onresize()}function h(){var e,k=0;for(e=0;;++e){var m=c(e);if(m)k+=a.pctself(m,"width");else break}if(k!=0)for(e=0;;++e)if(m=c(e)){var n=a.pctself(m,"width");if(n)m.style.width=n*100/k+"%"}else break}function q(e,k,m){e=c(k);var n=o(e,k),r=c(k+1),u=o(r,k+1);if(a.pctself(e,"width")>0&&a.pctself(r,"width")>0){e.style.width="";h()}a.pctself(e,"width")==0&&b(k,n+m);a.pctself(r,"width")==0&&b(k+1,u-m);window.onresize()}var d=this,c=d.getColumn,l=a.getElement(s);if(l)if(!d.resizeInitialized){var t=
a.getElement(s).dirty=true;window.onresize()}function g(){var e,k=0;for(e=0;;++e){var m=b(e);if(m)k+=a.pctself(m,"width");else break}if(k!=0)for(e=0;;++e)if(m=b(e)){var n=a.pctself(m,"width");if(n)m.style.width=n*100/k+"%"}else break}function q(e,k,m){e=b(k);var n=p(e,k),r=b(k+1),u=p(r,k+1);if(a.pctself(e,"width")>0&&a.pctself(r,"width")>0){e.style.width="";g()}a.pctself(e,"width")==0&&c(k,n+m);a.pctself(r,"width")==0&&c(k+1,u-m);window.onresize()}var d=this,b=d.getColumn,l=a.getElement(s);if(l)if(!d.resizeInitialized){var t=
a.getElement(s).dirty=true;window.onresize()}function f(){var e,k=0;for(e=0;;++e){var m=b(e);if(m)k+=a.pctself(m,"width");else break}if(k!=0)for(e=0;;++e)if(m=b(e)){var n=a.pctself(m,"width");if(n)m.style.width=n*100/k+"%"}else break}function q(e,k,m){e=b(k);var n=p(e,k),r=b(k+1),u=p(r,k+1);if(a.pctself(e,"width")>0&&a.pctself(r,"width")>0){e.style.width="";f()}a.pctself(e,"width")==0&&c(k,n+m);a.pctself(r,"width")==0&&c(k+1,u-m);window.onresize()}var d=this,b=d.getColumn,l=a.getElement(s);if(l)if(!d.resizeInitialized){var t=
a.getElement(s).dirty=true;window.onresize()}function g(){var e,k=0;for(e=0;;++e){var m=b(e);if(m)k+=a.pctself(m,"width");else break}if(k!=0)for(e=0;;++e)if(m=b(e)){var n=a.pctself(m,"width");if(n)m.style.width=n*100/k+"%"}else break}function q(e,k,m){e=b(k);var n=p(e,k),r=b(k+1),u=p(r,k+1);if(a.pctself(e,"width")>0&&a.pctself(r,"width")>0){e.style.width="";g()}a.pctself(e,"width")==0&&c(k,n+m);a.pctself(r,"width")==0&&c(k+1,u-m);window.onresize()}var d=this,b=d.getColumn,l=a.getElement(s);if(l)if(!d.resizeInitialized){var t=
a.getElement(s).dirty=true;window.onresize()}function f(){var e,k=0;for(e=0;;++e){var m=b(e);if(m)k+=a.pctself(m,"width");else break}if(k!=0)for(e=0;;++e)if(m=b(e)){var n=a.pctself(m,"width");if(n)m.style.width=n*100/k+"%"}else break}function q(e,k,m){e=b(k);var n=p(e,k),r=b(k+1),u=p(r,k+1);if(a.pctself(e,"width")>0&&a.pctself(r,"width")>0){e.style.width="";f()}a.pctself(e,"width")==0&&c(k,n+m);a.pctself(r,"width")==0&&c(k+1,u-m);window.onresize()}var d=this,b=d.getColumn,l=a.getElement(s);if(l)if(!d.resizeInitialized){var t=
ia>g.updateDelay){clearTimeout(S);s()}}function q(d){ea=d;E._p_.comm.responseReceived(d)}function s(){S=null;if(R){if(!ja){if(confirm("The application was quited, do you want to restart?"))document.location=document.location;ja=true}}else{var d,c,f,k="&rand="+Math.round(Math.random(ka)*1E5);if(z.length>0){d=h();c=d.feedback?setTimeout(b,_$_INDICATOR_TIMEOUT_$_):null;f=false}else{d={result:"signal=poll"};c=null;f=true}K=E._p_.comm.sendUpdate(la+k,"request=jsupdate&"+d.result+"&ackId="+ea,c,ea,-1);
ia>g.updateDelay){clearTimeout(S);s()}}function q(d){ea=d;E._p_.comm.responseReceived(d)}function s(){if(!J){S=null;if(R){if(!ja){if(confirm("The application was quited, do you want to restart?"))document.location=document.location;ja=true}}else{var d,c,f,k="&rand="+Math.round(Math.random(ka)*1E5);if(z.length>0){d=h();c=d.feedback?setTimeout(b,_$_INDICATOR_TIMEOUT_$_):null;f=false}else{d={result:"&signal=poll"};c=null;f=true}J=E._p_.comm.sendUpdate(la+k,"request=jsupdate"+d.result+"&ackId="+ea,c,
ia>g.updateDelay){clearTimeout(S);s()}}function q(d){ea=d;E._p_.comm.responseReceived(d)}function s(){S=null;if(R){if(!ja){if(confirm("The application was quited, do you want to restart?"))document.location=document.location;ja=true}}else{var d,c,f,k="&rand="+Math.round(Math.random(ka)*1E5);if(z.length>0){d=h();c=d.feedback?setTimeout(b,_$_INDICATOR_TIMEOUT_$_):null;f=false}else{d={result:"signal=poll"};c=null;f=true}K=E._p_.comm.sendUpdate(la+k,"request=jsupdate&"+d.result+"&ackId="+ea,c,ea,-1);
setTimeout(i.tm,c);else{i.timer=null;i.tm=null}i.onclick&&i.onclick()}},m=g.getElement(d);m.timer=setTimeout(k,c);m.tm=k}function J(d,c){setTimeout(function(){if(T[d]===true)c();else T[d]=c},20)}function F(d){if(T[d]!==true){typeof T[d]!=="undefined"&&T[d]();T[d]=true}}function Q(d,c,f){function k(){var t=f===undefined?2:f;if(t>1)Q(d,c,t-1);else{alert("Fatal error: failed loading "+d);P()}}var m=false;if(c!="")try{m=!eval("typeof "+c+" === 'undefined'")}catch(i){m=false}if(m)F(d);else{var o=document.createElement("script");
setTimeout(i.tm,c);else{i.timer=null;i.tm=null}i.onclick&&i.onclick()}},m=g.getElement(d);m.timer=setTimeout(k,c);m.tm=k}function K(d,c){setTimeout(function(){if(T[d]===true)c();else T[d]=c},20)}function F(d){if(T[d]!==true){typeof T[d]!=="undefined"&&T[d]();T[d]=true}}function Q(d,c,f){function k(){var t=f===undefined?2:f;if(t>1)Q(d,c,t-1);else{alert("Fatal error: failed loading "+d);P()}}var m=false;if(c!="")try{m=!eval("typeof "+c+" === 'undefined'")}catch(i){m=false}if(m)F(d);else{var o=document.createElement("script");
setTimeout(i.tm,c);else{i.timer=null;i.tm=null}i.onclick&&i.onclick()}},m=g.getElement(d);m.timer=setTimeout(k,c);m.tm=k}function J(d,c){setTimeout(function(){if(T[d]===true)c();else T[d]=c},20)}function F(d){if(T[d]!==true){typeof T[d]!=="undefined"&&T[d]();T[d]=true}}function Q(d,c,f){function k(){var t=f===undefined?2:f;if(t>1)Q(d,c,t-1);else{alert("Fatal error: failed loading "+d);P()}}var m=false;if(c!="")try{m=!eval("typeof "+c+" === 'undefined'")}catch(i){m=false}if(m)F(d);else{var o=document.createElement("script");o.setAttribute("src",d);o.onload=function(){F(d)};o.onerror=k;o.onreadystatechange=function(){if(o.readyState=="loaded")k();else o.readyState=="complete"&&F(d)};document.getElementsByTagName("head")[0].appendChild(o)}}function D(d,c){this.callback=c;this.work=d.length;this.images=[];if(d.length==0)c(this.images);else for(c=0;c<d.length;c++)this.preload(d[c])}function L(d){if(d.ieAlternativeExecuted)return"0";E.emit(d.parentNode,"IeAltnernative");d.style.width="";d.ieAlternativeExecuted=true;return"0"}
if(!F){_$_$endif_$_();var m={},i=y.length;m.object=c;m.signal=d;m.event=e;m.feedback=j;y[i]=g(m,i);q();n();_$_$if_STRICTLY_SERIALIZED_EVENTS_$_()}_$_$endif_$_()}function q(){_$_$if_WEB_SOCKETS_$_();if(I.state!=2)if(window.WebSocket===undefined)I.state=2;else{var c=I.socket;if(c==null||c.readyState>1)if(c!=null&&I.state==0)I.state=2;else{c=ha.substr(ha.indexOf("?"));c="ws"+location.protocol.substr(4)+" function(d){I.state=1;o(0,d.data,null)}}if(c.readyState==1){r();return}}_$_$endif_$_();if(F!=null&&O!=null){clearTimeout(O);F.abort();F=null}if(F==null)if(S==null){S=setTimeout(function(){r()},h.updateDelay);la=(new Date).getTime()}else if(ba){clearTimeout(S);r()}else if((new Date).getTime()-la>h.updateDelay){clearTimeout(S);r()}}function B(c){fa=c;k._p_.comm.responseReceived(c)}function r(){if(!F){S=null;if(R){if(!ma){if(confirm("The application was quited, do you want to restart?"))document.location=
P=F=null;R||r()}function u(c,d,e,j){h.checkReleaseCapture(c,e);_$_$if_STRICTLY_SERIALIZED_EVENTS_$_();if(!F){_$_$endif_$_();var m={},i=y.length;m.object=c;m.signal=d;m.event=e;m.feedback=j;y[i]=g(m,i);q();n();_$_$if_STRICTLY_SERIALIZED_EVENTS_$_()}_$_$endif_$_()}function q(){_$_$if_WEB_SOCKETS_$_();if(I.state!=2)if(typeof window.WebSocket==="undefined")I.state=2;else{var c=I.socket;if(c==null||c.readyState>1)if(c!=null&&I.state==0)I.state=2;else{c=ha.substr(ha.indexOf("?"));c="ws"+location.protocol.substr(4)+ "
if(!F){_$_$endif_$_();var m={},i=y.length;m.object=c;m.signal=d;m.event=e;m.feedback=j;y[i]=g(m,i);q();n();_$_$if_STRICTLY_SERIALIZED_EVENTS_$_()}_$_$endif_$_()}function q(){_$_$if_WEB_SOCKETS_$_();if(I.state!=2)if(window.WebSocket===undefined)I.state=2;else{var c=I.socket;if(c==null||c.readyState>1)if(c!=null&&I.state==0)I.state=2;else{c=ha.substr(ha.indexOf("?"));c="ws"+location.protocol.substr(4)+"//"+location.hostname+":"+location.port+location.pathname+c;I.socket=c=new WebSocket(c);c.onmessage=function(d){I.state=1;o(0,d.data,null)}}if(c.readyState==1){r();return}}_$_$endif_$_();if(F!=null&&O!=null){clearTimeout(O);F.abort();F=null}if(F==null)if(S==null){S=setTimeout(function(){r()},h.updateDelay);la=(new Date).getTime()}else if(ba){clearTimeout(S);r()}else if((new Date).getTime()-la>h.updateDelay){clearTimeout(S);r()}}function B(c){fa=c;k._p_.comm.responseReceived(c)}function r(){if(!F){S=null;if(R){if(!ma){if(confirm("The application was quited, do you want to restart?"))document.location=
WT_DECLARE_WT_MEMBER(1,"WTableView",function(n,j,f,p){function q(a){var b=-1,c=false,d=false,k=null;for(a=a.target||a.srcElement;a;){var g=$(a);if(g.hasClass("Wt-tv-contents"))break;else if(g.hasClass("Wt-tv-c")){if(a.getAttribute("drop")==="true")d=true;if(g.hasClass("Wt-selected"))c=true;k=a;a=a.parentNode;b=a.className.split(" ")[0].substring(7)*1;break}a=a.parentNode}return{columnId:b,rowIdx:-1,selected:c,drop:d,el:k}}function r(a){var b,c,d=a.parentNode.childNodes;b=0;for(c=d.length;b<c;++b)if(d[b]==
WT_DECLARE_WT_MEMBER(1,"WTableView",function(n,h,f,p){function q(a){var b=-1,c=false,d=false,k=null;for(a=a.target||a.srcElement;a;){var g=$(a);if(g.hasClass("Wt-tv-contents"))break;else if(g.hasClass("Wt-tv-c")){if(a.getAttribute("drop")==="true")d=true;if(g.hasClass("Wt-selected"))c=true;k=a;a=a.parentNode;b=a.className.split(" ")[0].substring(7)*1;break}a=a.parentNode}return{columnId:b,rowIdx:-1,selected:c,drop:d,el:k}}function r(a){var b,c,d=a.parentNode.childNodes;b=0;for(c=d.length;b<c;++b)if(d[b]==
WT_DECLARE_WT_MEMBER(1,"WTableView",function(n,j,f,p){function q(a){var b=-1,c=false,d=false,k=null;for(a=a.target||a.srcElement;a;){var g=$(a);if(g.hasClass("Wt-tv-contents"))break;else if(g.hasClass("Wt-tv-c")){if(a.getAttribute("drop")==="true")d=true;if(g.hasClass("Wt-selected"))c=true;k=a;a=a.parentNode;b=a.className.split(" ")[0].substring(7)*1;break}a=a.parentNode}return{columnId:b,rowIdx:-1,selected:c,drop:d,el:k}}function r(a){var b,c,d=a.parentNode.childNodes;b=0;for(c=d.length;b<c;++b)if(d[b]==
null){try{aa()}catch(c){}aa=null}}function K(){document.body.style.cursor="wait";aa=hideLoadingIndicator;showLoadingIndicator()}function u(d){ga=d}function q(d){if(d)window.execScript?window.execScript(d):window.eval(d);_$_APP_CLASS_$_._p_.autoJavaScript()}function D(d,c,f){if(!Q){if(d==0){_$_$ifnot_DEBUG_$_();try{_$_$endif_$_();q(c);_$_$ifnot_DEBUG_$_()}catch(j){alert("Wt internal error: "+j+", code: "+j.code+", description: "+j.description)}_$_$endif_$_();f&&n(f)}else z=ca.concat(z);ca=[];if(O){clearTimeout(O);
d}function q(d){if(d)window.execScript?window.execScript(d):window.eval(d);_$_APP_CLASS_$_._p_.autoJavaScript()}function C(d,c,f){if(!P){if(d==0){_$_$ifnot_DEBUG_$_();try{_$_$endif_$_();q(c);_$_$ifnot_DEBUG_$_()}catch(k){alert("Wt internal error: "+k+", code: "+k.code+", description: "+k.description)}_$_$endif_$_();f&&n(f)}else y=ba.concat(y);ba=[];if(N){clearTimeout(N);N=null}I=null;if(d>0)++W;else W=0;if(!P)if(ga||y.length>0)if(d==1){d=Math.min(12E4,Math.exp(W)*500);Q=setTimeout(function(){F()},
null){try{aa()}catch(c){}aa=null}}function K(){document.body.style.cursor="wait";aa=hideLoadingIndicator;showLoadingIndicator()}function u(d){ga=d}function q(d){if(d)window.execScript?window.execScript(d):window.eval(d);_$_APP_CLASS_$_._p_.autoJavaScript()}function D(d,c,f){if(!Q){if(d==0){_$_$ifnot_DEBUG_$_();try{_$_$endif_$_();q(c);_$_$ifnot_DEBUG_$_()}catch(j){alert("Wt internal error: "+j+", code: "+j.code+", description: "+j.description)}_$_$endif_$_();f&&n(f)}else z=ca.concat(z);ca=[];if(O){clearTimeout(O);
showLoadingIndicator()}function E(d){ea=d}function q(d){if(d)if(window.execScript)window.execScript(d);else with(window)eval(d);_$_APP_CLASS_$_._p_.autoJavaScript()}function u(d,c,e){if(!ba){if(d==0){_$_$ifnot_DEBUG_$_();try{_$_$endif_$_();q(c);_$_$ifnot_DEBUG_$_()}catch(h){alert("Wt internal error: "+h+", code: "+h.code+", description: "+h.description)}_$_$endif_$_();e&&l(e)}else z=Z.concat(z);Z=[];if(M){clearTimeout(M);M=null}G=null;if(d>0)++T;else T=0;if(ea||z.length>0)if(d==1){d=Math.min(12E4,
showLoadingIndicator()}function E(d){ea=d}function q(d){if(d)window.execScript?window.execScript(d):window.eval(d);_$_APP_CLASS_$_._p_.autoJavaScript()}function u(d,c,e){if(!ba){if(d==0){_$_$ifnot_DEBUG_$_();try{_$_$endif_$_();q(c);_$_$ifnot_DEBUG_$_()}catch(h){alert("Wt internal error: "+h+", code: "+h.code+", description: "+h.description)}_$_$endif_$_();e&&l(e)}else z=Z.concat(z);Z=[];if(M){clearTimeout(M);M=null}G=null;if(d>0)++T;else T=0;if(ea||z.length>0)if(d==1){d=Math.min(12E4,Math.exp(T)*
showLoadingIndicator()}function E(d){ea=d}function q(d){if(d)if(window.execScript)window.execScript(d);else with(window)eval(d);_$_APP_CLASS_$_._p_.autoJavaScript()}function u(d,c,e){if(!ba){if(d==0){_$_$ifnot_DEBUG_$_();try{_$_$endif_$_();q(c);_$_$ifnot_DEBUG_$_()}catch(h){alert("Wt internal error: "+h+", code: "+h.code+", description: "+h.description)}_$_$endif_$_();e&&l(e)}else z=Z.concat(z);Z=[];if(M){clearTimeout(M);M=null}G=null;if(d>0)++T;else T=0;if(ea||z.length>0)if(d==1){d=Math.min(12E4,
C.abort();C=null}if(C==null)if(M==null){M=setTimeout(function(){q()},p.updateDelay);da=(new Date).getTime()}else if(S){clearTimeout(M);q()}else if((new Date).getTime()-da>p.updateDelay){clearTimeout(M);q()}}function o(c){Y=c;ea._p_.comm.responseReceived(c)}function q(){M=null;if(p.isIEMobile)feedback=false;if(X){if(!fa){if(confirm("The application was quited, do you want to restart?"))document.location=document.location;fa=true}}else{var c,d,e,g="&rand="+Math.round(Math.random(ga)*1E5);if(v.length> 0){c=t();d=c.feedback?setTimeout(B,_$_INDICATOR_TIMEOUT_$_):null;e=false}else{c={result:"signal=poll"};d=null;e=true}C=ea._p_.comm.sendUpdate(ha+g,"request=jsupdate&"+c.result+"&ackId="+Y,d,Y,-1);K=e?setTimeout(y,_$_SERVER_PUSH_TIMEOUT_$_):null}}function w(c,d){var e={},g=v.length;e.signal="user";e.id=typeof c==="string"?c:c==_$_APP_CLASS_$_?"app":c.id;if(typeof d==="object"){e.name=d.name;e.object=d.eventObject;e.event=d.event}else{e.name=d;e.object=e.event=null}e.args=[];for(var h=2;h<arguments.length;++h){var i=
function j(){if(C!=null&&K!=null){clearTimeout(K);C.abort();C=null}if(C==null)if(M==null){M=setTimeout(function(){q()},p.updateDelay);da=(new Date).getTime()}else if(S){clearTimeout(M);q()}else if((new Date).getTime()-da>p.updateDelay){clearTimeout(M);q()}}function o(c){Y=c;ea._p_.comm.responseReceived(c)}function q(){M=null;if(p.isIEMobile)feedback=false;if(X){if(!fa){if(confirm("The application was quited, do you want to restart?"))document.location=document.location;fa=true}}else{var c,d,e,g="&rand="+ Math.round(Math.random(ga)*1E5);if(v.length>0){c=t();d=c.feedback?setTimeout(B,_$_INDICATOR_TIMEOUT_$_):null;e=false}else{c={result:"signal=poll"};d=null;e=true}C=ea._p_.comm.sendUpdate(ha+g,"request=jsupdate&"+c.result+"&ackId="+Y,d,Y,-1);K=e?setTimeout(y,_$_SERVER_PUSH_TIMEOUT_$_):null}}function w(c,d){var e={},g=v.length;e.signal="user";e.id=typeof c==="string"?c:c==_$_APP_CLASS_$_?"app":c.id;if(typeof d==="object"){e.name=d.name;e.object=d.eventObject;e.event=d.event}else{e.name=d;e.object=e.event=
C.abort();C=null}if(C==null)if(M==null){M=setTimeout(function(){q()},p.updateDelay);da=(new Date).getTime()}else if(S){clearTimeout(M);q()}else if((new Date).getTime()-da>p.updateDelay){clearTimeout(M);q()}}function o(c){Y=c;ea._p_.comm.responseReceived(c)}function q(){M=null;if(p.isIEMobile)feedback=false;if(X){if(!fa){if(confirm("The application was quited, do you want to restart?"))document.location=document.location;fa=true}}else{var c,d,e,g="&rand="+Math.round(Math.random(ga)*1E5);if(v.length>0){c=t();d=c.feedback?setTimeout(B,_$_INDICATOR_TIMEOUT_$_):null;e=false}else{c={result:"signal=poll"};d=null;e=true}C=ea._p_.comm.sendUpdate(ha+g,"request=jsupdate&"+c.result+"&ackId="+Y,d,Y,-1);K=e?setTimeout(y,_$_SERVER_PUSH_TIMEOUT_$_):null}}function w(c,d){var e={},g=v.length;e.signal="user";e.id=typeof c==="string"?c:c==_$_APP_CLASS_$_?"app":c.id;if(typeof d==="object"){e.name=d.name;e.object=d.eventObject;e.event=d.event}else{e.name=d;e.object=e.event=null}e.args=[];for(var h=2;h<arguments.length;++h){var i=
f.length;o<s;o++){i=f[o];e+="<Value>"+C(i)+"</Value>"}else e+=C(f);e+="</"+g+">"}e+="\n"+c+" </"+b+">"}e+="\n"+c+"</"+a+">";return e}var E="RequestType";function Q(a){var b="",d=a.method;b+="\n<"+n+":Envelope "+F+" "+x+">\n <"+n+":Body>\n <"+d+" "+G+" "+x+">";var c=null;switch(d){case Xmla.METHOD_DISCOVER:if(j(a.requestType))c=Xmla.Exception._newError("MISSING_REQUEST_TYPE","Xmla._getXmlaSoapMessage",a);else b+="\n <"+E+">"+a.requestType+"</"+E+">"+u("Restrictions","RestrictionList",a.restrictions, " ")+u("Properties","PropertyList",a.properties," ");break;case Xmla.METHOD_EXECUTE:if(j(a.statement))c=Xmla.Exception._newError("MISSING_REQUEST_TYPE","Xmla._getXmlaSoapMessage",a);else b+="\n <Command>\n <Statement>"+a.statement+"</Statement>\n </Command>"+u("Properties","PropertyList",a.properties," ");break;default:}c!==null&&c._throw();b+="\n </"+d+">\n </"+n+":Body>\n</"+n+":Envelope>";return b}function h(a,b,d){if(b&&!a)a={};for(var c in b)if(b.hasOwnProperty(c))if(d||j(a[c]))a[c]=
d[i];k+="\n"+c+" <"+i+">";if(typeof n==="array"){h=0;for(e=n.length;h<e;h+=1){f=n[h];k+="<Value>"+B(f)+"</Value>"}}else k+=B(n);k+="</"+i+">"}k+="\n"+c+" </"+b+">"}k+="\n"+c+"</"+a+">";return k}var D="RequestType";function Q(a){var b="",d=a.method,c=null;b+="\n<"+p+":Envelope "+E+" "+w+">\n <"+p+":Body>\n <"+d+" "+F+" "+w+">";switch(d){case Xmla.METHOD_DISCOVER:if(j(a.requestType))c=Xmla.Exception._newError("MISSING_REQUEST_TYPE","Xmla._getXmlaSoapMessage",a);else b+="\n <"+D+">"+a.requestType+ "</"+D+">"+t("Restrictions","RestrictionList",a.restrictions," ")+t("Properties","PropertyList",a.properties," ");break;case Xmla.METHOD_EXECUTE:if(j(a.statement))c=Xmla.Exception._newError("MISSING_REQUEST_TYPE","Xmla._getXmlaSoapMessage",a);else b+="\n <Command>\n <Statement>"+a.statement+"</Statement>\n </Command>"+t("Properties","PropertyList",a.properties," ");break;default:}c!==null&&c._throw();b+="\n </"+d+">\n </"+p+":Body>\n</"+p+":Envelope>";return b}function g(a,b,d){if(b&&
f.length;o<s;o++){i=f[o];e+="<Value>"+C(i)+"</Value>"}else e+=C(f);e+="</"+g+">"}e+="\n"+c+" </"+b+">"}e+="\n"+c+"</"+a+">";return e}var E="RequestType";function Q(a){var b="",d=a.method;b+="\n<"+n+":Envelope "+F+" "+x+">\n <"+n+":Body>\n <"+d+" "+G+" "+x+">";var c=null;switch(d){case Xmla.METHOD_DISCOVER:if(j(a.requestType))c=Xmla.Exception._newError("MISSING_REQUEST_TYPE","Xmla._getXmlaSoapMessage",a);else b+="\n <"+E+">"+a.requestType+"</"+E+">"+u("Restrictions","RestrictionList",a.restrictions," ")+u("Properties","PropertyList",a.properties," ");break;case Xmla.METHOD_EXECUTE:if(j(a.statement))c=Xmla.Exception._newError("MISSING_REQUEST_TYPE","Xmla._getXmlaSoapMessage",a);else b+="\n <Command>\n <Statement>"+a.statement+"</Statement>\n </Command>"+u("Properties","PropertyList",a.properties," ");break;default:}c!==null&&c._throw();b+="\n </"+d+">\n </"+n+":Body>\n</"+n+":Envelope>";return b}function h(a,b,d){if(b&&!a)a={};for(var c in b)if(b.hasOwnProperty(c))if(d||j(a[c]))a[c]=
else return 'url('+E+G+H+I+')';});};if(!l[p]){var v=s.preload;if(v&&v.length>0){t(v);a.imageCacher.load(v,function(){l[p]=1;n(o,p,q,r);});return;}l[p]=1;}q=s[q];var w=!q||!!q._isLoaded;if(w)r&&r();else{var x=q._pending||(q._pending=[]);x.push(r);if(x.length>1)return;var y=!q.css||!q.css.length,z=!q.js||!q.js.length,A=function(){if(y&&z){q._isLoaded=1;for(var D=0;D<x.length;D++){if(x[D])x[D]();}}};if(!y){var B=q.css;if(e.isArray(B)){t(B);for(var C=0;C<B.length;C++)a.document.appendStyleSheet(B[C]);}else{B=u(B,a.getUrl(m[p]));a.document.appendStyleText(B);}q.css=B;y=1;}if(!z){t(q.js);a.scriptLoader.load(q.js,function(){z=1;A();});}A();}};return{add:function(o,p){k[o]=p;p.skinPath=m[o]||(m[o]=a.getUrl('skins/'+o+'/'));},load:function(o,p,q){var r=o.skinName,s=o.skinPath;if(k[r])n(o,r,p,q);else{m[r]=s;a.scriptLoader.load(a.getUrl(s+'skin.js'),function(){n(o,r,p,q);});}}};})();a.themes=new a.resourceManager('themes/','theme');a.ui=function(k){if(k.ui)return k.ui;this._={handlers:{},items:{},editor:k};return this;};var k=a.ui;k.prototype={add:function(l,m,n){this._.items[l]={type:m,command:n.command||null,args:Array.prototype.slice.call(arguments,2)};},create:function(l){var q=this;var m=q._.items[l],n=m&&q._.handlers[m.type],o=m&&m.command&&q._.editor.getCommand(m.command),p=n&&n.create.apply(q,m.args);if(o)o.uiItems.push(p);return p;},addHandler:function(l,m){this._.handlers[l]=m;}};(function(){var l=0,m=function(){var x='editor'+ ++l;return a.instances&&a.instances[x]?m():x;},n={},o=function(x){var y=x.config.customConfig;if(!y)return false;y=a.getUrl(y);var z=n[y]||(n[y]={});if(z.fn){z.fn.call(x,x.config);if(a.getUrl(x.config.customConfig)==y||!o(x))x.fireOnce('customConfigLoaded');}else a.scriptLoader.load(y,function(){if(a.editorConfig)z.fn=a.editorConfig;else z.fn=function(){};o(x);});return true;},p=function(x,y){x.on('customConfigLoaded',function(){if(y){if(y.on)for(var z in y.on)x.on(z,y.on[z]);e.extend(x.config,y,true);delete x.config.on;}q(x);});if(y&&y.customConfig!=undefined)x.config.customConfig=y.customConfig;if(!o(x))x.fireOnce('customConfigLoaded');},q=function(x){var y=x.config.skin.split(','),z=y[0],A=a.getUrl(y[1]||'skins/'+z+'/');x.skinName=z;x.skinPath=A;x.skinClass='cke_skin_'+z;x.tabIndex=x.config.tabIndex||x.element.getAttribute('tabindex')||0;x.fireOnce('configLoaded');t(x);},r=function(x){a.lang.load(x.config.language,x.config.defaultLanguage,function(y,z){x.langCode=y;x.lang=e.prototypedCopy(z);if(b.gecko&&b.version<10900&&x.lang.dir=='rtl')x.lang.dir='ltr';
a.dialog.add('colordialog',this.path+'dialogs/colordialog.js');}};j.add('colordialog',j.colordialog);})();j.add('contextmenu',{requires:['menu'],beforeInit:function(l){l.contextMenu=new j.contextMenu(l);l.addCommand('contextMenu',{exec:function(){l.contextMenu.show(l.document.getBody());}});}});j.contextMenu=e.createClass({$:function(l){this.id='cke_'+e.getNextNumber();this.editor=l;this._.listeners=[];this._.functionId=e.addFunction(function(m){this._.panel.hide();l.focus();l.execCommand(m);},this);this.definition={panel:{className:l.skinClass+' cke_contextmenu',attributes:{'aria-label':l.lang.contextmenu.options}}};},_:{onMenu:function(l,m,n,o){var p=this._.menu,q=this.editor;if(p){p.hide();p.removeAll();}else{p=this._.menu=new a.menu(q,this.definition);p.onClick=e.bind(function(z){p.hide();if(z.onClick)z.onClick();else if(z.command)q.execCommand(z.command);},this);p.onEscape=function(z){var A=this.parent;if(A){A._.panel.hideChild();var B=A._.panel._.panel._.currentBlock,C=B._.focusIndex;B._.markItem(C);}else if(z==27){this.hide();q.focus();}return false;};}var r=this._.listeners,s=[],t=this.editor.getSelection(),u=t&&t.getStartElement();p.onHide=e.bind(function(){p.onHide=null;if(c){var z=q.getSelection();z&&z.unlock();}this.onHide&&this.onHide();},this);for(var v=0;v<r.length;v++){var w=r[v](u,t);if(w)for(var x in w){var y=this.editor.getMenuItem(x);if(y){y.state=w[x];p.add(y);}}}p.items.length&&p.show(l,m||(q.lang.dir=='rtl'?2:1),n,o);}},proto:{addTarget:function(l,m){if(b.opera){var n;l.on('mousedown',function(r){r=r.data;if(r.$.button!=2){if(r.getKeystroke()==1000+1)l.fire('contextmenu',r);return;}if(m&&(r.$.ctrlKey||r.$.metaKey))return;var s=r.getTarget();if(!n){var t=s.getDocument();n=t.createElement('input');n.$.type='button';t.getBody().append(n);}n.setAttribute('style','position:absolute;top:'+(r.$.clientY-2)+'px;left:'+(r.$.clientX-2)+'px;width:5px;height:5px;opacity:0.01');});l.on('mouseup',function(r){if(n){n.remove();n=undefined;l.fire('contextmenu',r.data);}});}l.on('contextmenu',function(r){var s=r.data;if(m&&(b.webkit?o:s.$.ctrlKey||s.$.metaKey))return;if(c){var t=this.editor.getSelection();t&&t.lock();}s.preventDefault();var u=s.getTarget().getDocument().getDocumentElement(),v=s.$.clientX,w=s.$.clientY;e.setTimeout(function(){this.show(u,null,v,w);},0,this);},this);if(b.webkit){var o,p=function(r){o=r.data.$.ctrlKey||r.data.$.metaKey;},q=function(){o=0;};l.on('keydown',p);l.on('keyup',q);l.on('contextmenu',q);}},addListener:function(l){this._.listeners.push(l);
else return 'url('+E+G+H+I+')';});};if(!l[p]){var v=s.preload;if(v&&v.length>0){t(v);a.imageCacher.load(v,function(){l[p]=1;n(o,p,q,r);});return;}l[p]=1;}q=s[q];var w=!q||!!q._isLoaded;if(w)r&&r();else{var x=q._pending||(q._pending=[]);x.push(r);if(x.length>1)return;var y=!q.css||!q.css.length,z=!q.js||!q.js.length,A=function(){if(y&&z){q._isLoaded=1;for(var D=0;D<x.length;D++){if(x[D])x[D]();}}};if(!y){var B=q.css;if(e.isArray(B)){t(B);for(var C=0;C<B.length;C++)a.document.appendStyleSheet(B[C]);}else{B=u(B,a.getUrl(m[p]));a.document.appendStyleText(B);}q.css=B;y=1;}if(!z){t(q.js);a.scriptLoader.load(q.js,function(){z=1;A();});}A();}};return{add:function(o,p){k[o]=p;p.skinPath=m[o]||(m[o]=a.getUrl('skins/'+o+'/'));},load:function(o,p,q){var r=o.skinName,s=o.skinPath;if(k[r])n(o,r,p,q);else{m[r]=s;a.scriptLoader.load(a.getUrl(s+'skin.js'),function(){n(o,r,p,q);});}}};})();a.themes=new a.resourceManager('themes/','theme');a.ui=function(k){if(k.ui)return k.ui;this._={handlers:{},items:{},editor:k};return this;};var k=a.ui;k.prototype={add:function(l,m,n){this._.items[l]={type:m,command:n.command||null,args:Array.prototype.slice.call(arguments,2)};},create:function(l){var q=this;var m=q._.items[l],n=m&&q._.handlers[m.type],o=m&&m.command&&q._.editor.getCommand(m.command),p=n&&n.create.apply(q,m.args);if(o)o.uiItems.push(p);return p;},addHandler:function(l,m){this._.handlers[l]=m;}};(function(){var l=0,m=function(){var x='editor'+ ++l;return a.instances&&a.instances[x]?m():x;},n={},o=function(x){var y=x.config.customConfig;if(!y)return false;y=a.getUrl(y);var z=n[y]||(n[y]={});if(z.fn){z.fn.call(x,x.config);if(a.getUrl(x.config.customConfig)==y||!o(x))x.fireOnce('customConfigLoaded');}else a.scriptLoader.load(y,function(){if(a.editorConfig)z.fn=a.editorConfig;else z.fn=function(){};o(x);});return true;},p=function(x,y){x.on('customConfigLoaded',function(){if(y){if(y.on)for(var z in y.on)x.on(z,y.on[z]);e.extend(x.config,y,true);delete x.config.on;}q(x);});if(y&&y.customConfig!=undefined)x.config.customConfig=y.customConfig;if(!o(x))x.fireOnce('customConfigLoaded');},q=function(x){var y=x.config.skin.split(','),z=y[0],A=a.getUrl(y[1]||'skins/'+z+'/');x.skinName=z;x.skinPath=A;x.skinClass='cke_skin_'+z;x.tabIndex=x.config.tabIndex||x.element.getAttribute('tabindex')||0;x.fireOnce('configLoaded');t(x);},r=function(x){a.lang.load(x.config.language,x.config.defaultLanguage,function(y,z){x.langCode=y;x.lang=e.prototypedCopy(z);if(b.gecko&&b.version<10900&&x.lang.dir=='rtl')x.lang.dir='ltr';
}E=this.endContainer;F=this.endOffset;y=z=null;A=B=false;if(E.type==3){E=!e.trim(E.substring(F)).length&&E;B=!(E&&E.getLength());if(E)if(!(z=E.getNext()))y=E.getParent();}else{z=E.getChild(F);if(!z)y=E;}while(y||z){if(y&&!z){if(!A&&y.equals(u))A=true;if(!v.contains(y))break;if(!B||y.getComputedStyle('display')!='inline'){B=false;if(A)x=y;else if(y)this.setEndAfter(y);}z=y.getNext();}while(z){C=false;if(z.type==3){D=z.getText();if(/[^\s\ufeff]/.test(D))z=null;C=/^[\s\ufeff]/.test(D);}else if(z.$.offsetWidth>0&&!z.getAttribute('_fck_bookmark'))if(B&&f.$removeEmpty[z.getName()]){D=z.getText();if(/[^\s\ufeff]/.test(D))z=null;else{G=z.$.all||z.$.getElementsByTagName('*');for(H=0;I=G[H++];){if(!f.$removeEmpty[I.nodeName.toLowerCase()]){z=null;break;}}}if(z)C=!!D.length;}else z=null;if(C)if(B)if(A)x=y;else this.setEndAfter(y);if(z){J=z.getNext();if(!y&&!J){y=z;z=null;break;}z=J;}else y=null;}if(y)y=y.getParent();}if(w&&x){u=w.contains(x)?x:w;this.setStartBefore(u);this.setEndAfter(u);}break;case 2:case 3:var K=new d.range(this.document);v=this.document.getBody();K.setStartAt(v,1);K.setEnd(this.startContainer,this.startOffset);var L=new d.walker(K),M,N,O=d.walker.blockBoundary(t==3?{br:1}:null),P=function(R){var S=O(R);if(!S)M=R;return S;},Q=function(R){var S=P(R);if(!S&&R.is&&R.is('br'))N=R;return S;};L.guard=P;y=L.lastBackward();M=M||v;this.setStartAt(M,!M.is('br')&&(!y&&this.checkStartOfBlock()||y&&M.contains(y))?1:4);K=this.clone();K.collapse();K.setEndAt(v,2);L=new d.walker(K);L.guard=t==3?Q:P;M=null;y=L.lastForward();M=M||v;this.setEndAt(M,!y&&this.checkEndOfBlock()||y&&M.contains(y)?2:3);if(N)this.setEndAfter(N);}},shrink:function(t){if(!this.collapsed){t=t||a.SHRINK_TEXT;var u=this.clone(),v=this.startContainer,w=this.endContainer,x=this.startOffset,y=this.endOffset,z=this.collapsed,A=1,B=1;if(v&&v.type==3)if(!x)u.setStartBefore(v);else if(x>=v.getLength())u.setStartAfter(v);else{u.setStartBefore(v);A=0;}if(w&&w.type==3)if(!y)u.setEndBefore(w);else if(y>=w.getLength())u.setEndAfter(w);else{u.setEndAfter(w);B=0;}var C=new d.walker(u);C.evaluator=function(G){return G.type==(t==a.SHRINK_ELEMENT?1:3);};var D;C.guard=function(G,H){if(t==a.SHRINK_ELEMENT&&G.type==3)return false;if(H&&G.equals(D))return false;if(!H&&G.type==1)D=G;return true;};if(A){var E=C[t==a.SHRINK_ELEMENT?'lastForward':'next']();E&&this.setStartBefore(E);}if(B){C.reset();var F=C[t==a.SHRINK_ELEMENT?'lastBackward':'previous']();F&&this.setEndAfter(F);}return!!(A||B);}},insertNode:function(t){var x=this;
for(var G=0;G<E.length&&(F=E[G])&&!F.equals(D);G++){if(l[E[G].getName()])return n.call(this,B.editor,this.type==E[G].getName()?1:2);}return n.call(this,B.editor,2);};function p(B,C,D,E){var F=j.list.listToArray(C.root,D),G=[];for(var H=0;H<C.contents.length;H++){var I=C.contents[H];I=I.getAscendant('li',true);if(!I||I.getCustomData('list_item_processed'))continue;G.push(I);h.setMarker(D,I,'list_item_processed',true);}var J=C.root,K=J.getDocument().createElement(this.type);J.copyAttributes(K,{start:1,type:1});K.removeStyle('list-style-type');for(H=0;H<G.length;H++){var L=G[H].getCustomData('listarray_index');F[L].parent=K;}var M=j.list.arrayToList(F,D,null,B.config.enterMode),N,O=M.listNode.getChildCount();for(H=0;H<O&&(N=M.listNode.getChild(H));H++){if(N.getName()==this.type)E.push(N);}M.listNode.replace(C.root);};var q=/^h[1-6]$/;function r(B,C,D){var E=C.contents,F=C.root.getDocument(),G=[];if(E.length==1&&E[0].equals(C.root)){var H=F.createElement('div');E[0].moveChildren&&E[0].moveChildren(H);E[0].append(H);E[0]=H;}var I=C.contents[0].getParent();for(var J=0;J<E.length;J++)I=I.getCommonAncestor(E[J].getParent());for(J=0;J<E.length;J++){var K=E[J],L;while(L=K.getParent()){if(L.equals(I)){G.push(K);break;}K=L;}}if(G.length<1)return;var M=G[G.length-1].getNext(),N=F.createElement(this.type),O;D.push(N);while(G.length){var P=G.shift(),Q=F.createElement('li');if(P.is('pre')||q.test(P.getName()))P.appendTo(Q);else{if(P.hasAttribute('dir')){O=O||P.getAttribute('dir');P.removeAttribute('dir');}P.copyAttributes(Q);P.moveChildren(Q);P.remove();if(!c)Q.appendBogus();}Q.appendTo(N);}if(O)N.setAttribute('dir',O);if(M)N.insertBefore(M);else N.appendTo(I);};function s(B,C,D){var E=j.list.listToArray(C.root,D),F=[];for(var G=0;G<C.contents.length;G++){var H=C.contents[G];H=H.getAscendant('li',true);if(!H||H.getCustomData('list_item_processed'))continue;F.push(H);h.setMarker(D,H,'list_item_processed',true);}var I=null;for(G=0;G<F.length;G++){var J=F[G].getCustomData('listarray_index');E[J].indent=-1;I=J;}for(G=I+1;G<E.length;G++){if(E[G].indent>E[G-1].indent+1){var K=E[G-1].indent+1-E[G].indent,L=E[G].indent;while(E[G]&&E[G].indent>=L){E[G].indent+=K;G++;}G--;}}var M=j.list.arrayToList(E,D,null,B.config.enterMode,C.root.getAttribute('dir')),N=M.listNode,O,P;function Q(R){if((O=N[R?'getFirst':'getLast']())&&!(O.is&&O.isBlockBoundary())&&(P=C.root[R?'getPrevious':'getNext'](d.walker.whitespaces(true)))&&!(P.is&&P.isBlockBoundary({br:1})))B.document.createElement('br')[R?'insertBefore':'insertAfter'](O); };Q(true);Q();N.replace(C.root);};function t(B,C){this.name=B;this.type=C;};t.prototype={exec:function(B){B.focus();var C=B.document,D=B.getSelection(),E=D&&D.getRanges(true);if(!E||E.length<1)return;if(this.state==2){var F=C.getBody();F.trim();if(!F.getFirst()){var G=C.createElement(B.config.enterMode==1?'p':B.config.enterMode==3?'div':'br');G.appendTo(F);E=new d.rangeList([new d.range(C)]);if(G.is('br')){E[0].setStartBefore(G);E[0].setEndAfter(G);}else E[0].selectNodeContents(G);D.selectRanges(E);}else{var H=E.length==1&&E[0],I=H&&H.getEnclosedNode();if(I&&I.is&&this.type==I.getName())n.call(this,B,1);}}var J=D.createBookmarks(true),K=[],L={},M=E.createIterator(),N=0;while((H=M.getNextRange())&&++N){var O=H.getBoundaryNodes(),P=O.startNode,Q=O.endNode;if(P.type==1&&P.getName()=='td')H.setStartAt(O.startNode,1);if(Q.type==1&&Q.getName()=='td')H.setEndAt(O.endNode,2);var R=H.createIterator(),S;R.forceBrBreak=this.state==2;while(S=R.getNextParagraph()){if(S.getCustomData('list_block'))continue;else h.setMarker(L,S,'list_block',1);var T=new d.elementPath(S),U=T.elements,V=U.length,W=null,X=false,Y=T.blockLimit,Z;for(var aa=V-1;aa>=0&&(Z=U[aa]);aa--){if(l[Z.getName()]&&Y.contains(Z)){Y.removeCustomData('list_group_object_'+N);var ab=Z.getCustomData('list_group_object');if(ab)ab.contents.push(S);else{ab={root:Z,contents:[S]};K.push(ab);h.setMarker(L,Z,'list_group_object',ab);}X=true;break;}}if(X)continue;var ac=Y;if(ac.getCustomData('list_group_object_'+N))ac.getCustomData('list_group_object_'+N).contents.push(S);else{ab={root:ac,contents:[S]};h.setMarker(L,ac,'list_group_object_'+N,ab);K.push(ab);}}}var ad=[];while(K.length>0){ab=K.shift();if(this.state==2){if(l[ab.root.getName()])p.call(this,B,ab,L,ad);else r.call(this,B,ab,ad);}else if(this.state==1&&l[ab.root.getName()])s.call(this,B,ab,L);}for(aa=0;aa<ad.length;aa++){W=ad[aa];var ae,af=this;(ae=function(ag){var ah=W[ag?'getPrevious':'getNext'](d.walker.whitespaces(true));if(ah&&ah.getName&&ah.getName()==af.type){ah.remove();ah.moveChildren(W,ag?true:false);}})();ae(true);}h.clearAllMarkers(L);D.selectBookmarks(J);B.focus();}};var u=f,v=/[\t\r\n ]*(?:&nbsp;|\xa0)$/;function w(B,C){var D,E=B.children,F=E.length;for(var G=0;G<F;G++){D=E[G];if(D.name&&D.name in C)return G;}return F;};function x(B){return function(C){var D=C.children,E=w(C,u.$list),F=D[E],G=F&&F.previous,H;if(G&&(G.name&&G.name=='br'||G.value&&(H=G.value.match(v)))){var I=G;if(!(H&&H.index)&&I==D[0])D[0]=B||c?new a.htmlParser.text('\xa0'):new a.htmlParser.element('br',{});
}E=this.endContainer;F=this.endOffset;y=z=null;A=B=false;if(E.type==3){E=!e.trim(E.substring(F)).length&&E;B=!(E&&E.getLength());if(E)if(!(z=E.getNext()))y=E.getParent();}else{z=E.getChild(F);if(!z)y=E;}while(y||z){if(y&&!z){if(!A&&y.equals(u))A=true;if(!v.contains(y))break;if(!B||y.getComputedStyle('display')!='inline'){B=false;if(A)x=y;else if(y)this.setEndAfter(y);}z=y.getNext();}while(z){C=false;if(z.type==3){D=z.getText();if(/[^\s\ufeff]/.test(D))z=null;C=/^[\s\ufeff]/.test(D);}else if(z.$.offsetWidth>0&&!z.getAttribute('_fck_bookmark'))if(B&&f.$removeEmpty[z.getName()]){D=z.getText();if(/[^\s\ufeff]/.test(D))z=null;else{G=z.$.all||z.$.getElementsByTagName('*');for(H=0;I=G[H++];){if(!f.$removeEmpty[I.nodeName.toLowerCase()]){z=null;break;}}}if(z)C=!!D.length;}else z=null;if(C)if(B)if(A)x=y;else this.setEndAfter(y);if(z){J=z.getNext();if(!y&&!J){y=z;z=null;break;}z=J;}else y=null;}if(y)y=y.getParent();}if(w&&x){u=w.contains(x)?x:w;this.setStartBefore(u);this.setEndAfter(u);}break;case 2:case 3:var K=new d.range(this.document);v=this.document.getBody();K.setStartAt(v,1);K.setEnd(this.startContainer,this.startOffset);var L=new d.walker(K),M,N,O=d.walker.blockBoundary(t==3?{br:1}:null),P=function(R){var S=O(R);if(!S)M=R;return S;},Q=function(R){var S=P(R);if(!S&&R.is&&R.is('br'))N=R;return S;};L.guard=P;y=L.lastBackward();M=M||v;this.setStartAt(M,!M.is('br')&&(!y&&this.checkStartOfBlock()||y&&M.contains(y))?1:4);K=this.clone();K.collapse();K.setEndAt(v,2);L=new d.walker(K);L.guard=t==3?Q:P;M=null;y=L.lastForward();M=M||v;this.setEndAt(M,!y&&this.checkEndOfBlock()||y&&M.contains(y)?2:3);if(N)this.setEndAfter(N);}},shrink:function(t){if(!this.collapsed){t=t||a.SHRINK_TEXT;var u=this.clone(),v=this.startContainer,w=this.endContainer,x=this.startOffset,y=this.endOffset,z=this.collapsed,A=1,B=1;if(v&&v.type==3)if(!x)u.setStartBefore(v);else if(x>=v.getLength())u.setStartAfter(v);else{u.setStartBefore(v);A=0;}if(w&&w.type==3)if(!y)u.setEndBefore(w);else if(y>=w.getLength())u.setEndAfter(w);else{u.setEndAfter(w);B=0;}var C=new d.walker(u);C.evaluator=function(G){return G.type==(t==a.SHRINK_ELEMENT?1:3);};var D;C.guard=function(G,H){if(t==a.SHRINK_ELEMENT&&G.type==3)return false;if(H&&G.equals(D))return false;if(!H&&G.type==1)D=G;return true;};if(A){var E=C[t==a.SHRINK_ELEMENT?'lastForward':'next']();E&&this.setStartBefore(E);}if(B){C.reset();var F=C[t==a.SHRINK_ELEMENT?'lastBackward':'previous']();F&&this.setEndAfter(F);}return!!(A||B);}},insertNode:function(t){var x=this;
"pageXOffset"]:d.support.boxModel&&k.document.documentElement[e]||k.document.body[e]:h[e]}});var Oa=/z-?index|font-?weight|opacity|zoom|line-?height/i,ma=/alpha\([^)]*\)/,na=/opacity=([^)]*)/,X=/float/i,oa=/-([a-z])/ig,Pa=/([A-Z])/g,Qa=/^-?\d+(?:px)?$/i,Ra=/^-?\d/,Sa={position:"absolute",visibility:"hidden",display:"block"},Ta=["Left","Right"],Ua=["Top","Bottom"],Va=r.defaultView&&r.defaultView.getComputedStyle,pa=d.support.cssFloat?"cssFloat":"styleFloat",qa=function(a,b){return b.toUpperCase()};
"Bottom"],Va=r.defaultView&&r.defaultView.getComputedStyle,pa=c.support.cssFloat?"cssFloat":"styleFloat",qa=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return S(this,a,b,true,function(e,f,h){if(h===v)return c.curCSS(e,f);if(typeof h==="number"&&!Oa.test(f))h+="px";c.style(e,f,h)})};c.extend({style:function(a,b,e){if(!a||a.nodeType===3||a.nodeType===8)return v;if((b==="width"||b==="height")&&parseFloat(e)<0)e=v;var f=a.style||a,h=e!==v;if(!c.support.opacity&&b==="opacity"){if(h){f.zoom=
"pageXOffset"]:d.support.boxModel&&k.document.documentElement[e]||k.document.body[e]:h[e]}});var Oa=/z-?index|font-?weight|opacity|zoom|line-?height/i,ma=/alpha\([^)]*\)/,na=/opacity=([^)]*)/,X=/float/i,oa=/-([a-z])/ig,Pa=/([A-Z])/g,Qa=/^-?\d+(?:px)?$/i,Ra=/^-?\d/,Sa={position:"absolute",visibility:"hidden",display:"block"},Ta=["Left","Right"],Ua=["Top","Bottom"],Va=r.defaultView&&r.defaultView.getComputedStyle,pa=d.support.cssFloat?"cssFloat":"styleFloat",qa=function(a,b){return b.toUpperCase()};
bottom_id, bottom_verse, top_id, top_verse }
bottom_id: 0, bottom_verse: 0, top_id: 0, top_verse: 0 };
query: function (options) { ///TODO: At some point, there needs to be feedback to the user that the query is taking place. Maybe have something in the infoBar. /// Stop any old requests since we have a new one. ajax_additional.abort(); ajax_previous.abort(); /// Initial queries may need special options (e.g., the f variable (to find paragraph breaks) is only passed on initial queries). options.initial_query = true; /// Initial queries are always additional. options.direction = additional; /// Since this settings can be changed by the user at run time, it must be retrieved before each query. options.in_paragraphs = settings.view.in_paragraphs.get(); /// Create an empty verse_range object, which will be filled in as verses are retrieved. options.verse_range = { bottom_id, bottom_verse, top_id, top_verse } ajax_additional.query("post", "query.php", create_query_message(options), function (data) { /// On Success ///TODO: What should be done from here? Should it be sent to a function, like handle_new_verses()? ///TODO: Removed unnecessary slashes from verse data. handle_new_verses(BF.parse_json(data), options); }); },
console.log(result.action); console.log(result.redirect); console.log(result.post_id);
function quickEditsave_response(originalRequest){ // show error if necessary if( originalRequest.status != 200 ) { dzk_showajaxerror(originalRequest.responseText); editstatus = false; return; } var result = dejsonize(originalRequest.responseText);console.log(result.action);console.log(result.redirect);console.log(result.post_id); var postingtextID = 'postingtext_' + result.post_id; var postingobjID = 'posting_' + result.post_id; var postinguserID = postingobjID + '_userinfo'; updateAuthid(result.authid); $(postingtextID + '_editor').remove(); editstatus = false; if(result.action == 'deleted') { $(postingobjID).remove(); } else if (result.action == 'topic_deleted') { window.setTimeout("dzk_redirect('" + result.redirect + "');", 500); return; } else { $(postingtextID).update(result.post_text).show(); $(postinguserID).show(); } // hide quickreply if($('dzk_quickreply')) { Effect.toggle($('dzk_quickreply'), comboeffect, comboparams); }}
s);this._p_={loadScript:Y,onJsLoad:Q,setTitle:l,update:H,quit:function(){ba=true;clearTimeout(aa)},setFormObjects:function(d){T=d},saveDownPos:v,addTimerEvent:z,load:o,handleResponse:D,setServerPush:t,dragStart:G,dragDrag:P,dragEnd:a,capture:n.capture,onHashChange:s,setHash:F,ImagePreloader:g,autoJavaScript:function(){with(window)_$_AUTO_JAVASCRIPT_$_()},response:R};this.WT=_$_WT_CLASS_$_;this.emit=I}),WtSignalEmit=_$_APP_CLASS_$_.emit;window.WtScriptLoaded=false;
aa=null,T=0,ea=false,P=null,X=null,ha=(new Date).getTime(),fa,ca=0,Q={};K.prototype.preload=function(d){var c=new Image;this.images.push(c);c.onload=K.prototype.onload;c.onerror=K.prototype.onload;c.onabort=K.prototype.onload;c.imagePreloader=this;c.src=d};K.prototype.onload=function(){var d=this.imagePreloader;--d.work==0&&d.callback(d.images)};g.history.register(_$_INITIAL_HASH_$_,t);this._p_={loadScript:S,onJsLoad:I,setTitle:f,update:A,quit:function(){ba=true;clearTimeout(aa)},setFormObjects:function(d){B=
s);this._p_={loadScript:Y,onJsLoad:Q,setTitle:l,update:H,quit:function(){ba=true;clearTimeout(aa)},setFormObjects:function(d){T=d},saveDownPos:v,addTimerEvent:z,load:o,handleResponse:D,setServerPush:t,dragStart:G,dragDrag:P,dragEnd:a,capture:n.capture,onHashChange:s,setHash:F,ImagePreloader:g,autoJavaScript:function(){with(window)_$_AUTO_JAVASCRIPT_$_()},response:R};this.WT=_$_WT_CLASS_$_;this.emit=I}),WtSignalEmit=_$_APP_CLASS_$_.emit;window.WtScriptLoaded=false;
a)return b;return-1}function w(a,b){var c=a.className.split(" ")[0],d=c.substring(7)*1,k=p.firstChild,g=f.firstChild;c=$(g).find("."+c).get(0);var j=a.nextSibling,e=c.nextSibling,l=i.pxself(a,"width")-1+b;k.style.width=g.style.width=i.pxself(k,"width")+b+"px";a.style.width=l+1+"px";for(c.style.width=l+7+"px";j;j=j.nextSibling)if(e){e.style.left=i.pxself(e,"left")+b+"px";e=e.nextSibling}n.emit(h,"columnResized",d,l)}jQuery.data(h,"obj",this);var i=n.WT,s=0,t=0,u=0,v=0;f.onscroll=function(){p.scrollLeft=
a)return b;return-1}function w(a,b){var c=a.className.split(" ")[0],d=c.substring(7)*1,k=p.firstChild,g=f.firstChild;c=$(g).find("."+c).get(0);var j=a.nextSibling,e=c.nextSibling,l=i.pxself(a,"width")-1+b;k.style.width=g.style.width=i.pxself(k,"width")+b+"px";a.style.width=l+1+"px";for(c.style.width=l+7+"px";j;j=j.nextSibling)if(e){e.style.left=i.pxself(e,"left")+b+"px";e=e.nextSibling}n.emit(h,"columnResized",d,parseInt(l))}jQuery.data(h,"obj",this);var i=n.WT,s=0,t=0,u=0,v=0;f.onscroll=function(){p.scrollLeft=
WT_DECLARE_WT_MEMBER(1,"WTableView",function(n,h,f,p){function q(a){var b=-1,c=false,d=false,k=null;for(a=a.target||a.srcElement;a;){var g=$(a);if(g.hasClass("Wt-tv-contents"))break;else if(g.hasClass("Wt-tv-c")){if(a.getAttribute("drop")==="true")d=true;if(g.hasClass("Wt-selected"))c=true;k=a;a=a.parentNode;b=a.className.split(" ")[0].substring(7)*1;break}a=a.parentNode}return{columnId:b,rowIdx:-1,selected:c,drop:d,el:k}}function r(a){var b,c,d=a.parentNode.childNodes;b=0;for(c=d.length;b<c;++b)if(d[b]==a)return b;return-1}function w(a,b){var c=a.className.split(" ")[0],d=c.substring(7)*1,k=p.firstChild,g=f.firstChild;c=$(g).find("."+c).get(0);var j=a.nextSibling,e=c.nextSibling,l=i.pxself(a,"width")-1+b;k.style.width=g.style.width=i.pxself(k,"width")+b+"px";a.style.width=l+1+"px";for(c.style.width=l+7+"px";j;j=j.nextSibling)if(e){e.style.left=i.pxself(e,"left")+b+"px";e=e.nextSibling}n.emit(h,"columnResized",d,l)}jQuery.data(h,"obj",this);var i=n.WT,s=0,t=0,u=0,v=0;f.onscroll=function(){p.scrollLeft=
d.objectPrevStyle.position;d.object.style.display=d.objectPrevStyle.display;d.object.style.left=d.objectPrevStyle.left;d.object.style.top=d.objectPrevStyle.top;d.object.className=d.objectPrevStyle.className;d.object=null}}function r(c,d){var e,g,h;h=c.event;e=d>0?"&e"+d:"&";g=e+"signal="+c.signal;if(c.id){g+=e+"id="+c.id+e+"name="+encodeURIComponent(c.name)+e+"an="+c.args.length;for(var i=0;i<c.args.length;++i)g+=e+"a"+i+"="+encodeURIComponent(c.args[i])}for(i=0;i<Q.length;++i){var s=q.getElement(Q[i]), u=null;if(s!=null){if(s.type=="select-multiple")for(d=0;d<s.options.length;d++){if(s.options[d].selected)g+=e+Q[i]+"="+encodeURIComponent(s.options[d].value)}else if(q.hasTag(s,"SPAN"))for(d=0;d<s.childNodes.length;d++){if(s.childNodes[d].type=="checkbox"){d=s.childNodes[d];if(d.style.display=="none")u="indeterminate";else if(d.checked)u=d.value;break}}else if(s.type=="checkbox"||s.type=="radio")if(s.indeterminate)u="indeterminate";else{if(s.checked)u=s.value}else if(s.type!="file")u=""+s.value;if(u!= null)g+=e+Q[i]+"="+encodeURIComponent(u)}}if(L!=null)g+=e+"_="+encodeURIComponent(unescape(L));if(!h){c.data=g;return c}for(i=h.target||h.srcElement;!i.id&&i.parentNode;)i=i.parentNode;if(i.id)g+=e+"tid="+i.id;try{g+=e+"type="+h.type}catch(ia){}if(h.clientX||h.clientY)g+=e+"clientX="+h.clientX+e+"clientY="+h.clientY;u=q.pageCoordinates(h);i=u.x;u=u.y;if(i||u){g+=e+"documentX="+i+e+"documentY="+u;g+=e+"dragdX="+(i-$)+e+"dragdY="+(u-aa)}if(h.screenX||h.screenY)g+=e+"screenX="+h.screenX+e+"screenY="+
d.objectPrevStyle.position;d.object.style.display=d.objectPrevStyle.display;d.object.style.left=d.objectPrevStyle.left;d.object.style.top=d.objectPrevStyle.top;d.object.className=d.objectPrevStyle.className;d.object=null}}function r(c,d){var e,g,h;h=c.event;e=d>0?"&e"+d:"&";g=e+"signal="+c.signal;if(c.id){g+=e+"id="+c.id+e+"name="+encodeURIComponent(c.name)+e+"an="+c.args.length;for(var i=0;i<c.args.length;++i)g+=e+"a"+i+"="+encodeURIComponent(c.args[i])}for(i=0;i<R.length;++i){var s=q.getElement(R[i]), u=null;if(s!=null){if(s.type=="select-multiple")for(d=0;d<s.options.length;d++){if(s.options[d].selected)g+=e+R[i]+"="+encodeURIComponent(s.options[d].value)}else if(q.hasTag(s,"SPAN"))for(d=0;d<s.childNodes.length;d++){if(s.childNodes[d].type=="checkbox"){d=s.childNodes[d];if(d.style.display=="none")u="indeterminate";else if(d.checked)u=d.value;break}}else if(s.type=="checkbox"||s.type=="radio")if(s.indeterminate)u="indeterminate";else{if(s.checked)u=s.value}else if(s.type!="file")u=""+s.value;if(u!= null)g+=e+R[i]+"="+encodeURIComponent(u)}}if(L!=null)g+=e+"_="+encodeURIComponent(unescape(L));if(!h){c.data=g;return c}for(i=h.target||h.srcElement;!i.id&&i.parentNode;)i=i.parentNode;if(i.id)g+=e+"tid="+i.id;try{g+=e+"type="+h.type}catch(ja){}if(h.clientX||h.clientY)g+=e+"clientX="+h.clientX+e+"clientY="+h.clientY;u=q.pageCoordinates(h);i=u.x;u=u.y;if(i||u){g+=e+"documentX="+i+e+"documentY="+u;g+=e+"dragdX="+(i-$)+e+"dragdY="+(u-aa)}if(h.screenX||h.screenY)g+=e+"screenX="+h.screenX+e+"screenY="+
d.objectPrevStyle.position;d.object.style.display=d.objectPrevStyle.display;d.object.style.left=d.objectPrevStyle.left;d.object.style.top=d.objectPrevStyle.top;d.object.className=d.objectPrevStyle.className;d.object=null}}function r(c,d){var e,g,h;h=c.event;e=d>0?"&e"+d:"&";g=e+"signal="+c.signal;if(c.id){g+=e+"id="+c.id+e+"name="+encodeURIComponent(c.name)+e+"an="+c.args.length;for(var i=0;i<c.args.length;++i)g+=e+"a"+i+"="+encodeURIComponent(c.args[i])}for(i=0;i<Q.length;++i){var s=q.getElement(Q[i]),u=null;if(s!=null){if(s.type=="select-multiple")for(d=0;d<s.options.length;d++){if(s.options[d].selected)g+=e+Q[i]+"="+encodeURIComponent(s.options[d].value)}else if(q.hasTag(s,"SPAN"))for(d=0;d<s.childNodes.length;d++){if(s.childNodes[d].type=="checkbox"){d=s.childNodes[d];if(d.style.display=="none")u="indeterminate";else if(d.checked)u=d.value;break}}else if(s.type=="checkbox"||s.type=="radio")if(s.indeterminate)u="indeterminate";else{if(s.checked)u=s.value}else if(s.type!="file")u=""+s.value;if(u!=null)g+=e+Q[i]+"="+encodeURIComponent(u)}}if(L!=null)g+=e+"_="+encodeURIComponent(unescape(L));if(!h){c.data=g;return c}for(i=h.target||h.srcElement;!i.id&&i.parentNode;)i=i.parentNode;if(i.id)g+=e+"tid="+i.id;try{g+=e+"type="+h.type}catch(ia){}if(h.clientX||h.clientY)g+=e+"clientX="+h.clientX+e+"clientY="+h.clientY;u=q.pageCoordinates(h);i=u.x;u=u.y;if(i||u){g+=e+"documentX="+i+e+"documentY="+u;g+=e+"dragdX="+(i-$)+e+"dragdY="+(u-aa)}if(h.screenX||h.screenY)g+=e+"screenX="+h.screenX+e+"screenY="+h.screenY;if(c.object&&c.object.nodeType!=9){d=q.widgetPageCoordinates(c.object);g+=e+"scrollX="+c.object.scrollLeft+e+"scrollY="+c.object.scrollTop+e+"width="+c.object.clientWidth+e+"height="+c.object.clientHeight+e+"widgetX="+(i-d.x)+e+"widgetY="+(u-d.y)}if(h.which)g+=e+"right="+(h.which==3);else if(h.button)g+=e+"right="+(h.button==2);if(typeof h.keyCode!=="undefined")g+=e+"keyCode="+h.keyCode;if(typeof h.charCode!=="undefined")g+=e+"charCode="+h.charCode;if(h.altKey)g+=e+"altKey=1";if(h.ctrlKey)g+=e+"ctrlKey=1";if(h.metaKey)g+=e+"metaKey=1";if(h.shiftKey)g+=e+"shiftKey=1";c.data=g;return c}function t(){var c="";feedback=false;for(var d=0;d<v.length;++d){feedback=feedback||v[d].feedback;c+=v[d].data}V=v;v=[];return{feedback:feedback,result:c}}function A(){q.history._initTimeout();R==0&&J(null,"none",null,false);W=setTimeout(A,_$_KEEP_ALIVE_$_000)}function z(c){if(!q.isIEMobile)document.title=c}function F(){q.history._initialize();n();if(!ba){ba=true;_$_ONLOAD_$_();W=setTimeout(A,_$_KEEP_ALIVE_$_000)}}
e+"ctrlKey=1";if(h.metaKey)g+=e+"metaKey=1";if(h.shiftKey)g+=e+"shiftKey=1";c.data=g;return c}function t(){var c="";feedback=false;for(var d=0;d<v.length;++d){feedback=feedback||v[d].feedback;c+=v[d].data}V=v;v=[];return{feedback:feedback,result:c}}function A(){q.history._initTimeout();R==0&&J(null,"none",null,false);W=setTimeout(A,_$_KEEP_ALIVE_$_000)}function z(c){if(!q.isIEMobile)document.title=c}function F(){q.history._initialize();n();if(!ba){ba=true;_$_ONLOAD_$_();W=setTimeout(A,_$_KEEP_ALIVE_$_000)}}
e+"ctrlKey=1";if(h.metaKey)g+=e+"metaKey=1";if(h.shiftKey)g+=e+"shiftKey=1";c.data=g;return c}function t(){var c="";feedback=false;for(var d=0;d<v.length;++d){feedback=feedback||v[d].feedback;c+=v[d].data}V=v;v=[];return{feedback:feedback,result:c}}function A(){q.history._initTimeout();S==0&&J(null,"none",null,false);W=setTimeout(A,_$_KEEP_ALIVE_$_000)}function z(c){if(!q.isIEMobile)document.title=c}function F(){q.history._initialize();n();if(!ba){ba=true;_$_ONLOAD_$_();W=setTimeout(A,_$_KEEP_ALIVE_$_000)}}
d.objectPrevStyle.position;d.object.style.display=d.objectPrevStyle.display;d.object.style.left=d.objectPrevStyle.left;d.object.style.top=d.objectPrevStyle.top;d.object.className=d.objectPrevStyle.className;d.object=null}}function r(c,d){var e,g,h;h=c.event;e=d>0?"&e"+d:"&";g=e+"signal="+c.signal;if(c.id){g+=e+"id="+c.id+e+"name="+encodeURIComponent(c.name)+e+"an="+c.args.length;for(var i=0;i<c.args.length;++i)g+=e+"a"+i+"="+encodeURIComponent(c.args[i])}for(i=0;i<Q.length;++i){var s=q.getElement(Q[i]),u=null;if(s!=null){if(s.type=="select-multiple")for(d=0;d<s.options.length;d++){if(s.options[d].selected)g+=e+Q[i]+"="+encodeURIComponent(s.options[d].value)}else if(q.hasTag(s,"SPAN"))for(d=0;d<s.childNodes.length;d++){if(s.childNodes[d].type=="checkbox"){d=s.childNodes[d];if(d.style.display=="none")u="indeterminate";else if(d.checked)u=d.value;break}}else if(s.type=="checkbox"||s.type=="radio")if(s.indeterminate)u="indeterminate";else{if(s.checked)u=s.value}else if(s.type!="file")u=""+s.value;if(u!=null)g+=e+Q[i]+"="+encodeURIComponent(u)}}if(L!=null)g+=e+"_="+encodeURIComponent(unescape(L));if(!h){c.data=g;return c}for(i=h.target||h.srcElement;!i.id&&i.parentNode;)i=i.parentNode;if(i.id)g+=e+"tid="+i.id;try{g+=e+"type="+h.type}catch(ia){}if(h.clientX||h.clientY)g+=e+"clientX="+h.clientX+e+"clientY="+h.clientY;u=q.pageCoordinates(h);i=u.x;u=u.y;if(i||u){g+=e+"documentX="+i+e+"documentY="+u;g+=e+"dragdX="+(i-$)+e+"dragdY="+(u-aa)}if(h.screenX||h.screenY)g+=e+"screenX="+h.screenX+e+"screenY="+h.screenY;if(c.object&&c.object.nodeType!=9){d=q.widgetPageCoordinates(c.object);g+=e+"scrollX="+c.object.scrollLeft+e+"scrollY="+c.object.scrollTop+e+"width="+c.object.clientWidth+e+"height="+c.object.clientHeight+e+"widgetX="+(i-d.x)+e+"widgetY="+(u-d.y)}if(h.which)g+=e+"right="+(h.which==3);else if(h.button)g+=e+"right="+(h.button==2);if(typeof h.keyCode!=="undefined")g+=e+"keyCode="+h.keyCode;if(typeof h.charCode!=="undefined")g+=e+"charCode="+h.charCode;if(h.altKey)g+=e+"altKey=1";if(h.ctrlKey)g+=e+"ctrlKey=1";if(h.metaKey)g+=e+"metaKey=1";if(h.shiftKey)g+=e+"shiftKey=1";c.data=g;return c}function t(){var c="";feedback=false;for(var d=0;d<v.length;++d){feedback=feedback||v[d].feedback;c+=v[d].data}V=v;v=[];return{feedback:feedback,result:c}}function A(){q.history._initTimeout();R==0&&J(null,"none",null,false);W=setTimeout(A,_$_KEEP_ALIVE_$_000)}function z(c){if(!q.isIEMobile)document.title=c}function F(){q.history._initialize();n();if(!ba){ba=true;_$_ONLOAD_$_();W=setTimeout(A,_$_KEEP_ALIVE_$_000)}}
function(d){I.state=1;o(0,d.data,null)}}if(c.readyState==1){r();return}}_$_$endif_$_();if(F!=null&&O!=null){clearTimeout(O);F.abort();F=null}if(F==null)if(S==null){S=setTimeout(function(){r()},h.updateDelay);la=(new Date).getTime()}else if(ba){clearTimeout(S);r()}else if((new Date).getTime()-la>h.updateDelay){clearTimeout(S);r()}}function B(c){fa=c;k._p_.comm.responseReceived(c)}function r(){if(!F){S=null;if(R){if(!ma){if(confirm("The application was quited, do you want to restart?"))document.location= document.location;ma=true}}else{var c,d,e,j="&rand="+Math.round(Math.random(na)*1E5);if(y.length>0){c=X();d=c.feedback?setTimeout(f,_$_INDICATOR_TIMEOUT_$_):null;e=false}else{c={result:"&signal=poll"};d=null;e=true}if(I.socket!=null&&I.socket.readyState==1){F=null;d!=null&&clearTimeout(d);e||I.socket.send(c.result+"&ackId="+fa)}else{F=k._p_.comm.sendUpdate(ha+j,"request=jsupdate"+c.result+"&ackId="+fa,d,fa,-1);O=e?setTimeout(L,_$_SERVER_PUSH_TIMEOUT_$_):null}}}}function C(c,d){var e={},j=y.length;
" null;if(R){if(!ma){if(confirm("The application was quited, do you want to restart?"))document.location=document.location;ma=true}}else{var c,d,e,j="&rand="+Math.round(Math.random(na)*1E5);if(y.length>0){c=X();d=c.feedback?setTimeout(f,_$_INDICATOR_TIMEOUT_$_):null;e=false}else{c={result:"&signal=poll"};d=null;e=true}if(I.socket!=null&&I.socket.readyState==1){F=null;d!=null&&clearTimeout(d);e||I.socket.send(c.result+"&ackId="+fa)}else{F=k._p_.comm.sendUpdate(ha+j,"request=jsupdate"+c.result+"&ackId="+ fa,d,fa,-1);P=e?setTimeout(L,_$_SERVER_PUSH_TIMEOUT_$_):null}}}}function C(c,d){var e={},j=y.length;e.signal="user";e.id=typeof c==="string"?c:c==k?"app":c.id;if(typeof d==="object"){e.name=d.name;e.object=d.eventObject;e.event=d.event}else{e.name=d;e.object=e.event=null}e.args=[];for(var m=2;m<arguments.length;++m){var i=arguments[m];i=i===false?0:i===true?1:i.toDateString?i.toDateString():i;e.args[m-2]=i}e.feedback=true;y[j]=g(e,j);q()}function J(c,d,e){var j=function(){var i=h.getElement(c);if(i){if(e)i.timer=
function(d){I.state=1;o(0,d.data,null)}}if(c.readyState==1){r();return}}_$_$endif_$_();if(F!=null&&O!=null){clearTimeout(O);F.abort();F=null}if(F==null)if(S==null){S=setTimeout(function(){r()},h.updateDelay);la=(new Date).getTime()}else if(ba){clearTimeout(S);r()}else if((new Date).getTime()-la>h.updateDelay){clearTimeout(S);r()}}function B(c){fa=c;k._p_.comm.responseReceived(c)}function r(){if(!F){S=null;if(R){if(!ma){if(confirm("The application was quited, do you want to restart?"))document.location=document.location;ma=true}}else{var c,d,e,j="&rand="+Math.round(Math.random(na)*1E5);if(y.length>0){c=X();d=c.feedback?setTimeout(f,_$_INDICATOR_TIMEOUT_$_):null;e=false}else{c={result:"&signal=poll"};d=null;e=true}if(I.socket!=null&&I.socket.readyState==1){F=null;d!=null&&clearTimeout(d);e||I.socket.send(c.result+"&ackId="+fa)}else{F=k._p_.comm.sendUpdate(ha+j,"request=jsupdate"+c.result+"&ackId="+fa,d,fa,-1);O=e?setTimeout(L,_$_SERVER_PUSH_TIMEOUT_$_):null}}}}function C(c,d){var e={},j=y.length;
WT_DECLARE_WT_MEMBER(1,"WTableView",function(n,j,f,p){function q(a){var b=-1,c=false,d=false,k=null;for(a=a.target||a.srcElement;a;){var g=$(a);if(g.hasClass("Wt-tv-contents"))break;else if(g.hasClass("Wt-tv-c")){if(a.getAttribute("drop")==="true")d=true;if(g.hasClass("Wt-selected"))c=true;k=a;a=a.parentNode;b=a.className.split(" ")[0].substring(7)*1;break}a=a.parentNode}return{columnId:b,rowIdx:-1,selected:c,drop:d,el:k}}function r(a){var b,c,d=a.parentNode.childNodes;b=0;for(c=d.length;b<c;++b)if(d[b]== a)return b;return-1}function w(a,b){var c=a.className.split(" ")[0],d=c.substring(7)*1,k=p.firstChild,g=f.firstChild;c=$(g).find("."+c).get(0);var h=a.nextSibling,e=c.nextSibling,l=i.pxself(a,"width")-1+b;k.style.width=g.style.width=i.pxself(k,"width")+b+"px";a.style.width=l+1+"px";for(c.style.width=l+7+"px";h;h=h.nextSibling){h.style.left=i.pxself(h,"left")+b+"px";if(e){e.style.left=i.pxself(e,"left")+b+"px";e=e.nextSibling}}n.emit(j,"columnResized",d,l)}jQuery.data(j,"obj",this);var i=n.WT,s=0,
WT_DECLARE_WT_MEMBER(1,"WTableView",function(n,h,f,p){function q(a){var b=-1,c=false,d=false,k=null;for(a=a.target||a.srcElement;a;){var g=$(a);if(g.hasClass("Wt-tv-contents"))break;else if(g.hasClass("Wt-tv-c")){if(a.getAttribute("drop")==="true")d=true;if(g.hasClass("Wt-selected"))c=true;k=a;a=a.parentNode;b=a.className.split(" ")[0].substring(7)*1;break}a=a.parentNode}return{columnId:b,rowIdx:-1,selected:c,drop:d,el:k}}function r(a){var b,c,d=a.parentNode.childNodes;b=0;for(c=d.length;b<c;++b)if(d[b]== a)return b;return-1}function w(a,b){var c=a.className.split(" ")[0],d=c.substring(7)*1,k=p.firstChild,g=f.firstChild;c=$(g).find("."+c).get(0);var j=a.nextSibling,e=c.nextSibling,l=i.pxself(a,"width")-1+b;k.style.width=g.style.width=i.pxself(k,"width")+b+"px";a.style.width=l+1+"px";for(c.style.width=l+7+"px";j;j=j.nextSibling)if(e){e.style.left=i.pxself(e,"left")+b+"px";e=e.nextSibling}n.emit(h,"columnResized",d,l)}jQuery.data(h,"obj",this);var i=n.WT,s=0,t=0,u=0,v=0;f.onscroll=function(){p.scrollLeft=
WT_DECLARE_WT_MEMBER(1,"WTableView",function(n,j,f,p){function q(a){var b=-1,c=false,d=false,k=null;for(a=a.target||a.srcElement;a;){var g=$(a);if(g.hasClass("Wt-tv-contents"))break;else if(g.hasClass("Wt-tv-c")){if(a.getAttribute("drop")==="true")d=true;if(g.hasClass("Wt-selected"))c=true;k=a;a=a.parentNode;b=a.className.split(" ")[0].substring(7)*1;break}a=a.parentNode}return{columnId:b,rowIdx:-1,selected:c,drop:d,el:k}}function r(a){var b,c,d=a.parentNode.childNodes;b=0;for(c=d.length;b<c;++b)if(d[b]==a)return b;return-1}function w(a,b){var c=a.className.split(" ")[0],d=c.substring(7)*1,k=p.firstChild,g=f.firstChild;c=$(g).find("."+c).get(0);var h=a.nextSibling,e=c.nextSibling,l=i.pxself(a,"width")-1+b;k.style.width=g.style.width=i.pxself(k,"width")+b+"px";a.style.width=l+1+"px";for(c.style.width=l+7+"px";h;h=h.nextSibling){h.style.left=i.pxself(h,"left")+b+"px";if(e){e.style.left=i.pxself(e,"left")+b+"px";e=e.nextSibling}}n.emit(j,"columnResized",d,l)}jQuery.data(j,"obj",this);var i=n.WT,s=0,
false}if(f)N(d);else{var m=document.createElement("script");m.setAttribute("src",d);m.onload=function(){N(d)};m.onreadystatechange=function(){if(m.readyState=="complete"||m.readyState=="loaded")N(d)};document.getElementsByTagName("head")[0].appendChild(m)}}function p(d,c){this.callback=c;this.work=d.length;this.images=[];if(d.length==0)c(this.images);else for(c=0;c<d.length;c++)this.preload(d[c])}function r(d){if(d.ieAlternativeExecuted)return"0";y.emit(d.parentNode,"IeAltnernative");d.style.width= "";d.ieAlternativeExecuted=true;return"0"}var y=this,o=_$_WT_CLASS_$_,H=0,ea=0,P=null,Y={object:null,sourceId:null,mimeType:null,dropOffsetX:null,dragOffsetY:null,dropTarget:null,objectPrevStyle:null,xy:null},U=_$_FORM_OBJECTS_$_;o.button=function(d){return d.which?d.which==3?4:d.which==2?2:1:o.isIE&&typeof d.button!="undefined"?d.button==2?4:d.button==4?2:1:typeof d.button!="undefined"?d.button==2?4:d.button==1?2:1:0};var ca=[],z=[],ka=_$_RELATIVE_URL_$_,Q=false,ia=false,fa=false,J=null,O=null,V=
"complete"||h.readyState=="loaded")M(d)};document.getElementsByTagName("head")[0].appendChild(h)}}function p(d,c){this.callback=c;this.work=d.length;this.images=[];if(d.length==0)c(this.images);else for(c=0;c<d.length;c++)this.preload(d[c])}function r(d){if(d.ieAlternativeExecuted)return"0";x.emit(d.parentNode,"IeAltnernative");d.style.width="";d.ieAlternativeExecuted=true;return"0"}var x=this,o=_$_WT_CLASS_$_,G=0,da=0,O=null,Y={object:null,sourceId:null,mimeType:null,dropOffsetX:null,dragOffsetY:null,
false}if(f)N(d);else{var m=document.createElement("script");m.setAttribute("src",d);m.onload=function(){N(d)};m.onreadystatechange=function(){if(m.readyState=="complete"||m.readyState=="loaded")N(d)};document.getElementsByTagName("head")[0].appendChild(m)}}function p(d,c){this.callback=c;this.work=d.length;this.images=[];if(d.length==0)c(this.images);else for(c=0;c<d.length;c++)this.preload(d[c])}function r(d){if(d.ieAlternativeExecuted)return"0";y.emit(d.parentNode,"IeAltnernative");d.style.width="";d.ieAlternativeExecuted=true;return"0"}var y=this,o=_$_WT_CLASS_$_,H=0,ea=0,P=null,Y={object:null,sourceId:null,mimeType:null,dropOffsetX:null,dragOffsetY:null,dropTarget:null,objectPrevStyle:null,xy:null},U=_$_FORM_OBJECTS_$_;o.button=function(d){return d.which?d.which==3?4:d.which==2?2:1:o.isIE&&typeof d.button!="undefined"?d.button==2?4:d.button==4?2:1:typeof d.button!="undefined"?d.button==2?4:d.button==1?2:1:0};var ca=[],z=[],ka=_$_RELATIVE_URL_$_,Q=false,ia=false,fa=false,J=null,O=null,V=
c,e){if(!P){if(d==0){_$_$ifnot_DEBUG_$_();try{_$_$endif_$_();E(c);_$_$ifnot_DEBUG_$_()}catch(j){alert("Wt internal error: "+j+", code: "+j.code+", description: "+j.description)}_$_$endif_$_();e&&h(e)}else A=da.concat(A);da=[];if(L){clearTimeout(L);L=null}K=null;if(d>0)++X;else X=0;if(!P)if(ha||A.length>0)if(d==1){d=Math.min(12E4,Math.exp(X)*500);Q=setTimeout(function(){v()},d)}else v()}}function r(){K.abort();L=K=null;P||v()}function y(d,c,e,j){n.checkReleaseCapture(d,e);_$_$if_STRICTLY_SERIALIZED_EVENTS_$_();
d+"})();";window.execScript?window.execScript(d):window.eval(d)}q._p_.autoJavaScript()}function u(d,c,e){if(!P){if(d==0){_$_$ifnot_DEBUG_$_();try{_$_$endif_$_();E(c);_$_$ifnot_DEBUG_$_()}catch(j){alert("Wt internal error: "+j+", code: "+j.code+", description: "+j.description)}_$_$endif_$_();e&&h(e)}else A=da.concat(A);da=[];if(L){clearTimeout(L);L=null}K=null;if(d>0)++X;else X=0;if(!P)if(ha||A.length>0)if(d==1){d=Math.min(12E4,Math.exp(X)*500);Q=setTimeout(function(){v()},d)}else v()}}function r(){K.abort(); L=K=null;P||v()}function y(d,c,e,j){n.checkReleaseCapture(d,e);_$_$if_STRICTLY_SERIALIZED_EVENTS_$_();if(!K){_$_$endif_$_();var m={},i=A.length;m.object=d;m.signal=c;m.event=e;m.feedback=j;A[i]=B(m,i);x();E();_$_$if_STRICTLY_SERIALIZED_EVENTS_$_()}_$_$endif_$_()}function x(){if(K!=null&&L!=null){clearTimeout(L);K.abort();K=null}if(K==null)if(Q==null){Q=setTimeout(function(){v()},n.updateDelay);ia=(new Date).getTime()}else if(X){clearTimeout(Q);v()}else if((new Date).getTime()-ia>n.updateDelay){clearTimeout(Q);
c,e){if(!P){if(d==0){_$_$ifnot_DEBUG_$_();try{_$_$endif_$_();E(c);_$_$ifnot_DEBUG_$_()}catch(j){alert("Wt internal error: "+j+", code: "+j.code+", description: "+j.description)}_$_$endif_$_();e&&h(e)}else A=da.concat(A);da=[];if(L){clearTimeout(L);L=null}K=null;if(d>0)++X;else X=0;if(!P)if(ha||A.length>0)if(d==1){d=Math.min(12E4,Math.exp(X)*500);Q=setTimeout(function(){v()},d)}else v()}}function r(){K.abort();L=K=null;P||v()}function y(d,c,e,j){n.checkReleaseCapture(d,e);_$_$if_STRICTLY_SERIALIZED_EVENTS_$_();
null){N=setTimeout(function(){A()},n.updateDelay);fa=(new Date).getTime()}else if(U){clearTimeout(N);A()}else if((new Date).getTime()-fa>n.updateDelay){clearTimeout(N);A()}}function R(d){ca=d;p._p_.comm.responseReceived(d)}function A(){N=null;if(ba){if(!ga){if(confirm("The application was quited, do you want to restart?"))document.location=document.location;ga=true}}else{var d,c,e,h="&rand="+Math.round(Math.random(ha)*1E5);if(x.length>0){d=f();c=d.feedback?setTimeout(r,_$_INDICATOR_TIMEOUT_$_):null;
c.object=null}}function R(d,c){var e,h;h=d.event;c=c>0?"&e"+c:"&";e=c+"signal="+d.signal;if(d.id){e+=c+"id="+d.id+c+"name="+encodeURIComponent(d.name)+c+"an="+d.args.length;for(var i=0;i<d.args.length;++i)e+=c+"a"+i+"="+encodeURIComponent(d.args[i])}for(var j=0;j<B.length;++j){var r=g.getElement(B[j]),v=null,W;if(r!=null){if(r.type=="select-multiple"){i=0;for(W=r.options.length;i<W;i++)if(r.options[i].selected)e+=c+B[j]+"="+encodeURIComponent(r.options[i].value)}else if(g.hasTag(r,"SPAN")){i=0;for(W= r.childNodes.length;i<W;++i)if(r.childNodes[i].type=="checkbox"){i=r.childNodes[i];if(i.style.display=="none")v="indeterminate";else if(i.checked)v=i.value;break}}else if(r.type=="checkbox"||r.type=="radio")if(r.indeterminate)v="indeterminate";else{if(r.checked)v=r.value}else if(r.type!="file")v=$(r).hasClass("Wt-edit-emptyText")?"":""+r.value;if(v!=null)e+=c+B[j]+"="+encodeURIComponent(v)}}if(s!=null)e+=c+"_="+encodeURIComponent(unescape(s));if(!h){d.data=e;return d}for(j=h.target||h.srcElement;!j.id&& j.parentNode;)j=j.parentNode;if(j.id)e+=c+"tid="+j.id;try{e+=c+"type="+h.type}catch(ja){}if(h.clientX||h.clientY)e+=c+"clientX="+h.clientX+c+"clientY="+h.clientY;v=g.pageCoordinates(h);j=v.x;v=v.y;if(j||v){e+=c+"documentX="+j+c+"documentY="+v;e+=c+"dragdX="+(j-o)+c+"dragdY="+(v-p)}if(h.screenX||h.screenY)e+=c+"screenX="+h.screenX+c+"screenY="+h.screenY;if(d.object&&d.object.nodeType!=9){i=g.widgetPageCoordinates(d.object);e+=c+"scrollX="+d.object.scrollLeft+c+"scrollY="+d.object.scrollTop+c+"width="+ d.object.clientWidth+c+"height="+d.object.clientHeight+c+"widgetX="+(j-i.x)+c+"widgetY="+(v-i.y)}if(h.which)e+=c+"right="+(h.which==3);else if(h.button)e+=c+"right="+(h.button==2);if(typeof h.keyCode!=="undefined")e+=c+"keyCode="+h.keyCode;if(typeof h.charCode!=="undefined")e+=c+"charCode="+h.charCode;if(h.altKey)e+=c+"altKey=1";if(h.ctrlKey)e+=c+"ctrlKey=1";if(h.metaKey)e+=c+"metaKey=1";if(h.shiftKey)e+=c+"shiftKey=1";d.data=e;return d}function a(){for(var d="",c=false,e=0;e<z.length;++e){c=c||z[e].feedback;
null){N=setTimeout(function(){A()},n.updateDelay);fa=(new Date).getTime()}else if(U){clearTimeout(N);A()}else if((new Date).getTime()-fa>n.updateDelay){clearTimeout(N);A()}}function R(d){ca=d;p._p_.comm.responseReceived(d)}function A(){N=null;if(ba){if(!ga){if(confirm("The application was quited, do you want to restart?"))document.location=document.location;ga=true}}else{var d,c,e,h="&rand="+Math.round(Math.random(ha)*1E5);if(x.length>0){d=f();c=d.feedback?setTimeout(r,_$_INDICATOR_TIMEOUT_$_):null;
true);return this.discover(a)}};function R(a){a=m(a,A,B,"complexType");var b=a.length,d,c;for(c=0;c<b;c++){d=a.item(c);if(d.getAttribute("name")==="row")return d}return null}Xmla.Rowset=function(a,b){this._initData(a,b);return this};Xmla.Rowset.MD_DIMTYPE_UNKNOWN=0;Xmla.Rowset.MD_DIMTYPE_TIME=1;Xmla.Rowset.MD_DIMTYPE_MEASURE=2;Xmla.Rowset.MD_DIMTYPE_OTHER=3;Xmla.Rowset.MD_DIMTYPE_QUANTITATIVE=5;Xmla.Rowset.MD_DIMTYPE_ACCOUNTS=6;Xmla.Rowset.MD_DIMTYPE_CUSTOMERS=7;Xmla.Rowset.MD_DIMTYPE_PRODUCTS=8;
true);return this.discover(a)}};function R(a){a=o(a,z,A,"complexType");var b=a.length,d,c;for(c=0;c<b;c+=1){d=a.item(c);if(d.getAttribute("name")==="row")return d}return null}Xmla.Rowset=function(a,b){this._initData(a,b);return this};Xmla.Rowset.MD_DIMTYPE_UNKNOWN=0;Xmla.Rowset.MD_DIMTYPE_TIME=1;Xmla.Rowset.MD_DIMTYPE_MEASURE=2;Xmla.Rowset.MD_DIMTYPE_OTHER=3;Xmla.Rowset.MD_DIMTYPE_QUANTITATIVE=5;Xmla.Rowset.MD_DIMTYPE_ACCOUNTS=6;Xmla.Rowset.MD_DIMTYPE_CUSTOMERS=7;Xmla.Rowset.MD_DIMTYPE_PRODUCTS=8;
true);return this.discover(a)}};function R(a){a=m(a,A,B,"complexType");var b=a.length,d,c;for(c=0;c<b;c++){d=a.item(c);if(d.getAttribute("name")==="row")return d}return null}Xmla.Rowset=function(a,b){this._initData(a,b);return this};Xmla.Rowset.MD_DIMTYPE_UNKNOWN=0;Xmla.Rowset.MD_DIMTYPE_TIME=1;Xmla.Rowset.MD_DIMTYPE_MEASURE=2;Xmla.Rowset.MD_DIMTYPE_OTHER=3;Xmla.Rowset.MD_DIMTYPE_QUANTITATIVE=5;Xmla.Rowset.MD_DIMTYPE_ACCOUNTS=6;Xmla.Rowset.MD_DIMTYPE_CUSTOMERS=7;Xmla.Rowset.MD_DIMTYPE_PRODUCTS=8;
else return 'url('+E+G+H+I+')';});};if(!l[p]){var v=s.preload;if(v&&v.length>0){t(v);a.imageCacher.load(v,function(){l[p]=1;n(o,p,q,r);});return;}l[p]=1;}q=s[q];var w=!q||!!q._isLoaded;if(w)r&&r();else{var x=q._pending||(q._pending=[]);x.push(r);if(x.length>1)return;var y=!q.css||!q.css.length,z=!q.js||!q.js.length,A=function(){if(y&&z){q._isLoaded=1;for(var D=0;D<x.length;D++){if(x[D])x[D]();}}};if(!y){var B=q.css;if(e.isArray(B)){t(B);for(var C=0;C<B.length;C++)a.document.appendStyleSheet(B[C]);}else{B=u(B,a.getUrl(m[p]));a.document.appendStyleText(B);}q.css=B;y=1;}if(!z){t(q.js);a.scriptLoader.load(q.js,function(){z=1;A();});}A();}};return{add:function(o,p){k[o]=p;p.skinPath=m[o]||(m[o]=a.getUrl('skins/'+o+'/'));},load:function(o,p,q){var r=o.skinName,s=o.skinPath;if(k[r])n(o,r,p,q);else{m[r]=s;a.scriptLoader.load(a.getUrl(s+'skin.js'),function(){n(o,r,p,q);});}}};})();a.themes=new a.resourceManager('themes/','theme');a.ui=function(k){if(k.ui)return k.ui;this._={handlers:{},items:{},editor:k};return this;};var k=a.ui;k.prototype={add:function(l,m,n){this._.items[l]={type:m,command:n.command||null,args:Array.prototype.slice.call(arguments,2)};},create:function(l){var q=this;var m=q._.items[l],n=m&&q._.handlers[m.type],o=m&&m.command&&q._.editor.getCommand(m.command),p=n&&n.create.apply(q,m.args);if(o)o.uiItems.push(p);return p;},addHandler:function(l,m){this._.handlers[l]=m;}};(function(){var l=0,m=function(){var x='editor'+ ++l;return a.instances&&a.instances[x]?m():x;},n={},o=function(x){var y=x.config.customConfig;if(!y)return false;y=a.getUrl(y);var z=n[y]||(n[y]={});if(z.fn){z.fn.call(x,x.config);if(a.getUrl(x.config.customConfig)==y||!o(x))x.fireOnce('customConfigLoaded');}else a.scriptLoader.load(y,function(){if(a.editorConfig)z.fn=a.editorConfig;else z.fn=function(){};o(x);});return true;},p=function(x,y){x.on('customConfigLoaded',function(){if(y){if(y.on)for(var z in y.on)x.on(z,y.on[z]);e.extend(x.config,y,true);delete x.config.on;}q(x);});if(y&&y.customConfig!=undefined)x.config.customConfig=y.customConfig;if(!o(x))x.fireOnce('customConfigLoaded');},q=function(x){var y=x.config.skin.split(','),z=y[0],A=a.getUrl(y[1]||'skins/'+z+'/');x.skinName=z;x.skinPath=A;x.skinClass='cke_skin_'+z;x.tabIndex=x.config.tabIndex||x.element.getAttribute('tabindex')||0;x.fireOnce('configLoaded');t(x);},r=function(x){a.lang.load(x.config.language,x.config.defaultLanguage,function(y,z){x.langCode=y;x.lang=e.prototypedCopy(z);if(b.gecko&&b.version<10900&&x.lang.dir=='rtl')x.lang.dir='ltr'; s(x);});},s=function(x){var y=x.config,z=y.plugins,A=y.extraPlugins,B=y.removePlugins;if(A){var C=new RegExp('(?:^|,)(?:'+A.replace(/\s*,\s*/g,'|')+')(?=,|$)','g');z=z.replace(C,'');z+=','+A;}if(B){C=new RegExp('(?:^|,)(?:'+B.replace(/\s*,\s*/g,'|')+')(?=,|$)','g');z=z.replace(C,'');}j.load(z.split(','),function(D){var E=[],F=[],G=[];x.plugins=D;for(var H in D){var I=D[H],J=I.lang,K=j.getPath(H),L=null;I.path=K;if(J){L=e.indexOf(J,x.langCode)>=0?x.langCode:J[0];if(!I.lang[L])G.push(a.getUrl(K+'lang/'+L+'.js'));else{e.extend(x.lang,I.lang[L]);L=null;}}F.push(L);E.push(I);}a.scriptLoader.load(G,function(){var M=['beforeInit','init','afterInit'];for(var N=0;N<M.length;N++)for(var O=0;O<E.length;O++){var P=E[O];if(N===0&&F[O]&&P.lang)e.extend(x.lang,P.lang[F[O]]);if(P[M[N]])P[M[N]](x);}x.fire('pluginsLoaded');u(x);});});},t=function(x){a.skins.load(x,'editor',function(){r(x);});},u=function(x){var y=x.config.theme;a.themes.load(y,function(){var z=x.theme=a.themes.get(y);z.path=a.themes.getPath(y);z.build(x);if(x.config.autoUpdateElement)v(x);});},v=function(x){var y=x.element;if(x.elementMode==1&&y.is('textarea')){var z=y.$.form&&new h(y.$.form);if(z){function A(){x.updateElement();};z.on('submit',A);if(!z.$.submit.nodeName)z.$.submit=e.override(z.$.submit,function(B){return function(){x.updateElement();if(B.apply)B.apply(this,arguments);else B();};});x.on('destroy',function(){z.removeListener('submit',A);});}}};function w(){var x,y=this._.commands,z=this.mode;for(var A in y){x=y[A];x[x.startDisabled?'disable':x.modes[z]?'enable':'disable']();}};a.editor.prototype._init=function(){var z=this;var x=h.get(z._.element),y=z._.instanceConfig;delete z._.element;delete z._.instanceConfig;z._.commands={};z._.styles=[];z.element=x;z.name=x&&z.elementMode==1&&(x.getId()||x.getNameAtt())||m();if(z.name in a.instances)throw '[CKEDITOR.editor] The instance "'+z.name+'" already exists.';z.config=e.prototypedCopy(i);z.ui=new k(z);z.focusManager=new a.focusManager(z);a.fire('instanceCreated',null,z);z.on('mode',w,null,null,1);p(z,y);};})();e.extend(a.editor.prototype,{addCommand:function(l,m){return this._.commands[l]=new a.command(this,m);},addCss:function(l){this._.styles.push(l);},destroy:function(l){var r=this;if(!l)r.updateElement();if(r.mode)r._.modes[r.mode].unload(r.getThemeSpace('contents'));r.theme.destroy(r);var m,n=0,o,p,q;if(r.toolbox){m=r.toolbox.toolbars;for(;n<m.length;n++){p=m[n].items;for(o=0;o<p.length;o++){q=p[o];if(q.clickFn)e.removeFunction(q.clickFn);if(q.keyDownFn)e.removeFunction(q.keyDownFn);
for(var C=0;C<B.length;C++)a.document.appendStyleSheet(B[C]);}else{B=u(B,a.getUrl(m[p]));a.document.appendStyleText(B);}q.css=B;y=1;}if(!z){t(q.js);a.scriptLoader.load(q.js,function(){z=1;A();});}A();}};return{add:function(o,p){k[o]=p;p.skinPath=m[o]||(m[o]=a.getUrl('skins/'+o+'/'));},load:function(o,p,q){var r=o.skinName,s=o.skinPath;if(k[r])n(o,r,p,q);else{m[r]=s;a.scriptLoader.load(a.getUrl(s+'skin.js'),function(){n(o,r,p,q);});}}};})();a.themes=new a.resourceManager('themes/','theme');a.ui=function(k){if(k.ui)return k.ui;this._={handlers:{},items:{},editor:k};return this;};var k=a.ui;k.prototype={add:function(l,m,n){this._.items[l]={type:m,command:n.command||null,args:Array.prototype.slice.call(arguments,2)};},create:function(l){var q=this;var m=q._.items[l],n=m&&q._.handlers[m.type],o=m&&m.command&&q._.editor.getCommand(m.command),p=n&&n.create.apply(q,m.args);if(o)o.uiItems.push(p);return p;},addHandler:function(l,m){this._.handlers[l]=m;}};(function(){var l=0,m=function(){var x='editor'+ ++l;return a.instances&&a.instances[x]?m():x;},n={},o=function(x){var y=x.config.customConfig;if(!y)return false;y=a.getUrl(y);var z=n[y]||(n[y]={});if(z.fn){z.fn.call(x,x.config);if(a.getUrl(x.config.customConfig)==y||!o(x))x.fireOnce('customConfigLoaded');}else a.scriptLoader.load(y,function(){if(a.editorConfig)z.fn=a.editorConfig;else z.fn=function(){};o(x);});return true;},p=function(x,y){x.on('customConfigLoaded',function(){if(y){if(y.on)for(var z in y.on)x.on(z,y.on[z]);e.extend(x.config,y,true);delete x.config.on;}q(x);});if(y&&y.customConfig!=undefined)x.config.customConfig=y.customConfig;if(!o(x))x.fireOnce('customConfigLoaded');},q=function(x){var y=x.config.skin.split(','),z=y[0],A=a.getUrl(y[1]||'skins/'+z+'/');x.skinName=z;x.skinPath=A;x.skinClass='cke_skin_'+z;x.tabIndex=x.config.tabIndex||x.element.getAttribute('tabindex')||0;x.fireOnce('configLoaded');t(x);},r=function(x){a.lang.load(x.config.language,x.config.defaultLanguage,function(y,z){x.langCode=y;x.lang=e.prototypedCopy(z);if(b.gecko&&b.version<10900&&x.lang.dir=='rtl')x.lang.dir='ltr';var A=x.config;A.contentsLangDirection=='ui'&&(A.contentsLangDirection=x.lang.dir);s(x);});},s=function(x){var y=x.config,z=y.plugins,A=y.extraPlugins,B=y.removePlugins;if(A){var C=new RegExp('(?:^|,)(?:'+A.replace(/\s*,\s*/g,'|')+')(?=,|$)','g');z=z.replace(C,'');z+=','+A;}if(B){C=new RegExp('(?:^|,)(?:'+B.replace(/\s*,\s*/g,'|')+')(?=,|$)','g');z=z.replace(C,'');}j.load(z.split(','),function(D){var E=[],F=[],G=[];
else return 'url('+E+G+H+I+')';});};if(!l[p]){var v=s.preload;if(v&&v.length>0){t(v);a.imageCacher.load(v,function(){l[p]=1;n(o,p,q,r);});return;}l[p]=1;}q=s[q];var w=!q||!!q._isLoaded;if(w)r&&r();else{var x=q._pending||(q._pending=[]);x.push(r);if(x.length>1)return;var y=!q.css||!q.css.length,z=!q.js||!q.js.length,A=function(){if(y&&z){q._isLoaded=1;for(var D=0;D<x.length;D++){if(x[D])x[D]();}}};if(!y){var B=q.css;if(e.isArray(B)){t(B);for(var C=0;C<B.length;C++)a.document.appendStyleSheet(B[C]);}else{B=u(B,a.getUrl(m[p]));a.document.appendStyleText(B);}q.css=B;y=1;}if(!z){t(q.js);a.scriptLoader.load(q.js,function(){z=1;A();});}A();}};return{add:function(o,p){k[o]=p;p.skinPath=m[o]||(m[o]=a.getUrl('skins/'+o+'/'));},load:function(o,p,q){var r=o.skinName,s=o.skinPath;if(k[r])n(o,r,p,q);else{m[r]=s;a.scriptLoader.load(a.getUrl(s+'skin.js'),function(){n(o,r,p,q);});}}};})();a.themes=new a.resourceManager('themes/','theme');a.ui=function(k){if(k.ui)return k.ui;this._={handlers:{},items:{},editor:k};return this;};var k=a.ui;k.prototype={add:function(l,m,n){this._.items[l]={type:m,command:n.command||null,args:Array.prototype.slice.call(arguments,2)};},create:function(l){var q=this;var m=q._.items[l],n=m&&q._.handlers[m.type],o=m&&m.command&&q._.editor.getCommand(m.command),p=n&&n.create.apply(q,m.args);if(o)o.uiItems.push(p);return p;},addHandler:function(l,m){this._.handlers[l]=m;}};(function(){var l=0,m=function(){var x='editor'+ ++l;return a.instances&&a.instances[x]?m():x;},n={},o=function(x){var y=x.config.customConfig;if(!y)return false;y=a.getUrl(y);var z=n[y]||(n[y]={});if(z.fn){z.fn.call(x,x.config);if(a.getUrl(x.config.customConfig)==y||!o(x))x.fireOnce('customConfigLoaded');}else a.scriptLoader.load(y,function(){if(a.editorConfig)z.fn=a.editorConfig;else z.fn=function(){};o(x);});return true;},p=function(x,y){x.on('customConfigLoaded',function(){if(y){if(y.on)for(var z in y.on)x.on(z,y.on[z]);e.extend(x.config,y,true);delete x.config.on;}q(x);});if(y&&y.customConfig!=undefined)x.config.customConfig=y.customConfig;if(!o(x))x.fireOnce('customConfigLoaded');},q=function(x){var y=x.config.skin.split(','),z=y[0],A=a.getUrl(y[1]||'skins/'+z+'/');x.skinName=z;x.skinPath=A;x.skinClass='cke_skin_'+z;x.tabIndex=x.config.tabIndex||x.element.getAttribute('tabindex')||0;x.fireOnce('configLoaded');t(x);},r=function(x){a.lang.load(x.config.language,x.config.defaultLanguage,function(y,z){x.langCode=y;x.lang=e.prototypedCopy(z);if(b.gecko&&b.version<10900&&x.lang.dir=='rtl')x.lang.dir='ltr';s(x);});},s=function(x){var y=x.config,z=y.plugins,A=y.extraPlugins,B=y.removePlugins;if(A){var C=new RegExp('(?:^|,)(?:'+A.replace(/\s*,\s*/g,'|')+')(?=,|$)','g');z=z.replace(C,'');z+=','+A;}if(B){C=new RegExp('(?:^|,)(?:'+B.replace(/\s*,\s*/g,'|')+')(?=,|$)','g');z=z.replace(C,'');}j.load(z.split(','),function(D){var E=[],F=[],G=[];x.plugins=D;for(var H in D){var I=D[H],J=I.lang,K=j.getPath(H),L=null;I.path=K;if(J){L=e.indexOf(J,x.langCode)>=0?x.langCode:J[0];if(!I.lang[L])G.push(a.getUrl(K+'lang/'+L+'.js'));else{e.extend(x.lang,I.lang[L]);L=null;}}F.push(L);E.push(I);}a.scriptLoader.load(G,function(){var M=['beforeInit','init','afterInit'];for(var N=0;N<M.length;N++)for(var O=0;O<E.length;O++){var P=E[O];if(N===0&&F[O]&&P.lang)e.extend(x.lang,P.lang[F[O]]);if(P[M[N]])P[M[N]](x);}x.fire('pluginsLoaded');u(x);});});},t=function(x){a.skins.load(x,'editor',function(){r(x);});},u=function(x){var y=x.config.theme;a.themes.load(y,function(){var z=x.theme=a.themes.get(y);z.path=a.themes.getPath(y);z.build(x);if(x.config.autoUpdateElement)v(x);});},v=function(x){var y=x.element;if(x.elementMode==1&&y.is('textarea')){var z=y.$.form&&new h(y.$.form);if(z){function A(){x.updateElement();};z.on('submit',A);if(!z.$.submit.nodeName)z.$.submit=e.override(z.$.submit,function(B){return function(){x.updateElement();if(B.apply)B.apply(this,arguments);else B();};});x.on('destroy',function(){z.removeListener('submit',A);});}}};function w(){var x,y=this._.commands,z=this.mode;for(var A in y){x=y[A];x[x.startDisabled?'disable':x.modes[z]?'enable':'disable']();}};a.editor.prototype._init=function(){var z=this;var x=h.get(z._.element),y=z._.instanceConfig;delete z._.element;delete z._.instanceConfig;z._.commands={};z._.styles=[];z.element=x;z.name=x&&z.elementMode==1&&(x.getId()||x.getNameAtt())||m();if(z.name in a.instances)throw '[CKEDITOR.editor] The instance "'+z.name+'" already exists.';z.config=e.prototypedCopy(i);z.ui=new k(z);z.focusManager=new a.focusManager(z);a.fire('instanceCreated',null,z);z.on('mode',w,null,null,1);p(z,y);};})();e.extend(a.editor.prototype,{addCommand:function(l,m){return this._.commands[l]=new a.command(this,m);},addCss:function(l){this._.styles.push(l);},destroy:function(l){var r=this;if(!l)r.updateElement();if(r.mode)r._.modes[r.mode].unload(r.getThemeSpace('contents'));r.theme.destroy(r);var m,n=0,o,p,q;if(r.toolbox){m=r.toolbox.toolbars;for(;n<m.length;n++){p=m[n].items;for(o=0;o<p.length;o++){q=p[o];if(q.clickFn)e.removeFunction(q.clickFn);if(q.keyDownFn)e.removeFunction(q.keyDownFn);
(function(x,v){function Y(){if(!d.isReady){try{r.documentElement.doScroll("left")}catch(a){setTimeout(Y,1);return}d.ready()}}function ra(a,b){b.src?d.ajax({url:b.src,async:false,dataType:"script"}):d.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function S(a,b,e,g,h,k){var l=a.length;if(typeof b==="object"){for(var q in b)S(a,q,b[q],g,h,e);return a}if(e!==v){g=g&&d.isFunction(e);for(q=0;q<l;q++)h(a[q],b,g?e.call(a[q],q,h(a[q],b)):e,k);return a}return l?
(function(x,v){function Y(){if(!c.isReady){try{r.documentElement.doScroll("left")}catch(a){setTimeout(Y,1);return}c.ready()}}function ra(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function S(a,b,e,f,h,k){var l=a.length;if(typeof b==="object"){for(var q in b)S(a,q,b[q],f,h,e);return a}if(e!==v){f=f&&c.isFunction(e);for(q=0;q<l;q++)h(a[q],b,f?e.call(a[q],q,h(a[q],b)):e,k);return a}return l?
(function(x,v){function Y(){if(!d.isReady){try{r.documentElement.doScroll("left")}catch(a){setTimeout(Y,1);return}d.ready()}}function ra(a,b){b.src?d.ajax({url:b.src,async:false,dataType:"script"}):d.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function S(a,b,e,g,h,k){var l=a.length;if(typeof b==="object"){for(var q in b)S(a,q,b[q],g,h,e);return a}if(e!==v){g=g&&d.isFunction(e);for(q=0;q<l;q++)h(a[q],b,g?e.call(a[q],q,h(a[q],b)):e,k);return a}return l?
if (val == undefined) {
if (val === undefined) {
function RangeInput(input, conf) { // private variables var self = this, css = conf.css, root = $("<div><div/><a href='#'/></div>").data("rangeinput", self), value, // current value origo, // handle's start point len, // length of the range pos; // current position of the handle // create range input.before(root); var handle = root.addClass(css.slider).find("a").addClass(css.handle), progress = root.find("div").addClass(css.progress), vertical = conf.vertical || dim(root, "height") > dim(root, "width"); // get (HTML5) attributes into configuration $.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); if (val || val === 0) { conf[key] = parseFloat(val, 10); } }); var range = conf.max - conf.min, step = conf.step == 'any' ? 0 : conf.step, precision = conf.precision; if (precision === undefined) { try { precision = step.toString().split(".")[1].length; } catch (err) { precision = 0; } } // Replace built-in range input (type attribute cannot be changed) if (input.attr("type") == 'range') { var tmp = $("<input/>").attr("name", input.attr("name")); input.replaceWith(tmp); input = tmp; } input.addClass(css.input); var fire = $(self).add(input), fireOnSlide = true; /** The flesh and bone of this tool. All sliding is routed trough this. @param evt types include: click, keydown, blur and api (setValue call) @param isSetValue when called trough setValue() call (keydown, blur, api) vertical configuration gives additional complexity. */ function slide(evt, x, val, isSetValue) { // calculate value based on slide position if (val == undefined) { val = x / len * range; // x is calculated based on val. we need to strip off min during calculation } else if (isSetValue) { val -= conf.min; } // increment in steps if (step) { val = Math.round(val / step) * step; } // count x based on value or tweak x if stepping is done if (x == undefined || step) { x = val * len / range; } // nothing changes or out of range --> return if (isNaN(val) || val == value) { return self; } // stay within range x = Math.max(0, Math.min(x, len)); val = x / len * range; if (isSetValue || !vertical) { val += conf.min; } // in vertical ranges value rises upwards if (vertical) { if (isSetValue) { x = len -x; } else { val = conf.max - val; } } // precision val = round(val, precision); // onSlide var isClick = evt.type == "click"; if (fireOnSlide && value !== undefined && !isClick) { evt.type = "onSlide"; fire.trigger(evt, [val, x]); if (evt.isDefaultPrevented()) { return self; } } // speed & callback var speed = isClick ? conf.speed : 0, callback = isClick ? function() { evt.type = "change"; fire.trigger(evt, [val]); } : null; if (vertical) { handle.animate({top: x}, speed, callback); if (conf.progress) { progress.animate({height: len - x + handle.width() / 2}, speed); } } else { handle.animate({left: x}, speed, callback); if (conf.progress) { progress.animate({width: x + handle.width() / 2}, speed); } } // store current value value = val; pos = x; // se input field's value input.val(val); // HTML5 attribute input[0].valueAsNumber = val; return self; } $.extend(self, { getValue: function() { return value; }, setValue: function(val, e) { return slide(e || $.Event("api"), undefined, val, true); }, getConf: function() { return conf; }, getProgress: function() { return progress; }, getHandle: function() { return handle; }, getInput: function() { return input; }, step: function(am, e) { e = e || $.Event(); var step = conf.step == 'any' ? 1 : conf.step; self.setValue(value + step * (am || 1), e); }, // HTML5 compatible name stepUp: function(am) { return self.step(am || 1) }, // HTML5 compatible name stepDown: function(am) { return self.step(-am || -1) } }); // callbacks $.each("onSlide,change".split(","), function(i, name) { // from configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API methods self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // dragging handle.drag({drag: false}).bind("dragStart", function() { /* do some pre- calculations for seek() function. improves performance */ // avoid redundant event triggering (= heavy stuff) fireOnSlide = hasEvent($(self)) || hasEvent(input); }).bind("drag", function(e, y, x) { if (input.is(":disabled")) { return false; } slide(e, vertical ? y : x); }).bind("dragEnd", function(e) { if (!e.isDefaultPrevented()) { e.type = "change"; fire.trigger(e, [value]); } }).click(function(e) { return e.preventDefault(); }); // clicking root.click(function(e) { if (input.is(":disabled") || e.target == handle[0]) { return e.preventDefault(); } if (!origo) { init(); } var fix = handle.width() / 2; slide(e, vertical ? -(origo -e.pageY +fix) + len : e.pageX -origo -fix); }); if (conf.keyboard) { input.keydown(function(e) { if (input.attr("readonly")) { return; } var key = e.keyCode, up = $([75, 76, 38, 33, 39]).index(key) != -1, down = $([74, 72, 40, 34, 37]).index(key) != -1; if ((up || down) && !(e.shiftKey || e.altKey || e.ctrlKey)) { // UP: k=75, l=76, up=38, pageup=33, right=39 if (up) { self.step(key == 33 ? 10 : 1, e); // DOWN: j=74, h=72, down=40, pagedown=34, left=37 } else if (down) { self.step(key == 34 ? -10 : -1, e); } return e.preventDefault(); } }); } input.blur(function(e) { var val = $(this).val(); if (val !== value) { self.setValue(val, e); } }); // HTML5 DOM methods $.extend(input[0], { stepUp: self.stepUp, stepDown: self.stepDown}); function init() { if (vertical) { len = dim(root, "height") - dim(handle, "height"); origo = root.offset().top + len; } else { len = dim(root, "width") - dim(handle, "width"); origo = root.offset().left; } } init(); self.setValue(input.val() || conf.value || conf.min); }
if (isNaN(val) || val == value) { return self; }
if (isNaN(val)) { return self; }
function RangeInput(input, conf) { // private variables var self = this, css = conf.css, root = $("<div><div/><a href='#'/></div>").data("rangeinput", self), value, // current value origo, // handle's start point len, // length of the range pos; // current position of the handle // create range input.before(root); var handle = root.addClass(css.slider).find("a").addClass(css.handle), progress = root.find("div").addClass(css.progress), vertical = conf.vertical || dim(root, "height") > dim(root, "width"); // get (HTML5) attributes into configuration $.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); if (val || val === 0) { conf[key] = parseFloat(val, 10); } }); var range = conf.max - conf.min, step = conf.step == 'any' ? 0 : conf.step, precision = conf.precision; if (precision === undefined) { try { precision = step.toString().split(".")[1].length; } catch (err) { precision = 0; } } // Replace built-in range input (type attribute cannot be changed) if (input.attr("type") == 'range') { var tmp = $("<input/>").attr("name", input.attr("name")); input.replaceWith(tmp); input = tmp; } input.addClass(css.input); var fire = $(self).add(input), fireOnSlide = true; /** The flesh and bone of this tool. All sliding is routed trough this. @param evt types include: click, keydown, blur and api (setValue call) @param isSetValue when called trough setValue() call (keydown, blur, api) vertical configuration gives additional complexity. */ function slide(evt, x, val, isSetValue) { // calculate value based on slide position if (val == undefined) { val = x / len * range; // x is calculated based on val. we need to strip off min during calculation } else if (isSetValue) { val -= conf.min; } // increment in steps if (step) { val = Math.round(val / step) * step; } // count x based on value or tweak x if stepping is done if (x == undefined || step) { x = val * len / range; } // nothing changes or out of range --> return if (isNaN(val) || val == value) { return self; } // stay within range x = Math.max(0, Math.min(x, len)); val = x / len * range; if (isSetValue || !vertical) { val += conf.min; } // in vertical ranges value rises upwards if (vertical) { if (isSetValue) { x = len -x; } else { val = conf.max - val; } } // precision val = round(val, precision); // onSlide var isClick = evt.type == "click"; if (fireOnSlide && value !== undefined && !isClick) { evt.type = "onSlide"; fire.trigger(evt, [val, x]); if (evt.isDefaultPrevented()) { return self; } } // speed & callback var speed = isClick ? conf.speed : 0, callback = isClick ? function() { evt.type = "change"; fire.trigger(evt, [val]); } : null; if (vertical) { handle.animate({top: x}, speed, callback); if (conf.progress) { progress.animate({height: len - x + handle.width() / 2}, speed); } } else { handle.animate({left: x}, speed, callback); if (conf.progress) { progress.animate({width: x + handle.width() / 2}, speed); } } // store current value value = val; pos = x; // se input field's value input.val(val); // HTML5 attribute input[0].valueAsNumber = val; return self; } $.extend(self, { getValue: function() { return value; }, setValue: function(val, e) { return slide(e || $.Event("api"), undefined, val, true); }, getConf: function() { return conf; }, getProgress: function() { return progress; }, getHandle: function() { return handle; }, getInput: function() { return input; }, step: function(am, e) { e = e || $.Event(); var step = conf.step == 'any' ? 1 : conf.step; self.setValue(value + step * (am || 1), e); }, // HTML5 compatible name stepUp: function(am) { return self.step(am || 1) }, // HTML5 compatible name stepDown: function(am) { return self.step(-am || -1) } }); // callbacks $.each("onSlide,change".split(","), function(i, name) { // from configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API methods self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // dragging handle.drag({drag: false}).bind("dragStart", function() { /* do some pre- calculations for seek() function. improves performance */ // avoid redundant event triggering (= heavy stuff) fireOnSlide = hasEvent($(self)) || hasEvent(input); }).bind("drag", function(e, y, x) { if (input.is(":disabled")) { return false; } slide(e, vertical ? y : x); }).bind("dragEnd", function(e) { if (!e.isDefaultPrevented()) { e.type = "change"; fire.trigger(e, [value]); } }).click(function(e) { return e.preventDefault(); }); // clicking root.click(function(e) { if (input.is(":disabled") || e.target == handle[0]) { return e.preventDefault(); } if (!origo) { init(); } var fix = handle.width() / 2; slide(e, vertical ? -(origo -e.pageY +fix) + len : e.pageX -origo -fix); }); if (conf.keyboard) { input.keydown(function(e) { if (input.attr("readonly")) { return; } var key = e.keyCode, up = $([75, 76, 38, 33, 39]).index(key) != -1, down = $([74, 72, 40, 34, 37]).index(key) != -1; if ((up || down) && !(e.shiftKey || e.altKey || e.ctrlKey)) { // UP: k=75, l=76, up=38, pageup=33, right=39 if (up) { self.step(key == 33 ? 10 : 1, e); // DOWN: j=74, h=72, down=40, pagedown=34, left=37 } else if (down) { self.step(key == 34 ? -10 : -1, e); } return e.preventDefault(); } }); } input.blur(function(e) { var val = $(this).val(); if (val !== value) { self.setValue(val, e); } }); // HTML5 DOM methods $.extend(input[0], { stepUp: self.stepUp, stepDown: self.stepDown}); function init() { if (vertical) { len = dim(root, "height") - dim(handle, "height"); origo = root.offset().top + len; } else { len = dim(root, "width") - dim(handle, "width"); origo = root.offset().left; } } init(); self.setValue(input.val() || conf.value || conf.min); }
input[0].valueAsNumber = val;
function RangeInput(input, conf) { // private variables var self = this, css = conf.css, root = $("<div><div/><a href='#'/></div>").data("rangeinput", self), vertical, value, // current value origo, // handle's start point len, // length of the range pos; // current position of the handle // create range input.before(root); var handle = root.addClass(css.slider).find("a").addClass(css.handle), progress = root.find("div").addClass(css.progress); // get (HTML5) attributes into configuration $.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); if (parseFloat(val)) { conf[key] = parseFloat(val, 10); } }); var range = conf.max - conf.min, step = conf.step == 'any' ? 0 : conf.step, precision = conf.precision; if (precision === undefined) { try { precision = step.toString().split(".")[1].length; } catch (err) { precision = 0; } } // Replace built-in range input (type attribute cannot be changed) if (input.attr("type") == 'range') { var tmp = $("<input/>"); $.each("name,readonly,disabled".split(","), function(i, attr) { tmp.attr(attr, input.attr(attr)); }); tmp.val(conf.value); input.replaceWith(tmp); input = tmp; } input.addClass(css.input); var fire = $(self).add(input), fireOnSlide = true; /** The flesh and bone of this tool. All sliding is routed trough this. @param evt types include: click, keydown, blur and api (setValue call) @param isSetValue when called trough setValue() call (keydown, blur, api) vertical configuration gives additional complexity. */ function slide(evt, x, val, isSetValue) { // calculate value based on slide position if (val === undefined) { val = x / len * range; // x is calculated based on val. we need to strip off min during calculation } else if (isSetValue) { val -= conf.min; } // increment in steps if (step) { val = Math.round(val / step) * step; } // count x based on value or tweak x if stepping is done if (x === undefined || step) { x = val * len / range; } // crazy value? if (isNaN(val)) { return self; } // stay within range x = Math.max(0, Math.min(x, len)); val = x / len * range; if (isSetValue || !vertical) { val += conf.min; } // in vertical ranges value rises upwards if (vertical) { if (isSetValue) { x = len -x; } else { val = conf.max - val; } } // precision val = round(val, precision); // onSlide var isClick = evt.type == "click"; if (fireOnSlide && value !== undefined && !isClick) { evt.type = "onSlide"; fire.trigger(evt, [val, x]); if (evt.isDefaultPrevented()) { return self; } } // speed & callback var speed = isClick ? conf.speed : 0, callback = isClick ? function() { evt.type = "change"; fire.trigger(evt, [val]); } : null; if (vertical) { handle.animate({top: x}, speed, callback); if (conf.progress) { progress.animate({height: len - x + handle.width() / 2}, speed); } } else { handle.animate({left: x}, speed, callback); if (conf.progress) { progress.animate({width: x + handle.width() / 2}, speed); } } // store current value value = val; pos = x; // se input field's value input.val(val); // HTML5 attribute input[0].valueAsNumber = val; return self; } $.extend(self, { getValue: function() { return value; }, setValue: function(val, e) { return slide(e || $.Event("api"), undefined, val, true); }, getConf: function() { return conf; }, getProgress: function() { return progress; }, getHandle: function() { return handle; }, getInput: function() { return input; }, step: function(am, e) { e = e || $.Event(); var step = conf.step == 'any' ? 1 : conf.step; self.setValue(value + step * (am || 1), e); }, // HTML5 compatible name stepUp: function(am) { return self.step(am || 1); }, // HTML5 compatible name stepDown: function(am) { return self.step(-am || -1); } }); // callbacks $.each("onSlide,change".split(","), function(i, name) { // from configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API methods self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // dragging handle.drag({drag: false}).bind("dragStart", function() { /* do some pre- calculations for seek() function. improves performance */ // avoid redundant event triggering (= heavy stuff) fireOnSlide = hasEvent($(self)) || hasEvent(input); }).bind("drag", function(e, y, x) { if (input.is(":disabled")) { return false; } slide(e, vertical ? y : x); }).bind("dragEnd", function(e) { if (!e.isDefaultPrevented()) { e.type = "change"; fire.trigger(e, [value]); } }).click(function(e) { return e.preventDefault(); }); // clicking root.click(function(e) { if (input.is(":disabled") || e.target == handle[0]) { return e.preventDefault(); } init(); var fix = handle.width() / 2; slide(e, vertical ? len-origo-fix + e.pageY : e.pageX -origo -fix); }); if (conf.keyboard) { input.keydown(function(e) { if (input.attr("readonly")) { return; } var key = e.keyCode, up = $([75, 76, 38, 33, 39]).index(key) != -1, down = $([74, 72, 40, 34, 37]).index(key) != -1; if ((up || down) && !(e.shiftKey || e.altKey || e.ctrlKey)) { // UP: k=75, l=76, up=38, pageup=33, right=39 if (up) { self.step(key == 33 ? 10 : 1, e); // DOWN: j=74, h=72, down=40, pagedown=34, left=37 } else if (down) { self.step(key == 34 ? -10 : -1, e); } return e.preventDefault(); } }); } input.blur(function(e) { var val = $(this).val(); if (val !== value) { self.setValue(val, e); } }); // HTML5 DOM methods $.extend(input[0], { stepUp: self.stepUp, stepDown: self.stepDown}); // calculate all dimension related stuff function init() { vertical = conf.vertical || dim(root, "height") > dim(root, "width"); if (vertical) { len = dim(root, "height") - dim(handle, "height"); origo = root.offset().top + len; } else { len = dim(root, "width") - dim(handle, "width"); origo = root.offset().left; } } function begin() { init(); self.setValue(conf.value || conf.min); } begin(); // some browsers cannot get dimensions upon initialization if (!len) { $(window).load(begin); } }
$(self).bind(name, fn);
if (fn) { $(self).bind(name, fn); }
function RangeInput(input, conf) { // private variables var self = this, css = conf.css, root = $("<div><div/><a href='#'/></div>").data("rangeinput", self), vertical, value, // current value origo, // handle's start point len, // length of the range pos; // current position of the handle // create range input.before(root); var handle = root.addClass(css.slider).find("a").addClass(css.handle), progress = root.find("div").addClass(css.progress); // get (HTML5) attributes into configuration $.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); if (parseFloat(val)) { conf[key] = parseFloat(val, 10); } }); var range = conf.max - conf.min, step = conf.step == 'any' ? 0 : conf.step, precision = conf.precision; if (precision === undefined) { try { precision = step.toString().split(".")[1].length; } catch (err) { precision = 0; } } // Replace built-in range input (type attribute cannot be changed) if (input.attr("type") == 'range') { var tmp = $("<input/>"); $.each("class,disabled,id,maxlength,name,readonly,required,size,style,tabindex,title,value".split(","), function(i, attr) { tmp.attr(attr, input.attr(attr)); }); tmp.val(conf.value); input.replaceWith(tmp); input = tmp; } input.addClass(css.input); var fire = $(self).add(input), fireOnSlide = true; /** The flesh and bone of this tool. All sliding is routed trough this. @param evt types include: click, keydown, blur and api (setValue call) @param isSetValue when called trough setValue() call (keydown, blur, api) vertical configuration gives additional complexity. */ function slide(evt, x, val, isSetValue) { // calculate value based on slide position if (val === undefined) { val = x / len * range; // x is calculated based on val. we need to strip off min during calculation } else if (isSetValue) { val -= conf.min; } // increment in steps if (step) { val = Math.round(val / step) * step; } // count x based on value or tweak x if stepping is done if (x === undefined || step) { x = val * len / range; } // crazy value? if (isNaN(val)) { return self; } // stay within range x = Math.max(0, Math.min(x, len)); val = x / len * range; if (isSetValue || !vertical) { val += conf.min; } // in vertical ranges value rises upwards if (vertical) { if (isSetValue) { x = len -x; } else { val = conf.max - val; } } // precision val = round(val, precision); // onSlide var isClick = evt.type == "click"; if (fireOnSlide && value !== undefined && !isClick) { evt.type = "onSlide"; fire.trigger(evt, [val, x]); if (evt.isDefaultPrevented()) { return self; } } // speed & callback var speed = isClick ? conf.speed : 0, callback = isClick ? function() { evt.type = "change"; fire.trigger(evt, [val]); } : null; if (vertical) { handle.animate({top: x}, speed, callback); if (conf.progress) { progress.animate({height: len - x + handle.width() / 2}, speed); } } else { handle.animate({left: x}, speed, callback); if (conf.progress) { progress.animate({width: x + handle.width() / 2}, speed); } } // store current value value = val; pos = x; // se input field's value input.val(val); return self; } $.extend(self, { getValue: function() { return value; }, setValue: function(val, e) { return slide(e || $.Event("api"), undefined, val, true); }, getConf: function() { return conf; }, getProgress: function() { return progress; }, getHandle: function() { return handle; }, getInput: function() { return input; }, step: function(am, e) { e = e || $.Event(); var step = conf.step == 'any' ? 1 : conf.step; self.setValue(value + step * (am || 1), e); }, // HTML5 compatible name stepUp: function(am) { return self.step(am || 1); }, // HTML5 compatible name stepDown: function(am) { return self.step(-am || -1); } }); // callbacks $.each("onSlide,change".split(","), function(i, name) { // from configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API methods self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // dragging handle.drag({drag: false}).bind("dragStart", function() { /* do some pre- calculations for seek() function. improves performance */ // avoid redundant event triggering (= heavy stuff) fireOnSlide = hasEvent($(self)) || hasEvent(input); }).bind("drag", function(e, y, x) { if (input.is(":disabled")) { return false; } slide(e, vertical ? y : x); }).bind("dragEnd", function(e) { if (!e.isDefaultPrevented()) { e.type = "change"; fire.trigger(e, [value]); } }).click(function(e) { return e.preventDefault(); }); // clicking root.click(function(e) { if (input.is(":disabled") || e.target == handle[0]) { return e.preventDefault(); } init(); var fix = handle.width() / 2; slide(e, vertical ? len-origo-fix + e.pageY : e.pageX -origo -fix); }); if (conf.keyboard) { input.keydown(function(e) { if (input.attr("readonly")) { return; } var key = e.keyCode, up = $([75, 76, 38, 33, 39]).index(key) != -1, down = $([74, 72, 40, 34, 37]).index(key) != -1; if ((up || down) && !(e.shiftKey || e.altKey || e.ctrlKey)) { // UP: k=75, l=76, up=38, pageup=33, right=39 if (up) { self.step(key == 33 ? 10 : 1, e); // DOWN: j=74, h=72, down=40, pagedown=34, left=37 } else if (down) { self.step(key == 34 ? -10 : -1, e); } return e.preventDefault(); } }); } input.blur(function(e) { var val = $(this).val(); if (val !== value) { self.setValue(val, e); } }); // HTML5 DOM methods $.extend(input[0], { stepUp: self.stepUp, stepDown: self.stepDown}); // calculate all dimension related stuff function init() { vertical = conf.vertical || dim(root, "height") > dim(root, "width"); if (vertical) { len = dim(root, "height") - dim(handle, "height"); origo = root.offset().top + len; } else { len = dim(root, "width") - dim(handle, "width"); origo = root.offset().left; } } function begin() { init(); self.setValue(conf.value !== undefined ? conf.value : conf.min); } begin(); // some browsers cannot get dimensions upon initialization if (!len) { $(window).load(begin); } }
pos, progress, handle;
pos;
function RangeInput(input, conf) { // private variables var self = this, css = conf.css, root = $("<div><div/><a href='#'/></div>").data("rangeinput", self), value, // current value origo, // handle's start point len, // length of the range pos, // current position of the handle progress, // progressbar handle; // drag handle // create range input.before(root); handle = root.addClass(css.slider).find("a").addClass(css.handle); progress = root.find("div").addClass(css.progress); // get (HTML5) attributes into configuration $.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); if (val || val === 0) { conf[key] = parseFloat(val, 10); } }); var range = conf.max - conf.min, step = conf.step == 'any' ? 0 : conf.step, precision = conf.precision; if (precision === undefined) { try { precision = step.toString().split(".")[1].length; } catch (err) { precision = 0; } } // Replace built-in range input (type attribute cannot be changed) if (input.attr("type") == 'range') { var tmp = $("<input/>").attr("name", input.attr("name")); input.replaceWith(tmp); input = tmp; } input.addClass(css.input); var fire = $(self).add(input), fireOnSlide = true; /*** the flesh and bone of this tool ***/ function slide(evt, x, val, isClick) { // calculate value based on slide position if (val == undefined) { val = x / len * range; } // increment in steps if (step) { val = Math.round(val / step) * step; } // count x based on value or tweak x if stepping is done if (x == undefined || step) { x = val * len / range; } // nothing changes or out of range --> return if (isNaN(val) || val == value) { return self; } // stay within range x = Math.max(0, Math.min(x, len)); val += conf.min; val = x / len * range; // precision val = round(val, precision); // onSlide if (fireOnSlide && value !== undefined && !isClick) { evt.type = "onSlide"; fire.trigger(evt, [val, x]); if (evt.isDefaultPrevented()) { return self; } } // speed & callback var speed = isClick ? conf.speed : 0, callback = isClick ? function() { evt.type = "change"; fire.trigger(evt, [val]); } : null; if (conf.vertical) { handle.animate({top: x}, speed, callback); if (conf.progress) { progress.animate({height: x}, speed); } } else { handle.animate({left: x}, speed, callback); if (conf.progress) { progress.animate({width: x}, speed); } } // store current value value = val; pos = x; // se input field's value input.val(val); // HTML5 attribute input[0].valueAsNumber = val; return self; } $.extend(self, { getValue: function() { return value; }, setValue: function(val, e) { return slide(e || $.Event(), undefined, val - conf.min); }, getConf: function() { return conf; }, getProgress: function() { return progress; }, getHandle: function() { return handle; }, getInput: function() { return input; }, step: function(am, e) { e = e || $.Event(); self.setValue(value + conf.step * (am || 1), e); }, // HTML5 compatible name stepUp: function(am) { return self.step(am || 1) }, // HTML5 compatible name stepDown: function(am) { return self.step(-am || -1) } }); // callbacks $.each("onSlide,change".split(","), function(i, name) { // from configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API methods self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // dragging handle.drag({drag: false}).bind("dragStart", function() { /* do some pre- calculations for seek() function. improves performance */ // avoid redundant event triggering (= heavy stuff) fireOnSlide = hasEvent($(self)) || hasEvent(input); }).bind("drag", function(e, y, x) { if (input.is(":disabled")) { return false; } slide(e, conf.vertical ? y : x); }).bind("dragEnd", function(e) { if (!e.isDefaultPrevented()) { e.type = "change"; fire.trigger(e, [value]); } }).click(function(e) { return e.preventDefault(); }); // clicking root.click(function(e) { if (input.is(":disabled") || e.target == handle[0]) { return e.preventDefault(); } if (!origo) { init(); } var fix = handle.width() / 2; slide(e, conf.vertical ? e.pageY + fix : e.pageX - origo - fix, undefined, true); }); if (conf.keyboard) { input.keydown(function(e) { var key = e.keyCode, up = $([75, 76, 38, 33, 39]).index(key) != -1, down = $([74, 72, 40, 34, 37]).index(key) != -1; if ((up || down) && !(e.shiftKey || e.altKey || e.ctrlKey)) { // UP: k=75, l=76, up=38, pageup=33, right=39 if (up) { self.step(key == 33 ? 10 : 1, e); // DOWN: j=74, h=72, down=40, pagedown=34, left=37 } else if (down) { self.step(key == 34 ? -10 : -1, e); } return e.preventDefault(); } }); } input.blur(function(e) { self.setValue($(this).val(), e); }); // HTML5 DOM methods $.extend(input[0], { stepUp: self.stepUp, stepDown: self.stepDown}); function init() { if (conf.vertical) { len = dim(root, "height") - dim(handle, "height"); origo = root.offset().top + len; } else { len = dim(root, "width") - dim(handle, "width"); origo = root.offset().left; } } init(); self.setValue(input.val() || conf.value || conf.min); }
handle = root.addClass(css.slider).find("a").addClass(css.handle); progress = root.find("div").addClass(css.progress);
var handle = root.addClass(css.slider).find("a").addClass(css.handle), progress = root.find("div").addClass(css.progress), vertical = conf.vertical || dim(root, "height") > dim(root, "width");
function RangeInput(input, conf) { // private variables var self = this, css = conf.css, root = $("<div><div/><a href='#'/></div>").data("rangeinput", self), value, // current value origo, // handle's start point len, // length of the range pos, // current position of the handle progress, // progressbar handle; // drag handle // create range input.before(root); handle = root.addClass(css.slider).find("a").addClass(css.handle); progress = root.find("div").addClass(css.progress); // get (HTML5) attributes into configuration $.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); if (val || val === 0) { conf[key] = parseFloat(val, 10); } }); var range = conf.max - conf.min, step = conf.step == 'any' ? 0 : conf.step, precision = conf.precision; if (precision === undefined) { try { precision = step.toString().split(".")[1].length; } catch (err) { precision = 0; } } // Replace built-in range input (type attribute cannot be changed) if (input.attr("type") == 'range') { var tmp = $("<input/>").attr("name", input.attr("name")); input.replaceWith(tmp); input = tmp; } input.addClass(css.input); var fire = $(self).add(input), fireOnSlide = true; /*** the flesh and bone of this tool ***/ function slide(evt, x, val, isClick) { // calculate value based on slide position if (val == undefined) { val = x / len * range; } // increment in steps if (step) { val = Math.round(val / step) * step; } // count x based on value or tweak x if stepping is done if (x == undefined || step) { x = val * len / range; } // nothing changes or out of range --> return if (isNaN(val) || val == value) { return self; } // stay within range x = Math.max(0, Math.min(x, len)); val += conf.min; val = x / len * range; // precision val = round(val, precision); // onSlide if (fireOnSlide && value !== undefined && !isClick) { evt.type = "onSlide"; fire.trigger(evt, [val, x]); if (evt.isDefaultPrevented()) { return self; } } // speed & callback var speed = isClick ? conf.speed : 0, callback = isClick ? function() { evt.type = "change"; fire.trigger(evt, [val]); } : null; if (conf.vertical) { handle.animate({top: x}, speed, callback); if (conf.progress) { progress.animate({height: x}, speed); } } else { handle.animate({left: x}, speed, callback); if (conf.progress) { progress.animate({width: x}, speed); } } // store current value value = val; pos = x; // se input field's value input.val(val); // HTML5 attribute input[0].valueAsNumber = val; return self; } $.extend(self, { getValue: function() { return value; }, setValue: function(val, e) { return slide(e || $.Event(), undefined, val - conf.min); }, getConf: function() { return conf; }, getProgress: function() { return progress; }, getHandle: function() { return handle; }, getInput: function() { return input; }, step: function(am, e) { e = e || $.Event(); self.setValue(value + conf.step * (am || 1), e); }, // HTML5 compatible name stepUp: function(am) { return self.step(am || 1) }, // HTML5 compatible name stepDown: function(am) { return self.step(-am || -1) } }); // callbacks $.each("onSlide,change".split(","), function(i, name) { // from configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API methods self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // dragging handle.drag({drag: false}).bind("dragStart", function() { /* do some pre- calculations for seek() function. improves performance */ // avoid redundant event triggering (= heavy stuff) fireOnSlide = hasEvent($(self)) || hasEvent(input); }).bind("drag", function(e, y, x) { if (input.is(":disabled")) { return false; } slide(e, conf.vertical ? y : x); }).bind("dragEnd", function(e) { if (!e.isDefaultPrevented()) { e.type = "change"; fire.trigger(e, [value]); } }).click(function(e) { return e.preventDefault(); }); // clicking root.click(function(e) { if (input.is(":disabled") || e.target == handle[0]) { return e.preventDefault(); } if (!origo) { init(); } var fix = handle.width() / 2; slide(e, conf.vertical ? e.pageY + fix : e.pageX - origo - fix, undefined, true); }); if (conf.keyboard) { input.keydown(function(e) { var key = e.keyCode, up = $([75, 76, 38, 33, 39]).index(key) != -1, down = $([74, 72, 40, 34, 37]).index(key) != -1; if ((up || down) && !(e.shiftKey || e.altKey || e.ctrlKey)) { // UP: k=75, l=76, up=38, pageup=33, right=39 if (up) { self.step(key == 33 ? 10 : 1, e); // DOWN: j=74, h=72, down=40, pagedown=34, left=37 } else if (down) { self.step(key == 34 ? -10 : -1, e); } return e.preventDefault(); } }); } input.blur(function(e) { self.setValue($(this).val(), e); }); // HTML5 DOM methods $.extend(input[0], { stepUp: self.stepUp, stepDown: self.stepDown}); function init() { if (conf.vertical) { len = dim(root, "height") - dim(handle, "height"); origo = root.offset().top + len; } else { len = dim(root, "width") - dim(handle, "width"); origo = root.offset().left; } } init(); self.setValue(input.val() || conf.value || conf.min); }
function slide(evt, x, val, isClick) {
function slide(evt, x, val, isSetValue) {
function RangeInput(input, conf) { // private variables var self = this, css = conf.css, root = $("<div><div/><a href='#'/></div>").data("rangeinput", self), value, // current value origo, // handle's start point len, // length of the range pos, // current position of the handle progress, // progressbar handle; // drag handle // create range input.before(root); handle = root.addClass(css.slider).find("a").addClass(css.handle); progress = root.find("div").addClass(css.progress); // get (HTML5) attributes into configuration $.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); if (val || val === 0) { conf[key] = parseFloat(val, 10); } }); var range = conf.max - conf.min, step = conf.step == 'any' ? 0 : conf.step, precision = conf.precision; if (precision === undefined) { try { precision = step.toString().split(".")[1].length; } catch (err) { precision = 0; } } // Replace built-in range input (type attribute cannot be changed) if (input.attr("type") == 'range') { var tmp = $("<input/>").attr("name", input.attr("name")); input.replaceWith(tmp); input = tmp; } input.addClass(css.input); var fire = $(self).add(input), fireOnSlide = true; /*** the flesh and bone of this tool ***/ function slide(evt, x, val, isClick) { // calculate value based on slide position if (val == undefined) { val = x / len * range; } // increment in steps if (step) { val = Math.round(val / step) * step; } // count x based on value or tweak x if stepping is done if (x == undefined || step) { x = val * len / range; } // nothing changes or out of range --> return if (isNaN(val) || val == value) { return self; } // stay within range x = Math.max(0, Math.min(x, len)); val += conf.min; val = x / len * range; // precision val = round(val, precision); // onSlide if (fireOnSlide && value !== undefined && !isClick) { evt.type = "onSlide"; fire.trigger(evt, [val, x]); if (evt.isDefaultPrevented()) { return self; } } // speed & callback var speed = isClick ? conf.speed : 0, callback = isClick ? function() { evt.type = "change"; fire.trigger(evt, [val]); } : null; if (conf.vertical) { handle.animate({top: x}, speed, callback); if (conf.progress) { progress.animate({height: x}, speed); } } else { handle.animate({left: x}, speed, callback); if (conf.progress) { progress.animate({width: x}, speed); } } // store current value value = val; pos = x; // se input field's value input.val(val); // HTML5 attribute input[0].valueAsNumber = val; return self; } $.extend(self, { getValue: function() { return value; }, setValue: function(val, e) { return slide(e || $.Event(), undefined, val - conf.min); }, getConf: function() { return conf; }, getProgress: function() { return progress; }, getHandle: function() { return handle; }, getInput: function() { return input; }, step: function(am, e) { e = e || $.Event(); self.setValue(value + conf.step * (am || 1), e); }, // HTML5 compatible name stepUp: function(am) { return self.step(am || 1) }, // HTML5 compatible name stepDown: function(am) { return self.step(-am || -1) } }); // callbacks $.each("onSlide,change".split(","), function(i, name) { // from configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API methods self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // dragging handle.drag({drag: false}).bind("dragStart", function() { /* do some pre- calculations for seek() function. improves performance */ // avoid redundant event triggering (= heavy stuff) fireOnSlide = hasEvent($(self)) || hasEvent(input); }).bind("drag", function(e, y, x) { if (input.is(":disabled")) { return false; } slide(e, conf.vertical ? y : x); }).bind("dragEnd", function(e) { if (!e.isDefaultPrevented()) { e.type = "change"; fire.trigger(e, [value]); } }).click(function(e) { return e.preventDefault(); }); // clicking root.click(function(e) { if (input.is(":disabled") || e.target == handle[0]) { return e.preventDefault(); } if (!origo) { init(); } var fix = handle.width() / 2; slide(e, conf.vertical ? e.pageY + fix : e.pageX - origo - fix, undefined, true); }); if (conf.keyboard) { input.keydown(function(e) { var key = e.keyCode, up = $([75, 76, 38, 33, 39]).index(key) != -1, down = $([74, 72, 40, 34, 37]).index(key) != -1; if ((up || down) && !(e.shiftKey || e.altKey || e.ctrlKey)) { // UP: k=75, l=76, up=38, pageup=33, right=39 if (up) { self.step(key == 33 ? 10 : 1, e); // DOWN: j=74, h=72, down=40, pagedown=34, left=37 } else if (down) { self.step(key == 34 ? -10 : -1, e); } return e.preventDefault(); } }); } input.blur(function(e) { self.setValue($(this).val(), e); }); // HTML5 DOM methods $.extend(input[0], { stepUp: self.stepUp, stepDown: self.stepDown}); function init() { if (conf.vertical) { len = dim(root, "height") - dim(handle, "height"); origo = root.offset().top + len; } else { len = dim(root, "width") - dim(handle, "width"); origo = root.offset().left; } } init(); self.setValue(input.val() || conf.value || conf.min); }
x = Math.max(0, Math.min(x, len)); val += conf.min; val = x / len * range;
x = Math.max(0, Math.min(x, len)); val = x / len * range; if (isSetValue || !vertical) { val += conf.min; } if (vertical) { if (isSetValue) { x = len -x; } else { val = conf.max - val; } }
function RangeInput(input, conf) { // private variables var self = this, css = conf.css, root = $("<div><div/><a href='#'/></div>").data("rangeinput", self), value, // current value origo, // handle's start point len, // length of the range pos, // current position of the handle progress, // progressbar handle; // drag handle // create range input.before(root); handle = root.addClass(css.slider).find("a").addClass(css.handle); progress = root.find("div").addClass(css.progress); // get (HTML5) attributes into configuration $.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); if (val || val === 0) { conf[key] = parseFloat(val, 10); } }); var range = conf.max - conf.min, step = conf.step == 'any' ? 0 : conf.step, precision = conf.precision; if (precision === undefined) { try { precision = step.toString().split(".")[1].length; } catch (err) { precision = 0; } } // Replace built-in range input (type attribute cannot be changed) if (input.attr("type") == 'range') { var tmp = $("<input/>").attr("name", input.attr("name")); input.replaceWith(tmp); input = tmp; } input.addClass(css.input); var fire = $(self).add(input), fireOnSlide = true; /*** the flesh and bone of this tool ***/ function slide(evt, x, val, isClick) { // calculate value based on slide position if (val == undefined) { val = x / len * range; } // increment in steps if (step) { val = Math.round(val / step) * step; } // count x based on value or tweak x if stepping is done if (x == undefined || step) { x = val * len / range; } // nothing changes or out of range --> return if (isNaN(val) || val == value) { return self; } // stay within range x = Math.max(0, Math.min(x, len)); val += conf.min; val = x / len * range; // precision val = round(val, precision); // onSlide if (fireOnSlide && value !== undefined && !isClick) { evt.type = "onSlide"; fire.trigger(evt, [val, x]); if (evt.isDefaultPrevented()) { return self; } } // speed & callback var speed = isClick ? conf.speed : 0, callback = isClick ? function() { evt.type = "change"; fire.trigger(evt, [val]); } : null; if (conf.vertical) { handle.animate({top: x}, speed, callback); if (conf.progress) { progress.animate({height: x}, speed); } } else { handle.animate({left: x}, speed, callback); if (conf.progress) { progress.animate({width: x}, speed); } } // store current value value = val; pos = x; // se input field's value input.val(val); // HTML5 attribute input[0].valueAsNumber = val; return self; } $.extend(self, { getValue: function() { return value; }, setValue: function(val, e) { return slide(e || $.Event(), undefined, val - conf.min); }, getConf: function() { return conf; }, getProgress: function() { return progress; }, getHandle: function() { return handle; }, getInput: function() { return input; }, step: function(am, e) { e = e || $.Event(); self.setValue(value + conf.step * (am || 1), e); }, // HTML5 compatible name stepUp: function(am) { return self.step(am || 1) }, // HTML5 compatible name stepDown: function(am) { return self.step(-am || -1) } }); // callbacks $.each("onSlide,change".split(","), function(i, name) { // from configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API methods self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // dragging handle.drag({drag: false}).bind("dragStart", function() { /* do some pre- calculations for seek() function. improves performance */ // avoid redundant event triggering (= heavy stuff) fireOnSlide = hasEvent($(self)) || hasEvent(input); }).bind("drag", function(e, y, x) { if (input.is(":disabled")) { return false; } slide(e, conf.vertical ? y : x); }).bind("dragEnd", function(e) { if (!e.isDefaultPrevented()) { e.type = "change"; fire.trigger(e, [value]); } }).click(function(e) { return e.preventDefault(); }); // clicking root.click(function(e) { if (input.is(":disabled") || e.target == handle[0]) { return e.preventDefault(); } if (!origo) { init(); } var fix = handle.width() / 2; slide(e, conf.vertical ? e.pageY + fix : e.pageX - origo - fix, undefined, true); }); if (conf.keyboard) { input.keydown(function(e) { var key = e.keyCode, up = $([75, 76, 38, 33, 39]).index(key) != -1, down = $([74, 72, 40, 34, 37]).index(key) != -1; if ((up || down) && !(e.shiftKey || e.altKey || e.ctrlKey)) { // UP: k=75, l=76, up=38, pageup=33, right=39 if (up) { self.step(key == 33 ? 10 : 1, e); // DOWN: j=74, h=72, down=40, pagedown=34, left=37 } else if (down) { self.step(key == 34 ? -10 : -1, e); } return e.preventDefault(); } }); } input.blur(function(e) { self.setValue($(this).val(), e); }); // HTML5 DOM methods $.extend(input[0], { stepUp: self.stepUp, stepDown: self.stepDown}); function init() { if (conf.vertical) { len = dim(root, "height") - dim(handle, "height"); origo = root.offset().top + len; } else { len = dim(root, "width") - dim(handle, "width"); origo = root.offset().left; } } init(); self.setValue(input.val() || conf.value || conf.min); }
if (conf.vertical) {
if (vertical) {
function RangeInput(input, conf) { // private variables var self = this, css = conf.css, root = $("<div><div/><a href='#'/></div>").data("rangeinput", self), value, // current value origo, // handle's start point len, // length of the range pos, // current position of the handle progress, // progressbar handle; // drag handle // create range input.before(root); handle = root.addClass(css.slider).find("a").addClass(css.handle); progress = root.find("div").addClass(css.progress); // get (HTML5) attributes into configuration $.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); if (val || val === 0) { conf[key] = parseFloat(val, 10); } }); var range = conf.max - conf.min, step = conf.step == 'any' ? 0 : conf.step, precision = conf.precision; if (precision === undefined) { try { precision = step.toString().split(".")[1].length; } catch (err) { precision = 0; } } // Replace built-in range input (type attribute cannot be changed) if (input.attr("type") == 'range') { var tmp = $("<input/>").attr("name", input.attr("name")); input.replaceWith(tmp); input = tmp; } input.addClass(css.input); var fire = $(self).add(input), fireOnSlide = true; /*** the flesh and bone of this tool ***/ function slide(evt, x, val, isClick) { // calculate value based on slide position if (val == undefined) { val = x / len * range; } // increment in steps if (step) { val = Math.round(val / step) * step; } // count x based on value or tweak x if stepping is done if (x == undefined || step) { x = val * len / range; } // nothing changes or out of range --> return if (isNaN(val) || val == value) { return self; } // stay within range x = Math.max(0, Math.min(x, len)); val += conf.min; val = x / len * range; // precision val = round(val, precision); // onSlide if (fireOnSlide && value !== undefined && !isClick) { evt.type = "onSlide"; fire.trigger(evt, [val, x]); if (evt.isDefaultPrevented()) { return self; } } // speed & callback var speed = isClick ? conf.speed : 0, callback = isClick ? function() { evt.type = "change"; fire.trigger(evt, [val]); } : null; if (conf.vertical) { handle.animate({top: x}, speed, callback); if (conf.progress) { progress.animate({height: x}, speed); } } else { handle.animate({left: x}, speed, callback); if (conf.progress) { progress.animate({width: x}, speed); } } // store current value value = val; pos = x; // se input field's value input.val(val); // HTML5 attribute input[0].valueAsNumber = val; return self; } $.extend(self, { getValue: function() { return value; }, setValue: function(val, e) { return slide(e || $.Event(), undefined, val - conf.min); }, getConf: function() { return conf; }, getProgress: function() { return progress; }, getHandle: function() { return handle; }, getInput: function() { return input; }, step: function(am, e) { e = e || $.Event(); self.setValue(value + conf.step * (am || 1), e); }, // HTML5 compatible name stepUp: function(am) { return self.step(am || 1) }, // HTML5 compatible name stepDown: function(am) { return self.step(-am || -1) } }); // callbacks $.each("onSlide,change".split(","), function(i, name) { // from configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API methods self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // dragging handle.drag({drag: false}).bind("dragStart", function() { /* do some pre- calculations for seek() function. improves performance */ // avoid redundant event triggering (= heavy stuff) fireOnSlide = hasEvent($(self)) || hasEvent(input); }).bind("drag", function(e, y, x) { if (input.is(":disabled")) { return false; } slide(e, conf.vertical ? y : x); }).bind("dragEnd", function(e) { if (!e.isDefaultPrevented()) { e.type = "change"; fire.trigger(e, [value]); } }).click(function(e) { return e.preventDefault(); }); // clicking root.click(function(e) { if (input.is(":disabled") || e.target == handle[0]) { return e.preventDefault(); } if (!origo) { init(); } var fix = handle.width() / 2; slide(e, conf.vertical ? e.pageY + fix : e.pageX - origo - fix, undefined, true); }); if (conf.keyboard) { input.keydown(function(e) { var key = e.keyCode, up = $([75, 76, 38, 33, 39]).index(key) != -1, down = $([74, 72, 40, 34, 37]).index(key) != -1; if ((up || down) && !(e.shiftKey || e.altKey || e.ctrlKey)) { // UP: k=75, l=76, up=38, pageup=33, right=39 if (up) { self.step(key == 33 ? 10 : 1, e); // DOWN: j=74, h=72, down=40, pagedown=34, left=37 } else if (down) { self.step(key == 34 ? -10 : -1, e); } return e.preventDefault(); } }); } input.blur(function(e) { self.setValue($(this).val(), e); }); // HTML5 DOM methods $.extend(input[0], { stepUp: self.stepUp, stepDown: self.stepDown}); function init() { if (conf.vertical) { len = dim(root, "height") - dim(handle, "height"); origo = root.offset().top + len; } else { len = dim(root, "width") - dim(handle, "width"); origo = root.offset().left; } } init(); self.setValue(input.val() || conf.value || conf.min); }
if (conf.progress) { progress.animate({height: x}, speed); }
if (conf.progress) { progress.animate({height: len - x + handle.width() / 2}, speed); }
function RangeInput(input, conf) { // private variables var self = this, css = conf.css, root = $("<div><div/><a href='#'/></div>").data("rangeinput", self), value, // current value origo, // handle's start point len, // length of the range pos, // current position of the handle progress, // progressbar handle; // drag handle // create range input.before(root); handle = root.addClass(css.slider).find("a").addClass(css.handle); progress = root.find("div").addClass(css.progress); // get (HTML5) attributes into configuration $.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); if (val || val === 0) { conf[key] = parseFloat(val, 10); } }); var range = conf.max - conf.min, step = conf.step == 'any' ? 0 : conf.step, precision = conf.precision; if (precision === undefined) { try { precision = step.toString().split(".")[1].length; } catch (err) { precision = 0; } } // Replace built-in range input (type attribute cannot be changed) if (input.attr("type") == 'range') { var tmp = $("<input/>").attr("name", input.attr("name")); input.replaceWith(tmp); input = tmp; } input.addClass(css.input); var fire = $(self).add(input), fireOnSlide = true; /*** the flesh and bone of this tool ***/ function slide(evt, x, val, isClick) { // calculate value based on slide position if (val == undefined) { val = x / len * range; } // increment in steps if (step) { val = Math.round(val / step) * step; } // count x based on value or tweak x if stepping is done if (x == undefined || step) { x = val * len / range; } // nothing changes or out of range --> return if (isNaN(val) || val == value) { return self; } // stay within range x = Math.max(0, Math.min(x, len)); val += conf.min; val = x / len * range; // precision val = round(val, precision); // onSlide if (fireOnSlide && value !== undefined && !isClick) { evt.type = "onSlide"; fire.trigger(evt, [val, x]); if (evt.isDefaultPrevented()) { return self; } } // speed & callback var speed = isClick ? conf.speed : 0, callback = isClick ? function() { evt.type = "change"; fire.trigger(evt, [val]); } : null; if (conf.vertical) { handle.animate({top: x}, speed, callback); if (conf.progress) { progress.animate({height: x}, speed); } } else { handle.animate({left: x}, speed, callback); if (conf.progress) { progress.animate({width: x}, speed); } } // store current value value = val; pos = x; // se input field's value input.val(val); // HTML5 attribute input[0].valueAsNumber = val; return self; } $.extend(self, { getValue: function() { return value; }, setValue: function(val, e) { return slide(e || $.Event(), undefined, val - conf.min); }, getConf: function() { return conf; }, getProgress: function() { return progress; }, getHandle: function() { return handle; }, getInput: function() { return input; }, step: function(am, e) { e = e || $.Event(); self.setValue(value + conf.step * (am || 1), e); }, // HTML5 compatible name stepUp: function(am) { return self.step(am || 1) }, // HTML5 compatible name stepDown: function(am) { return self.step(-am || -1) } }); // callbacks $.each("onSlide,change".split(","), function(i, name) { // from configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API methods self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // dragging handle.drag({drag: false}).bind("dragStart", function() { /* do some pre- calculations for seek() function. improves performance */ // avoid redundant event triggering (= heavy stuff) fireOnSlide = hasEvent($(self)) || hasEvent(input); }).bind("drag", function(e, y, x) { if (input.is(":disabled")) { return false; } slide(e, conf.vertical ? y : x); }).bind("dragEnd", function(e) { if (!e.isDefaultPrevented()) { e.type = "change"; fire.trigger(e, [value]); } }).click(function(e) { return e.preventDefault(); }); // clicking root.click(function(e) { if (input.is(":disabled") || e.target == handle[0]) { return e.preventDefault(); } if (!origo) { init(); } var fix = handle.width() / 2; slide(e, conf.vertical ? e.pageY + fix : e.pageX - origo - fix, undefined, true); }); if (conf.keyboard) { input.keydown(function(e) { var key = e.keyCode, up = $([75, 76, 38, 33, 39]).index(key) != -1, down = $([74, 72, 40, 34, 37]).index(key) != -1; if ((up || down) && !(e.shiftKey || e.altKey || e.ctrlKey)) { // UP: k=75, l=76, up=38, pageup=33, right=39 if (up) { self.step(key == 33 ? 10 : 1, e); // DOWN: j=74, h=72, down=40, pagedown=34, left=37 } else if (down) { self.step(key == 34 ? -10 : -1, e); } return e.preventDefault(); } }); } input.blur(function(e) { self.setValue($(this).val(), e); }); // HTML5 DOM methods $.extend(input[0], { stepUp: self.stepUp, stepDown: self.stepDown}); function init() { if (conf.vertical) { len = dim(root, "height") - dim(handle, "height"); origo = root.offset().top + len; } else { len = dim(root, "width") - dim(handle, "width"); origo = root.offset().left; } } init(); self.setValue(input.val() || conf.value || conf.min); }
if (conf.progress) { progress.animate({width: x}, speed); }
if (conf.progress) { progress.animate({width: x + handle.width() / 2}, speed); }
function RangeInput(input, conf) { // private variables var self = this, css = conf.css, root = $("<div><div/><a href='#'/></div>").data("rangeinput", self), value, // current value origo, // handle's start point len, // length of the range pos, // current position of the handle progress, // progressbar handle; // drag handle // create range input.before(root); handle = root.addClass(css.slider).find("a").addClass(css.handle); progress = root.find("div").addClass(css.progress); // get (HTML5) attributes into configuration $.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); if (val || val === 0) { conf[key] = parseFloat(val, 10); } }); var range = conf.max - conf.min, step = conf.step == 'any' ? 0 : conf.step, precision = conf.precision; if (precision === undefined) { try { precision = step.toString().split(".")[1].length; } catch (err) { precision = 0; } } // Replace built-in range input (type attribute cannot be changed) if (input.attr("type") == 'range') { var tmp = $("<input/>").attr("name", input.attr("name")); input.replaceWith(tmp); input = tmp; } input.addClass(css.input); var fire = $(self).add(input), fireOnSlide = true; /*** the flesh and bone of this tool ***/ function slide(evt, x, val, isClick) { // calculate value based on slide position if (val == undefined) { val = x / len * range; } // increment in steps if (step) { val = Math.round(val / step) * step; } // count x based on value or tweak x if stepping is done if (x == undefined || step) { x = val * len / range; } // nothing changes or out of range --> return if (isNaN(val) || val == value) { return self; } // stay within range x = Math.max(0, Math.min(x, len)); val += conf.min; val = x / len * range; // precision val = round(val, precision); // onSlide if (fireOnSlide && value !== undefined && !isClick) { evt.type = "onSlide"; fire.trigger(evt, [val, x]); if (evt.isDefaultPrevented()) { return self; } } // speed & callback var speed = isClick ? conf.speed : 0, callback = isClick ? function() { evt.type = "change"; fire.trigger(evt, [val]); } : null; if (conf.vertical) { handle.animate({top: x}, speed, callback); if (conf.progress) { progress.animate({height: x}, speed); } } else { handle.animate({left: x}, speed, callback); if (conf.progress) { progress.animate({width: x}, speed); } } // store current value value = val; pos = x; // se input field's value input.val(val); // HTML5 attribute input[0].valueAsNumber = val; return self; } $.extend(self, { getValue: function() { return value; }, setValue: function(val, e) { return slide(e || $.Event(), undefined, val - conf.min); }, getConf: function() { return conf; }, getProgress: function() { return progress; }, getHandle: function() { return handle; }, getInput: function() { return input; }, step: function(am, e) { e = e || $.Event(); self.setValue(value + conf.step * (am || 1), e); }, // HTML5 compatible name stepUp: function(am) { return self.step(am || 1) }, // HTML5 compatible name stepDown: function(am) { return self.step(-am || -1) } }); // callbacks $.each("onSlide,change".split(","), function(i, name) { // from configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API methods self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // dragging handle.drag({drag: false}).bind("dragStart", function() { /* do some pre- calculations for seek() function. improves performance */ // avoid redundant event triggering (= heavy stuff) fireOnSlide = hasEvent($(self)) || hasEvent(input); }).bind("drag", function(e, y, x) { if (input.is(":disabled")) { return false; } slide(e, conf.vertical ? y : x); }).bind("dragEnd", function(e) { if (!e.isDefaultPrevented()) { e.type = "change"; fire.trigger(e, [value]); } }).click(function(e) { return e.preventDefault(); }); // clicking root.click(function(e) { if (input.is(":disabled") || e.target == handle[0]) { return e.preventDefault(); } if (!origo) { init(); } var fix = handle.width() / 2; slide(e, conf.vertical ? e.pageY + fix : e.pageX - origo - fix, undefined, true); }); if (conf.keyboard) { input.keydown(function(e) { var key = e.keyCode, up = $([75, 76, 38, 33, 39]).index(key) != -1, down = $([74, 72, 40, 34, 37]).index(key) != -1; if ((up || down) && !(e.shiftKey || e.altKey || e.ctrlKey)) { // UP: k=75, l=76, up=38, pageup=33, right=39 if (up) { self.step(key == 33 ? 10 : 1, e); // DOWN: j=74, h=72, down=40, pagedown=34, left=37 } else if (down) { self.step(key == 34 ? -10 : -1, e); } return e.preventDefault(); } }); } input.blur(function(e) { self.setValue($(this).val(), e); }); // HTML5 DOM methods $.extend(input[0], { stepUp: self.stepUp, stepDown: self.stepDown}); function init() { if (conf.vertical) { len = dim(root, "height") - dim(handle, "height"); origo = root.offset().top + len; } else { len = dim(root, "width") - dim(handle, "width"); origo = root.offset().left; } } init(); self.setValue(input.val() || conf.value || conf.min); }
return slide(e || $.Event(), undefined, val - conf.min);
return slide(e || $.Event("api"), undefined, val, true);
function RangeInput(input, conf) { // private variables var self = this, css = conf.css, root = $("<div><div/><a href='#'/></div>").data("rangeinput", self), value, // current value origo, // handle's start point len, // length of the range pos, // current position of the handle progress, // progressbar handle; // drag handle // create range input.before(root); handle = root.addClass(css.slider).find("a").addClass(css.handle); progress = root.find("div").addClass(css.progress); // get (HTML5) attributes into configuration $.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); if (val || val === 0) { conf[key] = parseFloat(val, 10); } }); var range = conf.max - conf.min, step = conf.step == 'any' ? 0 : conf.step, precision = conf.precision; if (precision === undefined) { try { precision = step.toString().split(".")[1].length; } catch (err) { precision = 0; } } // Replace built-in range input (type attribute cannot be changed) if (input.attr("type") == 'range') { var tmp = $("<input/>").attr("name", input.attr("name")); input.replaceWith(tmp); input = tmp; } input.addClass(css.input); var fire = $(self).add(input), fireOnSlide = true; /*** the flesh and bone of this tool ***/ function slide(evt, x, val, isClick) { // calculate value based on slide position if (val == undefined) { val = x / len * range; } // increment in steps if (step) { val = Math.round(val / step) * step; } // count x based on value or tweak x if stepping is done if (x == undefined || step) { x = val * len / range; } // nothing changes or out of range --> return if (isNaN(val) || val == value) { return self; } // stay within range x = Math.max(0, Math.min(x, len)); val += conf.min; val = x / len * range; // precision val = round(val, precision); // onSlide if (fireOnSlide && value !== undefined && !isClick) { evt.type = "onSlide"; fire.trigger(evt, [val, x]); if (evt.isDefaultPrevented()) { return self; } } // speed & callback var speed = isClick ? conf.speed : 0, callback = isClick ? function() { evt.type = "change"; fire.trigger(evt, [val]); } : null; if (conf.vertical) { handle.animate({top: x}, speed, callback); if (conf.progress) { progress.animate({height: x}, speed); } } else { handle.animate({left: x}, speed, callback); if (conf.progress) { progress.animate({width: x}, speed); } } // store current value value = val; pos = x; // se input field's value input.val(val); // HTML5 attribute input[0].valueAsNumber = val; return self; } $.extend(self, { getValue: function() { return value; }, setValue: function(val, e) { return slide(e || $.Event(), undefined, val - conf.min); }, getConf: function() { return conf; }, getProgress: function() { return progress; }, getHandle: function() { return handle; }, getInput: function() { return input; }, step: function(am, e) { e = e || $.Event(); self.setValue(value + conf.step * (am || 1), e); }, // HTML5 compatible name stepUp: function(am) { return self.step(am || 1) }, // HTML5 compatible name stepDown: function(am) { return self.step(-am || -1) } }); // callbacks $.each("onSlide,change".split(","), function(i, name) { // from configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API methods self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // dragging handle.drag({drag: false}).bind("dragStart", function() { /* do some pre- calculations for seek() function. improves performance */ // avoid redundant event triggering (= heavy stuff) fireOnSlide = hasEvent($(self)) || hasEvent(input); }).bind("drag", function(e, y, x) { if (input.is(":disabled")) { return false; } slide(e, conf.vertical ? y : x); }).bind("dragEnd", function(e) { if (!e.isDefaultPrevented()) { e.type = "change"; fire.trigger(e, [value]); } }).click(function(e) { return e.preventDefault(); }); // clicking root.click(function(e) { if (input.is(":disabled") || e.target == handle[0]) { return e.preventDefault(); } if (!origo) { init(); } var fix = handle.width() / 2; slide(e, conf.vertical ? e.pageY + fix : e.pageX - origo - fix, undefined, true); }); if (conf.keyboard) { input.keydown(function(e) { var key = e.keyCode, up = $([75, 76, 38, 33, 39]).index(key) != -1, down = $([74, 72, 40, 34, 37]).index(key) != -1; if ((up || down) && !(e.shiftKey || e.altKey || e.ctrlKey)) { // UP: k=75, l=76, up=38, pageup=33, right=39 if (up) { self.step(key == 33 ? 10 : 1, e); // DOWN: j=74, h=72, down=40, pagedown=34, left=37 } else if (down) { self.step(key == 34 ? -10 : -1, e); } return e.preventDefault(); } }); } input.blur(function(e) { self.setValue($(this).val(), e); }); // HTML5 DOM methods $.extend(input[0], { stepUp: self.stepUp, stepDown: self.stepDown}); function init() { if (conf.vertical) { len = dim(root, "height") - dim(handle, "height"); origo = root.offset().top + len; } else { len = dim(root, "width") - dim(handle, "width"); origo = root.offset().left; } } init(); self.setValue(input.val() || conf.value || conf.min); }
self.setValue(value + conf.step * (am || 1), e);
var step = conf.step == 'any' ? 1 : conf.step; self.setValue(value + step * (am || 1), e);
function RangeInput(input, conf) { // private variables var self = this, css = conf.css, root = $("<div><div/><a href='#'/></div>").data("rangeinput", self), value, // current value origo, // handle's start point len, // length of the range pos, // current position of the handle progress, // progressbar handle; // drag handle // create range input.before(root); handle = root.addClass(css.slider).find("a").addClass(css.handle); progress = root.find("div").addClass(css.progress); // get (HTML5) attributes into configuration $.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); if (val || val === 0) { conf[key] = parseFloat(val, 10); } }); var range = conf.max - conf.min, step = conf.step == 'any' ? 0 : conf.step, precision = conf.precision; if (precision === undefined) { try { precision = step.toString().split(".")[1].length; } catch (err) { precision = 0; } } // Replace built-in range input (type attribute cannot be changed) if (input.attr("type") == 'range') { var tmp = $("<input/>").attr("name", input.attr("name")); input.replaceWith(tmp); input = tmp; } input.addClass(css.input); var fire = $(self).add(input), fireOnSlide = true; /*** the flesh and bone of this tool ***/ function slide(evt, x, val, isClick) { // calculate value based on slide position if (val == undefined) { val = x / len * range; } // increment in steps if (step) { val = Math.round(val / step) * step; } // count x based on value or tweak x if stepping is done if (x == undefined || step) { x = val * len / range; } // nothing changes or out of range --> return if (isNaN(val) || val == value) { return self; } // stay within range x = Math.max(0, Math.min(x, len)); val += conf.min; val = x / len * range; // precision val = round(val, precision); // onSlide if (fireOnSlide && value !== undefined && !isClick) { evt.type = "onSlide"; fire.trigger(evt, [val, x]); if (evt.isDefaultPrevented()) { return self; } } // speed & callback var speed = isClick ? conf.speed : 0, callback = isClick ? function() { evt.type = "change"; fire.trigger(evt, [val]); } : null; if (conf.vertical) { handle.animate({top: x}, speed, callback); if (conf.progress) { progress.animate({height: x}, speed); } } else { handle.animate({left: x}, speed, callback); if (conf.progress) { progress.animate({width: x}, speed); } } // store current value value = val; pos = x; // se input field's value input.val(val); // HTML5 attribute input[0].valueAsNumber = val; return self; } $.extend(self, { getValue: function() { return value; }, setValue: function(val, e) { return slide(e || $.Event(), undefined, val - conf.min); }, getConf: function() { return conf; }, getProgress: function() { return progress; }, getHandle: function() { return handle; }, getInput: function() { return input; }, step: function(am, e) { e = e || $.Event(); self.setValue(value + conf.step * (am || 1), e); }, // HTML5 compatible name stepUp: function(am) { return self.step(am || 1) }, // HTML5 compatible name stepDown: function(am) { return self.step(-am || -1) } }); // callbacks $.each("onSlide,change".split(","), function(i, name) { // from configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API methods self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // dragging handle.drag({drag: false}).bind("dragStart", function() { /* do some pre- calculations for seek() function. improves performance */ // avoid redundant event triggering (= heavy stuff) fireOnSlide = hasEvent($(self)) || hasEvent(input); }).bind("drag", function(e, y, x) { if (input.is(":disabled")) { return false; } slide(e, conf.vertical ? y : x); }).bind("dragEnd", function(e) { if (!e.isDefaultPrevented()) { e.type = "change"; fire.trigger(e, [value]); } }).click(function(e) { return e.preventDefault(); }); // clicking root.click(function(e) { if (input.is(":disabled") || e.target == handle[0]) { return e.preventDefault(); } if (!origo) { init(); } var fix = handle.width() / 2; slide(e, conf.vertical ? e.pageY + fix : e.pageX - origo - fix, undefined, true); }); if (conf.keyboard) { input.keydown(function(e) { var key = e.keyCode, up = $([75, 76, 38, 33, 39]).index(key) != -1, down = $([74, 72, 40, 34, 37]).index(key) != -1; if ((up || down) && !(e.shiftKey || e.altKey || e.ctrlKey)) { // UP: k=75, l=76, up=38, pageup=33, right=39 if (up) { self.step(key == 33 ? 10 : 1, e); // DOWN: j=74, h=72, down=40, pagedown=34, left=37 } else if (down) { self.step(key == 34 ? -10 : -1, e); } return e.preventDefault(); } }); } input.blur(function(e) { self.setValue($(this).val(), e); }); // HTML5 DOM methods $.extend(input[0], { stepUp: self.stepUp, stepDown: self.stepDown}); function init() { if (conf.vertical) { len = dim(root, "height") - dim(handle, "height"); origo = root.offset().top + len; } else { len = dim(root, "width") - dim(handle, "width"); origo = root.offset().left; } } init(); self.setValue(input.val() || conf.value || conf.min); }
slide(e, conf.vertical ? y : x);
slide(e, vertical ? y : x);
function RangeInput(input, conf) { // private variables var self = this, css = conf.css, root = $("<div><div/><a href='#'/></div>").data("rangeinput", self), value, // current value origo, // handle's start point len, // length of the range pos, // current position of the handle progress, // progressbar handle; // drag handle // create range input.before(root); handle = root.addClass(css.slider).find("a").addClass(css.handle); progress = root.find("div").addClass(css.progress); // get (HTML5) attributes into configuration $.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); if (val || val === 0) { conf[key] = parseFloat(val, 10); } }); var range = conf.max - conf.min, step = conf.step == 'any' ? 0 : conf.step, precision = conf.precision; if (precision === undefined) { try { precision = step.toString().split(".")[1].length; } catch (err) { precision = 0; } } // Replace built-in range input (type attribute cannot be changed) if (input.attr("type") == 'range') { var tmp = $("<input/>").attr("name", input.attr("name")); input.replaceWith(tmp); input = tmp; } input.addClass(css.input); var fire = $(self).add(input), fireOnSlide = true; /*** the flesh and bone of this tool ***/ function slide(evt, x, val, isClick) { // calculate value based on slide position if (val == undefined) { val = x / len * range; } // increment in steps if (step) { val = Math.round(val / step) * step; } // count x based on value or tweak x if stepping is done if (x == undefined || step) { x = val * len / range; } // nothing changes or out of range --> return if (isNaN(val) || val == value) { return self; } // stay within range x = Math.max(0, Math.min(x, len)); val += conf.min; val = x / len * range; // precision val = round(val, precision); // onSlide if (fireOnSlide && value !== undefined && !isClick) { evt.type = "onSlide"; fire.trigger(evt, [val, x]); if (evt.isDefaultPrevented()) { return self; } } // speed & callback var speed = isClick ? conf.speed : 0, callback = isClick ? function() { evt.type = "change"; fire.trigger(evt, [val]); } : null; if (conf.vertical) { handle.animate({top: x}, speed, callback); if (conf.progress) { progress.animate({height: x}, speed); } } else { handle.animate({left: x}, speed, callback); if (conf.progress) { progress.animate({width: x}, speed); } } // store current value value = val; pos = x; // se input field's value input.val(val); // HTML5 attribute input[0].valueAsNumber = val; return self; } $.extend(self, { getValue: function() { return value; }, setValue: function(val, e) { return slide(e || $.Event(), undefined, val - conf.min); }, getConf: function() { return conf; }, getProgress: function() { return progress; }, getHandle: function() { return handle; }, getInput: function() { return input; }, step: function(am, e) { e = e || $.Event(); self.setValue(value + conf.step * (am || 1), e); }, // HTML5 compatible name stepUp: function(am) { return self.step(am || 1) }, // HTML5 compatible name stepDown: function(am) { return self.step(-am || -1) } }); // callbacks $.each("onSlide,change".split(","), function(i, name) { // from configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API methods self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // dragging handle.drag({drag: false}).bind("dragStart", function() { /* do some pre- calculations for seek() function. improves performance */ // avoid redundant event triggering (= heavy stuff) fireOnSlide = hasEvent($(self)) || hasEvent(input); }).bind("drag", function(e, y, x) { if (input.is(":disabled")) { return false; } slide(e, conf.vertical ? y : x); }).bind("dragEnd", function(e) { if (!e.isDefaultPrevented()) { e.type = "change"; fire.trigger(e, [value]); } }).click(function(e) { return e.preventDefault(); }); // clicking root.click(function(e) { if (input.is(":disabled") || e.target == handle[0]) { return e.preventDefault(); } if (!origo) { init(); } var fix = handle.width() / 2; slide(e, conf.vertical ? e.pageY + fix : e.pageX - origo - fix, undefined, true); }); if (conf.keyboard) { input.keydown(function(e) { var key = e.keyCode, up = $([75, 76, 38, 33, 39]).index(key) != -1, down = $([74, 72, 40, 34, 37]).index(key) != -1; if ((up || down) && !(e.shiftKey || e.altKey || e.ctrlKey)) { // UP: k=75, l=76, up=38, pageup=33, right=39 if (up) { self.step(key == 33 ? 10 : 1, e); // DOWN: j=74, h=72, down=40, pagedown=34, left=37 } else if (down) { self.step(key == 34 ? -10 : -1, e); } return e.preventDefault(); } }); } input.blur(function(e) { self.setValue($(this).val(), e); }); // HTML5 DOM methods $.extend(input[0], { stepUp: self.stepUp, stepDown: self.stepDown}); function init() { if (conf.vertical) { len = dim(root, "height") - dim(handle, "height"); origo = root.offset().top + len; } else { len = dim(root, "width") - dim(handle, "width"); origo = root.offset().left; } } init(); self.setValue(input.val() || conf.value || conf.min); }
var fix = handle.width() / 2; slide(e, conf.vertical ? e.pageY + fix : e.pageX - origo - fix, undefined, true);
var fix = handle.width() / 2; slide(e, vertical ? -(origo -e.pageY +fix) + len : e.pageX -origo -fix);
function RangeInput(input, conf) { // private variables var self = this, css = conf.css, root = $("<div><div/><a href='#'/></div>").data("rangeinput", self), value, // current value origo, // handle's start point len, // length of the range pos, // current position of the handle progress, // progressbar handle; // drag handle // create range input.before(root); handle = root.addClass(css.slider).find("a").addClass(css.handle); progress = root.find("div").addClass(css.progress); // get (HTML5) attributes into configuration $.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); if (val || val === 0) { conf[key] = parseFloat(val, 10); } }); var range = conf.max - conf.min, step = conf.step == 'any' ? 0 : conf.step, precision = conf.precision; if (precision === undefined) { try { precision = step.toString().split(".")[1].length; } catch (err) { precision = 0; } } // Replace built-in range input (type attribute cannot be changed) if (input.attr("type") == 'range') { var tmp = $("<input/>").attr("name", input.attr("name")); input.replaceWith(tmp); input = tmp; } input.addClass(css.input); var fire = $(self).add(input), fireOnSlide = true; /*** the flesh and bone of this tool ***/ function slide(evt, x, val, isClick) { // calculate value based on slide position if (val == undefined) { val = x / len * range; } // increment in steps if (step) { val = Math.round(val / step) * step; } // count x based on value or tweak x if stepping is done if (x == undefined || step) { x = val * len / range; } // nothing changes or out of range --> return if (isNaN(val) || val == value) { return self; } // stay within range x = Math.max(0, Math.min(x, len)); val += conf.min; val = x / len * range; // precision val = round(val, precision); // onSlide if (fireOnSlide && value !== undefined && !isClick) { evt.type = "onSlide"; fire.trigger(evt, [val, x]); if (evt.isDefaultPrevented()) { return self; } } // speed & callback var speed = isClick ? conf.speed : 0, callback = isClick ? function() { evt.type = "change"; fire.trigger(evt, [val]); } : null; if (conf.vertical) { handle.animate({top: x}, speed, callback); if (conf.progress) { progress.animate({height: x}, speed); } } else { handle.animate({left: x}, speed, callback); if (conf.progress) { progress.animate({width: x}, speed); } } // store current value value = val; pos = x; // se input field's value input.val(val); // HTML5 attribute input[0].valueAsNumber = val; return self; } $.extend(self, { getValue: function() { return value; }, setValue: function(val, e) { return slide(e || $.Event(), undefined, val - conf.min); }, getConf: function() { return conf; }, getProgress: function() { return progress; }, getHandle: function() { return handle; }, getInput: function() { return input; }, step: function(am, e) { e = e || $.Event(); self.setValue(value + conf.step * (am || 1), e); }, // HTML5 compatible name stepUp: function(am) { return self.step(am || 1) }, // HTML5 compatible name stepDown: function(am) { return self.step(-am || -1) } }); // callbacks $.each("onSlide,change".split(","), function(i, name) { // from configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API methods self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // dragging handle.drag({drag: false}).bind("dragStart", function() { /* do some pre- calculations for seek() function. improves performance */ // avoid redundant event triggering (= heavy stuff) fireOnSlide = hasEvent($(self)) || hasEvent(input); }).bind("drag", function(e, y, x) { if (input.is(":disabled")) { return false; } slide(e, conf.vertical ? y : x); }).bind("dragEnd", function(e) { if (!e.isDefaultPrevented()) { e.type = "change"; fire.trigger(e, [value]); } }).click(function(e) { return e.preventDefault(); }); // clicking root.click(function(e) { if (input.is(":disabled") || e.target == handle[0]) { return e.preventDefault(); } if (!origo) { init(); } var fix = handle.width() / 2; slide(e, conf.vertical ? e.pageY + fix : e.pageX - origo - fix, undefined, true); }); if (conf.keyboard) { input.keydown(function(e) { var key = e.keyCode, up = $([75, 76, 38, 33, 39]).index(key) != -1, down = $([74, 72, 40, 34, 37]).index(key) != -1; if ((up || down) && !(e.shiftKey || e.altKey || e.ctrlKey)) { // UP: k=75, l=76, up=38, pageup=33, right=39 if (up) { self.step(key == 33 ? 10 : 1, e); // DOWN: j=74, h=72, down=40, pagedown=34, left=37 } else if (down) { self.step(key == 34 ? -10 : -1, e); } return e.preventDefault(); } }); } input.blur(function(e) { self.setValue($(this).val(), e); }); // HTML5 DOM methods $.extend(input[0], { stepUp: self.stepUp, stepDown: self.stepDown}); function init() { if (conf.vertical) { len = dim(root, "height") - dim(handle, "height"); origo = root.offset().top + len; } else { len = dim(root, "width") - dim(handle, "width"); origo = root.offset().left; } } init(); self.setValue(input.val() || conf.value || conf.min); }
input.blur(function(e) { self.setValue($(this).val(), e);
input.blur(function(e) { var val = $(this).val(); if (val !== value) { self.setValue(val, e); }
function RangeInput(input, conf) { // private variables var self = this, css = conf.css, root = $("<div><div/><a href='#'/></div>").data("rangeinput", self), value, // current value origo, // handle's start point len, // length of the range pos, // current position of the handle progress, // progressbar handle; // drag handle // create range input.before(root); handle = root.addClass(css.slider).find("a").addClass(css.handle); progress = root.find("div").addClass(css.progress); // get (HTML5) attributes into configuration $.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); if (val || val === 0) { conf[key] = parseFloat(val, 10); } }); var range = conf.max - conf.min, step = conf.step == 'any' ? 0 : conf.step, precision = conf.precision; if (precision === undefined) { try { precision = step.toString().split(".")[1].length; } catch (err) { precision = 0; } } // Replace built-in range input (type attribute cannot be changed) if (input.attr("type") == 'range') { var tmp = $("<input/>").attr("name", input.attr("name")); input.replaceWith(tmp); input = tmp; } input.addClass(css.input); var fire = $(self).add(input), fireOnSlide = true; /*** the flesh and bone of this tool ***/ function slide(evt, x, val, isClick) { // calculate value based on slide position if (val == undefined) { val = x / len * range; } // increment in steps if (step) { val = Math.round(val / step) * step; } // count x based on value or tweak x if stepping is done if (x == undefined || step) { x = val * len / range; } // nothing changes or out of range --> return if (isNaN(val) || val == value) { return self; } // stay within range x = Math.max(0, Math.min(x, len)); val += conf.min; val = x / len * range; // precision val = round(val, precision); // onSlide if (fireOnSlide && value !== undefined && !isClick) { evt.type = "onSlide"; fire.trigger(evt, [val, x]); if (evt.isDefaultPrevented()) { return self; } } // speed & callback var speed = isClick ? conf.speed : 0, callback = isClick ? function() { evt.type = "change"; fire.trigger(evt, [val]); } : null; if (conf.vertical) { handle.animate({top: x}, speed, callback); if (conf.progress) { progress.animate({height: x}, speed); } } else { handle.animate({left: x}, speed, callback); if (conf.progress) { progress.animate({width: x}, speed); } } // store current value value = val; pos = x; // se input field's value input.val(val); // HTML5 attribute input[0].valueAsNumber = val; return self; } $.extend(self, { getValue: function() { return value; }, setValue: function(val, e) { return slide(e || $.Event(), undefined, val - conf.min); }, getConf: function() { return conf; }, getProgress: function() { return progress; }, getHandle: function() { return handle; }, getInput: function() { return input; }, step: function(am, e) { e = e || $.Event(); self.setValue(value + conf.step * (am || 1), e); }, // HTML5 compatible name stepUp: function(am) { return self.step(am || 1) }, // HTML5 compatible name stepDown: function(am) { return self.step(-am || -1) } }); // callbacks $.each("onSlide,change".split(","), function(i, name) { // from configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API methods self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // dragging handle.drag({drag: false}).bind("dragStart", function() { /* do some pre- calculations for seek() function. improves performance */ // avoid redundant event triggering (= heavy stuff) fireOnSlide = hasEvent($(self)) || hasEvent(input); }).bind("drag", function(e, y, x) { if (input.is(":disabled")) { return false; } slide(e, conf.vertical ? y : x); }).bind("dragEnd", function(e) { if (!e.isDefaultPrevented()) { e.type = "change"; fire.trigger(e, [value]); } }).click(function(e) { return e.preventDefault(); }); // clicking root.click(function(e) { if (input.is(":disabled") || e.target == handle[0]) { return e.preventDefault(); } if (!origo) { init(); } var fix = handle.width() / 2; slide(e, conf.vertical ? e.pageY + fix : e.pageX - origo - fix, undefined, true); }); if (conf.keyboard) { input.keydown(function(e) { var key = e.keyCode, up = $([75, 76, 38, 33, 39]).index(key) != -1, down = $([74, 72, 40, 34, 37]).index(key) != -1; if ((up || down) && !(e.shiftKey || e.altKey || e.ctrlKey)) { // UP: k=75, l=76, up=38, pageup=33, right=39 if (up) { self.step(key == 33 ? 10 : 1, e); // DOWN: j=74, h=72, down=40, pagedown=34, left=37 } else if (down) { self.step(key == 34 ? -10 : -1, e); } return e.preventDefault(); } }); } input.blur(function(e) { self.setValue($(this).val(), e); }); // HTML5 DOM methods $.extend(input[0], { stepUp: self.stepUp, stepDown: self.stepDown}); function init() { if (conf.vertical) { len = dim(root, "height") - dim(handle, "height"); origo = root.offset().top + len; } else { len = dim(root, "width") - dim(handle, "width"); origo = root.offset().left; } } init(); self.setValue(input.val() || conf.value || conf.min); }
if (val || val === 0) {
if (parseFloat(val)) {
function RangeInput(input, conf) { // private variables var self = this, css = conf.css, root = $("<div><div/><a href='#'/></div>").data("rangeinput", self), value, // current value origo, // handle's start point len, // length of the range pos; // current position of the handle // create range input.before(root); var handle = root.addClass(css.slider).find("a").addClass(css.handle), progress = root.find("div").addClass(css.progress), vertical = conf.vertical || dim(root, "height") > dim(root, "width"); // get (HTML5) attributes into configuration $.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); if (val || val === 0) { conf[key] = parseFloat(val, 10); } }); var range = conf.max - conf.min, step = conf.step == 'any' ? 0 : conf.step, precision = conf.precision; if (precision === undefined) { try { precision = step.toString().split(".")[1].length; } catch (err) { precision = 0; } } // Replace built-in range input (type attribute cannot be changed) if (input.attr("type") == 'range') { var tmp = $("<input/>").attr("name", input.attr("name")); input.replaceWith(tmp); input = tmp; } input.addClass(css.input); var fire = $(self).add(input), fireOnSlide = true; /** The flesh and bone of this tool. All sliding is routed trough this. @param evt types include: click, keydown, blur and api (setValue call) @param isSetValue when called trough setValue() call (keydown, blur, api) vertical configuration gives additional complexity. */ function slide(evt, x, val, isSetValue) { // calculate value based on slide position if (val === undefined) { val = x / len * range; // x is calculated based on val. we need to strip off min during calculation } else if (isSetValue) { val -= conf.min; } // increment in steps if (step) { val = Math.round(val / step) * step; } // count x based on value or tweak x if stepping is done if (x == undefined || step) { x = val * len / range; } // crazy value? if (isNaN(val)) { return self; } // stay within range x = Math.max(0, Math.min(x, len)); val = x / len * range; if (isSetValue || !vertical) { val += conf.min; } // in vertical ranges value rises upwards if (vertical) { if (isSetValue) { x = len -x; } else { val = conf.max - val; } } // precision val = round(val, precision); // onSlide var isClick = evt.type == "click"; if (fireOnSlide && value !== undefined && !isClick) { evt.type = "onSlide"; fire.trigger(evt, [val, x]); if (evt.isDefaultPrevented()) { return self; } } // speed & callback var speed = isClick ? conf.speed : 0, callback = isClick ? function() { evt.type = "change"; fire.trigger(evt, [val]); } : null; if (vertical) { handle.animate({top: x}, speed, callback); if (conf.progress) { progress.animate({height: len - x + handle.width() / 2}, speed); } } else { handle.animate({left: x}, speed, callback); if (conf.progress) { progress.animate({width: x + handle.width() / 2}, speed); } } // store current value value = val; pos = x; // se input field's value input.val(val); // HTML5 attribute input[0].valueAsNumber = val; return self; } $.extend(self, { getValue: function() { return value; }, setValue: function(val, e) { return slide(e || $.Event("api"), undefined, val, true); }, getConf: function() { return conf; }, getProgress: function() { return progress; }, getHandle: function() { return handle; }, getInput: function() { return input; }, step: function(am, e) { e = e || $.Event(); var step = conf.step == 'any' ? 1 : conf.step; self.setValue(value + step * (am || 1), e); }, // HTML5 compatible name stepUp: function(am) { return self.step(am || 1) }, // HTML5 compatible name stepDown: function(am) { return self.step(-am || -1) } }); // callbacks $.each("onSlide,change".split(","), function(i, name) { // from configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API methods self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // dragging handle.drag({drag: false}).bind("dragStart", function() { /* do some pre- calculations for seek() function. improves performance */ // avoid redundant event triggering (= heavy stuff) fireOnSlide = hasEvent($(self)) || hasEvent(input); }).bind("drag", function(e, y, x) { if (input.is(":disabled")) { return false; } slide(e, vertical ? y : x); }).bind("dragEnd", function(e) { if (!e.isDefaultPrevented()) { e.type = "change"; fire.trigger(e, [value]); } }).click(function(e) { return e.preventDefault(); }); // clicking root.click(function(e) { if (input.is(":disabled") || e.target == handle[0]) { return e.preventDefault(); } if (!origo) { init(); } var fix = handle.width() / 2; slide(e, vertical ? -(origo -e.pageY +fix) + len : e.pageX -origo -fix); }); if (conf.keyboard) { input.keydown(function(e) { if (input.attr("readonly")) { return; } var key = e.keyCode, up = $([75, 76, 38, 33, 39]).index(key) != -1, down = $([74, 72, 40, 34, 37]).index(key) != -1; if ((up || down) && !(e.shiftKey || e.altKey || e.ctrlKey)) { // UP: k=75, l=76, up=38, pageup=33, right=39 if (up) { self.step(key == 33 ? 10 : 1, e); // DOWN: j=74, h=72, down=40, pagedown=34, left=37 } else if (down) { self.step(key == 34 ? -10 : -1, e); } return e.preventDefault(); } }); } input.blur(function(e) { var val = $(this).val(); if (val !== value) { self.setValue(val, e); } }); // HTML5 DOM methods $.extend(input[0], { stepUp: self.stepUp, stepDown: self.stepDown}); function init() { if (vertical) { len = dim(root, "height") - dim(handle, "height"); origo = root.offset().top + len; } else { len = dim(root, "width") - dim(handle, "width"); origo = root.offset().left; } } init(); self.setValue(input.val() || conf.value || conf.min); }
var tmp = $("<input/>").attr("name", input.attr("name"));
var tmp = $("<input/>"); $.each("name,readonly,disabled".split(","), function(i, attr) { tmp.attr(attr, input.attr(attr)); }); tmp.val(conf.value);
function RangeInput(input, conf) { // private variables var self = this, css = conf.css, root = $("<div><div/><a href='#'/></div>").data("rangeinput", self), value, // current value origo, // handle's start point len, // length of the range pos; // current position of the handle // create range input.before(root); var handle = root.addClass(css.slider).find("a").addClass(css.handle), progress = root.find("div").addClass(css.progress), vertical = conf.vertical || dim(root, "height") > dim(root, "width"); // get (HTML5) attributes into configuration $.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); if (val || val === 0) { conf[key] = parseFloat(val, 10); } }); var range = conf.max - conf.min, step = conf.step == 'any' ? 0 : conf.step, precision = conf.precision; if (precision === undefined) { try { precision = step.toString().split(".")[1].length; } catch (err) { precision = 0; } } // Replace built-in range input (type attribute cannot be changed) if (input.attr("type") == 'range') { var tmp = $("<input/>").attr("name", input.attr("name")); input.replaceWith(tmp); input = tmp; } input.addClass(css.input); var fire = $(self).add(input), fireOnSlide = true; /** The flesh and bone of this tool. All sliding is routed trough this. @param evt types include: click, keydown, blur and api (setValue call) @param isSetValue when called trough setValue() call (keydown, blur, api) vertical configuration gives additional complexity. */ function slide(evt, x, val, isSetValue) { // calculate value based on slide position if (val === undefined) { val = x / len * range; // x is calculated based on val. we need to strip off min during calculation } else if (isSetValue) { val -= conf.min; } // increment in steps if (step) { val = Math.round(val / step) * step; } // count x based on value or tweak x if stepping is done if (x == undefined || step) { x = val * len / range; } // crazy value? if (isNaN(val)) { return self; } // stay within range x = Math.max(0, Math.min(x, len)); val = x / len * range; if (isSetValue || !vertical) { val += conf.min; } // in vertical ranges value rises upwards if (vertical) { if (isSetValue) { x = len -x; } else { val = conf.max - val; } } // precision val = round(val, precision); // onSlide var isClick = evt.type == "click"; if (fireOnSlide && value !== undefined && !isClick) { evt.type = "onSlide"; fire.trigger(evt, [val, x]); if (evt.isDefaultPrevented()) { return self; } } // speed & callback var speed = isClick ? conf.speed : 0, callback = isClick ? function() { evt.type = "change"; fire.trigger(evt, [val]); } : null; if (vertical) { handle.animate({top: x}, speed, callback); if (conf.progress) { progress.animate({height: len - x + handle.width() / 2}, speed); } } else { handle.animate({left: x}, speed, callback); if (conf.progress) { progress.animate({width: x + handle.width() / 2}, speed); } } // store current value value = val; pos = x; // se input field's value input.val(val); // HTML5 attribute input[0].valueAsNumber = val; return self; } $.extend(self, { getValue: function() { return value; }, setValue: function(val, e) { return slide(e || $.Event("api"), undefined, val, true); }, getConf: function() { return conf; }, getProgress: function() { return progress; }, getHandle: function() { return handle; }, getInput: function() { return input; }, step: function(am, e) { e = e || $.Event(); var step = conf.step == 'any' ? 1 : conf.step; self.setValue(value + step * (am || 1), e); }, // HTML5 compatible name stepUp: function(am) { return self.step(am || 1) }, // HTML5 compatible name stepDown: function(am) { return self.step(-am || -1) } }); // callbacks $.each("onSlide,change".split(","), function(i, name) { // from configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API methods self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // dragging handle.drag({drag: false}).bind("dragStart", function() { /* do some pre- calculations for seek() function. improves performance */ // avoid redundant event triggering (= heavy stuff) fireOnSlide = hasEvent($(self)) || hasEvent(input); }).bind("drag", function(e, y, x) { if (input.is(":disabled")) { return false; } slide(e, vertical ? y : x); }).bind("dragEnd", function(e) { if (!e.isDefaultPrevented()) { e.type = "change"; fire.trigger(e, [value]); } }).click(function(e) { return e.preventDefault(); }); // clicking root.click(function(e) { if (input.is(":disabled") || e.target == handle[0]) { return e.preventDefault(); } if (!origo) { init(); } var fix = handle.width() / 2; slide(e, vertical ? -(origo -e.pageY +fix) + len : e.pageX -origo -fix); }); if (conf.keyboard) { input.keydown(function(e) { if (input.attr("readonly")) { return; } var key = e.keyCode, up = $([75, 76, 38, 33, 39]).index(key) != -1, down = $([74, 72, 40, 34, 37]).index(key) != -1; if ((up || down) && !(e.shiftKey || e.altKey || e.ctrlKey)) { // UP: k=75, l=76, up=38, pageup=33, right=39 if (up) { self.step(key == 33 ? 10 : 1, e); // DOWN: j=74, h=72, down=40, pagedown=34, left=37 } else if (down) { self.step(key == 34 ? -10 : -1, e); } return e.preventDefault(); } }); } input.blur(function(e) { var val = $(this).val(); if (val !== value) { self.setValue(val, e); } }); // HTML5 DOM methods $.extend(input[0], { stepUp: self.stepUp, stepDown: self.stepDown}); function init() { if (vertical) { len = dim(root, "height") - dim(handle, "height"); origo = root.offset().top + len; } else { len = dim(root, "width") - dim(handle, "width"); origo = root.offset().left; } } init(); self.setValue(input.val() || conf.value || conf.min); }
if (!origo) { init(); }
init();
function RangeInput(input, conf) { // private variables var self = this, css = conf.css, root = $("<div><div/><a href='#'/></div>").data("rangeinput", self), value, // current value origo, // handle's start point len, // length of the range pos; // current position of the handle // create range input.before(root); var handle = root.addClass(css.slider).find("a").addClass(css.handle), progress = root.find("div").addClass(css.progress), vertical = conf.vertical || dim(root, "height") > dim(root, "width"); // get (HTML5) attributes into configuration $.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); if (val || val === 0) { conf[key] = parseFloat(val, 10); } }); var range = conf.max - conf.min, step = conf.step == 'any' ? 0 : conf.step, precision = conf.precision; if (precision === undefined) { try { precision = step.toString().split(".")[1].length; } catch (err) { precision = 0; } } // Replace built-in range input (type attribute cannot be changed) if (input.attr("type") == 'range') { var tmp = $("<input/>").attr("name", input.attr("name")); input.replaceWith(tmp); input = tmp; } input.addClass(css.input); var fire = $(self).add(input), fireOnSlide = true; /** The flesh and bone of this tool. All sliding is routed trough this. @param evt types include: click, keydown, blur and api (setValue call) @param isSetValue when called trough setValue() call (keydown, blur, api) vertical configuration gives additional complexity. */ function slide(evt, x, val, isSetValue) { // calculate value based on slide position if (val === undefined) { val = x / len * range; // x is calculated based on val. we need to strip off min during calculation } else if (isSetValue) { val -= conf.min; } // increment in steps if (step) { val = Math.round(val / step) * step; } // count x based on value or tweak x if stepping is done if (x == undefined || step) { x = val * len / range; } // crazy value? if (isNaN(val)) { return self; } // stay within range x = Math.max(0, Math.min(x, len)); val = x / len * range; if (isSetValue || !vertical) { val += conf.min; } // in vertical ranges value rises upwards if (vertical) { if (isSetValue) { x = len -x; } else { val = conf.max - val; } } // precision val = round(val, precision); // onSlide var isClick = evt.type == "click"; if (fireOnSlide && value !== undefined && !isClick) { evt.type = "onSlide"; fire.trigger(evt, [val, x]); if (evt.isDefaultPrevented()) { return self; } } // speed & callback var speed = isClick ? conf.speed : 0, callback = isClick ? function() { evt.type = "change"; fire.trigger(evt, [val]); } : null; if (vertical) { handle.animate({top: x}, speed, callback); if (conf.progress) { progress.animate({height: len - x + handle.width() / 2}, speed); } } else { handle.animate({left: x}, speed, callback); if (conf.progress) { progress.animate({width: x + handle.width() / 2}, speed); } } // store current value value = val; pos = x; // se input field's value input.val(val); // HTML5 attribute input[0].valueAsNumber = val; return self; } $.extend(self, { getValue: function() { return value; }, setValue: function(val, e) { return slide(e || $.Event("api"), undefined, val, true); }, getConf: function() { return conf; }, getProgress: function() { return progress; }, getHandle: function() { return handle; }, getInput: function() { return input; }, step: function(am, e) { e = e || $.Event(); var step = conf.step == 'any' ? 1 : conf.step; self.setValue(value + step * (am || 1), e); }, // HTML5 compatible name stepUp: function(am) { return self.step(am || 1) }, // HTML5 compatible name stepDown: function(am) { return self.step(-am || -1) } }); // callbacks $.each("onSlide,change".split(","), function(i, name) { // from configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API methods self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // dragging handle.drag({drag: false}).bind("dragStart", function() { /* do some pre- calculations for seek() function. improves performance */ // avoid redundant event triggering (= heavy stuff) fireOnSlide = hasEvent($(self)) || hasEvent(input); }).bind("drag", function(e, y, x) { if (input.is(":disabled")) { return false; } slide(e, vertical ? y : x); }).bind("dragEnd", function(e) { if (!e.isDefaultPrevented()) { e.type = "change"; fire.trigger(e, [value]); } }).click(function(e) { return e.preventDefault(); }); // clicking root.click(function(e) { if (input.is(":disabled") || e.target == handle[0]) { return e.preventDefault(); } if (!origo) { init(); } var fix = handle.width() / 2; slide(e, vertical ? -(origo -e.pageY +fix) + len : e.pageX -origo -fix); }); if (conf.keyboard) { input.keydown(function(e) { if (input.attr("readonly")) { return; } var key = e.keyCode, up = $([75, 76, 38, 33, 39]).index(key) != -1, down = $([74, 72, 40, 34, 37]).index(key) != -1; if ((up || down) && !(e.shiftKey || e.altKey || e.ctrlKey)) { // UP: k=75, l=76, up=38, pageup=33, right=39 if (up) { self.step(key == 33 ? 10 : 1, e); // DOWN: j=74, h=72, down=40, pagedown=34, left=37 } else if (down) { self.step(key == 34 ? -10 : -1, e); } return e.preventDefault(); } }); } input.blur(function(e) { var val = $(this).val(); if (val !== value) { self.setValue(val, e); } }); // HTML5 DOM methods $.extend(input[0], { stepUp: self.stepUp, stepDown: self.stepDown}); function init() { if (vertical) { len = dim(root, "height") - dim(handle, "height"); origo = root.offset().top + len; } else { len = dim(root, "width") - dim(handle, "width"); origo = root.offset().left; } } init(); self.setValue(input.val() || conf.value || conf.min); }
slide(e, vertical ? -(origo -e.pageY +fix) + len : e.pageX -origo -fix);
slide(e, vertical ? len-origo-fix + e.pageY : e.pageX -origo -fix);
function RangeInput(input, conf) { // private variables var self = this, css = conf.css, root = $("<div><div/><a href='#'/></div>").data("rangeinput", self), value, // current value origo, // handle's start point len, // length of the range pos; // current position of the handle // create range input.before(root); var handle = root.addClass(css.slider).find("a").addClass(css.handle), progress = root.find("div").addClass(css.progress), vertical = conf.vertical || dim(root, "height") > dim(root, "width"); // get (HTML5) attributes into configuration $.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); if (val || val === 0) { conf[key] = parseFloat(val, 10); } }); var range = conf.max - conf.min, step = conf.step == 'any' ? 0 : conf.step, precision = conf.precision; if (precision === undefined) { try { precision = step.toString().split(".")[1].length; } catch (err) { precision = 0; } } // Replace built-in range input (type attribute cannot be changed) if (input.attr("type") == 'range') { var tmp = $("<input/>").attr("name", input.attr("name")); input.replaceWith(tmp); input = tmp; } input.addClass(css.input); var fire = $(self).add(input), fireOnSlide = true; /** The flesh and bone of this tool. All sliding is routed trough this. @param evt types include: click, keydown, blur and api (setValue call) @param isSetValue when called trough setValue() call (keydown, blur, api) vertical configuration gives additional complexity. */ function slide(evt, x, val, isSetValue) { // calculate value based on slide position if (val === undefined) { val = x / len * range; // x is calculated based on val. we need to strip off min during calculation } else if (isSetValue) { val -= conf.min; } // increment in steps if (step) { val = Math.round(val / step) * step; } // count x based on value or tweak x if stepping is done if (x == undefined || step) { x = val * len / range; } // crazy value? if (isNaN(val)) { return self; } // stay within range x = Math.max(0, Math.min(x, len)); val = x / len * range; if (isSetValue || !vertical) { val += conf.min; } // in vertical ranges value rises upwards if (vertical) { if (isSetValue) { x = len -x; } else { val = conf.max - val; } } // precision val = round(val, precision); // onSlide var isClick = evt.type == "click"; if (fireOnSlide && value !== undefined && !isClick) { evt.type = "onSlide"; fire.trigger(evt, [val, x]); if (evt.isDefaultPrevented()) { return self; } } // speed & callback var speed = isClick ? conf.speed : 0, callback = isClick ? function() { evt.type = "change"; fire.trigger(evt, [val]); } : null; if (vertical) { handle.animate({top: x}, speed, callback); if (conf.progress) { progress.animate({height: len - x + handle.width() / 2}, speed); } } else { handle.animate({left: x}, speed, callback); if (conf.progress) { progress.animate({width: x + handle.width() / 2}, speed); } } // store current value value = val; pos = x; // se input field's value input.val(val); // HTML5 attribute input[0].valueAsNumber = val; return self; } $.extend(self, { getValue: function() { return value; }, setValue: function(val, e) { return slide(e || $.Event("api"), undefined, val, true); }, getConf: function() { return conf; }, getProgress: function() { return progress; }, getHandle: function() { return handle; }, getInput: function() { return input; }, step: function(am, e) { e = e || $.Event(); var step = conf.step == 'any' ? 1 : conf.step; self.setValue(value + step * (am || 1), e); }, // HTML5 compatible name stepUp: function(am) { return self.step(am || 1) }, // HTML5 compatible name stepDown: function(am) { return self.step(-am || -1) } }); // callbacks $.each("onSlide,change".split(","), function(i, name) { // from configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API methods self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // dragging handle.drag({drag: false}).bind("dragStart", function() { /* do some pre- calculations for seek() function. improves performance */ // avoid redundant event triggering (= heavy stuff) fireOnSlide = hasEvent($(self)) || hasEvent(input); }).bind("drag", function(e, y, x) { if (input.is(":disabled")) { return false; } slide(e, vertical ? y : x); }).bind("dragEnd", function(e) { if (!e.isDefaultPrevented()) { e.type = "change"; fire.trigger(e, [value]); } }).click(function(e) { return e.preventDefault(); }); // clicking root.click(function(e) { if (input.is(":disabled") || e.target == handle[0]) { return e.preventDefault(); } if (!origo) { init(); } var fix = handle.width() / 2; slide(e, vertical ? -(origo -e.pageY +fix) + len : e.pageX -origo -fix); }); if (conf.keyboard) { input.keydown(function(e) { if (input.attr("readonly")) { return; } var key = e.keyCode, up = $([75, 76, 38, 33, 39]).index(key) != -1, down = $([74, 72, 40, 34, 37]).index(key) != -1; if ((up || down) && !(e.shiftKey || e.altKey || e.ctrlKey)) { // UP: k=75, l=76, up=38, pageup=33, right=39 if (up) { self.step(key == 33 ? 10 : 1, e); // DOWN: j=74, h=72, down=40, pagedown=34, left=37 } else if (down) { self.step(key == 34 ? -10 : -1, e); } return e.preventDefault(); } }); } input.blur(function(e) { var val = $(this).val(); if (val !== value) { self.setValue(val, e); } }); // HTML5 DOM methods $.extend(input[0], { stepUp: self.stepUp, stepDown: self.stepDown}); function init() { if (vertical) { len = dim(root, "height") - dim(handle, "height"); origo = root.offset().top + len; } else { len = dim(root, "width") - dim(handle, "width"); origo = root.offset().left; } } init(); self.setValue(input.val() || conf.value || conf.min); }
init(); self.setValue(input.val() || conf.value || conf.min);
function begin() { init(); self.setValue(conf.value || conf.min); } begin(); if (!len) { $(window).load(begin); }
function RangeInput(input, conf) { // private variables var self = this, css = conf.css, root = $("<div><div/><a href='#'/></div>").data("rangeinput", self), value, // current value origo, // handle's start point len, // length of the range pos; // current position of the handle // create range input.before(root); var handle = root.addClass(css.slider).find("a").addClass(css.handle), progress = root.find("div").addClass(css.progress), vertical = conf.vertical || dim(root, "height") > dim(root, "width"); // get (HTML5) attributes into configuration $.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); if (val || val === 0) { conf[key] = parseFloat(val, 10); } }); var range = conf.max - conf.min, step = conf.step == 'any' ? 0 : conf.step, precision = conf.precision; if (precision === undefined) { try { precision = step.toString().split(".")[1].length; } catch (err) { precision = 0; } } // Replace built-in range input (type attribute cannot be changed) if (input.attr("type") == 'range') { var tmp = $("<input/>").attr("name", input.attr("name")); input.replaceWith(tmp); input = tmp; } input.addClass(css.input); var fire = $(self).add(input), fireOnSlide = true; /** The flesh and bone of this tool. All sliding is routed trough this. @param evt types include: click, keydown, blur and api (setValue call) @param isSetValue when called trough setValue() call (keydown, blur, api) vertical configuration gives additional complexity. */ function slide(evt, x, val, isSetValue) { // calculate value based on slide position if (val === undefined) { val = x / len * range; // x is calculated based on val. we need to strip off min during calculation } else if (isSetValue) { val -= conf.min; } // increment in steps if (step) { val = Math.round(val / step) * step; } // count x based on value or tweak x if stepping is done if (x == undefined || step) { x = val * len / range; } // crazy value? if (isNaN(val)) { return self; } // stay within range x = Math.max(0, Math.min(x, len)); val = x / len * range; if (isSetValue || !vertical) { val += conf.min; } // in vertical ranges value rises upwards if (vertical) { if (isSetValue) { x = len -x; } else { val = conf.max - val; } } // precision val = round(val, precision); // onSlide var isClick = evt.type == "click"; if (fireOnSlide && value !== undefined && !isClick) { evt.type = "onSlide"; fire.trigger(evt, [val, x]); if (evt.isDefaultPrevented()) { return self; } } // speed & callback var speed = isClick ? conf.speed : 0, callback = isClick ? function() { evt.type = "change"; fire.trigger(evt, [val]); } : null; if (vertical) { handle.animate({top: x}, speed, callback); if (conf.progress) { progress.animate({height: len - x + handle.width() / 2}, speed); } } else { handle.animate({left: x}, speed, callback); if (conf.progress) { progress.animate({width: x + handle.width() / 2}, speed); } } // store current value value = val; pos = x; // se input field's value input.val(val); // HTML5 attribute input[0].valueAsNumber = val; return self; } $.extend(self, { getValue: function() { return value; }, setValue: function(val, e) { return slide(e || $.Event("api"), undefined, val, true); }, getConf: function() { return conf; }, getProgress: function() { return progress; }, getHandle: function() { return handle; }, getInput: function() { return input; }, step: function(am, e) { e = e || $.Event(); var step = conf.step == 'any' ? 1 : conf.step; self.setValue(value + step * (am || 1), e); }, // HTML5 compatible name stepUp: function(am) { return self.step(am || 1) }, // HTML5 compatible name stepDown: function(am) { return self.step(-am || -1) } }); // callbacks $.each("onSlide,change".split(","), function(i, name) { // from configuration if ($.isFunction(conf[name])) { $(self).bind(name, conf[name]); } // API methods self[name] = function(fn) { $(self).bind(name, fn); return self; }; }); // dragging handle.drag({drag: false}).bind("dragStart", function() { /* do some pre- calculations for seek() function. improves performance */ // avoid redundant event triggering (= heavy stuff) fireOnSlide = hasEvent($(self)) || hasEvent(input); }).bind("drag", function(e, y, x) { if (input.is(":disabled")) { return false; } slide(e, vertical ? y : x); }).bind("dragEnd", function(e) { if (!e.isDefaultPrevented()) { e.type = "change"; fire.trigger(e, [value]); } }).click(function(e) { return e.preventDefault(); }); // clicking root.click(function(e) { if (input.is(":disabled") || e.target == handle[0]) { return e.preventDefault(); } if (!origo) { init(); } var fix = handle.width() / 2; slide(e, vertical ? -(origo -e.pageY +fix) + len : e.pageX -origo -fix); }); if (conf.keyboard) { input.keydown(function(e) { if (input.attr("readonly")) { return; } var key = e.keyCode, up = $([75, 76, 38, 33, 39]).index(key) != -1, down = $([74, 72, 40, 34, 37]).index(key) != -1; if ((up || down) && !(e.shiftKey || e.altKey || e.ctrlKey)) { // UP: k=75, l=76, up=38, pageup=33, right=39 if (up) { self.step(key == 33 ? 10 : 1, e); // DOWN: j=74, h=72, down=40, pagedown=34, left=37 } else if (down) { self.step(key == 34 ? -10 : -1, e); } return e.preventDefault(); } }); } input.blur(function(e) { var val = $(this).val(); if (val !== value) { self.setValue(val, e); } }); // HTML5 DOM methods $.extend(input[0], { stepUp: self.stepUp, stepDown: self.stepDown}); function init() { if (vertical) { len = dim(root, "height") - dim(handle, "height"); origo = root.offset().top + len; } else { len = dim(root, "width") - dim(handle, "width"); origo = root.offset().left; } } init(); self.setValue(input.val() || conf.value || conf.min); }
var val = (this.isGM ? GM_getValue : (function (name, def) { return localStorage.getItem(name) || def }))((store || this.storage), '{}'), rval;
var val = (isGM ? GM_getValue : (function(name, def){ var s=localStorage.getItem(name); return s == null ? def : s }))((store||this.storage), ‘{}’), rval;
read: function (store) { try { var val = (this.isGM ? GM_getValue : (function (name, def) { return localStorage.getItem(name) || def }))((store || this.storage), '{}'), rval; rval = JSON.parse(val); } catch(e) { this.log("GM_config failed to read saved settings!"); rval = {}; } return rval; },
var browser_info = Pfs.UI.browserInfo(); $this.property_defaults.os_name = browser_info.clientOS; $this.property_defaults.platform = { app_id: browser_info.appID, app_release: browser_info.appRelease, app_version: browser_info.appVersion, locale: browser_info.chromeLocale };
ready: function () { // Update defaults from browser detection details. var browser_info = Pfs.UI.browserInfo(); $this.property_defaults.os_name = browser_info.clientOS; $this.property_defaults.platform = { app_id: browser_info.appID, app_release: browser_info.appRelease, app_version: browser_info.appVersion, locale: browser_info.chromeLocale }; // Disable form submit for editor. $('#editor').submit(function () { return false; }); // Wire up autosave on mime & alias changes. $('#mimes, #literal_aliases, #regex_aliases') .change($this.scheduleSavePlugin); // Wire up manual save button. $('button#save').click($this.savePlugin); // Wire up autosave toggle box. $('#autosave').change(function () { $this.autosave = !$this.autosave; $this.updateStatusMessage("Autosave " + (($this.autosave) ? 'enabled' : 'disabled')); return true; }); // Wire up a quick & dirty outline UI $('form#editor').click(function (ev) { if ('legend' == ev.target.nodeName.toLowerCase()) { $(ev.target).parent().toggleClass('closed'); } }); // Wire up the add release button $('form#editor #add_blank_release').click(function (ev) { var release = $this.addRelease(); release.find('fieldset').removeClass('closed'); return false; }); // Wire up controls for meta fields. var meta = $('#meta-fields').parent(); meta.find('.controls .hide').click( function () { $this.hideEmptyProperties(meta); return false; }); meta.find('.controls .show').click( function () { $this.showAllProperties(meta); return false; }); // If the server set a JSON URL for loading, do so. if ($this.json_url) { $this.loadPlugin($this.json_url); } },
if (ex[k].pattern.test(msg.routingKey)) { match = true; ex[k].fireEvent("rcv", msg); }
for(var k in ex) { if (ex[k].pattern.test(msg.routingKey)) { match = true; ex[k].fireEvent("rcv", msg); } }
receive: function(msg) { if(this.queue == "auto") { this.queue = MQ.dispatch("getAutoQueueName"); } var match = false; var ex = this.bindings[msg.exchange]; if(ex) { var type = MQ.exchanges[msg.exchange].type; if (type == 'fanout') { for(var k in ex) { match = true; ex[k].fireEvent("rcv", msg); break; } } else if (type == 'direct') { for(var k in ex) { if (k == msg.routingKey) { match = true; ex[k].fireEvent("rcv", msg); } } } else { if (ex[k].pattern.test(msg.routingKey)) { match = true; ex[k].fireEvent("rcv", msg); } } } //default to the queue callback if(!match) { this.fireEvent("rcv", msg); } },
if (request.status == 200)
if (request.status == 200 && request.getResponseHeader("Content-Type") .indexOf("text/javascript") == 0)
function recvCallback() { if (request.readyState == 4) { if (handled) return; // console.log("recvCallback " + request.status); clearTimeout(timer); if (request.status == 200) handler(0, request.responseText, userData); else handler(1, null, userData); request.onreadystatechange = new Function; handled = true; } }
t==true){c.cancelEvent(b);return false}var f=i,j=b.keyCode==40||b.keyCode==34;b=b.keyCode==34||b.keyCode==33?d.clientHeight/i.offsetHeight:1;var h;for(h=0;f&&h<b;++h){var l=B(f,j);if(!l)break;f=l}if(f&&c.hasTag(f,"DIV")){i.className="";f.className="sel";m=f.id}return false}return b.keyCode!=13&&b.keyCode!=9};this.filtered=function(a){u=a;n.refilter()};this.refilter=function(){var a=m?c.getElement(m):null,b=c.getElement(e),i=y(b),f=!$(b).hasClass("Wt-suggest-dropdown"),j=d.lastChild.childNodes,h=i(null); if(p)if(f&&h.length<p){k();return}else{j=h.substring(0,p);if(j!=u){if(j!=v){v=j;q.emit(d,"filter",j)}if(f){k();return}}}var l=null;j=d.lastChild.childNodes;f=!f&&h.length==0;for(h=0;h<j.length;h++){var g=j[h];if(c.hasTag(g,"DIV")){if(g.orig==null)g.orig=g.firstChild.innerHTML;else g.firstChild.innerHTML=g.orig;var w=i(g.firstChild.innerHTML),C=f||w.match;g.firstChild.innerHTML=w.suggestion;if(C){g.style.display="";if(l==null)l=g}else g.style.display="none";g.className=""}}if(l==null)k();else{if(!r()){z(b); n.showPopup();a=null}if(!a||a.style.display=="none"){m=l.id;a=l;a.parentNode.scrollTop=0}a.className="sel";b=a.parentNode;if(a.offsetTop+a.offsetHeight>b.scrollTop+b.clientHeight)b.scrollTop=a.offsetTop+a.offsetHeight-b.clientHeight;else if(a.offsetTop<b.scrollTop)b.scrollTop=a.offsetTop}};this.editKeyUp=function(a,b){if(e!=null)if(!((b.keyCode==13||b.keyCode==9)&&d.style.display=="none"))if(b.keyCode==27||b.keyCode==37||b.keyCode==39){d.style.display="none";if(b.keyCode==27){e=null;$(a).hasClass("Wt-suggest-dropdown")?
this.refilter=function(){var a=l?c.getElement(l):null,b=c.getElement(f),h=z(b),e=!$(b).hasClass("Wt-suggest-dropdown"),p=d.lastChild.childNodes,j=h(null);if(r)if(e&&j.length<r){k();return}else{var g=j.substring(0,r);if(g!=v){if(g!=w){w=g;q.emit(d,"filter",g)}if(e){k();return}}}g=null;e=!e&&j.length==0;for(j=0;j<p.length;j++){var i=p[j];if(c.hasTag(i,"DIV")){if(i.orig==null)i.orig=i.firstChild.innerHTML;else i.firstChild.innerHTML=i.orig;var x=h(i.firstChild.innerHTML),D=e||x.match;i.firstChild.innerHTML= x.suggestion;if(D){i.style.display="";if(g==null)g=i}else i.style.display="none";i.className=""}}if(g==null)k();else{if(!s()){A(b);n.showPopup();a=null}if(!a||a.style.display=="none"){l=g.id;a=g;a.parentNode.scrollTop=0}a.className="sel";b=a.parentNode;if(a.offsetTop+a.offsetHeight>b.scrollTop+b.clientHeight)b.scrollTop=a.offsetTop+a.offsetHeight-b.clientHeight;else if(a.offsetTop<b.scrollTop)b.scrollTop=a.offsetTop}};this.editKeyUp=function(a,b){if(f!=null)if(m(a))if(!((b.keyCode==13||b.keyCode==
t==true){c.cancelEvent(b);return false}var f=i,j=b.keyCode==40||b.keyCode==34;b=b.keyCode==34||b.keyCode==33?d.clientHeight/i.offsetHeight:1;var h;for(h=0;f&&h<b;++h){var l=B(f,j);if(!l)break;f=l}if(f&&c.hasTag(f,"DIV")){i.className="";f.className="sel";m=f.id}return false}return b.keyCode!=13&&b.keyCode!=9};this.filtered=function(a){u=a;n.refilter()};this.refilter=function(){var a=m?c.getElement(m):null,b=c.getElement(e),i=y(b),f=!$(b).hasClass("Wt-suggest-dropdown"),j=d.lastChild.childNodes,h=i(null);if(p)if(f&&h.length<p){k();return}else{j=h.substring(0,p);if(j!=u){if(j!=v){v=j;q.emit(d,"filter",j)}if(f){k();return}}}var l=null;j=d.lastChild.childNodes;f=!f&&h.length==0;for(h=0;h<j.length;h++){var g=j[h];if(c.hasTag(g,"DIV")){if(g.orig==null)g.orig=g.firstChild.innerHTML;else g.firstChild.innerHTML=g.orig;var w=i(g.firstChild.innerHTML),C=f||w.match;g.firstChild.innerHTML=w.suggestion;if(C){g.style.display="";if(l==null)l=g}else g.style.display="none";g.className=""}}if(l==null)k();else{if(!r()){z(b);n.showPopup();a=null}if(!a||a.style.display=="none"){m=l.id;a=l;a.parentNode.scrollTop=0}a.className="sel";b=a.parentNode;if(a.offsetTop+a.offsetHeight>b.scrollTop+b.clientHeight)b.scrollTop=a.offsetTop+a.offsetHeight-b.clientHeight;else if(a.offsetTop<b.scrollTop)b.scrollTop=a.offsetTop}};this.editKeyUp=function(a,b){if(e!=null)if(!((b.keyCode==13||b.keyCode==9)&&d.style.display=="none"))if(b.keyCode==27||b.keyCode==37||b.keyCode==39){d.style.display="none";if(b.keyCode==27){e=null;$(a).hasClass("Wt-suggest-dropdown")?
40||b.keyCode==34;b=b.keyCode==34||b.keyCode==33?f.clientHeight/k.offsetHeight:1;var j;for(j=0;l&&j<b;++j){var v=z(l,p);if(!v)break;l=v}if(l&&e.hasTag(l,"DIV")){k.className="";l.className="sel";n=l.id}return false}return b.keyCode!=13&&b.keyCode!=9};this.filtered=function(a){H=a;A.refilter()};this.refilter=function(){var a=n?e.getElement(n):null,b=e.getElement(i),k=C(b),l=f.lastChild.childNodes,p=k(null);D=b.value;if(q)if(p.length<q&&!r){d();return}else{var j=p.substring(0,q);if(j!=H){if(j!=I){I= j;s.emit(f,"filter",j)}if(!r){d();return}}}var v=j=null;p=r&&p.length==0;var w,J;w=0;for(J=l.length;w<J;++w){var h=l[w];if(e.hasTag(h,"DIV")){if(h.orig==null)h.orig=h.firstChild.innerHTML;var E=k(h.orig),K=p||E.match;if(E.suggestion!=h.firstChild.innerHTML)h.firstChild.innerHTML=E.suggestion;if(K){if(h.style.display!="")h.style.display="";if(j==null)j=h;if(w==this.defaultValue)v=h}else if(h.style.display!="none")h.style.display="none";if(h.className!="")h.className=""}}if(j==null)d();else{if(!g()){m(b); A.showPopup();a=null}if(!a||a.style.display=="none"){a=v||j;a.parentNode.scrollTop=0;n=a.id}a.className="sel";F(a)}};this.editKeyUp=function(a,b){if(i!=null)if(c(a))if(!((b.keyCode==13||b.keyCode==9)&&f.style.display=="none"))if(b.keyCode==27||b.keyCode==37||b.keyCode==39){f.style.display="none";if(b.keyCode==27){i=null;$(a).hasClass("Wt-suggest-dropdown")?d():a.blur()}}else if(a.value!=D)A.refilter();else(a=n?e.getElement(n):null)&&F(a)};f.lastChild.onclick=o;f.lastChild.onscroll=function(){if(B){clearTimeout(B);
k.offsetHeight:1;var j;for(j=0;l&&j<b;++j){var u=z(l,p);if(!u)break;l=u}if(l&&e.hasTag(l,"DIV")){k.className="";l.className="sel";n=l.id}return false}return b.keyCode!=13&&b.keyCode!=9};this.filtered=function(a){H=a;A.refilter()};this.refilter=function(){var a=n?e.getElement(n):null,b=e.getElement(i),k=C(b),l=f.lastChild.childNodes,p=k(null);D=b.value;if(q)if(p.length<q&&!r){d();return}else{var j=p.substring(0,q);if(j!=H){if(j!=I){I=j;s.emit(f,"filter",j)}if(!r){d();return}}}var u=j=null;p=r&&p.length== 0;var v,J;v=0;for(J=l.length;v<J;++v){var h=l[v];if(e.hasTag(h,"DIV")){if(h.orig==null)h.orig=h.firstChild.innerHTML;var E=k(h.orig),K=p||E.match;if(E.suggestion!=h.firstChild.innerHTML)h.firstChild.innerHTML=E.suggestion;if(K){if(h.style.display!="")h.style.display="";if(j==null)j=h;if(v==this.defaultValue)u=h}else if(h.style.display!="none")h.style.display="none";if(h.className!="")h.className=""}}if(j==null)d();else{if(!g()){m(b);A.showPopup();a=null}if(!a||a.style.display=="none"){a=u||j;a.parentNode.scrollTop= 0;n=a.id}a.className="sel";F(a)}};this.editKeyUp=function(a,b){if(i!=null)if(c(a))if(!((b.keyCode==13||b.keyCode==9)&&f.style.display=="none"))if(b.keyCode==27||b.keyCode==37||b.keyCode==39){f.style.display="none";if(b.keyCode==27){i=null;$(a).hasClass("Wt-suggest-dropdown")?d():a.blur()}}else if(a.value!=D)A.refilter();else(a=n?e.getElement(n):null)&&F(a)};f.lastChild.onclick=o;f.lastChild.onscroll=function(){if(B){clearTimeout(B);var a=e.getElement(i);a&&a.focus()}};this.delayHide=function(a){B=
40||b.keyCode==34;b=b.keyCode==34||b.keyCode==33?f.clientHeight/k.offsetHeight:1;var j;for(j=0;l&&j<b;++j){var v=z(l,p);if(!v)break;l=v}if(l&&e.hasTag(l,"DIV")){k.className="";l.className="sel";n=l.id}return false}return b.keyCode!=13&&b.keyCode!=9};this.filtered=function(a){H=a;A.refilter()};this.refilter=function(){var a=n?e.getElement(n):null,b=e.getElement(i),k=C(b),l=f.lastChild.childNodes,p=k(null);D=b.value;if(q)if(p.length<q&&!r){d();return}else{var j=p.substring(0,q);if(j!=H){if(j!=I){I=j;s.emit(f,"filter",j)}if(!r){d();return}}}var v=j=null;p=r&&p.length==0;var w,J;w=0;for(J=l.length;w<J;++w){var h=l[w];if(e.hasTag(h,"DIV")){if(h.orig==null)h.orig=h.firstChild.innerHTML;var E=k(h.orig),K=p||E.match;if(E.suggestion!=h.firstChild.innerHTML)h.firstChild.innerHTML=E.suggestion;if(K){if(h.style.display!="")h.style.display="";if(j==null)j=h;if(w==this.defaultValue)v=h}else if(h.style.display!="none")h.style.display="none";if(h.className!="")h.className=""}}if(j==null)d();else{if(!g()){m(b);A.showPopup();a=null}if(!a||a.style.display=="none"){a=v||j;a.parentNode.scrollTop=0;n=a.id}a.className="sel";F(a)}};this.editKeyUp=function(a,b){if(i!=null)if(c(a))if(!((b.keyCode==13||b.keyCode==9)&&f.style.display=="none"))if(b.keyCode==27||b.keyCode==37||b.keyCode==39){f.style.display="none";if(b.keyCode==27){i=null;$(a).hasClass("Wt-suggest-dropdown")?d():a.blur()}}else if(a.value!=D)A.refilter();else(a=n?e.getElement(n):null)&&F(a)};f.lastChild.onclick=o;f.lastChild.onscroll=function(){if(B){clearTimeout(B);
sels = el.lastChild.childNodes,
this.refilter = function() { var sel = selId ? WT.getElement(selId) : null, edit = WT.getElement(editId), matcher = matcherJS(edit), canhide = !$(edit).hasClass("Wt-suggest-dropdown"), sels = el.lastChild.childNodes, text = matcher(null); if (filterLength) { if (canhide && text.length < filterLength) { hidePopup(); return; } else { var nf = text.substring(0, filterLength); if (nf != filter) { if (nf != filtering) { filtering = nf; APP.emit(el, "filter", nf); } if (canhide) { hidePopup(); return; } } } } var first = null, sels = el.lastChild.childNodes, showall = !canhide && text.length == 0; for (var i = 0; i < sels.length; i++) { var child = sels[i]; if (WT.hasTag(child, 'DIV')) { if (child.orig == null) child.orig = child.firstChild.innerHTML; else child.firstChild.innerHTML = child.orig; var result = matcher(child.firstChild.innerHTML), match = showall || result.match; child.firstChild.innerHTML = result.suggestion; if (match) { child.style.display = ''; if (first == null) first = child; } else child.style.display = 'none'; child.className = ''; } } if (first == null) { hidePopup(); } else { if (!visible()) { positionPopup(edit); self.showPopup(); sel = null; } if (!sel || (sel.style.display == 'none')) { selId = first.id; sel = first; sel.parentNode.scrollTop = 0; } /* * Make sure currently selected is scrolled into view */ sel.className = 'sel'; var p = sel.parentNode; if (sel.offsetTop + sel.offsetHeight > p.scrollTop + p.clientHeight) p.scrollTop = sel.offsetTop + sel.offsetHeight - p.clientHeight; else if (sel.offsetTop < p.scrollTop) p.scrollTop = sel.offsetTop; } };
this.refilter=function(){var a=l?c.getElement(l):null,b=c.getElement(f),h=z(b),e=!$(b).hasClass("Wt-suggest-dropdown"),p=d.lastChild.childNodes,j=h(null);if(r)if(e&&j.length<r){k();return}else{var g=j.substring(0,r);if(g!=v){if(g!=w){w=g;q.emit(d,"filter",g)}if(e){k();return}}}g=null;e=!e&&j.length==0;for(j=0;j<p.length;j++){var i=p[j];if(c.hasTag(i,"DIV")){if(i.orig==null)i.orig=i.firstChild.innerHTML;else i.firstChild.innerHTML=i.orig;var x=h(i.firstChild.innerHTML),D=e||x.match;i.firstChild.innerHTML= x.suggestion;if(D){i.style.display="";if(g==null)g=i}else i.style.display="none";i.className=""}}if(g==null)k();else{if(!s()){A(b);n.showPopup();a=null}if(!a||a.style.display=="none"){l=g.id;a=g;a.parentNode.scrollTop=0}a.className="sel";b=a.parentNode;if(a.offsetTop+a.offsetHeight>b.scrollTop+b.clientHeight)b.scrollTop=a.offsetTop+a.offsetHeight-b.clientHeight;else if(a.offsetTop<b.scrollTop)b.scrollTop=a.offsetTop}};this.editKeyUp=function(a,b){if(f!=null)if(m(a))if(!((b.keyCode==13||b.keyCode==
1;var j;for(j=0;e&&j<b;++j){var g=E(e,p);if(!g)break;e=g}if(e&&c.hasTag(e,"DIV")){h.className="";e.className="sel";k=e.id}return false}return b.keyCode!=13&&b.keyCode!=9};this.filtered=function(a){x=a;n.refilter()};this.refilter=function(){var a=k?c.getElement(k):null,b=c.getElement(f),h=B(b),e=!$(b).hasClass("Wt-suggest-dropdown"),p=d.lastChild.childNodes,j=h(null);s=b.value;if(r)if(e&&j.length<r){l();return}else{var g=j.substring(0,r);if(g!=x){if(g!=y){y=g;q.emit(d,"filter",g)}if(e){l();return}}}g= null;e=!e&&j.length==0;for(j=0;j<p.length;j++){var i=p[j];if(c.hasTag(i,"DIV")){if(i.orig==null)i.orig=i.firstChild.innerHTML;else i.firstChild.innerHTML=i.orig;var z=h(i.firstChild.innerHTML),F=e||z.match;i.firstChild.innerHTML=z.suggestion;if(F){i.style.display="";if(g==null)g=i}else i.style.display="none";i.className=""}}if(g==null)l();else{if(!t()){C(b);n.showPopup();a=null}if(!a||a.style.display=="none"){k=g.id;a=g;a.parentNode.scrollTop=0}a.className="sel";v(a)}};this.editKeyUp=function(a,b){if(f!=
this.refilter=function(){var a=l?c.getElement(l):null,b=c.getElement(f),h=z(b),e=!$(b).hasClass("Wt-suggest-dropdown"),p=d.lastChild.childNodes,j=h(null);if(r)if(e&&j.length<r){k();return}else{var g=j.substring(0,r);if(g!=v){if(g!=w){w=g;q.emit(d,"filter",g)}if(e){k();return}}}g=null;e=!e&&j.length==0;for(j=0;j<p.length;j++){var i=p[j];if(c.hasTag(i,"DIV")){if(i.orig==null)i.orig=i.firstChild.innerHTML;else i.firstChild.innerHTML=i.orig;var x=h(i.firstChild.innerHTML),D=e||x.match;i.firstChild.innerHTML=x.suggestion;if(D){i.style.display="";if(g==null)g=i}else i.style.display="none";i.className=""}}if(g==null)k();else{if(!s()){A(b);n.showPopup();a=null}if(!a||a.style.display=="none"){l=g.id;a=g;a.parentNode.scrollTop=0}a.className="sel";b=a.parentNode;if(a.offsetTop+a.offsetHeight>b.scrollTop+b.clientHeight)b.scrollTop=a.offsetTop+a.offsetHeight-b.clientHeight;else if(a.offsetTop<b.scrollTop)b.scrollTop=a.offsetTop}};this.editKeyUp=function(a,b){if(f!=null)if(m(a))if(!((b.keyCode==13||b.keyCode==
var p = sel.parentNode; if (sel.offsetTop + sel.offsetHeight > p.scrollTop + p.clientHeight) p.scrollTop = sel.offsetTop + sel.offsetHeight - p.clientHeight; else if (sel.offsetTop < p.scrollTop) p.scrollTop = sel.offsetTop;
scrollToSelected(sel);
this.refilter = function() { var sel = selId ? WT.getElement(selId) : null, edit = WT.getElement(editId), matcher = matcherJS(edit), canhide = !$(edit).hasClass("Wt-suggest-dropdown"), sels = el.lastChild.childNodes, text = matcher(null); if (filterLength) { if (canhide && text.length < filterLength) { hidePopup(); return; } else { var nf = text.substring(0, filterLength); if (nf != filter) { if (nf != filtering) { filtering = nf; APP.emit(el, "filter", nf); } if (canhide) { hidePopup(); return; } } } } var first = null, showall = !canhide && text.length == 0; for (var i = 0; i < sels.length; i++) { var child = sels[i]; if (WT.hasTag(child, 'DIV')) { if (child.orig == null) child.orig = child.firstChild.innerHTML; else child.firstChild.innerHTML = child.orig; var result = matcher(child.firstChild.innerHTML), match = showall || result.match; child.firstChild.innerHTML = result.suggestion; if (match) { child.style.display = ''; if (first == null) first = child; } else child.style.display = 'none'; child.className = ''; } } if (first == null) { hidePopup(); } else { if (!visible()) { positionPopup(edit); self.showPopup(); sel = null; } if (!sel || (sel.style.display == 'none')) { selId = first.id; sel = first; sel.parentNode.scrollTop = 0; } /* * Make sure currently selected is scrolled into view */ sel.className = 'sel'; var p = sel.parentNode; if (sel.offsetTop + sel.offsetHeight > p.scrollTop + p.clientHeight) p.scrollTop = sel.offsetTop + sel.offsetHeight - p.clientHeight; else if (sel.offsetTop < p.scrollTop) p.scrollTop = sel.offsetTop; } };
(function(){var l='.%2 p,.%2 div,.%2 pre,.%2 address,.%2 blockquote,.%2 h1,.%2 h2,.%2 h3,.%2 h4,.%2 h5,.%2 h6{background-repeat: no-repeat;border: 1px dotted gray;padding-top: 8px;padding-left: 8px;}.%2 p{%1p.png);}.%2 div{%1div.png);}.%2 pre{%1pre.png);}.%2 address{%1address.png);}.%2 blockquote{%1blockquote.png);}.%2 h1{%1h1.png);}.%2 h2{%1h2.png);}.%2 h3{%1h3.png);}.%2 h4{%1h4.png);}.%2 h5{%1h5.png);}.%2 h6{%1h6.png);}',m=/%1/g,n=/%2/g,o={preserveState:true,editorFocus:false,exec:function(p){this.toggleState();this.refresh(p);},refresh:function(p){var q=this.state==1?'addClass':'removeClass';p.document.getBody()[q]('cke_show_blocks');}};j.add('showblocks',{requires:['wysiwygarea'],init:function(p){var q=p.addCommand('showblocks',o);q.canUndo=false;if(p.config.startupOutlineBlocks)q.setState(1);p.addCss(l.replace(m,'background-image: url('+a.getUrl(this.path)+'images/block_').replace(n,'cke_show_blocks '));p.ui.addButton('ShowBlocks',{label:p.lang.showBlocks,command:'showblocks'});p.on('mode',function(){if(q.state!=0)q.refresh(p);});p.on('contentDom',function(){if(q.state!=0)q.refresh(p);});}});})();i.startupOutlineBlocks=false;(function(){var l='cke_show_border',m,n=(b.ie6Compat?['.%1 table.%2,','.%1 table.%2 td, .%1 table.%2 th,','{','border : #d3d3d3 1px dotted','}']:['.%1 table.%2,','.%1 table.%2 > tr > td, .%1 table.%2 > tr > th,','.%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,','.%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,','.%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th','{','border : #d3d3d3 1px dotted','}']).join('');m=n.replace(/%2/g,l).replace(/%1/g,'cke_show_borders ');var o={preserveState:true,editorFocus:false,exec:function(p){this.toggleState();this.refresh(p);},refresh:function(p){var q=this.state==1?'addClass':'removeClass';p.document.getBody()[q]('cke_show_borders');}};j.add('showborders',{requires:['wysiwygarea'],modes:{wysiwyg:1},init:function(p){var q=p.addCommand('showborders',o);q.canUndo=false;if(p.config.startupShowBorders!==false)q.setState(1);p.addCss(m);p.on('mode',function(){if(q.state!=0)q.refresh(p);},null,null,100);p.on('contentDom',function(){if(q.state!=0)q.refresh(p);});},afterInit:function(p){var q=p.dataProcessor,r=q&&q.dataFilter,s=q&&q.htmlFilter;if(r)r.addRules({elements:{table:function(t){var u=t.attributes,v=u['class'],w=parseInt(u.border,10);if(!w||w<=0)u['class']=(v||'')+' '+l;}}});if(s)s.addRules({elements:{table:function(t){var u=t.attributes,v=u['class'];v&&(u['class']=v.replace(l,'').replace(/\s{2}/,' ').replace(/^\s+|\s+$/,''));
a.dialog.add('smiley',this.path+'dialogs/smiley.js');}});i.smiley_images=['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'];i.smiley_descriptions=['smiley','sad','wink','laugh','frown','cheeky','blush','surprise','indecision','angry','angel','cool','devil','crying','enlightened','no','yes','heart','broken heart','kiss','mail'];(function(){var l='.%2 p,.%2 div,.%2 pre,.%2 address,.%2 blockquote,.%2 h1,.%2 h2,.%2 h3,.%2 h4,.%2 h5,.%2 h6{background-repeat: no-repeat;background-position: top %3;border: 1px dotted gray;padding-top: 8px;padding-%3: 8px;}.%2 p{%1p.png);}.%2 div{%1div.png);}.%2 pre{%1pre.png);}.%2 address{%1address.png);}.%2 blockquote{%1blockquote.png);}.%2 h1{%1h1.png);}.%2 h2{%1h2.png);}.%2 h3{%1h3.png);}.%2 h4{%1h4.png);}.%2 h5{%1h5.png);}.%2 h6{%1h6.png);}',m=/%1/g,n=/%2/g,o=/%3/g,p={preserveState:true,editorFocus:false,exec:function(q){this.toggleState();this.refresh(q);},refresh:function(q){var r=this.state==1?'addClass':'removeClass';q.document.getBody()[r]('cke_show_blocks');}};j.add('showblocks',{requires:['wysiwygarea'],init:function(q){var r=q.addCommand('showblocks',p);r.canUndo=false;if(q.config.startupOutlineBlocks)r.setState(1);q.addCss(l.replace(m,'background-image: url('+a.getUrl(this.path)+'images/block_').replace(n,'cke_show_blocks ').replace(o,q.lang.dir=='rtl'?'right':'left'));q.ui.addButton('ShowBlocks',{label:q.lang.showBlocks,command:'showblocks'});q.on('mode',function(){if(r.state!=0)r.refresh(q);});q.on('contentDom',function(){if(r.state!=0)r.refresh(q);});}});})();i.startupOutlineBlocks=false;(function(){var l='cke_show_border',m,n=(b.ie6Compat?['.%1 table.%2,','.%1 table.%2 td, .%1 table.%2 th,','{','border : #d3d3d3 1px dotted','}']:['.%1 table.%2,','.%1 table.%2 > tr > td, .%1 table.%2 > tr > th,','.%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,','.%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,','.%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th','{','border : #d3d3d3 1px dotted','}']).join('');m=n.replace(/%2/g,l).replace(/%1/g,'cke_show_borders ');var o={preserveState:true,editorFocus:false,exec:function(p){this.toggleState();this.refresh(p);},refresh:function(p){var q=this.state==1?'addClass':'removeClass'; p.document.getBody()[q]('cke_show_borders');}};j.add('showborders',{requires:['wysiwygarea'],modes:{wysiwyg:1},init:function(p){var q=p.addCommand('showborders',o);q.canUndo=false;if(p.config.startupShowBorders!==false)q.setState(1);p.addCss(m);p.on('mode',function(){if(q.state!=0)q.refresh(p);},null,null,100);p.on('contentDom',function(){if(q.state!=0)q.refresh(p);});p.on('removeFormatCleanup',function(r){var s=r.data;if(p.getCommand('showborders').state==1&&s.is('table')&&(!s.hasAttribute('border')||parseInt(s.getAttribute('border'),10)<=0))s.addClass(l);});},afterInit:function(p){var q=p.dataProcessor,r=q&&q.dataFilter,s=q&&q.htmlFilter;if(r)r.addRules({elements:{table:function(t){var u=t.attributes,v=u['class'],w=parseInt(u.border,10);if(!w||w<=0)u['class']=(v||'')+' '+l;}}});if(s)s.addRules({elements:{table:function(t){var u=t.attributes,v=u['class'];v&&(u['class']=v.replace(l,'').replace(/\s{2}/,' ').replace(/^\s+|\s+$/,''));}}});}});a.on('dialogDefinition',function(p){var q=p.data.name;if(q=='table'||q=='tableProperties'){var r=p.data.definition,s=r.getContents('info'),t=s.get('txtBorder'),u=t.commit;t.commit=e.override(u,function(x){return function(y,z){x.apply(this,arguments);var A=parseInt(this.getValue(),10);z[!A||A<=0?'addClass':'removeClass'](l);};});var v=r.getContents('advanced'),w=v&&v.get('advCSSClasses');if(w){w.setup=e.override(w.setup,function(x){return function(){x.apply(this,arguments);this.setValue(this.getValue().replace(/cke_show_border/,''));};});w.commit=e.override(w.commit,function(x){return function(y,z){x.apply(this,arguments);if(!parseInt(z.getAttribute('border'),10))z.addClass('cke_show_border');};});}}});})();j.add('sourcearea',{requires:['editingblock'],init:function(l){var m=j.sourcearea,n=a.document.getWindow();l.on('editingBlockReady',function(){var o,p;l.addMode('source',{load:function(q,r){if(c&&b.version<8)q.setStyle('position','relative');l.textarea=o=new h('textarea');o.setAttributes({dir:'ltr',tabIndex:b.webkit?-1:l.tabIndex,role:'textbox','aria-label':l.lang.editorTitle.replace('%1',l.name)});o.addClass('cke_source');o.addClass('cke_enable_context_menu');var s={width:b.ie7Compat?'99%':'100%',height:'100%',resize:'none',outline:'none','text-align':'left'};if(c){p=function(){o.hide();o.setStyle('height',q.$.clientHeight+'px');o.setStyle('width',q.$.clientWidth+'px');o.show();};l.on('resize',p);n.on('resize',p);setTimeout(p,0);}else o.on('mousedown',function(u){u.data.stopPropagation();});q.setHtml('');q.append(o);o.setStyles(s);
(function(){var l='.%2 p,.%2 div,.%2 pre,.%2 address,.%2 blockquote,.%2 h1,.%2 h2,.%2 h3,.%2 h4,.%2 h5,.%2 h6{background-repeat: no-repeat;border: 1px dotted gray;padding-top: 8px;padding-left: 8px;}.%2 p{%1p.png);}.%2 div{%1div.png);}.%2 pre{%1pre.png);}.%2 address{%1address.png);}.%2 blockquote{%1blockquote.png);}.%2 h1{%1h1.png);}.%2 h2{%1h2.png);}.%2 h3{%1h3.png);}.%2 h4{%1h4.png);}.%2 h5{%1h5.png);}.%2 h6{%1h6.png);}',m=/%1/g,n=/%2/g,o={preserveState:true,editorFocus:false,exec:function(p){this.toggleState();this.refresh(p);},refresh:function(p){var q=this.state==1?'addClass':'removeClass';p.document.getBody()[q]('cke_show_blocks');}};j.add('showblocks',{requires:['wysiwygarea'],init:function(p){var q=p.addCommand('showblocks',o);q.canUndo=false;if(p.config.startupOutlineBlocks)q.setState(1);p.addCss(l.replace(m,'background-image: url('+a.getUrl(this.path)+'images/block_').replace(n,'cke_show_blocks '));p.ui.addButton('ShowBlocks',{label:p.lang.showBlocks,command:'showblocks'});p.on('mode',function(){if(q.state!=0)q.refresh(p);});p.on('contentDom',function(){if(q.state!=0)q.refresh(p);});}});})();i.startupOutlineBlocks=false;(function(){var l='cke_show_border',m,n=(b.ie6Compat?['.%1 table.%2,','.%1 table.%2 td, .%1 table.%2 th,','{','border : #d3d3d3 1px dotted','}']:['.%1 table.%2,','.%1 table.%2 > tr > td, .%1 table.%2 > tr > th,','.%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,','.%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,','.%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th','{','border : #d3d3d3 1px dotted','}']).join('');m=n.replace(/%2/g,l).replace(/%1/g,'cke_show_borders ');var o={preserveState:true,editorFocus:false,exec:function(p){this.toggleState();this.refresh(p);},refresh:function(p){var q=this.state==1?'addClass':'removeClass';p.document.getBody()[q]('cke_show_borders');}};j.add('showborders',{requires:['wysiwygarea'],modes:{wysiwyg:1},init:function(p){var q=p.addCommand('showborders',o);q.canUndo=false;if(p.config.startupShowBorders!==false)q.setState(1);p.addCss(m);p.on('mode',function(){if(q.state!=0)q.refresh(p);},null,null,100);p.on('contentDom',function(){if(q.state!=0)q.refresh(p);});},afterInit:function(p){var q=p.dataProcessor,r=q&&q.dataFilter,s=q&&q.htmlFilter;if(r)r.addRules({elements:{table:function(t){var u=t.attributes,v=u['class'],w=parseInt(u.border,10);if(!w||w<=0)u['class']=(v||'')+' '+l;}}});if(s)s.addRules({elements:{table:function(t){var u=t.attributes,v=u['class'];v&&(u['class']=v.replace(l,'').replace(/\s{2}/,' ').replace(/^\s+|\s+$/,''));
this.root.id = this.getBrowsePath(this.payload.data.resourceURI);
this.root.id = this.payload ? this.getBrowsePath(this.payload.data.resourceURI) : '/',
refreshHandler : function(button, e) { this.root.setText(this.payload ? this.payload.get(this.titleColumn) : '/'); this.root.attributes.localStorageUpdated = false; this.root.id = this.getBrowsePath(this.payload.data.resourceURI); this.root.reload(); },
this.root.setText(this.payload ? this.payload.get(this.titleColumn) : '/'); this.root.attributes.localStorageUpdated = false; this.root.id = this.payload ? this.getBrowsePath(this.payload.data.resourceURI) : '/', this.root.reload();
if (this.root) { this.root.destroy(); } if (this.payload) { this.setRootNode(new Ext.tree.AsyncTreeNode({ text : this.payload.get(this.titleColumn), id : this.getBrowsePath(this.payload.data.resourceURI), singleClickExpand : true, expanded : true })); } else { this.setRootNode(new Ext.tree.TreeNode({ text : '(Not Available)', id : '/', singleClickExpand : true, expanded : true })); } if (this.innerCt) { this.innerCt.update(''); this.afterRender(); }
refreshHandler : function(button, e) { this.root.setText(this.payload ? this.payload.get(this.titleColumn) : '/'); this.root.attributes.localStorageUpdated = false; this.root.id = this.payload ? this.getBrowsePath(this.payload.data.resourceURI) : '/', this.root.reload(); },
h&&u){k=s;h=A;s=O[h-1];f(s);b()}},50)}}function L(){var k;k=J.value.split("|");if(k.length>1){x=k[0];D=k[1]}if(k.length>2)O=k[2].split(",");if(q)n();else{o();K=true;r!=null&&r()}}var u=false,q=g.isIElt9,B=false,r=null,C=null,J=null,K=false,M=null,O=[],x,D,Y=function(){};return{onReady:function(k){if(K)setTimeout(function(){k()},0);else r=k},_initialize:function(){J!=null&&L()},_initTimeout:function(){o()},register:function(k,h){if(!K){D=x=escape(k);Y=h}},initialize:function(k,h){if(!K){var s=navigator.vendor||
register:function(k,h){if(!K){D=x=escape(k);Y=h}},initialize:function(k,h){if(!K){var s=navigator.vendor||"";if(s!=="KDE")if(typeof window.opera!=="undefined")B=true;else if(!q&&s.indexOf("Apple Computer, Inc.")>-1)u=true;if(typeof k==="string")k=document.getElementById(k);if(!(!k||k.tagName.toUpperCase()!=="TEXTAREA"&&(k.tagName.toUpperCase()!=="INPUT"||k.type!=="hidden"&&k.type!=="text"))){J=k;if(q){if(typeof h==="string")h=document.getElementById(h);!h||h.tagName.toUpperCase()!=="IFRAME"||(C=h)}}}},
h&&u){k=s;h=A;s=O[h-1];f(s);b()}},50)}}function L(){var k;k=J.value.split("|");if(k.length>1){x=k[0];D=k[1]}if(k.length>2)O=k[2].split(",");if(q)n();else{o();K=true;r!=null&&r()}}var u=false,q=g.isIElt9,B=false,r=null,C=null,J=null,K=false,M=null,O=[],x,D,Y=function(){};return{onReady:function(k){if(K)setTimeout(function(){k()},0);else r=k},_initialize:function(){J!=null&&L()},_initTimeout:function(){o()},register:function(k,h){if(!K){D=x=escape(k);Y=h}},initialize:function(k,h){if(!K){var s=navigator.vendor||
var objs = []; if(obj) objs.push(this.get_node(obj)); else { if(!this.selected) return this.error("DELETE: NO NODE SELECTED"); if(this.selected_arr) objs = $.makeArray(this.selected_arr); else objs.push(this.selected); var to_select = this.settings.ui.selected_delete == "select_previous" ? this.prev(this.selected) : false;
if(obj && (!this.selected || this.get_node(obj).get(0) != this.selected.get(0) )) { obj = this.get_node(obj); if(obj.size()) { if(!this.check("deletable", obj)) return this.error("DELETE: NODE NOT DELETABLE"); if(!this.callback("beforedelete",[obj.get(0), _this])) return this.error("DELETE: STOPPED BY USER"); $parent = obj.parent(); if(obj.find("a.clicked").size()) { var reset_selected = false; _this.selected_arr = []; this.container.find("a.clicked").filter(":first-child").parent().each(function () { if(!reset_selected && this == _this.selected.get(0)) reset_selected = true; if($(this).parents().index(obj) != -1) return true; _this.selected_arr.push($(this)); }); if(reset_selected) this.selected = this.selected_arr[0] || false; } obj = obj.remove(); $parent.children("li:last").addClass("last"); if($parent.children("li").size() == 0) { $li = $parent.parents("li:eq(0)"); $li.removeClass("open").removeClass("closed").addClass("leaf").children("ul").remove(); } this.callback("ondelete", [obj.get(0), this, rb]); }
remove : function(obj) { if(this.locked) return this.error("LOCKED"); var _this = this; // Rollback var rb = {}; rb[this.container.attr("id")] = this.get_rollback(); var objs = []; if(obj) objs.push(this.get_node(obj)); else { if(!this.selected) return this.error("DELETE: NO NODE SELECTED"); if(this.selected_arr) objs = $.makeArray(this.selected_arr); else objs.push(this.selected); var to_select = this.settings.ui.selected_delete == "select_previous" ? this.prev(this.selected) : false; } for(var i = 0; i < objs.length; i++) { if(!this.check("deletable", objs[i])) { this.error("DELETE: NODE NOT DELETABLE"); continue; } if(!this.callback("beforedelete",[{ node : objs[i] }])) { this.error("DELETE: STOPPED BY USER"); continue; } var $parent = _this.parent(objs[i]); var tmp = this._remove(objs[i], true); this.callback("ondelete", [{ 'node' : tmp.get(0), 'parent' : $parent == -1 ? $parent : $parent.get(0), 'is_ui' : true, 'rollback' : rb }]); } if(to_select) this.select_branch(to_select); },
for(var i = 0; i < objs.length; i++) { if(!this.check("deletable", objs[i])) { this.error("DELETE: NODE NOT DELETABLE"); continue;
else if(this.selected) { if(!this.check("deletable", this.selected)) return this.error("DELETE: NODE NOT DELETABLE"); if(!this.callback("beforedelete",[this.selected.get(0), _this])) return this.error("DELETE: STOPPED BY USER"); $parent = this.selected.parent(); var obj = this.selected; if(this.settings.rules.multiple == false || this.selected_arr.length == 1) { var stop = true; var tmp = this.settings.ui.selected_delete == "select_previous" ? this.prev(this.selected) : false;
remove : function(obj) { if(this.locked) return this.error("LOCKED"); var _this = this; // Rollback var rb = {}; rb[this.container.attr("id")] = this.get_rollback(); var objs = []; if(obj) objs.push(this.get_node(obj)); else { if(!this.selected) return this.error("DELETE: NO NODE SELECTED"); if(this.selected_arr) objs = $.makeArray(this.selected_arr); else objs.push(this.selected); var to_select = this.settings.ui.selected_delete == "select_previous" ? this.prev(this.selected) : false; } for(var i = 0; i < objs.length; i++) { if(!this.check("deletable", objs[i])) { this.error("DELETE: NODE NOT DELETABLE"); continue; } if(!this.callback("beforedelete",[{ node : objs[i] }])) { this.error("DELETE: STOPPED BY USER"); continue; } var $parent = _this.parent(objs[i]); var tmp = this._remove(objs[i], true); this.callback("ondelete", [{ 'node' : tmp.get(0), 'parent' : $parent == -1 ? $parent : $parent.get(0), 'is_ui' : true, 'rollback' : rb }]); } if(to_select) this.select_branch(to_select); },
if(!this.callback("beforedelete",[{ node : objs[i] }])) { this.error("DELETE: STOPPED BY USER"); continue;
obj = obj.remove(); $parent.children("li:last").addClass("last"); if($parent.children("li").size() == 0) { $li = $parent.parents("li:eq(0)"); $li.removeClass("open").removeClass("closed").addClass("leaf").children("ul").remove();
remove : function(obj) { if(this.locked) return this.error("LOCKED"); var _this = this; // Rollback var rb = {}; rb[this.container.attr("id")] = this.get_rollback(); var objs = []; if(obj) objs.push(this.get_node(obj)); else { if(!this.selected) return this.error("DELETE: NO NODE SELECTED"); if(this.selected_arr) objs = $.makeArray(this.selected_arr); else objs.push(this.selected); var to_select = this.settings.ui.selected_delete == "select_previous" ? this.prev(this.selected) : false; } for(var i = 0; i < objs.length; i++) { if(!this.check("deletable", objs[i])) { this.error("DELETE: NODE NOT DELETABLE"); continue; } if(!this.callback("beforedelete",[{ node : objs[i] }])) { this.error("DELETE: STOPPED BY USER"); continue; } var $parent = _this.parent(objs[i]); var tmp = this._remove(objs[i], true); this.callback("ondelete", [{ 'node' : tmp.get(0), 'parent' : $parent == -1 ? $parent : $parent.get(0), 'is_ui' : true, 'rollback' : rb }]); } if(to_select) this.select_branch(to_select); },
var $parent = _this.parent(objs[i]); var tmp = this._remove(objs[i], true); this.callback("ondelete", [{ 'node' : tmp.get(0), 'parent' : $parent == -1 ? $parent : $parent.get(0), 'is_ui' : true, 'rollback' : rb }]);
if(!stop && this.settings.rules.multiple != false) { var _this = this; this.selected_arr = []; this.container.find("a.clicked").filter(":first-child").parent().each(function () { _this.selected_arr.push($(this)); }); if(this.selected_arr.length > 0) { this.selected = this.selected_arr[0]; this.remove(); } } if(stop && tmp) this.select_branch(tmp); this.callback("ondelete", [obj.get(0), this, rb]);
remove : function(obj) { if(this.locked) return this.error("LOCKED"); var _this = this; // Rollback var rb = {}; rb[this.container.attr("id")] = this.get_rollback(); var objs = []; if(obj) objs.push(this.get_node(obj)); else { if(!this.selected) return this.error("DELETE: NO NODE SELECTED"); if(this.selected_arr) objs = $.makeArray(this.selected_arr); else objs.push(this.selected); var to_select = this.settings.ui.selected_delete == "select_previous" ? this.prev(this.selected) : false; } for(var i = 0; i < objs.length; i++) { if(!this.check("deletable", objs[i])) { this.error("DELETE: NODE NOT DELETABLE"); continue; } if(!this.callback("beforedelete",[{ node : objs[i] }])) { this.error("DELETE: STOPPED BY USER"); continue; } var $parent = _this.parent(objs[i]); var tmp = this._remove(objs[i], true); this.callback("ondelete", [{ 'node' : tmp.get(0), 'parent' : $parent == -1 ? $parent : $parent.get(0), 'is_ui' : true, 'rollback' : rb }]); } if(to_select) this.select_branch(to_select); },
if(to_select) this.select_branch(to_select);
else return this.error("DELETE: NO NODE SELECTED");
remove : function(obj) { if(this.locked) return this.error("LOCKED"); var _this = this; // Rollback var rb = {}; rb[this.container.attr("id")] = this.get_rollback(); var objs = []; if(obj) objs.push(this.get_node(obj)); else { if(!this.selected) return this.error("DELETE: NO NODE SELECTED"); if(this.selected_arr) objs = $.makeArray(this.selected_arr); else objs.push(this.selected); var to_select = this.settings.ui.selected_delete == "select_previous" ? this.prev(this.selected) : false; } for(var i = 0; i < objs.length; i++) { if(!this.check("deletable", objs[i])) { this.error("DELETE: NODE NOT DELETABLE"); continue; } if(!this.callback("beforedelete",[{ node : objs[i] }])) { this.error("DELETE: STOPPED BY USER"); continue; } var $parent = _this.parent(objs[i]); var tmp = this._remove(objs[i], true); this.callback("ondelete", [{ 'node' : tmp.get(0), 'parent' : $parent == -1 ? $parent : $parent.get(0), 'is_ui' : true, 'rollback' : rb }]); } if(to_select) this.select_branch(to_select); },
},onAttribute:function(q,r,s){var t=this._.attributes[r];if(t){var u=t.filter(s,q,this);if(u===false)return false;if(typeof u!='undefined')return u;}return s;}}});function l(q,r){for(var s=0;q&&s<r.length;s++){var t=r[s];q=q.replace(t[0],t[1]);}return q;};function m(q,r,s){if(typeof r=='function')r=[r];var t,u,v=q.length,w=r&&r.length;if(w){for(t=0;t<v&&q[t].pri<s;t++){}for(u=w-1;u>=0;u--){var x=r[u];if(x){x.pri=s;q.splice(t,0,x);}}}};function n(q,r,s){if(r)for(var t in r){var u=q[t];q[t]=o(u,r[t],s);if(!u)q.$length++;}};function o(q,r,s){if(r){r.pri=s;if(q){if(!q.splice){if(q.pri>s)q=[r,q];else q=[q,r];q.filter=p;}else m(q,r,s);return q;}else{r.filter=r;return r;}}};function p(q){var r=typeof q=='object';for(var s=0;s<this.length;s++){var t=this[s],u=t.apply(window,arguments);if(typeof u!='undefined'){if(u===false)return false;if(r&&u!=q)return u;}}return null;};})();a.htmlParser.basicWriter=e.createClass({$:function(){this._={output:[]};},proto:{openTag:function(l,m){this._.output.push('<',l);},openTagClose:function(l,m){if(m)this._.output.push(' />');else this._.output.push('>');},attribute:function(l,m){if(typeof m=='string')m=e.htmlEncodeAttr(m);this._.output.push(' ',l,'="',m,'"');},closeTag:function(l){this._.output.push('</',l,'>');},text:function(l){this._.output.push(l);},comment:function(l){this._.output.push('<!--',l,'-->');},write:function(l){this._.output.push(l);},reset:function(){this._.output=[];this._.indent=false;},getHtml:function(l){var m=this._.output.join('');if(l)this.reset();return m;}}});delete a.loadFullCore;a.instances={};a.document=new g(document);a.add=function(l){a.instances[l.name]=l;l.on('focus',function(){if(a.currentInstance!=l){a.currentInstance=l;a.fire('currentInstance');}});l.on('blur',function(){if(a.currentInstance==l){a.currentInstance=null;a.fire('currentInstance');}});};a.remove=function(l){delete a.instances[l.name];};a.TRISTATE_ON=1;a.TRISTATE_OFF=2;a.TRISTATE_DISABLED=0;d.comment=e.createClass({base:d.node,$:function(l,m){if(typeof l=='string')l=(m?m.$:document).createComment(l);this.base(l);},proto:{type:8,getOuterHtml:function(){return '<!--'+this.$.nodeValue+'-->';}}});(function(){var l={address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,dd:1},m={body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,caption:1,form:1},n=function(o){var p=o.getChildren();for(var q=0,r=p.count();q<r;q++){var s=p.getItem(q);if(s.type==1&&f.$block[s.getName()])return true;}return false;};d.elementPath=function(o){var u=this;
var t,u,v=q.length,w=r&&r.length;if(w){for(t=0;t<v&&q[t].pri<s;t++){}for(u=w-1;u>=0;u--){var x=r[u];if(x){x.pri=s;q.splice(t,0,x);}}}};function n(q,r,s){if(r)for(var t in r){var u=q[t];q[t]=o(u,r[t],s);if(!u)q.$length++;}};function o(q,r,s){if(r){r.pri=s;if(q){if(!q.splice){if(q.pri>s)q=[r,q];else q=[q,r];q.filter=p;}else m(q,r,s);return q;}else{r.filter=r;return r;}}};function p(q){var r=q.type||q instanceof a.htmlParser.fragment;for(var s=0;s<this.length;s++){if(r)var t=q.type,u=q.name;var v=this[s],w=v.apply(window,arguments);if(w===false)return w;if(r){if(w&&(w.name!=u||w.type!=t))return w;}else if(typeof w!='string')return w;w!=undefined&&(q=w);}return q;};})();a.htmlParser.basicWriter=e.createClass({$:function(){this._={output:[]};},proto:{openTag:function(l,m){this._.output.push('<',l);},openTagClose:function(l,m){if(m)this._.output.push(' />');else this._.output.push('>');},attribute:function(l,m){if(typeof m=='string')m=e.htmlEncodeAttr(m);this._.output.push(' ',l,'="',m,'"');},closeTag:function(l){this._.output.push('</',l,'>');},text:function(l){this._.output.push(l);},comment:function(l){this._.output.push('<!--',l,'-->');},write:function(l){this._.output.push(l);},reset:function(){this._.output=[];this._.indent=false;},getHtml:function(l){var m=this._.output.join('');if(l)this.reset();return m;}}});delete a.loadFullCore;a.instances={};a.document=new g(document);a.add=function(l){a.instances[l.name]=l;l.on('focus',function(){if(a.currentInstance!=l){a.currentInstance=l;a.fire('currentInstance');}});l.on('blur',function(){if(a.currentInstance==l){a.currentInstance=null;a.fire('currentInstance');}});};a.remove=function(l){delete a.instances[l.name];};a.on('instanceDestroyed',function(){if(e.isEmpty(this.instances))a.fire('reset');});a.TRISTATE_ON=1;a.TRISTATE_OFF=2;a.TRISTATE_DISABLED=0;d.comment=e.createClass({base:d.node,$:function(l,m){if(typeof l=='string')l=(m?m.$:document).createComment(l);this.base(l);},proto:{type:8,getOuterHtml:function(){return '<!--'+this.$.nodeValue+'-->';}}});(function(){var l={address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,dd:1},m={body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,caption:1,form:1},n=function(o){var p=o.getChildren();for(var q=0,r=p.count();q<r;q++){var s=p.getItem(q);if(s.type==1&&f.$block[s.getName()])return true;}return false;};d.elementPath=function(o){var u=this;var p=null,q=null,r=[],s=o;while(s){if(s.type==1){if(!u.lastElement)u.lastElement=s;var t=s.getName();if(c&&s.$.scopeName!='HTML')t=s.$.scopeName.toLowerCase()+':'+t;
},onAttribute:function(q,r,s){var t=this._.attributes[r];if(t){var u=t.filter(s,q,this);if(u===false)return false;if(typeof u!='undefined')return u;}return s;}}});function l(q,r){for(var s=0;q&&s<r.length;s++){var t=r[s];q=q.replace(t[0],t[1]);}return q;};function m(q,r,s){if(typeof r=='function')r=[r];var t,u,v=q.length,w=r&&r.length;if(w){for(t=0;t<v&&q[t].pri<s;t++){}for(u=w-1;u>=0;u--){var x=r[u];if(x){x.pri=s;q.splice(t,0,x);}}}};function n(q,r,s){if(r)for(var t in r){var u=q[t];q[t]=o(u,r[t],s);if(!u)q.$length++;}};function o(q,r,s){if(r){r.pri=s;if(q){if(!q.splice){if(q.pri>s)q=[r,q];else q=[q,r];q.filter=p;}else m(q,r,s);return q;}else{r.filter=r;return r;}}};function p(q){var r=typeof q=='object';for(var s=0;s<this.length;s++){var t=this[s],u=t.apply(window,arguments);if(typeof u!='undefined'){if(u===false)return false;if(r&&u!=q)return u;}}return null;};})();a.htmlParser.basicWriter=e.createClass({$:function(){this._={output:[]};},proto:{openTag:function(l,m){this._.output.push('<',l);},openTagClose:function(l,m){if(m)this._.output.push(' />');else this._.output.push('>');},attribute:function(l,m){if(typeof m=='string')m=e.htmlEncodeAttr(m);this._.output.push(' ',l,'="',m,'"');},closeTag:function(l){this._.output.push('</',l,'>');},text:function(l){this._.output.push(l);},comment:function(l){this._.output.push('<!--',l,'-->');},write:function(l){this._.output.push(l);},reset:function(){this._.output=[];this._.indent=false;},getHtml:function(l){var m=this._.output.join('');if(l)this.reset();return m;}}});delete a.loadFullCore;a.instances={};a.document=new g(document);a.add=function(l){a.instances[l.name]=l;l.on('focus',function(){if(a.currentInstance!=l){a.currentInstance=l;a.fire('currentInstance');}});l.on('blur',function(){if(a.currentInstance==l){a.currentInstance=null;a.fire('currentInstance');}});};a.remove=function(l){delete a.instances[l.name];};a.TRISTATE_ON=1;a.TRISTATE_OFF=2;a.TRISTATE_DISABLED=0;d.comment=e.createClass({base:d.node,$:function(l,m){if(typeof l=='string')l=(m?m.$:document).createComment(l);this.base(l);},proto:{type:8,getOuterHtml:function(){return '<!--'+this.$.nodeValue+'-->';}}});(function(){var l={address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,dd:1},m={body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,caption:1,form:1},n=function(o){var p=o.getChildren();for(var q=0,r=p.count();q<r;q++){var s=p.getItem(q);if(s.type==1&&f.$block[s.getName()])return true;}return false;};d.elementPath=function(o){var u=this;
ra)}return this}});d.fragments={};d.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){d.fn[a]=function(e){var g=[];e=d(e);for(var h=0,k=e.length;h<k;h++){var l=(h>0?this.clone(true):this).get();d.fn[b].apply(d(e[h]),l);g=g.concat(l)}return this.pushStack(g,a,e.selector)}});d.each({remove:function(a,b){if(!a||d.filter(a,[this]).length){if(!b&&this.nodeType===1){M(this.getElementsByTagName("*"));M([this])}this.parentNode&&this.parentNode.removeChild(this)}},
f(this[p],k):this[p],h.cacheable||this.length>1||p>0?h.fragment.cloneNode(true):h.fragment)}q&&c.each(q,ra)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(e){var f=[];e=c(e);for(var h=0,k=e.length;h<k;h++){var l=(h>0?this.clone(true):this).get();c.fn[b].apply(c(e[h]),l);f=f.concat(l)}return this.pushStack(f,a,e.selector)}});c.each({remove:function(a,b){if(!a||c.filter(a, [this]).length){if(!b&&this.nodeType===1){M(this.getElementsByTagName("*"));M([this])}this.parentNode&&this.parentNode.removeChild(this)}},empty:function(){for(this.nodeType===1&&M(this.getElementsByTagName("*"));this.firstChild;)this.removeChild(this.firstChild)}},function(a,b){c.fn[a]=function(){return this.each(b,arguments)}});c.extend({clean:function(a,b,e,f){b=b||r;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||r;var h=[];c.each(a,function(k,l){if(typeof l===
ra)}return this}});d.fragments={};d.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){d.fn[a]=function(e){var g=[];e=d(e);for(var h=0,k=e.length;h<k;h++){var l=(h>0?this.clone(true):this).get();d.fn[b].apply(d(e[h]),l);g=g.concat(l)}return this.pushStack(g,a,e.selector)}});d.each({remove:function(a,b){if(!a||d.filter(a,[this]).length){if(!b&&this.nodeType===1){M(this.getElementsByTagName("*"));M([this])}this.parentNode&&this.parentNode.removeChild(this)}},
if (child.offsetTop > scroll_pos + doc_docEl.clientHeight + buffer_rem) {
if (child.offsetTop > window.pageYOffset + doc_docEl.clientHeight + buffer_rem) {
function remove_excess_content_bottom() { var child = page.lastChild; if (child === null) { return null; } /// Is the element is in the remove zone? if (child.offsetTop > scroll_pos + doc_docEl.clientHeight + buffer_rem) { /// Store the content in the cache, and then add 1 to the outer counter variable so that we know how much cache we have. cached_verses_bottom[cached_count_bottom++] = child.innerHTML; page.removeChild(child); /// This fixes an IE7+ bug that causes the page to scroll needlessly when an element is added. /*@cc_on window.scrollTo(0, scroll_pos); @*/ /// End execution to keep the checking_content_top_interval running because there might be even more content that should be removed. bottomLoader.style.visibility = "visible"; /// Check again soon for more content to be removed. remove_content_bottom_timeout = setTimeout(remove_excess_content_bottom, remove_speed); } else { checking_excess_content_bottom = false; } }
window.scrollTo(0, scroll_pos);
scrollViewTo(0, window.pageYOffset);
function remove_excess_content_bottom() { var child = page.lastChild; if (child === null) { return null; } /// Is the element is in the remove zone? if (child.offsetTop > scroll_pos + doc_docEl.clientHeight + buffer_rem) { /// Store the content in the cache, and then add 1 to the outer counter variable so that we know how much cache we have. cached_verses_bottom[cached_count_bottom++] = child.innerHTML; page.removeChild(child); /// This fixes an IE7+ bug that causes the page to scroll needlessly when an element is added. /*@cc_on window.scrollTo(0, scroll_pos); @*/ /// End execution to keep the checking_content_top_interval running because there might be even more content that should be removed. bottomLoader.style.visibility = "visible"; /// Check again soon for more content to be removed. remove_content_bottom_timeout = setTimeout(remove_excess_content_bottom, remove_speed); } else { checking_excess_content_bottom = false; } }
remove_content_bottom_timeout = setTimeout(remove_excess_content_bottom, remove_speed);
remove_content_bottom_timeout = window.setTimeout(remove_excess_content_bottom, remove_speed);
function remove_excess_content_bottom() { var child = page.lastChild; if (child === null) { return null; } /// Is the element is in the remove zone? if (child.offsetTop > window.pageYOffset + doc_docEl.clientHeight + buffer_rem) { /// Store the content in the cache, and then add 1 to the outer counter variable so that we know how much cache we have. cached_verses_bottom[cached_count_bottom++] = child.innerHTML; page.removeChild(child); /// This fixes an IE7+ bug that causes the page to scroll needlessly when an element is added. /*@cc_on scrollViewTo(0, window.pageYOffset); @*/ /// End execution to keep the checking_content_top_interval running because there might be even more content that should be removed. bottomLoader.style.visibility = "visible"; /// Check again soon for more content to be removed. remove_content_bottom_timeout = setTimeout(remove_excess_content_bottom, remove_speed); } else { checking_excess_content_bottom = false; } }
if (child == null) return null;
if (child === null) return null;
function remove_excess_content_bottom() { var child = page.lastChild, child_position, page_height; if (child == null) return null; child_position = child.offsetTop; page_height = doc_docEl.clientHeight; /// Is the element is in the remove zone? if (child_position > scroll_pos + page_height + buffer_rem) { /// Store the content in cache, and then add 1 to the global counter variable so that we know how much cache we have. cached_verses_bottom[cached_count_bottom++] = child.innerHTML; page.removeChild(child); /// This fixes an IE7+ bug that causes the page to scroll needlessly when an element is added. /*@cc_on win.scrollTo(0, scroll_pos); @*/ /// End execution to keep the checking_content_top_interval running because there might be even more content that should be removed. bottomLoader.style.visibility = "visible"; return null; } /// Since no content needs to be removed, there is no need to check again. clearInterval(remove_content_bottom_interval); checking_excess_content_bottom = false; }
if (child_height + buffer_rem < scroll_pos && child_height < doc_docEl.scrollHeight - scroll_pos - doc_docEl.clientHeight) {
if (child_height + buffer_rem < window.pageYOffset && child_height < doc_docEl.scrollHeight - window.pageYOffset - doc_docEl.clientHeight) {
function remove_excess_content_top() { var child = page.firstChild, child_height; if (child === null) { return null; } ///NOTE: Mozilla ignores .clientHeight, .offsetHeight, .scrollHeight for some objects (not <div> tags, however) when in standards mode (i.e., a doctype is present). /// If Mozilla has problems in the future, you can use this as a replacement: /// child_height = parseInt(getComputedStyle(child, null).getPropertyValue("height")); ///NOTE: Opera wrongly subtracts the scroll position from .offsetTop. child_height = child.clientHeight; ///NOTE: Mozilla also has scrollMaxY, which is slightly different from document.documentElement.scrollHeight (document.body.scrollHeight should work too). /// Is the object in the remove zone, and is its height less than the remaining space to scroll to prevent jumping? if (child_height + buffer_rem < scroll_pos && child_height < doc_docEl.scrollHeight - scroll_pos - doc_docEl.clientHeight) { /// Store the content in the cache, and then add 1 to the outer counter variable so that we know how much cache we have. cached_verses_top[cached_count_top++] = child.innerHTML; ///TODO: Determine if setting the display to "none" actually helps at all. /// Remove quickly from the page. child.style.display = "none"; /// Calculate and set the new scroll position. /// Because content is being removed from the top of the page, the rest of the content will be shifted upward. /// Therefore, the page must be instantly scrolled down the same amount as the height of the content that was removed. scroll_pos = window.pageYOffset - child_height; window.scrollTo(0, scroll_pos); page.removeChild(child); /// Indicates to the user that content will load if they scroll to the top of the screen. topLoader.style.visibility = "visible"; /// Check again soon for more content to be removed. remove_content_top_timeout = setTimeout(remove_excess_content_top, remove_speed); } else { checking_excess_content_top = false; } }
scroll_pos = window.pageYOffset - child_height; window.scrollTo(0, scroll_pos);
scrollViewTo(0, window.pageYOffset - child_height);
function remove_excess_content_top() { var child = page.firstChild, child_height; if (child === null) { return null; } ///NOTE: Mozilla ignores .clientHeight, .offsetHeight, .scrollHeight for some objects (not <div> tags, however) when in standards mode (i.e., a doctype is present). /// If Mozilla has problems in the future, you can use this as a replacement: /// child_height = parseInt(getComputedStyle(child, null).getPropertyValue("height")); ///NOTE: Opera wrongly subtracts the scroll position from .offsetTop. child_height = child.clientHeight; ///NOTE: Mozilla also has scrollMaxY, which is slightly different from document.documentElement.scrollHeight (document.body.scrollHeight should work too). /// Is the object in the remove zone, and is its height less than the remaining space to scroll to prevent jumping? if (child_height + buffer_rem < scroll_pos && child_height < doc_docEl.scrollHeight - scroll_pos - doc_docEl.clientHeight) { /// Store the content in the cache, and then add 1 to the outer counter variable so that we know how much cache we have. cached_verses_top[cached_count_top++] = child.innerHTML; ///TODO: Determine if setting the display to "none" actually helps at all. /// Remove quickly from the page. child.style.display = "none"; /// Calculate and set the new scroll position. /// Because content is being removed from the top of the page, the rest of the content will be shifted upward. /// Therefore, the page must be instantly scrolled down the same amount as the height of the content that was removed. scroll_pos = window.pageYOffset - child_height; window.scrollTo(0, scroll_pos); page.removeChild(child); /// Indicates to the user that content will load if they scroll to the top of the screen. topLoader.style.visibility = "visible"; /// Check again soon for more content to be removed. remove_content_top_timeout = setTimeout(remove_excess_content_top, remove_speed); } else { checking_excess_content_top = false; } }
remove_content_top_timeout = setTimeout(remove_excess_content_top, remove_speed);
remove_content_top_timeout = window.setTimeout(remove_excess_content_top, remove_speed);
function remove_excess_content_top() { var child = page.firstChild, child_height; if (child === null) { return null; } ///NOTE: Mozilla ignores .clientHeight, .offsetHeight, .scrollHeight for some objects (not <div> tags, however) when in standards mode (i.e., a doctype is present). /// If Mozilla has problems in the future, you can use this as a replacement: /// child_height = parseInt(getComputedStyle(child, null).getPropertyValue("height")); ///NOTE: Opera wrongly subtracts the scroll position from .offsetTop. child_height = child.clientHeight; ///NOTE: Mozilla also has scrollMaxY, which is slightly different from document.documentElement.scrollHeight (document.body.scrollHeight should work too). /// Is the object in the remove zone, and is its height less than the remaining space to scroll to prevent jumping? if (child_height + buffer_rem < window.pageYOffset && child_height < doc_docEl.scrollHeight - window.pageYOffset - doc_docEl.clientHeight) { /// Store the content in the cache, and then add 1 to the outer counter variable so that we know how much cache we have. cached_verses_top[cached_count_top++] = child.innerHTML; ///TODO: Determine if setting the display to "none" actually helps at all. /// Remove quickly from the page. child.style.display = "none"; /// Calculate and set the new scroll position. /// Because content is being removed from the top of the page, the rest of the content will be shifted upward. /// Therefore, the page must be instantly scrolled down the same amount as the height of the content that was removed. scrollViewTo(0, window.pageYOffset - child_height); page.removeChild(child); /// Indicates to the user that content will load if they scroll to the top of the screen. topLoader.style.visibility = "visible"; /// Check again soon for more content to be removed. remove_content_top_timeout = setTimeout(remove_excess_content_top, remove_speed); } else { checking_excess_content_top = false; } }
if (child == null) return null;
if (child === null) return null;
function remove_excess_content_top() { var child = page.firstChild, child_height; if (child == null) return null; ///NOTE: Mozilla ignores .clientHeight, .offsetHeight, .scrollHeight for some objects (not <div> however) with a doctype. /// If Mozilla has problems in the future, you can use this as a replacement: /// child_height = parseInt(window.getComputedStyle(child, null).getPropertyValue("height")); ///NOTE: Opera wrongly subtracts the scroll position from .offsetTop. child_height = child.clientHeight; ///NOTE: Mozilla also has window.scrollMaxY, which is slightly different than document.documentElement.scrollHeight (document.body.scrollHeight should work too). /// Is the object in the remove zone, and is its height less than the remaining space to scroll to prevent jumping? if (child_height + buffer_rem < scroll_pos && child_height < doc_docEl.scrollHeight - scroll_pos - doc_docEl.clientHeight) { /// Store the content in cache, and then add 1 to the global counter variable so that we know how much cache we have. cached_verses_top[cached_count_top++] = child.innerHTML; ///TODO: Determine if setting the display to "none" actually helps at all. /// Remove quickly from page. child.style.display = "none"; /// Calculate and set the new scroll position /// Because content is being removed from the top of the page, the rest of the content will be shifted upward. /// Therefore, the page must be instantly scrolled down the same amount as the height of the content that was removed. win.scrollTo(0, scroll_pos = (win.pageYOffset - child_height)); page.removeChild(child); /// Indicates to the user that content will load if they scroll to the top of the screen. topLoader.style.visibility = "visible"; /// End execution to keep the checking_content_top_interval running because there could be even more content that should be removed. return null; } /// Since no content needs to be removed, there is no need to check again. clearInterval(remove_content_top_interval); checking_excess_content_top = false; }
if(!c&&l!=m)return false;for(var n=0;n<l;n++){var o=j[n];if((!c||o.specified&&o.nodeName!='_cke_expando')&&o.nodeValue!=i.getAttribute(o.nodeName))return false;}if(c)for(n=0;n<m;n++){o=k[n];if(o.specified&&o.nodeName!='_cke_expando'&&o.nodeValue!=this.getAttribute(o.nodeName))return false;}return true;},isVisible:function(){var i=!!this.$.offsetHeight&&this.getComputedStyle('visibility')!='hidden',j,k;if(i&&(b.webkit||b.opera)){j=this.getWindow();if(!j.equals(a.document.getWindow())&&(k=j.$.frameElement))i=new h(k).isVisible();}return i;},hasAttributes:c&&(b.ie7Compat||b.ie6Compat)?function(){var i=this.$.attributes;for(var j=0;j<i.length;j++){var k=i[j];switch(k.nodeName){case 'class':if(this.getAttribute('class'))return true;case '_cke_expando':continue;default:if(k.specified)return true;}}return false;}:function(){var i=this.$.attributes;return i.length>1||i.length==1&&i[0].nodeName!='_cke_expando';},hasAttribute:function(i){var j=this.$.attributes.getNamedItem(i);return!!(j&&j.specified);},hide:function(){this.setStyle('display','none');},moveChildren:function(i,j){var k=this.$;i=i.$;if(k==i)return;var l;if(j)while(l=k.lastChild)i.insertBefore(k.removeChild(l),i.firstChild);else while(l=k.firstChild)i.appendChild(k.removeChild(l));},show:function(){this.setStyles({display:'',visibility:''});},setAttribute:(function(){var i=function(j,k){this.$.setAttribute(j,k);return this;};if(c&&(b.ie7Compat||b.ie6Compat))return function(j,k){var l=this;if(j=='class')l.$.className=k;else if(j=='style')l.$.style.cssText=k;else if(j=='tabindex')l.$.tabIndex=k;else if(j=='checked')l.$.checked=k;else i.apply(l,arguments);return l;};else return i;})(),setAttributes:function(i){for(var j in i)this.setAttribute(j,i[j]);return this;},setValue:function(i){this.$.value=i;return this;},removeAttribute:(function(){var i=function(j){this.$.removeAttribute(j);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){if(j=='class')j='className';else if(j=='tabindex')j='tabIndex';i.call(this,j);};else return i;})(),removeAttributes:function(i){if(e.isArray(i))for(var j=0;j<i.length;j++)this.removeAttribute(i[j]);else for(var k in i)i.hasOwnProperty(k)&&this.removeAttribute(k);},removeStyle:function(i){var j=this;j.setStyle(i,'');if(j.$.style.removeAttribute)j.$.style.removeAttribute(e.cssStyleToDomStyle(i));if(!j.$.style.cssText)j.removeAttribute('style');},setStyle:function(i,j){this.$.style[e.cssStyleToDomStyle(i)]=j;return this;},setStyles:function(i){for(var j in i)this.setStyle(j,i[j]);
},setAttribute:(function(){var i=function(j,k){this.$.setAttribute(j,k);return this;};if(c&&(b.ie7Compat||b.ie6Compat))return function(j,k){var l=this;if(j=='class')l.$.className=k;else if(j=='style')l.$.style.cssText=k;else if(j=='tabindex')l.$.tabIndex=k;else if(j=='checked')l.$.checked=k;else i.apply(l,arguments);return l;};else return i;})(),setAttributes:function(i){for(var j in i)this.setAttribute(j,i[j]);return this;},setValue:function(i){this.$.value=i;return this;},removeAttribute:(function(){var i=function(j){this.$.removeAttribute(j);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){if(j=='class')j='className';else if(j=='tabindex')j='tabIndex';i.call(this,j);};else return i;})(),removeAttributes:function(i){if(e.isArray(i))for(var j=0;j<i.length;j++)this.removeAttribute(i[j]);else for(var k in i)i.hasOwnProperty(k)&&this.removeAttribute(k);},removeStyle:function(i){var j=this;j.setStyle(i,'');if(j.$.style.removeAttribute)j.$.style.removeAttribute(e.cssStyleToDomStyle(i));if(!j.$.style.cssText)j.removeAttribute('style');},setStyle:function(i,j){this.$.style[e.cssStyleToDomStyle(i)]=j;return this;},setStyles:function(i){for(var j in i)this.setStyle(j,i[j]);return this;},setOpacity:function(i){if(c){i=Math.round(i*100);this.setStyle('filter',i>=100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+i+')');}else this.setStyle('opacity',i);},unselectable:b.gecko?function(){this.$.style.MozUserSelect='none';this.on('dragstart',function(i){i.data.preventDefault();});}:b.webkit?function(){this.$.style.KhtmlUserSelect='none';this.on('dragstart',function(i){i.data.preventDefault();});}:function(){if(c||b.opera){var i=this.$,j,k=0;i.unselectable='on';while(j=i.all[k++])switch(j.tagName.toLowerCase()){case 'iframe':case 'textarea':case 'input':case 'select':break;default:j.unselectable='on';}}},getPositionedAncestor:function(){var i=this;while(i.getName()!='html'){if(i.getComputedStyle('position')!='static')return i;i=i.getParent();}return null;},getDocumentPosition:function(i){var D=this;var j=0,k=0,l=D.getDocument().getBody(),m=D.getDocument().$.compatMode=='BackCompat',n=D.getDocument();if(document.documentElement.getBoundingClientRect){var o=D.$.getBoundingClientRect(),p=n.$,q=p.documentElement,r=q.clientTop||l.$.clientTop||0,s=q.clientLeft||l.$.clientLeft||0,t=true;if(c){var u=n.getDocumentElement().contains(D),v=n.getBody().contains(D);t=m&&v||!m&&u;}if(t){j=o.left+(!m&&q.scrollLeft||l.$.scrollLeft);j-=s;k=o.top+(!m&&q.scrollTop||l.$.scrollTop);
if(!c&&l!=m)return false;for(var n=0;n<l;n++){var o=j[n];if((!c||o.specified&&o.nodeName!='_cke_expando')&&o.nodeValue!=i.getAttribute(o.nodeName))return false;}if(c)for(n=0;n<m;n++){o=k[n];if(o.specified&&o.nodeName!='_cke_expando'&&o.nodeValue!=this.getAttribute(o.nodeName))return false;}return true;},isVisible:function(){var i=!!this.$.offsetHeight&&this.getComputedStyle('visibility')!='hidden',j,k;if(i&&(b.webkit||b.opera)){j=this.getWindow();if(!j.equals(a.document.getWindow())&&(k=j.$.frameElement))i=new h(k).isVisible();}return i;},hasAttributes:c&&(b.ie7Compat||b.ie6Compat)?function(){var i=this.$.attributes;for(var j=0;j<i.length;j++){var k=i[j];switch(k.nodeName){case 'class':if(this.getAttribute('class'))return true;case '_cke_expando':continue;default:if(k.specified)return true;}}return false;}:function(){var i=this.$.attributes;return i.length>1||i.length==1&&i[0].nodeName!='_cke_expando';},hasAttribute:function(i){var j=this.$.attributes.getNamedItem(i);return!!(j&&j.specified);},hide:function(){this.setStyle('display','none');},moveChildren:function(i,j){var k=this.$;i=i.$;if(k==i)return;var l;if(j)while(l=k.lastChild)i.insertBefore(k.removeChild(l),i.firstChild);else while(l=k.firstChild)i.appendChild(k.removeChild(l));},show:function(){this.setStyles({display:'',visibility:''});},setAttribute:(function(){var i=function(j,k){this.$.setAttribute(j,k);return this;};if(c&&(b.ie7Compat||b.ie6Compat))return function(j,k){var l=this;if(j=='class')l.$.className=k;else if(j=='style')l.$.style.cssText=k;else if(j=='tabindex')l.$.tabIndex=k;else if(j=='checked')l.$.checked=k;else i.apply(l,arguments);return l;};else return i;})(),setAttributes:function(i){for(var j in i)this.setAttribute(j,i[j]);return this;},setValue:function(i){this.$.value=i;return this;},removeAttribute:(function(){var i=function(j){this.$.removeAttribute(j);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){if(j=='class')j='className';else if(j=='tabindex')j='tabIndex';i.call(this,j);};else return i;})(),removeAttributes:function(i){if(e.isArray(i))for(var j=0;j<i.length;j++)this.removeAttribute(i[j]);else for(var k in i)i.hasOwnProperty(k)&&this.removeAttribute(k);},removeStyle:function(i){var j=this;j.setStyle(i,'');if(j.$.style.removeAttribute)j.$.style.removeAttribute(e.cssStyleToDomStyle(i));if(!j.$.style.cssText)j.removeAttribute('style');},setStyle:function(i,j){this.$.style[e.cssStyleToDomStyle(i)]=j;return this;},setStyles:function(i){for(var j in i)this.setStyle(j,i[j]);
l=0,q=b.length;l<q;l++){if(k.indexOf(" "+b[l]+" ")<0)h.className+=" "+b[l]}else h.className=a}return this},removeClass:function(a){if(d.isFunction(a))return this.each(function(p){var o=d(this);o.removeClass(a.call(this,p,o.attr("class")))});if(a&&typeof a==="string"||a===v)for(var b=(a||"").split(W),e=0,g=this.length;e<g;e++){var h=this[e];if(h.nodeType===1&&h.className)if(a){for(var k=(" "+h.className+" ").replace(ia," "),l=0,q=b.length;l<q;l++)k=k.replace(" "+b[l]+" "," ");h.className=k.substring(1, k.length-1)}else h.className=""}return this},toggleClass:function(a,b){var e=typeof a,g=typeof b==="boolean";if(d.isFunction(a))return this.each(function(h){var k=d(this);k.toggleClass(a.call(this,h,k.attr("class"),b),b)});return this.each(function(){if(e==="string")for(var h,k=0,l=d(this),q=b,p=a.split(W);h=p[k++];){q=g?q:!l.hasClass(h);l[q?"addClass":"removeClass"](h)}else if(e==="undefined"||e==="boolean"){this.className&&d.data(this,"__className__",this.className);this.className=this.className||
p,o.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(W),e=0,f=this.length;e<f;e++){var h=this[e];if(h.nodeType===1)if(h.className)for(var k=" "+h.className+" ",l=0,q=b.length;l<q;l++){if(k.indexOf(" "+b[l]+" ")<0)h.className+=" "+b[l]}else h.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(p){var o=c(this);o.removeClass(a.call(this,p,o.attr("class")))});if(a&&typeof a==="string"||a===v)for(var b=(a||"").split(W),e=0,f=this.length;e<f;e++){var h= this[e];if(h.nodeType===1&&h.className)if(a){for(var k=(" "+h.className+" ").replace(ia," "),l=0,q=b.length;l<q;l++)k=k.replace(" "+b[l]+" "," ");h.className=k.substring(1,k.length-1)}else h.className=""}return this},toggleClass:function(a,b){var e=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(h){var k=c(this);k.toggleClass(a.call(this,h,k.attr("class"),b),b)});return this.each(function(){if(e==="string")for(var h,k=0,l=c(this),q=b,p=a.split(W);h=p[k++];){q=f?q:!l.hasClass(h);
l=0,q=b.length;l<q;l++){if(k.indexOf(" "+b[l]+" ")<0)h.className+=" "+b[l]}else h.className=a}return this},removeClass:function(a){if(d.isFunction(a))return this.each(function(p){var o=d(this);o.removeClass(a.call(this,p,o.attr("class")))});if(a&&typeof a==="string"||a===v)for(var b=(a||"").split(W),e=0,g=this.length;e<g;e++){var h=this[e];if(h.nodeType===1&&h.className)if(a){for(var k=(" "+h.className+" ").replace(ia," "),l=0,q=b.length;l<q;l++)k=k.replace(" "+b[l]+" "," ");h.className=k.substring(1,k.length-1)}else h.className=""}return this},toggleClass:function(a,b){var e=typeof a,g=typeof b==="boolean";if(d.isFunction(a))return this.each(function(h){var k=d(this);k.toggleClass(a.call(this,h,k.attr("class"),b),b)});return this.each(function(){if(e==="string")for(var h,k=0,l=d(this),q=b,p=a.split(W);h=p[k++];){q=g?q:!l.hasClass(h);l[q?"addClass":"removeClass"](h)}else if(e==="undefined"||e==="boolean"){this.className&&d.data(this,"__className__",this.className);this.className=this.className||
window.removeEventListener('current_view_check_status', this.handle_current_view_check_status_setup, false); window.removeEventListener('view_closed', this.handle_view_closed_setup, false);
try { if (this.prefs.editCompatibility) { window.removeEventListener('current_view_check_status', this.handle_current_view_check_status_setup, false); }; window.removeEventListener('view_opened', this.handle_view_opened_setup, false); window.removeEventListener('view_closed', this.handle_view_closed_setup, false); } catch (err) { DafizillaCommon.exception(err); }
removeListeners : function() { window.removeEventListener('current_view_check_status', this.handle_current_view_check_status_setup, false); window.removeEventListener('view_closed', this.handle_view_closed_setup, false); },
this.setupButton_ready(null,this._currentWindow);
removeLogins: function() { // Get the toolbaritem "container" that we added to our XUL markup var container = this._currentWindow.document.getElementById("KeeFox_Main-Button"); if (container === undefined || container == null) return; // Remove all of the existing buttons for (i = container.childNodes.length; i > 0; i--) { container.removeChild(container.childNodes[0]); } //TODO: see if we can remove this successfully: this.setupButton_ready(null,this._currentWindow); },
if (container === undefined || container == null) return;
removeLogins: function() { // Get the toolbaritem "container" that we added to our XUL markup var container = this._currentWindow.document.getElementById("KeeFox_Main-Button"); // Remove all of the existing buttons for (i = container.childNodes.length; i > 0; i--) { container.removeChild(container.childNodes[0]); } this.setupButton_ready(null,this._currentWindow); },
this.setupButton_ready(null,this._currentWindow);
removeLogins: function() { // Get the toolbaritem "container" that we added to our XUL markup var container = this._currentWindow.document.getElementById("KeeFox_Main-Button"); // Remove all of the existing buttons for (i = container.childNodes.length; i > 0; i--) { container.removeChild(container.childNodes[0]); } this.setupButton_ready(null,this._currentWindow); },
for (var i = arr.length - 1; i >= 0; i--) { if (arr[i].view == view) { arr.splice(i, 1);
try { for (var i = arr.length - 1; i >= 0; i--) { if (arr[i].view == view) { try { scimoz = arr[i].view.scimoz; scimoz.markerDeleteHandle(arr[i].marker); } catch (e) {} arr.splice(i, 1); }
removeView : function(view, arr) { for (var i = arr.length - 1; i >= 0; i--) { if (arr[i].view == view) { arr.splice(i, 1); } } },
} catch (err) { DafizillaCommon.exception(err);
removeView : function(view, arr) { for (var i = arr.length - 1; i >= 0; i--) { if (arr[i].view == view) { arr.splice(i, 1); } } },
rename : function (obj, is_create, create_rb) {
rename : function (obj, new_name) {
rename : function (obj, is_create, create_rb) { if(this.locked) return this.error("LOCKED"); obj = obj ? this.get_node(obj) : this.selected; var _this = this; if(!obj || !obj.size()) return this.error("RENAME: NO NODE SELECTED"); if(!this.check("renameable", obj)) return this.error("RENAME: NODE NOT RENAMABLE"); if(!this.callback("beforerename",[{ node : obj.get(0), lang : _this.current_lang }])) return this.error("RENAME: STOPPED BY USER"); obj.parents("li.closed").each(function () { _this.open_branch(this) }); // Rollback var rb = {}; rb[this.container.attr("id")] = this.get_rollback(); var a = obj.children("a:visible"); var last_value = ""; a.contents().each(function () { if(this.nodeType == 3) { last_value = this.data; return false; } }); _this.inp = $("<input type='text' autocomplete='off' />"); _this.inp .val(last_value.replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<")) .bind("mousedown", function (event) { event.stopPropagation(); }) .bind("mouseup", function (event) { event.stopPropagation(); }) .bind("click", function (event) { event.stopPropagation(); }) .bind("keyup", function (event) { var key = event.keyCode || event.which; if(key == 27) { this.value = last_value; this.blur(); return } if(key == 13) { this.blur(); return; } }); _this.inp.blur(function(event) { if(this.value == "") this.value = last_value; _this._rename(obj, this.value, false, true); a.get(0).style.display = ""; a.prevAll("span").remove(); _this.inp = false; if(is_create) { var par = _this.parent(a); _this.callback("oncreate", [{ 'node' : _this.get_node(a).get(0), 'parent' : par == -1 ? -1 : par.get(0), 'new_name' : this.value, 'lang' : _this.get_lang(), 'is_ui' : true, 'rollback' : create_rb }]); } else { _this.callback("onrename", [{ 'node' : _this.get_node(obj).get(0), 'new_name' : this.value, 'lang' : _this.get_lang(), 'is_ui' : true, 'last_name' : last_value, 'rollback' : rb }]); } }); var spn = $("<span />").addClass(obj.attr("class")).append(a.children("ins").clone()).append(_this.inp); a.get(0).style.display = "none"; obj.prepend(spn); _this.inp.get(0).focus(); _this.inp.get(0).select(); },
if(!this.callback("beforerename",[{ node : obj.get(0), lang : _this.current_lang }])) return this.error("RENAME: STOPPED BY USER");
if(!this.callback("beforerename",[obj.get(0), _this.current_lang, _this])) return this.error("RENAME: STOPPED BY USER");
rename : function (obj, is_create, create_rb) { if(this.locked) return this.error("LOCKED"); obj = obj ? this.get_node(obj) : this.selected; var _this = this; if(!obj || !obj.size()) return this.error("RENAME: NO NODE SELECTED"); if(!this.check("renameable", obj)) return this.error("RENAME: NODE NOT RENAMABLE"); if(!this.callback("beforerename",[{ node : obj.get(0), lang : _this.current_lang }])) return this.error("RENAME: STOPPED BY USER"); obj.parents("li.closed").each(function () { _this.open_branch(this) }); // Rollback var rb = {}; rb[this.container.attr("id")] = this.get_rollback(); var a = obj.children("a:visible"); var last_value = ""; a.contents().each(function () { if(this.nodeType == 3) { last_value = this.data; return false; } }); _this.inp = $("<input type='text' autocomplete='off' />"); _this.inp .val(last_value.replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<")) .bind("mousedown", function (event) { event.stopPropagation(); }) .bind("mouseup", function (event) { event.stopPropagation(); }) .bind("click", function (event) { event.stopPropagation(); }) .bind("keyup", function (event) { var key = event.keyCode || event.which; if(key == 27) { this.value = last_value; this.blur(); return } if(key == 13) { this.blur(); return; } }); _this.inp.blur(function(event) { if(this.value == "") this.value = last_value; _this._rename(obj, this.value, false, true); a.get(0).style.display = ""; a.prevAll("span").remove(); _this.inp = false; if(is_create) { var par = _this.parent(a); _this.callback("oncreate", [{ 'node' : _this.get_node(a).get(0), 'parent' : par == -1 ? -1 : par.get(0), 'new_name' : this.value, 'lang' : _this.get_lang(), 'is_ui' : true, 'rollback' : create_rb }]); } else { _this.callback("onrename", [{ 'node' : _this.get_node(obj).get(0), 'new_name' : this.value, 'lang' : _this.get_lang(), 'is_ui' : true, 'last_name' : last_value, 'rollback' : rb }]); } }); var spn = $("<span />").addClass(obj.attr("class")).append(a.children("ins").clone()).append(_this.inp); a.get(0).style.display = "none"; obj.prepend(spn); _this.inp.get(0).focus(); _this.inp.get(0).select(); },
var a = obj.children("a:visible"); var last_value = ""; a.contents().each(function () { if(this.nodeType == 3) { last_value = this.data; return false; } });
var icn = obj.children("ins").clone(); if((typeof new_name).toLowerCase() == "string") { obj.text(new_name).prepend(icn); _this.callback("onrename", [_this.get_node(obj).get(0), _this, rb]); } else { var last_value = ""; obj.contents().each(function () { if(this.nodeType == 3) { last_value = this.data; return false; } }); _this.inp = $("<input type='text' autocomplete='off' />"); _this.inp .val(last_value.replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<")) .bind("mousedown", function (event) { event.stopPropagation(); }) .bind("mouseup", function (event) { event.stopPropagation(); }) .bind("click", function (event) { event.stopPropagation(); }) .bind("keyup", function (event) { var key = event.keyCode || event.which; if(key == 27) { this.value = last_value; this.blur(); return } if(key == 13) { this.blur(); return; } }); _this.inp.blur(function(event) { if(this.value == "") this.value = last_value; obj.text(this.value).prepend(icn); obj.get(0).style.display = ""; obj.prevAll("span").remove(); _this.inp = false; _this.callback("onrename", [_this.get_node(obj).get(0), _this, rb]); });
rename : function (obj, is_create, create_rb) { if(this.locked) return this.error("LOCKED"); obj = obj ? this.get_node(obj) : this.selected; var _this = this; if(!obj || !obj.size()) return this.error("RENAME: NO NODE SELECTED"); if(!this.check("renameable", obj)) return this.error("RENAME: NODE NOT RENAMABLE"); if(!this.callback("beforerename",[{ node : obj.get(0), lang : _this.current_lang }])) return this.error("RENAME: STOPPED BY USER"); obj.parents("li.closed").each(function () { _this.open_branch(this) }); // Rollback var rb = {}; rb[this.container.attr("id")] = this.get_rollback(); var a = obj.children("a:visible"); var last_value = ""; a.contents().each(function () { if(this.nodeType == 3) { last_value = this.data; return false; } }); _this.inp = $("<input type='text' autocomplete='off' />"); _this.inp .val(last_value.replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<")) .bind("mousedown", function (event) { event.stopPropagation(); }) .bind("mouseup", function (event) { event.stopPropagation(); }) .bind("click", function (event) { event.stopPropagation(); }) .bind("keyup", function (event) { var key = event.keyCode || event.which; if(key == 27) { this.value = last_value; this.blur(); return } if(key == 13) { this.blur(); return; } }); _this.inp.blur(function(event) { if(this.value == "") this.value = last_value; _this._rename(obj, this.value, false, true); a.get(0).style.display = ""; a.prevAll("span").remove(); _this.inp = false; if(is_create) { var par = _this.parent(a); _this.callback("oncreate", [{ 'node' : _this.get_node(a).get(0), 'parent' : par == -1 ? -1 : par.get(0), 'new_name' : this.value, 'lang' : _this.get_lang(), 'is_ui' : true, 'rollback' : create_rb }]); } else { _this.callback("onrename", [{ 'node' : _this.get_node(obj).get(0), 'new_name' : this.value, 'lang' : _this.get_lang(), 'is_ui' : true, 'last_name' : last_value, 'rollback' : rb }]); } }); var spn = $("<span />").addClass(obj.attr("class")).append(a.children("ins").clone()).append(_this.inp); a.get(0).style.display = "none"; obj.prepend(spn); _this.inp.get(0).focus(); _this.inp.get(0).select(); },
_this.inp = $("<input type='text' autocomplete='off' />"); _this.inp .val(last_value.replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<")) .bind("mousedown", function (event) { event.stopPropagation(); }) .bind("mouseup", function (event) { event.stopPropagation(); }) .bind("click", function (event) { event.stopPropagation(); }) .bind("keyup", function (event) { var key = event.keyCode || event.which; if(key == 27) { this.value = last_value; this.blur(); return } if(key == 13) { this.blur(); return; } }); _this.inp.blur(function(event) { if(this.value == "") this.value = last_value; _this._rename(obj, this.value, false, true); a.get(0).style.display = ""; a.prevAll("span").remove(); _this.inp = false; if(is_create) { var par = _this.parent(a); _this.callback("oncreate", [{ 'node' : _this.get_node(a).get(0), 'parent' : par == -1 ? -1 : par.get(0), 'new_name' : this.value, 'lang' : _this.get_lang(), 'is_ui' : true, 'rollback' : create_rb }]); } else { _this.callback("onrename", [{ 'node' : _this.get_node(obj).get(0), 'new_name' : this.value, 'lang' : _this.get_lang(), 'is_ui' : true, 'last_name' : last_value, 'rollback' : rb }]); } }); var spn = $("<span />").addClass(obj.attr("class")).append(a.children("ins").clone()).append(_this.inp); a.get(0).style.display = "none"; obj.prepend(spn); _this.inp.get(0).focus(); _this.inp.get(0).select();
var spn = $("<span />").addClass(obj.attr("class")).append(icn).append(_this.inp); obj.get(0).style.display = "none"; obj.parent().prepend(spn); _this.inp.get(0).focus(); _this.inp.get(0).select(); }
rename : function (obj, is_create, create_rb) { if(this.locked) return this.error("LOCKED"); obj = obj ? this.get_node(obj) : this.selected; var _this = this; if(!obj || !obj.size()) return this.error("RENAME: NO NODE SELECTED"); if(!this.check("renameable", obj)) return this.error("RENAME: NODE NOT RENAMABLE"); if(!this.callback("beforerename",[{ node : obj.get(0), lang : _this.current_lang }])) return this.error("RENAME: STOPPED BY USER"); obj.parents("li.closed").each(function () { _this.open_branch(this) }); // Rollback var rb = {}; rb[this.container.attr("id")] = this.get_rollback(); var a = obj.children("a:visible"); var last_value = ""; a.contents().each(function () { if(this.nodeType == 3) { last_value = this.data; return false; } }); _this.inp = $("<input type='text' autocomplete='off' />"); _this.inp .val(last_value.replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<")) .bind("mousedown", function (event) { event.stopPropagation(); }) .bind("mouseup", function (event) { event.stopPropagation(); }) .bind("click", function (event) { event.stopPropagation(); }) .bind("keyup", function (event) { var key = event.keyCode || event.which; if(key == 27) { this.value = last_value; this.blur(); return } if(key == 13) { this.blur(); return; } }); _this.inp.blur(function(event) { if(this.value == "") this.value = last_value; _this._rename(obj, this.value, false, true); a.get(0).style.display = ""; a.prevAll("span").remove(); _this.inp = false; if(is_create) { var par = _this.parent(a); _this.callback("oncreate", [{ 'node' : _this.get_node(a).get(0), 'parent' : par == -1 ? -1 : par.get(0), 'new_name' : this.value, 'lang' : _this.get_lang(), 'is_ui' : true, 'rollback' : create_rb }]); } else { _this.callback("onrename", [{ 'node' : _this.get_node(obj).get(0), 'new_name' : this.value, 'lang' : _this.get_lang(), 'is_ui' : true, 'last_name' : last_value, 'rollback' : rb }]); } }); var spn = $("<span />").addClass(obj.attr("class")).append(a.children("ins").clone()).append(_this.inp); a.get(0).style.display = "none"; obj.prepend(spn); _this.inp.get(0).focus(); _this.inp.get(0).select(); },
I=P.getParent();if(!P.getPrevious())P.remove().insertBefore(I);else if(!P.getNext())P.remove().insertAfter(I);else{P.breakParent(P.getParent());O.push(P.getNext());}if(!I.getCustomData('blockquote_processed')){O.push(I);h.setMarker(K,I,'blockquote_processed',true);}N.push(P);}h.clearAllMarkers(K);for(E=O.length-1;E>=0;E--){I=O[E];if(n(I))I.remove();}if(p.config.enterMode==2){var Q=true;while(N.length){P=N.shift();if(P.getName()=='div'){H=new d.documentFragment(p.document);var R=Q&&P.getPrevious()&&!(P.getPrevious().type==1&&P.getPrevious().isBlockBoundary());if(R)H.append(p.document.createElement('br'));var S=P.getNext()&&!(P.getNext().type==1&&P.getNext().isBlockBoundary());while(P.getFirst())P.getFirst().remove().appendTo(H);if(S)H.append(p.document.createElement('br'));H.replace(P);Q=false;}}}}r.selectBookmarks(t);p.focus();}};j.add('blockquote',{init:function(p){p.addCommand('blockquote',o);p.ui.addButton('Blockquote',{label:p.lang.blockquote,command:'blockquote'});p.on('selectionChange',m);},requires:['domiterator']});})();j.add('button',{beforeInit:function(l){l.ui.addHandler(1,k.button.handler);}});a.UI_BUTTON=1;k.button=function(l){e.extend(this,l,{title:l.label,className:l.className||l.command&&'cke_button_'+l.command||'',click:l.click||(function(m){m.execCommand(l.command);})});this._={};};k.button.handler={create:function(l){return new k.button(l);}};k.button.prototype={canGroup:true,render:function(l,m){var n=b,o=this._.id='cke_'+e.getNextNumber(),p='',q=this.command,r,s;this._.editor=l;var t={id:o,button:this,editor:l,focus:function(){var v=a.document.getById(o);v.focus();},execute:function(){this.button.click(l);}};t.clickFn=r=e.addFunction(t.execute,t);t.index=s=k.button._.instances.push(t)-1;if(this.modes)l.on('mode',function(){this.setState(this.modes[l.mode]?2:0);},this);else if(q){q=l.getCommand(q);if(q){q.on('state',function(){this.setState(q.state);},this);p+='cke_'+(q.state==1?'on':q.state==0?'disabled':'off');}}if(!q)p+='cke_off';if(this.className)p+=' '+this.className;m.push('<span class="cke_button">','<a id="',o,'" class="',p,'"',n.gecko&&n.version>=10900&&!n.hc?'':'" href="javascript:void(\''+(this.title||'').replace("'")+"')\"",' title="',this.title,'" tabindex="-1" hidefocus="true" role="button" aria-labelledby="'+o+'_label"'+(this.hasArrow?' aria-haspopup="true"':''));if(n.opera||n.gecko&&n.mac)m.push(' onkeypress="return false;"');if(n.gecko)m.push(' onblur="this.style.cssText = this.style.cssText;"');m.push(' onkeydown="return CKEDITOR.ui.button._.keydown(',s,', event);" onfocus="return CKEDITOR.ui.button._.focus(',s,', event);" onclick="CKEDITOR.tools.callFunction(',r,', this); return false;"><span class="cke_icon"'); if(this.icon){var u=(this.iconOffset||0)*-16;m.push(' style="background-image:url(',a.getUrl(this.icon),');background-position:0 '+u+'px;"');}m.push('></span><span id="',o,'_label" class="cke_label">',this.label,'</span>');if(this.hasArrow)m.push('<span class="cke_buttonarrow">'+(b.hc?'&#9660;':'')+'</span>');m.push('</a>','</span>');if(this.onRender)this.onRender();return t;},setState:function(l){if(this._.state==l)return false;this._.state=l;var m=a.document.getById(this._.id);if(m){m.setState(l);l==0?m.setAttribute('aria-disabled',true):m.removeAttribute('aria-disabled');l==1?m.setAttribute('aria-pressed',true):m.removeAttribute('aria-pressed');return true;}else return false;}};k.button._={instances:[],keydown:function(l,m){var n=k.button._.instances[l];if(n.onkey){m=new d.event(m);return n.onkey(n,m.getKeystroke())!==false;}},focus:function(l,m){var n=k.button._.instances[l],o;if(n.onfocus)o=n.onfocus(n,new d.event(m))!==false;if(b.gecko&&b.version<10900)m.preventBubble();return o;}};k.prototype.addButton=function(l,m){this.add(l,1,m);};(function(){var l=function(r,s){var t=r.document,u=t.getBody(),v=false,w=function(){v=true;};u.on(s,w);(b.version>7?t.$:t.$.selection.createRange()).execCommand(s);u.removeListener(s,w);return v;},m=c?function(r,s){return l(r,s);}:function(r,s){try{return r.document.$.execCommand(s);}catch(t){return false;}},n=function(r){this.type=r;this.canUndo=this.type=='cut';};n.prototype={exec:function(r,s){var t=m(r,this.type);if(!t)alert(r.lang.clipboard[this.type+'Error']);return t;}};var o={canUndo:false,exec:c?function(r){r.focus();if(!r.document.getBody().fire('beforepaste')&&!l(r,'paste')){r.fire('pasteDialog');return false;}}:function(r){try{if(!r.document.getBody().fire('beforepaste')&&!r.document.$.execCommand('Paste',false,null))throw 0;}catch(s){setTimeout(function(){r.fire('pasteDialog');},0);return false;}}},p=function(r){if(this.mode!='wysiwyg')return;switch(r.data.keyCode){case 1000+86:case 2000+45:var s=this.document.getBody();if(!c&&s.fire('beforepaste'))r.cancel();else if(b.opera||b.gecko&&b.version<10900)s.fire('paste');return;case 1000+88:case 2000+46:var t=this;this.fire('saveSnapshot');setTimeout(function(){t.fire('saveSnapshot');},0);}};function q(r,s,t){var u=this.document;if(c&&u.getById('cke_pastebin'))return;if(s=='text'&&r.data&&r.data.$.clipboardData){var v=r.data.$.clipboardData.getData('text/plain');if(v){r.data.preventDefault();t(v);return;}}var w=this.getSelection(),x=new d.range(u),y=new h(s=='text'?'textarea':'div',u);
if(!y.equals(G))D.push(y);G=y;}while(D.length>0){y=D.shift();if(y.getName()=='blockquote'){var H=new d.documentFragment(p.document);while(y.getFirst()){H.append(y.getFirst().remove());z.push(H.getLast());}H.replace(y);}else z.push(y);}var I=p.document.createElement('blockquote');I.insertBefore(z[0]);while(z.length>0){y=z.shift();I.append(y);}}else if(q==1){var J=[],K={};while(y=x.getNextParagraph()){var L=null,M=null;while(y.getParent()){if(y.getParent().getName()=='blockquote'){L=y.getParent();M=y;break;}y=y.getParent();}if(L&&M&&!M.getCustomData('blockquote_moveout')){J.push(M);h.setMarker(K,M,'blockquote_moveout',true);}}h.clearAllMarkers(K);var N=[],O=[];K={};while(J.length>0){var P=J.shift();I=P.getParent();if(!P.getPrevious())P.remove().insertBefore(I);else if(!P.getNext())P.remove().insertAfter(I);else{P.breakParent(P.getParent());O.push(P.getNext());}if(!I.getCustomData('blockquote_processed')){O.push(I);h.setMarker(K,I,'blockquote_processed',true);}N.push(P);}h.clearAllMarkers(K);for(E=O.length-1;E>=0;E--){I=O[E];if(n(I))I.remove();}if(p.config.enterMode==2){var Q=true;while(N.length){P=N.shift();if(P.getName()=='div'){H=new d.documentFragment(p.document);var R=Q&&P.getPrevious()&&!(P.getPrevious().type==1&&P.getPrevious().isBlockBoundary());if(R)H.append(p.document.createElement('br'));var S=P.getNext()&&!(P.getNext().type==1&&P.getNext().isBlockBoundary());while(P.getFirst())P.getFirst().remove().appendTo(H);if(S)H.append(p.document.createElement('br'));H.replace(P);Q=false;}}}}r.selectBookmarks(t);p.focus();}};j.add('blockquote',{init:function(p){p.addCommand('blockquote',o);p.ui.addButton('Blockquote',{label:p.lang.blockquote,command:'blockquote'});p.on('selectionChange',m);},requires:['domiterator']});})();j.add('button',{beforeInit:function(l){l.ui.addHandler(1,k.button.handler);}});a.UI_BUTTON=1;k.button=function(l){e.extend(this,l,{title:l.label,className:l.className||l.command&&'cke_button_'+l.command||'',click:l.click||(function(m){m.execCommand(l.command);})});this._={};};k.button.handler={create:function(l){return new k.button(l);}};k.button.prototype={canGroup:true,render:function(l,m){var n=b,o=this._.id='cke_'+e.getNextNumber(),p='',q=this.command,r,s;this._.editor=l;var t={id:o,button:this,editor:l,focus:function(){var v=a.document.getById(o);v.focus();},execute:function(){this.button.click(l);}};t.clickFn=r=e.addFunction(t.execute,t);t.index=s=k.button._.instances.push(t)-1;if(this.modes)l.on('mode',function(){this.setState(this.modes[l.mode]?2:0); },this);else if(q){q=l.getCommand(q);if(q){q.on('state',function(){this.setState(q.state);},this);p+='cke_'+(q.state==1?'on':q.state==0?'disabled':'off');}}if(!q)p+='cke_off';if(this.className)p+=' '+this.className;m.push('<span class="cke_button">','<a id="',o,'" class="',p,'"',n.gecko&&n.version>=10900&&!n.hc?'':'" href="javascript:void(\''+(this.title||'').replace("'",'')+"')\"",' title="',this.title,'" tabindex="-1" hidefocus="true" role="button" aria-labelledby="'+o+'_label"'+(this.hasArrow?' aria-haspopup="true"':''));if(n.opera||n.gecko&&n.mac)m.push(' onkeypress="return false;"');if(n.gecko)m.push(' onblur="this.style.cssText = this.style.cssText;"');m.push(' onkeydown="return CKEDITOR.ui.button._.keydown(',s,', event);" onfocus="return CKEDITOR.ui.button._.focus(',s,', event);" onclick="CKEDITOR.tools.callFunction(',r,', this); return false;"><span class="cke_icon"');if(this.icon){var u=(this.iconOffset||0)*-16;m.push(' style="background-image:url(',a.getUrl(this.icon),');background-position:0 '+u+'px;"');}m.push('>&nbsp;</span><span id="',o,'_label" class="cke_label">',this.label,'</span>');if(this.hasArrow)m.push('<span class="cke_buttonarrow">'+(b.hc?'&#9660;':'&nbsp;')+'</span>');m.push('</a>','</span>');if(this.onRender)this.onRender();return t;},setState:function(l){if(this._.state==l)return false;this._.state=l;var m=a.document.getById(this._.id);if(m){m.setState(l);l==0?m.setAttribute('aria-disabled',true):m.removeAttribute('aria-disabled');l==1?m.setAttribute('aria-pressed',true):m.removeAttribute('aria-pressed');return true;}else return false;}};k.button._={instances:[],keydown:function(l,m){var n=k.button._.instances[l];if(n.onkey){m=new d.event(m);return n.onkey(n,m.getKeystroke())!==false;}},focus:function(l,m){var n=k.button._.instances[l],o;if(n.onfocus)o=n.onfocus(n,new d.event(m))!==false;if(b.gecko&&b.version<10900)m.preventBubble();return o;}};k.prototype.addButton=function(l,m){this.add(l,1,m);};a.on('reset',function(){k.button._.instances=[];});(function(){var l=function(s,t){var u=s.document,v=u.getBody(),w=false,x=function(){w=true;};v.on(t,x);(b.version>7?u.$:u.$.selection.createRange()).execCommand(t);v.removeListener(t,x);return w;},m=c?function(s,t){return l(s,t);}:function(s,t){try{return s.document.$.execCommand(t);}catch(u){return false;}},n=function(s){this.type=s;this.canUndo=this.type=='cut';};n.prototype={exec:function(s,t){this.type=='cut'&&r(s);var u=m(s,this.type);if(!u)alert(s.lang.clipboard[this.type+'Error']);
I=P.getParent();if(!P.getPrevious())P.remove().insertBefore(I);else if(!P.getNext())P.remove().insertAfter(I);else{P.breakParent(P.getParent());O.push(P.getNext());}if(!I.getCustomData('blockquote_processed')){O.push(I);h.setMarker(K,I,'blockquote_processed',true);}N.push(P);}h.clearAllMarkers(K);for(E=O.length-1;E>=0;E--){I=O[E];if(n(I))I.remove();}if(p.config.enterMode==2){var Q=true;while(N.length){P=N.shift();if(P.getName()=='div'){H=new d.documentFragment(p.document);var R=Q&&P.getPrevious()&&!(P.getPrevious().type==1&&P.getPrevious().isBlockBoundary());if(R)H.append(p.document.createElement('br'));var S=P.getNext()&&!(P.getNext().type==1&&P.getNext().isBlockBoundary());while(P.getFirst())P.getFirst().remove().appendTo(H);if(S)H.append(p.document.createElement('br'));H.replace(P);Q=false;}}}}r.selectBookmarks(t);p.focus();}};j.add('blockquote',{init:function(p){p.addCommand('blockquote',o);p.ui.addButton('Blockquote',{label:p.lang.blockquote,command:'blockquote'});p.on('selectionChange',m);},requires:['domiterator']});})();j.add('button',{beforeInit:function(l){l.ui.addHandler(1,k.button.handler);}});a.UI_BUTTON=1;k.button=function(l){e.extend(this,l,{title:l.label,className:l.className||l.command&&'cke_button_'+l.command||'',click:l.click||(function(m){m.execCommand(l.command);})});this._={};};k.button.handler={create:function(l){return new k.button(l);}};k.button.prototype={canGroup:true,render:function(l,m){var n=b,o=this._.id='cke_'+e.getNextNumber(),p='',q=this.command,r,s;this._.editor=l;var t={id:o,button:this,editor:l,focus:function(){var v=a.document.getById(o);v.focus();},execute:function(){this.button.click(l);}};t.clickFn=r=e.addFunction(t.execute,t);t.index=s=k.button._.instances.push(t)-1;if(this.modes)l.on('mode',function(){this.setState(this.modes[l.mode]?2:0);},this);else if(q){q=l.getCommand(q);if(q){q.on('state',function(){this.setState(q.state);},this);p+='cke_'+(q.state==1?'on':q.state==0?'disabled':'off');}}if(!q)p+='cke_off';if(this.className)p+=' '+this.className;m.push('<span class="cke_button">','<a id="',o,'" class="',p,'"',n.gecko&&n.version>=10900&&!n.hc?'':'" href="javascript:void(\''+(this.title||'').replace("'")+"')\"",' title="',this.title,'" tabindex="-1" hidefocus="true" role="button" aria-labelledby="'+o+'_label"'+(this.hasArrow?' aria-haspopup="true"':''));if(n.opera||n.gecko&&n.mac)m.push(' onkeypress="return false;"');if(n.gecko)m.push(' onblur="this.style.cssText = this.style.cssText;"');m.push(' onkeydown="return CKEDITOR.ui.button._.keydown(',s,', event);" onfocus="return CKEDITOR.ui.button._.focus(',s,', event);" onclick="CKEDITOR.tools.callFunction(',r,', this); return false;"><span class="cke_icon"');if(this.icon){var u=(this.iconOffset||0)*-16;m.push(' style="background-image:url(',a.getUrl(this.icon),');background-position:0 '+u+'px;"');}m.push('></span><span id="',o,'_label" class="cke_label">',this.label,'</span>');if(this.hasArrow)m.push('<span class="cke_buttonarrow">'+(b.hc?'&#9660;':'')+'</span>');m.push('</a>','</span>');if(this.onRender)this.onRender();return t;},setState:function(l){if(this._.state==l)return false;this._.state=l;var m=a.document.getById(this._.id);if(m){m.setState(l);l==0?m.setAttribute('aria-disabled',true):m.removeAttribute('aria-disabled');l==1?m.setAttribute('aria-pressed',true):m.removeAttribute('aria-pressed');return true;}else return false;}};k.button._={instances:[],keydown:function(l,m){var n=k.button._.instances[l];if(n.onkey){m=new d.event(m);return n.onkey(n,m.getKeystroke())!==false;}},focus:function(l,m){var n=k.button._.instances[l],o;if(n.onfocus)o=n.onfocus(n,new d.event(m))!==false;if(b.gecko&&b.version<10900)m.preventBubble();return o;}};k.prototype.addButton=function(l,m){this.add(l,1,m);};(function(){var l=function(r,s){var t=r.document,u=t.getBody(),v=false,w=function(){v=true;};u.on(s,w);(b.version>7?t.$:t.$.selection.createRange()).execCommand(s);u.removeListener(s,w);return v;},m=c?function(r,s){return l(r,s);}:function(r,s){try{return r.document.$.execCommand(s);}catch(t){return false;}},n=function(r){this.type=r;this.canUndo=this.type=='cut';};n.prototype={exec:function(r,s){var t=m(r,this.type);if(!t)alert(r.lang.clipboard[this.type+'Error']);return t;}};var o={canUndo:false,exec:c?function(r){r.focus();if(!r.document.getBody().fire('beforepaste')&&!l(r,'paste')){r.fire('pasteDialog');return false;}}:function(r){try{if(!r.document.getBody().fire('beforepaste')&&!r.document.$.execCommand('Paste',false,null))throw 0;}catch(s){setTimeout(function(){r.fire('pasteDialog');},0);return false;}}},p=function(r){if(this.mode!='wysiwyg')return;switch(r.data.keyCode){case 1000+86:case 2000+45:var s=this.document.getBody();if(!c&&s.fire('beforepaste'))r.cancel();else if(b.opera||b.gecko&&b.version<10900)s.fire('paste');return;case 1000+88:case 2000+46:var t=this;this.fire('saveSnapshot');setTimeout(function(){t.fire('saveSnapshot');},0);}};function q(r,s,t){var u=this.document;if(c&&u.getById('cke_pastebin'))return;if(s=='text'&&r.data&&r.data.$.clipboardData){var v=r.data.$.clipboardData.getData('text/plain');if(v){r.data.preventDefault();t(v);return;}}var w=this.getSelection(),x=new d.range(u),y=new h(s=='text'?'textarea':'div',u);
soy.renderAsFragment = function(template, opt_templateData) { var tempDiv = document.createElement('div'); tempDiv.innerHTML = template(opt_templateData); if (tempDiv.childNodes.length == 1) { return tempDiv.firstChild; } else { var fragment = document.createDocumentFragment(); while (tempDiv.firstChild) { fragment.appendChild(tempDiv.firstChild); } return fragment; }
soy.renderAsFragment = function(template, opt_templateData, opt_document) { return soy.renderWithWrapper_(template, opt_templateData, opt_document, false );
soy.renderAsFragment = function(template, opt_templateData) { var tempDiv = document.createElement('div'); tempDiv.innerHTML = template(opt_templateData); if (tempDiv.childNodes.length == 1) { return tempDiv.firstChild; } else { var fragment = document.createDocumentFragment(); while (tempDiv.firstChild) { fragment.appendChild(tempDiv.firstChild); } return fragment; }};
soy.renderAsFragment = function(template, opt_templateData) { return goog.dom.htmlToDocumentFragment(template(opt_templateData));
soy.renderAsFragment = function(template, opt_templateData, opt_document) { return soy.renderWithWrapper_(template, opt_templateData, opt_document, false );
soy.renderAsFragment = function(template, opt_templateData) { return goog.dom.htmlToDocumentFragment(template(opt_templateData));};
element.innerHTML = template(opt_templateData);
element.innerHTML = template(opt_templateData || soy.defaultTemplateData_);
soy.renderElement = function(element, template, opt_templateData) { element.innerHTML = template(opt_templateData);};
o.replace(m,"$1"+s+"$2"+f);if(z!=o){u=true;o=z}}return{match:u,suggestion:o}}};this.replace=function(c,g,d){g=t(c);var m=c.value.substring(0,g.start)+d+y;if(g.end<c.value.length)m+=c.value.substring(g.end,c.value.length);c.value=m;if(c.selectionStart){c.selectionStart=g.start+d.length+y.length;c.selectionEnd=c.selectionStart}}});
o.replace(m,"$1"+s+"$2"+f);if(z!=o){t=true;o=z}}return{match:t,suggestion:o}}};this.replace=function(c,g,d){g=y(c);var m=c.value.substring(0,g.start)+d+x;if(g.end<c.value.length)m+=c.value.substring(g.end,c.value.length);c.value=m;if(c.selectionStart){c.selectionStart=g.start+d.length+x.length;c.selectionEnd=c.selectionStart}}});
o.replace(m,"$1"+s+"$2"+f);if(z!=o){u=true;o=z}}return{match:u,suggestion:o}}};this.replace=function(c,g,d){g=t(c);var m=c.value.substring(0,g.start)+d+y;if(g.end<c.value.length)m+=c.value.substring(g.end,c.value.length);c.value=m;if(c.selectionStart){c.selectionStart=g.start+d.length+y.length;c.selectionEnd=c.selectionStart}}});
}K.matchRange.setMatched();if(A!==false)K.matchRange.highlight();return true;}}K.matchRange.clearMatched();K.matchRange.removeHighlight();if(z&&!B){K.searchRange=v(true);K.matchRange=null;return arguments.callee.apply(K,Array.prototype.slice.call(arguments).concat([true]));}return false;},replaceCounter:0,replace:function(w,x,y,z,A,B,C){var H=this;var D=false;if(H.matchRange&&H.matchRange.isMatched()&&!H.matchRange._.isReplaced){H.matchRange.removeHighlight();var E=H.matchRange.toDomRange(),F=h.document.createText(y);if(!C){var G=h.getSelection();G.selectRanges([E]);h.fire('saveSnapshot');}E.deleteContents();E.insertNode(F);if(!C){G.selectRanges([E]);h.fire('saveSnapshot');}H.matchRange.updateFromDomRange(E);if(!C)H.matchRange.highlight();H.matchRange._.isReplaced=true;H.replaceCounter++;D=true;}else D=H.find(x,z,A,B,!C);return D;}};function v(w){var x,y=h.getSelection(),z=h.document.getBody();if(y&&!w){x=y.getRanges()[0].clone();x.collapse(true);}else{x=new CKEDITOR.dom.range();x.setStartAt(z,CKEDITOR.POSITION_AFTER_START);}x.setEndAt(z,CKEDITOR.POSITION_BEFORE_END);return x;};return{title:h.lang.findAndReplace.title,resizable:CKEDITOR.DIALOG_RESIZE_NONE,minWidth:350,minHeight:165,buttons:[CKEDITOR.dialog.cancelButton],contents:[{id:'find',label:h.lang.findAndReplace.find,title:h.lang.findAndReplace.find,accessKey:'',elements:[{type:'hbox',widths:['230px','90px'],children:[{type:'text',id:'txtFindFind',label:h.lang.findAndReplace.findWhat,isChanged:false,labelLayout:'horizontal',accessKey:'F'},{type:'button',align:'left',style:'width:100%',label:h.lang.findAndReplace.find,onClick:function(){var w=this.getDialog();if(!u.find(w.getValueOf('find','txtFindFind'),w.getValueOf('find','txtFindCaseChk'),w.getValueOf('find','txtFindWordChk'),w.getValueOf('find','txtFindCyclic')))alert(h.lang.findAndReplace.notFoundMsg);}}]},{type:'vbox',padding:0,children:[{type:'checkbox',id:'txtFindCaseChk',isChanged:false,style:'margin-top:28px',label:h.lang.findAndReplace.matchCase},{type:'checkbox',id:'txtFindWordChk',isChanged:false,label:h.lang.findAndReplace.matchWord},{type:'checkbox',id:'txtFindCyclic',isChanged:false,'default':true,label:h.lang.findAndReplace.matchCyclic}]}]},{id:'replace',label:h.lang.findAndReplace.replace,accessKey:'M',elements:[{type:'hbox',widths:['230px','90px'],children:[{type:'text',id:'txtFindReplace',label:h.lang.findAndReplace.findWhat,isChanged:false,labelLayout:'horizontal',accessKey:'F'},{type:'button',align:'left',style:'width:100%',label:h.lang.findAndReplace.replace,onClick:function(){var w=this.getDialog();
while(F=L.matchRange.getEndCharacter()){E=D.feedCharacter(F);if(E==r)break;if(L.matchRange.moveNext().hitMatchBoundary)D.reset();}if(E==r){if(z){var G=L.matchRange.getCursors(),H=G[G.length-1],I=G[0],J=new l(o(I),true),K=new l(n(H),true);if(!(u(J.back().character)&&u(K.next().character)))continue;}L.matchRange.setMatched();if(B!==false)L.matchRange.highlight();return true;}}L.matchRange.clearMatched();L.matchRange.removeHighlight();if(A&&!C){L.searchRange=w(true);L.matchRange=null;return arguments.callee.apply(L,Array.prototype.slice.call(arguments).concat([true]));}return false;},replaceCounter:0,replace:function(x,y,z,A,B,C,D){var I=this;a=1;var E=false;if(I.matchRange&&I.matchRange.isMatched()&&!I.matchRange._.isReplaced&&!I.matchRange.isReadOnly()){I.matchRange.removeHighlight();var F=I.matchRange.toDomRange(),G=i.document.createText(z);if(!D){var H=i.getSelection();H.selectRanges([F]);i.fire('saveSnapshot');}F.deleteContents();F.insertNode(G);if(!D){H.selectRanges([F]);i.fire('saveSnapshot');}I.matchRange.updateFromDomRange(F);if(!D)I.matchRange.highlight();I.matchRange._.isReplaced=true;I.replaceCounter++;E=true;}else E=I.find(y,A,B,C,!D);a=0;return E;}};function w(x){var y,z=i.getSelection(),A=i.document.getBody();if(z&&!x){y=z.getRanges()[0].clone();y.collapse(true);}else{y=new CKEDITOR.dom.range();y.setStartAt(A,CKEDITOR.POSITION_AFTER_START);}y.setEndAt(A,CKEDITOR.POSITION_BEFORE_END);return y;};return{title:i.lang.findAndReplace.title,resizable:CKEDITOR.DIALOG_RESIZE_NONE,minWidth:350,minHeight:165,buttons:[CKEDITOR.dialog.cancelButton],contents:[{id:'find',label:i.lang.findAndReplace.find,title:i.lang.findAndReplace.find,accessKey:'',elements:[{type:'hbox',widths:['230px','90px'],children:[{type:'text',id:'txtFindFind',label:i.lang.findAndReplace.findWhat,isChanged:false,labelLayout:'horizontal',accessKey:'F'},{type:'button',align:'left',style:'width:100%',label:i.lang.findAndReplace.find,onClick:function(){var x=this.getDialog();if(!v.find(x.getValueOf('find','txtFindFind'),x.getValueOf('find','txtFindCaseChk'),x.getValueOf('find','txtFindWordChk'),x.getValueOf('find','txtFindCyclic')))alert(i.lang.findAndReplace.notFoundMsg);}}]},{type:'vbox',padding:0,children:[{type:'checkbox',id:'txtFindCaseChk',isChanged:false,style:'margin-top:28px',label:i.lang.findAndReplace.matchCase},{type:'checkbox',id:'txtFindWordChk',isChanged:false,label:i.lang.findAndReplace.matchWord},{type:'checkbox',id:'txtFindCyclic',isChanged:false,'default':true,label:i.lang.findAndReplace.matchCyclic}]}]},{id:'replace',label:i.lang.findAndReplace.replace,accessKey:'M',elements:[{type:'hbox',widths:['230px','90px'],children:[{type:'text',id:'txtFindReplace',label:i.lang.findAndReplace.findWhat,isChanged:false,labelLayout:'horizontal',accessKey:'F'},{type:'button',align:'left',style:'width:100%',label:i.lang.findAndReplace.replace,onClick:function(){var x=this.getDialog();
}K.matchRange.setMatched();if(A!==false)K.matchRange.highlight();return true;}}K.matchRange.clearMatched();K.matchRange.removeHighlight();if(z&&!B){K.searchRange=v(true);K.matchRange=null;return arguments.callee.apply(K,Array.prototype.slice.call(arguments).concat([true]));}return false;},replaceCounter:0,replace:function(w,x,y,z,A,B,C){var H=this;var D=false;if(H.matchRange&&H.matchRange.isMatched()&&!H.matchRange._.isReplaced){H.matchRange.removeHighlight();var E=H.matchRange.toDomRange(),F=h.document.createText(y);if(!C){var G=h.getSelection();G.selectRanges([E]);h.fire('saveSnapshot');}E.deleteContents();E.insertNode(F);if(!C){G.selectRanges([E]);h.fire('saveSnapshot');}H.matchRange.updateFromDomRange(E);if(!C)H.matchRange.highlight();H.matchRange._.isReplaced=true;H.replaceCounter++;D=true;}else D=H.find(x,z,A,B,!C);return D;}};function v(w){var x,y=h.getSelection(),z=h.document.getBody();if(y&&!w){x=y.getRanges()[0].clone();x.collapse(true);}else{x=new CKEDITOR.dom.range();x.setStartAt(z,CKEDITOR.POSITION_AFTER_START);}x.setEndAt(z,CKEDITOR.POSITION_BEFORE_END);return x;};return{title:h.lang.findAndReplace.title,resizable:CKEDITOR.DIALOG_RESIZE_NONE,minWidth:350,minHeight:165,buttons:[CKEDITOR.dialog.cancelButton],contents:[{id:'find',label:h.lang.findAndReplace.find,title:h.lang.findAndReplace.find,accessKey:'',elements:[{type:'hbox',widths:['230px','90px'],children:[{type:'text',id:'txtFindFind',label:h.lang.findAndReplace.findWhat,isChanged:false,labelLayout:'horizontal',accessKey:'F'},{type:'button',align:'left',style:'width:100%',label:h.lang.findAndReplace.find,onClick:function(){var w=this.getDialog();if(!u.find(w.getValueOf('find','txtFindFind'),w.getValueOf('find','txtFindCaseChk'),w.getValueOf('find','txtFindWordChk'),w.getValueOf('find','txtFindCyclic')))alert(h.lang.findAndReplace.notFoundMsg);}}]},{type:'vbox',padding:0,children:[{type:'checkbox',id:'txtFindCaseChk',isChanged:false,style:'margin-top:28px',label:h.lang.findAndReplace.matchCase},{type:'checkbox',id:'txtFindWordChk',isChanged:false,label:h.lang.findAndReplace.matchWord},{type:'checkbox',id:'txtFindCyclic',isChanged:false,'default':true,label:h.lang.findAndReplace.matchCyclic}]}]},{id:'replace',label:h.lang.findAndReplace.replace,accessKey:'M',elements:[{type:'hbox',widths:['230px','90px'],children:[{type:'text',id:'txtFindReplace',label:h.lang.findAndReplace.findWhat,isChanged:false,labelLayout:'horizontal',accessKey:'F'},{type:'button',align:'left',style:'width:100%',label:h.lang.findAndReplace.replace,onClick:function(){var w=this.getDialog();
var root = new Ext.tree.AsyncTreeNode({ text : (this.payload ? this.payload.get(this.titleColumn) : '/'), id : (this.payload ? this.getBrowsePath(this.payload.data.resourceURI) : '/'), singleClickExpand : true, expanded : true }); this.setRootNode(root);
this.refreshHandler();
Sonatype.repoServer.RepositoryBrowsePanel = function(config) { var config = config || {}; var defaultConfig = { titleColumn : 'name' }; Ext.apply(this, config, defaultConfig); this.oldSearchText = ''; this.searchTask = new Ext.util.DelayedTask(this.startSearch, this, [this]); this.nodeContextMenuEvent = 'repositoryContentMenuInit'; Sonatype.repoServer.RepositoryBrowsePanel.superclass.constructor.call(this, { anchor : '0 -2', bodyStyle : 'background-color:#FFFFFF', animate : true, lines : false, autoScroll : true, containerScroll : true, rootVisible : true, enableDD : false, tbar : [{ text : 'Refresh', icon : Sonatype.config.resourcePath + '/images/icons/arrow_refresh.png', cls : 'x-btn-text-icon', scope : this, handler : this.refreshHandler }, ' ', 'Path Lookup:', { xtype : 'nexussearchfield', searchPanel : this, width : 400, enableKeyEvents : true, listeners : { 'keyup' : { fn : function(field, event) { var key = event.getKey(); if (!event.isNavKeyPress()) { this.searchTask.delay(200); } }, scope : this }, 'render' : function(c) { Ext.QuickTips.register({ target : c.getEl(), text : 'Enter a complete path to lookup, for example org/sonatype/nexus' }); } } }], loader : new Ext.tree.SonatypeTreeLoader({ url : '', listeners : { loadexception : this.treeLoadExceptionHandler, scope : this } }), listeners : { click : this.nodeClickHandler, contextMenu : this.nodeContextMenuHandler, scope : this } }); new Ext.tree.TreeSorter(this, { folderSort : true }); var root = new Ext.tree.AsyncTreeNode({ text : (this.payload ? this.payload.get(this.titleColumn) : '/'), id : (this.payload ? this.getBrowsePath(this.payload.data.resourceURI) : '/'), singleClickExpand : true, expanded : true }); this.setRootNode(root);};
var xmla = this;
var ex, xmla = this;
request: function(options){ var xmla = this; if (this.response){ this.response.close(); } this.response = null; this.responseText = null; this.responseXml = null; options.url = _isUndefined(options.url)? this.options.url : options.url; if (_isUndefined(options.url)){ ex = Xmla.Exception._newError( "MISSING_URL", "Xmla.request", options ); ex._throw(); } options.properties = _applyProperties(options.properties, this.options.properties, false); options.restrictions = _applyProperties(options.restrictions, this.options.restrictions, false); options.async = _isUndefined(options.async) ? this.options.async : options.async; options.requestTimeout = _isUndefined(options.requestTimeout) ? this.options.requestTimeout : options.requestTimeout; var soapMessage = _getXmlaSoapMessage(options); this.soapMessage = soapMessage; var myXhr; var ajaxOptions = { async: options.async, timeout: options.requestTimeout, data: soapMessage, error: function(exception){ options.exception = exception; xmla._requestError(options) }, complete: function(xhr){ options.xhr = xhr; xmla._requestSuccess(options); }, url: options.url }; if (options.username){ ajaxOptions.username = options.username; } if (options.password){ ajaxOptions.password = options.password; } if (this._fireEvent(Xmla.EVENT_REQUEST, options, true) && ( (options.method == Xmla.METHOD_DISCOVER && this._fireEvent(Xmla.EVENT_DISCOVER, options)) || (options.method == Xmla.METHOD_EXECUTE && this._fireEvent(Xmla.EVENT_EXECUTE, options)) ) ) { myXhr = _ajax(ajaxOptions); } return this.response; },