summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@controlyourself.ca>2009-06-25 16:55:19 +0000
committerSarven Capadisli <csarven@controlyourself.ca>2009-06-25 16:55:19 +0000
commit1e17f1256a1166db6bd3acd35fd437262ba27ffd (patch)
tree94ac6b66e033f9d7ba044e2a4d9cb7595c77b3bc /js
parent262f864555dcad18fbdd044f753584dae5729e86 (diff)
Shows the selected file attachment under the form_notice textarea
Diffstat (limited to 'js')
-rw-r--r--js/util.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/util.js b/js/util.js
index 221c85120..9156045bb 100644
--- a/js/util.js
+++ b/js/util.js
@@ -233,6 +233,7 @@ $(document).ready(function(){
$("#form_notice").each(addAjaxHidden);
NoticeReply();
NoticeAttachments();
+ NoticeDataAttachSelected();
});
function NoticeReply() {
@@ -310,3 +311,11 @@ function NoticeAttachments() {
}
);
}
+
+function NoticeDataAttachSelected() {
+ $('#notice_data-attach').change(function() {
+ S = '<div id="notice_data-attach_selected" class="success">'+$(this).val()+'</div>';
+ NDAS = $('#notice_data-attach_selected');
+ (NDAS.length > 0) ? NDAS.replaceWith(S) : $('#form_notice').append(S);
+ });
+}