Commit 72db22d385ad98eea44bdc880ca08c95f867241e

Authored by Dmitriy Zaporozhets
1 parent 316cf619

send wall message with crtl+enter

app/assets/javascripts/wall.js.coffee
@@ -61,6 +61,10 @@ @@ -61,6 +61,10 @@
61 filename = $(this).val().replace(/^.*[\\\/]/, '') 61 filename = $(this).val().replace(/^.*[\\\/]/, '')
62 form.find(".js-attachment-filename").text(filename) 62 form.find(".js-attachment-filename").text(filename)
63 63
  64 + form.find('.note_text').keydown (e) ->
  65 + if e.ctrlKey && e.keyCode == 13
  66 + form.find('.js-comment-button').submit()
  67 +
64 form.show() 68 form.show()
65 69
66 renderNote: (note) -> 70 renderNote: (note) ->
app/views/walls/show.html.haml
@@ -24,6 +24,7 @@ @@ -24,6 +24,7 @@
24 %span.file_name.js-attachment-filename File name... 24 %span.file_name.js-attachment-filename File name...
25 = f.file_field :attachment, class: "js-note-attachment-input hide" 25 = f.file_field :attachment, class: "js-note-attachment-input hide"
26 26
  27 + .hint.pull-right CTRL + Enter to send message
27 .clearfix 28 .clearfix
28 29
29 :javascript 30 :javascript