This commit is contained in:
albert
2013-03-05 17:53:59 -05:00
parent 84cb2b9ec1
commit 3621edd357
3 changed files with 10 additions and 4 deletions

View File

@@ -467,8 +467,10 @@ Danbooru.Note = {
$(function() {
if ($("#c-posts").length && $("#a-show").length && $("#image").length) {
$("#translate").one("click", Danbooru.Note.TranslationMode.start);
$(document).bind("keydown.n", Danbooru.Note.TranslationMode.start);
if ($("#note-locked-notice").length == 0) {
$("#translate").one("click", Danbooru.Note.TranslationMode.start);
$(document).bind("keydown.n", Danbooru.Note.TranslationMode.start);
}
Danbooru.Note.load_all();
$("#image").click(Danbooru.Note.Box.toggle_all);
}

View File

@@ -26,7 +26,7 @@
<% end %>
</div>
<% if CurrentUser.is_janitor? %>
<% if CurrentUser.is_builder? %>
<div class="input">
<%= f.label :blank, "Lock" %>

View File

@@ -4,7 +4,11 @@
<li><%= link_to "Favorite", favorites_path(:post_id => post.id), :remote => true, :method => :post, :id => "add-to-favorites" %></li>
<li><%= link_to "Unfavorite", favorite_path(post), :remote => true, :method => :delete, :id => "remove-from-favorites" %></li>
<li><%= link_to "Add to pool", "#", :id => "pool" %></li>
<li><%= link_to "Add note", "#", :id => "translate", :title => "Shortcut is CTRL+N" %></li>
<% if post.is_note_locked? %>
<li><span id="note-locked-notice">Note locked</span></li>
<% else %>
<li><%= link_to "Add note", "#", :id => "translate", :title => "Shortcut is CTRL+N" %></li>
<% end %>
<li><%= link_to "Find similar", "http://danbooru.iqdb.org/db-search.php?url=http://#{Danbooru.config.hostname}#{post.preview_file_url}" %></li>
<% unless post.is_status_locked? %>