summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-20 09:53:39 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-20 09:53:39 +0200
commit72db22d385ad98eea44bdc880ca08c95f867241e (patch)
tree088c72a97420ca930be98c0e214a2c5c3b0c0f63
parent316cf61965f70e90fb158e6172e2859f2535f46b (diff)
downloadgitlab-ce-72db22d385ad98eea44bdc880ca08c95f867241e.tar.gz
send wall message with crtl+enter
-rw-r--r--app/assets/javascripts/wall.js.coffee4
-rw-r--r--app/views/walls/show.html.haml1
2 files changed, 5 insertions, 0 deletions
diff --git a/app/assets/javascripts/wall.js.coffee b/app/assets/javascripts/wall.js.coffee
index a0a221fa484..e53a9e7798f 100644
--- a/app/assets/javascripts/wall.js.coffee
+++ b/app/assets/javascripts/wall.js.coffee
@@ -61,6 +61,10 @@
filename = $(this).val().replace(/^.*[\\\/]/, '')
form.find(".js-attachment-filename").text(filename)
+ form.find('.note_text').keydown (e) ->
+ if e.ctrlKey && e.keyCode == 13
+ form.find('.js-comment-button').submit()
+
form.show()
renderNote: (note) ->
diff --git a/app/views/walls/show.html.haml b/app/views/walls/show.html.haml
index d2d86c2be82..0cd29486d93 100644
--- a/app/views/walls/show.html.haml
+++ b/app/views/walls/show.html.haml
@@ -24,6 +24,7 @@
%span.file_name.js-attachment-filename File name...
= f.file_field :attachment, class: "js-note-attachment-input hide"
+ .hint.pull-right CTRL + Enter to send message
.clearfix
:javascript