From 597afb7ce23cf3b64903f37b4ab5a77f587c98bf Mon Sep 17 00:00:00 2001 From: Steven Verbeek Date: Sat, 24 Mar 2012 13:53:16 -0300 Subject: [PATCH] Started note attachment changes, and text changes --- app/assets/javascripts/note.js | 4 +++- app/assets/stylesheets/common.scss | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/note.js b/app/assets/javascripts/note.js index b1be8940..9e5d35a2 100644 --- a/app/assets/javascripts/note.js +++ b/app/assets/javascripts/note.js @@ -38,7 +38,9 @@ init: }); $("#note_attachment").change(function(e){ - alert($('input[type=file]').val()); + var val = $('input[type=file]').val(); + var filename = val.substr(val.lastIndexOf("/")); + $(".file_name").text(filename); }); }, diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index a559a5ea..009790e5 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -1110,7 +1110,13 @@ p.time { div.attachments { position:relative; width: 350px; - height: 40px; + height: 30px; + overflow:hidden; + margin:0 0 5px !important; + } + .file_name { + line-height:30px; + width:240px; overflow:hidden; } } \ No newline at end of file