IDEMPIERE-2585 Sessiontimeout button text is not translated users language / integrate patch from Flemming Birch (sjeffen)

This commit is contained in:
Carlos Ruiz 2015-04-22 10:49:22 -05:00
parent 259d9156e1
commit 8f1996c2ea
2 changed files with 12 additions and 5 deletions

View File

@ -621,12 +621,14 @@ public class LoginPanel extends Window implements EventListener<Event>
} }
private String getUpdateTimeoutTextScript() { private String getUpdateTimeoutTextScript() {
String msg = Msg.getMsg(Env.getCtx(), "SessionTimeoutText"); String msg = Msg.getMsg(Env.getCtx(), "SessionTimeoutText").trim(); //IDEMPIERE-847
String continueNsg = Msg.getMsg(Env.getCtx(), "continue").trim(); //IDEMPIERE-847
if (msg == null || msg.equals("SessionTimeoutText")) { if (msg == null || msg.equals("SessionTimeoutText")) {
return null; return null;
} }
msg = Strings.escape(msg, "\""); msg = Strings.escape(msg, "\"");
String s = "adempiere.store.set(\"zkTimeoutText\", \"" + msg + "\")"; String s = "adempiere.store.set(\"zkTimeoutText\", \"" + msg + "\");";//IDEMPIERE-847
s = s + " adempiere.store.set(\"zkContinueText\", \"" + continueNsg + "\");"; //IDEMPIERE-847
return s; return s;
} }

View File

@ -7,7 +7,6 @@
import org.compiere.util.Msg; import org.compiere.util.Msg;
import org.compiere.util.Env; import org.compiere.util.Env;
import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.theme.ThemeManager;
var continueText = Msg.getMsg(Env.getCtx(),"continue");
self.setTitle(ThemeManager.getBrowserTitle()); self.setTitle(ThemeManager.getBrowserTitle());
]]> ]]>
</zscript> </zscript>
@ -16,7 +15,7 @@
<div id="timeoutText"></div> <div id="timeoutText"></div>
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<toolbarbutton href="/index.zul" label="${continueText}"/> <toolbarbutton id="continueText" href="/index.zul" label="Continue"/>
</div> </div>
</vbox> </vbox>
<script defer="true"> <script defer="true">
@ -27,8 +26,14 @@
document.getElementById("${timeoutText.uuid}").innerHTML = val; document.getElementById("${timeoutText.uuid}").innerHTML = val;
} }
}; };
var callbackC = function(ok, val) {
if (ok && !!val)
{
document.getElementById("${continueText.uuid}").innerHTML = val;
}
};
adempiere.store.get("zkTimeoutText", callback); adempiere.store.get("zkTimeoutText", callback);
adempiere.store.get("zkContinueText", callbackC);
]]> ]]>
</script> </script>
</window> </window>