Convert keyboard shortcuts to use data-shortcut.

This commit is contained in:
evazion
2018-08-11 16:39:45 -05:00
parent d369d38419
commit bbaadda1e3
25 changed files with 44 additions and 259 deletions

View File

@@ -18,10 +18,10 @@
<li><%= link_to "Posts (#{@wiki_page.tag.try(:post_count) || 0})", posts_path(:tags => @wiki_page.title) %></li>
<li><%= link_to "History", wiki_page_versions_path(:search => {:wiki_page_id => @wiki_page.id}) %></li>
<% if CurrentUser.is_member? %>
<li id="wiki-page-edit"><%= link_to "Edit", edit_wiki_page_path(@wiki_page) %></li>
<li id="wiki-page-edit"><%= link_to "Edit", edit_wiki_page_path(@wiki_page), "data-shortcut": "e" %></li>
<% end %>
<% if CurrentUser.is_builder? && !@wiki_page.is_deleted? %>
<li id="wiki-page-delete"><%= link_to "Delete", wiki_page_path(@wiki_page), :remote => true, :method => :delete, :data => {:confirm => "Are you sure you want to delete this wiki page?"} %></li>
<li id="wiki-page-delete"><%= link_to "Delete", wiki_page_path(@wiki_page), :remote => true, :method => :delete, :"data-shortcut" => "shift+d", :"data-confirm" => "Are you sure you want to delete this wiki page?" %></li>
<% end %>
<% elsif @wiki_page_version %>
<li>|</li>