From: <hs...@us...> - 2011-11-16 17:08:11
|
Revision: 981 http://treebase.svn.sourceforge.net/treebase/?rev=981&view=rev Author: hshyket Date: 2011-11-16 17:08:00 +0000 (Wed, 16 Nov 2011) Log Message: ----------- Fixing the way old browser error message was displayed (no longer a popup). Also modified so that future versions of IE are not given an incompatibility message (above IE7). Modified Paths: -------------- trunk/treebase-web/src/main/webapp/common/meta.jsp trunk/treebase-web/src/main/webapp/decorators/adminTemplate.jsp trunk/treebase-web/src/main/webapp/decorators/defaultSearchTemplate.jsp trunk/treebase-web/src/main/webapp/decorators/defaultTemplate.jsp trunk/treebase-web/src/main/webapp/decorators/mainTemplate.jsp trunk/treebase-web/src/main/webapp/decorators/testTemplate.jsp trunk/treebase-web/src/main/webapp/styles/styles.css Added Paths: ----------- trunk/treebase-web/src/main/webapp/common/updateBrowser.jsp Modified: trunk/treebase-web/src/main/webapp/common/meta.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/common/meta.jsp 2011-11-02 17:48:18 UTC (rev 980) +++ trunk/treebase-web/src/main/webapp/common/meta.jsp 2011-11-16 17:08:00 UTC (rev 981) @@ -11,21 +11,23 @@ <meta name="msvalidate.01" content="D931446190993D0D2D719F2978AC44EB" /> <link rel="icon" href="<c:url value="/images/favicon.ico"/>"/> <% + String browsername = ""; + String browserversion = ""; String ua = request.getHeader( "User-Agent" ); boolean isMSIE = ( ua != null && ua.indexOf( "MSIE" ) != -1 ); boolean isOldMSIE = false; if ( isMSIE ) { - isOldMSIE = ua.indexOf("MSIE 8.0") == -1; + //isOldMSIE = ua.indexOf("MSIE 8.0") == -1; + String subsString = ua.substring( ua.indexOf("MSIE")); + String Info[] = (subsString.split(";")[0]).split(" "); + browsername = Info[0]; + browserversion = Info[1]; + float version = Float.parseFloat(browserversion); + if (version < 8) { + isOldMSIE = true; + + } } %> -<!-- <%= ua %> --> -<% if( isOldMSIE ){ %> - <script type="text/javascript"> - alert("Please upgrade your browser!\n\n"+ - "The TreeBASE team simply do not have the resources to support\n"+ - "old versions of Internet Explorer. There are many good, free\n"+ - "browsers available (IE8, FireFox, Safari, Chrome, Opera, etc.),\n"+ - "please use one of those instead."); - </script> -<% } %> \ No newline at end of file +<!-- <%= ua %> --> \ No newline at end of file Added: trunk/treebase-web/src/main/webapp/common/updateBrowser.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/common/updateBrowser.jsp (rev 0) +++ trunk/treebase-web/src/main/webapp/common/updateBrowser.jsp 2011-11-16 17:08:00 UTC (rev 981) @@ -0,0 +1,10 @@ +<div id="browserupdate"> +<p>Your browser is not supported by TreeBASE. Please download one of the browsers listed below:</p> +<p><a href="http://windows.microsoft.com/en-US/internet-explorer/downloads/ie" target="_blank">Internet Explorer</a> +<a href="http://www.mozilla.org/en-US/firefox/new/" target="_blank">Firefox</a> +<a href="http://www.google.com/chrome" target="_blank">Chrome</a> +<a href="http://www.apple.com/safari/download/" target="_blank">Safari</a> +<a href="http://www.opera.com/download/" target="_blank">Opera</a> +</p> +<br /> +</div> Modified: trunk/treebase-web/src/main/webapp/decorators/adminTemplate.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/decorators/adminTemplate.jsp 2011-11-02 17:48:18 UTC (rev 980) +++ trunk/treebase-web/src/main/webapp/decorators/adminTemplate.jsp 2011-11-16 17:08:00 UTC (rev 981) @@ -26,7 +26,9 @@ </head> <body <decorator:getProperty property="body.id" writeEntireProperty="true"/>> - +<% if( isOldMSIE ){ %> +<c:import url="/common/updateBrowser.jsp"/> +<% } %> <!-- BEGIN WRAP --> <div id="wrap"> <!-- BEGIN HEADER --> Modified: trunk/treebase-web/src/main/webapp/decorators/defaultSearchTemplate.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/decorators/defaultSearchTemplate.jsp 2011-11-02 17:48:18 UTC (rev 980) +++ trunk/treebase-web/src/main/webapp/decorators/defaultSearchTemplate.jsp 2011-11-16 17:08:00 UTC (rev 981) @@ -117,7 +117,9 @@ </head> <body <decorator:getProperty property="body.id" writeEntireProperty="true"/> onload="TreeBASE.initialize()"> - +<% if( isOldMSIE ){ %> +<c:import url="/common/updateBrowser.jsp"/> +<% } %> <!-- BEGIN WRAP --> <div id="wrap"> <!-- BEGIN HEADER --> Modified: trunk/treebase-web/src/main/webapp/decorators/defaultTemplate.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/decorators/defaultTemplate.jsp 2011-11-02 17:48:18 UTC (rev 980) +++ trunk/treebase-web/src/main/webapp/decorators/defaultTemplate.jsp 2011-11-16 17:08:00 UTC (rev 981) @@ -65,7 +65,9 @@ </head> <body <decorator:getProperty property="body.id" writeEntireProperty="true"/> onload="TreeBASE.initialize()"> - +<% if( isOldMSIE ){ %> +<c:import url="/common/updateBrowser.jsp"/> +<% } %> <!-- BEGIN WRAP --> <div id="wrap"> <!-- BEGIN HEADER --> Modified: trunk/treebase-web/src/main/webapp/decorators/mainTemplate.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/decorators/mainTemplate.jsp 2011-11-02 17:48:18 UTC (rev 980) +++ trunk/treebase-web/src/main/webapp/decorators/mainTemplate.jsp 2011-11-16 17:08:00 UTC (rev 981) @@ -16,7 +16,9 @@ </head> <body id="info" onload="TreeBASE.initialize()"> - +<% if( isOldMSIE ){ %> +<c:import url="/common/updateBrowser.jsp"/> +<% } %> <!-- BEGIN WRAP --> <div id="wrap"> <!-- BEGIN HEADER --> Modified: trunk/treebase-web/src/main/webapp/decorators/testTemplate.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/decorators/testTemplate.jsp 2011-11-02 17:48:18 UTC (rev 980) +++ trunk/treebase-web/src/main/webapp/decorators/testTemplate.jsp 2011-11-16 17:08:00 UTC (rev 981) @@ -16,7 +16,9 @@ </head> <body id="info" onload="TreeBASE.initialize()"> - +<% if( isOldMSIE ){ %> +<c:import url="/common/updateBrowser.jsp"/> +<% } %> <!-- BEGIN WRAP --> <div id="wrap"> <!-- BEGIN HEADER --> Modified: trunk/treebase-web/src/main/webapp/styles/styles.css =================================================================== --- trunk/treebase-web/src/main/webapp/styles/styles.css 2011-11-02 17:48:18 UTC (rev 980) +++ trunk/treebase-web/src/main/webapp/styles/styles.css 2011-11-16 17:08:00 UTC (rev 981) @@ -64,6 +64,19 @@ border-top: 1px solid #3d649f } +#browserupdate { + background-color: #FFFFC1; + text-align: center; + margin-bottom: -18px; +} + +#browserupdate a:link, #browserupdate a:visited, #browserupdate a:hover, #browserupdate a:active { + color: #003366; + text-decoration: none; + font-weight: bold; + margin-right: 20px; +} + /* Page Structure/Layout *******************************************************************************************/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |