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:
Heng Sin Low 2013-06-27 10:13:59 +08:00
parent e978aafe0d
commit e68b20aaff
2 changed files with 18 additions and 21 deletions

View File

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

View File

@ -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 == &quot;ip-10-8-0-1.ec2.internal&quot; or desktop.execution.serverName.startsWith(&quot;demo.&quot;)}">
<![CDATA[
getFirefox.setHref("http://www.mozilla.com/?from=sfx&uid=0&t=306");
]]>
</zscript>
</zk>