]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Shows the selected file attachment under the form_notice textarea
authorSarven Capadisli <csarven@controlyourself.ca>
Thu, 25 Jun 2009 16:55:19 +0000 (16:55 +0000)
committerSarven Capadisli <csarven@controlyourself.ca>
Thu, 25 Jun 2009 16:55:19 +0000 (16:55 +0000)
js/util.js
theme/base/css/display.css

index 221c851206dadd229bf4af29e9917e326ada0136..9156045bbf025e4f53ad2b235342a26fbd7275b7 100644 (file)
@@ -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);
+    });
+}
index d01be770043372a56b246cfa93992b6c41c70be3..bfcc9a7fa636ebb51e7fb32ad2686128eb8d5c01 100644 (file)
@@ -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;
 }