Yet more CSS/template tweaking in dimp
authorMichael M Slusarz <slusarz@curecanti.org>
Sun, 25 Oct 2009 05:27:16 +0000 (23:27 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 26 Oct 2009 18:35:45 +0000 (12:35 -0600)
imp/js/compose-dimp.js
imp/templates/chunks/compose.php
imp/themes/screen-dimp.css

index 9a972de..0a154b3 100644 (file)
@@ -54,7 +54,7 @@ var DimpCompose = {
 
         $('composeCache').setValue('');
         $('qreply', 'sendcc', 'sendbcc').invoke('hide');
-        [ $('msgData'), $('togglecc').up(), $('togglebcc').up() ].invoke('show');
+        [ $('msgData'), $('togglecc'), $('togglebcc') ].invoke('show');
         if (this.editor_on) {
             this.toggleHtmlEditor();
         }
@@ -135,7 +135,7 @@ var DimpCompose = {
         }
 
         $('save_sent_mail_folder').setValue(s);
-        $('sent_mail_folder_label').writeAttribute('title', l.escapeHTML()).setText('"' + l.truncate(15) + '"').up().show();
+        $('sent_mail_folder_label').writeAttribute('title', l.escapeHTML()).setText('"' + l.truncate(15) + '"').up(1).show();
 
         if (sel) {
             this.knl.setSelected(s);
@@ -534,10 +534,10 @@ var DimpCompose = {
     addAttach: function(atc_num, name, type, size)
     {
         var span = new Element('SPAN').insert(name),
-            div = new Element('DIV').insert(span).insert(' [' + type + '] (' + size + ' KB) '),
+            li = new Element('LI').insert(span).insert(' [' + type + '] (' + size + ' KB) '),
             input = new Element('SPAN', { atc_id: atc_num, className: 'remove' }).insert(DIMP.text_compose.remove);
-        div.insert(input);
-        $('attach_list').insert(div);
+        li.insert(input);
+        $('attach_list').insert(li).show();
 
         if (type != 'application/octet-stream') {
             span.addClassName('attachName');
@@ -554,6 +554,9 @@ var DimpCompose = {
             ids.push(n.down('SPAN.remove').readAttribute('atc_id'));
             n.remove();
         });
+        if (!$('attach_list').childElements().size()) {
+            $('attach_list').hide();
+        }
         DimpCore.doAction('DeleteAttach', { atc_indices: ids, imp_compose: $F('composeCache') });
         this.resizeMsgArea();
     },
@@ -612,7 +615,7 @@ var DimpCompose = {
     toggleCC: function(type)
     {
         $('send' + type).show();
-        $('toggle' + type).up().hide();
+        $('toggle' + type).hide();
     },
 
     /* Sets the cursor to the given position. */
index 716a6a9..edab1ae 100644 (file)
@@ -50,23 +50,41 @@ function _createDAcompose($text, $image, $id)
 <div id="writemsg" class="noprint">
  <div class="msgwrite">
   <div class="dimpOptions">
-   <label><input id="togglecc" name="togglecc" type="checkbox" class="checkbox" /> <?php echo _("Show Cc") ?></label>
-   <label><input id="togglebcc" name="togglebcc" type="checkbox" class="checkbox" /> <?php echo _("Show Bcc") ?></label>
+   <div id="togglecc">
+    <label>
+     <input name="togglecc" type="checkbox" class="checkbox" /> <?php echo _("Show Cc") ?>
+    </label>
+   </div>
+   <div id="togglebcc">
+    <label>
+     <input name="togglebcc" type="checkbox" class="checkbox" /> <?php echo _("Show Bcc") ?>
+    </label>
+  </div>
 <?php if ($rte): ?>
-   <label><input id="htmlcheckbox" type="checkbox" class="checkbox"<?php if ($compose_html) echo 'checked="checked"' ?> /> <?php echo _("HTML composition") ?></label>
+   <div>
+    <label>
+     <input id="htmlcheckbox" type="checkbox" class="checkbox"<?php if ($compose_html) echo 'checked="checked"' ?> /> <?php echo _("HTML composition") ?>
+    </label>
+   </div>
 <?php endif; ?>
 <?php if ($GLOBALS['conf']['compose']['allow_receipts'] && $d_read != 'never'): ?>
-   <label><input name="request_read_receipt" type="checkbox" class="checkbox"<?php if ($d_read != 'ask') echo ' checked="checked"' ?> /> <?php echo _("Read Receipt") ?></label>
+   <div>
+    <label>
+     <input name="request_read_receipt" type="checkbox" class="checkbox"<?php if ($d_read != 'ask') echo ' checked="checked"' ?> /> <?php echo _("Read Receipt") ?>
+    </label>
+   </div>
 <?php endif; ?>
 <?php if ($GLOBALS['conf']['user']['allow_folders'] && !$GLOBALS['prefs']->isLocked('save_sent_mail')): ?>
-   <label style="display:none">
-    <input id="save_sent_mail" name="save_sent_mail" type="checkbox" class="checkbox"<?php if ($identity->saveSentmail()) echo ' checked="checked"' ?> /> <?php echo _("Save in") ?>
-    <span id="sent_mail_folder_label"></span>
-   </label>
-   <input id="save_sent_mail_folder" name="save_sent_mail_folder" type="hidden" />
+   <div style="display:none">
+    <label>
+     <input id="save_sent_mail" name="save_sent_mail" type="checkbox" class="checkbox"<?php if ($identity->saveSentmail()) echo ' checked="checked"' ?> /> <?php echo _("Save in") ?>
+     <span id="sent_mail_folder_label"></span>
+    </label>
+    <input id="save_sent_mail_folder" name="save_sent_mail_folder" type="hidden" />
+   </div>
 <?php endif; ?>
   </div>
-  <table cellspacing="0">
+  <table>
    <tr>
     <td class="label"><?php echo _("From: ") ?></td>
     <td>
@@ -83,7 +101,7 @@ function _createDAcompose($text, $image, $id)
      <textarea id="to" name="to" rows="1" cols="75"></textarea>
      <div id="to_results" class="autocomplete" style="display:none"></div>
     </td>
-    <td class="autocompleteImg">
+    <td>
      <span id="to_loading_img" class="loadingImg" style="display:none"></span>
     </td>
    </tr>
@@ -93,7 +111,7 @@ function _createDAcompose($text, $image, $id)
      <textarea id="cc" name="cc" rows="1" cols="75"></textarea>
      <div id="cc_results" class="autocomplete" style="display:none"></div>
     </td>
-    <td class="autocompleteImg">
+    <td>
      <span id="cc_loading_img" class="loadingImg" style="display:none"></span>
     </td>
    </tr>
@@ -103,7 +121,7 @@ function _createDAcompose($text, $image, $id)
      <textarea id="bcc" name="bcc" rows="1" cols="75"></textarea>
      <div id="bcc_results" class="autocomplete" style="display:none"></div>
     </td>
-    <td class="autocompleteImg">
+    <td>
      <span id="bcc_loading_img" class="loadingImg" style="display:none"></span>
     </td>
    </tr>
@@ -119,7 +137,7 @@ function _createDAcompose($text, $image, $id)
 <?php if (strpos($save_attach, 'prompt') !== false): ?>
      <label><input type="checkbox" class="checkbox" name="save_attachments_select"<?php if (strpos($save_attach, 'yes') !== false) echo ' checked="checked"' ?> /> <?php echo _("Save Attachments in sent folder") ?></label><br />
 <?php endif; ?>
-     <div id="attach_list"></div>
+     <ul id="attach_list" style="display:none"></ul>
     </td>
    </tr>
   </table>
index cfc233c..830436a 100644 (file)
@@ -309,12 +309,6 @@ div.vpRow.flagDeleted {
 #sidebarPanel li span {
     cursor: pointer;
 }
-#sidebarPanel .folderlist li a {
-    width: auto;
-    overflow: hidden;
-    display: block;
-    float: none;
-}
 #sidebarPanel li.subfolders {
     height: auto;
     margin: 0;
@@ -412,7 +406,7 @@ div.vpRow.flagDeleted {
 .dimpActions .disabled a:hover {
     background-color: transparent;
 }
-.dimpActions .disabled a, .dimpActions .disabled a:visited, .dimpActions .disabled a:active, .dimpActions .disabled a:hover {
+.dimpactions .disabled, .dimpActions .disabled a, .dimpActions .disabled a:visited, .dimpActions .disabled a:active, .dimpActions .disabled a:hover {
     cursor: default;
     text-decoration: none;
     color: silver;
@@ -437,15 +431,13 @@ div.dimpActionsCompose, div.dimpActionsMsg {
 
 /* Preview pane styles. */
 #previewPane {
-    background: #fff;
     overflow: auto;
 }
 #previewInfo {
     background: transparent url("graphics/ico_message_off.png") no-repeat scroll 10px 15px;
+    color: #a0a0a0;
     line-height: 18px;
-    text-align: left;
     padding: 15px 80px 10px 35px;
-    color: #a0a0a0;
 }
 
 /* Headers styles. */
@@ -531,27 +523,30 @@ div.dimpActionsCompose, div.dimpActionsMsg {
 #msgHeadersColl span.subject {
     float: left;
     font-weight: bold;
+    max-width: 50%;
     overflow: hidden;
     padding-left: 2px;
-    max-width: 40%;
-    vertical-align: top;
+    text-overflow: ellipsis;
+    -o-text-overflow: ellipsis;
+    -ms-text-overflow: ellipsis;
 }
 #msgHeadersColl span.fromcontainer {
     padding-left: 5px;
 }
 #msgHeadersColl span.from {
-    max-width: 50%;
+    max-width: 40%;
     overflow: hidden;
+    text-overflow: ellipsis;
+    -o-text-overflow: ellipsis;
+    -ms-text-overflow: ellipsis;
 }
 /* end msg small header */
 
+/* Message body formatting. */
 .msgBody {
     background: #fff url("graphics/backhead_shadow.png") top repeat-x;
     padding: 7px 5px 5px;
 }
-.msgBody table td {
-    padding: 0;
-}
 .msgfullread div.msgBody {
     overflow: auto;
 }
@@ -572,61 +567,46 @@ div.dimpActionsCompose, div.dimpActionsMsg {
 }
 
 .msgwrite {
-    cursor: default;
     background: #e2e2e2 url("graphics/backhead_r.png") repeat-x;
     border: 1px #b9b9b3 solid;
+    cursor: default;
     padding: 2px 0;
 }
 .msgwrite .dimpOptions {
-    padding: 10px;
+    padding: 8px 8px 0 0;
     font-size: 90%;
 }
+.msgwrite .dimpOptions div {
+    padding-bottom: 0;
+}
 .msgwrite .dimpOptions label {
-    display: block;
     cursor: pointer;
 }
 .msgwrite tr {
     vertical-align: top;
 }
 .msgwrite td {
-    padding: 3px 5px 1px 0;
     font-size: 90%;
 }
 .msgwrite td.label {
-    height: 15px;
     white-space: nowrap;
     text-align: right;
-    width: 65px;
-    padding-top: 4px;
-    padding-left: 2px;
+    padding: 4px 4px 0 4px;
 }
-.msgwrite td.subject {
-    font-weight: bold;
-}
-.msgwrite .atcrow {
-    line-height: 130%;
+.msgwrite span.loadingImg {
+    display: block;
 }
+
 #to, #cc, #bcc, #subject {
     width: 100%;
 }
 
-.msgwrite td.autocompleteImg {
-    width: 25px;
-}
-.msgwrite td.autocompleteImg span.loadingImg {
-    display: block;
-}
-
 #composeMessageParent {
     background: #fff url("graphics/backhead_shadow.png") top repeat-x;
     border-left: 1px silver solid;
     border-right: 1px silver solid;
     border-bottom: 1px silver solid;
-    padding: 1%;
-}
-#composeMessageParent .htmlarea {
-    width: 98% !important;
-    border: none;
+    padding: 10px 5px 5px;
 }
 #composeMessage {
     border: none;
@@ -655,31 +635,31 @@ div.dimpActionsCompose, div.dimpActionsMsg {
 
 /* attachment file list */
 #attach_list {
+    padding-left: 15px;
+}
+#attach_list li {
     padding-top: 5px;
 }
 #attach_list span.remove {
     border: 1px solid #ccc;
     font-weight: bold;
-    padding: 1px 2px;
+    padding: 1px;
 }
 #attach_list span.remove:hover {
+    color: red;
     text-decoration: underline;
 }
-#attach_list div {
-    background: transparent left 2px no-repeat;
-    height: 20px;
-    padding-left: 20px;
-}
-#attach_list div, span.attachmentImg {
-    background-image: url("graphics/attachment.png");
-}
 #attach_list span.attachName {
     color: blue;
     cursor: pointer;
     text-decoration: underline;
 }
 #attach_list span.attachName:hover {
-    font-weight: bold;
+    color: red;
+}
+
+span.attachmentImg {
+    background-image: url("graphics/attachment.png");
 }
 
 /* Context Menus */