rem: 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; 
add: 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","actionfailed","actioncomplete");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,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")},getEl:function(){return this.el},onSubmit:function(A){A.stopEvent()},destroy:function(){this.items.each(function(A){Ext.destroy(A)});this.el.removeAllListeners();this.el.remove();this.purgeListeners()},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.applyToMarkup(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; 
context: 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;
meta: 2891	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/2891/d109eea1e59fbb030ac98e95f181f72da9611a48/ext-all.js/buggy/gemma-web/src/main/webapp/scripts/ext/ext-all.js