Merge branch 'master' of github.com:r888888888/danbooru

This commit is contained in:
r888888888
2013-04-30 17:09:44 -07:00
4 changed files with 6 additions and 3 deletions

View File

@@ -92,7 +92,7 @@
Danbooru.Post.initialize_shortcuts = function() { Danbooru.Post.initialize_shortcuts = function() {
$(document).bind("keydown.q", function(e) { $(document).bind("keydown.q", function(e) {
$("#tags").trigger("focus"); $("#tags").trigger("focus").selectEnd();
e.preventDefault(); e.preventDefault();
}); });

View File

@@ -68,6 +68,8 @@ class PoolsController < ApplicationController
@pool = Pool.find(params[:id]) @pool = Pool.find(params[:id])
@version = PoolVersion.find(params[:version_id]) @version = PoolVersion.find(params[:version_id])
@pool.revert_to!(@version) @pool.revert_to!(@version)
respond_with(@pool, :notice => "Pool reverted") respond_with(@pool) do |format|
format.js
end
end end
end end

View File

@@ -33,7 +33,7 @@
<td><%= compact_time pool_version.updated_at %></td> <td><%= compact_time pool_version.updated_at %></td>
<% if CurrentUser.is_member? %> <% if CurrentUser.is_member? %>
<td> <td>
<%= link_to "Revert", revert_pool_path(pool_version.pool_id, :version => pool_version.id) %> <%= link_to "Revert", revert_pool_path(pool_version.pool_id, :version_id => pool_version.id), :method => :put, :remote => true %>
</td> </td>
<% end %> <% end %>
</tr> </tr>

View File

@@ -0,0 +1 @@
location.reload();