Pre-release clean up: 1) Remove firefox download link and redundant idempiere.org link 2) Updated browser support check. We support ff, chrome, webkit and ie 8+.
This commit is contained in:
parent
e978aafe0d
commit
e68b20aaff
|
@ -548,18 +548,27 @@ public final class AEnv
|
|||
return false;
|
||||
|
||||
Object n = execution.getNativeRequest();
|
||||
boolean supported = false;
|
||||
if (n instanceof ServletRequest) {
|
||||
String userAgent = Servlets.getUserAgent((ServletRequest) n);
|
||||
if (userAgent.indexOf("Firefox") >= 0) {
|
||||
supported = true;
|
||||
} else if (userAgent.indexOf("AppleWebKit") >= 0) {
|
||||
if (userAgent.indexOf("Chrome") >= 0 || userAgent.indexOf("Safari") >= 0) {
|
||||
supported = true;
|
||||
}
|
||||
Double version = Servlets.getBrowser((ServletRequest) n, "ff");
|
||||
if (version != null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
version = Servlets.getBrowser((ServletRequest) n, "chrome");
|
||||
if (version != null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
version = Servlets.getBrowser((ServletRequest) n, "webkit");
|
||||
if (version != null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
version = Servlets.getBrowser((ServletRequest) n, "ie");
|
||||
if (version != null && version.intValue() >= 8)
|
||||
return true;
|
||||
}
|
||||
return supported;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,18 +21,6 @@ Copyright (C) 2009 Idalica Corporation
|
|||
<toolbarbutton href="http://www.zkoss.org" image="http://www.zkoss.org/img/zkpowered_s.png"
|
||||
tooltiptext="Powered by Zk" target="_blank"
|
||||
/>
|
||||
<button href="http://www.mozilla.com/firefox" id="getFirefox"
|
||||
image="http://sfx-images.mozilla.org/affiliates/Buttons/firefox3/110x32_get_ffx.png"
|
||||
target="_blank"
|
||||
/>
|
||||
<button href="http://www.idempiere.org" image="images/iD32.png"
|
||||
tooltiptext="iDempiere Community" style="height:32px; width:32px" target="_blank"/>
|
||||
</div>
|
||||
|
||||
<zscript if="${desktop.execution.serverName == "ip-10-8-0-1.ec2.internal" or desktop.execution.serverName.startsWith("demo.")}">
|
||||
<![CDATA[
|
||||
getFirefox.setHref("http://www.mozilla.com/?from=sfx&uid=0&t=306");
|
||||
]]>
|
||||
</zscript>
|
||||
|
||||
</zk>
|
||||
|
|
Loading…
Reference in New Issue