Ext.namespace( 'instore.extlib.ui.grid' ); instore.extlib.ui.grid.GridEditor = function(config, field) { if(field.editorConfig) instore.extlib.ui.grid.GridEditor.superclass.constructor.call(this, instore.extlib.ui.grid.DynamicGridCell(field.editorConfig), config); else return null; }; Ext.extend(instore.extlib.ui.grid.GridEditor, Ext.grid.GridEditor, { grid: null, completeEdit: function(remainVisible){ if(!this.editing) return; var v = this.getValue(); if(this.revertInvalid !== false && !this.field.isValid()) { if(this.grid) { this.grid.suspendEvents(); this.grid.getSelectionModel().lock() } return; } else if(this.grid) { this.grid.getSelectionModel().unlock() this.grid.resumeEvents(); } if(String(v) === String(this.startValue) && this.ignoreNoChange) { this.editing = false; this.hide(); return; } if(this.fireEvent("beforecomplete", this, v, this.startValue) !== false) { this.editing = false; if(this.updateEl && this.boundEl) this.boundEl.update(v); if(remainVisible !== true) this.hide(); this.fireEvent("complete", this, v, this.startValue); } } });