From 7c4e933beaa609c7cad00a5e7c51a4883295a2fc Mon Sep 17 00:00:00 2001 From: albert Date: Sun, 3 Mar 2013 15:51:57 -0500 Subject: [PATCH] potential fix for #737 --- app/assets/javascripts/uploads.js | 2 +- app/views/posts/partials/show/_edit.html.erb | 12 ++++++------ app/views/uploads/new.html.erb | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/assets/javascripts/uploads.js b/app/assets/javascripts/uploads.js index c084540d9..a8b0e2432 100644 --- a/app/assets/javascripts/uploads.js +++ b/app/assets/javascripts/uploads.js @@ -15,7 +15,7 @@ Danbooru.Upload.initialize_enter_on_tags = function() { $("#upload_tag_string,#post_tag_string").bind("keydown.return", function(e) { - $("#form").submit(); + $("#form").trigger("submit"); e.preventDefault(); }); } diff --git a/app/views/posts/partials/show/_edit.html.erb b/app/views/posts/partials/show/_edit.html.erb index 55dd5e8f1..7501451ff 100644 --- a/app/views/posts/partials/show/_edit.html.erb +++ b/app/views/posts/partials/show/_edit.html.erb @@ -53,8 +53,8 @@
<%= f.label :source %> <%= f.text_field :source %> - <%= button_tag "Similar", :id => "similar-button" %> - <%= button_tag "Artist", :id => "find-artist-button" %> + <%= button_tag "Similar", :id => "similar-button", :type => "button" %> + <%= button_tag "Artist", :id => "find-artist-button", :type => "button" %>
@@ -63,10 +63,10 @@ <%= f.text_area :tag_string , :size => "50x3" %>
- <%= button_tag "Related tags", :id => "related-tags-button" %> - <%= button_tag "Artists", :id => "related-artists-button" %> - <%= button_tag "Characters", :id => "related-characters-button" %> - <%= button_tag "Copyrights", :id => "related-copyrights-button" %> + <%= button_tag "Related tags", :id => "related-tags-button", :type => "button" %> + <%= button_tag "Artists", :id => "related-artists-button", :type => "button" %> + <%= button_tag "Characters", :id => "related-characters-button", :type => "button" %> + <%= button_tag "Copyrights", :id => "related-copyrights-button", :type => "button" %>
diff --git a/app/views/uploads/new.html.erb b/app/views/uploads/new.html.erb index 091c9c83c..efd319139 100644 --- a/app/views/uploads/new.html.erb +++ b/app/views/uploads/new.html.erb @@ -21,8 +21,8 @@
<%= f.label :source, nil, :title => "You can enter a URL to have #{Danbooru.config.app_name} automatically download and process it" %> <%= f.text_field :source, :size => 50, :value => params[:url] %> - <%= button_tag "Similar", :id => "similar-button" %> - <%= button_tag "Artist", :id => "find-artist-button" %> + <%= button_tag "Similar", :id => "similar-button", :type => "button" %> + <%= button_tag "Artist", :id => "find-artist-button", :type => "button" %>
@@ -51,10 +51,10 @@ <%= f.text_area :tag_string, :size => "60x4" %>
- <%= button_tag "Related tags", :id => "related-tags-button" %> - <%= button_tag "Artists", :id => "related-artists-button" %> - <%= button_tag "Characters", :id => "related-characters-button" %> - <%= button_tag "Copyrights", :id => "related-copyrights-button" %> + <%= button_tag "Related tags", :id => "related-tags-button", :type => "button" %> + <%= button_tag "Artists", :id => "related-artists-button", :type => "button" %> + <%= button_tag "Characters", :id => "related-characters-button", :type => "button" %> + <%= button_tag "Copyrights", :id => "related-copyrights-button", :type => "button" %>