Merge branch 'master' of github.com:r888888888/danbooru
This commit is contained in:
@@ -92,7 +92,7 @@
|
||||
|
||||
Danbooru.Post.initialize_shortcuts = function() {
|
||||
$(document).bind("keydown.q", function(e) {
|
||||
$("#tags").trigger("focus");
|
||||
$("#tags").trigger("focus").selectEnd();
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
|
||||
@@ -68,6 +68,8 @@ class PoolsController < ApplicationController
|
||||
@pool = Pool.find(params[:id])
|
||||
@version = PoolVersion.find(params[:version_id])
|
||||
@pool.revert_to!(@version)
|
||||
respond_with(@pool, :notice => "Pool reverted")
|
||||
respond_with(@pool) do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<td><%= compact_time pool_version.updated_at %></td>
|
||||
<% if CurrentUser.is_member? %>
|
||||
<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>
|
||||
<% end %>
|
||||
</tr>
|
||||
|
||||
1
app/views/pools/revert.js.erb
Normal file
1
app/views/pools/revert.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
location.reload();
|
||||
Reference in New Issue
Block a user