}
$("#notice_data-text").val("");
$("#notice_data-attach").val("");
+ $('#notice_data-attach_selected').remove();
counter();
}
$("#form_notice").removeClass("processing");
$("#form_notice").each(addAjaxHidden);
NoticeReply();
NoticeAttachments();
- NoticeDataAttachSelected();
+ NoticeDataAttach();
});
function NoticeReply() {
);
}
-function NoticeDataAttachSelected() {
- $('#notice_data-attach').change(function() {
- S = '<div id="notice_data-attach_selected" class="success">'+$(this).val()+'</div>';
+function NoticeDataAttach() {
+ NDA = $('#notice_data-attach');
+ NDA.change(function() {
+ S = '<div id="notice_data-attach_selected" class="success"><code>'+$(this).val()+'</code> <button>×</button></div>';
NDAS = $('#notice_data-attach_selected');
(NDAS.length > 0) ? NDAS.replaceWith(S) : $('#form_notice').append(S);
+ $('#notice_data-attach_selected button').click(function(){
+ $('#notice_data-attach_selected').remove();
+ NDA.val('');
+ });
});
}