IDEMPIERE-786 ZK: Remove onFocus and onBlur server side event for field editor. Fixed problem with ; character.

This commit is contained in:
Heng Sin Low 2013-03-21 14:30:11 +08:00
parent 659edb3d55
commit c0c394d766
3 changed files with 5 additions and 5 deletions

View File

@ -530,7 +530,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
editor.getComponent().setWidgetOverride("fieldHeader", HelpController.escapeJavascriptContent(field.getHeader()));
editor.getComponent().setWidgetOverride("fieldDescription", HelpController.escapeJavascriptContent(field.getDescription()));
editor.getComponent().setWidgetOverride("fieldHelp", HelpController.escapeJavascriptContent(field.getHelp()));
editor.getComponent().setWidgetListener("onFocus", "zWatch.fire('onFieldTooltip', this, null, this.fieldHeader, this.fieldDescription, this.fieldHelp);");
editor.getComponent().setWidgetListener("onFocus", "zWatch.fire('onFieldTooltip', this, null, this.fieldHeader(), this.fieldDescription(), this.fieldHelp());");
editor.getComponent().setWidgetListener("onBlur", "zWatch.fire('onFieldTooltip', this);");
editor.setGridTab(this.getGridTab());

View File

@ -381,7 +381,7 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
editor.getComponent().setWidgetOverride("fieldHeader", HelpController.escapeJavascriptContent(gridPanelFields[i].getHeader()));
editor.getComponent().setWidgetOverride("fieldDescription", HelpController.escapeJavascriptContent(gridPanelFields[i].getDescription()));
editor.getComponent().setWidgetOverride("fieldHelp", HelpController.escapeJavascriptContent(gridPanelFields[i].getHelp()));
editor.getComponent().setWidgetListener("onFocus", "zWatch.fire('onFieldTooltip', this, null, this.fieldHeader, this.fieldDescription, this.fieldHelp);");
editor.getComponent().setWidgetListener("onFocus", "zWatch.fire('onFieldTooltip', this, null, this.fieldHeader(), this.fieldDescription(), this.fieldHelp());");
editor.getComponent().setWidgetListener("onBlur", "zWatch.fire('onFieldTooltip', this);");
}

View File

@ -444,9 +444,9 @@ public class HelpController
{
// If the content is null, then return ''
if (content == null)
return "''";
return "function(){return '';}";
//
StringBuilder out = new StringBuilder("'");
StringBuilder out = new StringBuilder("function(){return '");
char[] chars = content.toCharArray();
for (int i = 0; i < chars.length; i++)
{
@ -468,7 +468,7 @@ public class HelpController
break;
}
}
out.append("'");
out.append("';}");
return out.toString();
} // maskHTML
}