diff --git a/app/assets/javascripts/admin/users.js b/app/assets/javascripts/admin/users.js index 1b0df3a..9166e5c 100644 --- a/app/assets/javascripts/admin/users.js +++ b/app/assets/javascripts/admin/users.js @@ -21,8 +21,8 @@ $(document).on('ready page:load', function () { index: 1 }]); - $("textarea").keydown(function(e){ - // Enter was pressed without shift key + $("textarea.shift-enter").keydown(function(e){ + if (e.keyCode == 13 && !e.shiftKey) { if (this.form) @@ -31,6 +31,7 @@ $(document).on('ready page:load', function () { e.preventDefault(); return false; } + }); $('#user_filter_word').textcomplete([ diff --git a/app/views/admin/messages/new.html.erb b/app/views/admin/messages/new.html.erb index 8824f68..bb6555f 100644 --- a/app/views/admin/messages/new.html.erb +++ b/app/views/admin/messages/new.html.erb @@ -4,7 +4,7 @@
검색 - <%= text_area_tag :search_word, "", autofocus: true, class: "form-control search_box textcomplete", rows: 1 %> + <%= text_area_tag :search_word, "", autofocus: true, class: "form-control search_box textcomplete shift-enter", rows: 1 %>
diff --git a/app/views/admin/users/_form.html.erb b/app/views/admin/users/_form.html.erb index 70b33f0..84fb99d 100644 --- a/app/views/admin/users/_form.html.erb +++ b/app/views/admin/users/_form.html.erb @@ -1,7 +1,7 @@
<%= label_tag :tags, "태그", class: "col-sm-2 control-label" %>
- <%= text_area_tag :tags, @user.tags, autofocus: true, class: "form-control textcomplete", rows: 1 %> + <%= text_area_tag :tags, @user.tags, autofocus: true, class: "form-control textcomplete shift-enter", rows: 1 %> '#'을 붙여서 태그를 입력해주세요. ex) #태그1 #태그2
diff --git a/app/views/admin/users/index.html.erb b/app/views/admin/users/index.html.erb index 64ddc32..d38532d 100644 --- a/app/views/admin/users/index.html.erb +++ b/app/views/admin/users/index.html.erb @@ -7,7 +7,7 @@
검색 - <%= text_area_tag :user_filter_word, "", autofocus: true, class: "form-control search_box textcomplete", rows: 1 %> + <%= text_area_tag :user_filter_word, "", autofocus: true, class: "form-control search_box textcomplete shift-enter", rows: 1 %>