Source

trac-macos-ie8+ / support-ie8+

# HG changeset patch
# Parent fdcb0f6064d59f7b42d6c082e337800ab75731f2
Supports IE8 or later

diff -r fdcb0f6064d5 tracmacos/htdocs/mac.css
--- a/tracmacos/htdocs/mac.css	Mon Dec 20 15:42:49 2010 -0500
+++ b/tracmacos/htdocs/mac.css	Fri Apr 13 01:17:43 2012 +0900
@@ -763,6 +763,10 @@
   background-position: 0 -30px;
 }
 
+#mactb_min {
+  cursor: pointer;
+}
+
 #mactb_min .tb_br {
   background-position: 0 -60px;
 }
diff -r fdcb0f6064d5 tracmacos/templates/mac_theme.html
--- a/tracmacos/templates/mac_theme.html	Mon Dec 20 15:42:49 2010 -0500
+++ b/tracmacos/templates/mac_theme.html	Fri Apr 13 01:17:43 2012 +0900
@@ -195,22 +195,20 @@
       </table>
     </div>
     
-    <a href="javascript:animatedcollapse.show('mactb')" >
-      <div id="mactb_min" class="mactb">
-        <table class="tb_tbl" cellspacing="0" cellpadding="0" border="0" >
-          <tbody>
-            <tr>
-              <td class="tb_td tb_bl" align="left" width="15" valign="top" />
-              <td class="tb_td tb_c">
-                Tools
-              </td>
-              <td class="tb_td tb_br" >
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-    </a>
+    <div id="mactb_min" class="mactb" onclick="animatedcollapse.show('mactb')">
+      <table class="tb_tbl" cellspacing="0" cellpadding="0" border="0" >
+        <tbody>
+          <tr>
+            <td class="tb_td tb_bl" align="left" width="15" valign="top" />
+            <td class="tb_td tb_c">
+              Tools
+            </td>
+            <td class="tb_td tb_br" >
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
     
     <script type='text/javascript'>
       jQuery('a.ext-link').each(function() {
diff -r fdcb0f6064d5 tracmacos/theme.py
--- a/tracmacos/theme.py	Mon Dec 20 15:42:49 2010 -0500
+++ b/tracmacos/theme.py	Fri Apr 13 01:17:43 2012 +0900
@@ -193,7 +193,8 @@
     BROWSER_REJECT_MESSAGE = resource_string('tracmacos', 
             'templates/mac_reject.html')
     BROWSER_BLACKLIST = [
-                        '; MSIE ',
+                        # IE except IE8+ in standard mode and IE7 compatible mode
+                        r'(?!; MSIE 7\.[0-9]+(?:; *[^;]+)*; *Trident/); MSIE [1-7]\.'
                         '; Dillo',
 #                        'NetSurf',
                         ]
@@ -225,6 +226,8 @@
     def post_process_request(self, req, template, data, content_type):
 #        self._prepare_request(req)
         self._add_macos_scripts(req)
+        # Force IE to render in standard mode
+        req.send_header('X-UA-Compatible', 'IE=edge')
         return template, data, content_type
     
     # IRequestHandler methods