Upgrade to ExtJS 3.2.0 - Released 03/30/2010
[extjs.git] / examples / ux / RowEditor.js
index 9076f41..813a4db 100644 (file)
@@ -1,6 +1,6 @@
 /*!
 /*!
- * Ext JS Library 3.1.1
- * Copyright(c) 2006-2010 Ext JS, LLC
+ * Ext JS Library 3.2.0
+ * Copyright(c) 2006-2010 Ext JS, Inc.
  * licensing@extjs.com
  * http://www.extjs.com/license
  */
  * licensing@extjs.com
  * http://www.extjs.com/license
  */
@@ -115,9 +115,10 @@ Ext.ux.grid.RowEditor = Ext.extend(Ext.Panel, {
     },
 
     beforedestroy: function() {
     },
 
     beforedestroy: function() {
+        this.stopMonitoring();
         this.grid.getStore().un('remove', this.onStoreRemove, this);
         this.stopEditing(false);
         this.grid.getStore().un('remove', this.onStoreRemove, this);
         this.stopEditing(false);
-        Ext.destroy(this.btns);
+        Ext.destroy(this.btns, this.tooltip);
     },
 
     refreshFields: function(){
     },
 
     refreshFields: function(){
@@ -258,8 +259,6 @@ Ext.ux.grid.RowEditor = Ext.extend(Ext.Panel, {
                 ed = c.getEditor();
             if(!ed){
                 ed = c.displayEditor || new Ext.form.DisplayField();
                 ed = c.getEditor();
             if(!ed){
                 ed = c.displayEditor || new Ext.form.DisplayField();
-            }else{
-                ed = ed.field;
             }
             if(i == 0){
                 ed.margins = pm('0 1 2 1');
             }
             if(i == 0){
                 ed.margins = pm('0 1 2 1');
@@ -395,16 +394,14 @@ Ext.ux.grid.RowEditor = Ext.extend(Ext.Panel, {
         if(this.isVisible()){
             var index = 0,
                 cm = this.grid.getColumnModel(),
         if(this.isVisible()){
             var index = 0,
                 cm = this.grid.getColumnModel(),
-                c,
-                ed;
+                c;
             if(pt){
                 index = this.getTargetColumnIndex(pt);
             }
             for(var i = index||0, len = cm.getColumnCount(); i < len; i++){
                 c = cm.getColumnAt(i);
             if(pt){
                 index = this.getTargetColumnIndex(pt);
             }
             for(var i = index||0, len = cm.getColumnCount(); i < len; i++){
                 c = cm.getColumnAt(i);
-                ed = c.getEditor();
-                if(!c.hidden && ed){
-                    ed.field.focus();
+                if(!c.hidden && c.getEditor()){
+                    c.getEditor().focus();
                     break;
                 }
             }
                     break;
                 }
             }