Commit c2c4424ff82a4325129a3d14a4d18099a368050c
1 parent
597afb7c
Exists in
master
and in
4 other branches
Started note attachment changes, and text changes
Showing
2 changed files
with
3 additions
and
2 deletions
Show diff stats
app/assets/javascripts/note.js
... | ... | @@ -38,8 +38,9 @@ init: |
38 | 38 | }); |
39 | 39 | |
40 | 40 | $("#note_attachment").change(function(e){ |
41 | - var val = $('input[type=file]').val(); | |
41 | + var val = $('.input-file').val(); | |
42 | 42 | var filename = val.substr(val.lastIndexOf("/")); |
43 | + console.log(filename,val); | |
43 | 44 | $(".file_name").text(filename); |
44 | 45 | }); |
45 | 46 | ... | ... |
app/views/notes/_form.html.haml
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 | %h5 Attachment: |
26 | 26 | .clearfix |
27 | 27 | .attachments.breadcrumb |
28 | - %span.file_name File name... | |
28 | + %div.file_name File name... | |
29 | 29 | %button.file_upload.btn.primary Upload File |
30 | 30 | .input= f.file_field :attachment, :class => "input-file" |
31 | 31 | %span Any file less then 10 MB | ... | ... |