all ImportantMessage deliveries are now done through trailing.html
[citadel.git] / webcit / static / t / edit_message.html
index 2a07b04ddcf994f62334623ab2abd1268f7386d7..c5cfbda9162df212981922a06e1289b710966a31 100644 (file)
@@ -1,11 +1,11 @@
 <?=("head")>
-<?=("important_msg")><?%("COND:LOGGEDIN", 1, 1, 1, "", ="paging")>
+<?%("COND:LOGGEDIN", 1, 1, 1, "", ="paging")>
 <?ROOMBANNER>
 <div id="content">
 
 <div id="attachments_form">
     <div id="loading">
-      <p><img src="static/throbber.gif" alt=""></p>
+      <p><img src="static/webcit_icons/throbber.gif" alt=""></p>
       <p><?_("Loading")></p>
     </div>
 </div>
 <div style="display:none" id="submit-o-matic"><ul>
 <li>
        <a href="javascript:submit_post('post');">
-               <img src="static/newmess3_24x.gif" alt="" width="24" height="24">
+               <img src="static/webcit_icons/essen/16x16/check.png" alt=""">
                <span class="navbar_link">
                <?!("COND:BSTR", 1, "__RCPTREQUIRED")><?_("Send message")><?!("X", 1)>
                <??("COND:BSTR", 2, "__RCPTREQUIRED")><?_("Post message")><?!("X", 2)>
 </li>
 <li>
        <a href="javascript:submit_post('draft');">
-               <img src="static/folder_closed.gif" alt="" width="24" height="24">
+               <img src="static/webcit_icons/essen/16x16/draft.png" alt=""">
                <span class="navbar_link">
                <?_("Save to Drafts")>
                </span>
 </li>
 <li>
        <a href="javascript:show_attachments_form();">
-               <img src="static/diskette_24x.gif" alt="" width="24" height="24">
+               <img src="static/webcit_icons/essen/16x16/attachement.png" alt=""">
                <span class="navbar_link">
-               <?_("Attach")>
+               <?_("Attachments:")>
+               <span id="num_attachments"><?MSG:NATTACH></span>
                </span>
        </a>
 </li>
 <li>
        <a href="javascript:submit_post('cancel');">
-               <img src="static/closewindow.gif" alt="">
+               <img src="static/webcit_icons/essen/16x16/abort.png" alt="">
                <span class="navbar_link">
                <?_("Cancel")>
                </span>
 </li>
 <?!("COND:BSTR", 1, "__RCPTREQUIRED")><li>
        <a href="javascript:PopOpenAddressBook('recp_id|<?_("To:")>|cc_id|<?_("CC:")>|bcc_id|<?_("BCC:")>');">
-               <img src="static/viewcontacts_24x.gif" alt="" width="24" height="24">
+               <img src="static/webcit_icons/essen/16x16/contact.png" alt=""">
                <span class="navbar_link">
                <?_("Contacts")>
                </span>
 
        function hide_attachments_form() {
                $('attachments_form').style.display = 'none';
+               update_attachment_count();
        }
 
        function show_attachments_form() {
                $('attachments_form').style.display = 'block';
 
-               p = 'template=attachments_pane&r=' + CtdlRandomString();
+               p = 'template=edit_message_attachments_pane&r=' + CtdlRandomString();
                new Ajax.Updater(
                        'attachments_form',
                        'do_template',
                );
        }
 
+       function update_attachment_count() {
+               p = 'r=' + CtdlRandomString();
+               new Ajax.Updater(
+                       'num_attachments',
+                       'show_num_attachments',
+                       {
+                               method: 'get',
+                               parameters: p
+                       }
+               );
+       }
+
+       function remove_attachment(which_one) {
+               p = 'which_attachment=' + which_one + '&r=' + CtdlRandomString();
+               new Ajax.Updater(
+                       'gonna_upload_this',
+                       'remove_attachment',
+                       {
+                               method: 'get',
+                               parameters: p,
+                               onComplete: function(){
+                                       show_attachments_form();
+                                       update_attachment_count();
+                               }
+                       }
+               );
+       }
+
 </script>
 </div>
 </div>