rem: Ext.grid.GridView=function(_1){Ext.grid.GridView.superclass.constructor.call(this);this.el=null;Ext.apply(this,_1);};Ext.extend(Ext.grid.GridView,Ext.grid.AbstractGridView,{rowClass:"x-grid-row",cellClass:"x-grid-col",tdClass:"x-grid-td",hdClass:"x-grid-hd",splitClass:"x-grid-split",sortClasses:["sort-asc","sort-desc"],enableMoveAnim:false,hlColor:"C3DAF9",dh:Ext.DomHelper,fly:Ext.Element.fly,css:Ext.util.CSS,borderWidth:1,splitOffset:3,scrollIncrement:22,cellRE:/(?:.*?)x-grid-(?:hd|cell|csplit)-(?:[\d]+)-([\d]+)(?:.*?)/,findRE:/\s?(?:x-grid-hd|x-grid-col|x-grid-csplit)\s/,bind:function(ds,cm){if(this.ds){this.ds.un("load",this.onLoad,this);this.ds.un("datachanged",this.onDataChange,this);this.ds.un("add",this.onAdd,this);this.ds.un("remove",this.onRemove,this);this.ds.un("update",this.onUpdate,this);this.ds.un("clear",this.onClear,this);}if(ds){ds.on("load",this.onLoad,this);ds.on("datachanged",this.onDataChange,this);ds.on("add",this.onAdd,this);ds.on("remove",this.onRemove,this);ds.on("update",this.onUpdate,this);ds.on("clear",this.onClear,this);}this.ds=ds;if(this.cm){this.cm.un("widthchange",this.onColWidthChange,this);this.cm.un("headerchange",this.onHeaderChange,this);this.cm.un("hiddenchange",this.onHiddenChange,this);this.cm.un("columnmoved",this.onColumnMove,this);this.cm.un("columnlockchange",this.onColumnLock,this);}if(cm){this.generateRules(cm);cm.on("widthchange",this.onColWidthChange,this);cm.on("headerchange",this.onHeaderChange,this);cm.on("hiddenchange",this.onHiddenChange,this);cm.on("columnmoved",this.onColumnMove,this);cm.on("columnlockchange",this.onColumnLock,this);}this.cm=cm;},init:function(_4){Ext.grid.GridView.superclass.init.call(this,_4);this.bind(_4.dataSource,_4.colModel);_4.on("headerclick",this.handleHeaderClick,this);if(_4.trackMouseOver){_4.on("mouseover",this.onRowOver,this);_4.on("mouseout",this.onRowOut,this);}_4.cancelTextSelection=function(){};this.gridId=_4.id;var _5=this.templates||{};if(!_5.master){_5.master=new Ext.Template("<div class=\"x-grid\" hidefocus=\"true\">","<div class=\"x-grid-topbar\"></div>","<div class=\"x-grid-scroller\"><div></div></div>","<div class=\"x-grid-locked\">","<div class=\"x-grid-header\">{lockedHeader}</div>","<div class=\"x-grid-body\">{lockedBody}</div>","</div>","<div class=\"x-grid-viewport\">","<div class=\"x-grid-header\">{header}</div>","<div class=\"x-grid-body\">{body}</div>","</div>","<div class=\"x-grid-bottombar\"></div>","<a href=\"#\" class=\"x-grid-focus\" tabIndex=\"-1\"></a>","<div class=\"x-grid-resize-proxy\">&#160;</div>","</div>");_5.master.disableformats=true;}if(!_5.header){_5.header=new Ext.Template("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">","<tbody><tr class=\"x-grid-hd-row\">{cells}</tr></tbody>","</table>{splits}");_5.header.disableformats=true;}_5.header.compile();if(!_5.hcell){_5.hcell=new Ext.Template("<td class=\"x-grid-hd x-grid-td-{id} {cellId}\"><div title=\"{title}\" class=\"x-grid-hd-inner x-grid-hd-{id}\">","<div class=\"x-grid-hd-text\" unselectable=\"on\">{value}<img class=\"x-grid-sort-icon\" src=\"",Ext.BLANK_IMAGE_URL,"\" /></div>","</div></td>");_5.hcell.disableFormats=true;}_5.hcell.compile();if(!_5.hsplit){_5.hsplit=new Ext.Template("<div class=\"x-grid-split {splitId} x-grid-split-{id}\" style=\"{style}\" unselectable=\"on\">&#160;</div>");_5.hsplit.disableFormats=true;}_5.hsplit.compile();if(!_5.body){_5.body=new Ext.Template("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">","<tbody>{rows}</tbody>","</table>");_5.body.disableFormats=true;}_5.body.compile();if(!_5.row){_5.row=new Ext.Template("<tr class=\"x-grid-row {alt}\">{cells}</tr>");_5.row.disableFormats=true;}_5.row.compile();if(!_5.cell){_5.cell=new Ext.Template("<td class=\"x-grid-col x-grid-td-{id} {cellId} {css}\" tabIndex=\"0\">","<div class=\"x-grid-col-{id} x-grid-cell-inner\"><div class=\"x-grid-cell-text\" unselectable=\"on\" {attr}>{value}</div></div>","</td>");_5.cell.disableFormats=true;}_5.cell.compile();this.templates=_5;},onColWidthChange:function(){this.updateColumns.apply(this,arguments);},onHeaderChange:function(){this.updateHeaders.apply(this,arguments);},onHiddenChange:function(){this.handleHiddenChange.apply(this,arguments);},onColumnMove:function(){this.handleColumnMove.apply(this,arguments);},onColumnLock:function(){this.handleLockChange.apply(this,arguments);},onDataChange:function(){this.refresh();this.updateHeaderSortState();},onClear:function(){this.refresh();},onUpdate:function(ds,_7){this.refreshRow(_7);},refreshRow:function(_8){var ds=this.ds,_a;if(typeof _8=="number"){_a=_8;_8=ds.getAt(_a);}else{_a=ds.indexOf(_8);}this.insertRows(ds,_a,_a,true);this.onRemove(ds,_8,_a+1,true);this.syncRowHeights(_a,_a);this.layout();this.fireEvent("rowupdated",this,_a,_8);},onAdd:function(ds,_c,_d){this.insertRows(ds,_d,_d+(_c.length-1));},onRemove:function(ds,_f,_10,_11){if(_11!==true){this.fireEvent("beforerowremoved",this,_10,_f);}var bt=this.getBodyTable(),lt=this.getLockedTable();if(bt.rows[_10]){bt.firstChild.removeChild(bt.rows[_10]);}if(lt.rows[_10]){lt.firstChild.removeChild(lt.rows[_10]);}if(_11!==true){this.stripeRows(_10);this.syncRowHeights(_10,_10);this.layout();this.fireEvent("rowremoved",this,_10,_f);}},onLoad:function(){this.scrollToTop();},scrollToTop:function(){if(this.scroller){this.scroller.dom.scrollTop=0;this.syncScroll();}},getHeaderPanel:function(_14){if(_14){this.headerPanel.show();}return this.headerPanel;},getFooterPanel:function(_15){if(_15){this.footerPanel.show();}return this.footerPanel;},initElements:function(){var E=Ext.Element;var el=this.grid.getGridEl().dom.firstChild;var cs=el.childNodes;this.el=new E(el);this.headerPanel=new E(el.firstChild);this.headerPanel.enableDisplayMode("block");this.scroller=new E(cs[1]);this.scrollSizer=new E(this.scroller.dom.firstChild);this.lockedWrap=new E(cs[2]);this.lockedHd=new E(this.lockedWrap.dom.firstChild);this.lockedBody=new E(this.lockedWrap.dom.childNodes[1]);this.mainWrap=new E(cs[3]);this.mainHd=new E(this.mainWrap.dom.firstChild);this.mainBody=new E(this.mainWrap.dom.childNodes[1]);this.footerPanel=new E(cs[4]);this.footerPanel.enableDisplayMode("block");this.focusEl=new E(cs[5]);this.focusEl.swallowEvent("click",true);this.resizeProxy=new E(cs[6]);this.headerSelector=String.format("#{0} td.x-grid-hd, #{1} td.x-grid-hd",this.lockedHd.id,this.mainHd.id);this.splitterSelector=String.format("#{0} div.x-grid-split, #{1} div.x-grid-split",this.lockedHd.id,this.mainHd.id);},getHeaderCell:function(_19){return Ext.DomQuery.select(this.headerSelector)[_19];},getHeaderCellMeasure:function(_1a){return this.getHeaderCell(_1a).firstChild;},getHeaderCellText:function(_1b){return this.getHeaderCell(_1b).firstChild.firstChild;},getLockedTable:function(){return this.lockedBody.dom.firstChild;},getBodyTable:function(){return this.mainBody.dom.firstChild;},getLockedRow:function(_1c){return this.getLockedTable().rows[_1c];},getRow:function(_1d){return this.getBodyTable().rows[_1d];},getRowComposite:function(_1e){if(!this.rowEl){this.rowEl=new Ext.CompositeElementLite();}var els=[],_20,_21;if(_20=this.getLockedRow(_1e)){els.push(_20);}if(_21=this.getRow(_1e)){els.push(_21);}this.rowEl.elements=els;return this.rowEl;},getCell:function(_22,_23){var _24=this.cm.getLockedCount();var _25;if(_23<_24){_25=this.lockedBody.dom.firstChild;}else{_25=this.mainBody.dom.firstChild;_23-=_24;}return _25.rows[_22].childNodes[_23];},getCellText:function(_26,_27){return this.getCell(_26,_27).firstChild.firstChild;},getCellBox:function(_28){var b=this.fly(_28).getBox();if(Ext.isOpera){b.y=_28.offsetTop+this.mainBody.getY();}return b;},getCellIndex:function(_2a){var id=String(_2a.className).match(this.cellRE);if(id){return parseInt(id[1],10);}return 0;},findHeaderIndex:function(n){var r=Ext.fly(n).findParent("td."+this.hdClass,6);return r?this.getCellIndex(r):false;},findHeaderCell:function(n){var r=Ext.fly(n).findParent("td."+this.hdClass,6);return r?r:false;},findRowIndex:function(n){if(!n){return false;}var r=Ext.fly(n).findParent("tr."+this.rowClass,6);return r?r.rowIndex:false;},findCellIndex:function(_32){var _33=this.el.dom;while(_32&&_32!=_33){if(this.findRE.test(_32.className)){return this.getCellIndex(_32);}_32=_32.parentNode;}return false;},getColumnId:function(_34){return this.cm.getColumnId(_34);},getSplitters:function(){if(this.splitterSelector){return Ext.DomQuery.select(this.splitterSelector);}else{return null;}},getSplitter:function(_35){return this.getSplitters()[_35];},onRowOver:function(e,t){var row;if((row=this.findRowIndex(t))!==false){this.getRowComposite(row).addClass("x-grid-row-over");}},onRowOut:function(e,t){var row;if((row=this.findRowIndex(t))!==false&&row!==this.findRowIndex(e.getRelatedTarget())){this.getRowComposite(row).removeClass("x-grid-row-over");}},renderHeaders:function(){var cm=this.cm;var ct=this.templates.hcell,ht=this.templates.header,st=this.templates.hsplit;var cb=[],lb=[],sb=[],lsb=[],p={};for(var i=0,len=cm.getColumnCount();i<len;i++){p.cellId="x-grid-hd-0-"+i;p.splitId="x-grid-csplit-0-"+i;p.id=cm.getColumnId(i);p.title=cm.getColumnTooltip(i)||"";p.value=cm.getColumnHeader(i)||"";p.style=(this.grid.enableColumnResize===false||!cm.isResizable(i)||cm.isFixed(i))?"cursor:default":"";if(!cm.isLocked(i)){cb[cb.length]=ct.apply(p);sb[sb.length]=st.apply(p);}else{lb[lb.length]=ct.apply(p);lsb[lsb.length]=st.apply(p);}}return[ht.apply({cells:lb.join(""),splits:lsb.join("")}),ht.apply({cells:cb.join(""),splits:sb.join("")})];},updateHeaders:function(){var _47=this.renderHeaders();this.lockedHd.update(_47[0]);this.mainHd.update(_47[1]);},focusRow:function(row){var x=this.scroller.dom.scrollLeft;this.focusCell(row,0,false);this.scroller.dom.scrollLeft=x;},focusCell:function(row,col,_4c){var el=this.ensureVisible(row,col,_4c);this.focusEl.alignTo(el,"tl-tl");if(Ext.isGecko){this.focusEl.focus();}else{this.focusEl.focus.defer(1,this.focusEl);}},ensureVisible:function(row,col,_50){if(typeof row!="number"){row=row.rowIndex;}if(row<0&&row>=this.ds.getCount()){return;}col=(col!==undefined?col:0);var cm=this.grid.colModel;while(cm.isHidden(col)){col++;}var el=this.getCell(row,col);if(!el){return;}var c=this.scroller.dom;var _54=parseInt(el.offsetTop,10);var _55=parseInt(el.offsetLeft,10);var _56=_54+el.offsetHeight;var _57=_55+el.offsetWidth;var ch=c.clientHeight-this.mainHd.dom.offsetHeight;var _59=parseInt(c.scrollTop,10);var _5a=parseInt(c.scrollLeft,10);var _5b=_59+ch;var _5c=_5a+c.clientWidth;if(_54<_59){c.scrollTop=_54;}else{if(_56>_5b){c.scrollTop=_56-ch;}}if(_50!==false){if(_55<_5a){c.scrollLeft=_55;}else{if(_57>_5c){c.scrollLeft=_57-c.clientWidth;}}}return el;},updateColumns:function(){this.grid.stopEditing();var cm=this.grid.colModel,_5e=this.getColumnIds();var pos=0;for(var i=0,len=cm.getColumnCount();i<len;i++){var w=cm.getColumnWidth(i);this.css.updateRule(this.colSelector+_5e[i],"width",(w-this.borderWidth)+"px");this.css.updateRule(this.hdSelector+_5e[i],"width",(w-this.borderWidth)+"px");}this.updateSplitters();},generateRules:function(cm){var _64=[],_65=this.grid.id+"-cssrules";Ext.util.CSS.removeStyleSheet(_65);for(var i=0,len=cm.getColumnCount();i<len;i++){var cid=cm.getColumnId(i);var _69="";if(cm.config[i].align){_69="text-align:"+cm.config[i].align+";";}var _6a="";if(cm.isHidden(i)){_6a="display:none;";}var _6b="width:"+(cm.getColumnWidth(i)-this.borderWidth)+"px;";_64.push(this.colSelector,cid," {\n",cm.config[i].css,_69,_6b,"\n}\n",this.hdSelector,cid," {\n",_69,_6b,"}\n",this.tdSelector,cid," {\n",_6a,"\n}\n",this.splitSelector,cid," {\n",_6a,"\n}\n");}return Ext.util.CSS.createStyleSheet(_64.join(""),_65);},updateSplitters:function(){var cm=this.cm,s=this.getSplitters();if(s){var pos=0,_6f=true;for(var i=0,len=cm.getColumnCount();i<len;i++){if(cm.isHidden(i)){continue;}var w=cm.getColumnWidth(i);if(!cm.isLocked(i)&&_6f){pos=0;_6f=false;}pos+=w;s[i].style.left=(pos-this.splitOffset)+"px";}}},handleHiddenChange:function(_73,_74,_75){if(_75){this.hideColumn(_74);}else{this.unhideColumn(_74);}},hideColumn:function(_76){var cid=this.getColumnId(_76);this.css.updateRule(this.tdSelector+cid,"display","none");this.css.updateRule(this.splitSelector+cid,"display","none");if(Ext.isSafari){this.updateHeaders();}this.updateSplitters();this.layout();},unhideColumn:function(_78){var cid=this.getColumnId(_78);this.css.updateRule(this.tdSelector+cid,"display","");this.css.updateRule(this.splitSelector+cid,"display","");if(Ext.isSafari){this.updateHeaders();}this.updateSplitters();this.layout();},insertRows:function(dm,_7b,_7c,_7d){if(_7b==0&&_7c==dm.getCount()-1){this.refresh();}else{if(!_7d){this.fireEvent("beforerowsinserted",this,_7b,_7c);}var s=this.getScrollState();var _7f=this.renderRows(_7b,_7c);this.bufferRows(_7f[0],this.getLockedTable(),_7b);this.bufferRows(_7f[1],this.getBodyTable(),_7b);this.restoreScroll(s);if(!_7d){this.fireEvent("rowsinserted",this,_7b,_7c);this.syncRowHeights(_7b,_7c);this.stripeRows(_7b);this.layout();}}},bufferRows:function(_80,_81,_82){var _83=null,_84=_81.rows,_85=_81.tBodies[0];if(_82<_84.length){_83=_84[_82];}var b=document.createElement("div");b.innerHTML="<table><tbody>"+_80+"</tbody></table>";var _87=b.firstChild.rows;for(var i=0,len=_87.length;i<len;i++){if(_83){_85.insertBefore(_87[0],_83);}else{_85.appendChild(_87[0]);}}b.innerHTML="";b=null;},deleteRows:function(dm,_8b,_8c){if(dm.getRowCount()<1){this.fireEvent("beforerefresh",this);this.mainBody.update("");this.lockedBody.update("");this.fireEvent("refresh",this);}else{this.fireEvent("beforerowsdeleted",this,_8b,_8c);var bt=this.getBodyTable();var _8e=bt.firstChild;var _8f=bt.rows;for(var _90=_8b;_90<=_8c;_90++){_8e.removeChild(_8f[_8b]);}this.stripeRows(_8b);this.fireEvent("rowsdeleted",this,_8b,_8c);}},updateRows:function(_91,_92,_93){var s=this.getScrollState();this.refresh();this.restoreScroll(s);},handleSort:function(_95,_96,_97,_98){if(!_98){this.refresh();}this.updateHeaderSortState();},getScrollState:function(){var sb=this.scroller.dom;return{left:sb.scrollLeft,top:sb.scrollTop};},stripeRows:function(_9a){if(!this.grid.stripeRows||this.ds.getCount()<1){return;}_9a=_9a||0;var _9b=this.getBodyTable().rows;var _9c=this.getLockedTable().rows;var cls=" x-grid-row-alt ";for(var i=_9a,len=_9b.length;i<len;i++){var row=_9b[i],_a1=_9c[i];var _a2=((i+1)%2==0);var _a3=(" "+row.className+" ").indexOf(cls)!=-1;if(_a2==_a3){continue;}if(_a2){row.className+=" x-grid-row-alt";}else{row.className=row.className.replace("x-grid-row-alt","");}if(_a1){_a1.className=row.className;}}},restoreScroll:function(_a4){var sb=this.scroller.dom;sb.scrollLeft=_a4.left;sb.scrollTop=_a4.top;this.syncScroll();},syncScroll:function(){var sb=this.scroller.dom;var sh=this.mainHd.dom;var bs=this.mainBody.dom;var lv=this.lockedBody.dom;sh.scrollLeft=bs.scrollLeft=sb.scrollLeft;lv.scrollTop=bs.scrollTop=sb.scrollTop;},handleScroll:function(e){this.syncScroll();var sb=this.scroller.dom;this.grid.fireEvent("bodyscroll",sb.scrollLeft,sb.scrollTop);e.stopEvent();},handleWheel:function(e){var d=e.getWheelDelta();this.scroller.dom.scrollTop-=d*22;this.lockedBody.dom.scrollTop=this.mainBody.dom.scrollTop=this.scroller.dom.scrollTop;e.stopEvent();},renderRows:function(_ae,_af){var g=this.grid,cm=g.colModel,ds=g.dataSource,_b3=g.stripeRows;var _b4=cm.getColumnCount();if(ds.getCount()<1){return["",""];}var cs=[];for(var i=0;i<_b4;i++){var _b7=cm.getDataIndex(i);cs[i]={name:typeof _b7=="undefined"?ds.fields.get(i).name:_b7,renderer:cm.getRenderer(i),id:cm.getColumnId(i),locked:cm.isLocked(i)};}_ae=_ae||0;_af=typeof _af=="undefined"?ds.getCount()-1:_af;var rs=ds.getRange(_ae,_af);return this.doRender(cs,rs,ds,_ae,_b4,_b3);},doRender:Ext.isGecko?function(cs,rs,ds,_bc,_bd,_be){var ts=this.templates,ct=ts.cell,rt=ts.row;var buf="",_c3="",cb,lcb,c,p={},rp={},r,_ca;for(var j=0,len=rs.length;j<len;j++){r=rs[j];cb="";lcb="";_ca=(j+_bc);for(var i=0;i<_bd;i++){c=cs[i];p.cellId="x-grid-cell-"+_ca+"-"+i;p.id=c.id;p.css=p.attr="";p.value=c.renderer(r.data[c.name],p,r,_ca,i,ds);if(p.value==undefined||p.value===""){p.value="&#160;";}if(r.dirty&&typeof r.modified[c.name]!=="undefined"){p.css+=p.css?" x-grid-dirty-cell":"x-grid-dirty-cell";}var _ce=ct.apply(p);if(!c.locked){cb+=_ce;}else{lcb+=_ce;}}var alt=[];if(_be&&((_ca+1)%2==0)){alt[0]="x-grid-row-alt";}if(r.dirty){alt[1]=" x-grid-dirty-row";}rp.cells=lcb;if(this.getRowClass){alt[2]=this.getRowClass(r,_ca);}rp.alt=alt.join(" ");_c3+=rt.apply(rp);rp.cells=cb;buf+=rt.apply(rp);}return[_c3,buf];}:function(cs,rs,ds,_d3,_d4,_d5){var ts=this.templates,ct=ts.cell,rt=ts.row;var buf=[],_da=[],cb,lcb,c,p={},rp={},r,_e1;for(var j=0,len=rs.length;j<len;j++){r=rs[j];cb=[];lcb=[];_e1=(j+_d3);for(var i=0;i<_d4;i++){c=cs[i];p.cellId="x-grid-cell-"+_e1+"-"+i;p.id=c.id;p.css=p.attr="";p.value=c.renderer(r.data[c.name],p,r,_e1,i,ds);if(p.value==undefined||p.value===""){p.value="&#160;";}if(r.dirty&&typeof r.modified[c.name]!=="undefined"){p.css+=p.css?" x-grid-dirty-cell":"x-grid-dirty-cell";}var _e5=ct.apply(p);if(!c.locked){cb[cb.length]=_e5;}else{lcb[lcb.length]=_e5;}}var alt=[];if(_d5&&((_e1+1)%2==0)){alt[0]="x-grid-row-alt";}if(r.dirty){alt[1]=" x-grid-dirty-row";}rp.cells=lcb;if(this.getRowClass){alt[2]=this.getRowClass(r,_e1);}rp.alt=alt.join(" ");rp.cells=lcb.join("");_da[_da.length]=rt.apply(rp);rp.cells=cb.join("");buf[buf.length]=rt.apply(rp);}return[_da.join(""),buf.join("")];},renderBody:function(){var _e7=this.renderRows();var bt=this.templates.body;return[bt.apply({rows:_e7[0]}),bt.apply({rows:_e7[1]})];},refresh:function(_e9){this.fireEvent("beforerefresh",this);this.grid.stopEditing();var _ea=this.renderBody();this.lockedBody.update(_ea[0]);this.mainBody.update(_ea[1]);if(_e9===true){this.updateHeaders();this.updateColumns();this.updateSplitters();this.updateHeaderSortState();}this.syncRowHeights();this.layout();this.fireEvent("refresh",this);},handleColumnMove:function(cm,_ec,_ed){this.indexMap=null;var s=this.getScrollState();this.refresh(true);this.restoreScroll(s);this.afterMove(_ed);},afterMove:function(_ef){if(this.enableMoveAnim&&Ext.enableFx){this.fly(this.getHeaderCell(_ef).firstChild).highlight(this.hlColor);}},updateCell:function(dm,_f1,_f2){var _f3=this.getColumnIndexByDataIndex(_f2);if(typeof _f3=="undefined"){return;}var cm=this.grid.colModel;var _f5=this.getCell(_f1,_f3);var _f6=this.getCellText(_f1,_f3);var p={cellId:"x-grid-cell-"+_f1+"-"+_f3,id:cm.getColumnId(_f3),css:_f3==cm.getColumnCount()-1?"x-grid-col-last":""};var _f8=cm.getRenderer(_f3);var val=_f8(dm.getValueAt(_f1,_f2),p,_f1,_f3,dm);if(typeof val=="undefined"||val===""){val="&#160;";}_f6.innerHTML=val;_f5.className=this.cellClass+" "+p.cellId+" "+p.css;this.syncRowHeights(_f1,_f1);},calcColumnWidth:function(_fa,_fb){var _fc=0;if(this.grid.autoSizeHeaders){var h=this.getHeaderCellMeasure(_fa);_fc=Math.max(_fc,h.scrollWidth);}var tb,_ff;if(this.cm.isLocked(_fa)){tb=this.getLockedTable();_ff=_fa;}else{tb=this.getBodyTable();_ff=_fa-this.cm.getLockedCount();}if(tb&&tb.rows){var rows=tb.rows;var _101=Math.min(_fb||rows.length,rows.length);for(var i=0;i<_101;i++){var cell=rows[i].childNodes[_ff].firstChild;_fc=Math.max(_fc,cell.scrollWidth);}}return _fc+5;},autoSizeColumn:function(_104,_105,_106){if(this.cm.isHidden(_104)){return;}if(_105){var cid=this.cm.getColumnId(_104);this.css.updateRule(this.colSelector+cid,"width",this.grid.minColumnWidth+"px");if(this.grid.autoSizeHeaders){this.css.updateRule(this.hdSelector+cid,"width",this.grid.minColumnWidth+"px");}}var _108=this.calcColumnWidth(_104);this.cm.setColumnWidth(_104,Math.max(this.grid.minColumnWidth,_108),_106);if(!_106){this.grid.fireEvent("columnresize",_104,_108);}},autoSizeColumns:function(){var cm=this.grid.colModel;var _10a=cm.getColumnCount();for(var i=0;i<_10a;i++){this.autoSizeColumn(i,true,true);}if(cm.getTotalWidth()<this.scroller.dom.clientWidth){this.fitColumns();}else{this.updateColumns();this.layout();}},fitColumns:function(_10c){var cm=this.grid.colModel;var _10e=cm.getColumnCount();var cols=[];var _110=0;var i,w;for(i=0;i<_10e;i++){if(!cm.isHidden(i)&&!cm.isFixed(i)){w=cm.getColumnWidth(i);cols.push(i);cols.push(w);_110+=w;}}var _113=Math.min(this.scroller.dom.clientWidth,this.el.getWidth());if(_10c){_113-=17;}var frac=(_113-cm.getTotalWidth())/_110;while(cols.length){w=cols.pop();i=cols.pop();cm.setColumnWidth(i,Math.floor(w+w*frac),true);}this.updateColumns();this.layout();},onRowSelect:function(_115){var row=this.getRowComposite(_115);row.addClass("x-grid-row-selected");},onRowDeselect:function(_117){var row=this.getRowComposite(_117);row.removeClass("x-grid-row-selected");},onCellSelect:function(row,col){var cell=this.getCell(row,col);if(cell){Ext.fly(cell).addClass("x-grid-cell-selected");}},onCellDeselect:function(row,col){var cell=this.getCell(row,col);if(cell){Ext.fly(cell).removeClass("x-grid-cell-selected");}},updateHeaderSortState:function(){var _11f=this.ds.getSortState();if(!_11f){return;}this.sortState=_11f;var _120=this.cm.findColumnIndex(_11f.field);if(_120!=-1){var _121=_11f.direction;var sc=this.sortClasses;var hds=this.el.select(this.headerSelector).removeClass(sc);hds.item(_120).addClass(sc[_121=="DESC"?1:0]);}},handleHeaderClick:function(g,_125){if(this.headersDisabled){return;}var dm=g.dataSource,cm=g.colModel;if(!cm.isSortable(_125)){return;}g.stopEditing();dm.sort(cm.getDataIndex(_125));},destroy:function(){if(this.colMenu){this.colMenu.removeAll();Ext.menu.MenuMgr.unregister(this.colMenu);this.colMenu.getEl().remove();delete this.colMenu;}if(this.hmenu){this.hmenu.removeAll();Ext.menu.MenuMgr.unregister(this.hmenu);this.hmenu.getEl().remove();delete this.hmenu;}if(this.grid.enableColumnMove){var dds=Ext.dd.DDM.ids["gridHeader"+this.grid.getGridEl().id];if(dds){for(var dd in dds){if(!dds[dd].config.isTarget&&dds[dd].dragElId){var elid=dds[dd].dragElId;dds[dd].unreg();Ext.get(elid).remove();}else{if(dds[dd].config.isTarget){dds[dd].proxyTop.remove();dds[dd].proxyBottom.remove();dds[dd].unreg();}}if(Ext.dd.DDM.locationCache[dd]){delete Ext.dd.DDM.locationCache[dd];}}delete Ext.dd.DDM.ids["gridHeader"+this.grid.getGridEl().id];}}Ext.util.CSS.removeStyleSheet(this.grid.id+"-cssrules");this.bind(null,null);Ext.EventManager.removeResizeListener(this.onWindowResize,this);},handleLockChange:function(){this.refresh(true);},onDenyColumnLock:function(){},onDenyColumnHide:function(){},handleHdMenuClick:function(item){var _12c=this.hdCtxIndex;var cm=this.cm,ds=this.ds;switch(item.id){case"asc":ds.sort(cm.getDataIndex(_12c),"ASC");break;case"desc":ds.sort(cm.getDataIndex(_12c),"DESC");break;case"lock":var lc=cm.getLockedCount();if(cm.getColumnCount(true)<=lc+1){this.onDenyColumnLock();return;}if(lc!=_12c){cm.setLocked(_12c,true,true);cm.moveColumn(_12c,lc);this.grid.fireEvent("columnmove",_12c,lc);}else{cm.setLocked(_12c,true);}break;case"unlock":var lc=cm.getLockedCount();if((lc-1)!=_12c){cm.setLocked(_12c,false,true);cm.moveColumn(_12c,lc-1);this.grid.fireEvent("columnmove",_12c,lc-1);}else{cm.setLocked(_12c,false);}break;default:_12c=cm.getIndexById(item.id.substr(4));if(_12c!=-1){if(item.checked&&cm.getColumnCount(true)<=1){this.onDenyColumnHide();return false;}cm.setHidden(_12c,item.checked);}}return true;},beforeColMenuShow:function(){var cm=this.cm,_131=cm.getColumnCount();this.colMenu.removeAll();for(var i=0;i<_131;i++){this.colMenu.add(new Ext.menu.CheckItem({id:"col-"+cm.getColumnId(i),text:cm.getColumnHeader(i),checked:!cm.isHidden(i),hideOnClick:false}));}},handleHdCtx:function(g,_134,e){e.stopEvent();var hd=this.getHeaderCell(_134);this.hdCtxIndex=_134;var ms=this.hmenu.items,cm=this.cm;ms.get("asc").setDisabled(!cm.isSortable(_134));ms.get("desc").setDisabled(!cm.isSortable(_134));if(this.grid.enableColLock!==false){ms.get("lock").setDisabled(cm.isLocked(_134));ms.get("unlock").setDisabled(!cm.isLocked(_134));}this.hmenu.show(hd,"tl-bl");},handleHdOver:function(e){var hd=this.findHeaderCell(e.getTarget());if(hd&&!this.headersDisabled){if(this.grid.colModel.isSortable(this.getCellIndex(hd))){this.fly(hd).addClass("x-grid-hd-over");}}},handleHdOut:function(e){var hd=this.findHeaderCell(e.getTarget());if(hd){this.fly(hd).removeClass("x-grid-hd-over");}},handleSplitDblClick:function(e,t){var i=this.getCellIndex(t);if(this.grid.enableColumnResize!==false&&this.cm.isResizable(i)&&!this.cm.isFixed(i)){this.autoSizeColumn(i,true);this.layout();}},render:function(){var cm=this.cm;var _141=cm.getColumnCount();if(this.grid.monitorWindowResize===true){Ext.EventManager.onWindowResize(this.onWindowResize,this,true);}var _142=this.renderHeaders();var body=this.templates.body.apply({rows:""});var html=this.templates.master.apply({lockedBody:body,body:body,lockedHeader:_142[0],header:_142[1]});this.grid.getGridEl().dom.innerHTML=html;this.initElements();this.scroller.on("scroll",this.handleScroll,this);this.lockedBody.on("mousewheel",this.handleWheel,this);this.mainBody.on("mousewheel",this.handleWheel,this);this.mainHd.on("mouseover",this.handleHdOver,this);this.mainHd.on("mouseout",this.handleHdOut,this);this.mainHd.on("dblclick",this.handleSplitDblClick,this,{delegate:"."+this.splitClass});this.lockedHd.on("mouseover",this.handleHdOver,this);this.lockedHd.on("mouseout",this.handleHdOut,this);this.lockedHd.on("dblclick",this.handleSplitDblClick,this,{delegate:"."+this.splitClass});if(this.grid.enableColumnResize!==false&&Ext.grid.SplitDragZone){new Ext.grid.SplitDragZone(this.grid,this.lockedHd.dom,this.mainHd.dom);}this.updateSplitters();if(this.grid.enableColumnMove&&Ext.grid.HeaderDragZone){new Ext.grid.HeaderDragZone(this.grid,this.lockedHd.dom,this.mainHd.dom);new Ext.grid.HeaderDropZone(this.grid,this.lockedHd.dom,this.mainHd.dom);}if(this.grid.enableCtxMenu!==false&&Ext.menu.Menu){this.hmenu=new Ext.menu.Menu({id:this.grid.id+"-hctx"});this.hmenu.add({id:"asc",text:this.sortAscText,cls:"xg-hmenu-sort-asc"},{id:"desc",text:this.sortDescText,cls:"xg-hmenu-sort-desc"});if(this.grid.enableColLock!==false){this.hmenu.add("-",{id:"lock",text:this.lockText,cls:"xg-hmenu-lock"},{id:"unlock",text:this.unlockText,cls:"xg-hmenu-unlock"});}if(this.grid.enableColumnHide!==false){this.colMenu=new Ext.menu.Menu({id:this.grid.id+"-hcols-menu"});this.colMenu.on("beforeshow",this.beforeColMenuShow,this);this.colMenu.on("itemclick",this.handleHdMenuClick,this);this.hmenu.add("-",{id:"columns",text:this.columnsText,menu:this.colMenu});}this.hmenu.on("itemclick",this.handleHdMenuClick,this);this.grid.on("headercontextmenu",this.handleHdCtx,this);}if((this.grid.enableDragDrop||this.grid.enableDrag)&&Ext.grid.GridDragZone){this.dd=new Ext.grid.GridDragZone(this.grid,{ddGroup:this.grid.ddGroup||"GridDD"});}this.updateHeaderSortState();this.beforeInitialResize();this.layout(true);this.renderPhase2.defer(1,this);},renderPhase2:function(){this.refresh();if(this.grid.autoSizeColumns){this.autoSizeColumns();}},beforeInitialResize:function(){},onColumnSplitterMoved:function(i,w){this.userResized=true;var cm=this.grid.colModel;cm.setColumnWidth(i,w,true);var cid=cm.getColumnId(i);this.css.updateRule(this.colSelector+cid,"width",(w-this.borderWidth)+"px");this.css.updateRule(this.hdSelector+cid,"width",(w-this.borderWidth)+"px");this.updateSplitters();this.layout();this.grid.fireEvent("columnresize",i,w);},syncRowHeights:function(_149,_14a){if(this.grid.enableRowHeightSync===true&&this.cm.getLockedCount()>0){_149=_149||0;var _14b=this.getBodyTable().rows;var _14c=this.getLockedTable().rows;var len=_14b.length-1;_14a=Math.min(_14a||len,len);for(var i=_149;i<=_14a;i++){var m=_14b[i],l=_14c[i];var h=Math.max(m.offsetHeight,l.offsetHeight);m.style.height=l.style.height=h+"px";}}},layout:function(_152,_153){var g=this.grid;var auto=g.autoHeight;var _156=16;var c=g.getGridEl(),cm=this.cm,_159=g.autoExpandColumn,gv=this;if(!c.dom.offsetWidth){if(_152){this.lockedWrap.show();this.mainWrap.show();}return;}var _15b=this.cm.isLocked(0);var tbh=this.headerPanel.getHeight();var bbh=this.footerPanel.getHeight();if(auto){var ch=this.getBodyTable().offsetHeight+tbh+bbh+this.mainHd.getHeight();var _15f=ch+c.getBorderWidth("tb");if(g.maxHeight){_15f=Math.min(g.maxHeight,_15f);}c.setHeight(_15f);}if(g.autoWidth){c.setWidth(cm.getTotalWidth()+c.getBorderWidth("lr"));}var s=this.scroller;var _161=c.getSize(true);this.el.setSize(_161.width,_161.height);this.headerPanel.setWidth(_161.width);this.footerPanel.setWidth(_161.width);var _162=this.mainHd.getHeight();var vw=_161.width;var vh=_161.height-(tbh+bbh);s.setSize(vw,vh);var bt=this.getBodyTable();var _166=_15b?Math.max(this.getLockedTable().offsetWidth,this.lockedHd.dom.firstChild.offsetWidth):0;var _167=bt.offsetHeight;var _168=_166+bt.offsetWidth;var _169=false,_16a=false;this.scrollSizer.setSize(_168,_167+_162);var lw=this.lockedWrap,mw=this.mainWrap;var lb=this.lockedBody,mb=this.mainBody;setTimeout(function(){var t=s.dom.offsetTop;var w=s.dom.clientWidth,h=s.dom.clientHeight;lw.setTop(t);lw.setSize(_166,h);mw.setLeftTop(_166,t);mw.setSize(w-_166,h);lb.setHeight(h-_162);mb.setHeight(h-_162);if(_153!==true&&!gv.userResized&&_159){var ci=cm.getIndexById(_159);var tw=cm.getTotalWidth(false);var _174=cm.getColumnWidth(ci);var cw=Math.min(Math.max(((w-tw)+_174-2)-(w<=s.dom.offsetWidth?0:18),g.autoExpandMin),g.autoExpandMax);if(_174!=cw){cm.setColumnWidth(ci,cw,true);gv.css.updateRule(gv.colSelector+_159,"width",(cw-gv.borderWidth)+"px");gv.css.updateRule(gv.hdSelector+_159,"width",(cw-gv.borderWidth)+"px");gv.updateSplitters();gv.layout(false,true);}}if(_152){lw.show();mw.show();}},10);},onWindowResize:function(){if(!this.grid.monitorWindowResize||this.grid.autoHeight){return;}this.layout();},appendFooter:function(_176){return null;},sortAscText:"Sort Ascending",sortDescText:"Sort Descending",lockText:"Lock Column",unlockText:"Unlock Column",columnsText:"Columns"}); 
add: return $A(children).inject([], function(elements, child) { if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)"))) elements.push(child); return elements; }); 
context: Ext.grid.GridView=function(_1){Ext.grid.GridView.superclass.constructor.call(this);this.el=null;Ext.apply(this,_1);};Ext.extend(Ext.grid.GridView,Ext.grid.AbstractGridView,{rowClass:"x-grid-row",cellClass:"x-grid-col",tdClass:"x-grid-td",hdClass:"x-grid-hd",splitClass:"x-grid-split",sortClasses:["sort-asc","sort-desc"],enableMoveAnim:false,hlColor:"C3DAF9",dh:Ext.DomHelper,fly:Ext.Element.fly,css:Ext.util.CSS,borderWidth:1,splitOffset:3,scrollIncrement:22,cellRE:/(?:.*?)x-grid-(?:hd|cell|csplit)-(?:[\d]+)-([\d]+)(?:.*?)/,findRE:/\s?(?:x-grid-hd|x-grid-col|x-grid-csplit)\s/,bind:function(ds,cm){if(this.ds){this.ds.un("load",this.onLoad,this);this.ds.un("datachanged",this.onDataChange,this);this.ds.un("add",this.onAdd,this);this.ds.un("remove",this.onRemove,this);this.ds.un("update",this.onUpdate,this);this.ds.un("clear",this.onClear,this);}if(ds){ds.on("load",this.onLoad,this);ds.on("datachanged",this.onDataChange,this);ds.on("add",this.onAdd,this);ds.on("remove",this.onRemove,this);ds.on("update",this.onUpdate,this);ds.on("clear",this.onClear,this);}this.ds=ds;if(this.cm){this.cm.un("widthchange",this.onColWidthChange,this);this.cm.un("headerchange",this.onHeaderChange,this);this.cm.un("hiddenchange",this.onHiddenChange,this);this.cm.un("columnmoved",this.onColumnMove,this);this.cm.un("columnlockchange",this.onColumnLock,this);}if(cm){this.generateRules(cm);cm.on("widthchange",this.onColWidthChange,this);cm.on("headerchange",this.onHeaderChange,this);cm.on("hiddenchange",this.onHiddenChange,this);cm.on("columnmoved",this.onColumnMove,this);cm.on("columnlockchange",this.onColumnLock,this);}this.cm=cm;},init:function(_4){Ext.grid.GridView.superclass.init.call(this,_4);this.bind(_4.dataSource,_4.colModel);_4.on("headerclick",this.handleHeaderClick,this);if(_4.trackMouseOver){_4.on("mouseover",this.onRowOver,this);_4.on("mouseout",this.onRowOut,this);}_4.cancelTextSelection=function(){};this.gridId=_4.id;var _5=this.templates||{};if(!_5.master){_5.master=new Ext.Template("<div class=\"x-grid\" hidefocus=\"true\">","<div class=\"x-grid-topbar\"></div>","<div class=\"x-grid-scroller\"><div></div></div>","<div class=\"x-grid-locked\">","<div class=\"x-grid-header\">{lockedHeader}</div>","<div class=\"x-grid-body\">{lockedBody}</div>","</div>","<div class=\"x-grid-viewport\">","<div class=\"x-grid-header\">{header}</div>","<div class=\"x-grid-body\">{body}</div>","</div>","<div class=\"x-grid-bottombar\"></div>","<a href=\"#\" class=\"x-grid-focus\" tabIndex=\"-1\"></a>","<div class=\"x-grid-resize-proxy\">&#160;</div>","</div>");_5.master.disableformats=true;}if(!_5.header){_5.header=new Ext.Template("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">","<tbody><tr class=\"x-grid-hd-row\">{cells}</tr></tbody>","</table>{splits}");_5.header.disableformats=true;}_5.header.compile();if(!_5.hcell){_5.hcell=new Ext.Template("<td class=\"x-grid-hd x-grid-td-{id} {cellId}\"><div title=\"{title}\" class=\"x-grid-hd-inner x-grid-hd-{id}\">","<div class=\"x-grid-hd-text\" unselectable=\"on\">{value}<img class=\"x-grid-sort-icon\" src=\"",Ext.BLANK_IMAGE_URL,"\" /></div>","</div></td>");_5.hcell.disableFormats=true;}_5.hcell.compile();if(!_5.hsplit){_5.hsplit=new Ext.Template("<div class=\"x-grid-split {splitId} x-grid-split-{id}\" style=\"{style}\" unselectable=\"on\">&#160;</div>");_5.hsplit.disableFormats=true;}_5.hsplit.compile();if(!_5.body){_5.body=new Ext.Template("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">","<tbody>{rows}</tbody>","</table>");_5.body.disableFormats=true;}_5.body.compile();if(!_5.row){_5.row=new Ext.Template("<tr class=\"x-grid-row {alt}\">{cells}</tr>");_5.row.disableFormats=true;}_5.row.compile();if(!_5.cell){_5.cell=new Ext.Template("<td class=\"x-grid-col x-grid-td-{id} {cellId} {css}\" tabIndex=\"0\">","<div class=\"x-grid-col-{id} x-grid-cell-inner\"><div class=\"x-grid-cell-text\" unselectable=\"on\" {attr}>{value}</div></div>","</td>");_5.cell.disableFormats=true;}_5.cell.compile();this.templates=_5;},onColWidthChange:function(){this.updateColumns.apply(this,arguments);},onHeaderChange:function(){this.updateHeaders.apply(this,arguments);},onHiddenChange:function(){this.handleHiddenChange.apply(this,arguments);},onColumnMove:function(){this.handleColumnMove.apply(this,arguments);},onColumnLock:function(){this.handleLockChange.apply(this,arguments);},onDataChange:function(){this.refresh();this.updateHeaderSortState();},onClear:function(){this.refresh();},onUpdate:function(ds,_7){this.refreshRow(_7);},refreshRow:function(_8){var ds=this.ds,_a;if(typeof _8=="number"){_a=_8;_8=ds.getAt(_a);}else{_a=ds.indexOf(_8);}this.insertRows(ds,_a,_a,true);this.onRemove(ds,_8,_a+1,true);this.syncRowHeights(_a,_a);this.layout();this.fireEvent("rowupdated",this,_a,_8);},onAdd:function(ds,_c,_d){this.insertRows(ds,_d,_d+(_c.length-1));},onRemove:function(ds,_f,_10,_11){if(_11!==true){this.fireEvent("beforerowremoved",this,_10,_f);}var bt=this.getBodyTable(),lt=this.getLockedTable();if(bt.rows[_10]){bt.firstChild.removeChild(bt.rows[_10]);}if(lt.rows[_10]){lt.firstChild.removeChild(lt.rows[_10]);}if(_11!==true){this.stripeRows(_10);this.syncRowHeights(_10,_10);this.layout();this.fireEvent("rowremoved",this,_10,_f);}},onLoad:function(){this.scrollToTop();},scrollToTop:function(){if(this.scroller){this.scroller.dom.scrollTop=0;this.syncScroll();}},getHeaderPanel:function(_14){if(_14){this.headerPanel.show();}return this.headerPanel;},getFooterPanel:function(_15){if(_15){this.footerPanel.show();}return this.footerPanel;},initElements:function(){var E=Ext.Element;var el=this.grid.getGridEl().dom.firstChild;var cs=el.childNodes;this.el=new E(el);this.headerPanel=new E(el.firstChild);this.headerPanel.enableDisplayMode("block");this.scroller=new E(cs[1]);this.scrollSizer=new E(this.scroller.dom.firstChild);this.lockedWrap=new E(cs[2]);this.lockedHd=new E(this.lockedWrap.dom.firstChild);this.lockedBody=new E(this.lockedWrap.dom.childNodes[1]);this.mainWrap=new E(cs[3]);this.mainHd=new E(this.mainWrap.dom.firstChild);this.mainBody=new E(this.mainWrap.dom.childNodes[1]);this.footerPanel=new E(cs[4]);this.footerPanel.enableDisplayMode("block");this.focusEl=new E(cs[5]);this.focusEl.swallowEvent("click",true);this.resizeProxy=new E(cs[6]);this.headerSelector=String.format("#{0} td.x-grid-hd, #{1} td.x-grid-hd",this.lockedHd.id,this.mainHd.id);this.splitterSelector=String.format("#{0} div.x-grid-split, #{1} div.x-grid-split",this.lockedHd.id,this.mainHd.id);},getHeaderCell:function(_19){return Ext.DomQuery.select(this.headerSelector)[_19];},getHeaderCellMeasure:function(_1a){return this.getHeaderCell(_1a).firstChild;},getHeaderCellText:function(_1b){return this.getHeaderCell(_1b).firstChild.firstChild;},getLockedTable:function(){return this.lockedBody.dom.firstChild;},getBodyTable:function(){return this.mainBody.dom.firstChild;},getLockedRow:function(_1c){return this.getLockedTable().rows[_1c];},getRow:function(_1d){return this.getBodyTable().rows[_1d];},getRowComposite:function(_1e){if(!this.rowEl){this.rowEl=new Ext.CompositeElementLite();}var els=[],_20,_21;if(_20=this.getLockedRow(_1e)){els.push(_20);}if(_21=this.getRow(_1e)){els.push(_21);}this.rowEl.elements=els;return this.rowEl;},getCell:function(_22,_23){var _24=this.cm.getLockedCount();var _25;if(_23<_24){_25=this.lockedBody.dom.firstChild;}else{_25=this.mainBody.dom.firstChild;_23-=_24;}return _25.rows[_22].childNodes[_23];},getCellText:function(_26,_27){return this.getCell(_26,_27).firstChild.firstChild;},getCellBox:function(_28){var b=this.fly(_28).getBox();if(Ext.isOpera){b.y=_28.offsetTop+this.mainBody.getY();}return b;},getCellIndex:function(_2a){var id=String(_2a.className).match(this.cellRE);if(id){return parseInt(id[1],10);}return 0;},findHeaderIndex:function(n){var r=Ext.fly(n).findParent("td."+this.hdClass,6);return r?this.getCellIndex(r):false;},findHeaderCell:function(n){var r=Ext.fly(n).findParent("td."+this.hdClass,6);return r?r:false;},findRowIndex:function(n){if(!n){return false;}var r=Ext.fly(n).findParent("tr."+this.rowClass,6);return r?r.rowIndex:false;},findCellIndex:function(_32){var _33=this.el.dom;while(_32&&_32!=_33){if(this.findRE.test(_32.className)){return this.getCellIndex(_32);}_32=_32.parentNode;}return false;},getColumnId:function(_34){return this.cm.getColumnId(_34);},getSplitters:function(){if(this.splitterSelector){return Ext.DomQuery.select(this.splitterSelector);}else{return null;}},getSplitter:function(_35){return this.getSplitters()[_35];},onRowOver:function(e,t){var row;if((row=this.findRowIndex(t))!==false){this.getRowComposite(row).addClass("x-grid-row-over");}},onRowOut:function(e,t){var row;if((row=this.findRowIndex(t))!==false&&row!==this.findRowIndex(e.getRelatedTarget())){this.getRowComposite(row).removeClass("x-grid-row-over");}},renderHeaders:function(){var cm=this.cm;var ct=this.templates.hcell,ht=this.templates.header,st=this.templates.hsplit;var cb=[],lb=[],sb=[],lsb=[],p={};for(var i=0,len=cm.getColumnCount();i<len;i++){p.cellId="x-grid-hd-0-"+i;p.splitId="x-grid-csplit-0-"+i;p.id=cm.getColumnId(i);p.title=cm.getColumnTooltip(i)||"";p.value=cm.getColumnHeader(i)||"";p.style=(this.grid.enableColumnResize===false||!cm.isResizable(i)||cm.isFixed(i))?"cursor:default":"";if(!cm.isLocked(i)){cb[cb.length]=ct.apply(p);sb[sb.length]=st.apply(p);}else{lb[lb.length]=ct.apply(p);lsb[lsb.length]=st.apply(p);}}return[ht.apply({cells:lb.join(""),splits:lsb.join("")}),ht.apply({cells:cb.join(""),splits:sb.join("")})];},updateHeaders:function(){var _47=this.renderHeaders();this.lockedHd.update(_47[0]);this.mainHd.update(_47[1]);},focusRow:function(row){var x=this.scroller.dom.scrollLeft;this.focusCell(row,0,false);this.scroller.dom.scrollLeft=x;},focusCell:function(row,col,_4c){var el=this.ensureVisible(row,col,_4c);this.focusEl.alignTo(el,"tl-tl");if(Ext.isGecko){this.focusEl.focus();}else{this.focusEl.focus.defer(1,this.focusEl);}},ensureVisible:function(row,col,_50){if(typeof row!="number"){row=row.rowIndex;}if(row<0&&row>=this.ds.getCount()){return;}col=(col!==undefined?col:0);var cm=this.grid.colModel;while(cm.isHidden(col)){col++;}var el=this.getCell(row,col);if(!el){return;}var c=this.scroller.dom;var _54=parseInt(el.offsetTop,10);var _55=parseInt(el.offsetLeft,10);var _56=_54+el.offsetHeight;var _57=_55+el.offsetWidth;var ch=c.clientHeight-this.mainHd.dom.offsetHeight;var _59=parseInt(c.scrollTop,10);var _5a=parseInt(c.scrollLeft,10);var _5b=_59+ch;var _5c=_5a+c.clientWidth;if(_54<_59){c.scrollTop=_54;}else{if(_56>_5b){c.scrollTop=_56-ch;}}if(_50!==false){if(_55<_5a){c.scrollLeft=_55;}else{if(_57>_5c){c.scrollLeft=_57-c.clientWidth;}}}return el;},updateColumns:function(){this.grid.stopEditing();var cm=this.grid.colModel,_5e=this.getColumnIds();var pos=0;for(var i=0,len=cm.getColumnCount();i<len;i++){var w=cm.getColumnWidth(i);this.css.updateRule(this.colSelector+_5e[i],"width",(w-this.borderWidth)+"px");this.css.updateRule(this.hdSelector+_5e[i],"width",(w-this.borderWidth)+"px");}this.updateSplitters();},generateRules:function(cm){var _64=[],_65=this.grid.id+"-cssrules";Ext.util.CSS.removeStyleSheet(_65);for(var i=0,len=cm.getColumnCount();i<len;i++){var cid=cm.getColumnId(i);var _69="";if(cm.config[i].align){_69="text-align:"+cm.config[i].align+";";}var _6a="";if(cm.isHidden(i)){_6a="display:none;";}var _6b="width:"+(cm.getColumnWidth(i)-this.borderWidth)+"px;";_64.push(this.colSelector,cid," {\n",cm.config[i].css,_69,_6b,"\n}\n",this.hdSelector,cid," {\n",_69,_6b,"}\n",this.tdSelector,cid," {\n",_6a,"\n}\n",this.splitSelector,cid," {\n",_6a,"\n}\n");}return Ext.util.CSS.createStyleSheet(_64.join(""),_65);},updateSplitters:function(){var cm=this.cm,s=this.getSplitters();if(s){var pos=0,_6f=true;for(var i=0,len=cm.getColumnCount();i<len;i++){if(cm.isHidden(i)){continue;}var w=cm.getColumnWidth(i);if(!cm.isLocked(i)&&_6f){pos=0;_6f=false;}pos+=w;s[i].style.left=(pos-this.splitOffset)+"px";}}},handleHiddenChange:function(_73,_74,_75){if(_75){this.hideColumn(_74);}else{this.unhideColumn(_74);}},hideColumn:function(_76){var cid=this.getColumnId(_76);this.css.updateRule(this.tdSelector+cid,"display","none");this.css.updateRule(this.splitSelector+cid,"display","none");if(Ext.isSafari){this.updateHeaders();}this.updateSplitters();this.layout();},unhideColumn:function(_78){var cid=this.getColumnId(_78);this.css.updateRule(this.tdSelector+cid,"display","");this.css.updateRule(this.splitSelector+cid,"display","");if(Ext.isSafari){this.updateHeaders();}this.updateSplitters();this.layout();},insertRows:function(dm,_7b,_7c,_7d){if(_7b==0&&_7c==dm.getCount()-1){this.refresh();}else{if(!_7d){this.fireEvent("beforerowsinserted",this,_7b,_7c);}var s=this.getScrollState();var _7f=this.renderRows(_7b,_7c);this.bufferRows(_7f[0],this.getLockedTable(),_7b);this.bufferRows(_7f[1],this.getBodyTable(),_7b);this.restoreScroll(s);if(!_7d){this.fireEvent("rowsinserted",this,_7b,_7c);this.syncRowHeights(_7b,_7c);this.stripeRows(_7b);this.layout();}}},bufferRows:function(_80,_81,_82){var _83=null,_84=_81.rows,_85=_81.tBodies[0];if(_82<_84.length){_83=_84[_82];}var b=document.createElement("div");b.innerHTML="<table><tbody>"+_80+"</tbody></table>";var _87=b.firstChild.rows;for(var i=0,len=_87.length;i<len;i++){if(_83){_85.insertBefore(_87[0],_83);}else{_85.appendChild(_87[0]);}}b.innerHTML="";b=null;},deleteRows:function(dm,_8b,_8c){if(dm.getRowCount()<1){this.fireEvent("beforerefresh",this);this.mainBody.update("");this.lockedBody.update("");this.fireEvent("refresh",this);}else{this.fireEvent("beforerowsdeleted",this,_8b,_8c);var bt=this.getBodyTable();var _8e=bt.firstChild;var _8f=bt.rows;for(var _90=_8b;_90<=_8c;_90++){_8e.removeChild(_8f[_8b]);}this.stripeRows(_8b);this.fireEvent("rowsdeleted",this,_8b,_8c);}},updateRows:function(_91,_92,_93){var s=this.getScrollState();this.refresh();this.restoreScroll(s);},handleSort:function(_95,_96,_97,_98){if(!_98){this.refresh();}this.updateHeaderSortState();},getScrollState:function(){var sb=this.scroller.dom;return{left:sb.scrollLeft,top:sb.scrollTop};},stripeRows:function(_9a){if(!this.grid.stripeRows||this.ds.getCount()<1){return;}_9a=_9a||0;var _9b=this.getBodyTable().rows;var _9c=this.getLockedTable().rows;var cls=" x-grid-row-alt ";for(var i=_9a,len=_9b.length;i<len;i++){var row=_9b[i],_a1=_9c[i];var _a2=((i+1)%2==0);var _a3=(" "+row.className+" ").indexOf(cls)!=-1;if(_a2==_a3){continue;}if(_a2){row.className+=" x-grid-row-alt";}else{row.className=row.className.replace("x-grid-row-alt","");}if(_a1){_a1.className=row.className;}}},restoreScroll:function(_a4){var sb=this.scroller.dom;sb.scrollLeft=_a4.left;sb.scrollTop=_a4.top;this.syncScroll();},syncScroll:function(){var sb=this.scroller.dom;var sh=this.mainHd.dom;var bs=this.mainBody.dom;var lv=this.lockedBody.dom;sh.scrollLeft=bs.scrollLeft=sb.scrollLeft;lv.scrollTop=bs.scrollTop=sb.scrollTop;},handleScroll:function(e){this.syncScroll();var sb=this.scroller.dom;this.grid.fireEvent("bodyscroll",sb.scrollLeft,sb.scrollTop);e.stopEvent();},handleWheel:function(e){var d=e.getWheelDelta();this.scroller.dom.scrollTop-=d*22;this.lockedBody.dom.scrollTop=this.mainBody.dom.scrollTop=this.scroller.dom.scrollTop;e.stopEvent();},renderRows:function(_ae,_af){var g=this.grid,cm=g.colModel,ds=g.dataSource,_b3=g.stripeRows;var _b4=cm.getColumnCount();if(ds.getCount()<1){return["",""];}var cs=[];for(var i=0;i<_b4;i++){var _b7=cm.getDataIndex(i);cs[i]={name:typeof _b7=="undefined"?ds.fields.get(i).name:_b7,renderer:cm.getRenderer(i),id:cm.getColumnId(i),locked:cm.isLocked(i)};}_ae=_ae||0;_af=typeof _af=="undefined"?ds.getCount()-1:_af;var rs=ds.getRange(_ae,_af);return this.doRender(cs,rs,ds,_ae,_b4,_b3);},doRender:Ext.isGecko?function(cs,rs,ds,_bc,_bd,_be){var ts=this.templates,ct=ts.cell,rt=ts.row;var buf="",_c3="",cb,lcb,c,p={},rp={},r,_ca;for(var j=0,len=rs.length;j<len;j++){r=rs[j];cb="";lcb="";_ca=(j+_bc);for(var i=0;i<_bd;i++){c=cs[i];p.cellId="x-grid-cell-"+_ca+"-"+i;p.id=c.id;p.css=p.attr="";p.value=c.renderer(r.data[c.name],p,r,_ca,i,ds);if(p.value==undefined||p.value===""){p.value="&#160;";}if(r.dirty&&typeof r.modified[c.name]!=="undefined"){p.css+=p.css?" x-grid-dirty-cell":"x-grid-dirty-cell";}var _ce=ct.apply(p);if(!c.locked){cb+=_ce;}else{lcb+=_ce;}}var alt=[];if(_be&&((_ca+1)%2==0)){alt[0]="x-grid-row-alt";}if(r.dirty){alt[1]=" x-grid-dirty-row";}rp.cells=lcb;if(this.getRowClass){alt[2]=this.getRowClass(r,_ca);}rp.alt=alt.join(" ");_c3+=rt.apply(rp);rp.cells=cb;buf+=rt.apply(rp);}return[_c3,buf];}:function(cs,rs,ds,_d3,_d4,_d5){var ts=this.templates,ct=ts.cell,rt=ts.row;var buf=[],_da=[],cb,lcb,c,p={},rp={},r,_e1;for(var j=0,len=rs.length;j<len;j++){r=rs[j];cb=[];lcb=[];_e1=(j+_d3);for(var i=0;i<_d4;i++){c=cs[i];p.cellId="x-grid-cell-"+_e1+"-"+i;p.id=c.id;p.css=p.attr="";p.value=c.renderer(r.data[c.name],p,r,_e1,i,ds);if(p.value==undefined||p.value===""){p.value="&#160;";}if(r.dirty&&typeof r.modified[c.name]!=="undefined"){p.css+=p.css?" x-grid-dirty-cell":"x-grid-dirty-cell";}var _e5=ct.apply(p);if(!c.locked){cb[cb.length]=_e5;}else{lcb[lcb.length]=_e5;}}var alt=[];if(_d5&&((_e1+1)%2==0)){alt[0]="x-grid-row-alt";}if(r.dirty){alt[1]=" x-grid-dirty-row";}rp.cells=lcb;if(this.getRowClass){alt[2]=this.getRowClass(r,_e1);}rp.alt=alt.join(" ");rp.cells=lcb.join("");_da[_da.length]=rt.apply(rp);rp.cells=cb.join("");buf[buf.length]=rt.apply(rp);}return[_da.join(""),buf.join("")];},renderBody:function(){var _e7=this.renderRows();var bt=this.templates.body;return[bt.apply({rows:_e7[0]}),bt.apply({rows:_e7[1]})];},refresh:function(_e9){this.fireEvent("beforerefresh",this);this.grid.stopEditing();var _ea=this.renderBody();this.lockedBody.update(_ea[0]);this.mainBody.update(_ea[1]);if(_e9===true){this.updateHeaders();this.updateColumns();this.updateSplitters();this.updateHeaderSortState();}this.syncRowHeights();this.layout();this.fireEvent("refresh",this);},handleColumnMove:function(cm,_ec,_ed){this.indexMap=null;var s=this.getScrollState();this.refresh(true);this.restoreScroll(s);this.afterMove(_ed);},afterMove:function(_ef){if(this.enableMoveAnim&&Ext.enableFx){this.fly(this.getHeaderCell(_ef).firstChild).highlight(this.hlColor);}},updateCell:function(dm,_f1,_f2){var _f3=this.getColumnIndexByDataIndex(_f2);if(typeof _f3=="undefined"){return;}var cm=this.grid.colModel;var _f5=this.getCell(_f1,_f3);var _f6=this.getCellText(_f1,_f3);var p={cellId:"x-grid-cell-"+_f1+"-"+_f3,id:cm.getColumnId(_f3),css:_f3==cm.getColumnCount()-1?"x-grid-col-last":""};var _f8=cm.getRenderer(_f3);var val=_f8(dm.getValueAt(_f1,_f2),p,_f1,_f3,dm);if(typeof val=="undefined"||val===""){val="&#160;";}_f6.innerHTML=val;_f5.className=this.cellClass+" "+p.cellId+" "+p.css;this.syncRowHeights(_f1,_f1);},calcColumnWidth:function(_fa,_fb){var _fc=0;if(this.grid.autoSizeHeaders){var h=this.getHeaderCellMeasure(_fa);_fc=Math.max(_fc,h.scrollWidth);}var tb,_ff;if(this.cm.isLocked(_fa)){tb=this.getLockedTable();_ff=_fa;}else{tb=this.getBodyTable();_ff=_fa-this.cm.getLockedCount();}if(tb&&tb.rows){var rows=tb.rows;var _101=Math.min(_fb||rows.length,rows.length);for(var i=0;i<_101;i++){var cell=rows[i].childNodes[_ff].firstChild;_fc=Math.max(_fc,cell.scrollWidth);}}return _fc+5;},autoSizeColumn:function(_104,_105,_106){if(this.cm.isHidden(_104)){return;}if(_105){var cid=this.cm.getColumnId(_104);this.css.updateRule(this.colSelector+cid,"width",this.grid.minColumnWidth+"px");if(this.grid.autoSizeHeaders){this.css.updateRule(this.hdSelector+cid,"width",this.grid.minColumnWidth+"px");}}var _108=this.calcColumnWidth(_104);this.cm.setColumnWidth(_104,Math.max(this.grid.minColumnWidth,_108),_106);if(!_106){this.grid.fireEvent("columnresize",_104,_108);}},autoSizeColumns:function(){var cm=this.grid.colModel;var _10a=cm.getColumnCount();for(var i=0;i<_10a;i++){this.autoSizeColumn(i,true,true);}if(cm.getTotalWidth()<this.scroller.dom.clientWidth){this.fitColumns();}else{this.updateColumns();this.layout();}},fitColumns:function(_10c){var cm=this.grid.colModel;var _10e=cm.getColumnCount();var cols=[];var _110=0;var i,w;for(i=0;i<_10e;i++){if(!cm.isHidden(i)&&!cm.isFixed(i)){w=cm.getColumnWidth(i);cols.push(i);cols.push(w);_110+=w;}}var _113=Math.min(this.scroller.dom.clientWidth,this.el.getWidth());if(_10c){_113-=17;}var frac=(_113-cm.getTotalWidth())/_110;while(cols.length){w=cols.pop();i=cols.pop();cm.setColumnWidth(i,Math.floor(w+w*frac),true);}this.updateColumns();this.layout();},onRowSelect:function(_115){var row=this.getRowComposite(_115);row.addClass("x-grid-row-selected");},onRowDeselect:function(_117){var row=this.getRowComposite(_117);row.removeClass("x-grid-row-selected");},onCellSelect:function(row,col){var cell=this.getCell(row,col);if(cell){Ext.fly(cell).addClass("x-grid-cell-selected");}},onCellDeselect:function(row,col){var cell=this.getCell(row,col);if(cell){Ext.fly(cell).removeClass("x-grid-cell-selected");}},updateHeaderSortState:function(){var _11f=this.ds.getSortState();if(!_11f){return;}this.sortState=_11f;var _120=this.cm.findColumnIndex(_11f.field);if(_120!=-1){var _121=_11f.direction;var sc=this.sortClasses;var hds=this.el.select(this.headerSelector).removeClass(sc);hds.item(_120).addClass(sc[_121=="DESC"?1:0]);}},handleHeaderClick:function(g,_125){if(this.headersDisabled){return;}var dm=g.dataSource,cm=g.colModel;if(!cm.isSortable(_125)){return;}g.stopEditing();dm.sort(cm.getDataIndex(_125));},destroy:function(){if(this.colMenu){this.colMenu.removeAll();Ext.menu.MenuMgr.unregister(this.colMenu);this.colMenu.getEl().remove();delete this.colMenu;}if(this.hmenu){this.hmenu.removeAll();Ext.menu.MenuMgr.unregister(this.hmenu);this.hmenu.getEl().remove();delete this.hmenu;}if(this.grid.enableColumnMove){var dds=Ext.dd.DDM.ids["gridHeader"+this.grid.getGridEl().id];if(dds){for(var dd in dds){if(!dds[dd].config.isTarget&&dds[dd].dragElId){var elid=dds[dd].dragElId;dds[dd].unreg();Ext.get(elid).remove();}else{if(dds[dd].config.isTarget){dds[dd].proxyTop.remove();dds[dd].proxyBottom.remove();dds[dd].unreg();}}if(Ext.dd.DDM.locationCache[dd]){delete Ext.dd.DDM.locationCache[dd];}}delete Ext.dd.DDM.ids["gridHeader"+this.grid.getGridEl().id];}}Ext.util.CSS.removeStyleSheet(this.grid.id+"-cssrules");this.bind(null,null);Ext.EventManager.removeResizeListener(this.onWindowResize,this);},handleLockChange:function(){this.refresh(true);},onDenyColumnLock:function(){},onDenyColumnHide:function(){},handleHdMenuClick:function(item){var _12c=this.hdCtxIndex;var cm=this.cm,ds=this.ds;switch(item.id){case"asc":ds.sort(cm.getDataIndex(_12c),"ASC");break;case"desc":ds.sort(cm.getDataIndex(_12c),"DESC");break;case"lock":var lc=cm.getLockedCount();if(cm.getColumnCount(true)<=lc+1){this.onDenyColumnLock();return;}if(lc!=_12c){cm.setLocked(_12c,true,true);cm.moveColumn(_12c,lc);this.grid.fireEvent("columnmove",_12c,lc);}else{cm.setLocked(_12c,true);}break;case"unlock":var lc=cm.getLockedCount();if((lc-1)!=_12c){cm.setLocked(_12c,false,true);cm.moveColumn(_12c,lc-1);this.grid.fireEvent("columnmove",_12c,lc-1);}else{cm.setLocked(_12c,false);}break;default:_12c=cm.getIndexById(item.id.substr(4));if(_12c!=-1){if(item.checked&&cm.getColumnCount(true)<=1){this.onDenyColumnHide();return false;}cm.setHidden(_12c,item.checked);}}return true;},beforeColMenuShow:function(){var cm=this.cm,_131=cm.getColumnCount();this.colMenu.removeAll();for(var i=0;i<_131;i++){this.colMenu.add(new Ext.menu.CheckItem({id:"col-"+cm.getColumnId(i),text:cm.getColumnHeader(i),checked:!cm.isHidden(i),hideOnClick:false}));}},handleHdCtx:function(g,_134,e){e.stopEvent();var hd=this.getHeaderCell(_134);this.hdCtxIndex=_134;var ms=this.hmenu.items,cm=this.cm;ms.get("asc").setDisabled(!cm.isSortable(_134));ms.get("desc").setDisabled(!cm.isSortable(_134));if(this.grid.enableColLock!==false){ms.get("lock").setDisabled(cm.isLocked(_134));ms.get("unlock").setDisabled(!cm.isLocked(_134));}this.hmenu.show(hd,"tl-bl");},handleHdOver:function(e){var hd=this.findHeaderCell(e.getTarget());if(hd&&!this.headersDisabled){if(this.grid.colModel.isSortable(this.getCellIndex(hd))){this.fly(hd).addClass("x-grid-hd-over");}}},handleHdOut:function(e){var hd=this.findHeaderCell(e.getTarget());if(hd){this.fly(hd).removeClass("x-grid-hd-over");}},handleSplitDblClick:function(e,t){var i=this.getCellIndex(t);if(this.grid.enableColumnResize!==false&&this.cm.isResizable(i)&&!this.cm.isFixed(i)){this.autoSizeColumn(i,true);this.layout();}},render:function(){var cm=this.cm;var _141=cm.getColumnCount();if(this.grid.monitorWindowResize===true){Ext.EventManager.onWindowResize(this.onWindowResize,this,true);}var _142=this.renderHeaders();var body=this.templates.body.apply({rows:""});var html=this.templates.master.apply({lockedBody:body,body:body,lockedHeader:_142[0],header:_142[1]});this.grid.getGridEl().dom.innerHTML=html;this.initElements();this.scroller.on("scroll",this.handleScroll,this);this.lockedBody.on("mousewheel",this.handleWheel,this);this.mainBody.on("mousewheel",this.handleWheel,this);this.mainHd.on("mouseover",this.handleHdOver,this);this.mainHd.on("mouseout",this.handleHdOut,this);this.mainHd.on("dblclick",this.handleSplitDblClick,this,{delegate:"."+this.splitClass});this.lockedHd.on("mouseover",this.handleHdOver,this);this.lockedHd.on("mouseout",this.handleHdOut,this);this.lockedHd.on("dblclick",this.handleSplitDblClick,this,{delegate:"."+this.splitClass});if(this.grid.enableColumnResize!==false&&Ext.grid.SplitDragZone){new Ext.grid.SplitDragZone(this.grid,this.lockedHd.dom,this.mainHd.dom);}this.updateSplitters();if(this.grid.enableColumnMove&&Ext.grid.HeaderDragZone){new Ext.grid.HeaderDragZone(this.grid,this.lockedHd.dom,this.mainHd.dom);new Ext.grid.HeaderDropZone(this.grid,this.lockedHd.dom,this.mainHd.dom);}if(this.grid.enableCtxMenu!==false&&Ext.menu.Menu){this.hmenu=new Ext.menu.Menu({id:this.grid.id+"-hctx"});this.hmenu.add({id:"asc",text:this.sortAscText,cls:"xg-hmenu-sort-asc"},{id:"desc",text:this.sortDescText,cls:"xg-hmenu-sort-desc"});if(this.grid.enableColLock!==false){this.hmenu.add("-",{id:"lock",text:this.lockText,cls:"xg-hmenu-lock"},{id:"unlock",text:this.unlockText,cls:"xg-hmenu-unlock"});}if(this.grid.enableColumnHide!==false){this.colMenu=new Ext.menu.Menu({id:this.grid.id+"-hcols-menu"});this.colMenu.on("beforeshow",this.beforeColMenuShow,this);this.colMenu.on("itemclick",this.handleHdMenuClick,this);this.hmenu.add("-",{id:"columns",text:this.columnsText,menu:this.colMenu});}this.hmenu.on("itemclick",this.handleHdMenuClick,this);this.grid.on("headercontextmenu",this.handleHdCtx,this);}if((this.grid.enableDragDrop||this.grid.enableDrag)&&Ext.grid.GridDragZone){this.dd=new Ext.grid.GridDragZone(this.grid,{ddGroup:this.grid.ddGroup||"GridDD"});}this.updateHeaderSortState();this.beforeInitialResize();this.layout(true);this.renderPhase2.defer(1,this);},renderPhase2:function(){this.refresh();if(this.grid.autoSizeColumns){this.autoSizeColumns();}},beforeInitialResize:function(){},onColumnSplitterMoved:function(i,w){this.userResized=true;var cm=this.grid.colModel;cm.setColumnWidth(i,w,true);var cid=cm.getColumnId(i);this.css.updateRule(this.colSelector+cid,"width",(w-this.borderWidth)+"px");this.css.updateRule(this.hdSelector+cid,"width",(w-this.borderWidth)+"px");this.updateSplitters();this.layout();this.grid.fireEvent("columnresize",i,w);},syncRowHeights:function(_149,_14a){if(this.grid.enableRowHeightSync===true&&this.cm.getLockedCount()>0){_149=_149||0;var _14b=this.getBodyTable().rows;var _14c=this.getLockedTable().rows;var len=_14b.length-1;_14a=Math.min(_14a||len,len);for(var i=_149;i<=_14a;i++){var m=_14b[i],l=_14c[i];var h=Math.max(m.offsetHeight,l.offsetHeight);m.style.height=l.style.height=h+"px";}}},layout:function(_152,_153){var g=this.grid;var auto=g.autoHeight;var _156=16;var c=g.getGridEl(),cm=this.cm,_159=g.autoExpandColumn,gv=this;if(!c.dom.offsetWidth){if(_152){this.lockedWrap.show();this.mainWrap.show();}return;}var _15b=this.cm.isLocked(0);var tbh=this.headerPanel.getHeight();var bbh=this.footerPanel.getHeight();if(auto){var ch=this.getBodyTable().offsetHeight+tbh+bbh+this.mainHd.getHeight();var _15f=ch+c.getBorderWidth("tb");if(g.maxHeight){_15f=Math.min(g.maxHeight,_15f);}c.setHeight(_15f);}if(g.autoWidth){c.setWidth(cm.getTotalWidth()+c.getBorderWidth("lr"));}var s=this.scroller;var _161=c.getSize(true);this.el.setSize(_161.width,_161.height);this.headerPanel.setWidth(_161.width);this.footerPanel.setWidth(_161.width);var _162=this.mainHd.getHeight();var vw=_161.width;var vh=_161.height-(tbh+bbh);s.setSize(vw,vh);var bt=this.getBodyTable();var _166=_15b?Math.max(this.getLockedTable().offsetWidth,this.lockedHd.dom.firstChild.offsetWidth):0;var _167=bt.offsetHeight;var _168=_166+bt.offsetWidth;var _169=false,_16a=false;this.scrollSizer.setSize(_168,_167+_162);var lw=this.lockedWrap,mw=this.mainWrap;var lb=this.lockedBody,mb=this.mainBody;setTimeout(function(){var t=s.dom.offsetTop;var w=s.dom.clientWidth,h=s.dom.clientHeight;lw.setTop(t);lw.setSize(_166,h);mw.setLeftTop(_166,t);mw.setSize(w-_166,h);lb.setHeight(h-_162);mb.setHeight(h-_162);if(_153!==true&&!gv.userResized&&_159){var ci=cm.getIndexById(_159);var tw=cm.getTotalWidth(false);var _174=cm.getColumnWidth(ci);var cw=Math.min(Math.max(((w-tw)+_174-2)-(w<=s.dom.offsetWidth?0:18),g.autoExpandMin),g.autoExpandMax);if(_174!=cw){cm.setColumnWidth(ci,cw,true);gv.css.updateRule(gv.colSelector+_159,"width",(cw-gv.borderWidth)+"px");gv.css.updateRule(gv.hdSelector+_159,"width",(cw-gv.borderWidth)+"px");gv.updateSplitters();gv.layout(false,true);}}if(_152){lw.show();mw.show();}},10);},onWindowResize:function(){if(!this.grid.monitorWindowResize||this.grid.autoHeight){return;}this.layout();},appendFooter:function(_176){return null;},sortAscText:"Sort Ascending",sortDescText:"Sort Descending",lockText:"Lock Column",unlockText:"Unlock Column",columnsText:"Columns"});
meta: 5269	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5269/ae81061ac655ec1ae6bfa7da48781e8af868744d/jsOut.js/buggy/Animator/dev/tmp/jsOut.js