Jquery - эластичное txt поле

Готовые уроки IFrame + ВКонтакте API
Ответить
KIka_kok
FL Team
FL Team
Сообщения: 680
Зарегистрирован: 18 июл 2010, 19:52

Jquery - эластичное txt поле

Сообщение KIka_kok »

Поле для вода текста "ЭЛАСТИЧНОЕ" то есть чем больше текста, тем больше поле можно задать размеры, после чего будет появлятся scrolbar (чтоб не ломался дизайн). Обращайте внимание на комменты в коде
и так начнем
первым делом создадим html файл INDEX и в него пишем кодировку и код

Код: Выделить всё

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title> НАЗВАНИЕ СТРАНИЦЫ </title><script type="text/javascript" src="ext-core/ext-core.js"></script><script type="text/javascript" src="elastic-textarea.js"></script><style type="text/css">textarea{    width: 400px;    height: 50px;    border: 3px solid #464646;    font-family: arial;    font-size: 14px;    padding: 5px;    color:#464646;}</style></head><body><h1>ТУТ ТЕКСТ КОТОРЫЙ НАД ТЕКСТОВЫМ ПОЛЕМ ПРОЩЕ ГОВОРЯ ЗАГОЛОВОК</h1><br> <textarea id="foo" >    ЗДЕСЬ ТОТ ТЕКСТ  КОтОРЫЙ БУДЕТ В ТЕКСТОВОМ ПОЛЕ ДО НАЖАТИЯ ПРИ НАЖАТИИ ОН ИСЧЕЗНЕТ</textarea><script type="text/javascript">    elasticTextArea("foo");</script><br>ТУТ ВАШ ТЕКСТ ТАДАДАДАДА ДАД ТАТАДАДАД (ТЕКСТ ПОД ТЕКСТОВЫМ ПОЛЕМ(МОЖНО СДЕЛАТЬ КАК ФОРМУ КОМЕНТОВ ВСЕ ДОБАВЛЕННЫЕ ТУТ)) </body></html>   


Далее создаем .js файл с именем elastic-textarea внутри пишем(код немой брал с сайта)поэтому коменты нерусские а английский я не так хорошо знаю) :D

Код: Выделить всё

