Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: textarea #397

Merged
merged 2 commits into from
Nov 11, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/assets/javascripts/admin/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -31,6 +31,7 @@ $(document).on('ready page:load', function () {
e.preventDefault();
return false;
}

});

$('#user_filter_word').textcomplete([
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/messages/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</div>
<div class="form-group form-group-lg has-feedback">
<span class="help-block">검색</span>
<%= 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 %>

</div>

Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/users/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="form-group form-group-lg has-feedback">
<%= label_tag :tags, "태그", class: "col-sm-2 control-label" %>
<div class="col-sm-10">
<%= 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 %>
<span class="glyphicon form-control-feedback"></span>
<span class="help-block">'#'을 붙여서 태그를 입력해주세요. ex) #태그1 #태그2 </span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/users/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</div>
<div class="form-group form-group-lg has-feedback">
<span class="help-block">검색</span>
<%= 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 %>

</div>
<div class="table-responsive" id="table-user-list">
Expand Down