Attachments: implement browsing & deleting using fineuploader
[citadel.git] / webcit / static / t / edit_message.html
index 9a534043e1e8300527ac745499fdca3a80a5f27d..320dec48c1c732c920d3d1de49bcf6ff207addf5 100644 (file)
@@ -1,20 +1,17 @@
 <?=("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><?_("Loading")></p>
-    </div>
+<div id="attachments_form" style="display:none">
+<?=("edit_message_attachments_pane")>
 </div>
 
 <div class="entmsg" id="entmsg"><form name="enterform" accept-charset="UTF-8" enctype="multipart/form-data" method="POST" action="post">
 <input type="hidden" name="postseq" value="<?DATE:NOW:NO>">
 <input type="hidden" name="return_to" value="<?BSTR("return_to")>">
 <input type="hidden" name="nonce" value="<?NONCE>">
-<input type="hidden" name="force_room" value="<?ROOMNAME("X")>">
+<input type="hidden" name="force_room" value="<?THISROOM:NAME("X")>">
 <input type="hidden" name="references" value="<?BSTR("references")>">
 <input type="hidden" name="page" value="<?BSTR("page")>">
 <input type="hidden" name="submit_action" value="">
@@ -44,7 +41,7 @@
 </select>
 <?!("X", 4)>
 
- <i><?_("in")></i> <?ROOMNAME></td></tr>
+ <i><?_("in")></i> <?THISROOM:NAME></td></tr>
 
 <?!("COND:BSTR", 5, "__RCPTREQUIRED")>
 <tr>
 <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';
+               update_attachment_count();
+       }
 
-               p = 'template=edit_message_attachments_pane&r=' + CtdlRandomString();
+       function update_attachment_count() {
+               p = 'r=' + CtdlRandomString();
                new Ajax.Updater(
-                       'attachments_form',
-                       'do_template',
+                       'num_attachments',
+                       'show_num_attachments',
                        {
                                method: 'get',
-                               parameters: p,
-                               evalScripts: true
+                               parameters: p
                        }
                );
        }