IDEMPIERE-1287:When editing in a field (header or detail) use shortcut key (alt + next) to move next record. value in this field is not save
support CKEditor control (IDEMPIERE-2310)
This commit is contained in:
parent
9e3160a121
commit
cf311b9c15
|
@ -24,6 +24,28 @@ Copyright (C) 2007 Ashley G Ramdass.
|
|||
// just sent fake event when control is textfield and value is not yet sync to server
|
||||
if (wgt.$instanceof(zul.inp.Textbox) && wgt.$n().value != wgt.getText())
|
||||
zAu.send(new zk.Event(zk.Widget.$(wgt), 'onChange',{"value":wgt.$n().value}));
|
||||
else if (wgt.$instanceof(ckez.CKeditor)){
|
||||
// CKEditor extend from zul.Widget not from wget zul.inp.InputWidget
|
||||
// so some behavior is not same standard input
|
||||
// this code bring from ckez.CKeditor.onBlur
|
||||
var editor = wgt._editor;
|
||||
|
||||
if (wgt._tidChg) {
|
||||
clearInterval(wgt._tidChg);
|
||||
wgt._tidChg = null;
|
||||
}
|
||||
|
||||
if (!editor.document)
|
||||
editor.document = editor.element.getDocument();
|
||||
|
||||
if (wgt.$class._checkEditorDirty(editor)) { // Issue #13
|
||||
var val = editor.getData();
|
||||
wgt._value = val; //save for onRestore
|
||||
//ZKCK-16, 17 use sendAhead to make sure onChange always happens first
|
||||
wgt.fire('onChange', {value: val});
|
||||
editor.resetDirty();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
fireOnInitEdit: function (wgt) {
|
||||
|
|
Loading…
Reference in New Issue