From: Michael M Slusarz Date: Sun, 25 Oct 2009 00:09:25 +0000 (-0600) Subject: Better loading UI for dimp compose screen X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=13bd5280e92d8140db345a41302faa9b3a17ad0a;p=horde.git Better loading UI for dimp compose screen --- diff --git a/imp/js/compose-dimp.js b/imp/js/compose-dimp.js index 9e6c2a7b6..dc6ad60c2 100644 --- a/imp/js/compose-dimp.js +++ b/imp/js/compose-dimp.js @@ -123,16 +123,21 @@ var DimpCompose = { setSentMailLabel: function(s, l, sel) { var label = $('sent_mail_folder_label'); - if (label) { - if (!l) { - l = DIMP.conf_compose.flist.find(function(f) { - return f.v == s; - }); - l = l.f || l.v; - } - $('save_sent_mail_folder').setValue(s); - $('sent_mail_folder_label').writeAttribute('title', l.escapeHTML()).setText('"' + l.truncate(15) + '"'); + + if (!label) { + return; } + + if (!l) { + l = DIMP.conf_compose.flist.find(function(f) { + return f.v == s; + }); + l = l.f || l.v; + } + + $('save_sent_mail_folder').setValue(s); + $('sent_mail_folder_label').writeAttribute('title', l.escapeHTML()).setText('"' + l.truncate(15) + '"').up().show(); + if (sel) { this.knl.setSelected(s); } @@ -594,8 +599,6 @@ var DimpCompose = { if (de.scrollHeight - de.clientHeight) { msg.writeAttribute({ rows: rows - 1 }); } - - $('composeloading').hide(); }, uploadAttachment: function() @@ -765,13 +768,6 @@ var DimpCompose = { this.resizecc = new ResizeTextArea('cc', boundResize); this.resizebcc = new ResizeTextArea('bcc', boundResize); - // Safari requires a submit target iframe to be at least 1x1 size or - // else it will open content in a new window. See: - // http://blog.caboo.se/articles/2007/4/2/ajax-file-upload - if (Prototype.Browser.WebKit) { - $('submit_frame').writeAttribute({ position: 'absolute', width: '1px', height: '1px' }).setStyle({ left: '-999px' }).show(); - } - /* Add addressbook link formatting. */ if (DIMP.conf_compose.URI_ABOOK) { $('sendto', 'sendcc', 'sendbcc').each(function(a) { @@ -789,6 +785,17 @@ var DimpCompose = { this.knl.setSelected(this.get_identity($F('identity'))[3]); $('sent_mail_folder_label').insert({ after: new Element('SPAN', { className: 'popdownImg', id: 'compose_flist_popdown' }).observe('click', function(e) { this.knl.show(); e.stop(); }.bindAsEventListener(this)) }); } + + $('dimpLoading').hide(); + $('pageContainer').show(); + + // Safari requires a submit target iframe to be at least 1x1 size or + // else it will open content in a new window. See: + // http://blog.caboo.se/articles/2007/4/2/ajax-file-upload + if (Prototype.Browser.WebKit) { + $('submit_frame').writeAttribute({ position: 'absolute', width: '1px', height: '1px' }).setStyle({ left: '-999px' }).show(); + } + } }, diff --git a/imp/templates/chunks/compose.php b/imp/templates/chunks/compose.php index e6caf0cd2..716a6a997 100644 --- a/imp/templates/chunks/compose.php +++ b/imp/templates/chunks/compose.php @@ -32,7 +32,6 @@ function _createDAcompose($text, $image, $id) } ?> -
@@ -60,7 +59,7 @@ function _createDAcompose($text, $image, $id) isLocked('save_sent_mail')): ?> -