From 1e17f1256a1166db6bd3acd35fd437262ba27ffd Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 25 Jun 2009 16:55:19 +0000 Subject: [PATCH] Shows the selected file attachment under the form_notice textarea --- js/util.js | 9 +++++++++ theme/base/css/display.css | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/js/util.js b/js/util.js index 221c851206..9156045bbf 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 = '
'+$(this).val()+'
'; + NDAS = $('#notice_data-attach_selected'); + (NDAS.length > 0) ? NDAS.replaceWith(S) : $('#form_notice').append(S); + }); +} diff --git a/theme/base/css/display.css b/theme/base/css/display.css index d01be77004..bfcc9a7fa6 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -510,10 +510,11 @@ margin-bottom:7px; margin-left:18px; float:left; } -#form_notice .error { +#form_notice .error, +#form_notice .success { float:left; clear:both; -width:96.9%; +width:81.5%; margin-bottom:0; line-height:1.618; } -- 2.39.5