Upgrade to ExtJS 3.0.0 - Released 07/06/2009
[extjs.git] / examples / ux / ux-all.js
diff --git a/examples/ux/ux-all.js b/examples/ux/ux-all.js
new file mode 100644 (file)
index 0000000..cf6b98a
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Ext JS Library 3.0.0
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+Ext.ns("Ext.ux.grid");Ext.ux.grid.BufferView=Ext.extend(Ext.grid.GridView,{rowHeight:19,borderHeight:2,scrollDelay:100,cacheSize:20,cleanDelay:500,initTemplates:function(){Ext.ux.grid.BufferView.superclass.initTemplates.call(this);var a=this.templates;a.rowHolder=new Ext.Template('<div class="x-grid3-row {alt}" style="{tstyle}"></div>');a.rowHolder.disableFormats=true;a.rowHolder.compile();a.rowBody=new Ext.Template('<table class="x-grid3-row-table" border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',"<tbody><tr>{cells}</tr>",(this.enableRowBody?'<tr class="x-grid3-row-body-tr" style="{bodyStyle}"><td colspan="{cols}" class="x-grid3-body-cell" tabIndex="0" hidefocus="on"><div class="x-grid3-row-body">{body}</div></td></tr>':""),"</tbody></table>");a.rowBody.disableFormats=true;a.rowBody.compile()},getStyleRowHeight:function(){return Ext.isBorderBox?(this.rowHeight+this.borderHeight):this.rowHeight},getCalculatedRowHeight:function(){return this.rowHeight+this.borderHeight},getVisibleRowCount:function(){var b=this.getCalculatedRowHeight();var a=this.scroller.dom.clientHeight;return(a<1)?0:Math.ceil(a/b)},getVisibleRows:function(){var a=this.getVisibleRowCount();var b=this.scroller.dom.scrollTop;var c=(b==0?0:Math.floor(b/this.getCalculatedRowHeight())-1);return{first:Math.max(c,0),last:Math.min(c+a+2,this.ds.getCount()-1)}},doRender:function(g,k,u,a,s,A,l){var b=this.templates,f=b.cell,h=b.row,x=b.rowBody,n=s-1;var t=this.getStyleRowHeight();var z=this.getVisibleRows();var d="width:"+this.getTotalWidth()+";height:"+t+"px;";var D=[],w,E,v={},m={tstyle:d},q;for(var y=0,C=k.length;y<C;y++){q=k[y];w=[];var o=(y+a);var e=o>=z.first&&o<=z.last;if(e){for(var B=0;B<s;B++){E=g[B];v.id=E.id;v.css=B==0?"x-grid3-cell-first ":(B==n?"x-grid3-cell-last ":"");v.attr=v.cellAttr="";v.value=E.renderer(q.data[E.name],v,q,o,B,u);v.style=E.style;if(v.value==undefined||v.value===""){v.value="&#160;"}if(q.dirty&&typeof q.modified[E.name]!=="undefined"){v.css+=" x-grid3-dirty-cell"}w[w.length]=f.apply(v)}}var F=[];if(A&&((o+1)%2==0)){F[0]="x-grid3-row-alt"}if(q.dirty){F[1]=" x-grid3-dirty-row"}m.cols=s;if(this.getRowClass){F[2]=this.getRowClass(q,o,m,u)}m.alt=F.join(" ");m.cells=w.join("");D[D.length]=!e?b.rowHolder.apply(m):(l?x.apply(m):h.apply(m))}return D.join("")},isRowRendered:function(a){var b=this.getRow(a);return b&&b.childNodes.length>0},syncScroll:function(){Ext.ux.grid.BufferView.superclass.syncScroll.apply(this,arguments);this.update()},update:function(){if(this.scrollDelay){if(!this.renderTask){this.renderTask=new Ext.util.DelayedTask(this.doUpdate,this)}this.renderTask.delay(this.scrollDelay)}else{this.doUpdate()}},doUpdate:function(){if(this.getVisibleRowCount()>0){var f=this.grid,b=f.colModel,h=f.store;var e=this.getColumnData();var a=this.getVisibleRows();for(var d=a.first;d<=a.last;d++){if(!this.isRowRendered(d)){var c=this.doRender(e,[h.getAt(d)],h,d,b.getColumnCount(),f.stripeRows,true);this.getRow(d).innerHTML=c}}this.clean()}},clean:function(){if(!this.cleanTask){this.cleanTask=new Ext.util.DelayedTask(this.doClean,this)}this.cleanTask.delay(this.cleanDelay)},doClean:function(){if(this.getVisibleRowCount()>0){var b=this.getVisibleRows();b.first-=this.cacheSize;b.last+=this.cacheSize;var c=0,d=this.getRows();if(b.first<=0){c=b.last+1}for(var a=this.ds.getCount();c<a;c++){if((c<b.first||c>b.last)&&d[c].innerHTML){d[c].innerHTML=""}}}},layout:function(){Ext.ux.grid.BufferView.superclass.layout.call(this);this.update()}});Ext.ns("Ext.ux.layout");Ext.ux.layout.CenterLayout=Ext.extend(Ext.layout.FitLayout,{setItemSize:function(b,a){this.container.addClass("ux-layout-center");b.addClass("ux-layout-center-item");if(b&&a.height>0){if(b.width){a.width=b.width}b.setSize(a)}}});Ext.Container.LAYOUTS["ux.center"]=Ext.ux.layout.CenterLayout;Ext.ns("Ext.ux.grid");Ext.ux.grid.CheckColumn=function(a){Ext.apply(this,a);if(!this.id){this.id=Ext.id()}this.renderer=this.renderer.createDelegate(this)};Ext.ux.grid.CheckColumn.prototype={init:function(a){this.grid=a;this.grid.on("render",function(){var b=this.grid.getView();b.mainBody.on("mousedown",this.onMouseDown,this)},this)},onMouseDown:function(d,c){if(c.className&&c.className.indexOf("x-grid3-cc-"+this.id)!=-1){d.stopEvent();var b=this.grid.getView().findRowIndex(c);var a=this.grid.store.getAt(b);a.set(this.dataIndex,!a.data[this.dataIndex])}},renderer:function(b,c,a){c.css+=" x-grid3-check-col-td";return'<div class="x-grid3-check-col'+(b?"-on":"")+" x-grid3-cc-"+this.id+'">&#160;</div>'}};Ext.preg("checkcolumn",Ext.ux.grid.CheckColumn);Ext.grid.CheckColumn=Ext.ux.grid.CheckColumn;Ext.ns("Ext.ux.tree");Ext.ux.tree.ColumnTree=Ext.extend(Ext.tree.TreePanel,{lines:false,borderWidth:Ext.isBorderBox?0:2,cls:"x-column-tree",onRender:function(){Ext.tree.ColumnTree.superclass.onRender.apply(this,arguments);this.headers=this.header.createChild({cls:"x-tree-headers"});var f=this.columns,g;var b=0;var d=19;for(var e=0,a=f.length;e<a;e++){g=f[e];b+=g.width;this.headers.createChild({cls:"x-tree-hd "+(g.cls?g.cls+"-hd":""),cn:{cls:"x-tree-hd-text",html:g.header},style:"width:"+(g.width-this.borderWidth)+"px;"})}this.headers.createChild({cls:"x-clear"});this.headers.setWidth(b+d);this.innerCt.setWidth(b)}});Ext.reg("columntree",Ext.ux.tree.ColumnTree);Ext.tree.ColumnTree=Ext.ux.tree.ColumnTree;Ext.ux.tree.ColumnNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{focus:Ext.emptyFn,renderElements:function(d,m,h,o){this.indentMarkup=d.parentNode?d.parentNode.ui.getChildIndent():"";var p=d.getOwnerTree();var l=p.columns;var k=p.borderWidth;var j=l[0];var b=['<li class="x-tree-node"><div ext:tree-node-id="',d.id,'" class="x-tree-node-el x-tree-node-leaf ',m.cls,'">','<div class="x-tree-col" style="width:',j.width-k,'px;">','<span class="x-tree-node-indent">',this.indentMarkup,"</span>",'<img src="',this.emptyIcon,'" class="x-tree-ec-icon x-tree-elbow">','<img src="',m.icon||this.emptyIcon,'" class="x-tree-node-icon',(m.icon?" x-tree-node-inline-icon":""),(m.iconCls?" "+m.iconCls:""),'" unselectable="on">','<a hidefocus="on" class="x-tree-node-anchor" href="',m.href?m.href:"#",'" tabIndex="1" ',m.hrefTarget?' target="'+m.hrefTarget+'"':"",">",'<span unselectable="on">',d.text||(j.renderer?j.renderer(m[j.dataIndex],d,m):m[j.dataIndex]),"</span></a>","</div>"];for(var e=1,g=l.length;e<g;e++){j=l[e];b.push('<div class="x-tree-col ',(j.cls?j.cls:""),'" style="width:',j.width-k,'px;">','<div class="x-tree-col-text">',(j.renderer?j.renderer(m[j.dataIndex],d,m):m[j.dataIndex]),"</div>","</div>")}b.push('<div class="x-clear"></div></div>','<ul class="x-tree-node-ct" style="display:none;"></ul>',"</li>");if(o!==true&&d.nextSibling&&d.nextSibling.ui.getEl()){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",d.nextSibling.ui.getEl(),b.join(""))}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",h,b.join(""))}this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];var f=this.elNode.firstChild.childNodes;this.indentNode=f[0];this.ecNode=f[1];this.iconNode=f[2];this.anchor=f[3];this.textNode=f[3].firstChild}});Ext.tree.ColumnNodeUI=Ext.ux.tree.ColumnNodeUI;Ext.DataView.LabelEditor=Ext.extend(Ext.Editor,{alignment:"tl-tl",hideEl:false,cls:"x-small-editor",shim:false,completeOnEnter:true,cancelOnEsc:true,labelSelector:"span.x-editable",constructor:function(a,b){Ext.DataView.LabelEditor.superclass.constructor.call(this,b||new Ext.form.TextField({allowBlank:false,growMin:90,growMax:240,grow:true,selectOnFocus:true}),a)},init:function(a){this.view=a;a.on("render",this.initEditor,this);this.on("complete",this.onSave,this)},initEditor:function(){this.view.on({scope:this,containerclick:this.doBlur,click:this.doBlur});this.view.getEl().on("mousedown",this.onMouseDown,this,{delegate:this.labelSelector})},doBlur:function(){if(this.editing){this.field.blur()}},onMouseDown:function(d,c){if(!d.ctrlKey&&!d.shiftKey){var b=this.view.findItemFromChild(c);d.stopEvent();var a=this.view.store.getAt(this.view.indexOf(b));this.startEdit(c,a.data[this.dataIndex]);this.activeRecord=a}else{d.preventDefault()}},onSave:function(a,b){this.activeRecord.set(this.dataIndex,b)}});Ext.DataView.DragSelector=function(f){f=f||{};var j,h,l;var d,k,m=new Ext.lib.Region(0,0,0,0);var b=f.dragSafe===true;this.init=function(q){j=q;j.on("render",p)};function n(){d=[];j.all.each(function(q){d[d.length]=q.getRegion()});k=j.el.getRegion()}function e(){return false}function g(q){return !b||q.target==j.el.dom}function o(q){j.on("containerclick",e,j,{single:true});if(!h){h=j.el.createChild({cls:"x-view-selector"})}else{h.setDisplayed("block")}n();j.clearSelections()}function c(z){var A=l.startXY;var E=l.getXY();var C=Math.min(A[0],E[0]);var B=Math.min(A[1],E[1]);var D=Math.abs(A[0]-E[0]);var u=Math.abs(A[1]-E[1]);m.left=C;m.top=B;m.right=C+D;m.bottom=B+u;m.constrainTo(k);h.setRegion(m);for(var t=0,v=d.length;t<v;t++){var q=d[t],s=m.intersect(q);if(s&&!q.selected){q.selected=true;j.select(t,true)}else{if(!s&&q.selected){q.selected=false;j.deselect(t)}}}}function a(q){if(!Ext.isIE){j.un("containerclick",e,j)}if(h){h.setDisplayed(false)}}function p(q){l=new Ext.dd.DragTracker({onBeforeStart:g,onStart:o,onDrag:c,onEnd:a});l.initEl(q.el)}};Ext.ns("Ext.ux.form");Ext.ux.form.FileUploadField=Ext.extend(Ext.form.TextField,{buttonText:"Browse...",buttonOnly:false,buttonOffset:3,readOnly:true,autoSize:Ext.emptyFn,initComponent:function(){Ext.ux.form.FileUploadField.superclass.initComponent.call(this);this.addEvents("fileselected")},onRender:function(c,a){Ext.ux.form.FileUploadField.superclass.onRender.call(this,c,a);this.wrap=this.el.wrap({cls:"x-form-field-wrap x-form-file-wrap"});this.el.addClass("x-form-file-text");this.el.dom.removeAttribute("name");this.fileInput=this.wrap.createChild({id:this.getFileInputId(),name:this.name||this.getId(),cls:"x-form-file",tag:"input",type:"file",size:1});var b=Ext.applyIf(this.buttonCfg||{},{text:this.buttonText});this.button=new Ext.Button(Ext.apply(b,{renderTo:this.wrap,cls:"x-form-file-btn"+(b.iconCls?" x-btn-icon":"")}));if(this.buttonOnly){this.el.hide();this.wrap.setWidth(this.button.getEl().getWidth())}this.fileInput.on("change",function(){var d=this.fileInput.dom.value;this.setValue(d);this.fireEvent("fileselected",this,d)},this)},getFileInputId:function(){return this.id+"-file"},onResize:function(a,b){Ext.ux.form.FileUploadField.superclass.onResize.call(this,a,b);this.wrap.setWidth(a);if(!this.buttonOnly){var a=this.wrap.getWidth()-this.button.getEl().getWidth()-this.buttonOffset;this.el.setWidth(a)}},onDestroy:function(){Ext.ux.form.FileUploadField.superclass.onDestroy.call(this);Ext.destroy(this.fileInput,this.button,this.wrap)},preFocus:Ext.emptyFn,getResizeEl:function(){return this.wrap},getPositionEl:function(){return this.wrap},alignErrorIcon:function(){this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0])}});Ext.reg("fileuploadfield",Ext.ux.form.FileUploadField);Ext.form.FileUploadField=Ext.ux.form.FileUploadField;(function(){Ext.ns("Ext.a11y");Ext.a11y.Frame=Ext.extend(Object,{initialized:false,constructor:function(b,a){this.setSize(b||1);this.setColor(a||"15428B")},init:function(){if(!this.initialized){this.sides=[];var b,a;this.ct=Ext.DomHelper.append(document.body,{cls:"x-a11y-focusframe"},true);for(a=0;a<4;a++){b=Ext.DomHelper.append(this.ct,{cls:"x-a11y-focusframe-side",style:"background-color: #"+this.color},true);b.visibilityMode=Ext.Element.DISPLAY;this.sides.push(b)}this.frameTask=new Ext.util.DelayedTask(function(e){var f=Ext.get(e);if(f!=this.curEl){var c=f.getWidth();var d=f.getHeight();this.sides[0].show().setSize(c,this.size).anchorTo(e,"tl",[0,-1]);this.sides[2].show().setSize(c,this.size).anchorTo(e,"bl",[0,-1]);this.sides[1].show().setSize(this.size,d).anchorTo(e,"tr",[-1,0]);this.sides[3].show().setSize(this.size,d).anchorTo(e,"tl",[-1,0]);this.curEl=f}},this);this.unframeTask=new Ext.util.DelayedTask(function(){if(this.initialized){this.sides[0].hide();this.sides[1].hide();this.sides[2].hide();this.sides[3].hide();this.curEl=null}},this);this.initialized=true}},frame:function(a){this.init();this.unframeTask.cancel();this.frameTask.delay(2,false,false,[a])},unframe:function(){this.init();this.unframeTask.delay(2)},setSize:function(a){this.size=a},setColor:function(a){this.color=a}});Ext.a11y.FocusFrame=new Ext.a11y.Frame(2,"15428B");Ext.a11y.RelayFrame=new Ext.a11y.Frame(1,"6B8CBF");Ext.a11y.Focusable=Ext.extend(Ext.util.Observable,{constructor:function(b,d,c,a){Ext.a11y.Focusable.superclass.constructor.call(this);this.addEvents("focus","blur","left","right","up","down","esc","enter","space");if(b instanceof Ext.Component){this.el=b.el;this.setComponent(b)}else{this.el=Ext.get(b);this.setComponent(null)}this.setRelayTo(d);this.setNoFrame(c);this.setFrameEl(a);this.init();Ext.a11y.FocusMgr.register(this)},init:function(){this.el.dom.tabIndex="1";this.el.addClass("x-a11y-focusable");this.el.on({focus:this.onFocus,blur:this.onBlur,keydown:this.onKeyDown,scope:this})},setRelayTo:function(a){this.relayTo=a?Ext.a11y.FocusMgr.get(a):null},setNoFrame:function(a){this.noFrame=(a===true)?true:false},setFrameEl:function(a){this.frameEl=a&&Ext.get(a)||this.el},setComponent:function(a){this.component=a||null},onKeyDown:function(g,d){var b=g.getKey(),a=Ext.a11y.Focusable.SpecialKeys,c,f;f=(d!==this.el.dom)?Ext.a11y.FocusMgr.get(d,true):this;if(!f){f=Ext.a11y.FocusMgr.get(Ext.fly(d).parent(".x-a11y-focusable"))}if(a[b]!==undefined){c=this.fireEvent(a[b],g,d,f,this)}if(c===false||this.fireEvent("keydown",g,d,f,this)===false){g.stopEvent()}},focus:function(){this.el.dom.focus()},blur:function(){this.el.dom.blur()},onFocus:function(b,a){this.el.addClass("x-a11y-focused");if(this.relayTo){this.relayTo.el.addClass("x-a11y-focused-relay");if(!this.relayTo.noFrame){Ext.a11y.FocusFrame.frame(this.relayTo.frameEl)}if(!this.noFrame){Ext.a11y.RelayFrame.frame(this.frameEl)}}else{if(!this.noFrame){Ext.a11y.FocusFrame.frame(this.frameEl)}}this.fireEvent("focus",b,a,this)},onBlur:function(b,a){if(this.relayTo){this.relayTo.el.removeClass("x-a11y-focused-relay");Ext.a11y.RelayFrame.unframe()}this.el.removeClass("x-a11y-focused");Ext.a11y.FocusFrame.unframe();this.fireEvent("blur",b,a,this)},destroy:function(){this.el.un("keydown",this.onKeyDown);this.el.un("focus",this.onFocus);this.el.un("blur",this.onBlur);this.el.removeClass("x-a11y-focusable");this.el.removeClass("x-a11y-focused");if(this.relayTo){this.relayTo.el.removeClass("x-a11y-focused-relay")}}});Ext.a11y.FocusItem=Ext.extend(Object,{constructor:function(b,a){Ext.a11y.FocusItem.superclass.constructor.call(this);this.el=Ext.get(b);this.fi=new Ext.a11y.Focusable(b);this.fi.setComponent(this);this.fi.on("tab",this.onTab,this);this.enableTabbing=a===true?true:false},getEnterItem:function(){if(this.enableTabbing){var a=this.getFocusItems();if(a&&a.length){return a[0]}}},getFocusItems:function(){if(this.enableTabbing){return this.el.query("a, button, input, select")}return null},onTab:function(d,c){var a=this.getFocusItems(),b;if(a&&a.length&&(b=a.indexOf(c))!==-1){if(d.shiftKey&&b>0){d.stopEvent();a[b-1].focus();Ext.a11y.FocusFrame.frame.defer(20,Ext.a11y.FocusFrame,[this.el]);return}else{if(!d.shiftKey&&b<a.length-1){d.stopEvent();a[b+1].focus();Ext.a11y.FocusFrame.frame.defer(20,Ext.a11y.FocusFrame,[this.el]);return}}}},focus:function(){if(this.enableTabbing){var a=this.getFocusItems();if(a&&a.length){a[0].focus();Ext.a11y.FocusFrame.frame.defer(20,Ext.a11y.FocusFrame,[this.el]);return}}this.fi.focus()},blur:function(){this.fi.blur()}});Ext.a11y.FocusMgr=function(){var a=new Ext.util.MixedCollection();return{register:function(b){a.add(b.el&&Ext.id(b.el),b)},unregister:function(b){a.remove(b)},get:function(c,b){return a.get(Ext.id(c))||(b?false:new Ext.a11y.Focusable(c))},all:a}}();Ext.a11y.Focusable.SpecialKeys={};Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.LEFT]="left";Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.RIGHT]="right";Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.DOWN]="down";Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.UP]="up";Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.ESC]="esc";Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.ENTER]="enter";Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.SPACE]="space";Ext.a11y.Focusable.SpecialKeys[Ext.EventObjectImpl.prototype.TAB]="tab";Ext.util.Observable.observeClass(Ext.Component);Ext.Component.on("render",function(a){a.initFocus();a.initARIA()});Ext.override(Ext.Component,{initFocus:Ext.emptyFn,initARIA:Ext.emptyFn});Ext.override(Ext.Container,{isFocusable:true,noFocus:false,initFocus:function(){if(!this.fi&&!this.noFocus){this.fi=new Ext.a11y.Focusable(this)}this.mon(this.fi,{focus:this.onFocus,blur:this.onBlur,tab:this.onTab,enter:this.onEnter,esc:this.onEsc,scope:this});if(this.hidden){this.isFocusable=false}this.on("show",function(){this.isFocusable=true},this);this.on("hide",function(){this.isFocusable=false},this)},focus:function(){this.fi.focus()},blur:function(){this.fi.blur()},enter:function(){var a=this.getEnterItem();if(a){a.focus()}},onFocus:Ext.emptyFn,onBlur:Ext.emptyFn,onTab:function(f,b,d){var a=d.relayTo||d;if(a.component&&a.component!==this){f.stopEvent();var c=f.shiftKey?this.getPreviousFocus(a.component):this.getNextFocus(a.component);c.focus()}},onEnter:function(c,a,b){if(b.component&&b.component===this){c.stopEvent();this.enter()}c.stopPropagation()},onEsc:function(c,b){c.preventDefault();if(b===this.el.dom){if(this.ownerCt){this.ownerCt.focus()}}else{if(this.ownerCt&&this.ownerCt.isFocusable){var a=this.ownerCt.getFocusItems();if(a&&a.getCount()>1){c.stopEvent()}}this.focus()}},getFocusItems:function(){return this.items&&this.items.filterBy(function(a){return a.isFocusable})||null},getEnterItem:function(){var a=this.getFocusItems(),b=a?a.getCount():0;if(b===1){return a.first().getEnterItem&&a.first().getEnterItem()||a.first()}else{if(b>1){return a.first()}}},getNextFocus:function(e){var a=this.getFocusItems(),c=e,b=a.indexOf(e),d=a.getCount();if(b===d-1){c=a.first()}else{c=a.get(b+1)}return c},getPreviousFocus:function(e){var a=this.getFocusItems(),d=e,b=a.indexOf(e),c=a.getCount();if(b===0){d=a.last()}else{d=a.get(b-1)}return d},getFocusable:function(){return this.fi}});Ext.override(Ext.Panel,{getFocusItems:function(){var a=Ext.Panel.superclass.getFocusItems.call(this),b=null;if(!a){a=new Ext.util.MixedCollection();this.bodyFocus=this.bodyFocus||new Ext.a11y.FocusItem(this.body,this.enableTabbing);a.add("body",this.bodyFocus)}if(this.tbar&&this.topToolbar){a.insert(0,this.topToolbar)}if(this.bbar&&this.bottomToolbar){a.add(this.bottomToolbar)}if(this.fbar){a.add(this.fbar)}return a}});Ext.override(Ext.TabPanel,{initFocus:function(){Ext.TabPanel.superclass.initFocus.call(this);this.mon(this.fi,{left:this.onLeft,right:this.onRight,scope:this})},onLeft:function(b){if(!this.activeTab){return}b.stopEvent();var a=this.items.itemAt(this.items.indexOf(this.activeTab)-1);if(a){this.setActiveTab(a)}return false},onRight:function(b){if(!this.activeTab){return}b.stopEvent();var a=this.items.itemAt(this.items.indexOf(this.activeTab)+1);if(a){this.setActiveTab(a)}return false}});Ext.override(Ext.tree.TreeNodeUI,{focus:function(){this.node.getOwnerTree().bodyFocus.focus()}});Ext.override(Ext.tree.TreePanel,{afterRender:function(){Ext.tree.TreePanel.superclass.afterRender.call(this);this.root.render();if(!this.rootVisible){this.root.renderChildren()}this.bodyFocus=new Ext.a11y.FocusItem(this.body.down(".x-tree-root-ct"));this.bodyFocus.fi.setFrameEl(this.body)}});Ext.override(Ext.grid.GridPanel,{initFocus:function(){Ext.grid.GridPanel.superclass.initFocus.call(this);this.bodyFocus=new Ext.a11y.FocusItem(this.view.focusEl);this.bodyFocus.fi.setFrameEl(this.body)}});Ext.override(Ext.Button,{isFocusable:true,noFocus:false,initFocus:function(){Ext.Button.superclass.initFocus.call(this);this.fi=this.fi||new Ext.a11y.Focusable(this.btnEl,null,null,this.el);this.fi.setComponent(this);this.mon(this.fi,{focus:this.onFocus,blur:this.onBlur,scope:this});if(this.menu){this.mon(this.fi,"down",this.showMenu,this);this.on("menuhide",this.focus,this)}if(this.hidden){this.isFocusable=false}this.on("show",function(){this.isFocusable=true},this);this.on("hide",function(){this.isFocusable=false},this)},focus:function(){this.fi.focus()},blur:function(){this.fi.blur()},onFocus:function(){if(!this.disabled){this.el.addClass("x-btn-focus")}},onBlur:function(){this.el.removeClass("x-btn-focus")}});Ext.override(Ext.Toolbar,{initFocus:function(){Ext.Toolbar.superclass.initFocus.call(this);this.mon(this.fi,{left:this.onLeft,right:this.onRight,scope:this});this.on("focus",this.onButtonFocus,this,{stopEvent:true})},addItem:function(a){Ext.Toolbar.superclass.add.apply(this,arguments);if(a.rendered&&a.fi!==undefined){a.fi.setRelayTo(this.el);this.relayEvents(a.fi,["focus"])}else{a.on("render",function(){if(a.fi!==undefined){a.fi.setRelayTo(this.el);this.relayEvents(a.fi,["focus"])}},this,{single:true})}return a},onFocus:function(){var a=this.getFocusItems();if(a&&a.getCount()>0){if(this.lastFocus&&a.indexOf(this.lastFocus)!==-1){this.lastFocus.focus()}else{a.first().focus()}}},onButtonFocus:function(c,a,b){this.lastFocus=b.component||null},onLeft:function(c,a,b){c.stopEvent();this.getPreviousFocus(b.component).focus()},onRight:function(c,a,b){c.stopEvent();this.getNextFocus(b.component).focus()},getEnterItem:Ext.emptyFn,onTab:Ext.emptyFn,onEsc:Ext.emptyFn});Ext.override(Ext.menu.BaseItem,{initFocus:function(){this.fi=new Ext.a11y.Focusable(this,this.parentMenu&&this.parentMenu.el||null,true)}});Ext.override(Ext.menu.Menu,{initFocus:function(){this.fi=new Ext.a11y.Focusable(this);this.focusEl=this.fi}});Ext.a11y.WindowMgr=new Ext.WindowGroup();Ext.apply(Ext.WindowMgr,{bringToFront:function(a){Ext.a11y.WindowMgr.bringToFront.call(this,a);if(a.modal){a.enter()}else{a.focus()}}});Ext.override(Ext.Window,{initFocus:function(){Ext.Window.superclass.initFocus.call(this);this.on("beforehide",function(){Ext.a11y.RelayFrame.unframe();Ext.a11y.FocusFrame.unframe()})}});Ext.override(Ext.form.Field,{isFocusable:true,noFocus:false,initFocus:function(){this.fi=this.fi||new Ext.a11y.Focusable(this,null,true);Ext.form.Field.superclass.initFocus.call(this);if(this.hidden){this.isFocusable=false}this.on("show",function(){this.isFocusable=true},this);this.on("hide",function(){this.isFocusable=false},this)}});Ext.override(Ext.FormPanel,{initFocus:function(){Ext.FormPanel.superclass.initFocus.call(this);this.on("focus",this.onFieldFocus,this,{stopEvent:true})},createForm:function(){delete this.initialConfig.listeners;var a=new Ext.form.BasicForm(null,this.initialConfig);a.afterMethod("add",this.formItemAdd,this);return a},formItemAdd:function(a){a.on("render",function(b){b.fi.setRelayTo(this.el);this.relayEvents(b.fi,["focus"])},this,{single:true})},onFocus:function(){var a=this.getFocusItems();if(a&&a.getCount()>0){if(this.lastFocus&&a.indexOf(this.lastFocus)!==-1){this.lastFocus.focus()}else{a.first().focus()}}},onFieldFocus:function(c,a,b){this.lastFocus=b.component||null},onTab:function(d,a,c){if(c.relayTo.component===this){var b=d.shiftKey?this.getPreviousFocus(c.component):this.getNextFocus(c.component);if(b){ev.stopEvent();b.focus();return}}Ext.FormPanel.superclass.onTab.apply(this,arguments)},getNextFocus:function(d){var a=this.getFocusItems(),b=a.indexOf(d),c=a.getCount();return(b<c-1)?a.get(b+1):false},getPreviousFocus:function(d){var a=this.getFocusItems(),b=a.indexOf(d),c=a.getCount();return(b>0)?a.get(b-1):false}});Ext.override(Ext.Viewport,{initFocus:function(){Ext.Viewport.superclass.initFocus.apply(this);this.mon(Ext.get(document),"focus",this.focus,this);this.mon(Ext.get(document),"blur",this.blur,this);this.fi.setNoFrame(true)},onTab:function(h,b,g,d){h.stopEvent();if(g===d){items=this.getFocusItems();if(items&&items.getCount()>0){items.first().focus()}}else{var a=g.relayTo||g;var c=h.shiftKey?this.getPreviousFocus(a.component):this.getNextFocus(a.component);c.focus()}}})})();Ext.ux.GMapPanel=Ext.extend(Ext.Panel,{initComponent:function(){var a={plain:true,zoomLevel:3,yaw:180,pitch:0,zoom:0,gmapType:"map",border:false};Ext.applyIf(this,a);Ext.ux.GMapPanel.superclass.initComponent.call(this)},afterRender:function(){var b=this.ownerCt.getSize();Ext.applyIf(this,b);Ext.ux.GMapPanel.superclass.afterRender.call(this);if(this.gmapType==="map"){this.gmap=new GMap2(this.body.dom)}if(this.gmapType==="panorama"){this.gmap=new GStreetviewPanorama(this.body.dom)}if(typeof this.addControl=="object"&&this.gmapType==="map"){this.gmap.addControl(this.addControl)}if(typeof this.setCenter==="object"){if(typeof this.setCenter.geoCodeAddr==="string"){this.geoCodeLookup(this.setCenter.geoCodeAddr)}else{if(this.gmapType==="map"){var a=new GLatLng(this.setCenter.lat,this.setCenter.lng);this.gmap.setCenter(a,this.zoomLevel)}if(typeof this.setCenter.marker==="object"&&typeof a==="object"){this.addMarker(a,this.setCenter.marker,this.setCenter.marker.clear)}}if(this.gmapType==="panorama"){this.gmap.setLocationAndPOV(new GLatLng(this.setCenter.lat,this.setCenter.lng),{yaw:this.yaw,pitch:this.pitch,zoom:this.zoom})}}GEvent.bind(this.gmap,"load",this,function(){this.onMapReady()})},onMapReady:function(){this.addMarkers(this.markers);this.addMapControls();this.addOptions()},onResize:function(a,b){if(typeof this.getMap()=="object"){this.gmap.checkResize()}Ext.ux.GMapPanel.superclass.onResize.call(this,a,b)},setSize:function(c,a,b){if(typeof this.getMap()=="object"){this.gmap.checkResize()}Ext.ux.GMapPanel.superclass.setSize.call(this,c,a,b)},getMap:function(){return this.gmap},getCenter:function(){return this.getMap().getCenter()},getCenterLatLng:function(){var a=this.getCenter();return{lat:a.lat(),lng:a.lng()}},addMarkers:function(c){if(Ext.isArray(c)){for(var b=0;b<c.length;b++){var a=new GLatLng(c[b].lat,c[b].lng);this.addMarker(a,c[b].marker,false,c[b].setCenter,c[b].listeners)}}},addMarker:function(c,d,b,a,e){Ext.applyIf(d,G_DEFAULT_ICON);if(b===true){this.getMap().clearOverlays()}if(a===true){this.getMap().setCenter(c,this.zoomLevel)}var f=new GMarker(c,d);if(typeof e==="object"){for(evt in e){GEvent.bind(f,evt,this,e[evt])}}this.getMap().addOverlay(f)},addMapControls:function(){if(this.gmapType==="map"){if(Ext.isArray(this.mapControls)){for(i=0;i<this.mapControls.length;i++){this.addMapControl(this.mapControls[i])}}else{if(typeof this.mapControls==="string"){this.addMapControl(this.mapControls)}else{if(typeof this.mapControls==="object"){this.getMap().addControl(this.mapControls)}}}}},addMapControl:function(b){var a=window[b];if(typeof a==="function"){this.getMap().addControl(new a())}},addOptions:function(){if(Ext.isArray(this.mapConfOpts)){var a;for(i=0;i<this.mapConfOpts.length;i++){this.addOption(this.mapConfOpts[i])}}else{if(typeof this.mapConfOpts==="string"){this.addOption(this.mapConfOpts)}}},addOption:function(b){var a=this.getMap()[b];if(typeof a==="function"){this.getMap()[b]()}},geoCodeLookup:function(a){this.geocoder=new GClientGeocoder();this.geocoder.getLocations(a,this.addAddressToMap.createDelegate(this))},addAddressToMap:function(a){if(!a||a.Status.code!=200){Ext.MessageBox.alert("Error","Code "+a.Status.code+" Error Returned")}else{place=a.Placemark[0];addressinfo=place.AddressDetails;accuracy=addressinfo.Accuracy;if(accuracy===0){Ext.MessageBox.alert("Unable to Locate Address","Unable to Locate the Address you provided")}else{if(accuracy<7){Ext.MessageBox.alert("Address Accuracy","The address provided has a low accuracy.<br><br>Level "+accuracy+" Accuracy (8 = Exact Match, 1 = Vague Match)")}else{point=new GLatLng(place.Point.coordinates[1],place.Point.coordinates[0]);if(typeof this.setCenter.marker==="object"&&typeof point==="object"){this.addMarker(point,this.setCenter.marker,this.setCenter.marker.clear,true,this.setCenter.listeners)}}}}}});Ext.reg("gmappanel",Ext.ux.GMapPanel);Ext.ns("Ext.ux.grid");Ext.ux.grid.GroupSummary=Ext.extend(Ext.util.Observable,{constructor:function(a){Ext.apply(this,a);Ext.ux.grid.GroupSummary.superclass.constructor.call(this)},init:function(b){this.grid=b;this.cm=b.getColumnModel();this.view=b.getView();var a=this.view;a.doGroupEnd=this.doGroupEnd.createDelegate(this);a.afterMethod("onColumnWidthUpdated",this.doWidth,this);a.afterMethod("onAllColumnWidthsUpdated",this.doAllWidths,this);a.afterMethod("onColumnHiddenUpdated",this.doHidden,this);a.afterMethod("onUpdate",this.doUpdate,this);a.afterMethod("onRemove",this.doRemove,this);if(!this.rowTpl){this.rowTpl=new Ext.Template('<div class="x-grid3-summary-row" style="{tstyle}">','<table class="x-grid3-summary-table" border="0" cellspacing="0" cellpadding="0" style="{tstyle}">',"<tbody><tr>{cells}</tr></tbody>","</table></div>");this.rowTpl.disableFormats=true}this.rowTpl.compile();if(!this.cellTpl){this.cellTpl=new Ext.Template('<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} {css}" style="{style}">','<div class="x-grid3-cell-inner x-grid3-col-{id}" unselectable="on">{value}</div>',"</td>");this.cellTpl.disableFormats=true}this.cellTpl.compile()},toggleSummaries:function(b){var a=this.grid.getGridEl();if(a){if(b===undefined){b=a.hasClass("x-grid-hide-summary")}a[b?"removeClass":"addClass"]("x-grid-hide-summary")}},renderSummary:function(d,h){h=h||this.view.getColumnData();var j=this.cm.config;var e=[],k,a={},b,l=h.length-1;for(var f=0,g=h.length;f<g;f++){k=h[f];b=j[f];a.id=k.id;a.style=k.style;a.css=f==0?"x-grid3-cell-first ":(f==l?"x-grid3-cell-last ":"");if(b.summaryType||b.summaryRenderer){a.value=(b.summaryRenderer||k.renderer)(d.data[k.name],a,d)}else{a.value=""}if(a.value==undefined||a.value===""){a.value="&#160;"}e[e.length]=this.cellTpl.apply(a)}return this.rowTpl.apply({tstyle:"width:"+this.view.getTotalWidth()+";",cells:e.join("")})},calculate:function(d,k){var g={},a,m,l=this.cm.config,b;for(var e=0,n=d.length;e<n;e++){a=d[e];for(var f=0,h=k.length;f<h;f++){m=k[f];b=l[f];if(b.summaryType){g[m.name]=Ext.ux.grid.GroupSummary.Calculations[b.summaryType](g[m.name]||0,a,m.name,g)}}}return g},doGroupEnd:function(a,d,b,f,c){var e=this.calculate(d.rs,b);a.push("</div>",this.renderSummary({data:e},b),"</div>")},doWidth:function(e,b,d){var c=this.view.getGroups(),g;for(var f=0,a=c.length;f<a;f++){g=c[f].childNodes[2];g.style.width=d;g.firstChild.style.width=d;g.firstChild.rows[0].childNodes[e].style.width=b}},doAllWidths:function(g,d){var a=this.view.getGroups(),k,h,e=g.length;for(var c=0,f=a.length;c<f;c++){k=a[c].childNodes[2];k.style.width=d;k.firstChild.style.width=d;h=k.firstChild.rows[0].childNodes;for(var b=0;b<e;b++){h[b].style.width=g[b]}}},doHidden:function(d,g,c){var b=this.view.getGroups(),f,h=g?"none":"";for(var e=0,a=b.length;e<a;e++){f=b[e].childNodes[2];f.style.width=c;f.firstChild.style.width=c;f.firstChild.rows[0].childNodes[d].style.display=h}},refreshSummary:function(a){return this.refreshSummaryById(this.view.getGroupId(a))},getSummaryNode:function(a){var b=Ext.fly(a,"_gsummary");if(b){return b.down(".x-grid3-summary-row",true)}return null},refreshSummaryById:function(d){var f=document.getElementById(d);if(!f){return false}var b=[];this.grid.store.each(function(g){if(g._groupId==d){b[b.length]=g}});var c=this.view.getColumnData();var h=this.calculate(b,c);var a=this.renderSummary({data:h},c);var e=this.getSummaryNode(d);if(e){f.removeChild(e)}Ext.DomHelper.append(f,a);return true},doUpdate:function(b,a){this.refreshSummaryById(a._groupId)},doRemove:function(d,a,b,c){if(!c){this.refreshSummaryById(a._groupId)}},showSummaryMsg:function(a,d){var b=this.view.getGroupId(a);var c=this.getSummaryNode(b);if(c){c.innerHTML='<div class="x-grid3-summary-msg">'+d+"</div>"}}});Ext.grid.GroupSummary=Ext.ux.grid.GroupSummary;Ext.ux.grid.GroupSummary.Calculations={sum:function(b,a,c){return b+(a.data[c]||0)},count:function(b,a,d,c){return c[d+"count"]?++c[d+"count"]:(c[d+"count"]=1)},max:function(c,b,e,d){var c=b.data[e];var a=d[e+"max"]===undefined?(d[e+"max"]=c):d[e+"max"];return c>a?(d[e+"max"]=c):a},min:function(b,a,e,d){var b=a.data[e];var c=d[e+"min"]===undefined?(d[e+"min"]=b):d[e+"min"];return b<c?(d[e+"min"]=b):c},average:function(b,a,f,e){var g=e[f+"count"]?++e[f+"count"]:(e[f+"count"]=1);var d=(e[f+"total"]=((e[f+"total"]||0)+(a.data[f]||0)));return d===0?0:d/g}};Ext.grid.GroupSummary.Calculations=Ext.ux.grid.GroupSummary.Calculations;Ext.ux.grid.HybridSummary=Ext.extend(Ext.ux.grid.GroupSummary,{calculate:function(b,d){var a=this.view.getGroupField();var c=b[0].data[a];var e=this.getSummaryData(c);return e||Ext.ux.grid.HybridSummary.superclass.calculate.call(this,b,d)},updateSummaryData:function(a,d,c){var b=this.grid.store.reader.jsonData;if(!b.summaryData){b.summaryData={}}b.summaryData[a]=d;if(!c){this.refreshSummary(a)}},getSummaryData:function(a){var b=this.grid.store.reader.jsonData;if(b&&b.summaryData){return b.summaryData[a]}return null}});Ext.grid.HybridSummary=Ext.ux.grid.HybridSummary;Ext.ux.GroupTab=Ext.extend(Ext.Container,{mainItem:0,expanded:true,deferredRender:true,activeTab:null,idDelimiter:"__",headerAsText:false,frame:false,hideBorders:true,initComponent:function(a){Ext.apply(this,a);this.frame=false;Ext.ux.GroupTab.superclass.initComponent.call(this);this.addEvents("activate","deactivate","changemainitem","beforetabchange","tabchange");this.setLayout(new Ext.layout.CardLayout({deferredRender:this.deferredRender}));if(!this.stack){this.stack=Ext.TabPanel.AccessStack()}this.initItems();this.on("beforerender",function(){this.groupEl=this.ownerCt.getGroupEl(this)},this);this.on("add",this.onAdd,this,{target:this});this.on("remove",this.onRemove,this,{target:this});if(this.mainItem!==undefined){var b=(typeof this.mainItem=="object")?this.mainItem:this.items.get(this.mainItem);delete this.mainItem;this.setMainItem(b)}},setActiveTab:function(c){c=this.getComponent(c);if(!c||this.fireEvent("beforetabchange",this,c,this.activeTab)===false){return}if(!this.rendered){this.activeTab=c;return}if(this.activeTab!=c){if(this.activeTab&&this.activeTab!=this.mainItem){var a=this.getTabEl(this.activeTab);if(a){Ext.fly(a).removeClass("x-grouptabs-strip-active")}this.activeTab.fireEvent("deactivate",this.activeTab)}var b=this.getTabEl(c);Ext.fly(b).addClass("x-grouptabs-strip-active");this.activeTab=c;this.stack.add(c);this.layout.setActiveItem(c);if(this.layoutOnTabChange&&c.doLayout){c.doLayout()}if(this.scrolling){this.scrollToTab(c,this.animScroll)}c.fireEvent("activate",c);this.fireEvent("tabchange",this,c)}},getTabEl:function(a){if(a==this.mainItem){return this.groupEl}return Ext.TabPanel.prototype.getTabEl.call(this,a)},onRender:function(b,a){Ext.ux.GroupTab.superclass.onRender.call(this,b,a);this.strip=Ext.fly(this.groupEl).createChild({tag:"ul",cls:"x-grouptabs-sub"});this.tooltip=new Ext.ToolTip({target:this.groupEl,delegate:"a.x-grouptabs-text",trackMouse:true,renderTo:document.body,listeners:{beforeshow:function(e){var d=(e.triggerElement.parentNode===this.mainItem.tabEl)?this.mainItem:this.findById(e.triggerElement.parentNode.id.split(this.idDelimiter)[1]);if(!d.tabTip){return false}e.body.dom.innerHTML=d.tabTip},scope:this}});if(!this.itemTpl){var c=new Ext.Template('<li class="{cls}" id="{id}">','<a onclick="return false;" class="x-grouptabs-text {iconCls}">{text}</a>',"</li>");c.disableFormats=true;c.compile();Ext.ux.GroupTab.prototype.itemTpl=c}this.items.each(this.initTab,this)},afterRender:function(){Ext.ux.GroupTab.superclass.afterRender.call(this);if(this.activeTab!==undefined){var a=(typeof this.activeTab=="object")?this.activeTab:this.items.get(this.activeTab);delete this.activeTab;this.setActiveTab(a)}},initTab:function(c,a){var d=this.strip.dom.childNodes[a];var e=Ext.TabPanel.prototype.getTemplateArgs.call(this,c);if(c===this.mainItem){c.tabEl=this.groupEl;e.cls+=" x-grouptabs-main-item"}var b=d?this.itemTpl.insertBefore(d,e):this.itemTpl.append(this.strip,e);c.tabEl=c.tabEl||b;c.on("disable",this.onItemDisabled,this);c.on("enable",this.onItemEnabled,this);c.on("titlechange",this.onItemTitleChanged,this);c.on("iconchange",this.onItemIconChanged,this);c.on("beforeshow",this.onBeforeShowItem,this)},setMainItem:function(a){a=this.getComponent(a);if(!a||this.fireEvent("changemainitem",this,a,this.mainItem)===false){return}this.mainItem=a},getMainItem:function(){return this.mainItem||null},onBeforeShowItem:function(a){if(a!=this.activeTab){this.setActiveTab(a);return false}},onAdd:function(a,c,b){if(this.rendered){this.initTab.call(this,c,b)}},onRemove:function(c,b){Ext.destroy(Ext.get(this.getTabEl(b)));this.stack.remove(b);b.un("disable",this.onItemDisabled,this);b.un("enable",this.onItemEnabled,this);b.un("titlechange",this.onItemTitleChanged,this);b.un("iconchange",this.onItemIconChanged,this);b.un("beforeshow",this.onBeforeShowItem,this);if(b==this.activeTab){var a=this.stack.next();if(a){this.setActiveTab(a)}else{if(this.items.getCount()>0){this.setActiveTab(0)}else{this.activeTab=null}}}},onBeforeAdd:function(b){var a=b.events?(this.items.containsKey(b.getItemId())?b:null):this.items.get(b);if(a){this.setActiveTab(b);return false}Ext.TabPanel.superclass.onBeforeAdd.apply(this,arguments);var c=b.elements;b.elements=c?c.replace(",header",""):c;b.border=(b.border===true)},onItemDisabled:Ext.TabPanel.prototype.onItemDisabled,onItemEnabled:Ext.TabPanel.prototype.onItemEnabled,onItemTitleChanged:function(b){var a=this.getTabEl(b);if(a){Ext.fly(a).child("a.x-grouptabs-text",true).innerHTML=b.title}},onItemIconChanged:function(d,a,c){var b=this.getTabEl(d);if(b){Ext.fly(b).child("a.x-grouptabs-text").replaceClass(c,a)}},beforeDestroy:function(){Ext.TabPanel.prototype.beforeDestroy.call(this);this.tooltip.destroy()}});Ext.reg("grouptab",Ext.ux.GroupTab);Ext.ns("Ext.ux");Ext.ux.GroupTabPanel=Ext.extend(Ext.TabPanel,{tabPosition:"left",alternateColor:false,alternateCls:"x-grouptabs-panel-alt",defaultType:"grouptab",deferredRender:false,activeGroup:null,initComponent:function(){Ext.ux.GroupTabPanel.superclass.initComponent.call(this);this.addEvents("beforegroupchange","groupchange");this.elements="body,header";this.stripTarget="header";this.tabPosition=this.tabPosition=="right"?"right":"left";this.addClass("x-grouptabs-panel");if(this.tabStyle&&this.tabStyle!=""){this.addClass("x-grouptabs-panel-"+this.tabStyle)}if(this.alternateColor){this.addClass(this.alternateCls)}this.on("beforeadd",function(b,c,a){this.initGroup(c,a)})},initEvents:function(){this.mon(this.strip,"mousedown",this.onStripMouseDown,this)},onRender:function(c,a){Ext.TabPanel.superclass.onRender.call(this,c,a);if(this.plain){var f=this.tabPosition=="top"?"header":"footer";this[f].addClass("x-tab-panel-"+f+"-plain")}var b=this[this.stripTarget];this.stripWrap=b.createChild({cls:"x-tab-strip-wrap ",cn:{tag:"ul",cls:"x-grouptabs-strip x-grouptabs-tab-strip-"+this.tabPosition}});var e=(this.tabPosition=="bottom"?this.stripWrap:null);this.strip=new Ext.Element(this.stripWrap.dom.firstChild);this.header.addClass("x-grouptabs-panel-header");this.bwrap.addClass("x-grouptabs-bwrap");this.body.addClass("x-tab-panel-body-"+this.tabPosition+" x-grouptabs-panel-body");if(!this.itemTpl){var d=new Ext.Template('<li class="{cls}" id="{id}">','<a class="x-grouptabs-expand" onclick="return false;"></a>','<a class="x-grouptabs-text {iconCls}" href="#" onclick="return false;">',"<span>{text}</span></a>","</li>");d.disableFormats=true;d.compile();Ext.ux.GroupTabPanel.prototype.itemTpl=d}this.items.each(this.initGroup,this)},afterRender:function(){Ext.ux.GroupTabPanel.superclass.afterRender.call(this);this.tabJoint=Ext.fly(this.body.dom.parentNode).createChild({cls:"x-tab-joint"});this.addClass("x-tab-panel-"+this.tabPosition);this.header.setWidth(this.tabWidth);if(this.activeGroup!==undefined){var a=(typeof this.activeGroup=="object")?this.activeGroup:this.items.get(this.activeGroup);delete this.activeGroup;this.setActiveGroup(a);a.setActiveTab(a.getMainItem())}},getGroupEl:Ext.TabPanel.prototype.getTabEl,findTargets:function(c){var b=null;var a=c.getTarget("li",this.strip);if(a){b=this.findById(a.id.split(this.idDelimiter)[1]);if(b.disabled){return{expand:null,item:null,el:null}}}return{expand:c.getTarget(".x-grouptabs-expand",this.strip),isGroup:!c.getTarget("ul.x-grouptabs-sub",this.strip),item:b,el:a}},onStripMouseDown:function(b){if(b.button!=0){return}b.preventDefault();var a=this.findTargets(b);if(a.expand){this.toggleGroup(a.el)}else{if(a.item){if(a.isGroup){a.item.setActiveTab(a.item.getMainItem())}else{a.item.ownerCt.setActiveTab(a.item)}}}},expandGroup:function(a){if(a.isXType){a=this.getGroupEl(a)}Ext.fly(a).addClass("x-grouptabs-expanded")},toggleGroup:function(a){if(a.isXType){a=this.getGroupEl(a)}Ext.fly(a).toggleClass("x-grouptabs-expanded");this.syncTabJoint()},syncTabJoint:function(b){if(!this.tabJoint){return}b=b||this.getGroupEl(this.activeGroup);if(b){this.tabJoint.setHeight(Ext.fly(b).getHeight()-2);var a=Ext.isGecko2?0:1;if(this.tabPosition=="left"){this.tabJoint.alignTo(b,"tl-tr",[-2,a])}else{this.tabJoint.alignTo(b,"tr-tl",[1,a])}}else{this.tabJoint.hide()}},getActiveTab:function(){if(!this.activeGroup){return null}return this.activeGroup.getTabEl(this.activeGroup.activeTab)||null},onResize:function(){Ext.ux.GroupTabPanel.superclass.onResize.apply(this,arguments);this.syncTabJoint()},createCorner:function(a,b){return Ext.fly(a).createChild({cls:"x-grouptabs-corner x-grouptabs-corner-"+b})},initGroup:function(f,b){var d=this.strip.dom.childNodes[b];var e=this.getTemplateArgs(f);if(b===0){e.cls+=" x-tab-first"}e.cls+=" x-grouptabs-main";e.text=f.getMainItem().title;var c=d?this.itemTpl.insertBefore(d,e):this.itemTpl.append(this.strip,e);var a=this.createCorner(c,"top-"+this.tabPosition);var g=this.createCorner(c,"bottom-"+this.tabPosition);if(f.expanded){this.expandGroup(c)}if(Ext.isIE6||(Ext.isIE&&!Ext.isStrict)){g.setLeft("-10px");g.setBottom("-5px");a.setLeft("-10px");a.setTop("-5px")}this.mon(f,"changemainitem",this.onGroupChangeMainItem,this);this.mon(f,"beforetabchange",this.onGroupBeforeTabChange,this)},setActiveGroup:function(b){b=this.getComponent(b);if(!b||this.fireEvent("beforegroupchange",this,b,this.activeGroup)===false){return}if(!this.rendered){this.activeGroup=b;return}if(this.activeGroup!=b){if(this.activeGroup){var a=this.getGroupEl(this.activeGroup);if(a){Ext.fly(a).removeClass("x-grouptabs-strip-active")}this.activeGroup.fireEvent("deactivate",this.activeTab)}var c=this.getGroupEl(b);Ext.fly(c).addClass("x-grouptabs-strip-active");this.activeGroup=b;this.stack.add(b);this.layout.setActiveItem(b);this.syncTabJoint(c);b.fireEvent("activate",b);this.fireEvent("groupchange",this,b)}},onGroupBeforeTabChange:function(a,c,b){if(a!==this.activeGroup||c!==b){this.strip.select(".x-grouptabs-sub > li.x-grouptabs-strip-active",true).removeClass("x-grouptabs-strip-active")}this.expandGroup(this.getGroupEl(a));this.setActiveGroup(a)},getFrameHeight:function(){var a=this.el.getFrameWidth("tb");a+=(this.tbar?this.tbar.getHeight():0)+(this.bbar?this.bbar.getHeight():0);return a},adjustBodyWidth:function(a){return a-this.tabWidth}});Ext.reg("grouptabpanel",Ext.ux.GroupTabPanel);Ext.ux.form.ItemSelector=Ext.extend(Ext.form.Field,{hideNavIcons:false,imagePath:"",iconUp:"up2.gif",iconDown:"down2.gif",iconLeft:"left2.gif",iconRight:"right2.gif",iconTop:"top2.gif",iconBottom:"bottom2.gif",drawUpIcon:true,drawDownIcon:true,drawLeftIcon:true,drawRightIcon:true,drawTopIcon:true,drawBotIcon:true,delimiter:",",bodyStyle:null,border:false,defaultAutoCreate:{tag:"div"},multiselects:null,initComponent:function(){Ext.ux.form.ItemSelector.superclass.initComponent.call(this);this.addEvents({rowdblclick:true,change:true})},onRender:function(d,a){Ext.ux.form.ItemSelector.superclass.onRender.call(this,d,a);var h=[{legend:"Available",draggable:true,droppable:true,width:100,height:100},{legend:"Selected",droppable:true,draggable:true,width:100,height:100}];this.fromMultiselect=new Ext.ux.form.MultiSelect(Ext.applyIf(this.multiselects[0],h[0]));this.fromMultiselect.on("dblclick",this.onRowDblClick,this);this.toMultiselect=new Ext.ux.form.MultiSelect(Ext.applyIf(this.multiselects[1],h[1]));this.toMultiselect.on("dblclick",this.onRowDblClick,this);var g=new Ext.Panel({bodyStyle:this.bodyStyle,border:this.border,layout:"table",layoutConfig:{columns:3}});g.add(this.fromMultiselect);var c=new Ext.Panel({header:false});g.add(c);g.add(this.toMultiselect);g.render(this.el);c.el.down("."+c.bwrapCls).remove();if(this.imagePath!=""&&this.imagePath.charAt(this.imagePath.length-1)!="/"){this.imagePath+="/"}this.iconUp=this.imagePath+(this.iconUp||"up2.gif");this.iconDown=this.imagePath+(this.iconDown||"down2.gif");this.iconLeft=this.imagePath+(this.iconLeft||"left2.gif");this.iconRight=this.imagePath+(this.iconRight||"right2.gif");this.iconTop=this.imagePath+(this.iconTop||"top2.gif");this.iconBottom=this.imagePath+(this.iconBottom||"bottom2.gif");var f=c.getEl();this.toTopIcon=f.createChild({tag:"img",src:this.iconTop,style:{cursor:"pointer",margin:"2px"}});f.createChild({tag:"br"});this.upIcon=f.createChild({tag:"img",src:this.iconUp,style:{cursor:"pointer",margin:"2px"}});f.createChild({tag:"br"});this.addIcon=f.createChild({tag:"img",src:this.iconRight,style:{cursor:"pointer",margin:"2px"}});f.createChild({tag:"br"});this.removeIcon=f.createChild({tag:"img",src:this.iconLeft,style:{cursor:"pointer",margin:"2px"}});f.createChild({tag:"br"});this.downIcon=f.createChild({tag:"img",src:this.iconDown,style:{cursor:"pointer",margin:"2px"}});f.createChild({tag:"br"});this.toBottomIcon=f.createChild({tag:"img",src:this.iconBottom,style:{cursor:"pointer",margin:"2px"}});this.toTopIcon.on("click",this.toTop,this);this.upIcon.on("click",this.up,this);this.downIcon.on("click",this.down,this);this.toBottomIcon.on("click",this.toBottom,this);this.addIcon.on("click",this.fromTo,this);this.removeIcon.on("click",this.toFrom,this);if(!this.drawUpIcon||this.hideNavIcons){this.upIcon.dom.style.display="none"}if(!this.drawDownIcon||this.hideNavIcons){this.downIcon.dom.style.display="none"}if(!this.drawLeftIcon||this.hideNavIcons){this.addIcon.dom.style.display="none"}if(!this.drawRightIcon||this.hideNavIcons){this.removeIcon.dom.style.display="none"}if(!this.drawTopIcon||this.hideNavIcons){this.toTopIcon.dom.style.display="none"}if(!this.drawBotIcon||this.hideNavIcons){this.toBottomIcon.dom.style.display="none"}var b=g.body.first();this.el.setWidth(g.body.first().getWidth());g.body.removeClass();this.hiddenName=this.name;var e={tag:"input",type:"hidden",value:"",name:this.name};this.hiddenField=this.el.createChild(e)},doLayout:function(){if(this.rendered){this.fromMultiselect.fs.doLayout();this.toMultiselect.fs.doLayout()}},afterRender:function(){Ext.ux.form.ItemSelector.superclass.afterRender.call(this);this.toStore=this.toMultiselect.store;this.toStore.on("add",this.valueChanged,this);this.toStore.on("remove",this.valueChanged,this);this.toStore.on("load",this.valueChanged,this);this.valueChanged(this.toStore)},toTop:function(){var c=this.toMultiselect.view.getSelectedIndexes();var a=[];if(c.length>0){c.sort();for(var b=0;b<c.length;b++){record=this.toMultiselect.view.store.getAt(c[b]);a.push(record)}c=[];for(var b=a.length-1;b>-1;b--){record=a[b];this.toMultiselect.view.store.remove(record);this.toMultiselect.view.store.insert(0,record);c.push(((a.length-1)-b))}}this.toMultiselect.view.refresh();this.toMultiselect.view.select(c)},toBottom:function(){var c=this.toMultiselect.view.getSelectedIndexes();var a=[];if(c.length>0){c.sort();for(var b=0;b<c.length;b++){record=this.toMultiselect.view.store.getAt(c[b]);a.push(record)}c=[];for(var b=0;b<a.length;b++){record=a[b];this.toMultiselect.view.store.remove(record);this.toMultiselect.view.store.add(record);c.push((this.toMultiselect.view.store.getCount())-(a.length-b))}}this.toMultiselect.view.refresh();this.toMultiselect.view.select(c)},up:function(){var a=null;var c=this.toMultiselect.view.getSelectedIndexes();c.sort();var d=[];if(c.length>0){for(var b=0;b<c.length;b++){a=this.toMultiselect.view.store.getAt(c[b]);if((c[b]-1)>=0){this.toMultiselect.view.store.remove(a);this.toMultiselect.view.store.insert(c[b]-1,a);d.push(c[b]-1)}}this.toMultiselect.view.refresh();this.toMultiselect.view.select(d)}},down:function(){var a=null;var c=this.toMultiselect.view.getSelectedIndexes();c.sort();c.reverse();var d=[];if(c.length>0){for(var b=0;b<c.length;b++){a=this.toMultiselect.view.store.getAt(c[b]);if((c[b]+1)<this.toMultiselect.view.store.getCount()){this.toMultiselect.view.store.remove(a);this.toMultiselect.view.store.insert(c[b]+1,a);d.push(c[b]+1)}}this.toMultiselect.view.refresh();this.toMultiselect.view.select(d)}},fromTo:function(){var e=this.fromMultiselect.view.getSelectedIndexes();var b=[];if(e.length>0){for(var d=0;d<e.length;d++){record=this.fromMultiselect.view.store.getAt(e[d]);b.push(record)}if(!this.allowDup){e=[]}for(var d=0;d<b.length;d++){record=b[d];if(this.allowDup){var a=new Ext.data.Record();record.id=a.id;delete a;this.toMultiselect.view.store.add(record)}else{this.fromMultiselect.view.store.remove(record);this.toMultiselect.view.store.add(record);e.push((this.toMultiselect.view.store.getCount()-1))}}}this.toMultiselect.view.refresh();this.fromMultiselect.view.refresh();var c=this.toMultiselect.store.sortInfo;if(c){this.toMultiselect.store.sort(c.field,c.direction)}this.toMultiselect.view.select(e)},toFrom:function(){var d=this.toMultiselect.view.getSelectedIndexes();var a=[];if(d.length>0){for(var c=0;c<d.length;c++){record=this.toMultiselect.view.store.getAt(d[c]);a.push(record)}d=[];for(var c=0;c<a.length;c++){record=a[c];this.toMultiselect.view.store.remove(record);if(!this.allowDup){this.fromMultiselect.view.store.add(record);d.push((this.fromMultiselect.view.store.getCount()-1))}}}this.fromMultiselect.view.refresh();this.toMultiselect.view.refresh();var b=this.fromMultiselect.store.sortInfo;if(b){this.fromMultiselect.store.sort(b.field,b.direction)}this.fromMultiselect.view.select(d)},valueChanged:function(c){var a=null;var b=[];for(var d=0;d<c.getCount();d++){a=c.getAt(d);b.push(a.get(this.toMultiselect.valueField))}this.hiddenField.dom.value=b.join(this.delimiter);this.fireEvent("change",this,this.getValue(),this.hiddenField.dom.value)},getValue:function(){return this.hiddenField.dom.value},onRowDblClick:function(c,a,b,d){if(c==this.toMultiselect.view){this.toFrom()}else{if(c==this.fromMultiselect.view){this.fromTo()}}return this.fireEvent("rowdblclick",c,a,b,d)},reset:function(){range=this.toMultiselect.store.getRange();this.toMultiselect.store.removeAll();this.fromMultiselect.store.add(range);var a=this.fromMultiselect.store.sortInfo;if(a){this.fromMultiselect.store.sort(a.field,a.direction)}this.valueChanged(this.toMultiselect.store)}});Ext.reg("itemselector",Ext.ux.form.ItemSelector);Ext.ux.ItemSelector=Ext.ux.form.ItemSelector;Ext.ns("Ext.ux.form");Ext.ux.form.MultiSelect=Ext.extend(Ext.form.Field,{ddReorder:false,appendOnly:false,width:100,height:100,displayField:0,valueField:1,allowBlank:true,minSelections:0,maxSelections:Number.MAX_VALUE,blankText:Ext.form.TextField.prototype.blankText,minSelectionsText:"Minimum {0} item(s) required",maxSelectionsText:"Maximum {0} item(s) allowed",delimiter:",",defaultAutoCreate:{tag:"div"},initComponent:function(){Ext.ux.form.MultiSelect.superclass.initComponent.call(this);if(Ext.isArray(this.store)){if(Ext.isArray(this.store[0])){this.store=new Ext.data.ArrayStore({fields:["value","text"],data:this.store});this.valueField="value"}else{this.store=new Ext.data.ArrayStore({fields:["text"],data:this.store,expandData:true});this.valueField="text"}this.displayField="text"}else{this.store=Ext.StoreMgr.lookup(this.store)}this.addEvents({dblclick:true,click:true,change:true,drop:true})},onRender:function(c,b){Ext.ux.form.MultiSelect.superclass.onRender.call(this,c,b);var a=this.fs=new Ext.form.FieldSet({renderTo:this.el,title:this.legend,height:this.height,width:this.width,style:"padding:0;",tbar:this.tbar,bodyStyle:"overflow: auto;"});this.view=new Ext.ListView({multiSelect:true,store:this.store,columns:[{header:"Value",width:1,dataIndex:this.displayField}],hideHeaders:true});a.add(this.view);this.view.on("click",this.onViewClick,this);this.view.on("beforeclick",this.onViewBeforeClick,this);this.view.on("dblclick",this.onViewDblClick,this);this.hiddenName=this.name||Ext.id();var d={tag:"input",type:"hidden",value:"",name:this.hiddenName};this.hiddenField=this.el.createChild(d);this.hiddenField.dom.disabled=this.hiddenName!=this.name;a.doLayout()},afterRender:function(){Ext.ux.form.MultiSelect.superclass.afterRender.call(this);if(this.ddReorder&&!this.dragGroup&&!this.dropGroup){this.dragGroup=this.dropGroup="MultiselectDD-"+Ext.id()}if(this.draggable||this.dragGroup){this.dragZone=new Ext.ux.form.MultiSelect.DragZone(this,{ddGroup:this.dragGroup})}if(this.droppable||this.dropGroup){this.dropZone=new Ext.ux.form.MultiSelect.DropZone(this,{ddGroup:this.dropGroup})}},onViewClick:function(c,a,b,d){this.fireEvent("change",this,this.getValue(),this.hiddenField.dom.value);this.hiddenField.dom.value=this.getValue();this.fireEvent("click",this,d);this.validate()},onViewBeforeClick:function(c,a,b,d){if(this.disabled){return false}},onViewDblClick:function(c,a,b,d){return this.fireEvent("dblclick",c,a,b,d)},getValue:function(a){var d=[];var c=this.view.getSelectedIndexes();if(c.length==0){return""}for(var b=0;b<c.length;b++){d.push(this.store.getAt(c[b]).get((a!=null)?a:this.valueField))}return d.join(this.delimiter)},setValue:function(a){var b;var d=[];this.view.clearSelections();this.hiddenField.dom.value="";if(!a||(a=="")){return}if(!Ext.isArray(a)){a=a.split(this.delimiter)}for(var c=0;c<a.length;c++){b=this.view.store.indexOf(this.view.store.query(this.valueField,new RegExp("^"+a[c]+"$","i")).itemAt(0));d.push(b)}this.view.select(d);this.hiddenField.dom.value=this.getValue();this.validate()},reset:function(){this.setValue("")},getRawValue:function(a){var b=this.getValue(a);if(b.length){b=b.split(this.delimiter)}else{b=[]}return b},setRawValue:function(a){setValue(a)},validateValue:function(a){if(a.length<1){if(this.allowBlank){this.clearInvalid();return true}else{this.markInvalid(this.blankText);return false}}if(a.length<this.minSelections){this.markInvalid(String.format(this.minSelectionsText,this.minSelections));return false}if(a.length>this.maxSelections){this.markInvalid(String.format(this.maxSelectionsText,this.maxSelections));return false}return true},disable:function(){this.disabled=true;this.hiddenField.dom.disabled=true;this.fs.disable()},enable:function(){this.disabled=false;this.hiddenField.dom.disabled=false;this.fs.enable()},destroy:function(){Ext.destroy(this.fs,this.dragZone,this.dropZone);Ext.ux.form.MultiSelect.superclass.destroy.call(this)}});Ext.reg("multiselect",Ext.ux.form.MultiSelect);Ext.ux.Multiselect=Ext.ux.form.MultiSelect;Ext.ux.form.MultiSelect.DragZone=function(d,c){this.ms=d;this.view=d.view;var b=c.ddGroup||"MultiselectDD";var a;if(Ext.isArray(b)){a=b.shift()}else{a=b;b=null}Ext.ux.form.MultiSelect.DragZone.superclass.constructor.call(this,this.ms.fs.body,{containerScroll:true,ddGroup:a});this.setDraggable(b)};Ext.extend(Ext.ux.form.MultiSelect.DragZone,Ext.dd.DragZone,{onInitDrag:function(a,c){var b=Ext.get(this.dragData.ddel.cloneNode(true));this.proxy.update(b.dom);b.setWidth(b.child("em").getWidth());this.onStartDrag(a,c);return true},collectSelection:function(b){b.repairXY=Ext.fly(this.view.getSelectedNodes()[0]).getXY();var a=0;this.view.store.each(function(d){if(this.view.isSelected(a)){var e=this.view.getNode(a);var c=e.cloneNode(true);c.id=Ext.id();b.ddel.appendChild(c);b.records.push(this.view.store.getAt(a));b.viewNodes.push(e)}a++},this)},onEndDrag:function(a,b){var c=Ext.get(this.dragData.ddel);if(c&&c.hasClass("multi-proxy")){c.remove()}},getDragData:function(d){var c=this.view.findItemFromChild(d.getTarget());if(c){if(!this.view.isSelected(c)&&!d.ctrlKey&&!d.shiftKey){this.view.select(c);this.ms.setValue(this.ms.getValue())}if(this.view.getSelectionCount()==0||d.ctrlKey||d.shiftKey){return false}var b={sourceView:this.view,viewNodes:[],records:[]};if(this.view.getSelectionCount()==1){var a=this.view.getSelectedIndexes()[0];var f=this.view.getNode(a);b.viewNodes.push(b.ddel=f);b.records.push(this.view.store.getAt(a));b.repairXY=Ext.fly(f).getXY()}else{b.ddel=document.createElement("div");b.ddel.className="multi-proxy";this.collectSelection(b)}return b}return false},getRepairXY:function(a){return this.dragData.repairXY},setDraggable:function(a){if(!a){return}if(Ext.isArray(a)){Ext.each(a,this.setDraggable,this);return}this.addToGroup(a)}});Ext.ux.form.MultiSelect.DropZone=function(d,c){this.ms=d;this.view=d.view;var b=c.ddGroup||"MultiselectDD";var a;if(Ext.isArray(b)){a=b.shift()}else{a=b;b=null}Ext.ux.form.MultiSelect.DropZone.superclass.constructor.call(this,this.ms.fs.body,{containerScroll:true,ddGroup:a});this.setDroppable(b)};Ext.extend(Ext.ux.form.MultiSelect.DropZone,Ext.dd.DropZone,{getTargetFromEvent:function(b){var a=b.getTarget();return a},getDropPoint:function(g,k,d){if(k==this.ms.fs.body.dom){return"below"}var f=Ext.lib.Dom.getY(k),a=f+k.offsetHeight;var j=f+(a-f)/2;var h=Ext.lib.Event.getPageY(g);if(h<=j){return"above"}else{return"below"}},isValidDropPoint:function(b,e,a){if(!a.viewNodes||(a.viewNodes.length!=1)){return true}var c=a.viewNodes[0];if(c==e){return false}if((b=="below")&&(e.nextSibling==c)){return false}if((b=="above")&&(e.previousSibling==c)){return false}return true},onNodeEnter:function(d,a,c,b){return false},onNodeOver:function(h,a,g,d){var b=this.dropNotAllowed;var f=this.getDropPoint(g,h,a);if(this.isValidDropPoint(f,h,d)){if(this.ms.appendOnly){return"x-tree-drop-ok-below"}if(f){var c;if(f=="above"){b=h.previousSibling?"x-tree-drop-ok-between":"x-tree-drop-ok-above";c="x-view-drag-insert-above"}else{b=h.nextSibling?"x-tree-drop-ok-between":"x-tree-drop-ok-below";c="x-view-drag-insert-below"}if(this.lastInsertClass!=c){Ext.fly(h).replaceClass(this.lastInsertClass,c);this.lastInsertClass=c}}}return b},onNodeOut:function(d,a,c,b){this.removeDropIndicators(d)},onNodeDrop:function(b,k,j,g){if(this.ms.fireEvent("drop",this,b,k,j,g)===false){return false}var l=this.getDropPoint(j,b,k);if(b!=this.ms.fs.body.dom){b=this.view.findItemFromChild(b)}var c=(this.ms.appendOnly||(b==this.ms.fs.body.dom))?this.view.store.getCount():this.view.indexOf(b);if(l=="below"){c++}var d=false;if(g.sourceView==this.view){if(l=="below"){if(g.viewNodes[0]==b){g.viewNodes.shift()}}else{if(g.viewNodes[g.viewNodes.length-1]==b){g.viewNodes.pop()}}if(!g.viewNodes.length){return false}if(c>this.view.store.indexOf(g.records[0])){d="down";c--}}for(var h=0;h<g.records.length;h++){var a=g.records[h];if(g.sourceView){g.sourceView.store.remove(a)}this.view.store.insert(d=="down"?c:c++,a);var f=this.view.store.sortInfo;if(f){this.view.store.sort(f.field,f.direction)}}return true},removeDropIndicators:function(a){if(a){Ext.fly(a).removeClass(["x-view-drag-insert-above","x-view-drag-insert-left","x-view-drag-insert-right","x-view-drag-insert-below"]);this.lastInsertClass="_noclass"}},setDroppable:function(a){if(!a){return}if(Ext.isArray(a)){Ext.each(a,this.setDroppable,this);return}this.addToGroup(a)}});if(!Array.prototype.map){Array.prototype.map=function(b){var a=this.length;if(typeof b!="function"){throw new TypeError()}var e=new Array(a);var d=arguments[1];for(var c=0;c<a;c++){if(c in this){e[c]=b.call(d,this[c],c,this)}}return e}}Ext.ns("Ext.ux.data");Ext.ux.data.PagingMemoryProxy=Ext.extend(Ext.data.MemoryProxy,{constructor:function(a){Ext.ux.data.PagingMemoryProxy.superclass.constructor.call(this);this.data=a},doRequest:function(c,d,b,f,j,k,l){b=b||{};var m;try{m=f.readRecords(this.data)}catch(g){this.fireEvent("loadexception",this,l,null,g);j.call(k,null,l,false);return}if(b.filter!==undefined){m.records=m.records.filter(function(n){if(typeof(n)=="object"){var e=b.filterCol||0;return String(n.data[e]).match(b.filter)?true:false}else{return String(n).match(b.filter)?true:false}});m.totalRecords=m.records.length}if(b.sort!==undefined){var a=String(b.dir).toUpperCase()=="DESC"?-1:1;var h=function(n,e){return n<e};m.records.sort(function(n,e){var o=0;if(typeof(n)=="object"){o=h(n.data[b.sort],e.data[b.sort])*a}else{o=h(n,e)*a}if(o==0){o=(n.index<e.index?-1:1)}return o})}if(b.start!==undefined&&b.limit!==undefined){m.records=m.records.slice(b.start,b.start+b.limit)}j.call(k,m,l,true)}});Ext.data.PagingMemoryProxy=Ext.ux.data.PagingMemoryProxy;Ext.ux.PanelResizer=Ext.extend(Ext.util.Observable,{minHeight:0,maxHeight:10000000,constructor:function(a){Ext.apply(this,a);this.events={};Ext.ux.PanelResizer.superclass.constructor.call(this,a)},init:function(a){this.panel=a;if(this.panel.elements.indexOf("footer")==-1){a.elements+=",footer"}a.on("render",this.onRender,this)},onRender:function(a){this.handle=a.footer.createChild({cls:"x-panel-resize"});this.tracker=new Ext.dd.DragTracker({onStart:this.onDragStart.createDelegate(this),onDrag:this.onDrag.createDelegate(this),onEnd:this.onDragEnd.createDelegate(this),tolerance:3,autoStart:300});this.tracker.initEl(this.handle);a.on("beforedestroy",this.tracker.destroy,this.tracker)},onDragStart:function(a){this.dragging=true;this.startHeight=this.panel.el.getHeight();this.fireEvent("dragstart",this,a)},onDrag:function(a){this.panel.setHeight((this.startHeight-this.tracker.getOffset()[1]).constrain(this.minHeight,this.maxHeight));this.fireEvent("drag",this,a)},onDragEnd:function(a){this.dragging=false;this.fireEvent("dragend",this,a)}});Ext.preg("panelresizer",Ext.ux.PanelResizer);Ext.ux.Portal=Ext.extend(Ext.Panel,{layout:"column",autoScroll:true,cls:"x-portal",defaultType:"portalcolumn",initComponent:function(){Ext.ux.Portal.superclass.initComponent.call(this);this.addEvents({validatedrop:true,beforedragover:true,dragover:true,beforedrop:true,drop:true})},initEvents:function(){Ext.ux.Portal.superclass.initEvents.call(this);this.dd=new Ext.ux.Portal.DropZone(this,this.dropConfig)},beforeDestroy:function(){if(this.dd){this.dd.unreg()}Ext.ux.Portal.superclass.beforeDestroy.call(this)}});Ext.reg("portal",Ext.ux.Portal);Ext.ux.Portal.DropZone=function(a,b){this.portal=a;Ext.dd.ScrollManager.register(a.body);Ext.ux.Portal.DropZone.superclass.constructor.call(this,a.bwrap.dom,b);a.body.ddScrollConfig=this.ddScrollConfig};Ext.extend(Ext.ux.Portal.DropZone,Ext.dd.DropTarget,{ddScrollConfig:{vthresh:50,hthresh:-1,animate:true,increment:200},createEvent:function(a,f,d,b,h,g){return{portal:this.portal,panel:d.panel,columnIndex:b,column:h,position:g,data:d,source:a,rawEvent:f,status:this.dropAllowed}},notifyOver:function(w,u,x){var f=u.getXY(),a=this.portal,o=w.proxy;if(!this.grid){this.grid=this.getGrid()}var b=a.body.dom.clientWidth;if(!this.lastCW){this.lastCW=b}else{if(this.lastCW!=b){this.lastCW=b;a.doLayout();this.grid=this.getGrid()}}var d=0,m=this.grid.columnX,n=false;for(var t=m.length;d<t;d++){if(f[0]<(m[d].x+m[d].w)){n=true;break}}if(!n){d--}var r,l=false,j=0,v=a.items.itemAt(d),q=v.items.items,k=false;for(var t=q.length;j<t;j++){r=q[j];var s=r.el.getHeight();if(s===0){k=true}else{if((r.el.getY()+(s/2))>f[1]){l=true;break}}}j=(l&&r?j:v.items.getCount())+(k?-1:0);var g=this.createEvent(w,u,x,d,v,j);if(a.fireEvent("validatedrop",g)!==false&&a.fireEvent("beforedragover",g)!==false){o.getProxy().setWidth("auto");if(r){o.moveProxy(r.el.dom.parentNode,l?r.el.dom:null)}else{o.moveProxy(v.el.dom,null)}this.lastPos={c:v,col:d,p:k||(l&&r)?j:false};this.scrollPos=a.body.getScroll();a.fireEvent("dragover",g);return g.status}else{return g.status}},notifyOut:function(){delete this.grid},notifyDrop:function(l,g,f){delete this.grid;if(!this.lastPos){return}var j=this.lastPos.c,b=this.lastPos.col,k=this.lastPos.p;var a=this.createEvent(l,g,f,b,j,k!==false?k:j.items.getCount());if(this.portal.fireEvent("validatedrop",a)!==false&&this.portal.fireEvent("beforedrop",a)!==false){l.proxy.getProxy().remove();l.panel.el.dom.parentNode.removeChild(l.panel.el.dom);if(k!==false){if(j==l.panel.ownerCt&&(j.items.items.indexOf(l.panel)<=k)){k++}j.insert(k,l.panel)}else{j.add(l.panel)}j.doLayout();this.portal.fireEvent("drop",a);var m=this.scrollPos.top;if(m){var h=this.portal.body.dom;setTimeout(function(){h.scrollTop=m},10)}}delete this.lastPos},getGrid:function(){var a=this.portal.bwrap.getBox();a.columnX=[];this.portal.items.each(function(b){a.columnX.push({x:b.el.getX(),w:b.el.getWidth()})});return a},unreg:function(){Ext.ux.Portal.DropZone.superclass.unreg.call(this)}});Ext.ux.PortalColumn=Ext.extend(Ext.Container,{layout:"anchor",defaultType:"portlet",cls:"x-portal-column"});Ext.reg("portalcolumn",Ext.ux.PortalColumn);Ext.ux.Portlet=Ext.extend(Ext.Panel,{anchor:"100%",frame:true,collapsible:true,draggable:true,cls:"x-portlet"});Ext.reg("portlet",Ext.ux.Portlet);Ext.ux.ProgressBarPager=Ext.extend(Object,{progBarWidth:225,defaultText:"Loading...",defaultAnimCfg:{duration:1,easing:"bounceOut"},constructor:function(a){if(a){Ext.apply(this,a)}},init:function(a){if(a.displayInfo){this.parent=a;var b=a.items.indexOf(a.displayItem);a.remove(a.displayItem,true);this.progressBar=new Ext.ProgressBar({text:this.defaultText,width:this.progBarWidth,animate:this.defaultAnimCfg});a.displayItem=this.progressBar;a.add(a.displayItem);a.doLayout();Ext.apply(a,this.parentOverrides);this.progressBar.on("render",function(c){c.el.applyStyles("cursor:pointer");c.el.on("click",this.handleProgressBarClick,this)},this);this.progressBar.on({scope:this,beforeDestroy:function(){this.progressBar.el.un("click",this.handleProgressBarClick,this)}})}},handleProgressBarClick:function(j){var d=this.parent;var c=d.displayItem;var f=this.progressBar.getBox();var h=j.getXY();var b=h[0]-f.x;var a=Math.ceil(d.store.getTotalCount()/d.pageSize);var g=Math.ceil(b/(c.width/a));d.changePage(g)},parentOverrides:{updateInfo:function(){if(this.displayItem){var b=this.store.getCount();var a=this.getPageData();var d=this.readPage(a);var e=b==0?this.emptyMsg:String.format(this.displayMsg,this.cursor+1,this.cursor+b,this.store.getTotalCount());d=a.activePage;var c=d/a.pages;this.displayItem.updateProgress(c,e,this.animate||this.defaultAnimConfig)}}}});Ext.preg("progressbarpager",Ext.ux.ProgressBarPager);Ext.ns("Ext.ux.grid");Ext.ux.grid.RowEditor=Ext.extend(Ext.Panel,{floating:true,shadow:false,layout:"hbox",cls:"x-small-editor",buttonAlign:"center",baseCls:"x-row-editor",elements:"header,footer,body",frameWidth:5,buttonPad:3,clicksToEdit:"auto",monitorValid:true,focusDelay:250,errorSummary:true,defaults:{normalWidth:true},initComponent:function(){Ext.ux.grid.RowEditor.superclass.initComponent.call(this);this.addEvents("beforeedit","validateedit","afteredit")},init:function(a){this.grid=a;this.ownerCt=a;if(this.clicksToEdit===2){a.on("rowdblclick",this.onRowDblClick,this)}else{a.on("rowclick",this.onRowClick,this);if(Ext.isIE){a.on("rowdblclick",this.onRowDblClick,this)}}a.getStore().on("remove",function(){this.stopEditing(false)},this);a.on({scope:this,keydown:this.onGridKey,columnresize:this.verifyLayout,columnmove:this.refreshFields,reconfigure:this.refreshFields,destroy:this.destroy,bodyscroll:{buffer:250,fn:this.positionButtons}});a.getColumnModel().on("hiddenchange",this.verifyLayout,this,{delay:1});a.getView().on("refresh",this.stopEditing.createDelegate(this,[]))},refreshFields:function(){this.initFields();this.verifyLayout()},isDirty:function(){var a;this.items.each(function(b){if(String(this.values[b.id])!==String(b.getValue())){a=true;return false}},this);return a},startEditing:function(k,p){if(this.editing&&this.isDirty()){this.showTooltip("You need to commit or cancel your changes");return}this.editing=true;if(typeof k=="object"){k=this.grid.getStore().indexOf(k)}if(this.fireEvent("beforeedit",this,k)!==false){var e=this.grid,l=e.getView();var o=l.getRow(k);var c=e.store.getAt(k);this.record=c;this.rowIndex=k;this.values={};if(!this.rendered){this.render(l.getEditorParent())}var m=Ext.fly(o).getWidth();this.setSize(m);if(!this.initialized){this.initFields()}var n=e.getColumnModel(),d=this.items.items,j,a;for(var b=0,h=n.getColumnCount();b<h;b++){a=this.preEditValue(c,n.getDataIndex(b));j=d[b];j.setValue(a);this.values[j.id]=a||""}this.verifyLayout(true);if(!this.isVisible()){this.setPagePosition(Ext.fly(o).getXY())}else{this.el.setXY(Ext.fly(o).getXY(),{duration:0.15})}if(!this.isVisible()){this.show().doLayout()}if(p!==false){this.doFocus.defer(this.focusDelay,this)}}},stopEditing:function(n){this.editing=false;if(!this.isVisible()){return}if(n===false||!this.isValid()){this.hide();return}var h={},b=this.record,j=false;var m=this.grid.colModel,f=this.items.items;for(var e=0,g=m.getColumnCount();e<g;e++){if(!m.isHidden(e)){var c=m.getDataIndex(e);if(!Ext.isEmpty(c)){var a=b.data[c];var l=this.postEditValue(f[e].getValue(),a,b,c);if(String(a)!==String(l)){h[c]=l;j=true}}}}if(j&&this.fireEvent("validateedit",this,h,b,this.rowIndex)!==false){b.beginEdit();for(var d in h){if(h.hasOwnProperty(d)){b.set(d,h[d])}}b.endEdit();this.fireEvent("afteredit",this,h,b,this.rowIndex)}this.hide()},verifyLayout:function(e){if(this.el&&(this.isVisible()||e===true)){var g=this.grid.getView().getRow(this.rowIndex);this.setSize(Ext.fly(g).getWidth(),Ext.isIE?Ext.fly(g).getHeight()+(Ext.isBorderBox?9:0):undefined);var c=this.grid.colModel,b=this.items.items;for(var d=0,a=c.getColumnCount();d<a;d++){if(!c.isHidden(d)){var f=0;if(d===0){f+=0}if(d===(a-1)){f+=3}else{f+=1}b[d].show();b[d].setWidth(c.getColumnWidth(d)-f)}else{b[d].hide()}}this.doLayout();this.positionButtons()}},slideHide:function(){this.hide()},initFields:function(){var b=this.grid.getColumnModel(),f=Ext.layout.ContainerLayout.prototype.parseMargins;this.removeAll(false);for(var e=0,a=b.getColumnCount();e<a;e++){var g=b.getColumnAt(e);var d=g.getEditor();if(!d){d=g.displayEditor||new Ext.form.DisplayField()}if(e==0){d.margins=f("0 1 2 1")}else{if(e==a-1){d.margins=f("0 0 2 1")}else{d.margins=f("0 1 2")}}d.setWidth(b.getColumnWidth(e));d.column=g;if(d.ownerCt!==this){d.on("focus",this.ensureVisible,this);d.on("specialkey",this.onKey,this)}this.insert(e,d)}this.initialized=true},onKey:function(a,b){if(b.getKey()===b.ENTER){this.stopEditing(true);b.stopPropagation()}},onGridKey:function(c){if(c.getKey()===c.ENTER&&!this.isVisible()){var b=this.grid.getSelectionModel().getSelected();if(b){var a=this.grid.store.indexOf(b);this.startEditing(a);c.stopPropagation()}}},ensureVisible:function(a){if(this.isVisible()){this.grid.getView().ensureVisible(this.rowIndex,this.grid.colModel.getIndexById(a.column.id),true)}},onRowClick:function(b,d,c){if(this.clicksToEdit=="auto"){var a=this.lastClickIndex;this.lastClickIndex=d;if(a!=d&&!this.isVisible()){return}}this.startEditing(d,false);this.doFocus.defer(this.focusDelay,this,[c.getPoint()])},onRowDblClick:function(a,c,b){this.startEditing(c,false);this.doFocus.defer(this.focusDelay,this,[b.getPoint()])},onRender:function(){Ext.ux.grid.RowEditor.superclass.onRender.apply(this,arguments);this.el.swallowEvent(["keydown","keyup","keypress"]);this.btns=new Ext.Panel({baseCls:"x-plain",cls:"x-btns",elements:"body",layout:"table",width:(this.minButtonWidth*2)+(this.frameWidth*2)+(this.buttonPad*4),items:[{ref:"saveBtn",itemId:"saveBtn",xtype:"button",text:this.saveText||"Save",width:this.minButtonWidth,handler:this.stopEditing.createDelegate(this,[true])},{xtype:"button",text:this.cancelText||"Cancel",width:this.minButtonWidth,handler:this.stopEditing.createDelegate(this,[false])}]});this.btns.render(this.bwrap)},afterRender:function(){Ext.ux.grid.RowEditor.superclass.afterRender.apply(this,arguments);this.positionButtons();if(this.monitorValid){this.startMonitoring()}},onShow:function(){if(this.monitorValid){this.startMonitoring()}Ext.ux.grid.RowEditor.superclass.onShow.apply(this,arguments)},onHide:function(){Ext.ux.grid.RowEditor.superclass.onHide.apply(this,arguments);this.stopMonitoring();this.grid.getView().focusRow(this.rowIndex)},positionButtons:function(){if(this.btns){var d=this.el.dom.clientHeight;var b=this.grid.getView();var a=b.scroller.dom.scrollLeft;var c=b.mainBody.getWidth();var e=this.btns.getWidth();this.btns.el.shift({left:(c/2)-(e/2)+a,top:d-2,stopFx:true,duration:0.2})}},preEditValue:function(a,c){var b=a.data[c];return this.autoEncode&&typeof b==="string"?Ext.util.Format.htmlDecode(b):b},postEditValue:function(c,a,b,d){return this.autoEncode&&typeof c=="string"?Ext.util.Format.htmlEncode(c):c},doFocus:function(f){if(this.isVisible()){var d=0;if(f){d=this.getTargetColumnIndex(f)}var b=this.grid.getColumnModel();for(var e=d||0,a=b.getColumnCount();e<a;e++){var g=b.getColumnAt(e);if(!g.hidden&&g.getEditor()){g.getEditor().focus();break}}}},getTargetColumnIndex:function(k){var a=this.grid,j=a.view;var h=k.left;var f=a.colModel.config;var b=0,d=false;for(var e=f.length,g;g=f[b];b++){if(!g.hidden){if(Ext.fly(j.getHeaderCell(b)).getRegion().right>=h){d=b;break}}}return d},startMonitoring:function(){if(!this.bound&&this.monitorValid){this.bound=true;Ext.TaskMgr.start({run:this.bindHandler,interval:this.monitorPoll||200,scope:this})}},stopMonitoring:function(){this.bound=false;if(this.tooltip){this.tooltip.hide()}},isValid:function(){var a=true;this.items.each(function(b){if(!b.isValid(true)){a=false;return false}});return a},bindHandler:function(){if(!this.bound){return false}var a=this.isValid();if(!a&&this.errorSummary){this.showTooltip(this.getErrorText().join(""))}this.btns.saveBtn.setDisabled(!a);this.fireEvent("validation",this,a)},showTooltip:function(b){var a=this.tooltip;if(!a){a=this.tooltip=new Ext.ToolTip({maxWidth:600,cls:"errorTip",width:300,title:"Errors",autoHide:false,anchor:"left",anchorToTarget:true,mouseOffset:[40,0]})}a.initTarget(this.items.last().getEl());if(!a.rendered){a.show();a.hide()}a.body.update(b);a.doAutoWidth();a.show()},getErrorText:function(){var a=["<ul>"];this.items.each(function(b){if(!b.isValid(true)){a.push("<li>",b.activeError,"</li>")}});a.push("</ul>");return a}});Ext.preg("roweditor",Ext.ux.grid.RowEditor);Ext.override(Ext.form.Field,{markInvalid:function(c){if(!this.rendered||this.preventMark){return}c=c||this.invalidText;var a=this.getMessageHandler();if(a){a.mark(this,c)}else{if(this.msgTarget){this.el.addClass(this.invalidClass);var b=Ext.getDom(this.msgTarget);if(b){b.innerHTML=c;b.style.display=this.msgDisplay}}}this.activeError=c;this.fireEvent("invalid",this,c)}});Ext.override(Ext.ToolTip,{doAutoWidth:function(){var a=this.body.getTextWidth();if(this.title){a=Math.max(a,this.header.child("span").getTextWidth(this.title))}a+=this.getFrameWidth()+(this.closable?20:0)+this.body.getPadding("lr")+20;this.setWidth(a.constrain(this.minWidth,this.maxWidth));if(Ext.isIE7&&!this.repainted){this.el.repaint();this.repainted=true}}});Ext.ns("Ext.ux.grid");Ext.ux.grid.RowExpander=Ext.extend(Ext.util.Observable,{expandOnEnter:true,expandOnDblClick:true,header:"",width:20,sortable:false,fixed:true,menuDisabled:true,dataIndex:"",id:"expander",lazyRender:true,enableCaching:true,constructor:function(a){Ext.apply(this,a);this.addEvents({beforeexpand:true,expand:true,beforecollapse:true,collapse:true});Ext.ux.grid.RowExpander.superclass.constructor.call(this);if(this.tpl){if(typeof this.tpl=="string"){this.tpl=new Ext.Template(this.tpl)}this.tpl.compile()}this.state={};this.bodyContent={}},getRowClass:function(a,e,d,c){d.cols=d.cols-1;var b=this.bodyContent[a.id];if(!b&&!this.lazyRender){b=this.getBodyContent(a,e)}if(b){d.body=b}return this.state[a.id]?"x-grid3-row-expanded":"x-grid3-row-collapsed"},init:function(b){this.grid=b;var a=b.getView();a.getRowClass=this.getRowClass.createDelegate(this);a.enableRowBody=true;b.on("render",this.onRender,this);b.on("destroy",this.onDestroy,this)},onRender:function(){var a=this.grid;var b=a.getView().mainBody;b.on("mousedown",this.onMouseDown,this,{delegate:".x-grid3-row-expander"});if(this.expandOnEnter){this.keyNav=new Ext.KeyNav(this.grid.getGridEl(),{enter:this.onEnter,scope:this})}if(this.expandOnDblClick){a.on("rowdblclick",this.onRowDblClick,this)}},onDestroy:function(){this.keyNav.disable();delete this.keyNav;var a=this.grid.getView().mainBody;a.un("mousedown",this.onMouseDown,this)},onRowDblClick:function(a,b,c){this.toggleRow(b)},onEnter:function(h){var f=this.grid;var j=f.getSelectionModel();var b=j.getSelections();for(var c=0,a=b.length;c<a;c++){var d=f.getStore().indexOf(b[c]);this.toggleRow(d)}},getBodyContent:function(a,b){if(!this.enableCaching){return this.tpl.apply(a.data)}var c=this.bodyContent[a.id];if(!c){c=this.tpl.apply(a.data);this.bodyContent[a.id]=c}return c},onMouseDown:function(b,a){b.stopEvent();var c=b.getTarget(".x-grid3-row");this.toggleRow(c)},renderer:function(b,c,a){c.cellAttr='rowspan="2"';return'<div class="x-grid3-row-expander">&#160;</div>'},beforeExpand:function(b,a,c){if(this.fireEvent("beforeexpand",this,b,a,c)!==false){if(this.tpl&&this.lazyRender){a.innerHTML=this.getBodyContent(b,c)}return true}else{return false}},toggleRow:function(a){if(typeof a=="number"){a=this.grid.view.getRow(a)}this[Ext.fly(a).hasClass("x-grid3-row-collapsed")?"expandRow":"collapseRow"](a)},expandRow:function(c){if(typeof c=="number"){c=this.grid.view.getRow(c)}var b=this.grid.store.getAt(c.rowIndex);var a=Ext.DomQuery.selectNode("tr:nth(2) div.x-grid3-row-body",c);if(this.beforeExpand(b,a,c.rowIndex)){this.state[b.id]=true;Ext.fly(c).replaceClass("x-grid3-row-collapsed","x-grid3-row-expanded");this.fireEvent("expand",this,b,a,c.rowIndex)}},collapseRow:function(c){if(typeof c=="number"){c=this.grid.view.getRow(c)}var b=this.grid.store.getAt(c.rowIndex);var a=Ext.fly(c).child("tr:nth(1) div.x-grid3-row-body",true);if(this.fireEvent("beforecollapse",this,b,a,c.rowIndex)!==false){this.state[b.id]=false;Ext.fly(c).replaceClass("x-grid3-row-expanded","x-grid3-row-collapsed");this.fireEvent("collapse",this,b,a,c.rowIndex)}}});Ext.preg("rowexpander",Ext.ux.grid.RowExpander);Ext.grid.RowExpander=Ext.ux.grid.RowExpander;Ext.ns("Ext.ux.layout");Ext.ux.layout.RowLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,isValidParent:function(b,a){return b.getEl().dom.parentNode==this.innerCt.dom},onLayout:function(f,j){var b=f.items.items,g=b.length,a,c;if(!this.innerCt){j.addClass("ux-row-layout-ct");this.innerCt=j.createChild({cls:"x-row-inner"})}this.renderAll(f,this.innerCt);var k=j.getViewSize();if(k.width<1&&k.height<1){return}var d=k.height-j.getPadding("tb"),e=d;this.innerCt.setSize({height:d});for(c=0;c<g;c++){a=b[c];if(!a.rowHeight){e-=(a.getSize().height+a.getEl().getMargins("tb"))}}e=e<0?0:e;for(c=0;c<g;c++){a=b[c];if(a.rowHeight){a.setSize({height:Math.floor(a.rowHeight*e)-a.getEl().getMargins("tb")})}}}});Ext.Container.LAYOUTS["ux.row"]=Ext.ux.layout.RowLayout;Ext.ns("Ext.ux.form");Ext.ux.form.SearchField=Ext.extend(Ext.form.TwinTriggerField,{initComponent:function(){Ext.ux.form.SearchField.superclass.initComponent.call(this);this.on("specialkey",function(a,b){if(b.getKey()==b.ENTER){this.onTrigger2Click()}},this)},validationEvent:false,validateOnBlur:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",hideTrigger1:true,width:180,hasSearch:false,paramName:"query",onTrigger1Click:function(){if(this.hasSearch){this.el.dom.value="";var a={start:0};this.store.baseParams=this.store.baseParams||{};this.store.baseParams[this.paramName]="";this.store.reload({params:a});this.triggers[0].hide();this.hasSearch=false}},onTrigger2Click:function(){var a=this.getRawValue();if(a.length<1){this.onTrigger1Click();return}var b={start:0};this.store.baseParams=this.store.baseParams||{};this.store.baseParams[this.paramName]=a;this.store.reload({params:b});this.hasSearch=true;this.triggers[0].show()}});Ext.ns("Ext.ux.form");Ext.ux.form.SelectBox=Ext.extend(Ext.form.ComboBox,{constructor:function(a){this.searchResetDelay=1000;a=a||{};a=Ext.apply(a||{},{editable:false,forceSelection:true,rowHeight:false,lastSearchTerm:false,triggerAction:"all",mode:"local"});Ext.ux.form.SelectBox.superclass.constructor.apply(this,arguments);this.lastSelectedIndex=this.selectedIndex||0},initEvents:function(){Ext.ux.form.SelectBox.superclass.initEvents.apply(this,arguments);this.el.on("keydown",this.keySearch,this,true);this.cshTask=new Ext.util.DelayedTask(this.clearSearchHistory,this)},keySearch:function(f,d,b){var a=f.getKey();var c=String.fromCharCode(a);var g=0;if(!this.store.getCount()){return}switch(a){case Ext.EventObject.HOME:f.stopEvent();this.selectFirst();return;case Ext.EventObject.END:f.stopEvent();this.selectLast();return;case Ext.EventObject.PAGEDOWN:this.selectNextPage();f.stopEvent();return;case Ext.EventObject.PAGEUP:this.selectPrevPage();f.stopEvent();return}if((f.hasModifier()&&!f.shiftKey)||f.isNavKeyPress()||f.isSpecialKey()){return}if(this.lastSearchTerm==c){g=this.lastSelectedIndex}this.search(this.displayField,c,g);this.cshTask.delay(this.searchResetDelay)},onRender:function(b,a){this.store.on("load",this.calcRowsPerPage,this);Ext.ux.form.SelectBox.superclass.onRender.apply(this,arguments);if(this.mode=="local"){this.calcRowsPerPage()}},onSelect:function(a,c,b){if(this.fireEvent("beforeselect",this,a,c)!==false){this.setValue(a.data[this.valueField||this.displayField]);if(!b){this.collapse()}this.lastSelectedIndex=c+1;this.fireEvent("select",this,a,c)}},render:function(a){Ext.ux.form.SelectBox.superclass.render.apply(this,arguments);if(Ext.isSafari){this.el.swallowEvent("mousedown",true)}this.el.unselectable();this.innerList.unselectable();this.trigger.unselectable();this.innerList.on("mouseup",function(d,c,b){if(c.id&&c.id==this.innerList.id){return}this.onViewClick()},this);this.innerList.on("mouseover",function(d,c,b){if(c.id&&c.id==this.innerList.id){return}this.lastSelectedIndex=this.view.getSelectedIndexes()[0]+1;this.cshTask.delay(this.searchResetDelay)},this);this.trigger.un("click",this.onTriggerClick,this);this.trigger.on("mousedown",function(d,c,b){d.preventDefault();this.onTriggerClick()},this);this.on("collapse",function(d,c,b){Ext.getDoc().un("mouseup",this.collapseIf,this)},this,true);this.on("expand",function(d,c,b){Ext.getDoc().on("mouseup",this.collapseIf,this)},this,true)},clearSearchHistory:function(){this.lastSelectedIndex=0;this.lastSearchTerm=false},selectFirst:function(){this.focusAndSelect(this.store.data.first())},selectLast:function(){this.focusAndSelect(this.store.data.last())},selectPrevPage:function(){if(!this.rowHeight){return}var a=Math.max(this.selectedIndex-this.rowsPerPage,0);this.focusAndSelect(this.store.getAt(a))},selectNextPage:function(){if(!this.rowHeight){return}var a=Math.min(this.selectedIndex+this.rowsPerPage,this.store.getCount()-1);this.focusAndSelect(this.store.getAt(a))},search:function(c,b,d){c=c||this.displayField;this.lastSearchTerm=b;var a=this.store.find.apply(this.store,arguments);if(a!==-1){this.focusAndSelect(a)}},focusAndSelect:function(a){var b=typeof a==="number"?a:this.store.indexOf(a);this.select(b,this.isExpanded());this.onSelect(this.store.getAt(a),b,this.isExpanded())},calcRowsPerPage:function(){if(this.store.getCount()){this.rowHeight=Ext.fly(this.view.getNode(0)).getHeight();this.rowsPerPage=this.maxHeight/this.rowHeight}else{this.rowHeight=false}}});Ext.reg("selectbox",Ext.ux.form.SelectBox);Ext.ux.SelectBox=Ext.ux.form.SelectBox;Ext.ux.SliderTip=Ext.extend(Ext.Tip,{minWidth:10,offsets:[0,-10],init:function(a){a.on("dragstart",this.onSlide,this);a.on("drag",this.onSlide,this);a.on("dragend",this.hide,this);a.on("destroy",this.destroy,this)},onSlide:function(a){this.show();this.body.update(this.getText(a));this.doAutoWidth();this.el.alignTo(a.thumb,"b-t?",this.offsets)},getText:function(a){return String(a.getValue())}});Ext.ux.SlidingPager=Ext.extend(Object,{init:function(a){Ext.each(a.items.getRange(2,6),function(d){d.hide()});var b=new Ext.Slider({width:114,minValue:1,maxValue:1,plugins:new Ext.ux.SliderTip({getText:function(c){return String.format("Page <b>{0}</b> of <b>{1}</b>",c.value,c.maxValue)}}),listeners:{changecomplete:function(d,c){a.changePage(c)}}});a.insert(5,b);a.on({change:function(c,d){b.maxValue=d.pages;b.setValue(d.activePage)},beforedestroy:function(){b.destroy()}})}});Ext.ns("Ext.ux.form");Ext.ux.form.SpinnerField=Ext.extend(Ext.form.NumberField,{deferHeight:true,autoSize:Ext.emptyFn,onBlur:Ext.emptyFn,adjustSize:Ext.BoxComponent.prototype.adjustSize,constructor:function(c){var b=Ext.copyTo({},c,"incrementValue,alternateIncrementValue,accelerate,defaultValue,triggerClass,splitterClass");var d=this.spinner=new Ext.ux.Spinner(b);var a=c.plugins?(Ext.isArray(c.plugins)?c.plugins.push(d):[c.plugins,d]):d;Ext.ux.form.SpinnerField.superclass.constructor.call(this,Ext.apply(c,{plugins:a}))},onShow:function(){if(this.wrap){this.wrap.dom.style.display="";this.wrap.dom.style.visibility="visible"}},onHide:function(){this.wrap.dom.style.display="none"},getResizeEl:function(){return this.wrap},getPositionEl:function(){return this.wrap},alignErrorIcon:function(){if(this.wrap){this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0])}},validateBlur:function(){return true}});Ext.reg("spinnerfield",Ext.ux.form.SpinnerField);Ext.form.SpinnerField=Ext.ux.form.SpinnerField;Ext.ux.Spinner=Ext.extend(Ext.util.Observable,{incrementValue:1,alternateIncrementValue:5,triggerClass:"x-form-spinner-trigger",splitterClass:"x-form-spinner-splitter",alternateKey:Ext.EventObject.shiftKey,defaultValue:0,accelerate:false,constructor:function(a){Ext.ux.Spinner.superclass.constructor.call(this,a);Ext.apply(this,a);this.mimicing=false},init:function(a){this.field=a;a.afterMethod("onRender",this.doRender,this);a.afterMethod("onEnable",this.doEnable,this);a.afterMethod("onDisable",this.doDisable,this);a.afterMethod("afterRender",this.doAfterRender,this);a.afterMethod("onResize",this.doResize,this);a.afterMethod("onFocus",this.doFocus,this);a.beforeMethod("onDestroy",this.doDestroy,this)},doRender:function(b,a){var c=this.el=this.field.getEl();var d=this.field;if(!d.wrap){d.wrap=this.wrap=c.wrap({cls:"x-form-field-wrap"})}else{this.wrap=d.wrap.addClass("x-form-field-wrap")}this.trigger=this.wrap.createChild({tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.triggerClass});if(!d.width){this.wrap.setWidth(c.getWidth()+this.trigger.getWidth())}this.splitter=this.wrap.createChild({tag:"div",cls:this.splitterClass,style:"width:13px; height:2px;"});this.splitter.setRight((Ext.isIE)?1:2).setTop(10).show();this.proxy=this.trigger.createProxy("",this.splitter,true);this.proxy.addClass("x-form-spinner-proxy");this.proxy.setStyle("left","0px");this.proxy.setSize(14,1);this.proxy.hide();this.dd=new Ext.dd.DDProxy(this.splitter.dom.id,"SpinnerDrag",{dragElId:this.proxy.id});this.initTrigger();this.initSpinner()},doAfterRender:function(){var a;if(Ext.isIE&&this.el.getY()!=(a=this.trigger.getY())){this.el.position();this.el.setY(a)}},doEnable:function(){if(this.wrap){this.wrap.removeClass(this.field.disabledClass)}},doDisable:function(){if(this.wrap){this.wrap.addClass(this.field.disabledClass);this.el.removeClass(this.field.disabledClass)}},doResize:function(a,b){if(typeof a=="number"){this.el.setWidth(this.field.adjustWidth("input",a-this.trigger.getWidth()))}this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth())},doFocus:function(){if(!this.mimicing){this.wrap.addClass("x-trigger-wrap-focus");this.mimicing=true;Ext.get(Ext.isIE?document.body:document).on("mousedown",this.mimicBlur,this,{delay:10});this.el.on("keydown",this.checkTab,this)}},checkTab:function(a){if(a.getKey()==a.TAB){this.triggerBlur()}},mimicBlur:function(a){if(!this.wrap.contains(a.target)&&this.field.validateBlur(a)){this.triggerBlur()}},triggerBlur:function(){this.mimicing=false;Ext.get(Ext.isIE?document.body:document).un("mousedown",this.mimicBlur,this);this.el.un("keydown",this.checkTab,this);this.field.beforeBlur();this.wrap.removeClass("x-trigger-wrap-focus");this.field.onBlur.call(this.field)},initTrigger:function(){this.trigger.addClassOnOver("x-form-trigger-over");this.trigger.addClassOnClick("x-form-trigger-click")},initSpinner:function(){this.field.addEvents({spin:true,spinup:true,spindown:true});this.keyNav=new Ext.KeyNav(this.el,{up:function(a){a.preventDefault();this.onSpinUp()},down:function(a){a.preventDefault();this.onSpinDown()},pageUp:function(a){a.preventDefault();this.onSpinUpAlternate()},pageDown:function(a){a.preventDefault();this.onSpinDownAlternate()},scope:this});this.repeater=new Ext.util.ClickRepeater(this.trigger,{accelerate:this.accelerate});this.field.mon(this.repeater,"click",this.onTriggerClick,this,{preventDefault:true});this.field.mon(this.trigger,{mouseover:this.onMouseOver,mouseout:this.onMouseOut,mousemove:this.onMouseMove,mousedown:this.onMouseDown,mouseup:this.onMouseUp,scope:this,preventDefault:true});this.field.mon(this.wrap,"mousewheel",this.handleMouseWheel,this);this.dd.setXConstraint(0,0,10);this.dd.setYConstraint(1500,1500,10);this.dd.endDrag=this.endDrag.createDelegate(this);this.dd.startDrag=this.startDrag.createDelegate(this);this.dd.onDrag=this.onDrag.createDelegate(this)},onMouseOver:function(){if(this.disabled){return}var a=this.getMiddle();this.tmpHoverClass=(Ext.EventObject.getPageY()<a)?"x-form-spinner-overup":"x-form-spinner-overdown";this.trigger.addClass(this.tmpHoverClass)},onMouseOut:function(){this.trigger.removeClass(this.tmpHoverClass)},onMouseMove:function(){if(this.disabled){return}var a=this.getMiddle();if(((Ext.EventObject.getPageY()>a)&&this.tmpHoverClass=="x-form-spinner-overup")||((Ext.EventObject.getPageY()<a)&&this.tmpHoverClass=="x-form-spinner-overdown")){}},onMouseDown:function(){if(this.disabled){return}var a=this.getMiddle();this.tmpClickClass=(Ext.EventObject.getPageY()<a)?"x-form-spinner-clickup":"x-form-spinner-clickdown";this.trigger.addClass(this.tmpClickClass)},onMouseUp:function(){this.trigger.removeClass(this.tmpClickClass)},onTriggerClick:function(){if(this.disabled||this.el.dom.readOnly){return}var b=this.getMiddle();var a=(Ext.EventObject.getPageY()<b)?"Up":"Down";this["onSpin"+a]()},getMiddle:function(){var b=this.trigger.getTop();var c=this.trigger.getHeight();var a=b+(c/2);return a},isSpinnable:function(){if(this.disabled||this.el.dom.readOnly){Ext.EventObject.preventDefault();return false}return true},handleMouseWheel:function(a){if(this.wrap.hasClass("x-trigger-wrap-focus")==false){return}var b=a.getWheelDelta();if(b>0){this.onSpinUp();a.stopEvent()}else{if(b<0){this.onSpinDown();a.stopEvent()}}},startDrag:function(){this.proxy.show();this._previousY=Ext.fly(this.dd.getDragEl()).getTop()},endDrag:function(){this.proxy.hide()},onDrag:function(){if(this.disabled){return}var b=Ext.fly(this.dd.getDragEl()).getTop();var a="";if(this._previousY>b){a="Up"}if(this._previousY<b){a="Down"}if(a!=""){this["onSpin"+a]()}this._previousY=b},onSpinUp:function(){if(this.isSpinnable()==false){return}if(Ext.EventObject.shiftKey==true){this.onSpinUpAlternate();return}else{this.spin(false,false)}this.field.fireEvent("spin",this);this.field.fireEvent("spinup",this)},onSpinDown:function(){if(this.isSpinnable()==false){return}if(Ext.EventObject.shiftKey==true){this.onSpinDownAlternate();return}else{this.spin(true,false)}this.field.fireEvent("spin",this);this.field.fireEvent("spindown",this)},onSpinUpAlternate:function(){if(this.isSpinnable()==false){return}this.spin(false,true);this.field.fireEvent("spin",this);this.field.fireEvent("spinup",this)},onSpinDownAlternate:function(){if(this.isSpinnable()==false){return}this.spin(true,true);this.field.fireEvent("spin",this);this.field.fireEvent("spindown",this)},spin:function(d,b){var a=parseFloat(this.field.getValue());var c=(b==true)?this.alternateIncrementValue:this.incrementValue;(d==true)?a-=c:a+=c;a=(isNaN(a))?this.defaultValue:a;a=this.fixBoundries(a);this.field.setRawValue(a)},fixBoundries:function(b){var a=b;if(this.field.minValue!=undefined&&a<this.field.minValue){a=this.field.minValue}if(this.field.maxValue!=undefined&&a>this.field.maxValue){a=this.field.maxValue}return this.fixPrecision(a)},fixPrecision:function(b){var a=isNaN(b);if(!this.field.allowDecimals||this.field.decimalPrecision==-1||a||!b){return a?"":b}return parseFloat(parseFloat(b).toFixed(this.field.decimalPrecision))},doDestroy:function(){if(this.trigger){this.trigger.remove()}if(this.wrap){this.wrap.remove();delete this.field.wrap}if(this.splitter){this.splitter.remove()}if(this.dd){this.dd.unreg();this.dd=null}if(this.proxy){this.proxy.remove()}if(this.repeater){this.repeater.purgeListeners()}}});Ext.form.Spinner=Ext.ux.Spinner;Ext.ux.Spotlight=function(a){Ext.apply(this,a)};Ext.ux.Spotlight.prototype={active:false,animate:true,duration:0.25,easing:"easeNone",animated:false,createElements:function(){var a=Ext.getBody();this.right=a.createChild({cls:"x-spotlight"});this.left=a.createChild({cls:"x-spotlight"});this.top=a.createChild({cls:"x-spotlight"});this.bottom=a.createChild({cls:"x-spotlight"});this.all=new Ext.CompositeElement([this.right,this.left,this.top,this.bottom])},show:function(b,c,a){if(this.animated){this.show.defer(50,this,[b,c,a]);return}this.el=Ext.get(b);if(!this.right){this.createElements()}if(!this.active){this.all.setDisplayed("");this.applyBounds(true,false);this.active=true;Ext.EventManager.onWindowResize(this.syncSize,this);this.applyBounds(false,this.animate,false,c,a)}else{this.applyBounds(false,false,false,c,a)}},hide:function(b,a){if(this.animated){this.hide.defer(50,this,[b,a]);return}Ext.EventManager.removeResizeListener(this.syncSize,this);this.applyBounds(true,this.animate,true,b,a)},doHide:function(){this.active=false;this.all.setDisplayed(false)},syncSize:function(){this.applyBounds(false,false)},applyBounds:function(e,d,k,j,l){var h=this.el.getRegion();var a=Ext.lib.Dom.getViewWidth(true);var g=Ext.lib.Dom.getViewHeight(true);var f=0,b=false;if(d){b={callback:function(){f++;if(f==4){this.animated=false;if(k){this.doHide()}Ext.callback(j,l,[this])}},scope:this,duration:this.duration,easing:this.easing};this.animated=true}this.right.setBounds(h.right,e?g:h.top,a-h.right,e?0:(g-h.top),b);this.left.setBounds(0,0,h.left,e?0:h.bottom,b);this.top.setBounds(e?a:h.left,0,e?0:a-h.left,h.top,b);this.bottom.setBounds(0,h.bottom,e?0:h.right,g-h.bottom,b);if(!d){if(k){this.doHide()}if(j){Ext.callback(j,l,[this])}}},destroy:function(){this.doHide();Ext.destroy(this.right,this.left,this.top,this.bottom);delete this.el;delete this.all}};Ext.Spotlight=Ext.ux.Spotlight;Ext.ux.TabCloseMenu=function(){var a,c,b;this.init=function(e){a=e;a.on("contextmenu",d)};function d(h,g,j){if(!c){c=new Ext.menu.Menu({items:[{id:a.id+"-close",text:"Close Tab",handler:function(){a.remove(b)}},{id:a.id+"-close-others",text:"Close Other Tabs",handler:function(){a.items.each(function(e){if(e.closable&&e!=b){a.remove(e)}})}}]})}b=g;var f=c.items;f.get(a.id+"-close").setDisabled(!g.closable);var k=true;a.items.each(function(){if(this!=g&&this.closable){k=false;return false}});f.get(a.id+"-close-others").setDisabled(k);j.stopEvent();c.showAt(j.getPoint())}};Ext.preg("tabclosemenu",Ext.ux.TabCloseMenu);Ext.ns("Ext.ux.grid");Ext.ux.grid.TableGrid=function(p,f){f=f||{};Ext.apply(this,f);var c=f.fields||[],a=f.columns||[];p=Ext.get(p);var k=p.insertSibling();var l=[],m=[];var e=p.query("thead th");for(var g=0,j;j=e[g];g++){var o=j.innerHTML;var b="tcol-"+g;l.push(Ext.applyIf(c[g]||{},{name:b,mapping:"td:nth("+(g+1)+")/@innerHTML"}));m.push(Ext.applyIf(a[g]||{},{header:o,dataIndex:b,width:j.offsetWidth,tooltip:j.title,sortable:true}))}var d=new Ext.data.Store({reader:new Ext.data.XmlReader({record:"tbody tr"},l)});d.loadData(p.dom);var n=new Ext.grid.ColumnModel(m);if(f.width||f.height){k.setSize(f.width||"auto",f.height||"auto")}else{k.setWidth(p.getWidth())}if(f.remove!==false){p.remove()}Ext.applyIf(this,{ds:d,cm:n,sm:new Ext.grid.RowSelectionModel(),autoHeight:true,autoWidth:false});Ext.ux.grid.TableGrid.superclass.constructor.call(this,k,{})};Ext.extend(Ext.ux.grid.TableGrid,Ext.grid.GridPanel);Ext.grid.TableGrid=Ext.ux.grid.TableGrid;Ext.ux.TabScrollerMenu=Ext.extend(Object,{pageSize:10,maxText:15,menuPrefixText:"Items",constructor:function(a){a=a||{};Ext.apply(this,a)},init:function(b){Ext.apply(b,this.tabPanelMethods);b.tabScrollerMenu=this;var a=this;b.on({render:{scope:b,single:true,fn:function(){var c=b.createScrollers.createSequence(a.createPanelsMenu,this);b.createScrollers=c}}})},createPanelsMenu:function(){var c=this.stripWrap.dom.offsetHeight;var b=this.header.dom.firstChild;Ext.fly(b).applyStyles({right:"18px"});var a=Ext.get(this.strip.dom.parentNode);a.applyStyles({"margin-right":"36px"});var d=this.header.insertFirst({cls:"x-tab-tabmenu-right"});d.setHeight(c);d.addClassOnOver("x-tab-tabmenu-over");d.on("click",this.showTabsMenu,this);this.scrollLeft.show=this.scrollLeft.show.createSequence(function(){d.show()});this.scrollLeft.hide=this.scrollLeft.hide.createSequence(function(){d.hide()})},getPageSize:function(){return this.pageSize},setPageSize:function(a){this.pageSize=a},getMaxText:function(){return this.maxText},setMaxText:function(a){this.maxText=a},getMenuPrefixText:function(){return this.menuPrefixText},setMenuPrefixText:function(a){this.menuPrefixText=a},tabPanelMethods:{showTabsMenu:function(c){if(!this.tabsMenu){this.tabsMenu=new Ext.menu.Menu();this.on("beforedestroy",this.tabsMenu.destroy,this.tabsMenu)}this.tabsMenu.removeAll();this.generateTabMenuItems();var b=Ext.get(c.getTarget());var a=b.getXY();a[1]+=24;this.tabsMenu.showAt(a)},generateTabMenuItems:function(){var a=this.getActiveTab();var l=this.items.getCount();var g=this.tabScrollerMenu.getPageSize();if(l>g){var d=Math.floor(l/g);var j=l%g;for(var e=0;e<d;e++){var f=(e+1)*g;var b=[];for(var h=0;h<g;h++){index=h+f-g;var k=this.items.get(index);b.push(this.autoGenMenuItem(k))}this.tabsMenu.add({text:this.tabScrollerMenu.getMenuPrefixText()+" "+(f-g+1)+" - "+f,menu:b})}if(j>0){var c=d*g;b=[];for(var e=c;e<l;e++){var k=this.items.get(e);b.push(this.autoGenMenuItem(k))}this.tabsMenu.add({text:this.tabScrollerMenu.menuPrefixText+" "+(c+1)+" - "+(c+b.length),menu:b})}}else{this.items.each(function(m){if(m.id!=a.id&&!m.hidden){b.push(this.autoGenMenuItem(m))}},this)}},autoGenMenuItem:function(b){var a=this.tabScrollerMenu.getMaxText();var c=Ext.util.Format.ellipsis(b.title,a);return{text:c,handler:this.showTabFromMenu,scope:this,disabled:b.disabled,tabToShow:b,iconCls:b.iconCls}},showTabFromMenu:function(a){this.setActiveTab(a.tabToShow)}}});Ext.ns("Ext.ux.tree");Ext.ux.tree.XmlTreeLoader=Ext.extend(Ext.tree.TreeLoader,{XML_NODE_ELEMENT:1,XML_NODE_TEXT:3,processResponse:function(b,d,g){var c=b.responseXML;var a=c.documentElement||c;try{d.beginUpdate();d.appendChild(this.parseXml(a));d.endUpdate();if(typeof g=="function"){g(this,d)}}catch(f){this.handleFailure(b)}},parseXml:function(b){var a=[];Ext.each(b.childNodes,function(f){if(f.nodeType==this.XML_NODE_ELEMENT){var c=this.createNode(f);if(f.childNodes.length>0){var e=this.parseXml(f);if(typeof e=="string"){c.attributes.innerText=e}else{c.appendChild(e)}}a.push(c)}else{if(f.nodeType==this.XML_NODE_TEXT){var d=f.nodeValue.trim();if(d.length>0){return a=d}}}},this);return a},createNode:function(b){var a={tagName:b.tagName};Ext.each(b.attributes,function(c){a[c.nodeName]=c.nodeValue});this.processAttributes(a);return Ext.ux.tree.XmlTreeLoader.superclass.createNode.call(this,a)},processAttributes:Ext.emptyFn});Ext.ux.XmlTreeLoader=Ext.ux.tree.XmlTreeLoader;
\ No newline at end of file