Fix inline-block display in IE 8
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 24 Aug 2009 16:47:23 +0000 (10:47 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 24 Aug 2009 17:12:54 +0000 (11:12 -0600)
imp/js/imp.js
imp/lib/UI/Message.php

index 81318be..8acf1ca 100644 (file)
@@ -10,7 +10,7 @@ document.observe('dom:loaded', function() {
         window.IMP = {};
     }
 
-    window.IMP.menuFolderSubmit = function(clear)
+    IMP.menuFolderSubmit = function(clear)
     {
         var mf = $('menuform');
 
@@ -24,18 +24,18 @@ document.observe('dom:loaded', function() {
     /**
      * Use DOM manipulation to un-block images.
      */
-    window.IMP.unblockImages = function(e)
+    IMP.unblockImages = function(e)
     {
         var elt = e.element().up('TABLE.mimeStatusMessage');
 
-        elt.next('.htmlMessage').select('[blocked]').each(function(e) {
-            var src = decodeURIComponent(e.readAttribute('blocked'));
-            if (e.hasAttribute('src')) {
-                e.writeAttribute('src', src);
-            } else if (e.hasAttribute('background')) {
-                e.writeAttribute('background', src);
-            } else if (e.style.backgroundImage) {
-                e.setStyle({ backgroundImage: 'url(' + src + ')' });
+        elt.up().next('.htmlMessage').select('[blocked]').each(function(b) {
+            var src = decodeURIComponent(b.readAttribute('blocked'));
+            if (b.hasAttribute('src')) {
+                b.writeAttribute('src', src);
+            } else if (b.hasAttribute('background')) {
+                b.writeAttribute('background', src);
+            } else if (b.style.backgroundImage) {
+                b.setStyle({ backgroundImage: 'url(' + src + ')' });
             }
         });
 
@@ -50,7 +50,7 @@ document.observe('dom:loaded', function() {
     // If menu is present, attach event handlers to folder switcher.
     var tmp = $('openfoldericon');
     if (tmp) {
-        $('menuform').observe('change', window.IMP.menuFolderSubmit.bind(window.IMP));
-        tmp.down().observe('click', window.IMP.menuFolderSubmit.bind(window.IMP, true));
+        $('menuform').observe('change', IMP.menuFolderSubmit.bind(IMP));
+        tmp.down().observe('click', IMP.menuFolderSubmit.bind(IMP, true));
     }
 });
index f7fedc5..fd7344e 100644 (file)
@@ -423,7 +423,7 @@ class IMP_UI_Message
 
         $class = 'mimeStatusMessage';
 
-        $out = array('<table ' . (isset($data['id']) ? ('id="' . $data['id'] . '" ') : '') . 'class="' . $class . '">');
+        $out = array('<div><table ' . (isset($data['id']) ? ('id="' . $data['id'] . '" ') : '') . 'class="' . $class . '">');
 
         /* If no image, simply print out the message. */
         if (empty($data['icon'])) {
@@ -438,7 +438,7 @@ class IMP_UI_Message
             $out[] = '</table></td></tr>';
         }
 
-        return implode("\n", $out) . "\n</table>\n";
+        return implode("\n", $out) . "\n</table></div>\n";
     }
 
     /**