function elasticTextArea (elementId){     /*     * This are two helper functions, they are delcared here for convinience     * so we can get and set all styles at once and because they are not available in ext-core     * only in ExtJs     */         //available in extjs (not ext-core) as element.getStyles    function getStyles(el, arguments){        var ret = {};        total = arguments.length ;        for (var n=0; n<total; n++ )           ret[ arguments[n] ] = el.getStyle(arguments[n]);         return ret;    }        //available in extjs (not ext-core) as Ext.Domhelper.applyStyles    function applyStyles  (el, styles){        if(styles){            var i = 0,                len,                style;                             el = Ext.fly(el);                               if(Ext.isFunction(styles)) {                styles = styles.call();            }            if (typeof styles == "string") {                styles = styles.split(/:|;/g);                for (len = styles.length; i < len;) {                    el.setStyle(styles[i++], styles[i++]);                  }            } else if (Ext.isObject(styles)) {                el.setStyle(styles);            }                   }       }        //minimum and maximum text area size    var minHeight = 10 ;    var maxHeight = 300 ;     //increment value when resizing the text area    var growBy = 20 ;        var el = Ext.get(elementId);  //get text area width    var width = el.getWidth();     //current text area styles    var styles = getStyles(el, ['padding-top', 'padding-bottom', 'padding-left', 'padding-right', 'line-height', 'font-size', 'font-family', 'font-weight', 'font-style']);     //store text area width into styles object to later apply them to the div     styles.width = width +'px' ;        //hide the text area scrool to avoid flickering        el.setStyle('overflow', 'hidden');      //create the hidden div only if does not exists        if(! this.div){             //create the hidden div outside the viewport area            this.div = Ext.DomHelper.append(Ext.getBody() || document.body, {                'id':elementId + '-preview-div'                ,'tag' : 'div'                ,'style' : 'position: absolute; top: -100000px; left: -100000px;'            }, true);             //apply the text area styles to the hidden div            applyStyles(this.div, styles);              //recalculate the div height on each key stroke            el.on('keyup', function() {                elasticTextArea(elementId);            }, this);        }       //clean up text area contents, so that no special chars are processed      //replace \n with <br>  so that the enter key can trigger a height increase      //but first remove all previous entries, so that the height measurement can be as accurate as possible          this.div.update(                   el.dom.value.replace(/<br \/> /, '<br />')                              .replace(/<|>/g, ' ')                              .replace(/&/g,"&")                              .replace(/\n/g, '<br /> ')                   );           //finally get the div height          var textHeight = this.div.getHeight();      //enforce text area maximum and minimum size          if ( (textHeight > maxHeight ) && (maxHeight > 0) ){              textHeight = maxHeight ;              el.setStyle('overflow', 'auto');          }          if ( (textHeight < minHeight ) && (minHeight > 0) ) {              textHeight = minHeight ;          }           //resize the text area          el.setHeight(textHeight + growBy , true);      } 
Ну вот финальная часть создаем папку ext-core и в ней документ ext-core .js :D название тоже как у папки , внутри пишем (незнаю кто пишет такие большие коды)
KIka_kok
FL Team
FL Team
Сообщения: 680
Зарегистрирован: 18 июл 2010, 19:52

Re: Jquery - еластичное txt поле

Сообщение KIka_kok »

Вот он

Код: Выделить всё

window.undefined=window.undefined;Ext={version:"3.0"};Ext.apply=function(d,e,b){if(b){Ext.apply(d,b)}if(d&&e&&typeof e=="object"){for(var a in e){d[a]=e[a]}}return d};(function(){var d=0,r=navigator.userAgent.toLowerCase(),w=function(e){return e.test(r)},k=document.compatMode=="CSS1Compat",y=w(/opera/),g=w(/chrome/),s=w(/webkit/),v=!g&&w(/safari/),a=v&&w(/version\/3/),z=v&&w(/version\/4/),q=!y&&w(/msie/),o=q&&w(/msie 7/),n=q&&w(/msie 8/),p=q&&!o&&!n,m=!s&&w(/gecko/),b=m&&w(/rv:1\.9/),t=q&&!k,x=w(/windows|win32/),j=w(/macintosh|mac os x/),h=w(/adobeair/),l=w(/linux/),c=/^https/i.test(window.location.protocol);if(p){try{document.execCommand("BackgroundImageCache",false,true)}catch(u){}}Ext.apply(Ext,{isStrict:k,isSecure:c,isReady:false,enableGarbageCollector:true,enableListenerCollection:false,USE_NATIVE_JSON:false,applyIf:function(A,B){if(A){for(var e in B){if(Ext.isEmpty(A[e])){A[e]=B[e]}}}return A},id:function(e,A){return(e=Ext.getDom(e)||{}).id=e.id||(A||"ext-gen")+(++d)},extend:function(){var A=function(C){for(var B in C){this[B]=C[B]}};var e=Object.prototype.constructor;return function(H,D,G){if(Ext.isObject(D)){G=D;D=H;H=G.constructor!=e?G.constructor:function(){D.apply(this,arguments)}}var C=function(){},E,B=D.prototype;C.prototype=B;E=H.prototype=new C();E.constructor=H;H.superclass=B;if(B.constructor==e){B.constructor=D}H.override=function(F){Ext.override(H,F)};E.superclass=E.supr=(function(){return B});E.override=A;Ext.override(H,G);H.extend=function(F){Ext.extend(H,F)};return H}}(),override:function(e,B){if(B){var A=e.prototype;Ext.apply(A,B);if(Ext.isIE&&B.toString!=e.toString){A.toString=B.toString}}},namespace:function(){var A,e;Ext.each(arguments,function(B){e=B.split(".");A=window[e[0]]=window[e[0]]||{};Ext.each(e.slice(1),function(C){A=A[C]=A[C]||{}})});return A},urlEncode:function(F,E){var C,A=[],B,D=encodeURIComponent;for(B in F){C=typeof F[B]=="undefined";Ext.each(C?B:F[B],function(G,e){A.push("&",D(B),"=",(G!=B||!C)?D(G):"")})}if(!E){A.shift();E=""}return E+A.join("")},urlDecode:function(B,A){var E={},D=B.split("&"),F=decodeURIComponent,e,C;Ext.each(D,function(G){G=G.split("=");e=F(G[0]);C=F(G[1]);E[e]=A||!E[e]?C:[].concat(E[e]).concat(C)});return E},toArray:function(){return q?function(e,C,A,B){B=[];Ext.each(e,function(D){B.push(D)});return B.slice(C||0,A||B.length)}:function(e,B,A){return Array.prototype.slice.call(e,B||0,A||e.length)}}(),each:function(D,C,B){if(Ext.isEmpty(D,true)){return}if(typeof D.length=="undefined"||Ext.isPrimitive(D)){D=[D]}for(var A=0,e=D.length;A<e;A++){if(C.call(B||D[A],D[A],A,D)===false){return A}}},getDom:function(e){if(!e||!document){return null}return e.dom?e.dom:(typeof e=="string"?document.getElementById(e):e)},getBody:function(){return Ext.get(document.body||document.documentElement)},removeNode:q?function(){var e;return function(A){if(A&&A.tagName!="BODY"){e=e||document.createElement("div");e.appendChild(A);e.innerHTML=""}}}():function(e){if(e&&e.parentNode&&e.tagName!="BODY"){e.parentNode.removeChild(e)}},isEmpty:function(A,e){return A===null||A===undefined||((Ext.isArray(A)&&!A.length))||(!e?A==="":false)},isArray:function(e){return Object.prototype.toString.apply(e)==="[object Array]"},isObject:function(e){return e&&typeof e=="object"},isPrimitive:function(e){var A=typeof e;return A=="string"||A=="number"||A=="boolean"},isFunction:function(e){return typeof e=="function"},isOpera:y,isWebKit:s,isChrome:g,isSafari:v,isSafari3:a,isSafari4:z,isSafari2:v&&!(a||z),isIE:q,isIE6:p,isIE7:o,isIE8:n,isGecko:m,isGecko2:m&&!b,isGecko3:b,isBorderBox:t,isLinux:l,isWindows:x,isMac:j,isAir:h});Ext.ns=Ext.namespace})();Ext.ns("Ext","Ext.util","Ext.lib","Ext.data");Ext.apply(Function.prototype,{createInterceptor:function(b,a){var c=this;return !Ext.isFunction(b)?this:function(){var e=this,d=arguments;b.target=e;b.method=c;return(b.apply(a||e||window,d)!==false)?c.apply(e||window,d):null}},createCallback:function(){var a=arguments,b=this;return function(){return b.apply(window,a)}},createDelegate:function(c,b,a){var d=this;return function(){var g=b||arguments;if(a===true){g=Array.prototype.slice.call(arguments,0);g=g.concat(b)}else{if(typeof a=="number"){g=Array.prototype.slice.call(arguments,0);var e=[a,0].concat(b);Array.prototype.splice.apply(g,e)}}return d.apply(c||window,g)}},defer:function(c,e,b,a){var d=this.createDelegate(e,b,a);if(c>0){return setTimeout(d,c)}d();return 0}});Ext.applyIf(String,{format:function(b){var a=Ext.toArray(arguments,1);return b.replace(/\{(\d+)\}/g,function(c,d){return a[d]})}});Ext.applyIf(Array.prototype,{indexOf:function(c){for(var b=0,a=this.length;b<a;b++){if(this[b]==c){return b}}return -1},remove:function(b){var a=this.indexOf(b);if(a!=-1){this.splice(a,1)}return this}});Ext.util.TaskRunner=function(e){e=e||10;var g=[],a=[],b=0,h=false,d=function(){h=false;clearInterval(b);b=0},j=function(){if(!h){h=true;b=setInterval(k,e)}},c=function(l){a.push(l);if(l.onStop){l.onStop.apply(l.scope||l)}},k=function(){var n=a.length,p=new Date().getTime();if(n>0){for(var r=0;r<n;r++){g.remove(a[r])}a=[];if(g.length<1){d();return}}for(var r=0,q,m,o,l=g.length;r<l;++r){q=g[r];m=p-q.taskRunTime;if(q.interval<=m){o=q.run.apply(q.scope||q,q.args||[++q.taskRunCount]);q.taskRunTime=p;if(o===false||q.taskRunCount===q.repeat){c(q);return}}if(q.duration&&q.duration<=(p-q.taskStartTime)){c(q)}}};this.start=function(l){g.push(l);l.taskStartTime=new Date().getTime();l.taskRunTime=0;l.taskRunCount=0;j();return l};this.stop=function(l){c(l);return l};this.stopAll=function(){d();for(var m=0,l=g.length;m<l;m++){if(g[m].onStop){g[m].onStop()}}g=[];a=[]}};Ext.TaskMgr=new Ext.util.TaskRunner();(function(){var b;function c(d){if(!b){b=new Ext.Element.Flyweight()}b.dom=d;return b}(function(){var g=document,d=g.compatMode=="CSS1Compat",e=Math.max,h=parseInt;Ext.lib.Dom={isAncestor:function(k,l){var j=false;k=Ext.getDom(k);l=Ext.getDom(l);if(k&&l){if(k.contains){return k.contains(l)}else{if(k.compareDocumentPosition){return !!(k.compareDocumentPosition(l)&16)}else{while(l=l.parentNode){j=l==k||j}}}}return j},getViewWidth:function(j){return j?this.getDocumentWidth():this.getViewportWidth()},getViewHeight:function(j){return j?this.getDocumentHeight():this.getViewportHeight()},getDocumentHeight:function(){return e(!d?g.body.scrollHeight:g.documentElement.scrollHeight,this.getViewportHeight())},getDocumentWidth:function(){return e(!d?g.body.scrollWidth:g.documentElement.scrollWidth,this.getViewportWidth())},getViewportHeight:function(){return Ext.isIE?(Ext.isStrict?g.documentElement.clientHeight:g.body.clientHeight):self.innerHeight},getViewportWidth:function(){return !Ext.isStrict&&!Ext.isOpera?g.body.clientWidth:Ext.isIE?g.documentElement.clientWidth:self.innerWidth},getY:function(j){return this.getXY(j)[1]},getX:function(j){return this.getXY(j)[0]},getXY:function(l){var k,r,t,w,m,n,v=0,s=0,u,j,o=(g.body||g.documentElement),q=[0,0];l=Ext.getDom(l);if(l!=o){if(l.getBoundingClientRect){t=l.getBoundingClientRect();u=c(document).getScroll();q=[t.left+u.left,t.top+u.top]}else{k=l;j=c(l).isStyle("position","absolute");while(k){r=c(k);v+=k.offsetLeft;s+=k.offsetTop;j=j||r.isStyle("position","absolute");if(Ext.isGecko){s+=w=h(r.getStyle("borderTopWidth"),10)||0;v+=m=h(r.getStyle("borderLeftWidth"),10)||0;if(k!=l&&!r.isStyle("overflow","visible")){v+=m;s+=w}}k=k.offsetParent}if(Ext.isSafari&&j){v-=o.offsetLeft;s-=o.offsetTop}if(Ext.isGecko&&!j){n=c(o);v+=h(n.getStyle("borderLeftWidth"),10)||0;s+=h(n.getStyle("borderTopWidth"),10)||0}k=l.parentNode;while(k&&k!=o){if(!Ext.isOpera||(k.tagName!="TR"&&!c(k).isStyle("display","inline"))){v-=k.scrollLeft;s-=k.scrollTop}k=k.parentNode}q=[v,s]}}return q},setXY:function(k,l){(k=Ext.fly(k,"_setXY")).position();var m=k.translatePoints(l),j=k.dom.style,n;for(n in m){if(!isNaN(m[n])){j[n]=m[n]+"px"}}},setX:function(k,j){this.setXY(k,[j,false])},setY:function(j,k){this.setXY(j,[false,k])}}})();Ext.lib.Event=function(){var x=false,v=[],g=[],B=0,r=[],d,E=false,l=window,H=document,m=200,t=20,C=0,s=1,j=2,n=3,u=3,y=4,e=function(){var I;if(l.addEventListener){I=function(M,K,L,J){if(K=="mouseenter"){L=L.createInterceptor(p);M.addEventListener("mouseover",L,(J))}else{if(K=="mouseleave"){L=L.createInterceptor(p);M.addEventListener("mouseout",L,(J))}else{M.addEventListener(K,L,(J))}}return L}}else{if(l.attachEvent){I=function(M,K,L,J){M.attachEvent("on"+K,L);return L}}else{I=function(){}}}return I}(),h=function(){var I;if(l.removeEventListener){I=function(M,K,L,J){if(K=="mouseenter"){K="mouseover"}else{if(K=="mouseleave"){K="mouseout"}}M.removeEventListener(K,L,(J))}}else{if(l.detachEvent){I=function(L,J,K){L.detachEvent("on"+J,K)}}else{I=function(){}}}return I}();var D=Ext.isGecko?function(I){return Object.prototype.toString.call(I)=="[object XULElement]"}:function(){};var q=Ext.isGecko?function(I){try{return I.nodeType==3}catch(J){return false}}:function(I){return I.nodeType==3};function p(J){var I=z.getRelatedTarget(J);return !(D(I)||w(J.currentTarget,I))}function w(I,K){if(I&&I.firstChild){while(K){if(K===I){return true}try{K=K.parentNode}catch(J){return false}if(K&&(K.nodeType!=1)){K=null}}}return false}function A(L,I,K){var J=-1;Ext.each(v,function(M,N){if(M&&M[j]==K&&M[C]==L&&M[s]==I){J=N}});return J}function F(){var I=false,L=[],J,K=!x||(B>0);if(!E){E=true;Ext.each(r,function(N,O,M){if(N&&(J=H.getElementById(N.id))){if(!N.checkReady||x||J.nextSibling||(H&&H.body)){J=N.override?(N.override===true?N.obj:N.override):J;N.fn.call(J,N.obj);r[O]=null}else{L.push(item)}}});B=(L.length==0)?0:B-1;if(K){o()}else{clearInterval(d);d=null}I=!(E=false)}return I}function o(){if(!d){var I=function(){F()};d=setInterval(I,t)}}function G(){var I=Ext.fly(H).getScroll();return[I.top,I.top]}function k(I,J){I=I.browserEvent||I;var K=I["page"+J];if(!K&&0!=K){K=I["client"+J]||0;if(Ext.isIE){K+=G()[J=="X"?0:1]}}return K}var z={onAvailable:function(K,I,L,J){r.push({id:K,fn:I,obj:L,override:J,checkReady:false});B=m;o()},addListener:function(L,I,K){var J;L=Ext.getDom(L);if(L&&K){if("unload"==I){J=!!(g[g.length]=[L,I,K])}else{v.push([L,I,K,J=e(L,I,K,false)])}}return !!J},removeListener:function(N,J,M){var L=false,K,I;N=Ext.getDom(N);if(!M){L=this.purgeElement(N,false,J)}else{if("unload"==J){Ext.each(g,function(P,Q,O){if(P&&P[0]==N&&P[1]==J&&P[2]==M){g.splice(Q,1);L=true}})}else{K=arguments[3]||A(N,J,M);I=v[K];if(N&&I){h(N,J,I[n],false);I[n]=I[j]=null;v.splice(K,1);L=true}}}return L},getTarget:function(I){I=I.browserEvent||I;return this.resolveTextNode(I.target||I.srcElement)},resolveTextNode:function(I){return I&&!D(I)&&q(I)?I.parentNode:I},getRelatedTarget:function(I){I=I.browserEvent||I;return this.resolveTextNode(I.relatedTarget||(I.type=="mouseout"?I.toElement:I.type=="mouseover"?I.fromElement:null))},getPageX:function(I){return k(I,"X")},getPageY:function(I){return k(I,"Y")},getXY:function(I){return[this.getPageX(I),this.getPageY(I)]},stopEvent:function(I){this.stopPropagation(I);this.preventDefault(I)},stopPropagation:function(I){I=I.browserEvent||I;if(I.stopPropagation){I.stopPropagation()}else{I.cancelBubble=true}},preventDefault:function(I){I=I.browserEvent||I;if(I.preventDefault){I.preventDefault()}else{I.returnValue=false}},getEvent:function(I){I=I||l.event;if(!I){var J=this.getEvent.caller;while(J){I=J.arguments[0];if(I&&Event==I.constructor){break}J=J.caller}}return I},getCharCode:function(I){I=I.browserEvent||I;return I.charCode||I.keyCode||0},_load:function(J){x=true;var I=Ext.lib.Event;if(Ext.isIE&&J!==true){h(l,"load",arguments.callee)}},purgeElement:function(J,L,I){var K=this;Ext.each(K.getListeners(J,I),function(M){if(M){K.removeListener(J,M.type,M.fn)}});if(L&&J&&J.childNodes){Ext.each(J.childNodes,function(M){K.purgeElement(M,L,I)})}},getListeners:function(L,J){var M=this,K=[],I;if(J){I=J=="unload"?g:v}else{I=v.concat(g)}Ext.each(I,function(N,O){if(N&&N[C]==L&&(!J||J==N[s])){K.push({type:N[s],fn:N[j],obj:N[u],adjust:N[y],index:O})}});return K.length?K:null},_unload:function(P){var O=Ext.lib.Event,M,L,J,I,K,N;Ext.each(g,function(Q){if(Q){try{N=Q[y]?(Q[y]===true?Q[u]:Q[y]):l;Q[j].call(N,O.getEvent(R),Q[u])}catch(R){}}});g=null;if(v&&(L=v.length)){while(L){if(J=v[K=--L]){O.removeListener(J[C],J[s],J[j],K)}}}h(l,"unload",O._unload)}};z.on=z.addListener;z.un=z.removeListener;if(H&&H.body){z._load(true)}else{e(l,"load",z._load)}e(l,"unload",z._unload);F();return z}();Ext.lib.Ajax=function(){var g=["MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];function h(t){var s=t.conn,u;function r(v,w){for(u in w){if(w.hasOwnProperty(u)){v.setRequestHeader(u,w[u])}}}if(l.defaultHeaders){r(s,l.defaultHeaders)}if(l.headers){r(s,l.headers);l.headers=null}}function d(u,t,s,r){return{tId:u,status:s?-1:0,statusText:s?"transaction aborted":"communication failure",isAbort:true,isTimeout:true,argument:t}}function k(r,s){(l.headers=l.headers||{})[r]=s}function p(w,u){var r={},s,t=w.conn;try{s=w.conn.getAllResponseHeaders();Ext.each(s.split("\n"),function(x){var y=x.indexOf(":");r[x.substr(0,y)]=x.substr(y+1)})}catch(v){}return{tId:w.tId,status:t.status,statusText:t.statusText,getResponseHeader:function(x){return r[x]},getAllResponseHeaders:function(){return s},responseText:t.responseText,responseXML:t.responseXML,argument:u}}function o(r){r.conn=null;r=null}function e(w,x,s,r){if(!x){o(w);return}var u,t;try{if(w.conn.status!==undefined&&w.conn.status!=0){u=w.conn.status}else{u=13030}}catch(v){u=13030}if((u>=200&&u<300)||(Ext.isIE&&u==1223)){t=p(w,x.argument);if(x.success){if(!x.scope){x.success(t)}else{x.success.apply(x.scope,[t])}}}else{switch(u){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:t=d(w.tId,x.argument,(s?s:false),r);if(x.failure){if(!x.scope){x.failure(t)}else{x.failure.apply(x.scope,[t])}}break;default:t=p(w,x.argument);if(x.failure){if(!x.scope){x.failure(t)}else{x.failure.apply(x.scope,[t])}}}}o(w);t=null}function n(t,w){w=w||{};var r=t.conn,v=t.tId,s=l.poll,u=w.timeout||null;if(u){l.timeout[v]=setTimeout(function(){l.abort(t,w,true)},u)}s[v]=setInterval(function(){if(r&&r.readyState==4){clearInterval(s[v]);s[v]=null;if(u){clearTimeout(l.timeout[v]);l.timeout[v]=null}e(t,w)}},l.pollInterval)}function j(v,s,u,r){var t=m()||null;if(t){t.conn.open(v,s,true);if(l.useDefaultXhrHeader){k("X-Requested-With",l.defaultXhrHeader)}if(r&&l.useDefaultHeader&&(!l.headers||!l.headers["Content-Type"])){k("Content-Type",l.defaultPostHeader)}if(l.defaultHeaders||l.headers){h(t)}n(t,u);t.conn.send(r||null)}return t}function m(){var s;try{if(s=q(l.transactionId)){l.transactionId++}}catch(r){}finally{return s}}function q(u){var r;try{r=new XMLHttpRequest()}catch(t){for(var s=0;s<g.length;++s){try{r=new ActiveXObject(g[s]);break}catch(t){}}}finally{return{conn:r,tId:u}}}var l={request:function(y,w,r,x,s){if(s){var v=this,u=s.xmlData,t=s.jsonData;Ext.applyIf(v,s);if(u||t){k("Content-Type",u?"text/xml":"application/json");x=u||(Ext.isObject(t)?Ext.encode(t):t)}}return j(y||s.method||"POST",w,r,x)},serializeForm:function(s){var t=s.elements||(document.forms[s]||Ext.getDom(s)).elements,z=false,y=encodeURIComponent,w,A,r,u,v="",x;Ext.each(t,function(B){r=B.name;x=B.type;if(!B.disabled&&r){if(/select-(one|multiple)/i.test(x)){Ext.each(B.options,function(C){if(C.selected){v+=String.format("{0}={1}&",y(r),(C.hasAttribute?C.hasAttribute("value"):C.getAttribute("value")!==null)?C.value:C.text)}})}else{if(!/file|undefined|reset|button/i.test(x)){if(!(/radio|checkbox/i.test(x)&&!B.checked)&&!(x=="submit"&&z)){v+=y(r)+"="+y(B.value)+"&";z=/submit/i.test(x)}}}}});return v.substr(0,v.length-1)},useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded; charset=UTF-8",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",poll:{},timeout:{},pollInterval:50,transactionId:0,abort:function(u,w,r){var t=this,v=u.tId,s=false;if(t.isCallInProgress(u)){u.conn.abort();clearInterval(t.poll[v]);t.poll[v]=null;if(r){t.timeout[v]=null}e(u,w,(s=true),r)}return s},isCallInProgress:function(r){return r.conn&&!{0:true,4:true}[r.conn.readyState]}};return l}();(function(){var h=Ext.lib,k=/width|height|opacity|padding/i,g=/^((width|height)|(top|left))$/,d=/width|height|top$|bottom$|left$|right$/i,j=/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i,l=function(m){return typeof m!=="undefined"},e=function(){return new Date()};h.Anim={motion:function(p,n,q,r,m,o){return this.run(p,n,q,r,m,o,Ext.lib.Motion)},run:function(q,n,s,t,m,p,o){o=o||Ext.lib.AnimBase;if(typeof t=="string"){t=Ext.lib.Easing[t]}var r=new o(q,n,s,t);r.animateX(function(){if(Ext.isFunction(m)){m.call(p)}});return r}};h.AnimBase=function(n,m,o,p){if(n){this.init(n,m,o,p)}};h.AnimBase.prototype={doMethod:function(m,p,n){var o=this;return o.method(o.curFrame,p,n-p,o.totalFrames)},setAttr:function(m,o,n){if(k.test(m)&&o<0){o=0}Ext.fly(this.el,"_anim").setStyle(m,o+n)},getAttr:function(m){var o=Ext.fly(this.el),p=o.getStyle(m),n=g.exec(m)||[];if(p!=="auto"&&!j.test(p)){return parseFloat(p)}return(!!(n[2])||(o.getStyle("position")=="absolute"&&!!(n[3])))?o.dom["offset"+n[0].charAt(0).toUpperCase()+n[0].substr(1)]:0},getDefaultUnit:function(m){return d.test(m)?"px":""},animateX:function(p,m){var n=this,o=function(){n.onComplete.removeListener(o);if(Ext.isFunction(p)){p.call(m||n,n)}};n.onComplete.addListener(o,n);n.animate()},setRunAttr:function(p){var r=this,s=this.attributes[p],t=s.to,q=s.by,u=s.from,v=s.unit,n=(this.runAttrs[p]={}),o;if(!l(t)&&!l(q)){return false}var m=l(u)?u:r.getAttr(p);if(l(t)){o=t}else{if(l(q)){if(Ext.isArray(m)){o=[];Ext.each(m,function(w,x){o[x]=w+q[x]})}else{o=m+q}}}Ext.apply(n,{start:m,end:o,unit:l(v)?v:r.getDefaultUnit(p)})},init:function(n,r,q,m){var t=this,p=0,u=h.AnimMgr;Ext.apply(t,{isAnimated:false,startTime:null,el:Ext.getDom(n),attributes:r||{},duration:q||1,method:m||h.Easing.easeNone,useSec:true,curFrame:0,totalFrames:u.fps,runAttrs:{},animate:function(){var w=this,x=w.duration;if(w.isAnimated){return false}w.curFrame=0;w.totalFrames=w.useSec?Math.ceil(u.fps*x):x;u.registerElement(w)},stop:function(w){var x=this;if(w){x.curFrame=x.totalFrames;x._onTween.fire()}u.stop(x)}});var v=function(){var x=this,w;x.onStart.fire();x.runAttrs={};for(w in this.attributes){this.setRunAttr(w)}x.isAnimated=true;x.startTime=e();p=0};var s=function(){var x=this;x.onTween.fire({duration:e()-x.startTime,curFrame:x.curFrame});var y=x.runAttrs;for(var w in y){this.setAttr(w,x.doMethod(w,y[w].start,y[w].end),y[w].unit)}++p};var o=function(){var w=this,y=(e()-w.startTime)/1000,x={duration:y,frames:p,fps:p/y};w.isAnimated=false;p=0;w.onComplete.fire(x)};t.onStart=new Ext.util.Event(t);t.onTween=new Ext.util.Event(t);t.onComplete=new Ext.util.Event(t);(t._onStart=new Ext.util.Event(t)).addListener(v);(t._onTween=new Ext.util.Event(t)).addListener(s);(t._onComplete=new Ext.util.Event(t)).addListener(o)}};Ext.lib.AnimMgr=new function(){var q=this,o=null,n=[],m=0;Ext.apply(q,{fps:1000,delay:1,registerElement:function(s){n.push(s);++m;s._onStart.fire();q.start()},unRegister:function(t,s){t._onComplete.fire();s=s||r(t);if(s!=-1){n.splice(s,1)}if(--m<=0){q.stop()}},start:function(){if(o===null){o=setInterval(q.run,q.delay)}},stop:function(u){if(!u){clearInterval(o);for(var t=0,s=n.length;t<s;++t){if(n[0].isAnimated){q.unRegister(n[0],0)}}n=[];o=null;m=0}else{q.unRegister(u)}},run:function(){var s;Ext.each(n,function(t){if(t&&t.isAnimated){s=t.totalFrames;if(t.curFrame<s||s===null){++t.curFrame;if(t.useSec){p(t)}t._onTween.fire()}else{q.stop(t)}}},q)}});var r=function(t){var s=-1;Ext.each(n,function(v,u){if(v==t){s=u;return false}});return s};var p=function(t){var x=t.totalFrames,w=t.curFrame,v=t.duration,u=(w*v*1000/x),s=(e()-t.startTime),y=0;if(s<v*1000){y=Math.round((s/u-1)*w)}else{y=x-(w+1)}if(y>0&&isFinite(y)){if(t.curFrame+y>=x){y=x-(w+1)}t.curFrame+=y}}};h.Bezier=new function(){this.getPosition=function(r,q){var u=r.length,p=[],s=1-q,o,m;for(o=0;o<u;++o){p[o]=[r[o][0],r[o][1]]}for(m=1;m<u;++m){for(o=0;o<u-m;++o){p[o][0]=s*p[o][0]+q*p[parseInt(o+1,10)][0];p[o][1]=s*p[o][1]+q*p[parseInt(o+1,10)][1]}}return[p[0][0],p[0][1]]}};h.Easing={easeNone:function(n,m,p,o){return p*n/o+m},easeIn:function(n,m,p,o){return p*(n/=o)*n+m},easeOut:function(n,m,p,o){return -p*(n/=o)*(n-2)+m}};(function(){h.Motion=function(r,q,s,t){if(r){h.Motion.superclass.constructor.call(this,r,q,s,t)}};Ext.extend(h.Motion,Ext.lib.AnimBase);var p=h.Motion.superclass,o=h.Motion.prototype,n=/^points$/i;Ext.apply(h.Motion.prototype,{setAttr:function(q,u,t){var s=this,r=p.setAttr;if(n.test(q)){t=t||"px";r.call(s,"left",u[0],t);r.call(s,"top",u[1],t)}else{r.call(s,q,u,t)}},getAttr:function(q){var s=this,r=p.getAttr;return n.test(q)?[r.call(s,"left"),r.call(s,"top")]:r.call(s,q)},doMethod:function(q,t,r){var s=this;return n.test(q)?h.Bezier.getPosition(s.runAttrs[q],s.method(s.curFrame,0,100,s.totalFrames)/100):p.doMethod.call(s,q,t,r)},setRunAttr:function(x){if(n.test(x)){var z=this,s=this.el,C=this.attributes.points,v=C.control||[],A=C.from,B=C.to,y=C.by,D=h.Dom,r,u,t,w,q;if(v.length>0&&!Ext.isArray(v[0])){v=[v]}else{}Ext.fly(s,"_anim").position();D.setXY(s,l(A)?A:D.getXY(s));r=z.getAttr("points");if(l(B)){t=m.call(z,B,r);for(u=0,w=v.length;u<w;++u){v[u]=m.call(z,v[u],r)}}else{if(l(y)){t=[r[0]+y[0],r[1]+y[1]];for(u=0,w=v.length;u<w;++u){v[u]=[r[0]+v[u][0],r[1]+v[u][1]]}}}q=this.runAttrs[x]=[r];if(v.length>0){q=q.concat(v)}q[q.length]=t}else{p.setRunAttr.call(this,x)}}});var m=function(q,s){var r=h.Dom.getXY(this.el);return[q[0]-r[0]+s[0],q[1]-r[1]+s[1]]}})()})();(function()
KIka_kok
FL Team
FL Team
Сообщения: 680
Зарегистрирован: 18 июл 2010, 19:52

Re: Jquery - еластичное txt поле

Сообщение KIka_kok »

2я часть этого же кода пишем туда же

Код: Выделить всё

{var d=Math.abs,k=Math.PI,j=Math.asin,h=Math.pow,e=Math.sin,g=Ext.lib;Ext.apply(g.Easing,{easeBoth:function(m,l,o,n){return((m/=n/2)<1)?o/2*m*m+l:-o/2*((--m)*(m-2)-1)+l},easeInStrong:function(m,l,o,n){return o*(m/=n)*m*m*m+l},easeOutStrong:function(m,l,o,n){return -o*((m=m/n-1)*m*m*m-1)+l},easeBothStrong:function(m,l,o,n){return((m/=n/2)<1)?o/2*m*m*m*m+l:-o/2*((m-=2)*m*m*m-2)+l},elasticIn:function(n,l,u,r,m,q){if(n==0||(n/=r)==1){return n==0?l:l+u}q=q||(r*0.3);var o;if(m>=d(u)){o=q/(2*k)*j(u/m)}else{m=u;o=q/4}return -(m*h(2,10*(n-=1))*e((n*r-o)*(2*k)/q))+l},elasticOut:function(n,l,u,r,m,q){if(n==0||(n/=r)==1){return n==0?l:l+u}q=q||(r*0.3);var o;if(m>=d(u)){o=q/(2*k)*j(u/m)}else{m=u;o=q/4}return m*h(2,-10*n)*e((n*r-o)*(2*k)/q)+u+l},elasticBoth:function(n,l,u,r,m,q){if(n==0||(n/=r/2)==2){return n==0?l:l+u}q=q||(r*(0.3*1.5));var o;if(m>=d(u)){o=q/(2*k)*j(u/m)}else{m=u;o=q/4}return n<1?-0.5*(m*h(2,10*(n-=1))*e((n*r-o)*(2*k)/q))+l:m*h(2,-10*(n-=1))*e((n*r-o)*(2*k)/q)*0.5+u+l},backIn:function(m,l,p,o,n){n=n||1.70158;return p*(m/=o)*m*((n+1)*m-n)+l},backOut:function(m,l,p,o,n){if(!n){n=1.70158}return p*((m=m/o-1)*m*((n+1)*m+n)+1)+l},backBoth:function(m,l,p,o,n){n=n||1.70158;return((m/=o/2)<1)?p/2*(m*m*(((n*=(1.525))+1)*m-n))+l:p/2*((m-=2)*m*(((n*=(1.525))+1)*m+n)+2)+l},bounceIn:function(m,l,o,n){return o-g.Easing.bounceOut(n-m,0,o,n)+l},bounceOut:function(m,l,o,n){if((m/=n)<(1/2.75)){return o*(7.5625*m*m)+l}else{if(m<(2/2.75)){return o*(7.5625*(m-=(1.5/2.75))*m+0.75)+l}else{if(m<(2.5/2.75)){return o*(7.5625*(m-=(2.25/2.75))*m+0.9375)+l}}}return o*(7.5625*(m-=(2.625/2.75))*m+0.984375)+l},bounceBoth:function(m,l,o,n){return(m<n/2)?g.Easing.bounceIn(m*2,0,o,n)*0.5+l:g.Easing.bounceOut(m*2-n,0,o,n)*0.5+o*0.5+l}})})();(function(){var j=Ext.lib;j.Anim.color=function(r,p,s,t,o,q){return j.Anim.run(r,p,s,t,o,q,j.ColorAnim)};j.ColorAnim=function(p,o,q,r){j.ColorAnim.superclass.constructor.call(this,p,o,q,r)};Ext.extend(j.ColorAnim,j.AnimBase);var l=j.ColorAnim.superclass,k=/color$/i,g=/^transparent|rgba\(0, 0, 0, 0\)$/,n=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,d=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,e=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i,h=function(o){return typeof o!=="undefined"};function m(p){var r=parseInt,q,o=null,t;if(p.length==3){return p}Ext.each([d,n,e],function(u,s){q=(s%2==0)?16:10;t=u.exec(p);if(t&&t.length==4){o=[r(t[1],q),r(t[2],q),r(t[3],q)];return false}});return o}Ext.apply(j.ColorAnim.prototype,{getAttr:function(o){var q=this,p=q.el,r;if(k.test(o)){while(p&&g.test(r=Ext.fly(p).getStyle(o))){p=p.parentNode;r="fff"}}else{r=l.getAttr.call(q,o)}return r},doMethod:function(o,t,p){var r=this,s,q=Math.floor;if(k.test(o)){s=[];Ext.each(t,function(u,w){s[w]=l.doMethod.call(r,o,u,p[w])});s="rgb("+q(s[0])+","+q(s[1])+","+q(s[2])+")"}else{s=l.doMethod.call(r,o,t,p)}return s},setRunAttr:function(o){var r=this,q=r.attributes[o],v=q.to,s=q.by,t;l.setRunAttr.call(r,o);t=r.runAttrs[o];if(k.test(o)){var u=m(t.start),p=m(t.end);if(!h(v)&&h(s)){p=m(s);Ext.each(u,function(x,w){p[i]=x+p[i]})}t.start=u;t.end=p}}})})();(function(){var d=Ext.lib;d.Anim.scroll=function(l,j,m,n,h,k){return d.Anim.run(l,j,m,n,h,k,d.Scroll)};d.Scroll=function(j,h,k,l){if(j){d.Scroll.superclass.constructor.call(this,j,h,k,l)}};Ext.extend(d.Scroll,d.ColorAnim);var g=d.Scroll.superclass,e="scroll";Ext.apply(d.Scroll.prototype,{doMethod:function(h,o,j){var m,l=this,n=l.curFrame,k=l.totalFrames;if(h==e){m=[l.method(n,o[0],j[0]-o[0],k),l.method(n,o[1],j[1]-o[1],k)]}else{m=g.doMethod.call(l,h,o,j)}return m},getAttr:function(h){var j=this;if(h==e){return[j.el.scrollLeft,j.el.scrollTop]}else{return g.getAttr.call(j,h)}},setAttr:function(h,l,k){var j=this;if(h==e){j.el.scrollLeft=l[0];j.el.scrollTop=l[1]}else{g.setAttr.call(j,h,l,k)}}})})();if(Ext.isIE){function a(){var d=Function.prototype;delete d.createSequence;delete d.defer;delete d.createDelegate;delete d.createCallback;delete d.createInterceptor;window.detachEvent("onunload",a)}window.attachEvent("onunload",a)}})();(function(){var j=Ext.util,m=Ext.toArray,l=Ext.each,a=Ext.isObject,h=true,k=false;j.Observable=function(){var n=this,o=n.events;if(n.listeners){n.on(n.listeners);delete n.listeners}n.events=o||{}};j.Observable.prototype=function(){var o=/^(?:scope|delay|buffer|single)$/,n=function(p){return p.toLowerCase()};return{fireEvent:function(){var p=m(arguments),s=n(p[0]),t=this,r=h,v=t.events[s],u,w;if(t.eventsSuspended===h){if(u=t.suspendedEventsQueue){u.push(p)}}else{if(a(v)&&v.bubble){if(v.fire.apply(v,p.slice(1))===k){return k}w=t.getBubbleTarget&&t.getBubbleTarget();if(w&&w.enableBubble){w.enableBubble(s);return w.fireEvent.apply(w,p)}}else{if(a(v)){p.shift();r=v.fire.apply(v,p)}}}return r},addListener:function(r,u,w,q){var t=this,s,x,v,p;if(a(r)){q=r;for(s in q){x=q[s];if(!o.test(s)){t.addListener(s,x.fn||x,x.scope||q.scope,x.fn?x:q)}}}else{r=n(r);p=t.events[r]||h;if(typeof p=="boolean"){t.events[r]=p=new j.Event(t,r)}p.addListener(u,w,a(q)?q:{})}},removeListener:function(p,r,q){var s=this.events[n(p)];if(a(s)){s.removeListener(r,q)}},purgeListeners:function(){var r=this.events,p,q;for(q in r){p=r[q];if(a(p)){p.clearListeners()}}},addEvents:function(q){var p=this;p.events=p.events||{};if(typeof q=="string"){l(arguments,function(r){p.events[r]=p.events[r]||h})}else{Ext.applyIf(p.events,q)}},hasListener:function(p){var q=this.events[p];return a(q)&&q.listeners.length>0},suspendEvents:function(p){this.eventsSuspended=h;if(p){this.suspendedEventsQueue=[]}},resumeEvents:function(){var p=this;p.eventsSuspended=!delete p.suspendedEventQueue;l(p.suspendedEventsQueue,function(q){p.fireEvent.apply(p,q)})}}}();var e=j.Observable.prototype;e.on=e.addListener;e.un=e.removeListener;j.Observable.releaseCapture=function(n){n.fireEvent=e.fireEvent};function g(p,q,n){return function(){if(q.target==arguments[0]){p.apply(n,m(arguments))}}}function c(q,r,p){var n=new j.DelayedTask();return function(){n.delay(r.buffer,q,p,m(arguments))}}function d(p,q,o,n){return function(){q.removeListener(o,n);return p.apply(n,arguments)}}function b(p,q,n){return function(){var o=m(arguments);(function(){p.apply(n,o)}).defer(q.delay||10)}}j.Event=function(o,n){this.name=n;this.obj=o;this.listeners=[]};j.Event.prototype={addListener:function(q,p,o){var r=this,n;p=p||r.obj;if(!r.isListening(q,p)){n=r.createListener(q,p,o);if(r.firing){r.listeners=r.listeners.slice(0)}r.listeners.push(n)}},createListener:function(r,q,s){s=s||{},q=q||this.obj;var n={fn:r,scope:q,options:s},p=r;if(s.target){p=g(p,s,q)}if(s.delay){p=b(p,s,q)}if(s.single){p=d(p,this,r,q)}if(s.buffer){p=c(p,s,q)}n.fireFn=p;return n},findListener:function(q,p){var o,n=-1;l(this.listeners,function(r,s){o=r.scope;if(r.fn==q&&(o==p||o==this.obj)){n=s;return k}},this);return n},isListening:function(o,n){return this.findListener(o,n)!=-1},removeListener:function(q,p){var o,r=this,n=k;if((o=r.findListener(q,p))!=-1){if(r.firing){r.listeners=r.listeners.slice(0)}r.listeners.splice(o,1);n=h}return n},clearListeners:function(){this.listeners=[]},fire:function(){var p=this,o=m(arguments),n=h;l(p.listeners,function(q){p.firing=h;if(q.fireFn.apply(q.scope||p.obj||window,o)===k){return n=p.firing=k}});p.firing=k;return n}}})();Ext.DomHelper=function(){var t=null,k=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,m=/^table|tbody|tr|td$/i,q,n="afterbegin",o="afterend",c="beforebegin",p="beforeend",a="<table>",h="</table>",b=a+"<tbody>",j="</tbody>"+h,l=b+"<tr>",s="</tr>"+j;function g(x,z,y,A,w,u){var v=q.insertHtml(A,Ext.getDom(x),r(z));return y?Ext.get(v,true):v}function r(z){var w="",v,y,x,u,A;if(typeof z=="string"){w=z}else{if(Ext.isArray(z)){Ext.each(z,function(B){w+=r(B)})}else{w+="<"+(z.tag=z.tag||"div");for(v in z){y=z[v];if(!/tag|children|cn|html$/i.test(v)&&!Ext.isFunction(y)){if(Ext.isObject(y)){w+=" "+v+"='";for(x in y){u=y[x];w+=!Ext.isFunction(u)?x+":"+u+";":""}w+="'"}else{w+=" "+({cls:"class",htmlFor:"for"}[v]||v)+"='"+y+"'"}}}if(k.test(z.tag)){w+="/>"}else{w+=">";if(A=z.children||z.cn){w+=r(A)}else{if(z.html){w+=z.html}}w+="</"+z.tag+">"}}}return w}function e(z,x,w,y){t.innerHTML=[x,w,y].join("");var u=-1,v=t;while(++u<z){v=v.firstChild}return v}function d(u,v,x,w){var y,z;t=t||document.createElement("div");if(u=="td"&&(v==n||v==p)||!/td|tr|tbody/i.test(u)&&(v==c||v==o)){return}z=v==c?x:v==o?x.nextSibling:v==n?x.firstChild:null;if(v==c||v==o){x=x.parentNode}if(u=="td"||(u=="tr"&&(v==p||v==n))){y=e(4,l,w,s)}else{if((u=="tbody"&&(v==p||v==n))||(u=="tr"&&(v==c||v==o))){y=e(3,b,w,j)}else{y=e(2,a,w,h)}}x.insertBefore(y,z);return y}q={markup:function(u){return r(u)},insertHtml:function(z,u,A){var y={},w,C,B,D,x,v;z=z.toLowerCase();y[c]=["BeforeBegin","previousSibling"];y[o]=["AfterEnd","nextSibling"];if(u.insertAdjacentHTML){if(m.test(u.tagName)&&(v=d(u.tagName.toLowerCase(),z,u,A))){return v}y[n]=["AfterBegin","firstChild"];y[p]=["BeforeEnd","lastChild"];if(w=y[z]){u.insertAdjacentHTML(w[0],A);return u[w[1]]}}else{B=u.ownerDocument.createRange();C="setStart"+(/end/i.test(z)?"After":"Before");if(y[z]){B[C](u);D=B.createContextualFragment(A);u.parentNode.insertBefore(D,z==c?u:u.nextSibling);return u[(z==c?"previous":"next")+"Sibling"]}else{x=(z==n?"first":"last")+"Child";if(u.firstChild){B[C](u[x]);D=B.createContextualFragment(A);z==n?u.insertBefore(D,u.firstChild):u.appendChild(D)}else{u.innerHTML=A}return u[x]}}throw'Illegal insertion point -> "'+z+'"'},insertBefore:function(u,w,v){return g(u,w,v,c)},insertAfter:function(u,w,v){return g(u,w,v,o,"nextSibling")},insertFirst:function(u,w,v){return g(u,w,v,n,"firstChild")},append:function(u,w,v){return g(u,w,v,p,"",true)},overwrite:function(u,w,v){u=Ext.getDom(u);u.innerHTML=r(w);return v?Ext.get(u.firstChild):u.firstChild},createHtml:r};return q}();Ext.Template=function(d){var e=this,b=arguments,c=[];if(Ext.isArray(d)){d=d.join("")}else{if(b.length>1){Ext.each(b,function(a){if(Ext.isObject(a)){Ext.apply(e,a)}else{c.push(a)}});d=c.join("")}}e.html=d;if(e.compiled){e.compile()}};Ext.Template.prototype={applyTemplate:function(a){var b=this;return b.compiled?b.compiled(a):b.html.replace(b.re,function(c,d){return a[d]!==undefined?a[d]:""})},set:function(a,c){var b=this;b.html=a;b.compiled=null;return c?b.compile():b},re:/\{([\w-]+)\}/g,compile:function(){var me=this,sep=Ext.isGecko?"+":",";function fn(m,name){name="values['"+name+"']";return"'"+sep+"("+name+" == undefined ? '' : "+name+")"+sep+"'"}eval("this.compiled = function(values){ return "+(Ext.isGecko?"'":"['")+me.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn)+(Ext.isGecko?"';};":"'].join('');};"));return me},insertFirst:function(b,a,c){return this.doInsert("afterBegin",b,a,c)},insertBefore:function(b,a,c){return this.doInsert("beforeBegin",b,a,c)},insertAfter:function(b,a,c){return this.doInsert("afterEnd",b,a,c)},append:function(b,a,c){return this.doInsert("beforeEnd",b,a,c)},doInsert:function(c,e,b,a){e=Ext.getDom(e);var d=Ext.DomHelper.insertHtml(c,e,this.applyTemplate(b));return a?Ext.get(d,true):d},overwrite:function(b,a,c){b=Ext.getDom(b);b.innerHTML=this.applyTemplate(a);return c?Ext.get(b.firstChild,true):b.firstChild}};Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;Ext.Template.from=function(b,a){b=Ext.getDom(b);return new Ext.Template(b.value||b.innerHTML,a||"")};Ext.DomQuery=function(){var cache={},simpleCache={},valueCache={},nonSpace=/\S/,trimRe=/^\s+|\s+$/g,tplRe=/\{(\d+)\}/g,modeRe=/^(\s?[\/>+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w-\*]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,isIE=window.ActiveXObject?true:false,isOpera=Ext.isOpera,key=30803;eval("var batch = 30803;");function child(p,index){var i=0,n=p.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(d){var n=d.firstChild,ni=-1,nx;while(n){nx=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){d.removeChild(n)}else{n.nodeIndex=++ni}n=nx}return this}function byClassName(c,a,v){if(!v){return c}var r=[],ri=-1,cn;for(var i=0,ci;ci=c[i];i++){if((" "+ci.className+" ").indexOf(v)!=-1){r[++ri]=ci}}return r}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=isOpera?ni.childNodes:(ni.children||ni.childNodes);for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n}}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i<l;i++){a[a.length]=b[i]}return a}function byTag(cs,tagName){if(cs.tagName||cs==document){cs=[cs]}if(!tagName){return cs}var r=[],ri=-1;tagName=tagName.toLowerCase();for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType==1&&ci.tagName.toLowerCase()==tagName){r[++ri]=ci}}return r}function byId(cs,attr,id){if(cs.tagName||cs==document){cs=[cs]}if(!id){return cs}var r=[],ri=-1;for(var i=0,ci;ci=cs[i];i++){if(ci&&ci.id==id){r[++ri]=ci;return r}}return r}function byAttribute(cs,attr,value,op,custom){var r=[],ri=-1,st=custom=="{",f=Ext.DomQuery.operators[op];for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType!=1){continue}var a;if(st){a=Ext.DomQuery.getStyle(ci,attr)}else{if(attr=="class"||attr=="className"){a=ci.className}else{if(attr=="for"){a=ci.htmlFor}else{if(attr=="href"){a=ci.getAttribute("href",2)}else{a=ci.getAttribute(attr)}}}}if((f&&f(a,value))||(!f&&a)){r[++ri]=ci}}return r}function byPseudo(cs,name,value){return Ext.DomQuery.pseudos[name](cs,value)}function nodupIEXml(cs){var d=++key,r;cs[0].setAttribute("_nodup",d);r=[cs[0]];for(var i=1,len=cs.length;i<len;i++){var c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);r[r.length]=c}}for(var i=0,len=cs.length;i<len;i++){cs[i].removeAttribute("_nodup")}return r}function nodup(cs){if(!cs){return[]}var len=cs.length,c,i,r=cs,cj,ri=-1;if(!len||typeof cs.nodeType!="undefined"||len==1){return cs}if(isIE&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs)}var d=++key;cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d}else{r=[];for(var j=0;j<i;j++){r[++ri]=cs[j]}for(j=i+1;cj=cs[j];j++){if(cj._nodup!=d){cj._nodup=d;r[++ri]=cj}}return r}}return r}function quickDiffIEXml(c1,c2){var d=++key,r=[];for(var i=0,len=c1.length;i<len;i++){c1[i].setAttribute("_qdiff",d)}for(var i=0,len=c2.length;i<len;i++){if(c2[i].getAttribute("_qdiff")!=d){r[r.length]=c2[i]}}for(var i=0,len=c1.length;i<len;i++){c1[i].removeAttribute("_qdiff")}return r}function quickDiff(c1,c2){var len1=c1.length,d=++key,r=[];if(!len1){return c2}if(isIE&&c1[0].selectSingleNode){return quickDiffIEXml(c1,c2)}for(var i=0;i<len1;i++){c1[i]._qdiff=d}for(var i=0,len=c2.length;i<len;i++){if(c2[i]._qdiff!=d){r[r.length]=c2[i]}}return r}function quickId(ns,mode,root,id){if(ns==root){var d=root.ownerDocument||root;return d.getElementById(id)}ns=getNodes(ns,mode,"*");return byId(ns,null,id)}return{getStyle:function(el,name){return Ext.fly(el).getStyle(name)},compile:function(path,type){type=type||"select";var fn=["var f = function(root){\n var mode; ++batch; var n = root || document;\n"],q=path,mode,lq,tk=Ext.DomQuery.matchers,tklen=tk.length,mm,lmode=q.match(modeRe);if(lmode&&lmode[1]){fn[fn.length]='mode="'+lmode[1].replace(trimRe,"")+'";';q=q.replace(lmode[1],"")}while(path.substr(0,1)=="/"){path=path.substr(1)}while(q&&lq!=q){lq=q;var tm=q.match(tagTokenRe);if(type=="select"){if(tm){if(tm[1]=="#"){fn[fn.length]='n = quickId(n, mode, root, "'+tm[2]+'");'}else{fn[fn.length]='n = getNodes(n, mode, "'+tm[2]+'");'}q=q.replace(tm[0],"")}else{if(q.substr(0,1)!="@"){fn[fn.length]='n = getNodes(n, mode, "*");'}}}else{if(tm){if(tm[1]=="#"){fn[fn.length]='n = byId(n, null, "'+tm[2]+'");'}else{fn[fn.length]='n = byTag(n, "'+tm[2]+'");'}q=q.replace(tm[0],"")}}while(!(mm=q.match(modeRe))){var matched=false;for(var j=0;j<tklen;j++){var t=tk[j];var m=q.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(x,i){return m[i]});q=q.replace(m[0],"");matched=true;break}}if(!matched){throw'Error parsing selector, parsing failed at "'+q+'"'}}if(mm[1]){fn[fn.length]='mode="'+mm[1].replace(trimRe,"")+'";';q=q.replace(mm[1],"")}}fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f},select:function(path,root,type){if(!root||root==document){root=document}if(typeof root=="string"){root=document.getElementById(root)}var paths=path.split(","),results=[];for(var i=0,len=paths.length;i<len;i++){var p=paths[i].replace(trimRe,"");if(!cache[p]){cache[p]=Ext.DomQuery.compile(p);if(!cache[p]){throw p+" is not a valid selector"}}var result=cache[p](root);if(result&&result!=document){results=results.concat(result)}}if(paths.length>1){return nodup(results)}return results},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root),v;n=n[0]?n[0]:n;v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el),result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w-]+)/,select:'n = byClassName(n, null, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w-]+)/,select:'n = byId(n, null, "{1}");'},{re:/^@([\w-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery.select;Ext.EventManager=function(){var u,n,k=false,m=Ext.lib.Event,o=Ext.lib.Dom,b=document,v=window,g="ie-deferred-loader",p="DOMContentLoaded",e={},h=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;function l(B,x,A,z,y){var D=Ext.id(B),C=e[D]=e[D]||{};(C[x]=C[x]||[]).push([A,z,y]);m.on(B,x,z);if(x=="mousewheel"&&B.addEventListener){var w=["DOMMouseScroll",z,false];B.addEventListener.apply(B,w);m.on(window,"unload",function(){B.removeEventListener.apply(B,w)})}if(x=="mousedown"&&B==document){Ext.EventManager.stoppedMouseDownEvent.addListener(z)}}function c(){if(!k){Ext.isReady=k=true;if(n){clearInterval(n)}if(Ext.isGecko||Ext.isOpera){b.removeEventListener(p,c,false)}if(Ext.isIE){var w=b.getElementById(g);if(w){w.onreadystatechange=null;w.parentNode.removeChild(w)}}if(u){u.fire();u.clearListeners()}}}function a(){var w="complete";u=new Ext.util.Event();if(Ext.isGecko||Ext.isOpera){b.addEventListener(p,c,false)}else{if(Ext.isIE){b.write("<script id="+g+' defer="defer" src="//:"><\/script>');b.getElementById(g).onreadystatechange=function(){if(this.readyState==w){c()}}}else{if(Ext.isWebKit){n=setInterval(function(){if(b.readyState==w){c()}},10)}}}m.on(v,"load",c)}function s(w,x){return function(){var y=Ext.toArray(arguments);if(x.target==Ext.EventObject.setEvent(y[0]).target){w.apply(this,y)}}}function t(x,y){var w=new Ext.util.DelayedTask(x);return function(z){w.delay(y.buffer,x,null,[new Ext.EventObjectImpl(z)])}}function q(A,z,w,y,x){return function(B){Ext.EventManager.removeListener(z,w,y,x);A(B)}}function d(w,x){return function(y){y=new Ext.EventObjectImpl(y);setTimeout(function(){w(y)},x.delay||10)}}function j(y,x,w,C,B){var D=!Ext.isObject(w)?{}:w,A=Ext.getDom(y);C=C||D.fn;B=B||D.scope;if(!A){throw'Error listening for "'+x+'". Element "'+y+"\" doesn't exist."}function z(F){if(!Ext){return}F=Ext.EventObject.setEvent(F);var E;if(D.delegate){if(!(E=F.getTarget(D.delegate,A))){return}}else{E=F.target}if(D.stopEvent){F.stopEvent()}if(D.preventDefault){F.preventDefault()}if(D.stopPropagation){F.stopPropagation()}if(D.normalized){F=F.browserEvent}C.call(B||A,F,E,D)}if(D.target){z=s(z,D)}if(D.delay){z=d(z,D)}if(D.single){z=q(z,A,x,C,B)}if(D.buffer){z=t(z,D)}l(A,x,C,z,B);return z}var r={addListener:function(y,w,A,z,x){if(Ext.isObject(w)){var D=w,B,C;for(B in D){C=D[B];if(!h.test(B)){if(Ext.isFunction(C)){j(y,B,D,C,D.scope)}else{j(y,B,C)}}}}else{j(y,w,x,A,z)}},removeListener:function(x,w,B,A){var z=Ext.getDom(x),C=Ext.id(z),y;Ext.each((e[C]||{})[w],function(E,F,D){if(Ext.isArray(E)&&E[0]==B&&(!A||E[2]==A)){m.un(z,w,y=E[1]);D.splice(F,1);return false}});if(w=="mousewheel"&&z.addEventListener&&y){z.removeEventListener("DOMMouseScroll",y,false)}if(w=="mousedown"&&z==b&&y){Ext.EventManager.stoppedMouseDownEvent.removeListener(y)}},removeAll:function(x){var z=Ext.id(x=Ext.getDom(x)),y=e[z],w;for(w in y){if(y.hasOwnProperty(w)){Ext.each(y[w],function(A){m.un(x,w,A.wrap)})}}e[z]=null},onDocumentReady:function(y,x,w){if(k){u.addListener(y,x,w);u.fire();u.clearListeners()}else{if(!u){a()}w=w||{};w.delay=w.delay||1;u.addListener(y,x,w)}},elHash:e};r.on=r.addListener;r.un=r.removeListener;r.stoppedMouseDownEvent=new Ext.util.Event();return r}();Ext.onReady=Ext.EventManager.onDocumentReady;(function(){var a=function(){var c=document.body||document.getElementsByTagName("body")[0];if(!c){return false}var b=[" ",Ext.isIE?"ext-ie "+(Ext.isIE6?"ext-ie6":(Ext.isIE7?"ext-ie7":"ext-ie8")):Ext.isGecko?"ext-gecko "+(Ext.isGecko2?"ext-gecko2":"ext-gecko3"):Ext.isOpera?"ext-opera":Ext.isWebKit?"ext-webkit":""];if(Ext.isSafari){b.push("ext-safari "+(Ext.isSafari2?"ext-safari2":(Ext.isSafari3?"ext-safari3":"ext-safari4")))}else{if(Ext.isChrome){b.push("ext-chrome")}}if(Ext.isMac){b.push("ext-mac")}if(Ext.isLinux){b.push("ext-linux")}if(Ext.isBorderBox){b.push("ext-border-box")}if(Ext.isStrict){var d=c.parentNode;if(d){d.className+=" ext-strict"}}c.className+=b.join(" ");return true};if(!a()){Ext.onReady(a)}})();Ext.EventObject=function(){var b=Ext.lib.Event,a={3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35},c=Ext.isIE?{1:0,4:1,2:2}:(Ext.isWebKit?{1:0,2:1,3:2}:{0:0,1:1,2:2});Ext.EventObjectImpl=function(d){if(d){this.setEvent(d.browserEvent||d)}};Ext.EventObjectImpl.prototype={setEvent:function(g){var d=this;if(g==d||(g&&g.browserEvent)){return g}d.browserEvent=g;if(g){d.button=g.button?c[g.button]:(g.which?g.which-1:-1);if(g.type=="click"&&d.button==-1){d.button=0}d.type=g.type;d.shiftKey=g.shiftKey;d.ctrlKey=g.ctrlKey||g.metaKey||false;d.altKey=g.altKey;d.keyCode=g.keyCode;d.charCode=g.charCode;d.target=b.getTarget(g);d.xy=b.getXY(g)}else{d.button=-1;d.shiftKey=false;d.ctrlKey=false;d.altKey=false;d.keyCode=0;d.charCode=0;d.target=null;d.xy=[0,0]}return d},stopEvent:function(){var d=this;if(d.browserEvent){if(d.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(d)}b.stopEvent(d.browserEvent)}},preventDefault:function(){if(this.browserEvent){b.preventDefault(this.browserEvent)}},stopPropagation:function(){var d=this;if(d.browserEvent){if(d.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(d)}b.stopPropagation(d.browserEvent)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){return this.normalizeKey(this.keyCode||this.charCode)},normalizeKey:function(d){return Ext.isSafari?(a[d]||d):d},getPageX:function(){return this.xy[0]},getPageY:function(){return this.xy[1]},getXY:function(){return this.xy},getTarget:function(e,g,d){return e?Ext.fly(this.target).findParent(e,g,d):(d?Ext.get(this.target):this.target)},getRelatedTarget:function(){return this.browserEvent?b.getRelatedTarget(this.browserEvent):null},getWheelDelta:function(){var d=this.browserEvent;var g=0;if(d.wheelDelta){g=d.wheelDelta/120}else{if(d.detail){g=-d.detail/3}}return g},within:function(g,h,d){if(g){var e=this[h?"getRelatedTarget":"getTarget"]();return e&&((d?(e==Ext.getDom(g)):false)||Ext.fly(g).contains(e))}return false}};return new Ext.EventObjectImpl()}();(function(){var j=document;Ext.Element=function(o,p){var q=typeof o=="string"?j.getElementById(o):o,r;if(!q){return null}r=q.id;if(!p&&r&&Ext.Element.cache[r]){return Ext.Element.cache[r]}this.dom=q;this.id=r||Ext.id(q)};var a=Ext.lib.Dom,e=Ext.DomHelper,m=Ext.lib.Event,d=Ext.lib.Anim,g=Ext.Element;g.prototype={set:function(t,q){var r=this.dom,p,s;for(p in t){s=t[p];if(p!="style"&&!Ext.isFunction(s)){if(p=="cls"){r.className=s}else{if(t.hasOwnProperty(p)){if(q||!!r.setAttribute){r.setAttribute(p,s)}else{r[p]=s}}}}}if(t.style){Ext.DomHelper.applyStyles(r,t.style)}return this},defaultUnit:"px",is:function(o){return Ext.DomQuery.is(this.dom,o)},focus:function(r,q){var o=this,q=q||o.dom;try{if(Number(r)){o.focus.defer(r,null,[null,q])}else{q.focus()}}catch(p){}return o},blur:function(){try{this.dom.blur()}catch(o){}return this},getValue:function(o){var p=this.dom.value;return o?parseInt(p,10):p},addListener:function(o,r,q,p){Ext.EventManager.on(this.dom,o,r,q||this,p);return this},removeListener:function(o,q,p){Ext.EventManager.removeListener(this.dom,o,q,p||this);return this},removeAllListeners:function(){Ext.EventManager.removeAll(this.dom);return this},addUnits:function(o){if(o===""||o=="auto"||o===undefined){o=o||""}else{if(!isNaN(o)||!k.test(o)){o=o+(this.defaultUnit||"px")}}return o},load:function(p,q,o){Ext.Ajax.request(Ext.apply({params:q,url:p.url||p,callback:o,el:this.dom,indicatorText:p.indicatorText||""},Ext.isObject(p)?p:{}));return this},isBorderBox:function(){return h[(this.dom.tagName||"").toLowerCase()]||Ext.isBorderBox},remove:function(){var o=this,p=o.dom;o.removeAllListeners();delete g.cache[p.id];delete g.dataCache[p.id];Ext.removeNode(p)},hover:function(p,o,r,q){var s=this;s.on("mouseenter",p,r||s.dom,q);s.on("mouseleave",o,r||s.dom,q);return s},contains:function(o){return !o?false:Ext.lib.Dom.isAncestor(this.dom,o.dom?o.dom:o)},getAttributeNS:function(p,o){return this.getAttribute(o,p)},getAttribute:Ext.isIE?function(o,q){var r=this.dom,p=typeof r[q+":"+o];if(["undefined","unknown"].indexOf(p)==-1){return r[q+":"+o]}return r[o]}:function(o,p){var q=this.dom;return q.getAttributeNS(p,o)||q.getAttribute(p+":"+o)||q.getAttribute(o)||q[o]},update:function(o){this.dom.innerHTML=o}};var n=g.prototype;g.addMethods=function(p){Ext.apply(n,p)};n.on=n.addListener;n.un=n.removeListener;n.autoBoxAdjust=true;var k=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,c;g.cache={};g.dataCache={};g.get=function(p){var o,s,r;if(!p){return null}if(typeof p=="string"){if(!(s=j.getElementById(p))){return null}if(o=g.cache[p]){o.dom=s}else{o=g.cache[p]=new g(s)}return o}else{if(p.tagName){if(!(r=p.id)){r=Ext.id(p)}if(o=g.cache[r]){o.dom=p}else{o=g.cache[r]=new g(p)}return o}else{if(p instanceof g){if(p!=c){p.dom=j.getElementById(p.id)||p.dom;g.cache[p.id]=p}return p}else{if(p.isComposite){return p}else{if(Ext.isArray(p)){return g.select(p)}else{if(p==j){if(!c){var q=function(){};q.prototype=g.prototype;c=new q();c.dom=j}return c}}}}}}return null};g.data=function(p,o,q){var r=g.dataCache[p.id];if(!r){r=g.dataCache[p.id]={}}if(arguments.length==2){return r[o]}else{r[o]=q}};function l(){if(!Ext.enableGarbageCollector){clearInterval(g.collectorThread)}else{var o,p,q;for(o in g.cache){p=g.cache[o];q=p.dom;if(!q||!q.parentNode||(!q.offsetParent&&!j.getElementById(o))){delete g.cache[o];if(q&&Ext.enableListenerCollection){Ext.EventManager.removeAll(q)}}}}}g.collectorThreadId=setInterval(l,30000);var b=function(){};b.prototype=g.prototype;g.Flyweight=function(o){this.dom=o};g.Flyweight.prototype=new b();g.Flyweight.prototype.isFlyweight=true;g._flyweights={};g.fly=function(q,o){var p=null;o=o||"_global";if(q=Ext.getDom(q)){(g._flyweights[o]=g._flyweights[o]||new g.Flyweight()).dom=q;p=g._flyweights[o]}return p};Ext.get=g.get;Ext.fly=g.fly;var h=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1};if(Ext.isIE||Ext.isGecko){h.button=1}Ext.EventManager.on(window,"unload",function(){delete g.cache;delete g.dataCache;delete g._flyweights})})();Ext.Element.addMethods(function(){var d="parentNode",b="nextSibling",c="previousSibling",e=Ext.DomQuery,a=Ext.get;return{findParent:function(n,m,h){var k=this.dom,g=document.body,l=0,j;if(Ext.isGecko&&Object.prototype.toString.call(k)=="[object XULElement]"){return null}m=m||50;if(isNaN(m)){j=Ext.getDom(m);m=10}while(k&&k.nodeType==1&&l<m&&k!=g&&k!=j){if(e.is(k,n)){return h?a(k):k}l++;k=k.parentNode}return null},findParentNode:function(k,j,g){var h=Ext.fly(this.dom.parentNode,"_internal");return h?h.findParent(k,j,g):null},up:function(h,g){return this.findParentNode(h,g,true)},select:function(g,h){return Ext.Element.select(g,h,this.dom)},query:function(g,h){return e.select(g,this.dom)},child:function(g,h){var j=e.selectNode(g,this.dom);return h?j:a(j)},down:function(g,h){var j=e.selectNode(" > "+g,this.dom);return h?j:a(j)},parent:function(g,h){return this.matchNode(d,d,g,h)},next:function(g,h){return this.matchNode(b,b,g,h)},prev:function(g,h){return this.matchNode(c,c,g,h)},first:function(g,h){return this.matchNode(b,"firstChild",g,h)},last:function(g,h){return this.matchNode(c,"lastChild",g,h)},matchNode:function(h,l,g,j){var k=this.dom[l];while(k){if(k.nodeType==1&&(!g||e.is(k,g))){return !j?a(k):k}k=k[h]}return null}}}());Ext.Element.addMethods(function(){var d=Ext.getDom,a=Ext.get,c=Ext.DomHelper,b=function(e){return(e.nodeType||e.dom||typeof e=="string")};return{appendChild:function(e){return a(e).appendTo(this)},appendTo:function(e){d(e).appendChild(this.dom);return this},insertBefore:function(e){(e=d(e)).parentNode.insertBefore(this.dom,e);return this},insertAfter:function(e){(e=d(e)).parentNode.insertBefore(this.dom,e.nextSibling);return this},insertFirst:function(g,e){g=g||{};if(b(g)){g=d(g);this.dom.insertBefore(g,this.dom.firstChild);return !e?a(g):g}else{return this.createChild(g,this.dom.firstChild,e)}},replace:function(e){e=a(e);this.insertBefore(e);e.remove();return this},replaceWith:function(g){var h=this,e=Ext.Element;if(b(g)){g=d(g);h.dom.parentNode.insertBefore(g,h.dom)}else{g=c.insertBefore(h.dom,g)}delete e.cache[h.id];Ext.removeNode(h.dom);h.id=Ext.id(h.dom=g);return e.cache[h.id]=h},createChild:function(g,e,h){g=g||{tag:"div"};return e?c.insertBefore(e,g,h!==true):c[!this.dom.firstChild?"overwrite":"append"](this.dom,g,h!==true)},wrap:function(e,g){var h=c.insertBefore(this.dom,e||{tag:"div"},!g);h.dom?h.dom.appendChild(this.dom):h.appendChild(this.dom);return h},insertHtml:function(g,h,e){var j=c.insertHtml(g,this.dom,h);return e?Ext.get(j):j}}}());Ext.Element.addMethods(function(){var g={},u=/(-[a-z])/gi,b={},p=document.defaultView,r=Ext.isIE?"styleFloat":"cssFloat",x=/alpha\(opacity=(.*)\)/i,k=/^\s+|\s+$/g,w=Ext.Element,d="padding",c="margin",v="border",q="-left",o="-right",t="-top",l="-bottom",h="-width",j={l:v+q+h,r:v+o+h,t:v+t+h,b:v+l+h},e={l:d+q,r:d+o,t:d+t,b:d+l},a={l:c+q,r:c+o,t:c+t,b:c+l},y=Ext.Element.data;function n(z,A){return A.charAt(1).toUpperCase()}function m(A,z){var B=0;Ext.each(A.match(/\w/g),function(C){if(C=parseInt(this.getStyle(z[C]),10)){B+=Math.abs(C)}},this);return B}function s(z){return g[z]||(g[z]=z=="float"?r:z.replace(u,n))}return{adjustWidth:function(z){var A=this;if(typeof z=="number"&&A.autoBoxAdjust&&!A.isBorderBox()){z-=(A.getBorderWidth("lr")+A.getPadding("lr"));z=z<0?0:z}return z},adjustHeight:function(z){var A=this;if(typeof z=="number"&&A.autoBoxAdjust&&!A.isBorderBox()){z-=(A.getBorderWidth("tb")+A.getPadding("tb"));z=z<0?0:z}return z},addClass:function(z){var A=this;Ext.each(z,function(B){A.dom.className+=(!A.hasClass(B)&&B?" "+B:"")});return A},radioClass:function(z){Ext.each(this.dom.parentNode.childNodes,function(A){if(A.nodeType==1){Ext.fly(A).removeClass(z)}});return this.addClass(z)},removeClass:function(z){var A=this;if(A.dom.className){Ext.each(z,function(B){A.dom.className=A.dom.className.replace(b[B]=b[B]||new RegExp("(?:^|\\s+)"+B+"(?:\\s+|$)","g")," ")})}return A},toggleClass:function(z){return this.hasClass(z)?this.removeClass(z):this.addClass(z)},hasClass:function(z){return z&&(" "+this.dom.className+" ").indexOf(" "+z+" ")!=-1},replaceClass:function(A,z){return this.removeClass(A).addClass(z)},isStyle:function(z,A){return this.getStyle(z)==A},getStyle:function(){return p&&p.getComputedStyle?function(C){var B=this.dom,z,A;if(B==document){return null}C=s(C);return(z=B.style[C])?z:(A=p.getComputedStyle(B,""))?A[C]:null}:function(D){var B=this.dom,z,A;if(B==document){return null}if(D=="opacity"){if(B.style.filter.match){if(z=B.style.filter.match(x)){var C=parseFloat(z[1]);if(!isNaN(C)){return C?C/100:0}}}return 1}D=s(D);return B.style[D]||((A=B.currentStyle)?A[D]:null)}}(),getColor:function(z,A,E){var D,C=this.getStyle(z),B=E||"#";if(!C||C=="transparent"||C=="inherit"){return A}if(/^r/.test(C)){Ext.each(C.slice(4,C.length-1).split(","),function(F){D=(F*1).toString(16);B+=D<16?"0"+D:D})}else{B+=C.replace("#","").replace(/^(\w)(\w)(\w)$/,"$1$1$2$2$3$3")}return B.length>5?B.toLowerCase():A},setStyle:function(D,C){var A,B,z;if(!Ext.isObject(D)){A={};A[D]=C;D=A}for(B in D){C=D[B];B=="opacity"?this.setOpacity(C):this.dom.style[s(B)]=C}return this},setOpacity:function(A,z){var D=this,B=D.dom.style;if(!z||!D.anim){if(Ext.isIE){var C=A<1?"alpha(opacity="+A*100+")":"",E=B.filter.replace(x,"").replace(k,"");B.zoom=1;B.filter=E+(E.length>0?" ":"")+C}else{B.opacity=A}}else{D.anim({opacity:{to:A}},D.preanim(arguments,1),null,0.35,"easeIn")}return D},clearOpacity:function(){var z=this.dom.style;if(Ext.isIE){if(!Ext.isEmpty(z.filter)){z.filter=z.filter.replace(x,"").replace(k,"")}}else{z.opacity=z["-moz-opacity"]=z["-khtml-opacity"]=""}return this},getHeight:function(A){var z=this.dom.offsetHeight||0;z=!A?z:z-this.getBorderWidth("tb")-this.getPadding("tb");return z<0?0:z},getWidth:function(A){var z=this.dom.offsetWidth||0;z=!A?z:z-this.getBorderWidth("lr")-this.getPadding("lr");return z<0?0:z},setWidth:function(A,z){var B=this;A=B.adjustWidth(A);!z||!B.anim?B.dom.style.width=B.addUnits(A):B.anim({width:{to:A}},B.preanim(arguments,1));return B},setHeight:function(z,A){var B=this;z=B.adjustHeight(z);!A||!B.anim?B.dom.style.height=B.addUnits(z):B.anim({height:{to:z}},B.preanim(arguments,1));return B},getBorderWidth:function(z){return m.call(this,z,j)},getPadding:function(z){return m.call(this,z,e)},clip:function(){var z=this;dom=z.dom;if(!y(dom,"isClipped")){y(dom,"isClipped",true);y(dom,"originalClip,",{o:z.getStyle("overflow"),x:z.getStyle("overflow-x"),y:z.getStyle("overflow-y")});z.setStyle("overflow","hidden");z.setStyle("overflow-x","hidden");z.setStyle("overflow-y","hidden")}return z},unclip:function(){var z=this,B=z.dom;if(y(B,"isClipped")){y(B,"isClipped",false);var A=y(B,"originalClip");if(A.o){z.setStyle("overflow",A.o)}if(A.x){z.setStyle("overflow-x",A.x)}if(A.y){z.setStyle("overflow-y",A.y)}}return z},addStyles:m,margins:a}}());(function(){var a=Ext.lib.Dom,b="left",g="right",d="top",j="bottom",h="position",c="static",e="relative",k="auto",l="z-index";function m(o,n,p){return this.preanim&&!!n?this.preanim(o,p):false}Ext.Element.addMethods({getX:function(){return a.getX(this.dom)},getY:function(){return a.getY(this.dom)},getXY:function(){return a.getXY(this.dom)},getOffsetsTo:function(n){var q=this.getXY(),p=Ext.fly(n,"_internal").getXY();return[q[0]-p[0],q[1]-p[1]]},setX:function(n,o){return this.setXY([n,this.getY()],m.call(this,arguments,o,1))},setY:function(o,n){return this.setXY([this.getX(),o],m.call(this,arguments,n,1))},setLeft:function(n){this.setStyle(b,this.addUnits(n));return this},setTop:function(n){this.setStyle(d,this.addUnits(n));return this},setRight:function(n){this.setStyle(g,this.addUnits(n));return this},setBottom:function(n){this.setStyle(j,this.addUnits(n));return this},setXY:function(p,n){var o=this;if(!n||!o.anim){a.setXY(o.dom,p)}else{o.anim({points:{to:p}},o.preanim(arguments,1),"motion")}return o},setLocation:function(n,p,o){return this.setXY([n,p],m.call(this,arguments,o,2))},moveTo:function(n,p,o){return this.setXY([n,p],m.call(this,arguments,o,2))},getLeft:function(n){return !n?this.getX():parseInt(this.getStyle(b),10)||0},getRight:function(n){var o=this;return !n?o.getX()+o.getWidth():(o.getLeft(true)+o.getWidth())||0},getTop:function(n){return !n?this.getY():parseInt(this.getStyle(d),10)||0},getBottom:function(n){var o=this;return !n?o.getY()+o.getHeight():(o.getTop(true)+o.getHeight())||0},position:function(r,q,n,p){var o=this;if(!r&&o.isStyle(h,c)){o.setStyle(h,e)}else{if(r){o.setStyle(h,r)}}if(q){o.setStyle(l,q)}if(n||p){o.setXY([n||false,p||false])}},clearPositioning:function(n){n=n||"";this.setStyle({left:n,right:n,top:n,bottom:n,"z-index":"",position:c});return this},getPositioning:function(){var n=this.getStyle(b);var o=this.getStyle(d);return{position:this.getStyle(h),left:n,right:n?"":this.getStyle(g),top:o,bottom:o?"":this.getStyle(j),"z-index":this.getStyle(l)}},setPositioning:function(n){var p=this,o=p.dom.style;p.setStyle(n);if(n.right==k){o.right=""}if(n.bottom==k){o.bottom=""}return p},translatePoints:function(n,v){v=isNaN(n[1])?v:n[1];n=isNaN(n[0])?n:n[0];var r=this,s=r.isStyle(h,e),u=r.getXY(),p=parseInt(r.getStyle(b),10),q=parseInt(r.getStyle(d),10);p=!isNaN(p)?p:(s?0:r.dom.offsetLeft);q=!isNaN(q)?q:(s?0:r.dom.offsetTop);return{left:(n-u[0]+p),top:(v-u[1]+q)}},animTest:m})})();Ext.Element.addMethods({isScrollable:function(){var a=this.dom;return a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth},scrollTo:function(a,b){this.dom["scroll"+(/top/i.test(a)?"Top":"Left")]=b;return this},getScroll:function(){var j=this.dom,h=document,a=h.body,c=h.documentElement,b,g,e;if(j==h||j==a){if(Ext.isIE&&Ext.isStrict){b=c.scrollLeft;g=c.scrollTop}else{b=window.pageXOffset;g=window.pageYOffset}e={left:b||(a?a.scrollLeft:0),top:g||(a?a.scrollTop:0)}}else{e={left:j.scrollLeft,top:j.scrollTop}}return e}});Ext.Element.VISIBILITY=1;Ext.Element.DISPLAY=2;Ext.Element.addMethods(function(){var h="visibility",d="display",b="hidden",k="none",a="originalDisplay",c="visibilityMode",e=Ext.Element.DISPLAY,g=Ext.Element.data,j=function(n){var m=g(n,a);if(m===undefined){g(n,a,m="")}return m},l=function(o){var n=g(o,c);if(n===undefined){g(o,c,n=1)}return n};return{originalDisplay:"",visibilityMode:1,setVisibilityMode:function(m){g(this.dom,c,m);return this},animate:function(n,p,o,q,m){this.anim(n,{duration:p,callback:o,easing:q},m);return this},anim:function(p,q,n,s,o,m){n=n||"run";q=q||{};var r=this,t=Ext.lib.Anim[n](r.dom,p,(q.duration||s)||0.35,(q.easing||o)||"easeOut",function(){if(m){m.call(r)}if(q.callback){q.callback.call(q.scope||r,r,q)}},r);q.anim=t;return t},preanim:function(m,n){return !m[n]?false:(Ext.isObject(m[n])?m[n]:{duration:m[n+1],callback:m[n+2],easing:m[n+3]})},isVisible:function(){return !this.isStyle(h,b)&&!this.isStyle(d,k)},setVisible:function(q,n){var o=this,p=o.dom,m=l(this.dom)==e;if(!n||!o.anim){if(m){o.setDisplayed(q)}else{o.fixDisplay();p.style.visibility=q?"visible":b}}else{if(q){o.setOpacity(0.01);o.setVisible(true)}o.anim({opacity:{to:(q?1:0)}},o.preanim(arguments,1),null,0.35,"easeIn",function(){if(!q){p.style[m?d:h]=(m)?k:b;Ext.fly(p).setOpacity(1)}})}return o},toggle:function(m){var n=this;n.setVisible(!n.isVisible(),n.preanim(arguments,0));return n},setDisplayed:function(m){if(typeof m=="boolean"){m=m?j(this.dom):k}this.setStyle(d,m);return this},fixDisplay:function(){var m=this;if(m.isStyle(d,k)){m.setStyle(h,b);m.setStyle(d,j(this.dom));if(m.isStyle(d,k)){m.setStyle(d,"block")}}},hide:function(m){this.setVisible(false,this.preanim(arguments,0));return this},show:function(m){this.setVisible(true,this.preanim(arguments,0));return this}}}());(function(){var z=null,B=undefined,l=true,u=false,k="setX",h="setY",a="setXY",o="left",m="bottom",t="top",n="right",r="height",g="width",j="points",x="hidden",A="absolute",v="visible",e="motion",p="position",s="easeOut",d=new Ext.Element.Flyweight(),w={},y=function(C){return C||{}},q=function(C){d.dom=C;d.id=Ext.id(C);return d},c=function(C){if(!w[C]){w[C]=[]}return w[C]},b=function(D,C){w[D]=C};Ext.enableFx=l;Ext.Fx={switchStatements:function(D,E,C){return E.apply(this,C[D])},slideIn:function(I,F){F=y(F);var K=this,H=K.dom,N=H.style,P,C,M,E,D,N,J,O,L,G;I=I||"t";K.queueFx(F,function(){P=q(H).getXY();q(H).fixDisplay();C=q(H).getFxRestore();M={x:P[0],y:P[1],0:P[0],1:P[1],width:H.offsetWidth,height:H.offsetHeight};M.right=M.x+M.width;M.bottom=M.y+M.height;q(H).setWidth(M.width).setHeight(M.height);E=q(H).fxWrap(C.pos,F,x);N.visibility=v;N.position=A;function Q(){q(H).fxUnwrap(E,C.pos,F);N.width=C.width;N.height=C.height;q(H).afterFx(F)}O={to:[M.x,M.y]};L={to:M.width};G={to:M.height};function R(V,S,W,T,Y,aa,ad,ac,ab,X,U){var Z={};q(V).setWidth(W).setHeight(T);if(q(V)[Y]){q(V)[Y](aa)}S[ad]=S[ac]="0";if(ab){Z.width=ab}if(X){Z.height=X}if(U){Z.points=U}return Z}J=q(H).switchStatements(I.toLowerCase(),R,{t:[E,N,M.width,0,z,z,o,m,z,G,z],l:[E,N,0,M.height,z,z,n,t,L,z,z],r:[E,N,M.width,M.height,k,M.right,o,t,z,z,O],b:[E,N,M.width,M.height,h,M.bottom,o,t,z,G,O],tl:[E,N,0,0,z,z,n,m,L,G,O],bl:[E,N,0,0,h,M.y+M.height,n,t,L,G,O],br:[E,N,0,0,a,[M.right,M.bottom],o,t,L,G,O],tr:[E,N,0,0,k,M.x+M.width,o,m,L,G,O]});N.visibility=v;q(E).show();arguments.callee.anim=q(E).fxanim(J,F,e,0.5,s,Q)});return K},slideOut:function(G,E){E=y(E);var I=this,F=I.dom,L=F.style,M=I.getXY(),D,C,J,K,H={to:0};G=G||"t";I.queueFx(E,function(){C=q(F).getFxRestore();J={x:M[0],y:M[1],0:M[0],1:M[1],width:F.offsetWidth,height:F.offsetHeight};J.right=J.x+J.width;J.bottom=J.y+J.height;q(F).setWidth(J.width).setHeight(J.height);D=q(F).fxWrap(C.pos,E,v);L.visibility=v;L.position=A;q(D).setWidth(J.width).setHeight(J.height);function N(){E.useDisplay?q(F).setDisplayed(u):q(F).hide();q(F).fxUnwrap(D,C.pos,E);L.width=C.width;L.height=C.height;q(F).afterFx(E)}function O(P,X,V,Y,T,W,S,U,R){var Q={};P[X]=P[V]="0";Q[Y]=T;if(W){Q[W]=S}if(U){Q[U]=R}return Q}K=q(F).switchStatements(G.toLowerCase(),O,{t:[L,o,m,r,H],l:[L,n,t,g,H],r:[L,o,t,g,H,j,{to:[J.right,J.y]}],b:[L,o,t,r,H,j,{to:[J.x,J.bottom]}],tl:[L,n,m,g,H,r,H],bl:[L,n,t,g,H,r,H,j,{to:[J.x,J.bottom]}],br:[L,o,t,g,H,r,H,j,{to:[J.x+J.width,J.bottom]}],tr:[L,o,m,g,H,r,H,j,{to:[J.right,J.y]}]});arguments.callee.anim=q(D).fxanim(K,E,e,0.5,s,N)});return I},puff:function(I){I=y(I);var G=this,H=G.dom,D=H.style,E,C,F;G.queueFx(I,function(){E=q(H).getWidth();C=q(H).getHeight();q(H).clearOpacity();q(H).show();F=q(H).getFxRestore();function J(){I.useDisplay?q(H).setDisplayed(u):q(H).hide();q(H).clearOpacity();q(H).setPositioning(F.pos);D.width=F.width;D.height=F.height;D.fontSize="";q(H).afterFx(I)}arguments.callee.anim=q(H).fxanim({width:{to:q(H).adjustWidth(E*2)},height:{to:q(H).adjustHeight(C*2)},points:{by:[-E*0.5,-C*0.5]},opacity:{to:0},fontSize:{to:200,unit:"%"}},I,e,0.5,s,J)});return G},switchOff:function(G){G=y(G);var E=this,F=E.dom,C=F.style,D;E.queueFx(G,function(){q(F).clearOpacity();q(F).clip();D=q(F).getFxRestore();function H(){G.useDisplay?q(F).setDisplayed(u):q(F).hide();q(F).clearOpacity();q(F).setPositioning(D.pos);C.width=D.width;C.height=D.height;q(F).afterFx(G)}q(F).fxanim({opacity:{to:0.3}},z,z,0.1,z,function(){q(F).clearOpacity();(function(){q(F).fxanim({height:{to:1},points:{by:[0,q(F).getHeight()*0.5]}},G,e,0.3,"easeIn",H)}).defer(100)})});return E},highlight:function(E,I){I=y(I);var G=this,H=G.dom,C=I.attr||"backgroundColor",D={},F;G.queueFx(I,function(){q(H).clearOpacity();q(H).show();function J(){H.style[C]=F;q(H).afterFx(I)}F=H.style[C];D[C]={from:E||"ffff9c",to:I.endColor||q(H).getColor(C)||"ffffff"};arguments.callee.anim=q(H).fxanim(D,I,"color",1,"easeIn",J)});return G},frame:function(C,F,I){I=y(I);var E=this,H=E.dom,D,G;E.queueFx(I,function(){C=C||"#C3DAF9";if(C.length==6){C="#"+C}F=F||1;q(H).show();var M=q(H).getXY(),K={x:M[0],y:M[1],0:M[0],1:M[1],width:H.offsetWidth,height:H.offsetHeight},J=function(){D=q(document.body||document.documentElement).createChild({style:{visbility:x,position:A,"z-index":35000,border:"0px solid "+C}});return D.queueFx({},L)};arguments.callee.anim={isAnimated:true,stop:function(){F=0;D.stopFx()}};function L(){var N=Ext.isBorderBox?2:1;G=D.anim({top:{from:K.y,to:K.y-20},left:{from:K.x,to:K.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:K.height,to:K.height+20*N},width:{from:K.width,to:K.width+20*N}},{duration:I.duration||1,callback:function(){D.remove();--F>0?J():q(H).afterFx(I)}});arguments.callee.anim={isAnimated:true,stop:function(){G.stop()}}}J()});return E},pause:function(E){var D=this.dom,C;this.queueFx({},function(){C=setTimeout(function(){q(D).afterFx({})},E*1000);arguments.callee.anim={isAnimated:true,stop:function(){clearTimeout(C);q(D).afterFx({})}}});return this},fadeIn:function(E){E=y(E);var C=this,D=C.dom,F=E.endOpacity||1;C.queueFx(E,function(){q(D).setOpacity(0);q(D).fixDisplay();D.style.visibility=v;arguments.callee.anim=q(D).fxanim({opacity:{to:F}},E,z,0.5,s,function(){if(F==1){q(D).clearOpacity()}q(D).afterFx(E)})});return C},fadeOut:function(F){F=y(F);var D=this,E=D.dom,C=E.style,G=F.endOpacity||0;D.queueFx(F,function(){arguments.callee.anim=q(E).fxanim({opacity:{to:G}},F,z,0.5,s,function(){if(G==0){Ext.Element.data(E,"visibilityMode")==Ext.Element.DISPLAY||F.useDisplay?C.display="none":C.visibility=x;q(E).clearOpacity()}q(E).afterFx(F)})});return D},scale:function(C,D,E){this.shift(Ext.apply({},E,{width:C,height:D}));return this},shift:function(E){E=y(E);var D=this.dom,C={};this.queueFx(E,function(){for(var F in E){if(E[F]!=B){C[F]={to:E[F]}}}C.width?C.width.to=q(D).adjustWidth(E.width):C;C.height?C.height.to=q(D).adjustWidth(E.height):C;if(C.x||C.y||C.xy){C.points=C.xy||{to:[C.x?C.x.to:q(D).getX(),C.y?C.y.to:q(D).getY()]}}arguments.callee.anim=q(D).fxanim(C,E,e,0.35,s,function(){q(D).afterFx(E)})});return this},ghost:function(F,D){D=y(D);var H=this,E=H.dom,K=E.style,I={opacity:{to:0},points:{}},L=I.points,C,J,G;F=F||"b";H.queueFx(D,function(){C=q(E).getFxRestore();J=q(E).getWidth();G=q(E).getHeight();function M(){D.useDisplay?q(E).setDisplayed(u):q(E).hide();q(E).clearOpacity();q(E).setPositioning(C.pos);K.width=C.width;K.height=C.height;q(E).afterFx(D)}L.by=q(E).switchStatements(F.toLowerCase(),function(O,N){return[O,N]},{t:[0,-G],l:[-J,0],r:[J,0],b:[0,G],tl:[-J,-G],bl:[-J,G],br:[J,G],tr:[J,-G]});arguments.callee.anim=q(E).fxanim(I,D,e,0.5,s,M)});return H},syncFx:function(){var C=this;C.fxDefaults=Ext.apply(C.fxDefaults||{},{block:u,concurrent:l,stopFx:u});return C},sequenceFx:function(){var C=this;C.fxDefaults=Ext.apply(C.fxDefaults||{},{block:u,concurrent:u,stopFx:u});return C},nextFx:function(){var C=c(this.dom.id)[0];if(C){C.call(this)}},hasActiveFx:function(){return c(this.dom.id)[0]},stopFx:function(C){var D=this,F=D.dom.id;if(D.hasActiveFx()){var E=c(F)[0];if(E&&E.anim){if(E.anim.isAnimated){b(F,[E]);E.anim.stop(C!==undefined?C:l)}else{b(F,[])}}}return D},beforeFx:function(C){if(this.hasActiveFx()&&!C.concurrent){if(C.stopFx){this.stopFx();return l}return u}return l},hasFxBlock:function(){var C=c(this.dom.id);return C&&C[0]&&C[0].block},queueFx:function(F,C){var D=this;if(!D.hasFxBlock()){Ext.applyIf(F,D.fxDefaults);if(!F.concurrent){var E=D.beforeFx(F);C.block=F.block;c(D.dom.id).push(C);if(E){D.nextFx()}}else{C.call(D)}}return D},fxWrap:function(I,G,E){var F=this.dom,D,C;if(!G.wrap||!(D=Ext.getDom(G.wrap))){if(G.fixPosition){C=q(F).getXY()}var H=document.createElement("div");H.style.visibility=E;D=F.parentNode.insertBefore(H,F);q(D).setPositioning(I);if(q(D).isStyle(p,"static")){q(D).position("relative")}q(F).clearPositioning("auto");q(D).clip();D.appendChild(F);if(C){q(D).setXY(C)}}return D},fxUnwrap:function(C,F,E){var D=this.dom;q(D).clearPositioning();q(D).setPositioning(F);if(!E.wrap){C.parentNode.insertBefore(D,C);q(C).remove()}},getFxRestore:function(){var C=this.dom.style;return{pos:this.getPositioning(),width:C.width,height:C.height}},afterFx:function(D){var C=this.dom,E=C.id;if(D.afterStyle){q(C).setStyle(D.afterStyle)}if(D.afterCls){q(C).addClass(D.afterCls)}if(D.remove==l){q(C).remove()}if(D.callback){D.callback.call(D.scope,q(C))}if(!D.concurrent){c(E).shift();q(C).nextFx()}},fxanim:function(F,G,D,H,E,C){D=D||"run";G=G||{};var I=Ext.lib.Anim[D](this.dom,F,(G.duration||H)||0.35,(G.easing||E)||s,C,this);G.anim=I;return I}};Ext.Fx.resize=Ext.Fx.scale;Ext.Element.addMethods(Ext.Fx)})();Ext.CompositeElementLite=function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.Element.Flyweight()};Ext.CompositeElementLite.prototype={isComposite:true,getCount:function(){return this.elements.length},add:function(b){if(b){if(Ext.isArray(b)){this.elements=this.elements.concat(b)}else{var a=this.elements;Ext.each(b,function(c){a.push(c)})}}return this},invoke:function(d,a){var b=this.elements,c=this.el;Ext.each(b,function(g){c.dom=g;Ext.Element.prototype[d].apply(c,a)});return this},item:function(a){var b=this;if(!b.elements[a]){return null}b.el.dom=b.elements[a];return b.el},addListener:function(a,d,c,b){Ext.each(this.elements,function(g){Ext.EventManager.on(g,a,d,c||g,b)});return this},each:function(c,b){var d=this,a=d.el;Ext.each(d.elements,function(h,g){a.dom=h;return c.call(b||a,a,d,g)});return d},indexOf:function(a){return this.elements.indexOf(Ext.getDom(a))},replaceElement:function(e,c,a){var b=!isNaN(e)?e:this.indexOf(e),g;if(b>-1){c=Ext.getDom(c);if(a){g=this.elements[b];g.parentNode.insertBefore(c,g);Ext.removeNode(g)}this.elements.splice(b,1,c)}return this},clear:function(){this.elements=[]}};Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLite.prototype.addListener;(function(){var c,b=Ext.Element.prototype,a=Ext.CompositeElementLite.prototype;for(var c in b){if(Ext.isFunction(b[c])){(function(d){a[d]=a[d]||function(){return this.invoke(d,arguments)}}).call(a,c)}}})();if(Ext.DomQuery){Ext.Element.selectorFunction=Ext.DomQuery.select}Ext.Element.select=function(a,d,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{throw"Invalid selector"}}return new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;(function()
KIka_kok
FL Team
FL Team
Сообщения: 680
Зарегистрирован: 18 июл 2010, 19:52

Re: Jquery - еластичное txt поле

Сообщение KIka_kok »

и еще туда же)

