<?=("head")>
-<?=("important_msg")><?%("COND:LOGGEDIN", 1, 1, 1, "", ="paging")>
+<?%("COND:LOGGEDIN", 1, 1, 1, "", ="paging")>
<?ROOMBANNER>
<div id="content">
-<div class="entmsg"><form name="enterform" accept-charset="UTF-8" enctype="multipart/form-data" method="POST" action="post">
+
+<div id="attachments_form">
+ <div id="loading">
+ <p><img src="static/webcit_icons/throbber.gif" alt=""></p>
+ <p><?_("Loading")></p>
+ </div>
+</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="">
-<p class="send_edit_msg">
-<?!("COND:BSTR", 1, "__RCPTREQUIRED")><input type="submit" name="send_button" value="<?_("Send message")>"><?!("X", 1)>
-<??("COND:BSTR", 2, "__RCPTREQUIRED")><input type="submit" name="send_button" value="<?_("Post message")>"><?!("X", 2)>
-
- <input type="submit" name="save_button" value="<?_("Save to Drafts")>">
-
- <input type="submit" name="cancel_button" value="<?_("Cancel")>">
-</p>
-<img src="static/newmess3_24x.gif" class="imgedit"> <?DATE:NOW:STR>
<table width="100%" class="edit_msg_table">
-<tr><th><label for="from_id" > <i><?_("from")></i> </label></th><td colspan="2">
+<tr><th><label for="from_id"><i><?_("from")></i></label></th><td>
<??("COND:BSTR", 4, "__RCPTREQUIRED")>
<select name="display_name" size=1 id="from_id">
</select>
<?!("X", 4)>
- <i><?_("in")></i> <?ROOMNAME></td></tr>
+ <i><?_("in")></i> <?THISROOM:NAME></td></tr>
<?!("COND:BSTR", 5, "__RCPTREQUIRED")>
<tr>
<td><input autocomplete="off" type="text" name="recp" id="recp_id" value="<?BSTR("recp", "H")>" size=45 maxlength=1000 />
<div class="auto_complete" id="recp_name_choices"></div>
</td>
- <td rowspan="3" align="left" valign="top">
- <a href="javascript:PopOpenAddressBook('recp_id|<?_("To:")>|cc_id|<?_("CC:")>|bcc_id|<?_("BCC:")>');" title="<?_("Contacts")>">
- <img align=middle border=0 width=24 height=24 src="static/viewcontacts_24x.gif"> <?_("Contacts")>
- </a>
- </td>
</tr>
<tr>
<th><label for="cc_id"><?_("CC:")></label></th>
<th><label for="subject_id" >
<?%("COND:BSTR", 6, "__SUBJREQUIRED", 0, _("Subject (optional):"), _("Subject:")>
</label></th>
- <td colspan="2">
+ <td>
<input type="text" name="subject" id="subject_id" value="<?BSTR("subject", "H")>" size=45 maxlength=70>
</td>
</tr>
-<tr><td colspan="3">
-<input type="hidden" name="sig_inserted" value="yes">
-
-
+</td></tr>
+</table>
+<input type="hidden" name="sig_inserted" value="yes">
-<textarea name="msgtext" cols="80" rows="15">
+<textarea name="msgtext" id="msgtext" cols="80" rows="15">
<?BSTR("msgtext", "X")><?!("COND:BSTR", 1, "fwdquote")><br />
<div align=center>
<i>
<?!("X", 6)><??("X", 5)><?!("X", 4)><?!("COND:ROOM:TYPE_IS", 7, #"VIEW_WIKI")><?MAIL:EDITWIKI("X")><?!("X", 7)>
</textarea>
-
-
-
<?=("richedit")>
-<div class="attachment buttons">
-<img src="static/diskette_24x.gif" class="imgedit" ><?_("Attachments:")>
-<select name="which_attachment" size=1>
-<?ITERATE("MSG:ATTACHNAMES", ="edit_message_section_attach_select")>
-</select>
- <?_("Attach file:")>
-<input name="attachfile" class="attachfile" size=16 type="file">
- <input type="submit" name="attach_button" value="<?_("Add")>">
- <input type="submit" name="remove_attach_button" value="<?_("Remove")>">
-
-</div></td></tr></table></form>
-
+</form>
+
+<div style="display:none" id="submit-o-matic"><ul>
+<li>
+ <a href="javascript:submit_post('post');">
+ <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)>
+ </span>
+ </a>
+</li>
+<li>
+ <a href="javascript:submit_post('draft');">
+ <img src="static/webcit_icons/essen/16x16/draft.png" alt=""">
+ <span class="navbar_link">
+ <?_("Save to Drafts")>
+ </span>
+ </a>
+</li>
+<li>
+ <a href="javascript:show_attachments_form();">
+ <img src="static/webcit_icons/essen/16x16/attachement.png" alt=""">
+ <span class="navbar_link">
+ <?_("Attachments:")>
+ <span id="num_attachments"><?MSG:NATTACH></span>
+ </span>
+ </a>
+</li>
+<li>
+ <a href="javascript:submit_post('cancel');">
+ <img src="static/webcit_icons/essen/16x16/abort.png" alt="">
+ <span class="navbar_link">
+ <?_("Cancel")>
+ </span>
+ </a>
+</li>
+<?!("COND:BSTR", 1, "__RCPTREQUIRED")><li>
+ <a href="javascript:PopOpenAddressBook('recp_id|<?_("To:")>|cc_id|<?_("CC:")>|bcc_id|<?_("BCC:")>');">
+ <img src="static/webcit_icons/essen/16x16/contact.png" alt=""">
+ <span class="navbar_link">
+ <?_("Contacts")>
+ </span>
+ </a>
+</li><?!("X", 1)>
+</div>
<script type="text/javascript">
- activate_entmsg_autocompleters();
+
+ $("navbar").innerHTML = $("submit-o-matic").innerHTML;
+ <?!("COND:BSTR", 1, "__RCPTREQUIRED")>
+ activate_entmsg_autocompleters();
+ <?!("X", 1)>
+
+ function submit_post(which_action) {
+ document.enterform.submit_action.value = which_action;
+ document.enterform.submit();
+ }
+
+ function hide_attachments_form() {
+ $('attachments_form').style.display = 'none';
+ update_attachment_count();
+ }
+
+ function show_attachments_form() {
+ $('attachments_form').style.display = 'block';
+
+ p = 'template=edit_message_attachments_pane&r=' + CtdlRandomString();
+ new Ajax.Updater(
+ 'attachments_form',
+ 'do_template',
+ {
+ method: 'get',
+ parameters: p,
+ evalScripts: true
+ }
+ );
+ }
+
+ 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>