error showing inline editor, when using dtInPlaceEdit with nested header

1 view
Skip to first unread message

Aris Setyawan

unread,
May 18, 2011, 5:27:29 AM5/18/11
to inp...@googlegroups.com
Hi,

When using dtInPlaceEdit with nested header, inline editor didn't
appear when I clicked a cell. I have fixed it with replace this codes
in js/widgets/dtInPlaceEdit.js:


for(var i = 0 ; i < columndefs.length ; i++) {
var columnDef = columndefs[i];
if( YAHOO.lang.isUndefined(columnDef.editor) &&
!!fieldsByKey[columnDef.key] ) {
columnDef.editor = new
inputEx.widget.CellEditor(fieldsByKey[columnDef.key]);
}
}


with:


for(var i = 0 ; i < columndefs.length ; i++) {
var columnDef = columndefs[i];
if(YAHOO.lang.isArray(columnDef.children)){
// fixed bug on nested header
var children = columnDef.children;
for(var j = 0 ; j < children.length ; j++) {
var child = children[j];
if( YAHOO.lang.isUndefined(child.editor) && !!fieldsByKey[child.key] ) {
child.editor = new inputEx.widget.CellEditor(fieldsByKey[child.key]);
}
}

}else if( YAHOO.lang.isUndefined(columnDef.editor) &&
!!fieldsByKey[columnDef.key] ) {
columnDef.editor = new
inputEx.widget.CellEditor(fieldsByKey[columnDef.key]);
}
}

hope, this is useful.

-aris

Reply all
Reply to author
Forward
0 new messages