Make dimp work with IE 8 for now.
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 7 Apr 2009 04:57:53 +0000 (22:57 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 7 Apr 2009 04:57:53 +0000 (22:57 -0600)
imp/docs/CHANGES
imp/lib/DIMP.php
imp/lib/IMP.php

index 33352db..2df211f 100644 (file)
@@ -2280,6 +2280,8 @@ OLD DIMP CHANGELOG
 v1.1.2
 ------
 
+[mms] Make dimp work with IE 8 (uses IE 7 compatibility mode) (requires IMP
+      4.3.4+).
 [mms] Add confirmation box if attempting to send message without subject
       (Request #8076).
 [mms] Fix address autocomplete display on IE (Bug #7982).
index 1d3a298..e22f378 100644 (file)
@@ -104,11 +104,19 @@ class DIMP
 
         echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">' . "\n" .
              (!empty($GLOBALS['language']) ? '<html lang="' . strtr($GLOBALS['language'], '_', '-') . '"' : '<html') . ">\n".
-             "<head>\n" .
-             '<title>' . htmlspecialchars($page_title) . "</title>\n" .
+             "<head>\n";
+
+        // TODO: Make dimp work with IE 8 standards mode
+        if ($GLOBALS['browser']->isBrowser('msie') &&
+            ($GLOBALS['browser']->getMajor() == 8)) {
+            echo '<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />' . "\n";
+        }
+
+        echo '<title>' . htmlspecialchars($page_title) . "</title>\n" .
              '<link href="' . $GLOBALS['registry']->getImageDir() . "/favicon.ico\" rel=\"SHORTCUT ICON\" />\n".
              IMP::wrapInlineScript(DIMP::_includeDIMPJSVars());
 
+
         IMP::includeStylesheetFiles(true, 'dimp');
 
         echo "</head>\n";
index c71c405..7c6c739 100644 (file)
@@ -1725,7 +1725,8 @@ class IMP
         switch ($GLOBALS['browser']->getBrowser()) {
         case 'msie':
             $ie_major = $GLOBALS['browser']->getMajor();
-            if ($ie_major == 7) {
+            // TODO: IE8 specific styling
+            if ($ie_major >= 7) {
                 $browser_css[] = 'ie7.css';
                 $browser_css[] = 'ie7-dimp.css';
             } elseif ($ie_major < 7) {