diff options
Diffstat (limited to 'app/assets/javascripts/notes.js')
-rw-r--r-- | app/assets/javascripts/notes.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index 81bb1d6d1b0..4a55b41b1ab 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -34,16 +34,21 @@ var NoteList = { disableButtonIfEmptyField(".note-text", ".submit_note"); - $(".note-text").on("focus", function(){ - $(this).css("height", "80px"); - $('.note_advanced_opts').show(); - }); - $("#note_attachment").change(function(e){ var val = $('.input-file').val(); var filename = val.replace(/^.*[\\\/]/, ''); $(".file_name").text(filename); }); + + if(this.reversed) { + var textarea = $(".note-text"); + $('.note_advanced_opts').hide(); + textarea.css("height", "40px"); + textarea.on("focus", function(){ + $(this).css("height", "80px"); + $('.note_advanced_opts').show(); + }); + } }, |