Код: Выделить всё

{var c="beforerequest",m="requestcomplete",l="requestexception",e=undefined,j="load",h="POST",k="GET",g=window;Ext.data.Connection=function(n){Ext.apply(this,n);this.addEvents(c,m,l);Ext.data.Connection.superclass.constructor.call(this)};function b(n){this.transId=false;var o=n.argument.options;n.argument=o?o.argument:null;this.fireEvent(m,this,n,o);if(o.success){o.success.call(o.scope,n,o)}if(o.callback){o.callback.call(o.scope,o,true,n)}}function d(n,p){this.transId=false;var o=n.argument.options;n.argument=o?o.argument:null;this.fireEvent(l,this,n,o,p);if(o.failure){o.failure.call(o.scope,n,o)}if(o.callback){o.callback.call(o.scope,o,false,n)}}function a(s,n,p){var q=Ext.id(),y=document,t=y.createElement("iframe"),r=Ext.getDom(s.form),x=[],w;t.id=t.name=q;t.className="x-hidden";t.src=Ext.SSL_SECURE_URL;y.body.appendChild(t);if(Ext.isIE){y.frames[q].name=q}r.target=q;r.method=h;r.enctype=r.encoding="multipart/form-data";r.action=p||"";n=Ext.urlDecode(n,false);for(var v in n){if(n.hasOwnProperty(v)){w=y.createElement("input");w.type="hidden";w.value=n[w.name=v];r.appendChild(w);x.push(w)}}function u(){var z=this,o={responseText:"",responseXML:null,argument:s.argument},C,B;try{C=t.contentWindow.document||t.contentDocument||g.frames[q].document;if(C){if(C.body){if(/textarea/i.test((B=C.body.firstChild||{}).tagName)){o.responseText=B.value}else{o.responseText=C.body.innerHTML}}else{o.responseXML=C.XMLDocument||C}}}catch(A){}Ext.EventManager.removeListener(t,j,u,z);z.fireEvent(m,z,o,s);Ext.callback(s.success,s.scope,[o,s]);Ext.callback(s.callback,s.scope,[s,true,o]);if(!z.debugUploads){setTimeout(function(){Ext.removeNode(t)},100)}}Ext.EventManager.on(t,j,u,this);r.submit();Ext.each(x,function(o){Ext.removeNode(o)})}Ext.extend(Ext.data.Connection,Ext.util.Observable,{timeout:30000,autoAbort:false,disableCaching:true,disableCachingParam:"_dc",request:function(t){var w=this;if(w.fireEvent(c,w,t)){if(t.el){if(!Ext.isEmpty(t.indicatorText)){w.indicatorText='<div class="loading-indicator">'+t.indicatorText+"</div>"}if(w.indicatorText){Ext.getDom(t.el).innerHTML=w.indicatorText}t.success=(Ext.isFunction(t.success)?t.success:function(){}).createInterceptor(function(o){Ext.getDom(t.el).innerHTML=o.responseText})}var r=t.params,q=t.url||w.url,n,u={success:b,failure:d,scope:w,argument:{options:t},timeout:t.timeout||w.timeout},s,x;if(Ext.isFunction(r)){r=r.call(t.scope||g,t)}r=Ext.urlEncode(w.extraParams,typeof r=="object"?Ext.urlEncode(r):r);if(Ext.isFunction(q)){q=q.call(t.scope||g,t)}if(s=Ext.getDom(t.form)){q=q||s.action;if(t.isUpload||/multipart\/form-data/i.test(s.getAttribute("enctype"))){return a.call(w,t,r,q)}x=Ext.lib.Ajax.serializeForm(s);r=r?(r+"&"+x):x}n=t.method||w.method||((r||t.xmlData||t.jsonData)?h:k);if(n===k&&(w.disableCaching&&t.disableCaching!==false)||t.disableCaching===true){var v=t.disableCachingParam||w.disableCachingParam;q+=(q.indexOf("?")!=-1?"&":"?")+v+"="+(new Date().getTime())}t.headers=Ext.apply(t.headers||{},w.defaultHeaders||{});if(t.autoAbort===true||w.autoAbort){w.abort()}if((n==k||t.xmlData||t.jsonData)&&r){q+=(/\?/.test(q)?"&":"?")+r;r=""}return w.transId=Ext.lib.Ajax.request(n,q,u,r,t)}else{return t.callback?t.callback.apply(t.scope,[t,e,e]):null}},isLoading:function(n){return n?Ext.lib.Ajax.isCallInProgress(n):!!this.transId},abort:function(n){if(n||this.isLoading()){Ext.lib.Ajax.abort(n||this.transId)}}})})();Ext.Ajax=new Ext.data.Connection({autoAbort:false,serializeForm:function(a){return Ext.lib.Ajax.serializeForm(a)}});Ext.util.DelayedTask=function(d,c,a){var e=this,g,b=function(){clearInterval(g);g=null;d.apply(c,a||[])};e.delay=function(j,l,k,h){e.cancel();d=l||d;c=k||c;a=h||a;g=setInterval(b,j)};e.cancel=function(){if(g){clearInterval(g);g=null}}};Ext.util.JSON=new (function(){var useHasOwn=!!{}.hasOwnProperty,isNative=Ext.USE_NATIVE_JSON&&JSON&&JSON.toString()=="[object JSON]";var pad=function(n){return n<10?"0"+n:n};var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};var encodeString=function(s){if(/["\\\x00-\x1f]/.test(s)){return'"'+s.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"'}return'"'+s+'"'};var encodeArray=function(o){var a=["["],b,i,l=o.length,v;for(i=0;i<l;i+=1){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",")}a.push(v===null?"null":Ext.util.JSON.encode(v));b=true}}a.push("]");return a.join("")};this.encodeDate=function(o){return'"'+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+'"'};this.encode=isNative?JSON.stringify:function(o){if(typeof o=="undefined"||o===null){return"null"}else{if(Ext.isArray(o)){return encodeArray(o)}else{if(Object.prototype.toString.apply(o)==="[object Date]"){return Ext.util.JSON.encodeDate(o)}else{if(typeof o=="string"){return encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(typeof o=="boolean"){return String(o)}else{var a=["{"],b,i,v;for(i in o){if(!useHasOwn||o.hasOwnProperty(i)){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",")}a.push(this.encode(i),":",v===null?"null":this.encode(v));b=true}}}a.push("}");return a.join("")}}}}}}};this.decode=isNative?JSON.parse:function(json){return eval("("+json+")")}})();Ext.encode=Ext.util.JSON.encode;Ext.decode=Ext.util.JSON.decode;
НУ ВОТ И ВСЕ )_
Аватара пользователя
jagger
Сообщения: 114
Зарегистрирован: 28 июл 2010, 13:26

