<a href="javascript:show_attachments_form();">
<img src="static/diskette_24x.gif" alt="" width="24" height="24">
<span class="navbar_link">
- <?_("Attach")>
+ <?_("Attachments:")>
+ <span id="num_attachments">0</span>
</span>
</a>
</li>
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
+ }
+ );
+ }
+
</script>
</div>
</div>