Commit 27244e0c9e1128902615c834cd1fdedc1dbdb4e2
1 parent
c2c4424f
Exists in
master
and in
4 other branches
Fixed line ending issues on windows.
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/assets/javascripts/note.js
... | ... | @@ -39,7 +39,7 @@ init: |
39 | 39 | |
40 | 40 | $("#note_attachment").change(function(e){ |
41 | 41 | var val = $('.input-file').val(); |
42 | - var filename = val.substr(val.lastIndexOf("/")); | |
42 | + var filename = val.replace(/^.*[\\\/]/, ''); | |
43 | 43 | console.log(filename,val); |
44 | 44 | $(".file_name").text(filename); |
45 | 45 | }); | ... | ... |