IDEMPIERE-5309 foreign languages, stopped to work on http://test.idempiere.org (#1358)

- Fix javascript error
This commit is contained in:
hengsin 2022-06-08 05:20:59 +08:00 committed by GitHub
parent 0e4cb62479
commit eb0366dba8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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)
*/
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);
}
}

View File

@ -107,7 +107,7 @@ public class NumberBox extends Div
decimalBox.setWidgetOverride("doKeyPress_", funct.toString());
funct = new StringBuffer();
// debug // funct.append("console.log('keyCode='+event.keyCode);");
funct.append("function(event) {");
funct.append("(function(event) {");
funct.append("let key=0;");
funct.append("if (window.event)");
funct.append(" key = event.keyCode;");
@ -121,7 +121,7 @@ public class NumberBox extends Div
funct.append(" calcText.value = newValue;");
funct.append(" calcText.setSelectionRange(position+1, position+1);");
funct.append(" event.stop;");
funct.append("}}");
funct.append("}})(event);");
decimalBox.setWidgetListener("onKeyDown", funct.toString());
}