partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit 736c0ea2f8683c4ede831ba1b790078e156fefff
parent 6570603007cd6d13b0b5aa687561988681a8241b
Author: Felicitus <felicitus@felicitus.org>
Date:   Wed,  4 Jan 2012 20:12:39 +0100

Bugfix for EXTJSIV-3318

Diffstat:
Asrc/frontend/js/ExtJS/Bugfixes/Ext.grid.plugin.CellEditing-EXTJSIV-3318.js | 50++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+), 0 deletions(-)

diff --git a/src/frontend/js/ExtJS/Bugfixes/Ext.grid.plugin.CellEditing-EXTJSIV-3318.js b/src/frontend/js/ExtJS/Bugfixes/Ext.grid.plugin.CellEditing-EXTJSIV-3318.js @@ -0,0 +1,49 @@ +/** + * This is a hackish bugfix for ExtJS 4.0.7. According to sencha, this has been fixed in EXTJSIV-3318. Remove this + * as soon as a newer version as ExtJS 4.0.7 is out and fixes this bug. + */ +Ext.override(Ext.grid.plugin.CellEditing, { + + startEdit: function(record, columnHeader) { + var me = this, + value = record.get(columnHeader.dataIndex), + context = me.getEditingContext(record, columnHeader), + ed; + + record = context.record; + columnHeader = context.column; + + + + me.completeEdit(); + + context.originalValue = context.value = value; + if (me.beforeEdit(context) === false || me.fireEvent('beforeedit', context) === false || context.cancel) { + return false; + } + + + if (columnHeader && (!columnHeader.getEditor || !columnHeader.getEditor(record))) { + return false; + } + + ed = me.getEditor(record, columnHeader); + if (ed) { + me.context = context; + me.setActiveEditor(ed); + me.setActiveRecord(record); + me.setActiveColumn(columnHeader); + + + me.editTask.delay(15, ed.startEdit, ed, [me.getCell(record, columnHeader), value]); + } else { + + + + + me.grid.getView().getEl(columnHeader).focus((Ext.isWebKit || Ext.isIE) ? 10 : false); + } + + return true; + } +});+ \ No newline at end of file