Convert keyboard shortcuts to use data-shortcut.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<% if params[:random] %>
|
||||
<%= hidden_field_tag :random, params[:random] %>
|
||||
<% end %>
|
||||
<%= text_field_tag("tags", tags, :id => tags_dom_id, :data => { :autocomplete => "tag-query" }) %><%= content_tag "button", content_tag("i", nil, class: "fas fa-search"), type: "submit" %>
|
||||
<%= text_field_tag("tags", tags, :id => tags_dom_id, :"data-shortcut" => "q", :"data-autocomplete" => "tag-query") %><%= content_tag "button", content_tag("i", nil, class: "fas fa-search"), type: "submit" %>
|
||||
<%= hidden_field_tag "ms", "1" %>
|
||||
<% end %>
|
||||
</section>
|
||||
@@ -31,4 +31,4 @@
|
||||
});
|
||||
});*/
|
||||
</script>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<li><%= link_to "Deleted", posts_path(:tags => "#{params[:tags]} status:deleted"), :rel => "nofollow" %></li>
|
||||
|
||||
<li><%= link_to "Random", random_posts_path(:tags => params[:tags]), :id => "random-post", :rel => "nofollow" %></li>
|
||||
<li><%= link_to "Random", random_posts_path(:tags => params[:tags]), :id => "random-post", :rel => "nofollow", :"data-shortcut" => "r" %></li>
|
||||
|
||||
<li><%= link_to "Count", posts_counts_path(:tags => params[:tags]) %></li>
|
||||
</ul>
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<div>
|
||||
<%= f.label :tag_string, "Tags" %>
|
||||
<%= f.text_area :tag_string, :size => "50x5", :value => post.presenter.categorized_tag_string + " ", :data => { :autocomplete => "tag-edit" } %>
|
||||
<span id="open-edit-dialog" class="ui-icon ui-icon-arrow-1-ne" title="detach" style="display: none;"/>
|
||||
<span id="open-edit-dialog" class="ui-icon ui-icon-arrow-1-ne" title="detach" style="display: none;" data-shortcut="shift+e"/>
|
||||
</div>
|
||||
|
||||
<%= button_tag "Related tags", :id => "related-tags-button", :type => "button", :class => "ui-button ui-widget ui-corner-all sub gradient" %>
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
<li><%= link_to "Resize to window", "#", :id => "image-resize-to-window-link" %></li>
|
||||
|
||||
<% if CurrentUser.is_member? %>
|
||||
<li><%= link_to "Favorite", favorites_path(:post_id => post.id), :remote => true, :method => :post, :id => "add-to-favorites", :title => "Shortcut is F" %></li>
|
||||
<li><%= link_to "Unfavorite", favorite_path(post), :remote => true, :method => :delete, :id => "remove-from-favorites" %></li>
|
||||
<li><%= link_to "Favorite", favorites_path(:post_id => post.id), :remote => true, :method => :post, :id => "add-to-favorites", :"data-shortcut" => "f" %></li>
|
||||
<li><%= link_to "Unfavorite", favorite_path(post), :remote => true, :method => :delete, :id => "remove-from-favorites", :"data-shortcut" => "shift+f" %></li>
|
||||
<li><%= link_to_if post.visible?, "Download", post.tagged_file_url + "?download=1", download: post.presenter.filename_for_download %></li>
|
||||
<li id="add-to-pool-list"><%= link_to "Add to pool", "#", :id => "pool" %></li>
|
||||
<% if post.is_note_locked? %>
|
||||
<li id="add-notes-list"><span id="note-locked-notice">Note locked</span></li>
|
||||
<% else %>
|
||||
<li id="add-notes-list"><%= link_to "Add note", "#", :id => "translate", :title => "Shortcut is N" %></li>
|
||||
<li id="add-notes-list"><%= link_to "Add note", "#", :id => "translate", :"data-shortcut" => "n" %></li>
|
||||
<% end %>
|
||||
<% if CurrentUser.is_builder? && post.has_notes? %>
|
||||
<li id="copy-all-notes-list"><%= link_to "Copy notes", "#", :id => "copy-notes" %></li>
|
||||
<% end %>
|
||||
<li id="add-artist-commentary-list"><%= link_to "Add commentary", "#", :id => "add-commentary" %></li>
|
||||
<li><%= link_to "Add to favorite group", "#", :id => "open-favgroup-dialog-link" %></li>
|
||||
<li><%= link_to "Add to favorite group", "#", :id => "open-favgroup-dialog-link", :"data-shortcut" => "g" %></li>
|
||||
<li><%= link_to "Find similar", iqdb_queries_path(:post_id => post.id) %></li>
|
||||
|
||||
<% if post.is_status_locked? %>
|
||||
@@ -40,7 +40,7 @@
|
||||
<% end %>
|
||||
|
||||
<% if post.is_flagged? || post.is_pending? %>
|
||||
<li><%= link_to "Approve", moderator_post_approval_path(:post_id => post.id), :remote => true, :method => :post, :id => "approve", :data => { :confirm => "Are you sure you want to approve this post?" } %></li>
|
||||
<li><%= link_to "Approve", moderator_post_approval_path(:post_id => post.id), :remote => true, :method => :post, :id => "approve", :"data-shortcut" => "shift+o", :"data-confirm" => "Are you sure you want to approve this post?" %></li>
|
||||
<% else %>
|
||||
<li><%= link_to "Hide from queue", moderator_post_disapproval_path(post_disapproval: { post_id: post.id, reason: "disinterest" }), remote: true, method: :post, id: "disapprove" %></li>
|
||||
<% end %>
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<% end %>
|
||||
|
||||
<% if CurrentUser.is_member? && @post.visible? %>
|
||||
<li><a href="#edit" id="post-edit-link">Edit</a></li>
|
||||
<li><a href="#edit" id="post-edit-link" data-shortcut="e">Edit</a></li>
|
||||
<% end %>
|
||||
|
||||
<li><a href="#share">Share</a></li>
|
||||
|
||||
Reference in New Issue
Block a user