Re: Jquery - еластичное txt поле

Сообщение jagger »

Полоса прокрутки
________________________________________________________
Описание: Как изменить высоту IFrame или сделать скроллинг?
KIka_kok
FL Team
FL Team
Сообщения: 680
Зарегистрирован: 18 июл 2010, 19:52

Re: Jquery - еластичное txt поле

Сообщение KIka_kok »

Нет тут надо увидеть тут нетолько полоса прокрутки,тут все сложнее и намного красивее
Аватара пользователя
Александр
Создатель сайта
Создатель сайта
Сообщения: 4574
Зарегистрирован: 27 сен 2009, 16:45

Re: Jquery - эластичное txt поле

Сообщение Александр »

KIka_kok
Очень низкокачественный урок. Все ошибки в тексте исправлять не стал.
2, 3 и 4 сообщения можно было бы заменить простым архивом с этими файлами. Видеть этот сжатый код - ни к чему.
Ценю желание делать уроки, но они должны быть более качественные. Ты бы хотел учиться по такому уроку?
KIka_kok
FL Team
FL Team
Сообщения: 680
Зарегистрирован: 18 июл 2010, 19:52

Re: Jquery - эластичное txt поле

Сообщение KIka_kok »

Да честно бы попробовал но было бы неудобно,постораюсь в следущий раз сделать получше..
Ответить