IDEMPIERE-5309 foreign languages, stopped to work on http://test.idempiere.org (#1358)
- Fix javascript error
This commit is contained in:
parent
0e4cb62479
commit
eb0366dba8
|
@ -193,7 +193,7 @@ public class Combobox extends org.zkoss.zul.Combobox implements IdSpace
|
||||||
* add widget listener to auto scroll selected item to view (i.e make visible)
|
* add widget listener to auto scroll selected item to view (i.e make visible)
|
||||||
*/
|
*/
|
||||||
public void addScrollSelectedIntoViewListener() {
|
public void addScrollSelectedIntoViewListener() {
|
||||||
String script = "(function(){let id='#'+this.uuid+'-pp .z-comboitem-selected';let selected=zk($(id));if(selected.jq.length==1)selected.scrollIntoView();})()";
|
String script = "(function(me){let id='#'+me.uuid+'-pp .z-comboitem-selected';let selected=zk($(id));if(selected.jq.length==1)selected.scrollIntoView();})(this)";
|
||||||
setWidgetListener("onKeyUp", script);
|
setWidgetListener("onKeyUp", script);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -107,7 +107,7 @@ public class NumberBox extends Div
|
||||||
decimalBox.setWidgetOverride("doKeyPress_", funct.toString());
|
decimalBox.setWidgetOverride("doKeyPress_", funct.toString());
|
||||||
funct = new StringBuffer();
|
funct = new StringBuffer();
|
||||||
// debug // funct.append("console.log('keyCode='+event.keyCode);");
|
// debug // funct.append("console.log('keyCode='+event.keyCode);");
|
||||||
funct.append("function(event) {");
|
funct.append("(function(event) {");
|
||||||
funct.append("let key=0;");
|
funct.append("let key=0;");
|
||||||
funct.append("if (window.event)");
|
funct.append("if (window.event)");
|
||||||
funct.append(" key = event.keyCode;");
|
funct.append(" key = event.keyCode;");
|
||||||
|
@ -121,7 +121,7 @@ public class NumberBox extends Div
|
||||||
funct.append(" calcText.value = newValue;");
|
funct.append(" calcText.value = newValue;");
|
||||||
funct.append(" calcText.setSelectionRange(position+1, position+1);");
|
funct.append(" calcText.setSelectionRange(position+1, position+1);");
|
||||||
funct.append(" event.stop;");
|
funct.append(" event.stop;");
|
||||||
funct.append("}}");
|
funct.append("}})(event);");
|
||||||
decimalBox.setWidgetListener("onKeyDown", funct.toString());
|
decimalBox.setWidgetListener("onKeyDown", funct.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue