diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-05-24 15:10:36 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-05-24 15:10:36 +0400 |
commit | 1bb9aeb565fca50304881e36488b202455bdddd2 (patch) | |
tree | 6183996de1d4eacecfb930be127644e4eb4d11b7 /app/assets | |
parent | 7c6a58a756cc3bff78a6d0a0ca8abfe9b2c147da (diff) |
Fix specs. Fix note form reset after submit
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/notes.js.coffee | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee index 5be001e0a22..a41ee67a841 100644 --- a/app/assets/javascripts/notes.js.coffee +++ b/app/assets/javascripts/notes.js.coffee @@ -203,8 +203,7 @@ class Notes form.find(".js-errors").remove() # reset text and preview - previewContainer = form.find(".note-edit-and-preview") - previewContainer.removeClass "on" if previewContainer.is(".on") + form.find(".js-note-write-button").click() form.find(".js-note-text").val("").trigger "input" ### @@ -254,7 +253,7 @@ class Notes form.removeClass "js-new-note-form" # setup preview buttons - form.find(".js-note-edit-button, .js-note-preview-button").tooltip placement: "left" + form.find(".js-note-write-button, .js-note-preview-button").tooltip placement: "left" previewButton = form.find(".js-note-preview-button") form.find(".js-note-text").on "input", -> if $(this).val().trim() isnt "" |