IDEMPIERE-3179:record should move to editing mode when user is editing first field
a bit optimize. do nothing when component don't lay on standard window
This commit is contained in:
parent
abaf405158
commit
0d0ce41a4b
|
@ -46,13 +46,20 @@ Copyright (C) 2007 Ashley G Ramdass.
|
||||||
// or ever rise other event like start editting to distinguish with true onChange event
|
// or ever rise other event like start editting to distinguish with true onChange event
|
||||||
zk.override(zul.inp.InputWidget.prototype, "doInput_", function (evt) {
|
zk.override(zul.inp.InputWidget.prototype, "doInput_", function (evt) {
|
||||||
this.$doInput_(evt);
|
this.$doInput_(evt);
|
||||||
var domElemOfLayout = jq('#' + this.$n().id).closest(".adwindow-layout");
|
|
||||||
if (domElemOfLayout == null){
|
if (this.get ("isOnStardardWindow") == 'false'){
|
||||||
;// do nothing
|
return; // don't waste time to check component don't lay on standard window
|
||||||
|
}
|
||||||
|
|
||||||
|
var domElemOfLayout = jq('#' + this.$n().id).closest(".adwindow-layout"); // return a array
|
||||||
|
if (domElemOfLayout.length == 0){
|
||||||
|
this.set ("isOnStardardWindow", "false");// next time don't waste time to check this component
|
||||||
|
// in case, you move this component to a standard window, please update this properties at client by javascript Widget.set ()
|
||||||
|
// or at server by java function component.setWidgetOverride
|
||||||
}else{
|
}else{
|
||||||
var winLayoutWg = zk.Widget.$(domElemOfLayout);
|
var winLayoutWg = zk.Widget.$(domElemOfLayout);
|
||||||
if (winLayoutWg == null){
|
if (winLayoutWg == null){
|
||||||
;// do nothing
|
;// do nothing, this case rare happen because ".adwindow-layout" always is a component
|
||||||
}else{
|
}else{
|
||||||
var isEditting = winLayoutWg.get ("isEditting");
|
var isEditting = winLayoutWg.get ("isEditting");
|
||||||
// winLayoutWg should cache to improve perfomance
|
// winLayoutWg should cache to improve perfomance
|
||||||
|
|
Loading…
Reference in New Issue