Commit 59cd6037 authored by Frank Bergmann's avatar Frank Bergmann

- OpenACS 5.6

parent 2c038c9a
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.form.Action=function(B,A){this.form=B;this.options=A||{}};Ext.form.Action.CLIENT_INVALID="client";Ext.form.Action.SERVER_INVALID="server";Ext.form.Action.CONNECT_FAILURE="connect";Ext.form.Action.LOAD_FAILURE="load";Ext.form.Action.prototype={type:"default",failureType:undefined,response:undefined,result:undefined,run:function(A){},success:function(A){},handleResponse:function(A){},failure:function(A){this.response=A;this.failureType=Ext.form.Action.CONNECT_FAILURE;this.form.afterAction(this,false)},processResponse:function(A){this.response=A;if(!A.responseText){return true}this.result=this.handleResponse(A);return this.result},getUrl:function(C){var A=this.options.url||this.form.url||this.form.el.dom.action;if(C){var B=this.getParams();if(B){A+=(A.indexOf("?")!=-1?"&":"?")+B}}return A},getMethod:function(){return(this.options.method||this.form.method||this.form.el.dom.method||"POST").toUpperCase()},getParams:function(){var A=this.form.baseParams;var B=this.options.params;if(B){if(typeof B=="object"){B=Ext.urlEncode(Ext.applyIf(B,A))}else{if(typeof B=="string"&&A){B+="&"+Ext.urlEncode(A)}}}else{if(A){B=Ext.urlEncode(A)}}return B},createCallback:function(){return{success:this.success,failure:this.failure,scope:this,timeout:(this.form.timeout*1000),upload:this.form.fileUpload?this.success:undefined}}};Ext.form.Action.Submit=function(B,A){Ext.form.Action.Submit.superclass.constructor.call(this,B,A)};Ext.extend(Ext.form.Action.Submit,Ext.form.Action,{type:"submit",run:function(){var B=this.options;var C=this.getMethod();var A=C=="POST";if(B.clientValidation===false||this.form.isValid()){Ext.Ajax.request(Ext.apply(this.createCallback(),{form:this.form.el.dom,url:this.getUrl(!A),method:C,params:A?this.getParams():null,isUpload:this.form.fileUpload}))}else{if(B.clientValidation!==false){this.failureType=Ext.form.Action.CLIENT_INVALID;this.form.afterAction(this,false)}}},success:function(B){var A=this.processResponse(B);if(A===true||A.success){this.form.afterAction(this,true);return }if(A.errors){this.form.markInvalid(A.errors);this.failureType=Ext.form.Action.SERVER_INVALID}this.form.afterAction(this,false)},handleResponse:function(C){if(this.form.errorReader){var B=this.form.errorReader.read(C);var F=[];if(B.records){for(var D=0,A=B.records.length;D<A;D++){var E=B.records[D];F[D]=E.data}}if(F.length<1){F=null}return{success:B.success,errors:F}}return Ext.decode(C.responseText)}});Ext.form.Action.Load=function(B,A){Ext.form.Action.Load.superclass.constructor.call(this,B,A);this.reader=this.form.reader};Ext.extend(Ext.form.Action.Load,Ext.form.Action,{type:"load",run:function(){Ext.Ajax.request(Ext.apply(this.createCallback(),{method:this.getMethod(),url:this.getUrl(false),params:this.getParams()}))},success:function(B){var A=this.processResponse(B);if(A===true||!A.success||!A.data){this.failureType=Ext.form.Action.LOAD_FAILURE;this.form.afterAction(this,false);return }this.form.clearInvalid();this.form.setValues(A.data);this.form.afterAction(this,true)},handleResponse:function(B){if(this.form.reader){var A=this.form.reader.read(B);var C=A.records&&A.records[0]?A.records[0].data:null;return{success:A.success,data:C}}return Ext.decode(B.responseText)}});Ext.form.Action.ACTION_TYPES={"load":Ext.form.Action.Load,"submit":Ext.form.Action.Submit};
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.form.BasicForm=function(B,A){Ext.apply(this,A);this.items=new Ext.util.MixedCollection(false,function(C){return C.id||(C.id=Ext.id())});this.addEvents({beforeaction:true,actionfailed:true,actioncomplete:true});if(B){this.initEl(B)}Ext.form.BasicForm.superclass.constructor.call(this)};Ext.extend(Ext.form.BasicForm,Ext.util.Observable,{timeout:30,activeAction:null,trackResetOnLoad:false,waitMsgTarget:undefined,initEl:function(A){this.el=Ext.get(A);this.id=this.el.id||Ext.id();this.el.on("submit",this.onSubmit,this);this.el.addClass("x-form")},onSubmit:function(A){A.stopEvent()},isValid:function(){var A=true;this.items.each(function(B){if(!B.validate()){A=false}});return A},isDirty:function(){var A=false;this.items.each(function(B){if(B.isDirty()){A=true;return false}});return A},doAction:function(B,A){if(typeof B=="string"){B=new Ext.form.Action.ACTION_TYPES[B](this,A)}if(this.fireEvent("beforeaction",this,B)!==false){this.beforeAction(B);B.run.defer(100,B)}return this},submit:function(A){this.doAction("submit",A);return this},load:function(A){this.doAction("load",A);return this},updateRecord:function(B){B.beginEdit();var A=B.fields;A.each(function(C){var D=this.findField(C.name);if(D){B.set(C.name,D.getValue())}},this);B.endEdit();return this},loadRecord:function(A){this.setValues(A.data);return this},beforeAction:function(A){var B=A.options;if(B.waitMsg){if(this.waitMsgTarget===true){this.el.mask(B.waitMsg,"x-mask-loading")}else{if(this.waitMsgTarget){this.waitMsgTarget=Ext.get(this.waitMsgTarget);this.waitMsgTarget.mask(B.waitMsg,"x-mask-loading")}else{Ext.MessageBox.wait(B.waitMsg,B.waitTitle||this.waitTitle||"Please Wait...")}}}},afterAction:function(A,C){this.activeAction=null;var B=A.options;if(B.waitMsg){if(this.waitMsgTarget===true){this.el.unmask()}else{if(this.waitMsgTarget){this.waitMsgTarget.unmask()}else{Ext.MessageBox.updateProgress(1);Ext.MessageBox.hide()}}}if(C){if(B.reset){this.reset()}Ext.callback(B.success,B.scope,[this,A]);this.fireEvent("actioncomplete",this,A)}else{Ext.callback(B.failure,B.scope,[this,A]);this.fireEvent("actionfailed",this,A)}},findField:function(B){var A=this.items.get(B);if(!A){this.items.each(function(C){if(C.isFormField&&(C.dataIndex==B||C.id==B||C.getName()==B)){A=C;return false}})}return A||null},markInvalid:function(G){if(G instanceof Array){for(var C=0,A=G.length;C<A;C++){var B=G[C];var D=this.findField(B.id);if(D){D.markInvalid(B.msg)}}}else{var E,F;for(F in G){if(typeof G[F]!="function"&&(E=this.findField(F))){E.markInvalid(G[F])}}}return this},setValues:function(C){if(C instanceof Array){for(var D=0,A=C.length;D<A;D++){var B=C[D];var E=this.findField(B.id);if(E){E.setValue(B.value);if(this.trackResetOnLoad){E.originalValue=E.getValue()}}}}else{var F,G;for(G in C){if(typeof C[G]!="function"&&(F=this.findField(G))){F.setValue(C[G]);if(this.trackResetOnLoad){F.originalValue=F.getValue()}}}}return this},getValues:function(B){var A=Ext.lib.Ajax.serializeForm(this.el.dom);if(B===true){return A}return Ext.urlDecode(A)},clearInvalid:function(){this.items.each(function(A){A.clearInvalid()});return this},reset:function(){this.items.each(function(A){A.reset()});return this},add:function(){this.items.addAll(Array.prototype.slice.call(arguments,0));return this},remove:function(A){this.items.remove(A);return this},render:function(){this.items.each(function(A){if(A.isFormField&&!A.rendered&&document.getElementById(A.id)){A.applyTo(A.id)}});return this},applyToFields:function(A){this.items.each(function(B){Ext.apply(B,A)});return this},applyIfToFields:function(A){this.items.each(function(B){Ext.applyIf(B,A)});return this}});Ext.BasicForm=Ext.form.BasicForm;
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.form.Checkbox=function(A){Ext.form.Checkbox.superclass.constructor.call(this,A);this.addEvents({check:true})};Ext.extend(Ext.form.Checkbox,Ext.form.Field,{focusClass:undefined,fieldClass:"x-form-field",checked:false,defaultAutoCreate:{tag:"input",type:"checkbox",autocomplete:"off"},boxLabel:undefined,onResize:function(){Ext.form.Checkbox.superclass.onResize.apply(this,arguments);if(!this.boxLabel){this.el.alignTo(this.wrap,"c-c")}},initEvents:function(){Ext.form.Checkbox.superclass.initEvents.call(this);this.el.on("click",this.onClick,this);this.el.on("change",this.onClick,this)},getResizeEl:function(){return this.wrap},getPositionEl:function(){return this.wrap},onRender:function(B,A){Ext.form.Checkbox.superclass.onRender.call(this,B,A);if(this.inputValue!==undefined){this.el.dom.value=this.inputValue}this.wrap=this.el.wrap({cls:"x-form-check-wrap"});if(this.boxLabel){this.wrap.createChild({tag:"label",htmlFor:this.el.id,cls:"x-form-cb-label",html:this.boxLabel})}if(this.checked){this.setValue(true)}else{this.checked=this.el.dom.checked}},initValue:Ext.emptyFn,getValue:function(){if(this.rendered){return this.el.dom.checked}return false},onClick:function(){if(this.el.dom.checked!=this.checked){this.setValue(this.el.dom.checked)}},setValue:function(A){this.checked=(A===true||A==="true"||A=="1"||String(A).toLowerCase()=="on");if(this.el&&this.el.dom){this.el.dom.checked=this.checked;this.el.dom.defaultChecked=this.checked}this.fireEvent("check",this,this.checked)}});
\ No newline at end of file
This diff is collapsed.
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.form.DateField=function(B){Ext.form.DateField.superclass.constructor.call(this,B);if(typeof this.minValue=="string"){this.minValue=this.parseDate(this.minValue)}if(typeof this.maxValue=="string"){this.maxValue=this.parseDate(this.maxValue)}this.ddMatch=null;if(this.disabledDates){var A=this.disabledDates;var D="(?:";for(var C=0;C<A.length;C++){D+=A[C];if(C!=A.length-1){D+="|"}}this.ddMatch=new RegExp(D+")")}};Ext.extend(Ext.form.DateField,Ext.form.TriggerField,{format:"m/d/y",altFormats:"m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d",disabledDays:null,disabledDaysText:"Disabled",disabledDates:null,disabledDatesText:"Disabled",minValue:null,maxValue:null,minText:"The date in this field must be equal to or after {0}",maxText:"The date in this field must be equal to or before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",triggerClass:"x-form-date-trigger",defaultAutoCreate:{tag:"input",type:"text",size:"10",autocomplete:"off"},validateValue:function(E){E=this.formatDate(E);if(!Ext.form.DateField.superclass.validateValue.call(this,E)){return false}if(E.length<1){return true}var C=E;E=this.parseDate(E);if(!E){this.markInvalid(String.format(this.invalidText,C,this.format));return false}var F=E.getTime();if(this.minValue&&F<this.minValue.getTime()){this.markInvalid(String.format(this.minText,this.formatDate(this.minValue)));return false}if(this.maxValue&&F>this.maxValue.getTime()){this.markInvalid(String.format(this.maxText,this.formatDate(this.maxValue)));return false}if(this.disabledDays){var A=E.getDay();for(var B=0;B<this.disabledDays.length;B++){if(A===this.disabledDays[B]){this.markInvalid(this.disabledDaysText);return false}}}var D=this.formatDate(E);if(this.ddMatch&&this.ddMatch.test(D)){this.markInvalid(String.format(this.disabledDatesText,D));return false}return true},validateBlur:function(){return !this.menu||!this.menu.isVisible()},getValue:function(){return this.parseDate(Ext.form.DateField.superclass.getValue.call(this))||""},setValue:function(A){Ext.form.DateField.superclass.setValue.call(this,this.formatDate(this.parseDate(A)))},parseDate:function(D){if(!D||D instanceof Date){return D}var B=Date.parseDate(D,this.format);if(!B&&this.altFormats){if(!this.altFormatsArray){this.altFormatsArray=this.altFormats.split("|")}for(var C=0,A=this.altFormatsArray.length;C<A&&!B;C++){B=Date.parseDate(D,this.altFormatsArray[C])}}return B},formatDate:function(A){return(!A||!(A instanceof Date))?A:A.dateFormat(this.format)},menuListeners:{select:function(A,B){this.setValue(B)},show:function(){this.onFocus()},hide:function(){this.focus.defer(10,this);var A=this.menuListeners;this.menu.un("select",A.select,this);this.menu.un("show",A.show,this);this.menu.un("hide",A.hide,this)}},onTriggerClick:function(){if(this.disabled){return }if(this.menu==null){this.menu=new Ext.menu.DateMenu()}Ext.apply(this.menu.picker,{minDate:this.minValue,maxDate:this.maxValue,disabledDatesRE:this.ddMatch,disabledDatesText:this.disabledDatesText,disabledDays:this.disabledDays,disabledDaysText:this.disabledDaysText,format:this.format,minText:String.format(this.minText,this.formatDate(this.minValue)),maxText:String.format(this.maxText,this.formatDate(this.maxValue))});this.menu.on(Ext.apply({},this.menuListeners,{scope:this}));this.menu.picker.setValue(this.getValue()||new Date());this.menu.show(this.el,"tl-bl?")},beforeBlur:function(){var A=this.parseDate(this.getRawValue());if(A){this.setValue(A)}}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.form.Field=function(A){Ext.form.Field.superclass.constructor.call(this,A)};Ext.extend(Ext.form.Field,Ext.BoxComponent,{invalidClass:"x-form-invalid",invalidText:"The value in this field is invalid",focusClass:"x-form-focus",validationEvent:"keyup",validateOnBlur:true,validationDelay:250,defaultAutoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off"},fieldClass:"x-form-field",msgTarget:"qtip",msgFx:"normal",readOnly:false,disabled:false,inputType:undefined,tabIndex:undefined,isFormField:true,hasFocus:false,value:undefined,initComponent:function(){Ext.form.Field.superclass.initComponent.call(this);this.addEvents({focus:true,blur:true,specialkey:true,change:true,invalid:true,valid:true})},getName:function(){return this.rendered&&this.el.dom.name?this.el.dom.name:(this.hiddenName||"")},onRender:function(C,A){Ext.form.Field.superclass.onRender.call(this,C,A);if(!this.el){var B=this.getAutoCreate();if(!B.name){B.name=this.name||this.id}if(this.inputType){B.type=this.inputType}this.el=C.createChild(B,A)}var D=this.el.dom.type;if(D){if(D=="password"){D="text"}this.el.addClass("x-form-"+D)}if(this.readOnly){this.el.dom.readOnly=true}if(this.tabIndex!==undefined){this.el.dom.setAttribute("tabIndex",this.tabIndex)}this.el.addClass([this.fieldClass,this.cls]);this.initValue()},applyTo:function(A){this.allowDomMove=false;this.el=Ext.get(A);this.render(this.el.dom.parentNode);return this},initValue:function(){if(this.value!==undefined){this.setValue(this.value)}else{if(this.el.dom.value.length>0){this.setValue(this.el.dom.value)}}},isDirty:function(){if(this.disabled){return false}return String(this.getValue())!==String(this.originalValue)},afterRender:function(){Ext.form.Field.superclass.afterRender.call(this);this.initEvents()},fireKey:function(A){if(A.isNavKeyPress()){this.fireEvent("specialkey",this,A)}},reset:function(){this.setValue(this.originalValue);this.clearInvalid()},initEvents:function(){this.el.on(Ext.isIE?"keydown":"keypress",this.fireKey,this);this.el.on("focus",this.onFocus,this);this.el.on("blur",this.onBlur,this);this.originalValue=this.getValue()},onFocus:function(){if(!Ext.isOpera&&this.focusClass){this.el.addClass(this.focusClass)}if(!this.hasFocus){this.hasFocus=true;this.startValue=this.getValue();this.fireEvent("focus",this)}},beforeBlur:Ext.emptyFn,onBlur:function(){this.beforeBlur();if(!Ext.isOpera&&this.focusClass){this.el.removeClass(this.focusClass)}this.hasFocus=false;if(this.validationEvent!==false&&this.validateOnBlur&&this.validationEvent!="blur"){this.validate()}var A=this.getValue();if(String(A)!==String(this.startValue)){this.fireEvent("change",this,A,this.startValue)}this.fireEvent("blur",this)},isValid:function(A){if(this.disabled){return true}var C=this.preventMark;this.preventMark=A===true;var B=this.validateValue(this.processValue(this.getRawValue()));this.preventMark=C;return B},validate:function(){if(this.disabled||this.validateValue(this.processValue(this.getRawValue()))){this.clearInvalid();return true}return false},processValue:function(A){return A},validateValue:function(A){return true},markInvalid:function(C){if(!this.rendered||this.preventMark){return }this.el.addClass(this.invalidClass);C=C||this.invalidText;switch(this.msgTarget){case"qtip":this.el.dom.qtip=C;this.el.dom.qclass="x-form-invalid-tip";if(Ext.QuickTips){Ext.QuickTips.enable()}break;case"title":this.el.dom.title=C;break;case"under":if(!this.errorEl){var B=this.el.findParent(".x-form-element",5,true);this.errorEl=B.createChild({cls:"x-form-invalid-msg"});this.errorEl.setWidth(B.getWidth(true)-20)}this.errorEl.update(C);Ext.form.Field.msgFx[this.msgFx].show(this.errorEl,this);break;case"side":if(!this.errorIcon){var B=this.el.findParent(".x-form-element",5,true);this.errorIcon=B.createChild({cls:"x-form-invalid-icon"})}this.alignErrorIcon();this.errorIcon.dom.qtip=C;this.errorIcon.dom.qclass="x-form-invalid-tip";this.errorIcon.show();this.on("resize",this.alignErrorIcon,this);break;default:var A=Ext.getDom(this.msgTarget);A.innerHTML=C;A.style.display=this.msgDisplay;break}this.fireEvent("invalid",this,C)},alignErrorIcon:function(){this.errorIcon.alignTo(this.el,"tl-tr",[2,0])},clearInvalid:function(){if(!this.rendered||this.preventMark){return }this.el.removeClass(this.invalidClass);switch(this.msgTarget){case"qtip":this.el.dom.qtip="";break;case"title":this.el.dom.title="";break;case"under":if(this.errorEl){Ext.form.Field.msgFx[this.msgFx].hide(this.errorEl,this)}break;case"side":if(this.errorIcon){this.errorIcon.dom.qtip="";this.errorIcon.hide();this.un("resize",this.alignErrorIcon,this)}break;default:var A=Ext.getDom(this.msgTarget);A.innerHTML="";A.style.display="none";break}this.fireEvent("valid",this)},getRawValue:function(){var A=this.el.getValue();if(A===this.emptyText){A=""}return A},getValue:function(){var A=this.el.getValue();if(A===this.emptyText||A===undefined){A=""}return A},setRawValue:function(A){return this.el.dom.value=(A===null||A===undefined?"":A)},setValue:function(A){this.value=A;if(this.rendered){this.el.dom.value=(A===null||A===undefined?"":A);this.validate()}},adjustSize:function(A,C){var B=Ext.form.Field.superclass.adjustSize.call(this,A,C);B.width=this.adjustWidth(this.el.dom.tagName,B.width);return B},adjustWidth:function(A,B){A=A.toLowerCase();if(typeof B=="number"&&Ext.isStrict&&!Ext.isSafari){if(Ext.isIE&&(A=="input"||A=="textarea")){if(A=="input"){return B+2}if(A="textarea"){return B-2}}else{if(Ext.isOpera){if(A=="input"){return B+2}if(A="textarea"){return B-2}}}}return B}});Ext.form.Field.msgFx={normal:{show:function(A,B){A.setDisplayed("block")},hide:function(A,B){A.setDisplayed(false).update("")}},slide:{show:function(A,B){A.slideIn("t",{stopFx:true})},hide:function(A,B){A.slideOut("t",{stopFx:true,useDisplay:true})}},slideRight:{show:function(A,B){A.fixDisplay();A.alignTo(B.el,"tl-tr");A.slideIn("l",{stopFx:true})},hide:function(A,B){A.slideOut("l",{stopFx:true,useDisplay:true})}}};
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.form.Form=function(A){Ext.form.Form.superclass.constructor.call(this,null,A);this.url=this.url||this.action;if(!this.root){this.root=new Ext.form.Layout(Ext.applyIf({id:Ext.id()},A))}this.active=this.root;this.buttons=[];this.addEvents({clientvalidation:true})};Ext.extend(Ext.form.Form,Ext.form.BasicForm,{buttonAlign:"center",minButtonWidth:75,labelAlign:"left",monitorValid:false,monitorPoll:200,column:function(B){var A=new Ext.form.Column(B);this.start(A);if(arguments.length>1){this.add.apply(this,Array.prototype.slice.call(arguments,1));this.end()}return A},fieldset:function(B){var A=new Ext.form.FieldSet(B);this.start(A);if(arguments.length>1){this.add.apply(this,Array.prototype.slice.call(arguments,1));this.end()}return A},container:function(B){var A=new Ext.form.Layout(B);this.start(A);if(arguments.length>1){this.add.apply(this,Array.prototype.slice.call(arguments,1));this.end()}return A},start:function(A){Ext.applyIf(A,{"labelAlign":this.active.labelAlign,"labelWidth":this.active.labelWidth,"itemCls":this.active.itemCls});this.active.stack.push(A);A.ownerCt=this.active;this.active=A;return this},end:function(){if(this.active==this.root){return this}this.active=this.active.ownerCt;return this},add:function(){this.active.stack.push.apply(this.active.stack,arguments);var D=[];for(var C=0,B=arguments,A=B.length;C<A;C++){if(B[C].isFormField){D.push(B[C])}}if(D.length>0){Ext.form.Form.superclass.add.apply(this,D)}return this},render:function(E){E=Ext.get(E);var G=this.autoCreate||{tag:"form",method:this.method||"POST",id:this.id||Ext.id()};this.initEl(E.createChild(G));this.root.render(this.el);this.items.each(function(I){I.render("x-form-el-"+I.id)});if(this.buttons.length>0){var C=this.el.createChild({cls:"x-form-btns-ct",cn:{cls:"x-form-btns x-form-btns-"+this.buttonAlign,html:"<table cellspacing=\"0\"><tbody><tr></tr></tbody></table><div class=\"x-clear\"></div>"}},null,true);var F=C.getElementsByTagName("tr")[0];for(var D=0,B=this.buttons.length;D<B;D++){var A=this.buttons[D];var H=document.createElement("td");H.className="x-form-btn-td";A.render(F.appendChild(H))}}if(this.monitorValid){this.startMonitoring()}return this},addButton:function(A,D,C){var E={handler:D,scope:C,minWidth:this.minButtonWidth,hideParent:true};if(typeof A=="string"){E.text=A}else{Ext.apply(E,A)}var B=new Ext.Button(null,E);this.buttons.push(B);return B},startMonitoring:function(){if(!this.bound){this.bound=true;Ext.TaskMgr.start({run:this.bindHandler,interval:this.monitorPoll||200,scope:this})}},stopMonitoring:function(){this.bound=false},bindHandler:function(){if(!this.bound){return false}var D=true;this.items.each(function(E){if(!E.isValid(true)){D=false;return false}});for(var C=0,A=this.buttons.length;C<A;C++){var B=this.buttons[C];if(B.formBind===true&&B.disabled===D){B.setDisabled(!D)}}this.fireEvent("clientvalidation",this,D)}});Ext.Form=Ext.form.Form;
\ No newline at end of file
This diff is collapsed.
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.form.Layout=function(A){Ext.form.Layout.superclass.constructor.call(this,A);this.stack=[]};Ext.extend(Ext.form.Layout,Ext.Component,{clear:true,labelSeparator:":",hideLabels:false,defaultAutoCreate:{tag:"div",cls:"x-form-ct"},onRender:function(F,B){if(this.el){this.el=Ext.get(this.el)}else{var C=this.getAutoCreate();this.el=F.createChild(C,B)}if(this.style){this.el.applyStyles(this.style)}if(this.labelAlign){this.el.addClass("x-form-label-"+this.labelAlign)}if(this.hideLabels){this.labelStyle="display:none";this.elementStyle="padding-left:0;"}else{if(typeof this.labelWidth=="number"){this.labelStyle="width:"+this.labelWidth+"px;";this.elementStyle="padding-left:"+((this.labelWidth+(typeof this.labelPad=="number"?this.labelPad:5))+"px")+";"}if(this.labelAlign=="top"){this.labelStyle="width:auto;";this.elementStyle="padding-left:0;"}}var A=this.stack;var G=A.length;if(G>0){if(!this.fieldTpl){var E=new Ext.Template("<div class=\"x-form-item {5}\">","<label for=\"{0}\" style=\"{2}\">{1}{4}</label>","<div class=\"x-form-element\" id=\"x-form-el-{0}\" style=\"{3}\">","</div>","</div><div class=\"x-form-clear-left\"></div>");E.disableFormats=true;E.compile();Ext.form.Layout.prototype.fieldTpl=E}for(var D=0;D<G;D++){if(A[D].isFormField){this.renderField(A[D])}else{this.renderComponent(A[D])}}}if(this.clear){this.el.createChild({cls:"x-form-clear"})}},renderField:function(A){this.fieldTpl.append(this.el,[A.id,A.fieldLabel,A.labelStyle||this.labelStyle||"",this.elementStyle||"",typeof A.labelSeparator=="undefined"?this.labelSeparator:A.labelSeparator,A.itemCls||this.itemCls||""])},renderComponent:function(A){A.render(this.el)}});Ext.form.Column=function(A){Ext.form.Column.superclass.constructor.call(this,A)};Ext.extend(Ext.form.Column,Ext.form.Layout,{defaultAutoCreate:{tag:"div",cls:"x-form-ct x-form-column"},onRender:function(B,A){Ext.form.Column.superclass.onRender.call(this,B,A);if(this.width){this.el.setWidth(this.width)}}});Ext.form.FieldSet=function(A){Ext.form.FieldSet.superclass.constructor.call(this,A)};Ext.extend(Ext.form.FieldSet,Ext.form.Layout,{defaultAutoCreate:{tag:"fieldset",cn:{tag:"legend"}},onRender:function(B,A){Ext.form.FieldSet.superclass.onRender.call(this,B,A);if(this.legend){this.setLegend(this.legend)}},setLegend:function(A){if(this.rendered){this.el.child("legend").update(A)}}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.form.NumberField=function(A){Ext.form.NumberField.superclass.constructor.call(this,A)};Ext.extend(Ext.form.NumberField,Ext.form.TextField,{fieldClass:"x-form-field x-form-num-field",allowDecimals:true,decimalSeparator:".",decimalPrecision:2,allowNegative:true,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,minText:"The minimum value for this field is {0}",maxText:"The maximum value for this field is {0}",nanText:"{0} is not a valid number",initEvents:function(){Ext.form.NumberField.superclass.initEvents.call(this);var B="0123456789";if(this.allowDecimals){B+=this.decimalSeparator}if(this.allowNegative){B+="-"}this.stripCharsRe=new RegExp("[^"+B+"]","gi");var A=function(D){var C=D.getKey();if(!Ext.isIE&&(D.isSpecialKey()||C==D.BACKSPACE||C==D.DELETE)){return }var E=D.getCharCode();if(B.indexOf(String.fromCharCode(E))===-1){D.stopEvent()}};this.el.on("keypress",A,this)},validateValue:function(B){if(!Ext.form.NumberField.superclass.validateValue.call(this,B)){return false}if(B.length<1){return true}var A=this.parseValue(B);if(isNaN(A)){this.markInvalid(String.format(this.nanText,B));return false}if(A<this.minValue){this.markInvalid(String.format(this.minText,this.minValue));return false}if(A>this.maxValue){this.markInvalid(String.format(this.maxText,this.maxValue));return false}return true},getValue:function(){return this.fixPrecision(this.parseValue(Ext.form.NumberField.superclass.getValue.call(this)))},parseValue:function(A){A=parseFloat(String(A).replace(this.decimalSeparator,"."));return isNaN(A)?"":A},fixPrecision:function(B){var A=isNaN(B);if(!this.allowDecimals||this.decimalPrecision==-1||A||!B){return A?"":B}return parseFloat(B).toFixed(this.decimalPrecision)},setValue:function(A){Ext.form.NumberField.superclass.setValue.call(this,String(A).replace(".",this.decimalSeparator))},decimalPrecisionFcn:function(A){return Math.floor(A)},beforeBlur:function(){var A=this.parseValue(this.getRawValue());if(A){this.setValue(this.fixPrecision(A))}}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.form.Radio=function(){Ext.form.Radio.superclass.constructor.apply(this,arguments)};Ext.extend(Ext.form.Radio,Ext.form.Checkbox,{inputType:"radio",getGroupValue:function(){return this.el.up("form").child("input[name="+this.el.dom.name+"]:checked",true).value}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.form.TextArea=function(A){Ext.form.TextArea.superclass.constructor.call(this,A);if(this.minHeight!==undefined){this.growMin=this.minHeight}if(this.maxHeight!==undefined){this.growMax=this.maxHeight}};Ext.extend(Ext.form.TextArea,Ext.form.TextField,{growMin:60,growMax:1000,preventScrollbars:false,onRender:function(B,A){if(!this.el){this.defaultAutoCreate={tag:"textarea",style:"width:300px;height:60px;",autocomplete:"off"}}Ext.form.TextArea.superclass.onRender.call(this,B,A);if(this.grow){this.textSizeEl=Ext.DomHelper.append(document.body,{tag:"pre",cls:"x-form-grow-sizer"});if(this.preventScrollbars){this.el.setStyle("overflow","hidden")}this.el.setHeight(this.growMin)}},onDestroy:function(){if(this.textSizeEl){this.textSizeEl.parentNode.removeChild(this.textSizeEl)}Ext.form.TextArea.superclass.onDestroy.call(this)},onKeyUp:function(A){if(!A.isNavKeyPress()||A.getKey()==A.ENTER){this.autoSize()}},autoSize:function(){if(!this.grow||!this.textSizeEl){return }var C=this.el;var A=C.dom.value;var D=this.textSizeEl;D.innerHTML="";D.appendChild(document.createTextNode(A));A=D.innerHTML;Ext.fly(D).setWidth(this.el.getWidth());if(A.length<1){A="&#160;&#160;"}else{if(Ext.isIE){A=A.replace(/\n/g,"<p>&#160;</p>")}A+="&#160;\n&#160;"}D.innerHTML=A;var B=Math.min(this.growMax,Math.max(D.offsetHeight,this.growMin));if(B!=this.lastHeight){this.lastHeight=B;this.el.setHeight(B);this.fireEvent("autosize",this,B)}}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.form.TextField=function(A){Ext.form.TextField.superclass.constructor.call(this,A);this.addEvents({autosize:true})};Ext.extend(Ext.form.TextField,Ext.form.Field,{grow:false,growMin:30,growMax:800,vtype:null,maskRe:null,disableKeyFilter:false,allowBlank:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",selectOnFocus:false,blankText:"This field is required",validator:null,regex:null,regexText:"",emptyText:null,emptyClass:"x-form-empty-field",initEvents:function(){Ext.form.TextField.superclass.initEvents.call(this);if(this.validationEvent=="keyup"){this.validationTask=new Ext.util.DelayedTask(this.validate,this);this.el.on("keyup",this.filterValidation,this)}else{if(this.validationEvent!==false){this.el.on(this.validationEvent,this.validate,this,{buffer:this.validationDelay})}}if(this.selectOnFocus||this.emptyText){this.on("focus",this.preFocus,this);if(this.emptyText){this.on("blur",this.postBlur,this);this.applyEmptyText()}}if(this.maskRe||(this.vtype&&this.disableKeyFilter!==true&&(this.maskRe=Ext.form.VTypes[this.vtype+"Mask"]))){this.el.on("keypress",this.filterKeys,this)}if(this.grow){this.el.on("keyup",this.onKeyUp,this,{buffer:50});this.el.on("click",this.autoSize,this)}},processValue:function(A){if(this.stripCharsRe){var B=A.replace(this.stripCharsRe,"");if(B!==A){this.setRawValue(B);return B}}return A},filterValidation:function(A){if(!A.isNavKeyPress()){this.validationTask.delay(this.validationDelay)}},onKeyUp:function(A){if(!A.isNavKeyPress()){this.autoSize()}},reset:function(){Ext.form.TextField.superclass.reset.call(this);this.applyEmptyText()},applyEmptyText:function(){if(this.rendered&&this.emptyText&&this.getRawValue().length<1){this.setRawValue(this.emptyText);this.el.addClass(this.emptyClass)}},preFocus:function(){if(this.emptyText){if(this.el.dom.value==this.emptyText){this.setRawValue("")}this.el.removeClass(this.emptyClass)}if(this.selectOnFocus){this.el.dom.select()}},postBlur:function(){this.applyEmptyText()},filterKeys:function(B){var A=B.getKey();if(!Ext.isIE&&(B.isNavKeyPress()||A==B.BACKSPACE||(A==B.DELETE&&B.button==-1))){return }var D=B.getCharCode(),C=String.fromCharCode(D);if(Ext.isIE&&(B.isSpecialKey()||!C)){return }if(!this.maskRe.test(C)){B.stopEvent()}},setValue:function(A){if(this.emptyText&&this.el&&A!==undefined&&A!==null&&A!==""){this.el.removeClass(this.emptyClass)}Ext.form.TextField.superclass.setValue.apply(this,arguments);this.applyEmptyText();this.autoSize()},validateValue:function(A){if(A.length<1||A===this.emptyText){if(this.allowBlank){this.clearInvalid();return true}else{this.markInvalid(this.blankText);return false}}if(A.length<this.minLength){this.markInvalid(String.format(this.minLengthText,this.minLength));return false}if(A.length>this.maxLength){this.markInvalid(String.format(this.maxLengthText,this.maxLength));return false}if(this.vtype){var C=Ext.form.VTypes;if(!C[this.vtype](A,this)){this.markInvalid(this.vtypeText||C[this.vtype+"Text"]);return false}}if(typeof this.validator=="function"){var B=this.validator(A);if(B!==true){this.markInvalid(B);return false}}if(this.regex&&!this.regex.test(A)){this.markInvalid(this.regexText);return false}return true},selectText:function(E,A){var C=this.getRawValue();if(C.length>0){E=E===undefined?0:E;A=A===undefined?C.length:A;var D=this.el.dom;if(D.setSelectionRange){D.setSelectionRange(E,A)}else{if(D.createTextRange){var B=D.createTextRange();B.moveStart("character",E);B.moveEnd("character",C.length-A);B.select()}}}},autoSize:function(){if(!this.grow||!this.rendered){return }if(!this.metrics){this.metrics=Ext.util.TextMetrics.createInstance(this.el)}var C=this.el;var B=C.dom.value;var D=document.createElement("div");D.appendChild(document.createTextNode(B));B=D.innerHTML;D=null;B+="&#160;";var A=Math.min(this.growMax,Math.max(this.metrics.getWidth(B)+10,this.growMin));this.el.setWidth(A);this.fireEvent("autosize",this,A)}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.form.TriggerField=function(A){this.mimicing=false;Ext.form.TriggerField.superclass.constructor.call(this,A)};Ext.extend(Ext.form.TriggerField,Ext.form.TextField,{defaultAutoCreate:{tag:"input",type:"text",size:"16",autocomplete:"off"},hideTrigger:false,autoSize:Ext.emptyFn,monitorTab:true,deferHeight:true,onResize:function(A,B){Ext.form.TriggerField.superclass.onResize.apply(this,arguments);if(typeof A=="number"){this.el.setWidth(this.adjustWidth("input",A-this.trigger.getWidth()))}},adjustSize:Ext.BoxComponent.prototype.adjustSize,getResizeEl:function(){return this.wrap},getPositionEl:function(){return this.wrap},alignErrorIcon:function(){this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0])},onRender:function(B,A){Ext.form.TriggerField.superclass.onRender.call(this,B,A);this.wrap=this.el.wrap({cls:"x-form-field-wrap"});this.trigger=this.wrap.createChild(this.triggerConfig||{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.triggerClass});if(this.hideTrigger){this.trigger.setDisplayed(false)}this.initTrigger();if(!this.width){this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth())}},initTrigger:function(){this.trigger.on("click",this.onTriggerClick,this,{preventDefault:true});this.trigger.addClassOnOver("x-form-trigger-over");this.trigger.addClassOnClick("x-form-trigger-click")},onDestroy:function(){if(this.trigger){this.trigger.removeAllListeners();this.trigger.remove()}if(this.wrap){this.wrap.remove()}Ext.form.TriggerField.superclass.onDestroy.call(this)},onFocus:function(){Ext.form.TriggerField.superclass.onFocus.call(this);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);if(this.monitorTab){this.el.on("keydown",this.checkTab,this)}}},checkTab:function(A){if(A.getKey()==A.TAB){this.triggerBlur()}},onBlur:function(){},mimicBlur:function(B,A){if(!this.wrap.contains(A)&&this.validateBlur()){this.triggerBlur()}},triggerBlur:function(){this.mimicing=false;Ext.get(Ext.isIE?document.body:document).un("mousedown",this.mimicBlur);if(this.monitorTab){this.el.un("keydown",this.checkTab,this)}this.wrap.removeClass("x-trigger-wrap-focus");Ext.form.TriggerField.superclass.onBlur.call(this)},validateBlur:function(B,A){return true},onDisable:function(){Ext.form.TriggerField.superclass.onDisable.call(this);if(this.wrap){this.wrap.addClass("x-item-disabled")}},onEnable:function(){Ext.form.TriggerField.superclass.onEnable.call(this);if(this.wrap){this.wrap.removeClass("x-item-disabled")}},onShow:function(){if(this.wrap){this.wrap.dom.style.display="";this.wrap.dom.style.visibility="visible"}},onHide:function(){this.wrap.dom.style.display="none"},onTriggerClick:Ext.emptyFn});Ext.form.TwinTriggerField=Ext.extend(Ext.form.TriggerField,{initComponent:function(){Ext.form.TwinTriggerField.superclass.initComponent.call(this);this.triggerConfig={tag:"span",cls:"x-form-twin-triggers",cn:[{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.trigger1Class},{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-form-trigger "+this.trigger2Class}]}},getTrigger:function(A){return this.triggers[A]},initTrigger:function(){var A=this.trigger.select(".x-form-trigger",true);this.wrap.setStyle("overflow","hidden");var B=this;A.each(function(D,F,C){D.hide=function(){var G=B.wrap.getWidth();this.dom.style.display="none";B.el.setWidth(G-B.trigger.getWidth())};D.show=function(){var G=B.wrap.getWidth();this.dom.style.display="";B.el.setWidth(G-B.trigger.getWidth())};var E="Trigger"+(C+1);if(this["hide"+E]){D.dom.style.display="none"}D.on("click",this["on"+E+"Click"],this,{preventDefault:true});D.addClassOnOver("x-form-trigger-over");D.addClassOnClick("x-form-trigger-click")},this);this.triggers=A.elements},onTrigger1Click:Ext.emptyFn,onTrigger2Click:Ext.emptyFn});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.form.VTypes=function(){var C=/^[a-zA-Z_]+$/;var D=/^[a-zA-Z0-9_]+$/;var B=/^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/;var A=/(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return{"email":function(E){return B.test(E)},"emailText":"This field should be an e-mail address in the format \"user@domain.com\"","emailMask":/[a-z0-9_\.\-@]/i,"url":function(E){return A.test(E)},"urlText":"This field should be a URL in the format \"http:/"+"/www.domain.com\"","alpha":function(E){return C.test(E)},"alphaText":"This field should only contain letters and _","alphaMask":/[a-z_]/i,"alphanum":function(E){return D.test(E)},"alphanumText":"This field should only contain letters, numbers and _","alphanumMask":/[a-z0-9_]/i}}();
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.grid.AbstractGridView=function(){this.grid=null;this.events={"beforerowremoved":true,"beforerowsinserted":true,"beforerefresh":true,"rowremoved":true,"rowsinserted":true,"rowupdated":true,"refresh":true};Ext.grid.AbstractGridView.superclass.constructor.call(this)};Ext.extend(Ext.grid.AbstractGridView,Ext.util.Observable,{rowClass:"x-grid-row",cellClass:"x-grid-cell",tdClass:"x-grid-td",hdClass:"x-grid-hd",splitClass:"x-grid-hd-split",init:function(A){this.grid=A;var B=this.grid.getGridEl().id;this.colSelector="#"+B+" ."+this.cellClass+"-";this.tdSelector="#"+B+" ."+this.tdClass+"-";this.hdSelector="#"+B+" ."+this.hdClass+"-";this.splitSelector="#"+B+" ."+this.splitClass+"-"},getColumnRenderers:function(){var B=[];var A=this.grid.colModel;var D=A.getColumnCount();for(var C=0;C<D;C++){B[C]=A.getRenderer(C)}return B},getColumnIds:function(){var C=[];var A=this.grid.colModel;var D=A.getColumnCount();for(var B=0;B<D;B++){C[B]=A.getColumnId(B)}return C},getDataIndexes:function(){if(!this.indexMap){this.indexMap=this.buildIndexMap()}return this.indexMap.colToData},getColumnIndexByDataIndex:function(A){if(!this.indexMap){this.indexMap=this.buildIndexMap()}return this.indexMap.dataToCol[A]},setCSSStyle:function(C,B,D){var A="#"+this.grid.id+" .x-grid-col-"+C;Ext.util.CSS.updateRule(A,B,D)},generateRules:function(B){var C=[],E=this.grid.id+"-cssrules";Ext.util.CSS.removeStyleSheet(E);for(var D=0,A=B.getColumnCount();D<A;D++){var F=B.getColumnId(D);C.push(this.colSelector,F," {\n",B.config[D].css,"}\n",this.tdSelector,F," {\n}\n",this.hdSelector,F," {\n}\n",this.splitSelector,F," {\n}\n")}return Ext.util.CSS.createStyleSheet(C.join(""),E)}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.grid.AbstractSelectionModel=function(){this.locked=false;Ext.grid.AbstractSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.grid.AbstractSelectionModel,Ext.util.Observable,{init:function(A){this.grid=A;this.initEvents()},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.grid.CellSelectionModel=function(A){Ext.apply(this,A);this.selection=null;this.addEvents({"beforecellselect":true,"cellselect":true,"selectionchange":true})};Ext.extend(Ext.grid.CellSelectionModel,Ext.grid.AbstractSelectionModel,{initEvents:function(){this.grid.on("mousedown",this.handleMouseDown,this);this.grid.getGridEl().on(Ext.isIE?"keydown":"keypress",this.handleKeyDown,this);var A=this.grid.view;A.on("refresh",this.onViewChange,this);A.on("rowupdated",this.onRowUpdated,this);A.on("beforerowremoved",this.clearSelections,this);A.on("beforerowsinserted",this.clearSelections,this);if(this.grid.isEditor){this.grid.on("beforeedit",this.beforeEdit,this)}},beforeEdit:function(A){this.select(A.row,A.column,false,true,A.record)},onRowUpdated:function(A,B,C){if(this.selection&&this.selection.record==C){A.onCellSelect(B,this.selection.cell[1])}},onViewChange:function(){this.clearSelections(true)},getSelectedCell:function(){return this.selection?this.selection.cell:null},clearSelections:function(B){var A=this.selection;if(A){if(B!==true){this.grid.view.onCellDeselect(A.cell[0],A.cell[1])}this.selection=null;this.fireEvent("selectionchange",this,null)}},hasSelection:function(){return this.selection?true:false},handleMouseDown:function(D,C){var B=this.grid.getView();if(this.isLocked()){return }var E=B.findRowIndex(C);var A=B.findCellIndex(C);if(E!==false&&A!==false){this.select(E,A)}},select:function(F,C,B,E,D){if(this.fireEvent("beforecellselect",this,F,C)!==false){this.clearSelections();D=D||this.grid.dataSource.getAt(F);this.selection={record:D,cell:[F,C]};if(!B){var A=this.grid.getView();A.onCellSelect(F,C);if(E!==true){A.focusCell(F,C)}}this.fireEvent("cellselect",this,F,C);this.fireEvent("selectionchange",this,this.selection)}},isSelectable:function(C,B,A){return !A.isHidden(B)},handleKeyDown:function(F){if(!F.isNavKeyPress()){return }var E=this.grid,J=this.selection;if(!J){F.stopEvent();var I=E.walkCells(0,0,1,this.isSelectable,this);if(I){this.select(I[0],I[1])}return }var B=this;var H=function(M,K,L){return E.walkCells(M,K,L,B.isSelectable,B)};var C=F.getKey(),A=J.cell[0],G=J.cell[1];var D;switch(C){case F.TAB:if(F.shiftKey){D=H(A,G-1,-1)}else{D=H(A,G+1,1)}break;case F.DOWN:D=H(A+1,G,1);break;case F.UP:D=H(A-1,G,-1);break;case F.RIGHT:D=H(A,G+1,1);break;case F.LEFT:D=H(A,G-1,-1);break;case F.ENTER:if(E.isEditor&&!E.editing){E.startEditing(A,G);F.stopEvent();return }break}if(D){this.select(D[0],D[1]);F.stopEvent()}},acceptsNav:function(C,B,A){return !A.isHidden(B)&&A.isCellEditable(B,C)},onEditorKey:function(E,D){var B=D.getKey(),F,C=this.grid,A=C.activeEditor;if(B==D.TAB){if(D.shiftKey){F=C.walkCells(A.row,A.col-1,-1,this.acceptsNav,this)}else{F=C.walkCells(A.row,A.col+1,1,this.acceptsNav,this)}D.stopEvent()}else{if(B==D.ENTER&&!D.ctrlKey){A.completeEdit();D.stopEvent()}else{if(B==D.ESC){A.cancelEdit()}}}if(F){C.startEditing(F[0],F[1])}}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.grid.HeaderDragZone=function(A,C,B){this.grid=A;this.view=A.getView();this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDragZone.superclass.constructor.call(this,C);if(B){this.setHandleElId(Ext.id(C));this.setOuterHandleElId(Ext.id(B))}this.scroll=false};Ext.extend(Ext.grid.HeaderDragZone,Ext.dd.DragZone,{maxDragWidth:120,getDragData:function(C){var A=Ext.lib.Event.getTarget(C);var B=this.view.findHeaderCell(A);if(B){return{ddel:B.firstChild,header:B}}return false},onInitDrag:function(A){this.view.headersDisabled=true;var B=this.dragData.ddel.cloneNode(true);B.id=Ext.id();B.style.width=Math.min(this.dragData.header.offsetWidth,this.maxDragWidth)+"px";this.proxy.update(B);return true},afterValidDrop:function(){var A=this.view;setTimeout(function(){A.headersDisabled=false},50)},afterInvalidDrop:function(){var A=this.view;setTimeout(function(){A.headersDisabled=false},50)}});Ext.grid.HeaderDropZone=function(A,C,B){this.grid=A;this.view=A.getView();this.proxyTop=Ext.DomHelper.append(document.body,{cls:"col-move-top",html:"&#160;"},true);this.proxyBottom=Ext.DomHelper.append(document.body,{cls:"col-move-bottom",html:"&#160;"},true);this.proxyTop.hide=this.proxyBottom.hide=function(){this.setLeftTop(-100,-100);this.setStyle("visibility","hidden")};this.ddGroup="gridHeader"+this.grid.getGridEl().id;Ext.grid.HeaderDropZone.superclass.constructor.call(this,A.getGridEl().dom)};Ext.extend(Ext.grid.HeaderDropZone,Ext.dd.DropZone,{proxyOffsets:[-4,-9],fly:Ext.Element.fly,getTargetFromEvent:function(C){var A=Ext.lib.Event.getTarget(C);var B=this.view.findCellIndex(A);if(B!==false){return this.view.getHeaderCell(B)}},nextVisible:function(C){var B=this.view,A=this.grid.colModel;C=C.nextSibling;while(C){if(!A.isHidden(B.getCellIndex(C))){return C}C=C.nextSibling}return null},prevVisible:function(C){var B=this.view,A=this.grid.colModel;C=C.prevSibling;while(C){if(!A.isHidden(B.getCellIndex(C))){return C}C=C.prevSibling}return null},positionIndicator:function(D,B,E){var H=Ext.lib.Event.getPageX(E);var A=Ext.lib.Dom.getRegion(B.firstChild);var I,K,G=A.top+this.proxyOffsets[1];if((A.right-H)<=(A.right-A.left)/2){I=A.right+this.view.borderWidth;K="after"}else{I=A.left;K="before"}var F=this.view.getCellIndex(D);var J=this.view.getCellIndex(B);if(this.grid.colModel.isFixed(J)){return false}var C=this.grid.colModel.isLocked(J);if(K=="after"){J++}if(F<J){J--}if(F==J&&(C==this.grid.colModel.isLocked(F))){return false}I+=this.proxyOffsets[0];this.proxyTop.setLeftTop(I,G);this.proxyTop.show();if(!this.bottomOffset){this.bottomOffset=this.view.mainHd.getHeight()}this.proxyBottom.setLeftTop(I,G+this.proxyTop.dom.offsetHeight+this.bottomOffset);this.proxyBottom.show();return K},onNodeEnter:function(D,A,C,B){if(B.header!=D){this.positionIndicator(B.header,D,C)}},onNodeOver:function(E,B,D,C){var A=false;if(C.header!=E){A=this.positionIndicator(C.header,E,D)}if(!A){this.proxyTop.hide();this.proxyBottom.hide()}return A?this.dropAllowed:this.dropNotAllowed},onNodeOut:function(D,A,C,B){this.proxyTop.hide();this.proxyBottom.hide()},onNodeDrop:function(B,K,F,D){var E=D.header;if(E!=B){var I=this.grid.colModel;var H=Ext.lib.Event.getPageX(F);var A=Ext.lib.Dom.getRegion(B.firstChild);var L=(A.right-H)<=((A.right-A.left)/2)?"after":"before";var G=this.view.getCellIndex(E);var J=this.view.getCellIndex(B);var C=I.isLocked(J);if(L=="after"){J++}if(G<J){J--}if(G==J&&(C==I.isLocked(G))){return false}I.setLocked(G,C,true);I.moveColumn(G,J);this.grid.fireEvent("columnmove",G,J);return true}return false}});Ext.grid.GridView.ColumnDragZone=function(A,B){Ext.grid.GridView.ColumnDragZone.superclass.constructor.call(this,A,B,null);this.proxy.el.addClass("x-grid3-col-dd")};Ext.extend(Ext.grid.GridView.ColumnDragZone,Ext.grid.HeaderDragZone,{handleMouseDown:function(A){},callHandleMouseDown:function(A){Ext.grid.GridView.ColumnDragZone.superclass.handleMouseDown.call(this,A)}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.grid.ColumnModel=function(B){this.config=B;this.lookup={};for(var C=0,A=B.length;C<A;C++){var D=B[C];if(typeof D.dataIndex=="undefined"){D.dataIndex=C}if(typeof D.renderer=="string"){D.renderer=Ext.util.Format[D.renderer]}if(typeof D.id=="undefined"){D.id=C}if(D.editor&&D.editor.isFormField){D.editor=new Ext.grid.GridEditor(D.editor)}this.lookup[D.id]=D}this.defaultWidth=100;this.defaultSortable=false;this.addEvents({"widthchange":true,"headerchange":true,"hiddenchange":true,"columnmoved":true,"columnlockchange":true});Ext.grid.ColumnModel.superclass.constructor.call(this)};Ext.extend(Ext.grid.ColumnModel,Ext.util.Observable,{getColumnId:function(A){return this.config[A].id},getColumnById:function(A){return this.lookup[A]},getIndexById:function(C){for(var B=0,A=this.config.length;B<A;B++){if(this.config[B].id==C){return B}}return -1},moveColumn:function(C,A){var B=this.config[C];this.config.splice(C,1);this.config.splice(A,0,B);this.dataMap=null;this.fireEvent("columnmoved",this,C,A)},isLocked:function(A){return this.config[A].locked===true},setLocked:function(B,C,A){if(this.isLocked(B)==C){return }this.config[B].locked=C;if(!A){this.fireEvent("columnlockchange",this,B,C)}},getTotalLockedWidth:function(){var A=0;for(var B=0;B<this.config.length;B++){if(this.isLocked(B)&&!this.isHidden(B)){this.totalWidth+=this.getColumnWidth(B)}}return A},getLockedCount:function(){for(var B=0,A=this.config.length;B<A;B++){if(!this.isLocked(B)){return B}}},getColumnCount:function(C){if(C===true){var D=0;for(var B=0,A=this.config.length;B<A;B++){if(!this.isHidden(B)){D++}}return D}return this.config.length},getColumnsBy:function(D,C){var E=[];for(var B=0,A=this.config.length;B<A;B++){var F=this.config[B];if(D.call(C||this,F,B)===true){E[E.length]=F}}return E},isSortable:function(A){if(typeof this.config[A].sortable=="undefined"){return this.defaultSortable}return this.config[A].sortable},getRenderer:function(A){if(!this.config[A].renderer){return Ext.grid.ColumnModel.defaultRenderer}return this.config[A].renderer},setRenderer:function(A,B){this.config[A].renderer=B},getColumnWidth:function(A){return this.config[A].width||this.defaultWidth},setColumnWidth:function(B,C,A){this.config[B].width=C;this.totalWidth=null;if(!A){this.fireEvent("widthchange",this,B,C)}},getTotalWidth:function(B){if(!this.totalWidth){this.totalWidth=0;for(var C=0,A=this.config.length;C<A;C++){if(B||!this.isHidden(C)){this.totalWidth+=this.getColumnWidth(C)}}}return this.totalWidth},getColumnHeader:function(A){return this.config[A].header},setColumnHeader:function(A,B){this.config[A].header=B;this.fireEvent("headerchange",this,A,B)},getColumnTooltip:function(A){return this.config[A].tooltip},setColumnTooltip:function(A,B){this.config[A].tooltip=B},getDataIndex:function(A){return this.config[A].dataIndex},setDataIndex:function(A,B){this.config[A].dataIndex=B},findColumnIndex:function(C){var D=this.config;for(var B=0,A=D.length;B<A;B++){if(D[B].dataIndex==C){return B}}return -1},isCellEditable:function(A,B){return(this.config[A].editable||(typeof this.config[A].editable=="undefined"&&this.config[A].editor))?true:false},getCellEditor:function(A,B){return this.config[A].editor},setEditable:function(A,B){this.config[A].editable=B},isHidden:function(A){return this.config[A].hidden},isFixed:function(A){return this.config[A].fixed},isResizable:function(A){return A>=0&&this.config[A].resizable!==false&&this.config[A].fixed!==true},setHidden:function(A,B){this.config[A].hidden=B;this.totalWidth=null;this.fireEvent("hiddenchange",this,A,B)},setEditor:function(A,B){this.config[A].editor=B}});Ext.grid.ColumnModel.defaultRenderer=function(A){if(typeof A=="string"&&A.length<1){return"&#160;"}return A};Ext.grid.DefaultColumnModel=Ext.grid.ColumnModel;
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.grid.SplitDragZone=function(A,C,B){this.grid=A;this.view=A.getView();this.proxy=this.view.resizeProxy;Ext.grid.SplitDragZone.superclass.constructor.call(this,C,"gridSplitters"+this.grid.getGridEl().id,{dragElId:Ext.id(this.proxy.dom),resizeFrame:false});this.setHandleElId(Ext.id(C));this.setOuterHandleElId(Ext.id(B));this.scroll=false};Ext.extend(Ext.grid.SplitDragZone,Ext.dd.DDProxy,{fly:Ext.Element.fly,b4StartDrag:function(A,D){this.view.headersDisabled=true;this.proxy.setHeight(this.view.mainWrap.getHeight());var B=this.cm.getColumnWidth(this.cellIndex);var C=Math.max(B-this.grid.minColumnWidth,0);this.resetConstraints();this.setXConstraint(C,1000);this.setYConstraint(0,0);this.minX=A-C;this.maxX=A+1000;this.startPos=A;Ext.dd.DDProxy.prototype.b4StartDrag.call(this,A,D)},handleMouseDown:function(B){ev=Ext.EventObject.setEvent(B);var A=this.fly(ev.getTarget());if(A.hasClass("x-grid-split")){this.cellIndex=this.view.getCellIndex(A.dom);this.split=A.dom;this.cm=this.grid.colModel;if(this.cm.isResizable(this.cellIndex)&&!this.cm.isFixed(this.cellIndex)){Ext.grid.SplitDragZone.superclass.handleMouseDown.apply(this,arguments)}}},endDrag:function(C){this.view.headersDisabled=false;var A=Math.max(this.minX,Ext.lib.Event.getPageX(C));var B=A-this.startPos;this.view.onColumnSplitterMoved(this.cellIndex,this.cm.getColumnWidth(this.cellIndex)+B)},autoOffset:function(){this.setDelta(0,0)}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.grid.EditorGrid=function(A,B){Ext.grid.EditorGrid.superclass.constructor.call(this,A,B);this.getGridEl().addClass("xedit-grid");if(!this.selModel){this.selModel=new Ext.grid.CellSelectionModel()}this.activeEditor=null;this.addEvents({"beforeedit":true,"afteredit":true,"validateedit":true});this.on("bodyscroll",this.stopEditing,this);this.on(this.clicksToEdit==1?"cellclick":"celldblclick",this.onCellDblClick,this)};Ext.extend(Ext.grid.EditorGrid,Ext.grid.Grid,{clicksToEdit:2,isEditor:true,trackMouseOver:false,onCellDblClick:function(B,C,A){this.startEditing(C,A)},onEditComplete:function(B,D,A){this.editing=false;this.activeEditor=null;B.un("specialkey",this.selModel.onEditorKey,this.selModel);if(String(D)!==String(A)){var C=B.record;var F=this.colModel.getDataIndex(B.col);var E={grid:this,record:C,field:F,originalValue:A,value:D,row:B.row,column:B.col,cancel:false};if(this.fireEvent("validateedit",E)!==false&&!E.cancel){C.set(F,E.value);delete E.cancel;this.fireEvent("afteredit",E)}}this.view.focusCell(B.row,B.col)},startEditing:function(F,B){this.stopEditing();if(this.colModel.isCellEditable(B,F)){this.view.ensureVisible(F,B,true);var C=this.dataSource.getAt(F);var E=this.colModel.getDataIndex(B);var D={grid:this,record:C,field:E,value:C.data[E],row:F,column:B,cancel:false};if(this.fireEvent("beforeedit",D)!==false&&!D.cancel){this.editing=true;var A=this.colModel.getCellEditor(B,F);if(!A.rendered){A.render(A.parentEl||document.body)}(function(){A.row=F;A.col=B;A.record=C;A.on("complete",this.onEditComplete,this,{single:true});A.on("specialkey",this.selModel.onEditorKey,this.selModel);this.activeEditor=A;var G=C.data[E];A.startEdit(this.view.getCell(F,B),G)}).defer(50,this)}}},stopEditing:function(){if(this.activeEditor){this.activeEditor.completeEdit()}this.activeEditor=null}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.grid.Grid=function(A,B){this.container=Ext.get(A);this.container.update("");this.container.setStyle("overflow","hidden");this.container.addClass("x-grid-container");this.id=this.container.id;Ext.apply(this,B);if(this.ds){this.dataSource=this.ds;delete this.ds}if(this.cm){this.colModel=this.cm;delete this.cm}if(this.sm){this.selModel=this.sm;delete this.sm}if(this.width){this.container.setWidth(this.width)}if(this.height){this.container.setHeight(this.height)}this.addEvents({"click":true,"dblclick":true,"contextmenu":true,"mousedown":true,"mouseup":true,"mouseover":true,"mouseout":true,"keypress":true,"keydown":true,"cellclick":true,"celldblclick":true,"rowclick":true,"rowdblclick":true,"headerclick":true,"headerdblclick":true,"rowcontextmenu":true,"cellcontextmenu":true,"headercontextmenu":true,"bodyscroll":true,"columnresize":true,"columnmove":true,"startdrag":true,"enddrag":true,"dragdrop":true,"dragover":true,"dragenter":true,"dragout":true,render:true});Ext.grid.Grid.superclass.constructor.call(this)};Ext.extend(Ext.grid.Grid,Ext.util.Observable,{minColumnWidth:25,autoSizeColumns:false,autoSizeHeaders:true,monitorWindowResize:true,maxRowsToMeasure:0,trackMouseOver:true,enableDragDrop:false,enableColumnMove:true,enableColumnHide:true,enableRowHeightSync:false,stripeRows:true,autoHeight:false,autoExpandColumn:false,autoExpandMin:50,autoExpandMax:1000,view:null,loadMask:false,rendered:false,render:function(){var B=this.container;if((!B.dom.offsetHeight||B.dom.offsetHeight<20)||B.getStyle("height")=="auto"){this.autoHeight=true}var A=this.getView();A.init(this);B.on("click",this.onClick,this);B.on("dblclick",this.onDblClick,this);B.on("contextmenu",this.onContextMenu,this);B.on("keydown",this.onKeyDown,this);this.relayEvents(B,["mousedown","mouseup","mouseover","mouseout","keypress"]);this.getSelectionModel().init(this);A.render();if(this.loadMask){this.loadMask=new Ext.LoadMask(this.container,Ext.apply({store:this.dataSource},this.loadMask))}this.rendered=true;this.fireEvent("render",this);return this},reconfigure:function(B,A){if(this.loadMask){this.loadMask.destroy();this.loadMask=new Ext.LoadMask(this.container,Ext.apply({store:B},this.loadMask))}this.view.bind(B,A);this.dataSource=B;this.colModel=A;this.view.refresh(true)},onKeyDown:function(A){this.fireEvent("keydown",A)},destroy:function(A,B){if(this.loadMask){this.loadMask.destroy()}var C=this.container;C.removeAllListeners();this.view.destroy();this.colModel.purgeListeners();if(!B){this.purgeListeners()}C.update("");if(A===true){C.remove()}},processEvent:function(C,E){this.fireEvent(C,E);var D=E.getTarget();var B=this.view;var G=B.findHeaderIndex(D);if(G!==false){this.fireEvent("header"+C,this,G,E)}else{var F=B.findRowIndex(D);var A=B.findCellIndex(D);if(F!==false){this.fireEvent("row"+C,this,F,E);if(A!==false){this.fireEvent("cell"+C,this,F,A,E)}}}},onClick:function(A){this.processEvent("click",A)},onContextMenu:function(B,A){this.processEvent("contextmenu",B)},onDblClick:function(A){this.processEvent("dblclick",A)},walkCells:function(J,C,B,E,I){var H=this.colModel,F=H.getColumnCount();var A=this.dataSource,G=A.getCount(),D=true;if(B<0){if(C<0){J--;D=false}while(J>=0){if(!D){C=F-1}D=false;while(C>=0){if(E.call(I||this,J,C,H)===true){return[J,C]}C--}J--}}else{if(C>=F){J++;D=false}while(J<G){if(!D){C=0}D=false;while(C<F){if(E.call(I||this,J,C,H)===true){return[J,C]}C++}J++}}return null},getSelections:function(){return this.selModel.getSelections()},autoSize:function(){if(this.rendered){this.view.layout();if(this.view.adjustForScroll){this.view.adjustForScroll()}}},getGridEl:function(){return this.container},stopEditing:function(){},getSelectionModel:function(){if(!this.selModel){this.selModel=new Ext.grid.RowSelectionModel()}return this.selModel},getDataSource:function(){return this.dataSource},getColumnModel:function(){return this.colModel},getView:function(){if(!this.view){this.view=new Ext.grid.GridView(this.viewConfig)}return this.view},getDragDropText:function(){var A=this.selModel.getCount();return String.format(this.ddText,A,A==1?"":"s")}});Ext.grid.Grid.prototype.ddText="{0} selected row{1}";
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.grid.GridDragZone=function(B,A){this.view=B.getView();Ext.grid.GridDragZone.superclass.constructor.call(this,this.view.mainBody.dom,A);if(this.view.lockedBody){this.setHandleElId(Ext.id(this.view.mainBody.dom));this.setOuterHandleElId(Ext.id(this.view.lockedBody.dom))}this.scroll=false;this.grid=B;this.ddel=document.createElement("div");this.ddel.className="x-grid-dd-wrap"};Ext.extend(Ext.grid.GridDragZone,Ext.dd.DragZone,{ddGroup:"GridDD",getDragData:function(B){var A=Ext.lib.Event.getTarget(B);var D=this.view.findRowIndex(A);if(D!==false){var C=this.grid.selModel;if(!C.isSelected(D)||B.hasModifier()){C.handleMouseDown(B,A)}return{grid:this.grid,ddel:this.ddel,rowIndex:D,selections:C.getSelections()}}return false},onInitDrag:function(B){var A=this.dragData;this.ddel.innerHTML=this.grid.getDragDropText();this.proxy.update(this.ddel)},afterRepair:function(){this.dragging=false},getRepairXY:function(B,A){return false},onEndDrag:function(A,B){},onValidDrop:function(A,B,C){this.hideProxy()},beforeInvalidDrop:function(A,B){}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.grid.GridEditor=function(B,A){Ext.grid.GridEditor.superclass.constructor.call(this,B,A);B.monitorTab=false};Ext.extend(Ext.grid.GridEditor,Ext.Editor,{alignment:"tl-tl",autoSize:"width",hideEl:false,cls:"x-small-editor x-grid-editor",shim:false,shadow:"frame"});
\ No newline at end of file
This diff is collapsed.
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.grid.PropertyRecord=Ext.data.Record.create([{name:"name",type:"string"},"value"]);Ext.grid.PropertyStore=function(A,B){this.grid=A;this.store=new Ext.data.Store({recordType:Ext.grid.PropertyRecord});this.store.on("update",this.onUpdate,this);if(B){this.setSource(B)}Ext.grid.PropertyStore.superclass.constructor.call(this)};Ext.extend(Ext.grid.PropertyStore,Ext.util.Observable,{setSource:function(C){this.source=C;this.store.removeAll();var B=[];for(var A in C){if(this.isEditableValue(C[A])){B.push(new Ext.grid.PropertyRecord({name:A,value:C[A]},A))}}this.store.loadRecords({records:B},{},true)},onUpdate:function(E,A,D){if(D==Ext.data.Record.EDIT){var B=A.data["value"];var C=A.modified["value"];if(this.grid.fireEvent("beforepropertychange",this.source,A.id,B,C)!==false){this.source[A.id]=B;A.commit();this.grid.fireEvent("propertychange",this.source,A.id,B,C)}else{A.reject()}}},getProperty:function(A){return this.store.getAt(A)},isEditableValue:function(A){if(A&&A instanceof Date){return true}else{if(typeof A=="object"||typeof A=="function"){return false}}return true},setValue:function(B,A){this.source[B]=A;this.store.getById(B).set("value",A)},getSource:function(){return this.source}});Ext.grid.PropertyColumnModel=function(B,A){this.grid=B;var C=Ext.grid;C.PropertyColumnModel.superclass.constructor.call(this,[{header:this.nameText,sortable:true,dataIndex:"name",id:"name"},{header:this.valueText,resizable:false,dataIndex:"value",id:"value"}]);this.store=A;this.bselect=Ext.DomHelper.append(document.body,{tag:"select",style:"display:none",cls:"x-grid-editor",children:[{tag:"option",value:"true",html:"true"},{tag:"option",value:"false",html:"false"}]});Ext.id(this.bselect);var D=Ext.form;this.editors={"date":new C.GridEditor(new D.DateField({selectOnFocus:true})),"string":new C.GridEditor(new D.TextField({selectOnFocus:true})),"number":new C.GridEditor(new D.NumberField({selectOnFocus:true,style:"text-align:left;"})),"boolean":new C.GridEditor(new D.Field({el:this.bselect,selectOnFocus:true}))};this.renderCellDelegate=this.renderCell.createDelegate(this);this.renderPropDelegate=this.renderProp.createDelegate(this)};Ext.extend(Ext.grid.PropertyColumnModel,Ext.grid.ColumnModel,{nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",renderDate:function(A){return A.dateFormat(this.dateFormat)},renderBool:function(A){return A?"true":"false"},isCellEditable:function(A,B){return A==1},getRenderer:function(A){return A==1?this.renderCellDelegate:this.renderPropDelegate},renderProp:function(A){return this.getPropertyName(A)},renderCell:function(A){var B=A;if(A instanceof Date){B=this.renderDate(A)}else{if(typeof A=="boolean"){B=this.renderBool(A)}}return Ext.util.Format.htmlEncode(B)},getPropertyName:function(B){var A=this.grid.propertyNames;return A&&A[B]?A[B]:B},getCellEditor:function(A,E){var B=this.store.getProperty(E);var D=B.data["name"],C=B.data["value"];if(this.grid.customEditors[D]){return this.grid.customEditors[D]}if(C instanceof Date){return this.editors["date"]}else{if(typeof C=="number"){return this.editors["number"]}else{if(typeof C=="boolean"){return this.editors["boolean"]}else{return this.editors["string"]}}}}});Ext.grid.PropertyGrid=function(B,D){D=D||{};var C=new Ext.grid.PropertyStore(this);this.store=C;var A=new Ext.grid.PropertyColumnModel(this,C);C.store.sort("name","ASC");Ext.grid.PropertyGrid.superclass.constructor.call(this,B,Ext.apply({ds:C.store,cm:A,enableColLock:false,enableColumnMove:false,stripeRows:false,trackMouseOver:false,clicksToEdit:1},D));this.getGridEl().addClass("x-props-grid");this.lastEditRow=null;this.on("columnresize",this.onColumnResize,this);this.addEvents({beforepropertychange:true,propertychange:true});this.customEditors=this.customEditors||{}};Ext.extend(Ext.grid.PropertyGrid,Ext.grid.EditorGrid,{render:function(){Ext.grid.PropertyGrid.superclass.render.call(this);this.autoSize.defer(100,this)},autoSize:function(){Ext.grid.PropertyGrid.superclass.autoSize.call(this);if(this.view){this.view.fitColumns()}},onColumnResize:function(){this.colModel.setColumnWidth(1,this.container.getWidth(true)-this.colModel.getColumnWidth(0));this.autoSize()},setSource:function(A){this.store.setSource(A)},getSource:function(){return this.store.getSource()}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.grid.RowSelectionModel=function(A){Ext.apply(this,A);this.selections=new Ext.util.MixedCollection(false,function(B){return B.id});this.last=false;this.lastActive=false;this.addEvents({"selectionchange":true,"beforerowselect":true,"rowselect":true,"rowdeselect":true});this.locked=false};Ext.extend(Ext.grid.RowSelectionModel,Ext.grid.AbstractSelectionModel,{singleSelect:false,initEvents:function(){if(!this.grid.enableDragDrop&&!this.grid.enableDrag){this.grid.on("mousedown",this.handleMouseDown,this)}else{this.grid.on("rowclick",function(B,D,C){if(C.button===0&&!C.shiftKey&&!C.ctrlKey){this.selectRow(D,false);B.view.focusRow(D)}},this)}this.rowNav=new Ext.KeyNav(this.grid.getGridEl(),{"up":function(C){if(!C.shiftKey){this.selectPrevious(C.shiftKey)}else{if(this.last!==false&&this.lastActive!==false){var B=this.last;this.selectRange(this.last,this.lastActive-1);this.grid.getView().focusRow(this.lastActive);if(B!==false){this.last=B}}else{this.selectFirstRow()}}},"down":function(C){if(!C.shiftKey){this.selectNext(C.shiftKey)}else{if(this.last!==false&&this.lastActive!==false){var B=this.last;this.selectRange(this.last,this.lastActive+1);this.grid.getView().focusRow(this.lastActive);if(B!==false){this.last=B}}else{this.selectFirstRow()}}},scope:this});var A=this.grid.view;A.on("refresh",this.onRefresh,this);A.on("rowupdated",this.onRowUpdated,this);A.on("rowremoved",this.onRemove,this)},onRefresh:function(){var D=this.grid.dataSource,B,A=this.grid.view;var C=this.selections;C.each(function(E){if((B=D.indexOfId(E.id))!=-1){A.onRowSelect(B)}else{C.remove(E)}})},onRemove:function(A,B,C){this.selections.remove(C)},onRowUpdated:function(A,B,C){if(this.isSelected(C)){A.onRowSelect(B)}},selectRecords:function(B,E){if(!E){this.clearSelections()}var D=this.grid.dataSource;for(var C=0,A=B.length;C<A;C++){this.selectRow(D.indexOf(B[C]),true)}},getCount:function(){return this.selections.length},selectFirstRow:function(){this.selectRow(0)},selectLastRow:function(A){this.selectRow(this.grid.dataSource.getCount()-1,A)},selectNext:function(A){if(this.last!==false&&(this.last+1)<this.grid.dataSource.getCount()){this.selectRow(this.last+1,A);this.grid.getView().focusRow(this.last)}},selectPrevious:function(A){if(this.last){this.selectRow(this.last-1,A);this.grid.getView().focusRow(this.last)}},getSelections:function(){return[].concat(this.selections.items)},getSelected:function(){return this.selections.itemAt(0)},clearSelections:function(A){if(this.locked){return }if(A!==true){var C=this.grid.dataSource;var B=this.selections;B.each(function(D){this.deselectRow(C.indexOfId(D.id))},this);B.clear()}else{this.selections.clear()}this.last=false},selectAll:function(){if(this.locked){return }this.selections.clear();for(var B=0,A=this.grid.dataSource.getCount();B<A;B++){this.selectRow(B,true)}},hasSelection:function(){return this.selections.length>0},isSelected:function(A){var B=typeof A=="number"?this.grid.dataSource.getAt(A):A;return(B&&this.selections.key(B.id)?true:false)},isIdSelected:function(A){return(this.selections.key(A)?true:false)},handleMouseDown:function(E,C){var A=this.grid.getView(),F;if(this.isLocked()||(F=A.findRowIndex(C))===false){return }if(E.shiftKey&&this.last!==false){var D=this.last;this.selectRange(D,F,E.ctrlKey);this.last=D;A.focusRow(F)}else{var B=this.isSelected(F);if(E.button!==0&&B){A.focusRow(F)}else{if(E.ctrlKey&&B){this.deselectRow(F)}else{if(!B){this.selectRow(F,E.button===0&&(E.ctrlKey||E.shiftKey));A.focusRow(F)}}}}},selectRows:function(C,D){if(!D){this.clearSelections()}for(var B=0,A=C.length;B<A;B++){this.selectRow(C[B],true)}},selectRange:function(B,A,D){if(this.locked){return }if(!D){this.clearSelections()}if(B<=A){for(var C=B;C<=A;C++){this.selectRow(C,true)}}else{for(var C=B;C>=A;C--){this.selectRow(C,true)}}},deselectRange:function(C,B,A){if(this.locked){return }for(var D=C;D<=B;D++){this.deselectRow(D,A)}},selectRow:function(B,D,A){if(this.locked||(B<0||B>=this.grid.dataSource.getCount())){return }if(this.fireEvent("beforerowselect",this,B,D)!==false){if(!D||this.singleSelect){this.clearSelections()}var C=this.grid.dataSource.getAt(B);this.selections.add(C);this.last=this.lastActive=B;if(!A){this.grid.getView().onRowSelect(B)}this.fireEvent("rowselect",this,B,C);this.fireEvent("selectionchange",this)}},deselectRow:function(B,A){if(this.locked){return }if(this.last==B){this.last=false}if(this.lastActive==B){this.lastActive=false}var C=this.grid.dataSource.getAt(B);this.selections.remove(C);if(!A){this.grid.getView().onRowDeselect(B)}this.fireEvent("rowdeselect",this,B);this.fireEvent("selectionchange",this)},restoreLast:function(){if(this._last){this.last=this._last}},acceptsNav:function(C,B,A){return !A.isHidden(B)&&A.isCellEditable(B,C)},onEditorKey:function(E,D){var B=D.getKey(),F,C=this.grid,A=C.activeEditor;if(B==D.TAB){D.stopEvent();A.completeEdit();if(D.shiftKey){F=C.walkCells(A.row,A.col-1,-1,this.acceptsNav,this)}else{F=C.walkCells(A.row,A.col+1,1,this.acceptsNav,this)}}else{if(B==D.ENTER&&!D.ctrlKey){D.stopEvent();A.completeEdit();if(D.shiftKey){F=C.walkCells(A.row-1,A.col,-1,this.acceptsNav,this)}else{F=C.walkCells(A.row+1,A.col,1,this.acceptsNav,this)}}else{if(B==D.ESC){A.cancelEdit()}}}if(F){C.startEditing(F[0],F[1])}}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.BasicLayoutRegion=function(C,B,D,A){this.mgr=C;this.position=D;this.events={"beforeremove":true,"invalidated":true,"visibilitychange":true,"paneladded":true,"panelremoved":true,"collapsed":true,"expanded":true,"slideshow":true,"slidehide":true,"panelactivated":true,"resized":true};this.panels=new Ext.util.MixedCollection();this.panels.getKey=this.getPanelId.createDelegate(this);this.box=null;this.activePanel=null;if(A!==true){this.applyConfig(B)}};Ext.extend(Ext.BasicLayoutRegion,Ext.util.Observable,{getPanelId:function(A){return A.getId()},applyConfig:function(A){this.margins=A.margins||this.margins||{top:0,left:0,right:0,bottom:0};this.config=A},resizeTo:function(A){var B=this.el?this.el:(this.activePanel?this.activePanel.getEl():null);if(B){switch(this.position){case"east":case"west":B.setWidth(A);this.fireEvent("resized",this,A);break;case"north":case"south":B.setHeight(A);this.fireEvent("resized",this,A);break}}},getBox:function(){return this.activePanel?this.activePanel.getEl().getBox(false,true):null},getMargins:function(){return this.margins},updateBox:function(B){this.box=B;var A=this.activePanel.getEl();A.dom.style.left=B.x+"px";A.dom.style.top=B.y+"px";this.activePanel.setSize(B.width,B.height)},getEl:function(){return this.activePanel},isVisible:function(){return this.activePanel?true:false},setActivePanel:function(A){A=this.getPanel(A);if(this.activePanel&&this.activePanel!=A){this.activePanel.setActiveState(false);this.activePanel.getEl().setLeftTop(-10000,-10000)}this.activePanel=A;A.setActiveState(true);if(this.box){A.setSize(this.box.width,this.box.height)}this.fireEvent("panelactivated",this,A);this.fireEvent("invalidated")},showPanel:function(A){if(A=this.getPanel(A)){this.setActivePanel(A)}return A},getActivePanel:function(){return this.activePanel},add:function(B){if(arguments.length>1){for(var C=0,A=arguments.length;C<A;C++){this.add(arguments[C])}return null}if(this.hasPanel(B)){this.showPanel(B);return B}var D=B.getEl();if(D.dom.parentNode!=this.mgr.el.dom){this.mgr.el.dom.appendChild(D.dom)}if(B.setRegion){B.setRegion(this)}this.panels.add(B);D.setStyle("position","absolute");if(!B.background){this.setActivePanel(B);if(this.config.initialSize&&this.panels.getCount()==1){this.resizeTo(this.config.initialSize)}}this.fireEvent("paneladded",this,B);return B},hasPanel:function(A){if(typeof A=="object"){A=A.getId()}return this.getPanel(A)?true:false},remove:function(B,A){B=this.getPanel(B);if(!B){return null}var D={};this.fireEvent("beforeremove",this,B,D);if(D.cancel===true){return null}var C=B.getId();this.panels.removeKey(C);return B},getPanel:function(A){if(typeof A=="object"){return A}return this.panels.get(A)},getPosition:function(){return this.position}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.BorderLayout=function(B,C){C=C||{};Ext.BorderLayout.superclass.constructor.call(this,B,C);this.factory=C.factory||Ext.BorderLayout.RegionFactory;for(var D=0,A=this.factory.validRegions.length;D<A;D++){var E=this.factory.validRegions[D];if(C[E]){this.addRegion(E,C[E])}}};Ext.extend(Ext.BorderLayout,Ext.LayoutManager,{addRegion:function(C,A){if(!this.regions[C]){var B=this.factory.create(C,this,A);this.bindRegion(C,B)}return this.regions[C]},bindRegion:function(A,B){this.regions[A]=B;B.on("visibilitychange",this.layout,this);B.on("paneladded",this.layout,this);B.on("panelremoved",this.layout,this);B.on("invalidated",this.layout,this);B.on("resized",this.onRegionResized,this);B.on("collapsed",this.onRegionCollapsed,this);B.on("expanded",this.onRegionExpanded,this)},layout:function(){if(this.updating){return }var J=this.getViewSize();var H=J.width,N=J.height;var G=H,M=N,E=0,F=0;var D=this.regions;var K=D["north"],I=D["south"],C=D["west"],O=D["east"],P=D["center"];if(K&&K.isVisible()){var Q=K.getBox();var L=K.getMargins();Q.width=H-(L.left+L.right);Q.x=L.left;Q.y=L.top;E=Q.height+Q.y+L.bottom;M-=E;K.updateBox(this.safeBox(Q))}if(I&&I.isVisible()){var Q=I.getBox();var L=I.getMargins();Q.width=H-(L.left+L.right);Q.x=L.left;var R=(Q.height+L.top+L.bottom);Q.y=N-R+L.top;M-=R;I.updateBox(this.safeBox(Q))}if(C&&C.isVisible()){var Q=C.getBox();var L=C.getMargins();Q.height=M-(L.top+L.bottom);Q.x=L.left;Q.y=E+L.top;var A=(Q.width+L.left+L.right);F+=A;G-=A;C.updateBox(this.safeBox(Q))}if(O&&O.isVisible()){var Q=O.getBox();var L=O.getMargins();Q.height=M-(L.top+L.bottom);var A=(Q.width+L.left+L.right);Q.x=H-A+L.left;Q.y=E+L.top;G-=A;O.updateBox(this.safeBox(Q))}if(P){var L=P.getMargins();var B={x:F+L.left,y:E+L.top,width:G-(L.left+L.right),height:M-(L.top+L.bottom)};P.updateBox(this.safeBox(B))}this.el.repaint();this.fireEvent("layout",this)},safeBox:function(A){A.width=Math.max(0,A.width);A.height=Math.max(0,A.height);return A},add:function(B,A){B=B.toLowerCase();return this.regions[B].add(A)},remove:function(B,A){B=B.toLowerCase();return this.regions[B].remove(A)},findPanel:function(B){var A=this.regions;for(var D in A){if(typeof A[D]!="function"){var C=A[D].getPanel(B);if(C){return C}}}return null},showPanel:function(B){var A=this.regions;for(var D in A){var C=A[D];if(typeof C!="function"){if(C.hasPanel(B)){return C.showPanel(B)}}}return null},restoreState:function(A){if(!A){A=Ext.state.Manager}var B=new Ext.LayoutStateManager();B.init(this,A)},batchAdd:function(C){this.beginUpdate();for(var B in C){var A=this.regions[B];if(A){this.addTypedPanels(A,C[B])}}this.endUpdate()},addTypedPanels:function(B,E){if(typeof E=="string"){B.add(new Ext.ContentPanel(E))}else{if(E instanceof Array){for(var C=0,A=E.length;C<A;C++){this.addTypedPanels(B,E[C])}}else{if(!E.events){var D=E.el;delete E.el;B.add(new Ext.ContentPanel(D||Ext.id(),E))}else{B.add(E)}}}}});Ext.BorderLayout.create=function(C,H){var G=new Ext.BorderLayout(H||document.body,C);G.beginUpdate();var D=Ext.BorderLayout.RegionFactory.validRegions;for(var E=0,I=D.length;E<I;E++){var F=D[E];if(G.regions[F]&&C[F].panels){var B=G.regions[F];var A=C[F].panels;G.addTypedPanels(B,A)}}G.endUpdate();return G};Ext.BorderLayout.RegionFactory={validRegions:["north","south","east","west","center"],create:function(C,B,A){C=C.toLowerCase();if(A.lightweight||A.basic){return new Ext.BasicLayoutRegion(B,A,C)}switch(C){case"north":return new Ext.NorthLayoutRegion(B,A);case"south":return new Ext.SouthLayoutRegion(B,A);case"east":return new Ext.EastLayoutRegion(B,A);case"west":return new Ext.WestLayoutRegion(B,A);case"center":return new Ext.CenterLayoutRegion(B,A)}throw"Layout region \""+C+"\" not supported."}};
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.CenterLayoutRegion=function(B,A){Ext.CenterLayoutRegion.superclass.constructor.call(this,B,A,"center");this.visible=true;this.minWidth=A.minWidth||20;this.minHeight=A.minHeight||20};Ext.extend(Ext.CenterLayoutRegion,Ext.LayoutRegion,{hide:function(){},show:function(){},getMinWidth:function(){return this.minWidth},getMinHeight:function(){return this.minHeight}});Ext.NorthLayoutRegion=function(C,A){Ext.NorthLayoutRegion.superclass.constructor.call(this,C,A,"north","n-resize");if(this.split){this.split.placement=Ext.SplitBar.TOP;this.split.orientation=Ext.SplitBar.VERTICAL;this.split.el.addClass("x-layout-split-v")}var B=A.initialSize||A.height;if(typeof B!="undefined"){this.el.setHeight(B)}};Ext.extend(Ext.NorthLayoutRegion,Ext.SplitLayoutRegion,{orientation:Ext.SplitBar.VERTICAL,getBox:function(){if(this.collapsed){return this.collapsedEl.getBox()}var A=this.el.getBox();if(this.split){A.height+=this.split.el.getHeight()}return A},updateBox:function(A){if(this.split&&!this.collapsed){A.height-=this.split.el.getHeight();this.split.el.setLeft(A.x);this.split.el.setTop(A.y+A.height);this.split.el.setWidth(A.width)}if(this.collapsed){this.updateBody(A.width,null)}Ext.NorthLayoutRegion.superclass.updateBox.call(this,A)}});Ext.SouthLayoutRegion=function(C,A){Ext.SouthLayoutRegion.superclass.constructor.call(this,C,A,"south","s-resize");if(this.split){this.split.placement=Ext.SplitBar.BOTTOM;this.split.orientation=Ext.SplitBar.VERTICAL;this.split.el.addClass("x-layout-split-v")}var B=A.initialSize||A.height;if(typeof B!="undefined"){this.el.setHeight(B)}};Ext.extend(Ext.SouthLayoutRegion,Ext.SplitLayoutRegion,{orientation:Ext.SplitBar.VERTICAL,getBox:function(){if(this.collapsed){return this.collapsedEl.getBox()}var B=this.el.getBox();if(this.split){var A=this.split.el.getHeight();B.height+=A;B.y-=A}return B},updateBox:function(B){if(this.split&&!this.collapsed){var A=this.split.el.getHeight();B.height-=A;B.y+=A;this.split.el.setLeft(B.x);this.split.el.setTop(B.y-A);this.split.el.setWidth(B.width)}if(this.collapsed){this.updateBody(B.width,null)}Ext.SouthLayoutRegion.superclass.updateBox.call(this,B)}});Ext.EastLayoutRegion=function(C,A){Ext.EastLayoutRegion.superclass.constructor.call(this,C,A,"east","e-resize");if(this.split){this.split.placement=Ext.SplitBar.RIGHT;this.split.orientation=Ext.SplitBar.HORIZONTAL;this.split.el.addClass("x-layout-split-h")}var B=A.initialSize||A.width;if(typeof B!="undefined"){this.el.setWidth(B)}};Ext.extend(Ext.EastLayoutRegion,Ext.SplitLayoutRegion,{orientation:Ext.SplitBar.HORIZONTAL,getBox:function(){if(this.collapsed){return this.collapsedEl.getBox()}var B=this.el.getBox();if(this.split){var A=this.split.el.getWidth();B.width+=A;B.x-=A}return B},updateBox:function(B){if(this.split&&!this.collapsed){var A=this.split.el.getWidth();B.width-=A;this.split.el.setLeft(B.x);this.split.el.setTop(B.y);this.split.el.setHeight(B.height);B.x+=A}if(this.collapsed){this.updateBody(null,B.height)}Ext.EastLayoutRegion.superclass.updateBox.call(this,B)}});Ext.WestLayoutRegion=function(C,A){Ext.WestLayoutRegion.superclass.constructor.call(this,C,A,"west","w-resize");if(this.split){this.split.placement=Ext.SplitBar.LEFT;this.split.orientation=Ext.SplitBar.HORIZONTAL;this.split.el.addClass("x-layout-split-h")}var B=A.initialSize||A.width;if(typeof B!="undefined"){this.el.setWidth(B)}};Ext.extend(Ext.WestLayoutRegion,Ext.SplitLayoutRegion,{orientation:Ext.SplitBar.HORIZONTAL,getBox:function(){if(this.collapsed){return this.collapsedEl.getBox()}var A=this.el.getBox();if(this.split){A.width+=this.split.el.getWidth()}return A},updateBox:function(B){if(this.split&&!this.collapsed){var A=this.split.el.getWidth();B.width-=A;this.split.el.setLeft(B.x+B.width);this.split.el.setTop(B.y);this.split.el.setHeight(B.height)}if(this.collapsed){this.updateBody(null,B.height)}Ext.WestLayoutRegion.superclass.updateBox.call(this,B)}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.ContentPanel=function(B,A,C){if(B.autoCreate){A=B;B=Ext.id()}this.el=Ext.get(B);if(!this.el&&A&&A.autoCreate){if(typeof A.autoCreate=="object"){if(!A.autoCreate.id){A.autoCreate.id=A.id||B}this.el=Ext.DomHelper.append(document.body,A.autoCreate,true)}else{this.el=Ext.DomHelper.append(document.body,{tag:"div",cls:"x-layout-inactive-content",id:A.id||B},true)}}this.closable=false;this.loaded=false;this.active=false;if(typeof A=="string"){this.title=A}else{Ext.apply(this,A)}if(this.resizeEl){this.resizeEl=Ext.get(this.resizeEl,true)}else{this.resizeEl=this.el}this.addEvents({"activate":true,"deactivate":true,"resize":true});if(this.autoScroll){this.resizeEl.setStyle("overflow","auto")}C=C||this.content;if(C){this.setContent(C)}if(A&&A.url){this.setUrl(this.url,this.params,this.loadOnce)}Ext.ContentPanel.superclass.constructor.call(this)};Ext.extend(Ext.ContentPanel,Ext.util.Observable,{tabTip:"",setRegion:function(A){this.region=A;if(A){this.el.replaceClass("x-layout-inactive-content","x-layout-active-content")}else{this.el.replaceClass("x-layout-active-content","x-layout-inactive-content")}},getToolbar:function(){return this.toolbar},setActiveState:function(A){this.active=A;if(!A){this.fireEvent("deactivate",this)}else{this.fireEvent("activate",this)}},setContent:function(B,A){this.el.update(B,A)},ignoreResize:function(A,B){if(this.lastSize&&this.lastSize.width==A&&this.lastSize.height==B){return true}else{this.lastSize={width:A,height:B};return false}},getUpdateManager:function(){return this.el.getUpdateManager()},load:function(){var A=this.el.getUpdateManager();A.update.apply(A,arguments);return this},setUrl:function(A,C,B){if(this.refreshDelegate){this.removeListener("activate",this.refreshDelegate)}this.refreshDelegate=this._handleRefresh.createDelegate(this,[A,C,B]);this.on("activate",this.refreshDelegate);return this.el.getUpdateManager()},_handleRefresh:function(A,D,C){if(!C||!this.loaded){var B=this.el.getUpdateManager();B.update(A,D,this._setLoaded.createDelegate(this))}},_setLoaded:function(){this.loaded=true},getId:function(){return this.el.id},getEl:function(){return this.el},adjustForComponents:function(B,A){if(this.resizeEl!=this.el){B-=this.el.getFrameWidth("lr");A-=this.el.getFrameWidth("tb")}if(this.toolbar){var C=this.toolbar.getEl();A-=C.getHeight();C.setWidth(B)}if(this.adjustments){B+=this.adjustments[0];A+=this.adjustments[1]}return{"width":B,"height":A}},setSize:function(C,A){if(this.fitToFrame&&!this.ignoreResize(C,A)){if(this.fitContainer&&this.resizeEl!=this.el){this.el.setSize(C,A)}var B=this.adjustForComponents(C,A);this.resizeEl.setSize(this.autoWidth?"auto":B.width,this.autoHeight?"auto":B.height);this.fireEvent("resize",this,B.width,B.height)}},getTitle:function(){return this.title},setTitle:function(A){this.title=A;if(this.region){this.region.updatePanelTitle(this,A)}},isClosable:function(){return this.closable},beforeSlide:function(){this.el.clip();this.resizeEl.clip()},afterSlide:function(){this.el.unclip();this.resizeEl.unclip()},refresh:function(){if(this.refreshDelegate){this.loaded=false;this.refreshDelegate()}},destroy:function(){this.el.removeAllListeners();var A=document.createElement("span");A.appendChild(this.el.dom);A.innerHTML="";this.el.remove();this.el=null}});Ext.GridPanel=function(B,A){this.wrapper=Ext.DomHelper.append(document.body,{tag:"div",cls:"x-layout-grid-wrapper x-layout-inactive-content"},true);this.wrapper.dom.appendChild(B.getGridEl().dom);Ext.GridPanel.superclass.constructor.call(this,this.wrapper,A);if(this.toolbar){this.toolbar.el.insertBefore(this.wrapper.dom.firstChild)}B.monitorWindowResize=false;B.autoHeight=false;B.autoWidth=false;this.grid=B;this.grid.getGridEl().replaceClass("x-layout-inactive-content","x-layout-component-panel")};Ext.extend(Ext.GridPanel,Ext.ContentPanel,{getId:function(){return this.grid.id},getGrid:function(){return this.grid},setSize:function(D,A){if(!this.ignoreResize(D,A)){var C=this.grid;var B=this.adjustForComponents(D,A);C.getGridEl().setSize(B.width,B.height);C.autoSize()}},beforeSlide:function(){this.grid.getView().scroller.clip()},afterSlide:function(){this.grid.getView().scroller.unclip()},destroy:function(){this.grid.destroy();delete this.grid;Ext.GridPanel.superclass.destroy.call(this)}});Ext.NestedLayoutPanel=function(B,A){Ext.NestedLayoutPanel.superclass.constructor.call(this,B.getEl(),A);B.monitorWindowResize=false;this.layout=B;this.layout.getEl().addClass("x-layout-nested-layout")};Ext.extend(Ext.NestedLayoutPanel,Ext.ContentPanel,{setSize:function(D,A){if(!this.ignoreResize(D,A)){var B=this.adjustForComponents(D,A);var C=this.layout.getEl();C.setSize(B.width,B.height);var E=C.dom.offsetWidth;this.layout.layout();if(Ext.isIE&&!this.initialized){this.initialized=true;this.layout.layout()}}},getLayout:function(){return this.layout}});Ext.ScrollPanel=function(D,B,E){B=B||{};B.fitToFrame=true;Ext.ScrollPanel.superclass.constructor.call(this,D,B,E);this.el.dom.style.overflow="hidden";var C=this.el.wrap({cls:"x-scroller x-layout-inactive-content"});this.el.removeClass("x-layout-inactive-content");this.el.on("mousewheel",this.onWheel,this);var A=C.createChild({cls:"x-scroller-up",html:"&#160;"},this.el.dom);var F=C.createChild({cls:"x-scroller-down",html:"&#160;"});A.unselectable();F.unselectable();A.on("click",this.scrollUp,this);F.on("click",this.scrollDown,this);A.addClassOnOver("x-scroller-btn-over");F.addClassOnOver("x-scroller-btn-over");A.addClassOnClick("x-scroller-btn-click");F.addClassOnClick("x-scroller-btn-click");this.adjustments=[0,-(A.getHeight()+F.getHeight())];this.resizeEl=this.el;this.el=C;this.up=A;this.down=F};Ext.extend(Ext.ScrollPanel,Ext.ContentPanel,{increment:100,wheelIncrement:5,scrollUp:function(){this.resizeEl.scroll("up",this.increment,{callback:this.afterScroll,scope:this})},scrollDown:function(){this.resizeEl.scroll("down",this.increment,{callback:this.afterScroll,scope:this})},afterScroll:function(){var D=this.resizeEl;var A=D.dom.scrollTop,C=D.dom.scrollHeight,B=D.dom.clientHeight;this.up[A==0?"addClass":"removeClass"]("x-scroller-btn-disabled");this.down[C-A<=B?"addClass":"removeClass"]("x-scroller-btn-disabled")},setSize:function(){Ext.ScrollPanel.superclass.setSize.apply(this,arguments);this.afterScroll()},onWheel:function(A){var B=A.getWheelDelta();this.resizeEl.dom.scrollTop-=(B*this.wheelIncrement);this.afterScroll();A.stopEvent()},setContent:function(B,A){this.resizeEl.update(B,A)}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.LayoutManager=function(A,B){Ext.LayoutManager.superclass.constructor.call(this);this.el=Ext.get(A);if(this.el.dom==document.body&&Ext.isIE&&!B.allowScroll){document.body.scroll="no"}else{if(this.el.dom!=document.body&&this.el.getStyle("position")=="static"){this.el.position("relative")}}this.id=this.el.id;this.el.addClass("x-layout-container");this.monitorWindowResize=true;this.regions={};this.addEvents({"layout":true,"regionresized":true,"regioncollapsed":true,"regionexpanded":true});this.updating=false;Ext.EventManager.onWindowResize(this.onWindowResize,this,true)};Ext.extend(Ext.LayoutManager,Ext.util.Observable,{isUpdating:function(){return this.updating},beginUpdate:function(){this.updating=true},endUpdate:function(A){this.updating=false;if(!A){this.layout()}},layout:function(){},onRegionResized:function(B,A){this.fireEvent("regionresized",B,A);this.layout()},onRegionCollapsed:function(A){this.fireEvent("regioncollapsed",A)},onRegionExpanded:function(A){this.fireEvent("regionexpanded",A)},getViewSize:function(){var A;if(this.el.dom!=document.body){A=this.el.getSize()}else{A={width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()}}A.width-=this.el.getBorderWidth("lr")-this.el.getPadding("lr");A.height-=this.el.getBorderWidth("tb")-this.el.getPadding("tb");return A},getEl:function(){return this.el},getRegion:function(A){return this.regions[A.toLowerCase()]},onWindowResize:function(){if(this.monitorWindowResize){this.layout()}}});
\ No newline at end of file
This diff is collapsed.
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.LayoutStateManager=function(A){this.state={north:{},south:{},east:{},west:{}}};Ext.LayoutStateManager.prototype={init:function(D,G){this.provider=G;var F=G.get(D.id+"-layout-state");if(F){var E=D.isUpdating();if(!E){D.beginUpdate()}for(var A in F){if(typeof F[A]!="function"){var B=F[A];var C=D.getRegion(A);if(C&&B){if(B.size){C.resizeTo(B.size)}if(B.collapsed==true){C.collapse(true)}else{C.expand(null,true)}}}}if(!E){D.endUpdate()}this.state=F}this.layout=D;D.on("regionresized",this.onRegionResized,this);D.on("regioncollapsed",this.onRegionCollapsed,this);D.on("regionexpanded",this.onRegionExpanded,this)},storeState:function(){this.provider.set(this.layout.id+"-layout-state",this.state)},onRegionResized:function(B,A){this.state[B.getPosition()].size=A;this.storeState()},onRegionCollapsed:function(A){this.state[A.getPosition()].collapsed=true;this.storeState()},onRegionExpanded:function(A){this.state[A.getPosition()].collapsed=false;this.storeState()}};
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.ReaderLayout=function(B,C){var D=B||{size:{}};Ext.ReaderLayout.superclass.constructor.call(this,C||document.body,{north:D.north!==false?Ext.apply({split:false,initialSize:32,titlebar:false},D.north):false,west:D.west!==false?Ext.apply({split:true,initialSize:200,minSize:175,maxSize:400,titlebar:true,collapsible:true,animate:true,margins:{left:5,right:0,bottom:5,top:5},cmargins:{left:5,right:5,bottom:5,top:5}},D.west):false,east:D.east!==false?Ext.apply({split:true,initialSize:200,minSize:175,maxSize:400,titlebar:true,collapsible:true,animate:true,margins:{left:0,right:5,bottom:5,top:5},cmargins:{left:5,right:5,bottom:5,top:5}},D.east):false,center:Ext.apply({tabPosition:"top",autoScroll:false,closeOnTab:true,titlebar:false,margins:{left:D.west!==false?0:5,right:D.east!==false?0:5,bottom:5,top:2}},D.center)});this.el.addClass("x-reader");this.beginUpdate();var A=new Ext.BorderLayout(Ext.get(document.body).createChild(),{south:D.preview!==false?Ext.apply({split:true,initialSize:200,minSize:100,autoScroll:true,collapsible:true,titlebar:true,cmargins:{top:5,left:0,right:0,bottom:0}},D.preview):false,center:Ext.apply({autoScroll:false,titlebar:false,minHeight:200},D.listView)});this.add("center",new Ext.NestedLayoutPanel(A,Ext.apply({title:D.mainTitle||"",tabTip:""},D.innerPanelCfg)));this.endUpdate();this.regions.preview=A.getRegion("south");this.regions.listView=A.getRegion("center")};Ext.extend(Ext.ReaderLayout,Ext.BorderLayout);
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.SplitLayoutRegion=function(B,A,D,C){this.cursor=C;Ext.SplitLayoutRegion.superclass.constructor.call(this,B,A,D)};Ext.extend(Ext.SplitLayoutRegion,Ext.LayoutRegion,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide.",useSplitTips:false,applyConfig:function(A){Ext.SplitLayoutRegion.superclass.applyConfig.call(this,A);if(A.split){if(!this.split){var B=Ext.DomHelper.append(this.mgr.el.dom,{tag:"div",id:this.el.id+"-split",cls:"x-layout-split x-layout-split-"+this.position,html:"&#160;"});this.split=new Ext.SplitBar(B,this.el,this.orientation);this.split.on("moved",this.onSplitMove,this);this.split.useShim=A.useShim===true;this.split.getMaximumSize=this[this.position=="north"||this.position=="south"?"getVMaxSize":"getHMaxSize"].createDelegate(this);if(this.useSplitTips){this.split.el.dom.title=A.collapsible?this.collapsibleSplitTip:this.splitTip}if(A.collapsible){this.split.el.on("dblclick",this.collapse,this)}}if(typeof A.minSize!="undefined"){this.split.minSize=A.minSize}if(typeof A.maxSize!="undefined"){this.split.maxSize=A.maxSize}if(A.hideWhenEmpty||A.hidden||A.collapsed){this.hideSplitter()}}},getHMaxSize:function(){var B=this.config.maxSize||10000;var A=this.mgr.getRegion("center");return Math.min(B,(this.el.getWidth()+A.getEl().getWidth())-A.getMinWidth())},getVMaxSize:function(){var B=this.config.maxSize||10000;var A=this.mgr.getRegion("center");return Math.min(B,(this.el.getHeight()+A.getEl().getHeight())-A.getMinHeight())},onSplitMove:function(B,A){this.fireEvent("resized",this,A)},getSplitBar:function(){return this.split},hide:function(){this.hideSplitter();Ext.SplitLayoutRegion.superclass.hide.call(this)},hideSplitter:function(){if(this.split){this.split.el.setLocation(-2000,-2000);this.split.el.hide()}},show:function(){if(this.split){this.split.el.show()}Ext.SplitLayoutRegion.superclass.show.call(this)},beforeSlide:function(){if(Ext.isGecko){this.bodyEl.clip();if(this.tabs){this.tabs.bodyEl.clip()}if(this.activePanel){this.activePanel.getEl().clip();if(this.activePanel.beforeSlide){this.activePanel.beforeSlide()}}}},afterSlide:function(){if(Ext.isGecko){this.bodyEl.unclip();if(this.tabs){this.tabs.bodyEl.unclip()}if(this.activePanel){this.activePanel.getEl().unclip();if(this.activePanel.afterSlide){this.activePanel.afterSlide()}}}},initAutoHide:function(){if(this.autoHide!==false){if(!this.autoHideHd){var A=new Ext.util.DelayedTask(this.slideIn,this);this.autoHideHd={"mouseout":function(B){if(!B.within(this.el,true)){A.delay(500)}},"mouseover":function(B){A.cancel()},scope:this}}this.el.on(this.autoHideHd)}},clearAutoHide:function(){if(this.autoHide!==false){this.el.un("mouseout",this.autoHideHd.mouseout);this.el.un("mouseover",this.autoHideHd.mouseover)}},clearMonitor:function(){Ext.get(document).un("click",this.slideInIf,this)},slideOut:function(){if(this.isSlid||this.el.hasActiveFx()){return }this.isSlid=true;if(this.collapseBtn){this.collapseBtn.hide()}this.closeBtnState=this.closeBtn.getStyle("display");this.closeBtn.hide();if(this.stickBtn){this.stickBtn.show()}this.el.show();this.el.alignTo(this.collapsedEl,this.getCollapseAnchor());this.beforeSlide();this.el.setStyle("z-index",10001);this.el.slideIn(this.getSlideAnchor(),{callback:function(){this.afterSlide();this.initAutoHide();Ext.get(document).on("click",this.slideInIf,this);this.fireEvent("slideshow",this)},scope:this,block:true})},afterSlideIn:function(){this.clearAutoHide();this.isSlid=false;this.clearMonitor();this.el.setStyle("z-index","");if(this.collapseBtn){this.collapseBtn.show()}this.closeBtn.setStyle("display",this.closeBtnState);if(this.stickBtn){this.stickBtn.hide()}this.fireEvent("slidehide",this)},slideIn:function(A){if(!this.isSlid||this.el.hasActiveFx()){Ext.callback(A);return }this.isSlid=false;this.beforeSlide();this.el.slideOut(this.getSlideAnchor(),{callback:function(){this.el.setLeftTop(-10000,-10000);this.afterSlide();this.afterSlideIn();Ext.callback(A)},scope:this,block:true})},slideInIf:function(A){if(!A.within(this.el)){this.slideIn()}},animateCollapse:function(){this.beforeSlide();this.el.setStyle("z-index",20000);var A=this.getSlideAnchor();this.el.slideOut(A,{callback:function(){this.el.setStyle("z-index","");this.collapsedEl.slideIn(A,{duration:0.3});this.afterSlide();this.el.setLocation(-10000,-10000);this.el.hide();this.fireEvent("collapsed",this)},scope:this,block:true})},animateExpand:function(){this.beforeSlide();this.el.alignTo(this.collapsedEl,this.getCollapseAnchor(),this.getExpandAdj());this.el.setStyle("z-index",20000);this.collapsedEl.hide({duration:0.1});this.el.slideIn(this.getSlideAnchor(),{callback:function(){this.el.setStyle("z-index","");this.afterSlide();if(this.split){this.split.el.show()}this.fireEvent("invalidated",this);this.fireEvent("expanded",this)},scope:this,block:true})},anchors:{"west":"left","east":"right","north":"top","south":"bottom"},sanchors:{"west":"l","east":"r","north":"t","south":"b"},canchors:{"west":"tl-tr","east":"tr-tl","north":"tl-bl","south":"bl-tl"},getAnchor:function(){return this.anchors[this.position]},getCollapseAnchor:function(){return this.canchors[this.position]},getSlideAnchor:function(){return this.sanchors[this.position]},getAlignAdj:function(){var A=this.cmargins;switch(this.position){case"west":return[0,0];break;case"east":return[0,0];break;case"north":return[0,0];break;case"south":return[0,0];break}},getExpandAdj:function(){var B=this.collapsedEl,A=this.cmargins;switch(this.position){case"west":return[-(A.right+B.getWidth()+A.left),0];break;case"east":return[A.right+B.getWidth()+A.left,0];break;case"north":return[0,-(A.top+A.bottom+B.getHeight())];break;case"south":return[0,A.top+A.bottom+B.getHeight()];break}}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.menu.Adapter=function(B,A){Ext.menu.Adapter.superclass.constructor.call(this,A);this.component=B};Ext.extend(Ext.menu.Adapter,Ext.menu.BaseItem,{canActivate:true,onRender:function(B,A){this.component.render(B);this.el=this.component.getEl()},activate:function(){if(this.disabled){return false}this.component.focus();this.fireEvent("activate",this);return true},deactivate:function(){this.fireEvent("deactivate",this)},disable:function(){this.component.disable();Ext.menu.Adapter.superclass.disable.call(this)},enable:function(){this.component.enable();Ext.menu.Adapter.superclass.enable.call(this)}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.menu.BaseItem=function(A){Ext.menu.BaseItem.superclass.constructor.call(this,A);this.addEvents({click:true,activate:true,deactivate:true});if(this.handler){this.on("click",this.handler,this.scope,true)}};Ext.extend(Ext.menu.BaseItem,Ext.Component,{canActivate:false,activeClass:"x-menu-item-active",hideOnClick:true,hideDelay:100,ctype:"Ext.menu.BaseItem",actionMode:"container",render:function(A,B){this.parentMenu=B;Ext.menu.BaseItem.superclass.render.call(this,A);this.container.menuItemId=this.id},onRender:function(B,A){this.el=Ext.get(this.el);B.dom.appendChild(this.el.dom)},onClick:function(A){if(!this.disabled&&this.fireEvent("click",this,A)!==false&&this.parentMenu.fireEvent("itemclick",this,A)!==false){this.handleClick(A)}else{A.stopEvent()}},activate:function(){if(this.disabled){return false}var A=this.container;A.addClass(this.activeClass);this.region=A.getRegion().adjust(2,2,-2,-2);this.fireEvent("activate",this);return true},deactivate:function(){this.container.removeClass(this.activeClass);this.fireEvent("deactivate",this)},shouldDeactivate:function(A){return !this.region||!this.region.contains(A.getPoint())},handleClick:function(A){if(this.hideOnClick){this.parentMenu.hide.defer(this.hideDelay,this.parentMenu,[true])}},expandMenu:function(A){},hideMenu:function(){}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.menu.CheckItem=function(A){Ext.menu.CheckItem.superclass.constructor.call(this,A);this.addEvents({"beforecheckchange":true,"checkchange":true});if(this.checkHandler){this.on("checkchange",this.checkHandler,this.scope)}};Ext.extend(Ext.menu.CheckItem,Ext.menu.Item,{itemCls:"x-menu-item x-menu-check-item",groupClass:"x-menu-group-item",checked:false,ctype:"Ext.menu.CheckItem",onRender:function(A){Ext.menu.CheckItem.superclass.onRender.apply(this,arguments);if(this.group){this.el.addClass(this.groupClass)}Ext.menu.MenuMgr.registerCheckable(this);if(this.checked){this.checked=false;this.setChecked(true,true)}},destroy:function(){if(this.rendered){Ext.menu.MenuMgr.unregisterCheckable(this)}Ext.menu.CheckItem.superclass.destroy.apply(this,arguments)},setChecked:function(B,A){if(this.checked!=B&&this.fireEvent("beforecheckchange",this,B)!==false){if(this.container){this.container[B?"addClass":"removeClass"]("x-menu-item-checked")}this.checked=B;if(A!==true){this.fireEvent("checkchange",this,B)}}},handleClick:function(A){if(!this.disabled&&!(this.checked&&this.group)){this.setChecked(!this.checked)}Ext.menu.CheckItem.superclass.handleClick.apply(this,arguments)}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.menu.ColorItem=function(A){Ext.menu.ColorItem.superclass.constructor.call(this,new Ext.ColorPalette(A),A);this.palette=this.component;this.relayEvents(this.palette,["select"]);if(this.selectHandler){this.on("select",this.selectHandler,this.scope)}};Ext.extend(Ext.menu.ColorItem,Ext.menu.Adapter);
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.menu.ColorMenu=function(A){Ext.menu.ColorMenu.superclass.constructor.call(this,A);this.plain=true;var B=new Ext.menu.ColorItem(A);this.add(B);this.palette=B.palette;this.relayEvents(B,["select"])};Ext.extend(Ext.menu.ColorMenu,Ext.menu.Menu);
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.menu.DateItem=function(A){Ext.menu.DateItem.superclass.constructor.call(this,new Ext.DatePicker(A),A);this.picker=this.component;this.addEvents({select:true});this.picker.on("render",function(B){B.getEl().swallowEvent("click");B.container.addClass("x-menu-date-item")});this.picker.on("select",this.onSelect,this)};Ext.extend(Ext.menu.DateItem,Ext.menu.Adapter,{onSelect:function(B,A){this.fireEvent("select",this,A,B);Ext.menu.DateItem.superclass.handleClick.call(this)}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.menu.DateMenu=function(A){Ext.menu.DateMenu.superclass.constructor.call(this,A);this.plain=true;var B=new Ext.menu.DateItem(A);this.add(B);this.picker=B.picker;this.relayEvents(B,["select"]);this.on("beforeshow",function(){if(this.picker){this.picker.hideMonthPicker(true)}},this)};Ext.extend(Ext.menu.DateMenu,Ext.menu.Menu,{cls:"x-date-menu"});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.menu.Item=function(A){Ext.menu.Item.superclass.constructor.call(this,A);if(this.menu){this.menu=Ext.menu.MenuMgr.get(this.menu)}};Ext.extend(Ext.menu.Item,Ext.menu.BaseItem,{itemCls:"x-menu-item",canActivate:true,showDelay:200,hideDelay:200,ctype:"Ext.menu.Item",onRender:function(B,A){var C=document.createElement("a");C.hideFocus=true;C.unselectable="on";C.href=this.href||"#";if(this.hrefTarget){C.target=this.hrefTarget}C.className=this.itemCls+(this.menu?" x-menu-item-arrow":"")+(this.cls?" "+this.cls:"");C.innerHTML=String.format("<img src=\"{0}\" class=\"x-menu-item-icon {2}\" />{1}",this.icon||Ext.BLANK_IMAGE_URL,this.text,this.iconCls||"");this.el=C;Ext.menu.Item.superclass.onRender.call(this,B,A)},setText:function(A){this.text=A;if(this.rendered){this.el.update(String.format("<img src=\"{0}\" class=\"x-menu-item-icon {2}\">{1}",this.icon||Ext.BLANK_IMAGE_URL,this.text,this.iconCls||""));this.parentMenu.autoWidth()}},handleClick:function(A){if(!this.href){A.stopEvent()}Ext.menu.Item.superclass.handleClick.apply(this,arguments)},activate:function(A){if(Ext.menu.Item.superclass.activate.apply(this,arguments)){this.focus();if(A){this.expandMenu()}}return true},shouldDeactivate:function(A){if(Ext.menu.Item.superclass.shouldDeactivate.call(this,A)){if(this.menu&&this.menu.isVisible()){return !this.menu.getEl().getRegion().contains(A.getPoint())}return true}return false},deactivate:function(){Ext.menu.Item.superclass.deactivate.apply(this,arguments);this.hideMenu()},expandMenu:function(A){if(!this.disabled&&this.menu){clearTimeout(this.hideTimer);delete this.hideTimer;if(!this.menu.isVisible()&&!this.showTimer){this.showTimer=this.deferExpand.defer(this.showDelay,this,[A])}else{if(this.menu.isVisible()&&A){this.menu.tryActivate(0,1)}}}},deferExpand:function(A){delete this.showTimer;this.menu.show(this.container,this.parentMenu.subMenuAlign||"tl-tr?",this.parentMenu);if(A){this.menu.tryActivate(0,1)}},hideMenu:function(){clearTimeout(this.showTimer);delete this.showTimer;if(!this.hideTimer&&this.menu&&this.menu.isVisible()){this.hideTimer=this.deferHide.defer(this.hideDelay,this)}},deferHide:function(){delete this.hideTimer;this.menu.hide()}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.menu.Menu=function(A){Ext.apply(this,A);this.id=this.id||Ext.id();this.addEvents({beforeshow:true,beforehide:true,show:true,hide:true,click:true,mouseover:true,mouseout:true,itemclick:true});Ext.menu.MenuMgr.register(this);var B=this.items;this.items=new Ext.util.MixedCollection();if(B){this.add.apply(this,B)}};Ext.extend(Ext.menu.Menu,Ext.util.Observable,{minWidth:120,shadow:"sides",subMenuAlign:"tl-tr?",defaultAlign:"tl-bl?",allowOtherMenus:false,hidden:true,render:function(){if(this.el){return }var B=this.el=new Ext.Layer({cls:"x-menu",shadow:this.shadow,constrain:false,parentEl:this.parentEl||document.body,zindex:15000});this.keyNav=new Ext.menu.MenuNav(this);if(this.plain){B.addClass("x-menu-plain")}if(this.cls){B.addClass(this.cls)}this.focusEl=B.createChild({tag:"a",cls:"x-menu-focus",href:"#",onclick:"return false;",tabIndex:"-1"});var A=B.createChild({tag:"ul",cls:"x-menu-list"});A.on("click",this.onClick,this);A.on("mouseover",this.onMouseOver,this);A.on("mouseout",this.onMouseOut,this);this.items.each(function(D){var C=document.createElement("li");C.className="x-menu-list-item";A.dom.appendChild(C);D.render(C,this)},this);this.ul=A;this.autoWidth()},autoWidth:function(){var D=this.el,C=this.ul;if(!D){return }var A=this.width;if(A){D.setWidth(A)}else{if(Ext.isIE){D.setWidth(this.minWidth);var B=D.dom.offsetWidth;D.setWidth(C.getWidth()+D.getFrameWidth("lr"))}}},delayAutoWidth:function(){if(this.rendered){if(!this.awTask){this.awTask=new Ext.util.DelayedTask(this.autoWidth,this)}this.awTask.delay(20)}},findTargetItem:function(B){var A=B.getTarget(".x-menu-list-item",this.ul,true);if(A&&A.menuItemId){return this.items.get(A.menuItemId)}},onClick:function(B){var A;if(A=this.findTargetItem(B)){A.onClick(B);this.fireEvent("click",this,A,B)}},setActiveItem:function(A,B){if(A!=this.activeItem){if(this.activeItem){this.activeItem.deactivate()}this.activeItem=A;A.activate(B)}else{if(B){A.expandMenu()}}},tryActivate:function(F,E){var B=this.items;for(var C=F,A=B.length;C>=0&&C<A;C+=E){var D=B.get(C);if(!D.disabled&&D.canActivate){this.setActiveItem(D,false);return D}}return false},onMouseOver:function(B){var A;if(A=this.findTargetItem(B)){if(A.canActivate&&!A.disabled){this.setActiveItem(A,true)}}this.fireEvent("mouseover",this,B,A)},onMouseOut:function(B){var A;if(A=this.findTargetItem(B)){if(A==this.activeItem&&A.shouldDeactivate(B)){this.activeItem.deactivate();delete this.activeItem}}this.fireEvent("mouseout",this,B,A)},isVisible:function(){return this.el&&!this.hidden},show:function(B,C,A){this.parentMenu=A;if(!this.el){this.render()}this.fireEvent("beforeshow",this);this.showAt(this.el.getAlignToXY(B,C||this.defaultAlign),A,false)},showAt:function(C,B,A){this.parentMenu=B;if(!this.el){this.render()}if(A!==false){this.fireEvent("beforeshow",this);C=this.el.adjustForConstraints(C)}this.el.setXY(C);this.el.show();this.hidden=false;this.focus();this.fireEvent("show",this)},focus:function(){if(!this.hidden){this.doFocus.defer(50,this)}},doFocus:function(){if(!this.hidden){this.focusEl.focus()}},hide:function(A){if(this.el&&this.isVisible()){this.fireEvent("beforehide",this);if(this.activeItem){this.activeItem.deactivate();this.activeItem=null}this.el.hide();this.hidden=true;this.fireEvent("hide",this)}if(A===true&&this.parentMenu){this.parentMenu.hide(true)}},add:function(){var B=arguments,A=B.length,E;for(var C=0;C<A;C++){var D=B[C];if(D.render){E=this.addItem(D)}else{if(typeof D=="string"){if(D=="separator"||D=="-"){E=this.addSeparator()}else{E=this.addText(D)}}else{if(D.tagName||D.el){E=this.addElement(D)}else{if(typeof D=="object"){E=this.addMenuItem(D)}}}}}return E},getEl:function(){if(!this.el){this.render()}return this.el},addSeparator:function(){return this.addItem(new Ext.menu.Separator())},addElement:function(A){return this.addItem(new Ext.menu.BaseItem(A))},addItem:function(B){this.items.add(B);if(this.ul){var A=document.createElement("li");A.className="x-menu-list-item";this.ul.dom.appendChild(A);B.render(A,this);this.delayAutoWidth()}return B},addMenuItem:function(A){if(!(A instanceof Ext.menu.Item)){if(typeof A.checked=="boolean"){A=new Ext.menu.CheckItem(A)}else{A=new Ext.menu.Item(A)}}return this.addItem(A)},addText:function(A){return this.addItem(new Ext.menu.TextItem(A))},insert:function(B,C){this.items.insert(B,C);if(this.ul){var A=document.createElement("li");A.className="x-menu-list-item";this.ul.dom.insertBefore(A,this.ul.dom.childNodes[B]);C.render(A,this);this.delayAutoWidth()}return C},remove:function(A){this.items.removeKey(A.id);A.destroy()},removeAll:function(){var A;while(A=this.items.first()){this.remove(A)}}});Ext.menu.MenuNav=function(A){Ext.menu.MenuNav.superclass.constructor.call(this,A.el);this.scope=this.menu=A};Ext.extend(Ext.menu.MenuNav,Ext.KeyNav,{doRelay:function(C,B){var A=C.getKey();if(!this.menu.activeItem&&C.isNavKeyPress()&&A!=C.SPACE&&A!=C.RETURN){this.menu.tryActivate(0,1);return false}return B.call(this.scope||this,C,this.menu)},up:function(B,A){if(!A.tryActivate(A.items.indexOf(A.activeItem)-1,-1)){A.tryActivate(A.items.length-1,-1)}},down:function(B,A){if(!A.tryActivate(A.items.indexOf(A.activeItem)+1,1)){A.tryActivate(0,1)}},right:function(B,A){if(A.activeItem){A.activeItem.expandMenu(true)}},left:function(B,A){A.hide();if(A.parentMenu&&A.parentMenu.activeItem){A.parentMenu.activeItem.activate()}},enter:function(B,A){if(A.activeItem){B.stopPropagation();A.activeItem.onClick(B);A.fireEvent("click",this,A.activeItem);return true}}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.menu.MenuMgr=function(){var F,D,C={},A=false,K=new Date();function M(){F={};D=new Ext.util.MixedCollection();Ext.get(document).addKeyListener(27,function(){if(D.length>0){H()}})}function H(){if(D&&D.length>0){var N=D.clone();N.each(function(O){O.hide()})}}function E(N){D.remove(N);if(D.length<1){Ext.get(document).un("mousedown",L);A=false}}function J(N){var O=D.last();K=new Date();D.add(N);if(!A){Ext.get(document).on("mousedown",L);A=true}if(N.parentMenu){N.getEl().setZIndex(parseInt(N.parentMenu.getEl().getStyle("z-index"),10)+3);N.parentMenu.activeChild=N}else{if(O&&O.isVisible()){N.getEl().setZIndex(parseInt(O.getEl().getStyle("z-index"),10)+3)}}}function B(N){if(N.activeChild){N.activeChild.hide()}if(N.autoHideTimer){clearTimeout(N.autoHideTimer);delete N.autoHideTimer}}function G(N){var O=N.parentMenu;if(!O&&!N.allowOtherMenus){H()}else{if(O&&O.activeChild){O.activeChild.hide()}}}function L(N){if(K.getElapsed()>50&&D.length>0&&!N.getTarget(".x-menu")){H()}}function I(O,R){if(R){var Q=C[O.group];for(var P=0,N=Q.length;P<N;P++){if(Q[P]!=O){Q[P].setChecked(false)}}}}return{hideAll:function(){H()},register:function(O){if(!F){M()}F[O.id]=O;O.on("beforehide",B);O.on("hide",E);O.on("beforeshow",G);O.on("show",J);var N=O.group;if(N&&O.events["checkchange"]){if(!C[N]){C[N]=[]}C[N].push(O);O.on("checkchange",onCheck)}},get:function(N){if(typeof N=="string"){return F[N]}else{if(N.events){return N}else{if(typeof N.length=="number"){return new Ext.menu.Menu({items:N})}else{return new Ext.menu.Menu(N)}}}},unregister:function(O){delete F[O.id];O.un("beforehide",B);O.un("hide",E);O.un("beforeshow",G);O.un("show",J);var N=O.group;if(N&&O.events["checkchange"]){C[N].remove(O);O.un("checkchange",onCheck)}},registerCheckable:function(N){var O=N.group;if(O){if(!C[O]){C[O]=[]}C[O].push(N);N.on("beforecheckchange",I)}},unregisterCheckable:function(N){var O=N.group;if(O){C[O].remove(N);N.un("beforecheckchange",I)}}}}();
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.menu.Separator=function(A){Ext.menu.Separator.superclass.constructor.call(this,A)};Ext.extend(Ext.menu.Separator,Ext.menu.BaseItem,{itemCls:"x-menu-sep",hideOnClick:false,onRender:function(A){var B=document.createElement("span");B.className=this.itemCls;B.innerHTML="&#160;";this.el=B;A.addClass("x-menu-sep-li");Ext.menu.Separator.superclass.onRender.apply(this,arguments)}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.menu.TextItem=function(A){this.text=A;Ext.menu.TextItem.superclass.constructor.call(this)};Ext.extend(Ext.menu.TextItem,Ext.menu.BaseItem,{hideOnClick:false,itemCls:"x-menu-text",onRender:function(){var A=document.createElement("span");A.className=this.itemCls;A.innerHTML=this.text;this.el=A;Ext.menu.TextItem.superclass.onRender.apply(this,arguments)}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.tree.AsyncTreeNode=function(A){this.loaded=false;this.loading=false;Ext.tree.AsyncTreeNode.superclass.constructor.apply(this,arguments);this.addEvents({"beforeload":true,"load":true})};Ext.extend(Ext.tree.AsyncTreeNode,Ext.tree.TreeNode,{expand:function(B,D,F){if(this.loading){var E;var C=function(){if(!this.loading){clearInterval(E);this.expand(B,D,F)}}.createDelegate(this);E=setInterval(C,200);return }if(!this.loaded){if(this.fireEvent("beforeload",this)===false){return }this.loading=true;this.ui.beforeLoad(this);var A=this.loader||this.attributes.loader||this.getOwnerTree().getLoader();if(A){A.load(this,this.loadComplete.createDelegate(this,[B,D,F]));return }}Ext.tree.AsyncTreeNode.superclass.expand.call(this,B,D,F)},isLoading:function(){return this.loading},loadComplete:function(A,B,C){this.loading=false;this.loaded=true;this.ui.afterLoad(this);this.fireEvent("load",this);this.expand(A,B,C)},isLoaded:function(){return this.loaded},hasChildNodes:function(){if(!this.isLeaf()&&!this.loaded){return true}else{return Ext.tree.AsyncTreeNode.superclass.hasChildNodes.call(this)}},reload:function(A){this.collapse(false,false);while(this.firstChild){this.removeChild(this.firstChild)}this.childrenRendered=false;this.loaded=false;if(this.isHiddenRoot()){this.expanded=false}this.expand(false,false,A)}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
if(Ext.dd.DragZone){Ext.tree.TreeDragZone=function(A,B){Ext.tree.TreeDragZone.superclass.constructor.call(this,A.getTreeEl(),B);this.tree=A};Ext.extend(Ext.tree.TreeDragZone,Ext.dd.DragZone,{ddGroup:"TreeDD",onBeforeDrag:function(A,B){var C=A.node;return C&&C.draggable&&!C.disabled},onInitDrag:function(B){var A=this.dragData;this.tree.getSelectionModel().select(A.node);this.proxy.update("");A.node.ui.appendDDGhost(this.proxy.ghost.dom);this.tree.fireEvent("startdrag",this.tree,A.node,B)},getRepairXY:function(B,A){return A.node.ui.getDDRepairXY()},onEndDrag:function(A,B){this.tree.fireEvent("enddrag",this.tree,A.node,B)},onValidDrop:function(A,B,C){this.tree.fireEvent("dragdrop",this.tree,this.dragData.node,A,B);this.hideProxy()},beforeInvalidDrop:function(A,C){var B=this.tree.getSelectionModel();B.clearSelections();B.select(this.dragData.node)}})};
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
if(Ext.dd.DropZone){Ext.tree.TreeDropZone=function(A,B){this.allowParentInsert=false;this.allowContainerDrop=false;this.appendOnly=false;Ext.tree.TreeDropZone.superclass.constructor.call(this,A.innerCt,B);this.tree=A;this.lastInsertClass="x-tree-no-status";this.dragOverData={}};Ext.extend(Ext.tree.TreeDropZone,Ext.dd.DropZone,{ddGroup:"TreeDD",expandDelay:1000,expandNode:function(A){if(A.hasChildNodes()&&!A.isExpanded()){A.expand(false,null,this.triggerCacheRefresh.createDelegate(this))}},queueExpand:function(A){this.expandProcId=this.expandNode.defer(this.expandDelay,this,[A])},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId);this.expandProcId=false}},isValidDropPoint:function(A,I,G,D,C){if(!A||!C){return false}var E=A.node;var F=C.node;if(!(E&&E.isTarget&&I)){return false}if(I=="append"&&E.allowChildren===false){return false}if((I=="above"||I=="below")&&(E.parentNode&&E.parentNode.allowChildren===false)){return false}if(F&&(E==F||F.contains(E))){return false}var B=this.dragOverData;B.tree=this.tree;B.target=E;B.data=C;B.point=I;B.source=G;B.rawEvent=D;B.dropNode=F;B.cancel=false;var H=this.tree.fireEvent("nodedragover",B);return B.cancel===false&&H!==false},getDropPoint:function(E,D,I){var J=D.node;if(J.isRoot){return J.allowChildren!==false?"append":false}var B=D.ddel;var K=Ext.lib.Dom.getY(B),G=K+B.offsetHeight;var F=Ext.lib.Event.getPageY(E);var H=J.allowChildren===false||J.isLeaf();if(this.appendOnly||J.parentNode.allowChildren===false){return H?false:"append"}var C=false;if(!this.allowParentInsert){C=J.hasChildNodes()&&J.isExpanded()}var A=(G-K)/(H?2:3);if(F>=K&&F<(K+A)){return"above"}else{if(!C&&(H||F>=G-A&&F<=G)){return"below"}else{return"append"}}},onNodeEnter:function(D,A,C,B){this.cancelExpand()},onNodeOver:function(B,G,F,E){var I=this.getDropPoint(F,B,G);var C=B.node;if(!this.expandProcId&&I=="append"&&C.hasChildNodes()&&!B.node.isExpanded()){this.queueExpand(C)}else{if(I!="append"){this.cancelExpand()}}var D=this.dropNotAllowed;if(this.isValidDropPoint(B,I,G,F,E)){if(I){var A=B.ddel;var H;if(I=="above"){D=B.node.isFirst()?"x-tree-drop-ok-above":"x-tree-drop-ok-between";H="x-tree-drag-insert-above"}else{if(I=="below"){D=B.node.isLast()?"x-tree-drop-ok-below":"x-tree-drop-ok-between";H="x-tree-drag-insert-below"}else{D="x-tree-drop-ok-append";H="x-tree-drag-append"}}if(this.lastInsertClass!=H){Ext.fly(A).replaceClass(this.lastInsertClass,H);this.lastInsertClass=H}}}return D},onNodeOut:function(D,A,C,B){this.cancelExpand();this.removeDropIndicators(D)},onNodeDrop:function(C,I,E,D){var H=this.getDropPoint(E,C,I);var F=C.node;F.ui.startDrop();if(!this.isValidDropPoint(C,H,I,E,D)){F.ui.endDrop();return false}var G=D.node||(I.getTreeNode?I.getTreeNode(D,F,H,E):null);var B={tree:this.tree,target:F,data:D,point:H,source:I,rawEvent:E,dropNode:G,cancel:!G};var A=this.tree.fireEvent("beforenodedrop",B);if(A===false||B.cancel===true||!B.dropNode){F.ui.endDrop();return false}F=B.target;if(H=="append"&&!F.isExpanded()){F.expand(false,null,function(){this.completeDrop(B)}.createDelegate(this))}else{this.completeDrop(B)}return true},completeDrop:function(G){var D=G.dropNode,E=G.point,C=G.target;if(!(D instanceof Array)){D=[D]}var F;for(var B=0,A=D.length;B<A;B++){F=D[B];if(E=="above"){C.parentNode.insertBefore(F,C)}else{if(E=="below"){C.parentNode.insertBefore(F,C.nextSibling)}else{C.appendChild(F)}}}F.ui.focus();if(this.tree.hlDrop){F.ui.highlight()}C.ui.endDrop();this.tree.fireEvent("nodedrop",G)},afterNodeMoved:function(A,C,E,D,B){if(this.tree.hlDrop){B.ui.focus();B.ui.highlight()}this.tree.fireEvent("nodedrop",this.tree,D,C,A,E)},getTree:function(){return this.tree},removeDropIndicators:function(B){if(B&&B.ddel){var A=B.ddel;Ext.fly(A).removeClass(["x-tree-drag-insert-above","x-tree-drag-insert-below","x-tree-drag-append"]);this.lastInsertClass="_noclass"}},beforeDragDrop:function(B,A,C){this.cancelExpand();return true},afterRepair:function(A){if(A&&Ext.enableFx){A.node.ui.highlight()}this.hideProxy()}})};
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.tree.TreeEditor=function(A,B){B=B||{};var C=B.events?B:new Ext.form.TextField(B);Ext.tree.TreeEditor.superclass.constructor.call(this,C);this.tree=A;A.on("beforeclick",this.beforeNodeClick,this);A.getTreeEl().on("mousedown",this.hide,this);this.on("complete",this.updateNode,this);this.on("beforestartedit",this.fitToTree,this);this.on("startedit",this.bindScroll,this,{delay:10});this.on("specialkey",this.onSpecialKey,this)};Ext.extend(Ext.tree.TreeEditor,Ext.Editor,{alignment:"l-l",autoSize:false,hideEl:false,cls:"x-small-editor x-tree-editor",shim:false,shadow:"frame",maxWidth:250,editDelay:350,fitToTree:function(B,C){var E=this.tree.getTreeEl().dom,D=C.dom;if(E.scrollLeft>D.offsetLeft){E.scrollLeft=D.offsetLeft}var A=Math.min(this.maxWidth,(E.clientWidth>20?E.clientWidth:E.offsetWidth)-Math.max(0,D.offsetLeft-E.scrollLeft)-5);this.setSize(A,"")},triggerEdit:function(A){this.completeEdit();this.editNode=A;this.startEdit(A.ui.textNode,A.text)},bindScroll:function(){this.tree.getTreeEl().on("scroll",this.cancelEdit,this)},beforeNodeClick:function(B,C){var A=(this.lastClick?this.lastClick.getElapsed():0);this.lastClick=new Date();if(A>this.editDelay&&this.tree.getSelectionModel().isSelected(B)){C.stopEvent();this.triggerEdit(B);return false}},updateNode:function(A,B){this.tree.getTreeEl().un("scroll",this.cancelEdit,this);this.editNode.setText(B)},onHide:function(){Ext.tree.TreeEditor.superclass.onHide.call(this);if(this.editNode){this.editNode.ui.focus()}},onSpecialKey:function(C,B){var A=B.getKey();if(A==B.ESC){B.stopEvent();this.cancelEdit()}else{if(A==B.ENTER&&!B.hasModifier()){B.stopEvent();this.completeEdit()}}}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.tree.TreeFilter=function(A,B){this.tree=A;this.filtered={};Ext.apply(this,B)};Ext.tree.TreeFilter.prototype={clearBlank:false,reverse:false,autoClear:false,remove:false,filter:function(D,A,B){A=A||"text";var C;if(typeof D=="string"){var E=D.length;if(E==0&&this.clearBlank){this.clear();return }D=D.toLowerCase();C=function(F){return F.attributes[A].substr(0,E).toLowerCase()==D}}else{if(D.exec){C=function(F){return D.test(F.attributes[A])}}else{throw"Illegal filter type, must be string or regex"}}this.filterBy(C,null,B)},filterBy:function(D,C,B){B=B||this.tree.root;if(this.autoClear){this.clear()}var A=this.filtered,H=this.reverse;var E=function(J){if(J==B){return true}if(A[J.id]){return false}var I=D.call(C||J,J);if(!I||H){A[J.id]=J;J.ui.hide();return false}return true};B.cascade(E);if(this.remove){for(var G in A){if(typeof G!="function"){var F=A[G];if(F&&F.parentNode){F.parentNode.removeChild(F)}}}}},clear:function(){var B=this.tree;var A=this.filtered;for(var D in A){if(typeof D!="function"){var C=A[D];if(C){C.ui.show()}}}this.filtered={}}};
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.tree.TreeLoader=function(A){this.baseParams={};this.requestMethod="POST";Ext.apply(this,A);this.addEvents({"beforeload":true,"load":true,"loadexception":true});Ext.tree.TreeLoader.superclass.constructor.call(this)};Ext.extend(Ext.tree.TreeLoader,Ext.util.Observable,{uiProviders:{},clearOnLoad:true,load:function(D,E){if(this.clearOnLoad){while(D.firstChild){D.removeChild(D.firstChild)}}if(D.attributes.children){var C=D.attributes.children;for(var B=0,A=C.length;B<A;B++){D.appendChild(this.createNode(C[B]))}if(typeof E=="function"){E()}}else{if(this.dataUrl){this.requestData(D,E)}}},getParams:function(D){var A=[],C=this.baseParams;for(var B in C){if(typeof C[B]!="function"){A.push(encodeURIComponent(B),"=",encodeURIComponent(C[B]),"&")}}A.push("node=",encodeURIComponent(D.id));return A.join("")},requestData:function(A,B){if(this.fireEvent("beforeload",this,A,B)!==false){this.transId=Ext.Ajax.request({method:this.requestMethod,url:this.dataUrl||this.url,success:this.handleResponse,failure:this.handleFailure,scope:this,argument:{callback:B,node:A},params:this.getParams(A)})}else{if(typeof B=="function"){B()}}},isLoading:function(){return this.transId?true:false},abort:function(){if(this.isLoading()){Ext.Ajax.abort(this.transId)}},createNode:function(attr){if(this.baseAttrs){Ext.applyIf(attr,this.baseAttrs)}if(this.applyLoader!==false){attr.loader=this}if(typeof attr.uiProvider=="string"){attr.uiProvider=this.uiProviders[attr.uiProvider]||eval(attr.uiProvider)}return(attr.leaf?new Ext.tree.TreeNode(attr):new Ext.tree.AsyncTreeNode(attr))},processResponse:function(response,node,callback){var json=response.responseText;try{var o=eval("("+json+")");for(var i=0,len=o.length;i<len;i++){var n=this.createNode(o[i]);if(n){node.appendChild(n)}}if(typeof callback=="function"){callback(this,node)}}catch(e){this.handleFailure(response)}},handleResponse:function(B){this.transId=false;var A=B.argument;this.processResponse(B,A.node,A.callback);this.fireEvent("load",this,A.node,B)},handleFailure:function(B){this.transId=false;var A=B.argument;this.fireEvent("loadexception",this,A.node,B);if(typeof A.callback=="function"){A.callback(this,A.node)}}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.tree.TreeNode=function(A){A=A||{};if(typeof A=="string"){A={text:A}}this.childrenRendered=false;this.rendered=false;Ext.tree.TreeNode.superclass.constructor.call(this,A);this.expanded=A.expanded===true;this.isTarget=A.isTarget!==false;this.draggable=A.draggable!==false&&A.allowDrag!==false;this.allowChildren=A.allowChildren!==false&&A.allowDrop!==false;this.text=A.text;this.disabled=A.disabled===true;this.addEvents({"textchange":true,"beforeexpand":true,"beforecollapse":true,"expand":true,"disabledchange":true,"collapse":true,"beforeclick":true,"checkchange":true,"click":true,"dblclick":true,"contextmenu":true,"beforechildrenrendered":true});var B=this.attributes.uiProvider||Ext.tree.TreeNodeUI;this.ui=new B(this)};Ext.extend(Ext.tree.TreeNode,Ext.data.Node,{preventHScroll:true,isExpanded:function(){return this.expanded},getUI:function(){return this.ui},setFirstChild:function(A){var B=this.firstChild;Ext.tree.TreeNode.superclass.setFirstChild.call(this,A);if(this.childrenRendered&&B&&A!=B){B.renderIndent(true,true)}if(this.rendered){this.renderIndent(true,true)}},setLastChild:function(B){var A=this.lastChild;Ext.tree.TreeNode.superclass.setLastChild.call(this,B);if(this.childrenRendered&&A&&B!=A){A.renderIndent(true,true)}if(this.rendered){this.renderIndent(true,true)}},appendChild:function(){var A=Ext.tree.TreeNode.superclass.appendChild.apply(this,arguments);if(A&&this.childrenRendered){A.render()}this.ui.updateExpandIcon();return A},removeChild:function(A){this.ownerTree.getSelectionModel().unselect(A);Ext.tree.TreeNode.superclass.removeChild.apply(this,arguments);if(this.childrenRendered){A.ui.remove()}if(this.childNodes.length<1){this.collapse(false,false)}else{this.ui.updateExpandIcon()}if(!this.firstChild){this.childrenRendered=false}return A},insertBefore:function(C,A){var B=Ext.tree.TreeNode.superclass.insertBefore.apply(this,arguments);if(B&&A&&this.childrenRendered){C.render()}this.ui.updateExpandIcon();return B},setText:function(B){var A=this.text;this.text=B;this.attributes.text=B;if(this.rendered){this.ui.onTextChange(this,B,A)}this.fireEvent("textchange",this,B,A)},select:function(){this.getOwnerTree().getSelectionModel().select(this)},unselect:function(){this.getOwnerTree().getSelectionModel().unselect(this)},isSelected:function(){return this.getOwnerTree().getSelectionModel().isSelected(this)},expand:function(A,B,C){if(!this.expanded){if(this.fireEvent("beforeexpand",this,A,B)===false){return }if(!this.childrenRendered){this.renderChildren()}this.expanded=true;if(!this.isHiddenRoot()&&(this.getOwnerTree().animate&&B!==false)||B){this.ui.animExpand(function(){this.fireEvent("expand",this);if(typeof C=="function"){C(this)}if(A===true){this.expandChildNodes(true)}}.createDelegate(this));return }else{this.ui.expand();this.fireEvent("expand",this);if(typeof C=="function"){C(this)}}}else{if(typeof C=="function"){C(this)}}if(A===true){this.expandChildNodes(true)}},isHiddenRoot:function(){return this.isRoot&&!this.getOwnerTree().rootVisible},collapse:function(B,E){if(this.expanded&&!this.isHiddenRoot()){if(this.fireEvent("beforecollapse",this,B,E)===false){return }this.expanded=false;if((this.getOwnerTree().animate&&E!==false)||E){this.ui.animCollapse(function(){this.fireEvent("collapse",this);if(B===true){this.collapseChildNodes(true)}}.createDelegate(this));return }else{this.ui.collapse();this.fireEvent("collapse",this)}}if(B===true){var D=this.childNodes;for(var C=0,A=D.length;C<A;C++){D[C].collapse(true,false)}}},delayedExpand:function(A){if(!this.expandProcId){this.expandProcId=this.expand.defer(A,this)}},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId)}this.expandProcId=false},toggle:function(){if(this.expanded){this.collapse()}else{this.expand()}},ensureVisible:function(B){var A=this.getOwnerTree();A.expandPath(this.parentNode.getPath(),false,function(){A.getTreeEl().scrollChildIntoView(this.ui.anchor);Ext.callback(B)}.createDelegate(this))},expandChildNodes:function(B){var D=this.childNodes;for(var C=0,A=D.length;C<A;C++){D[C].expand(B)}},collapseChildNodes:function(B){var D=this.childNodes;for(var C=0,A=D.length;C<A;C++){D[C].collapse(B)}},disable:function(){this.disabled=true;this.unselect();if(this.rendered&&this.ui.onDisableChange){this.ui.onDisableChange(this,true)}this.fireEvent("disabledchange",this,true)},enable:function(){this.disabled=false;if(this.rendered&&this.ui.onDisableChange){this.ui.onDisableChange(this,false)}this.fireEvent("disabledchange",this,false)},renderChildren:function(B){if(B!==false){this.fireEvent("beforechildrenrendered",this)}var D=this.childNodes;for(var C=0,A=D.length;C<A;C++){D[C].render(true)}this.childrenRendered=true},sort:function(E,D){Ext.tree.TreeNode.superclass.sort.apply(this,arguments);if(this.childrenRendered){var C=this.childNodes;for(var B=0,A=C.length;B<A;B++){C[B].render(true)}}},render:function(A){this.ui.render(A);if(!this.rendered){this.rendered=true;if(this.expanded){this.expanded=false;this.expand(false,false)}}},renderIndent:function(B,E){if(E){this.ui.childIndent=null}this.ui.renderIndent();if(B===true&&this.childrenRendered){var D=this.childNodes;for(var C=0,A=D.length;C<A;C++){D[C].renderIndent(true,E)}}}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.tree.TreeNodeUI=function(A){this.node=A;this.rendered=false;this.animating=false;this.emptyIcon=Ext.BLANK_IMAGE_URL};Ext.tree.TreeNodeUI.prototype={removeChild:function(A){if(this.rendered){this.ctNode.removeChild(A.ui.getEl())}},beforeLoad:function(){this.addClass("x-tree-node-loading")},afterLoad:function(){this.removeClass("x-tree-node-loading")},onTextChange:function(B,C,A){if(this.rendered){this.textNode.innerHTML=C}},onDisableChange:function(A,B){this.disabled=B;if(B){this.addClass("x-tree-node-disabled")}else{this.removeClass("x-tree-node-disabled")}},onSelectedChange:function(A){if(A){this.focus();this.addClass("x-tree-selected")}else{this.removeClass("x-tree-selected")}},onMove:function(A,G,E,F,D,B){this.childIndent=null;if(this.rendered){var H=F.ui.getContainer();if(!H){this.holder=document.createElement("div");this.holder.appendChild(this.wrap);return }var C=B?B.ui.getEl():null;if(C){H.insertBefore(this.wrap,C)}else{H.appendChild(this.wrap)}this.node.renderIndent(true)}},addClass:function(A){if(this.elNode){Ext.fly(this.elNode).addClass(A)}},removeClass:function(A){if(this.elNode){Ext.fly(this.elNode).removeClass(A)}},remove:function(){if(this.rendered){this.holder=document.createElement("div");this.holder.appendChild(this.wrap)}},fireEvent:function(){return this.node.fireEvent.apply(this.node,arguments)},initEvents:function(){this.node.on("move",this.onMove,this);var G=Ext.EventManager;var B=this.anchor;var D=Ext.fly(B,"_treeui");if(Ext.isOpera){D.setStyle("text-decoration","none")}D.on("click",this.onClick,this);D.on("dblclick",this.onDblClick,this);if(this.checkbox){Ext.EventManager.on(this.checkbox,Ext.isIE?"click":"change",this.onCheckChange,this)}D.on("contextmenu",this.onContextMenu,this);var C=Ext.fly(this.iconNode);C.on("click",this.onClick,this);C.on("dblclick",this.onDblClick,this);C.on("contextmenu",this.onContextMenu,this);G.on(this.ecNode,"click",this.ecClick,this,true);if(this.node.disabled){this.addClass("x-tree-node-disabled")}if(this.node.hidden){this.addClass("x-tree-node-disabled")}var F=this.node.getOwnerTree();var A=F.enableDD||F.enableDrag||F.enableDrop;if(A&&(!this.node.isRoot||F.rootVisible)){Ext.dd.Registry.register(this.elNode,{node:this.node,handles:this.getDDHandles(),isHandle:false})}},getDDHandles:function(){return[this.iconNode,this.textNode]},hide:function(){if(this.rendered){this.wrap.style.display="none"}},show:function(){if(this.rendered){this.wrap.style.display=""}},onContextMenu:function(A){if(this.node.hasListener("contextmenu")||this.node.getOwnerTree().hasListener("contextmenu")){A.preventDefault();this.focus();this.fireEvent("contextmenu",this.node,A)}},onClick:function(A){if(this.dropping){A.stopEvent();return }if(this.fireEvent("beforeclick",this.node,A)!==false){if(!this.disabled&&this.node.attributes.href){this.fireEvent("click",this.node,A);return }A.preventDefault();if(this.disabled){return }if(this.node.attributes.singleClickExpand&&!this.animating&&this.node.hasChildNodes()){this.node.toggle()}this.fireEvent("click",this.node,A)}else{A.stopEvent()}},onDblClick:function(A){A.preventDefault();if(this.disabled){return }if(this.checkbox){this.toggleCheck()}if(!this.animating&&this.node.hasChildNodes()){this.node.toggle()}this.fireEvent("dblclick",this.node,A)},onCheckChange:function(){var A=this.checkbox.checked;this.node.attributes.checked=A;this.fireEvent("checkchange",this.node,A)},ecClick:function(A){if(!this.animating&&this.node.hasChildNodes()){this.node.toggle()}},startDrop:function(){this.dropping=true},endDrop:function(){setTimeout(function(){this.dropping=false}.createDelegate(this),50)},expand:function(){this.updateExpandIcon();this.ctNode.style.display=""},focus:function(){if(!this.node.preventHScroll){try{this.anchor.focus()}catch(C){}}else{if(!Ext.isIE){try{var B=this.node.getOwnerTree().getTreeEl().dom;var A=B.scrollLeft;this.anchor.focus();B.scrollLeft=A}catch(C){}}}},toggleCheck:function(B){var A=this.checkbox;if(A){A.checked=(B===undefined?!A.checked:B)}},blur:function(){try{this.anchor.blur()}catch(A){}},animExpand:function(B){var A=Ext.get(this.ctNode);A.stopFx();if(!this.node.hasChildNodes()){this.updateExpandIcon();this.ctNode.style.display="";Ext.callback(B);return }this.animating=true;this.updateExpandIcon();A.slideIn("t",{callback:function(){this.animating=false;Ext.callback(B)},scope:this,duration:this.node.ownerTree.duration||0.25})},highlight:function(){var A=this.node.getOwnerTree();Ext.fly(this.wrap).highlight(A.hlColor||"C3DAF9",{endColor:A.hlBaseColor})},collapse:function(){this.updateExpandIcon();this.ctNode.style.display="none"},animCollapse:function(B){var A=Ext.get(this.ctNode);A.enableDisplayMode("block");A.stopFx();this.animating=true;this.updateExpandIcon();A.slideOut("t",{callback:function(){this.animating=false;Ext.callback(B)},scope:this,duration:this.node.ownerTree.duration||0.25})},getContainer:function(){return this.ctNode},getEl:function(){return this.wrap},appendDDGhost:function(A){A.appendChild(this.elNode.cloneNode(true))},getDDRepairXY:function(){return Ext.lib.Dom.getXY(this.iconNode)},onRender:function(){this.render()},render:function(B){var D=this.node,A=D.attributes;var C=D.parentNode?D.parentNode.ui.getContainer():D.ownerTree.innerCt.dom;if(!this.rendered){this.rendered=true;this.renderElements(D,A,C,B);if(A.qtip){if(this.textNode.setAttributeNS){this.textNode.setAttributeNS("ext","qtip",A.qtip);if(A.qtipTitle){this.textNode.setAttributeNS("ext","qtitle",A.qtipTitle)}}else{this.textNode.setAttribute("ext:qtip",A.qtip);if(A.qtipTitle){this.textNode.setAttribute("ext:qtitle",A.qtipTitle)}}}else{if(A.qtipCfg){A.qtipCfg.target=Ext.id(this.textNode);Ext.QuickTips.register(A.qtipCfg)}}this.initEvents();if(!this.node.expanded){this.updateExpandIcon()}}else{if(B===true){C.appendChild(this.wrap)}}},renderElements:function(C,H,G,I){this.indentMarkup=C.parentNode?C.parentNode.ui.getChildIndent():"";var D=typeof H.checked=="boolean";var A=H.href?H.href:Ext.isGecko?"":"#";var B=["<li class=\"x-tree-node\"><div class=\"x-tree-node-el ",H.cls,"\">","<span class=\"x-tree-node-indent\">",this.indentMarkup,"</span>","<img src=\"",this.emptyIcon,"\" class=\"x-tree-ec-icon\" />","<img src=\"",H.icon||this.emptyIcon,"\" class=\"x-tree-node-icon",(H.icon?" x-tree-node-inline-icon":""),(H.iconCls?" "+H.iconCls:""),"\" unselectable=\"on\" />",D?("<input class=\"x-tree-node-cb\" type=\"checkbox\" "+(H.checked?"checked=\"checked\" />":" />")):"","<a hidefocus=\"on\" href=\"",A,"\" tabIndex=\"1\" ",H.hrefTarget?" target=\""+H.hrefTarget+"\"":"","><span unselectable=\"on\">",C.text,"</span></a></div>","<ul class=\"x-tree-node-ct\" style=\"display:none;\"></ul>","</li>"];if(I!==true&&C.nextSibling&&C.nextSibling.ui.getEl()){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",C.nextSibling.ui.getEl(),B.join(""))}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",G,B.join(""))}this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];var F=this.elNode.childNodes;this.indentNode=F[0];this.ecNode=F[1];this.iconNode=F[2];var E=3;if(D){this.checkbox=F[3];E++}this.anchor=F[E];this.textNode=F[E].firstChild},getAnchor:function(){return this.anchor},getTextEl:function(){return this.textNode},getIconEl:function(){return this.iconNode},isChecked:function(){return this.checkbox?this.checkbox.checked:false},updateExpandIcon:function(){if(this.rendered){var F=this.node,D,C;var A=F.isLast()?"x-tree-elbow-end":"x-tree-elbow";var E=F.hasChildNodes();if(E){if(F.expanded){A+="-minus";D="x-tree-node-collapsed";C="x-tree-node-expanded"}else{A+="-plus";D="x-tree-node-expanded";C="x-tree-node-collapsed"}if(this.wasLeaf){this.removeClass("x-tree-node-leaf");this.wasLeaf=false}if(this.c1!=D||this.c2!=C){Ext.fly(this.elNode).replaceClass(D,C);this.c1=D;this.c2=C}}else{if(!this.wasLeaf){Ext.fly(this.elNode).replaceClass("x-tree-node-expanded","x-tree-node-leaf");delete this.c1;delete this.c2;this.wasLeaf=true}}var B="x-tree-ec-icon "+A;if(this.ecc!=B){this.ecNode.className=B;this.ecc=B}}},getChildIndent:function(){if(!this.childIndent){var A=[];var B=this.node;while(B){if(!B.isRoot||(B.isRoot&&B.ownerTree.rootVisible)){if(!B.isLast()){A.unshift("<img src=\""+this.emptyIcon+"\" class=\"x-tree-elbow-line\" />")}else{A.unshift("<img src=\""+this.emptyIcon+"\" class=\"x-tree-icon\" />")}}B=B.parentNode}this.childIndent=A.join("")}return this.childIndent},renderIndent:function(){if(this.rendered){var A="";var B=this.node.parentNode;if(B){A=B.ui.getChildIndent()}if(this.indentMarkup!=A){this.indentNode.innerHTML=A;this.indentMarkup=A}this.updateExpandIcon()}}};Ext.tree.RootTreeNodeUI=function(){Ext.tree.RootTreeNodeUI.superclass.constructor.apply(this,arguments)};Ext.extend(Ext.tree.RootTreeNodeUI,Ext.tree.TreeNodeUI,{render:function(){if(!this.rendered){var A=this.node.ownerTree.innerCt.dom;this.node.expanded=true;A.innerHTML="<div class=\"x-tree-root-node\"></div>";this.wrap=this.ctNode=A.firstChild}},collapse:function(){},expand:function(){}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.tree.TreePanel=function(B,A){Ext.apply(this,A);Ext.tree.TreePanel.superclass.constructor.call(this);this.el=Ext.get(B);this.el.addClass("x-tree");this.id=this.el.id;this.addEvents({"beforeload":true,"load":true,"textchange":true,"beforeexpand":true,"beforecollapse":true,"expand":true,"disabledchange":true,"collapse":true,"beforeclick":true,"checkchange":true,"click":true,"dblclick":true,"contextmenu":true,"beforechildrenrendered":true,"startdrag":true,"enddrag":true,"dragdrop":true,"beforenodedrop":true,"nodedrop":true,"nodedragover":true});if(this.singleExpand){this.on("beforeexpand",this.restrictExpand,this)}};Ext.extend(Ext.tree.TreePanel,Ext.data.Tree,{rootVisible:true,animate:Ext.enableFx,lines:true,enableDD:false,hlDrop:Ext.enableFx,restrictExpand:function(A){var B=A.parentNode;if(B){if(B.expandedChild&&B.expandedChild.parentNode==B){B.expandedChild.collapse()}B.expandedChild=A}},setRootNode:function(A){Ext.tree.TreePanel.superclass.setRootNode.call(this,A);if(!this.rootVisible){A.ui=new Ext.tree.RootTreeNodeUI(A)}return A},getEl:function(){return this.el},getLoader:function(){return this.loader},expandAll:function(){this.root.expand(true)},collapseAll:function(){this.root.collapse(true)},getSelectionModel:function(){if(!this.selModel){this.selModel=new Ext.tree.DefaultSelectionModel()}return this.selModel},getChecked:function(A,B){B=B||this.root;var C=[];var D=function(){if(this.attributes.checked){C.push(!A?this:(A=="id"?this.id:this.attributes[A]))}};B.cascade(D);return C},expandPath:function(F,A,G){A=A||"id";var D=F.split(this.pathSeparator);var C=this.root;if(C.attributes[A]!=D[1]){if(G){G(false,null)}return }var B=1;var E=function(){if(++B==D.length){if(G){G(true,C)}return }var H=C.findChild(A,D[B]);if(!H){if(G){G(false,C)}return }C=H;H.expand(false,false,E)};C.expand(false,false,E)},selectPath:function(E,A,F){A=A||"id";var C=E.split(this.pathSeparator);var B=C.pop();if(C.length>0){var D=function(H,G){if(H&&G){var I=G.findChild(A,B);if(I){I.select();if(F){F(true,I)}}else{if(F){F(false,I)}}}else{if(F){F(false,I)}}};this.expandPath(C.join(this.pathSeparator),A,D)}else{this.root.select();if(F){F(true,this.root)}}},getTreeEl:function(){return this.el},render:function(){this.innerCt=this.el.createChild({tag:"ul",cls:"x-tree-root-ct "+(this.lines?"x-tree-lines":"x-tree-no-lines")});if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}if((this.enableDD||this.enableDrop)&&!this.dropZone){this.dropZone=new Ext.tree.TreeDropZone(this,this.dropConfig||{ddGroup:this.ddGroup||"TreeDD",appendOnly:this.ddAppendOnly===true})}if((this.enableDD||this.enableDrag)&&!this.dragZone){this.dragZone=new Ext.tree.TreeDragZone(this,this.dragConfig||{ddGroup:this.ddGroup||"TreeDD",scroll:this.ddScroll})}this.getSelectionModel().init(this);this.root.render();if(!this.rootVisible){this.root.renderChildren()}return this}});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.tree.DefaultSelectionModel=function(){this.selNode=null;this.addEvents({"selectionchange":true,"beforeselect":true})};Ext.extend(Ext.tree.DefaultSelectionModel,Ext.util.Observable,{init:function(A){this.tree=A;A.getTreeEl().on("keydown",this.onKeyDown,this);A.on("click",this.onNodeClick,this)},onNodeClick:function(A,B){this.select(A)},select:function(B){var A=this.selNode;if(A!=B&&this.fireEvent("beforeselect",this,B,A)!==false){if(A){A.ui.onSelectedChange(false)}this.selNode=B;B.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,B,A)}return B},unselect:function(A){if(this.selNode==A){this.clearSelections()}},clearSelections:function(){var A=this.selNode;if(A){A.ui.onSelectedChange(false);this.selNode=null;this.fireEvent("selectionchange",this,null)}return A},getSelectedNode:function(){return this.selNode},isSelected:function(A){return this.selNode==A},selectPrevious:function(){var A=this.selNode||this.lastSelNode;if(!A){return null}var C=A.previousSibling;if(C){if(!C.isExpanded()||C.childNodes.length<1){return this.select(C)}else{var B=C.lastChild;while(B&&B.isExpanded()&&B.childNodes.length>0){B=B.lastChild}return this.select(B)}}else{if(A.parentNode&&(this.tree.rootVisible||!A.parentNode.isRoot)){return this.select(A.parentNode)}}return null},selectNext:function(){var B=this.selNode||this.lastSelNode;if(!B){return null}if(B.firstChild&&B.isExpanded()){return this.select(B.firstChild)}else{if(B.nextSibling){return this.select(B.nextSibling)}else{if(B.parentNode){var A=null;B.parentNode.bubble(function(){if(this.nextSibling){A=this.getOwnerTree().selModel.select(this.nextSibling);return false}});return A}}}return null},onKeyDown:function(C){var B=this.selNode||this.lastSelNode;var D=this;if(!B){return }var A=C.getKey();switch(A){case C.DOWN:C.stopEvent();this.selectNext();break;case C.UP:C.stopEvent();this.selectPrevious();break;case C.RIGHT:C.preventDefault();if(B.hasChildNodes()){if(!B.isExpanded()){B.expand()}else{if(B.firstChild){this.select(B.firstChild,C)}}}break;case C.LEFT:C.preventDefault();if(B.hasChildNodes()&&B.isExpanded()){B.collapse()}else{if(B.parentNode&&(this.tree.rootVisible||B.parentNode!=this.tree.getRootNode())){this.select(B.parentNode,C)}}break}}});Ext.tree.MultiSelectionModel=function(){this.selNodes=[];this.selMap={};this.addEvents({"selectionchange":true})};Ext.extend(Ext.tree.MultiSelectionModel,Ext.util.Observable,{init:function(A){this.tree=A;A.getTreeEl().on("keydown",this.onKeyDown,this);A.on("click",this.onNodeClick,this)},onNodeClick:function(A,B){this.select(A,B,B.ctrlKey)},select:function(A,C,B){if(B!==true){this.clearSelections(true)}if(this.isSelected(A)){this.lastSelNode=A;return A}this.selNodes.push(A);this.selMap[A.id]=A;this.lastSelNode=A;A.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,this.selNodes);return A},unselect:function(D){if(this.selMap[D.id]){D.ui.onSelectedChange(false);var E=this.selNodes;var B=-1;if(E.indexOf){B=E.indexOf(D)}else{for(var C=0,A=E.length;C<A;C++){if(E[C]==D){B=C;break}}}if(B!=-1){this.selNodes.splice(B,1)}delete this.selMap[D.id];this.fireEvent("selectionchange",this,this.selNodes)}},clearSelections:function(B){var D=this.selNodes;if(D.length>0){for(var C=0,A=D.length;C<A;C++){D[C].ui.onSelectedChange(false)}this.selNodes=[];this.selMap={};if(B!==true){this.fireEvent("selectionchange",this,this.selNodes)}}},isSelected:function(A){return this.selMap[A.id]?true:false},getSelectedNodes:function(){return this.selNodes},onKeyDown:Ext.tree.DefaultSelectionModel.prototype.onKeyDown,selectNext:Ext.tree.DefaultSelectionModel.prototype.selectNext,selectPrevious:Ext.tree.DefaultSelectionModel.prototype.selectPrevious});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.tree.TreeSorter=function(B,C){Ext.apply(this,C);B.on("beforechildrenrendered",this.doSort,this);B.on("append",this.updateSort,this);B.on("insert",this.updateSort,this);var E=this.dir&&this.dir.toLowerCase()=="desc";var F=this.property||"text";var G=this.sortType;var A=this.folderSort;var D=this.caseSensitive===true;var H=this.leafAttr||"leaf";this.sortFn=function(J,I){if(A){if(J.attributes[H]&&!I.attributes[H]){return 1}if(!J.attributes[H]&&I.attributes[H]){return -1}}var L=G?G(J):(D?J.attributes[F]:J.attributes[F].toUpperCase());var K=G?G(I):(D?I.attributes[F]:I.attributes[F].toUpperCase());if(L<K){return E?+1:-1}else{if(L>K){return E?-1:+1}else{return 0}}}};Ext.tree.TreeSorter.prototype={doSort:function(A){A.sort(this.sortFn)},compareNodes:function(B,A){return(B.text.toUpperCase()>A.text.toUpperCase()?1:-1)},updateSort:function(A,B){if(B.childrenRendered){this.doSort.defer(1,this,[B])}}};
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
// define the action interface
Ext.form.Action = function(form, options){
this.form = form;
this.options = options || {};
};
Ext.form.Action.CLIENT_INVALID = 'client';
Ext.form.Action.SERVER_INVALID = 'server';
Ext.form.Action.CONNECT_FAILURE = 'connect';
Ext.form.Action.LOAD_FAILURE = 'load';
Ext.form.Action.prototype = {
type : 'default',
failureType : undefined,
response : undefined,
result : undefined,
// interface method
run : function(options){
},
// interface method
success : function(response){
},
// interface method
handleResponse : function(response){
},
// default connection failure
failure : function(response){
this.response = response;
this.failureType = Ext.form.Action.CONNECT_FAILURE;
this.form.afterAction(this, false);
},
processResponse : function(response){
this.response = response;
if(!response.responseText){
return true;
}
this.result = this.handleResponse(response);
return this.result;
},
// utility functions used internally
getUrl : function(appendParams){
var url = this.options.url || this.form.url || this.form.el.dom.action;
if(appendParams){
var p = this.getParams();
if(p){
url += (url.indexOf('?') != -1 ? '&' : '?') + p;
}
}
return url;
},
getMethod : function(){
return (this.options.method || this.form.method || this.form.el.dom.method || 'POST').toUpperCase();
},
getParams : function(){
var bp = this.form.baseParams;
var p = this.options.params;
if(p){
if(typeof p == "object"){
p = Ext.urlEncode(Ext.applyIf(p, bp));
}else if(typeof p == 'string' && bp){
p += '&' + Ext.urlEncode(bp);
}
}else if(bp){
p = Ext.urlEncode(bp);
}
return p;
},
createCallback : function(){
return {
success: this.success,
failure: this.failure,
scope: this,
timeout: (this.form.timeout*1000),
upload: this.form.fileUpload ? this.success : undefined
};
}
};
Ext.form.Action.Submit = function(form, options){
Ext.form.Action.Submit.superclass.constructor.call(this, form, options);
};
Ext.extend(Ext.form.Action.Submit, Ext.form.Action, {
type : 'submit',
run : function(){
var o = this.options;
var method = this.getMethod();
var isPost = method == 'POST';
if(o.clientValidation === false || this.form.isValid()){
Ext.Ajax.request(Ext.apply(this.createCallback(), {
form:this.form.el.dom,
url:this.getUrl(!isPost),
method: method,
params:isPost ? this.getParams() : null,
isUpload: this.form.fileUpload
}));
}else if (o.clientValidation !== false){ // client validation failed
this.failureType = Ext.form.Action.CLIENT_INVALID;
this.form.afterAction(this, false);
}
},
success : function(response){
var result = this.processResponse(response);
if(result === true || result.success){
this.form.afterAction(this, true);
return;
}
if(result.errors){
this.form.markInvalid(result.errors);
this.failureType = Ext.form.Action.SERVER_INVALID;
}
this.form.afterAction(this, false);
},
handleResponse : function(response){
if(this.form.errorReader){
var rs = this.form.errorReader.read(response);
var errors = [];
if(rs.records){
for(var i = 0, len = rs.records.length; i < len; i++) {
var r = rs.records[i];
errors[i] = r.data;
}
}
if(errors.length < 1){
errors = null;
}
return {
success : rs.success,
errors : errors
};
}
return Ext.decode(response.responseText);
}
});
Ext.form.Action.Load = function(form, options){
Ext.form.Action.Load.superclass.constructor.call(this, form, options);
this.reader = this.form.reader;
};
Ext.extend(Ext.form.Action.Load, Ext.form.Action, {
type : 'load',
run : function(){
Ext.Ajax.request(Ext.apply(
this.createCallback(), {
method:this.getMethod(),
url:this.getUrl(false),
params:this.getParams()
}));
},
success : function(response){
var result = this.processResponse(response);
if(result === true || !result.success || !result.data){
this.failureType = Ext.form.Action.LOAD_FAILURE;
this.form.afterAction(this, false);
return;
}
this.form.clearInvalid();
this.form.setValues(result.data);
this.form.afterAction(this, true);
},
handleResponse : function(response){
if(this.form.reader){
var rs = this.form.reader.read(response);
var data = rs.records && rs.records[0] ? rs.records[0].data : null;
return {
success : rs.success,
data : data
};
}
return Ext.decode(response.responseText);
}
});
Ext.form.Action.ACTION_TYPES = {
'load' : Ext.form.Action.Load,
'submit' : Ext.form.Action.Submit
};
This diff is collapsed.
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
/**
* @class Ext.form.Checkbox
* @extends Ext.form.Field
* Single checkbox field. Can be used as a direct replacement for traditional checkbox fields.
* @constructor
* Creates a new Checkbox
* @param {Object} config Configuration options
*/
Ext.form.Checkbox = function(config){
Ext.form.Checkbox.superclass.constructor.call(this, config);
this.addEvents({
/**
* @event check
* Fires when the checkbox is checked or unchecked.
* @param {Ext.form.Checkbox} this This checkbox
* @param {Boolean} checked The new checked value
*/
check : true
});
};
Ext.extend(Ext.form.Checkbox, Ext.form.Field, {
/**
* @cfg {String} focusClass The CSS class to use when the checkbox receives focus (defaults to undefined)
*/
focusClass : undefined,
/**
* @cfg {String} fieldClass The default CSS class for the checkbox (defaults to "x-form-field")
*/
fieldClass: "x-form-field",
/**
* @cfg {Boolean} checked True if the the checkbox should render already checked (defaults to false)
*/
checked: false,
/**
* @cfg {String/Object} autoCreate A DomHelper element spec, or true for a default element spec (defaults to
* {tag: "input", type: "checkbox", autocomplete: "off"})
*/
defaultAutoCreate : { tag: "input", type: 'checkbox', autocomplete: "off"},
/**
* @cfg {String} boxLabel The text that appears beside the checkbox
*/
boxLabel : undefined,
/**
* @cfg {String} inputValue The value that should go into the generated input element's value attribute
*/
//
onResize : function(){
Ext.form.Checkbox.superclass.onResize.apply(this, arguments);
if(!this.boxLabel){
this.el.alignTo(this.wrap, 'c-c');
}
},
initEvents : function(){
Ext.form.Checkbox.superclass.initEvents.call(this);
this.el.on("click", this.onClick, this);
this.el.on("change", this.onClick, this);
},
getResizeEl : function(){
return this.wrap;
},
getPositionEl : function(){
return this.wrap;
},
// private
onRender : function(ct, position){
Ext.form.Checkbox.superclass.onRender.call(this, ct, position);
if(this.inputValue !== undefined){
this.el.dom.value = this.inputValue;
}
this.wrap = this.el.wrap({cls: "x-form-check-wrap"});
if(this.boxLabel){
this.wrap.createChild({tag: 'label', htmlFor: this.el.id, cls: 'x-form-cb-label', html: this.boxLabel});
}
if(this.checked){
this.setValue(true);
}else{
this.checked = this.el.dom.checked;
}
},
// private
initValue : Ext.emptyFn,
/**
* Returns the checked state of the checkbox.
* @return {Boolean} True if checked, else false
*/
getValue : function(){
if(this.rendered){
return this.el.dom.checked;
}
return false;
},
// private
onClick : function(){
if(this.el.dom.checked != this.checked){
this.setValue(this.el.dom.checked);
}
},
/**
* Sets the checked state of the checkbox.
* @param {Boolean/String} checked True, 'true', '1', or 'on' to check the checkbox, any other value will uncheck it.
*/
setValue : function(v){
this.checked = (v === true || v === 'true' || v == '1' || String(v).toLowerCase() == 'on');
if(this.el && this.el.dom){
this.el.dom.checked = this.checked;
this.el.dom.defaultChecked = this.checked;
}
this.fireEvent("check", this, this.checked);
}
});
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
/**
* @class Ext.form.Layout
* @extends Ext.Component
* Creates a container for layout and rendering of fields in an {@link Ext.form.Form}.
* @constructor
* @param {Object} config Configuration options
*/
Ext.form.Layout = function(config){
Ext.form.Layout.superclass.constructor.call(this, config);
this.stack = [];
};
Ext.extend(Ext.form.Layout, Ext.Component, {
/**
* @cfg {String/Object} autoCreate
* A DomHelper element spec used to autocreate the layout (defaults to {tag: 'div', cls: 'x-form-ct'})
*/
/**
* @cfg {String/Object/Function} style
* A style specification string, e.g. "width:100px", or object in the form {width:"100px"}, or
* a function which returns such a specification.
*/
/**
* @cfg {String} labelAlign
* Valid values are "left," "top" and "right" (defaults to "left")
*/
/**
* @cfg {Number} labelWidth
* Fixed width in pixels of all field labels (defaults to undefined)
*/
/**
* @cfg {Boolean} clear
* True to add a clearing element at the end of this layout, equivalent to CSS clear: both (defaults to true)
*/
clear : true,
/**
* @cfg {String} labelSeparator
* The separator to use after field labels (defaults to ':')
*/
labelSeparator : ':',
/**
* @cfg {Boolean} hideLabels
* True to suppress the display of field labels in this layout (defaults to false)
*/
hideLabels : false,
// private
defaultAutoCreate : {tag: 'div', cls: 'x-form-ct'},
// private
onRender : function(ct, position){
if(this.el){ // from markup
this.el = Ext.get(this.el);
}else { // generate
var cfg = this.getAutoCreate();
this.el = ct.createChild(cfg, position);
}
if(this.style){
this.el.applyStyles(this.style);
}
if(this.labelAlign){
this.el.addClass('x-form-label-'+this.labelAlign);
}
if(this.hideLabels){
this.labelStyle = "display:none";
this.elementStyle = "padding-left:0;";
}else{
if(typeof this.labelWidth == 'number'){
this.labelStyle = "width:"+this.labelWidth+"px;";
this.elementStyle = "padding-left:"+((this.labelWidth+(typeof this.labelPad == 'number' ? this.labelPad : 5))+'px')+";";
}
if(this.labelAlign == 'top'){
this.labelStyle = "width:auto;";
this.elementStyle = "padding-left:0;";
}
}
var stack = this.stack;
var slen = stack.length;
if(slen > 0){
if(!this.fieldTpl){
var t = new Ext.Template(
'<div class="x-form-item {5}">',
'<label for="{0}" style="{2}">{1}{4}</label>',
'<div class="x-form-element" id="x-form-el-{0}" style="{3}">',
'</div>',
'</div><div class="x-form-clear-left"></div>'
);
t.disableFormats = true;
t.compile();
Ext.form.Layout.prototype.fieldTpl = t;
}
for(var i = 0; i < slen; i++) {
if(stack[i].isFormField){
this.renderField(stack[i]);
}else{
this.renderComponent(stack[i]);
}
}
}
if(this.clear){
this.el.createChild({cls:'x-form-clear'});
}
},
// private
renderField : function(f){
this.fieldTpl.append(this.el, [
f.id, f.fieldLabel,
f.labelStyle||this.labelStyle||'',
this.elementStyle||'',
typeof f.labelSeparator == 'undefined' ? this.labelSeparator : f.labelSeparator,
f.itemCls||this.itemCls||''
]);
},
// private
renderComponent : function(c){
c.render(this.el);
}
});
/**
* @class Ext.form.Column
* @extends Ext.form.Layout
* Creates a column container for layout and rendering of fields in an {@link Ext.form.Form}.
* @constructor
* @param {Object} config Configuration options
*/
Ext.form.Column = function(config){
Ext.form.Column.superclass.constructor.call(this, config);
};
Ext.extend(Ext.form.Column, Ext.form.Layout, {
/**
* @cfg {Number/String} width
* The fixed width of the column in pixels or CSS value (defaults to "auto")
*/
/**
* @cfg {String/Object} autoCreate
* A DomHelper element spec used to autocreate the column (defaults to {tag: 'div', cls: 'x-form-ct x-form-column'})
*/
// private
defaultAutoCreate : {tag: 'div', cls: 'x-form-ct x-form-column'},
// private
onRender : function(ct, position){
Ext.form.Column.superclass.onRender.call(this, ct, position);
if(this.width){
this.el.setWidth(this.width);
}
}
});
/**
* @class Ext.form.FieldSet
* @extends Ext.form.Layout
* Creates a fieldset container for layout and rendering of fields in an {@link Ext.form.Form}.
* @constructor
* @param {Object} config Configuration options
*/
Ext.form.FieldSet = function(config){
Ext.form.FieldSet.superclass.constructor.call(this, config);
};
Ext.extend(Ext.form.FieldSet, Ext.form.Layout, {
/**
* @cfg {String} legend
* The text to display as the legend for the FieldSet (defaults to '')
*/
/**
* @cfg {String/Object} autoCreate
* A DomHelper element spec used to autocreate the fieldset (defaults to {tag: 'fieldset', cn: {tag:'legend'}})
*/
// private
defaultAutoCreate : {tag: 'fieldset', cn: {tag:'legend'}},
// private
onRender : function(ct, position){
Ext.form.FieldSet.superclass.onRender.call(this, ct, position);
if(this.legend){
this.setLegend(this.legend);
}
},
// private
setLegend : function(text){
if(this.rendered){
this.el.child('legend').update(text);
}
}
});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
/**
* @class Ext.form.NumberField
* @extends Ext.form.TextField
* Numeric text field that provides automatic keystroke filtering and numeric validation.
* @constructor
* Creates a new NumberField
* @param {Object} config Configuration options
*/
Ext.form.NumberField = function(config){
Ext.form.NumberField.superclass.constructor.call(this, config);
};
Ext.extend(Ext.form.NumberField, Ext.form.TextField, {
/**
* @cfg {String} fieldClass The default CSS class for the field (defaults to "x-form-field x-form-num-field")
*/
fieldClass: "x-form-field x-form-num-field",
/**
* @cfg {Boolean} allowDecimals False to disallow decimal values (defaults to true)
*/
allowDecimals : true,
/**
* @cfg {String} decimalSeparator Character(s) to allow as the decimal separator (defaults to '.')
*/
decimalSeparator : ".",
/**
* @cfg {Number} decimalPrecision The maximum precision to display after the decimal separator (defaults to 2)
*/
decimalPrecision : 2,
/**
* @cfg {Boolean} allowNegative False to prevent entering a negative sign (defaults to true)
*/
allowNegative : true,
/**
* @cfg {Number} minValue The minimum allowed value (defaults to Number.NEGATIVE_INFINITY)
*/
minValue : Number.NEGATIVE_INFINITY,
/**
* @cfg {Number} maxValue The maximum allowed value (defaults to Number.MAX_VALUE)
*/
maxValue : Number.MAX_VALUE,
/**
* @cfg {String} minText Error text to display if the minimum value validation fails (defaults to "The minimum value for this field is {minValue}")
*/
minText : "The minimum value for this field is {0}",
/**
* @cfg {String} maxText Error text to display if the maximum value validation fails (defaults to "The maximum value for this field is {maxValue}")
*/
maxText : "The maximum value for this field is {0}",
/**
* @cfg {String} nanText Error text to display if the value is not a valid number. For example, this can happen
* if a valid character like '.' or '-' is left in the field with no number (defaults to "{value} is not a valid number")
*/
nanText : "{0} is not a valid number",
// private
initEvents : function(){
Ext.form.NumberField.superclass.initEvents.call(this);
var allowed = "0123456789";
if(this.allowDecimals){
allowed += this.decimalSeparator;
}
if(this.allowNegative){
allowed += "-";
}
this.stripCharsRe = new RegExp('[^'+allowed+']', 'gi');
var keyPress = function(e){
var k = e.getKey();
if(!Ext.isIE && (e.isSpecialKey() || k == e.BACKSPACE || k == e.DELETE)){
return;
}
var c = e.getCharCode();
if(allowed.indexOf(String.fromCharCode(c)) === -1){
e.stopEvent();
}
};
this.el.on("keypress", keyPress, this);
},
// private
validateValue : function(value){
if(!Ext.form.NumberField.superclass.validateValue.call(this, value)){
return false;
}
if(value.length < 1){ // if it's blank and textfield didn't flag it then it's valid
return true;
}
var num = this.parseValue(value);
if(isNaN(num)){
this.markInvalid(String.format(this.nanText, value));
return false;
}
if(num < this.minValue){
this.markInvalid(String.format(this.minText, this.minValue));
return false;
}
if(num > this.maxValue){
this.markInvalid(String.format(this.maxText, this.maxValue));
return false;
}
return true;
},
getValue : function(){
return this.fixPrecision(this.parseValue(Ext.form.NumberField.superclass.getValue.call(this)));
},
// private
parseValue : function(value){
value = parseFloat(String(value).replace(this.decimalSeparator, "."));
return isNaN(value) ? '' : value;
},
// private
fixPrecision : function(value){
var nan = isNaN(value);
if(!this.allowDecimals || this.decimalPrecision == -1 || nan || !value){
return nan ? '' : value;
}
return parseFloat(value).toFixed(this.decimalPrecision);
},
setValue : function(v){
Ext.form.NumberField.superclass.setValue.call(this, String(v).replace(".", this.decimalSeparator));
},
// private
decimalPrecisionFcn : function(v){
return Math.floor(v);
},
beforeBlur : function(){
var v = this.parseValue(this.getRawValue());
if(v){
this.setValue(this.fixPrecision(v));
}
}
});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
/**
* @class Ext.form.Radio
* @extends Ext.form.Checkbox
* Single radio field. Same as Checkbox, but provided as a convenience for automatically setting the input type.
* Radio grouping is handled automatically by the browser if you give each radio in a group the same name.
* @constructor
* Creates a new Radio
* @param {Object} config Configuration options
*/
Ext.form.Radio = function(){
Ext.form.Radio.superclass.constructor.apply(this, arguments);
};
Ext.extend(Ext.form.Radio, Ext.form.Checkbox, {
inputType: 'radio',
/**
* If this radio is part of a group, it will return the selected value
* @return {String}
*/
getGroupValue : function(){
return this.el.up('form').child('input[name='+this.el.dom.name+']:checked', true).value;
}
});
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
/**
* @class Ext.form.TextArea
* @extends Ext.form.TextField
* Multiline text field. Can be used as a direct replacement for traditional textarea fields, plus adds
* support for auto-sizing.
* @constructor
* Creates a new TextArea
* @param {Object} config Configuration options
*/
Ext.form.TextArea = function(config){
Ext.form.TextArea.superclass.constructor.call(this, config);
// these are provided exchanges for backwards compat
// minHeight/maxHeight were replaced by growMin/growMax to be
// compatible with TextField growing config values
if(this.minHeight !== undefined){
this.growMin = this.minHeight;
}
if(this.maxHeight !== undefined){
this.growMax = this.maxHeight;
}
};
Ext.extend(Ext.form.TextArea, Ext.form.TextField, {
/**
* @cfg {Number} growMin The minimum height to allow when grow = true (defaults to 60)
*/
growMin : 60,
/**
* @cfg {Number} growMax The maximum height to allow when grow = true (defaults to 1000)
*/
growMax: 1000,
/**
* @cfg {Boolean} preventScrollbars True to prevent scrollbars from appearing regardless of how much text is
* in the field (equivalent to setting overflow: hidden, defaults to false)
*/
preventScrollbars: false,
/**
* @cfg {String/Object} autoCreate A DomHelper element spec, or true for a default element spec (defaults to
* {tag: "textarea", style: "width:300px;height:60px;", autocomplete: "off"})
*/
// private
onRender : function(ct, position){
if(!this.el){
this.defaultAutoCreate = {
tag: "textarea",
style:"width:300px;height:60px;",
autocomplete: "off"
};
}
Ext.form.TextArea.superclass.onRender.call(this, ct, position);
if(this.grow){
this.textSizeEl = Ext.DomHelper.append(document.body, {
tag: "pre", cls: "x-form-grow-sizer"
});
if(this.preventScrollbars){
this.el.setStyle("overflow", "hidden");
}
this.el.setHeight(this.growMin);
}
},
onDestroy : function(){
if(this.textSizeEl){
this.textSizeEl.parentNode.removeChild(this.textSizeEl);
}
Ext.form.TextArea.superclass.onDestroy.call(this);
},
// private
onKeyUp : function(e){
if(!e.isNavKeyPress() || e.getKey() == e.ENTER){
this.autoSize();
}
},
/**
* Automatically grows the field to accomodate the height of the text up to the maximum field height allowed.
* This only takes effect if grow = true, and fires the autosize event if the height changes.
*/
autoSize : function(){
if(!this.grow || !this.textSizeEl){
return;
}
var el = this.el;
var v = el.dom.value;
var ts = this.textSizeEl;
ts.innerHTML = '';
ts.appendChild(document.createTextNode(v));
v = ts.innerHTML;
Ext.fly(ts).setWidth(this.el.getWidth());
if(v.length < 1){
v = "&#160;&#160;";
}else{
if(Ext.isIE){
v = v.replace(/\n/g, '<p>&#160;</p>');
}
v += "&#160;\n&#160;";
}
ts.innerHTML = v;
var h = Math.min(this.growMax, Math.max(ts.offsetHeight, this.growMin));
if(h != this.lastHeight){
this.lastHeight = h;
this.el.setHeight(h);
this.fireEvent("autosize", this, h);
}
}
});
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
/**
* @class Ext.form.VTypes
* Overridable validation definitions. The validations provided are basic and intended to be easily customizable and extended.
* @singleton
*/
Ext.form.VTypes = function(){
// closure these in so they are only created once.
var alpha = /^[a-zA-Z_]+$/;
var alphanum = /^[a-zA-Z0-9_]+$/;
var email = /^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/;
var url = /(((https?)|(ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
// All these messages and functions are configurable
return {
/**
* The function used to validate email addresses
* @param {String} value The email address
*/
'email' : function(v){
return email.test(v);
},
/**
* The error text to display when the email validation function returns false
* @type String
*/
'emailText' : 'This field should be an e-mail address in the format "user@domain.com"',
/**
* The keystroke filter mask to be applied on email input
* @type RegExp
*/
'emailMask' : /[a-z0-9_\.\-@]/i,
/**
* The function used to validate URLs
* @param {String} value The URL
*/
'url' : function(v){
return url.test(v);
},
/**
* The error text to display when the url validation function returns false
* @type String
*/
'urlText' : 'This field should be a URL in the format "http:/'+'/www.domain.com"',
/**
* The function used to validate alpha values
* @param {String} value The value
*/
'alpha' : function(v){
return alpha.test(v);
},
/**
* The error text to display when the alpha validation function returns false
* @type String
*/
'alphaText' : 'This field should only contain letters and _',
/**
* The keystroke filter mask to be applied on alpha input
* @type RegExp
*/
'alphaMask' : /[a-z_]/i,
/**
* The function used to validate alphanumeric values
* @param {String} value The value
*/
'alphanum' : function(v){
return alphanum.test(v);
},
/**
* The error text to display when the alphanumeric validation function returns false
* @type String
*/
'alphanumText' : 'This field should only contain letters, numbers and _',
/**
* The keystroke filter mask to be applied on alphanumeric input
* @type RegExp
*/
'alphanumMask' : /[a-z0-9_]/i
};
}();
\ No newline at end of file
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
Ext.grid.AbstractGridView = function(){
this.grid = null;
this.events = {
"beforerowremoved" : true,
"beforerowsinserted" : true,
"beforerefresh" : true,
"rowremoved" : true,
"rowsinserted" : true,
"rowupdated" : true,
"refresh" : true
};
Ext.grid.AbstractGridView.superclass.constructor.call(this);
};
Ext.extend(Ext.grid.AbstractGridView, Ext.util.Observable, {
rowClass : "x-grid-row",
cellClass : "x-grid-cell",
tdClass : "x-grid-td",
hdClass : "x-grid-hd",
splitClass : "x-grid-hd-split",
init: function(grid){
this.grid = grid;
var cid = this.grid.getGridEl().id;
this.colSelector = "#" + cid + " ." + this.cellClass + "-";
this.tdSelector = "#" + cid + " ." + this.tdClass + "-";
this.hdSelector = "#" + cid + " ." + this.hdClass + "-";
this.splitSelector = "#" + cid + " ." + this.splitClass + "-";
},
getColumnRenderers : function(){
var renderers = [];
var cm = this.grid.colModel;
var colCount = cm.getColumnCount();
for(var i = 0; i < colCount; i++){
renderers[i] = cm.getRenderer(i);
}
return renderers;
},
getColumnIds : function(){
var ids = [];
var cm = this.grid.colModel;
var colCount = cm.getColumnCount();
for(var i = 0; i < colCount; i++){
ids[i] = cm.getColumnId(i);
}
return ids;
},
getDataIndexes : function(){
if(!this.indexMap){
this.indexMap = this.buildIndexMap();
}
return this.indexMap.colToData;
},
getColumnIndexByDataIndex : function(dataIndex){
if(!this.indexMap){
this.indexMap = this.buildIndexMap();
}
return this.indexMap.dataToCol[dataIndex];
},
/**
* Set a css style for a column dynamically.
* @param {Number} colIndex The index of the column
* @param {String} name The css property name
* @param {String} value The css value
*/
setCSSStyle : function(colIndex, name, value){
var selector = "#" + this.grid.id + " .x-grid-col-" + colIndex;
Ext.util.CSS.updateRule(selector, name, value);
},
generateRules : function(cm){
var ruleBuf = [], rulesId = this.grid.id + '-cssrules';
Ext.util.CSS.removeStyleSheet(rulesId);
for(var i = 0, len = cm.getColumnCount(); i < len; i++){
var cid = cm.getColumnId(i);
ruleBuf.push(this.colSelector, cid, " {\n", cm.config[i].css, "}\n",
this.tdSelector, cid, " {\n}\n",
this.hdSelector, cid, " {\n}\n",
this.splitSelector, cid, " {\n}\n");
}
return Ext.util.CSS.createStyleSheet(ruleBuf.join(""), rulesId);
}
});
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* Ext JS Library 1.1.1
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://www.extjs.com/license
*/
// private
// This is a support class used internally by the Grid components
Ext.grid.GridEditor = function(field, config){
Ext.grid.GridEditor.superclass.constructor.call(this, field, config);
field.monitorTab = false;
};
Ext.extend(Ext.grid.GridEditor, Ext.Editor, {
alignment: "tl-tl",
autoSize: "width",
hideEl : false,
cls: "x-small-editor x-grid-editor",
shim:false,
shadow:"frame"
});
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment