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 61 filename = $(this).val().replace(/^.*[\\\/]/, '')
62 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 68 form.show()
65 69  
66 70 renderNote: (note) ->
... ...
app/views/walls/show.html.haml
... ... @@ -24,6 +24,7 @@
24 24 %span.file_name.js-attachment-filename File name...
25 25 = f.file_field :attachment, class: "js-note-attachment-input hide"
26 26  
  27 + .hint.pull-right CTRL + Enter to send message
27 28 .clearfix
28 29  
29 30 :javascript
... ...