Show loading text before iframe content is injected
authorMichael M Slusarz <slusarz@curecanti.org>
Sun, 11 Oct 2009 22:06:36 +0000 (16:06 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Sun, 11 Oct 2009 22:15:12 +0000 (16:15 -0600)
imp/js/imp.js
imp/lib/Mime/Viewer/Html.php

index c0fa935..8456e28 100644 (file)
@@ -93,6 +93,7 @@ document.observe('dom:loaded', function() {
         d.write(data);
         d.close();
 
+        id.show().previous().remove();
         this.iframeResize(id);
     };
 
index a81d836..ad55a9c 100644 (file)
@@ -118,7 +118,7 @@ class IMP_Horde_Mime_Viewer_Html extends Horde_Mime_Viewer_Html
         $uid = 'htmldata_' . uniqid(mt_rand());
 
         $data['js'] = array('IMP.iframeInject("' . $uid . '", ' . Horde_Serialize::serialize($data['data'], Horde_Serialize::JSON, $this->_mimepart->getCharset()) . ')');
-        $data['data'] = '<IFRAME class="htmlMsgData" id="' . $uid . '" src="javascript:false" frameborder="0"></IFRAME>' .
+        $data['data'] = '<DIV>' . _("Loading...") . '</DIV><IFRAME class="htmlMsgData" id="' . $uid . '" src="javascript:false" frameborder="0" style="display:none"></IFRAME>' .
             Horde_Util::bufferOutput(array('Horde', 'addScriptFile'), 'imp.js', 'imp');
         $data['type'] = 'text/html; charset=UTF-8';