Merge pull request #3817 from evazion/fix-3816
Avoid flickering hidden page elements during page loads
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<div id="blacklist-box" class="inline-blacklist">
|
||||
<section id="blacklist-box" class="inline-blacklist">
|
||||
<strong>Blacklisted: </strong>
|
||||
<ul id="blacklist-list">
|
||||
<li id="disable-all-blacklists" style="display: none;"><span class="link">Disable all</span></li>
|
||||
<li id="re-enable-all-blacklists" style="display: none;"><span class="link">Re-enable all</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<section id="blacklist-box" style="display: none;">
|
||||
<section id="blacklist-box">
|
||||
<h1>Blacklisted (<%= link_to "Help", wiki_pages_path(:title => "help:blacklists") %>)</h1>
|
||||
<ul id="blacklist-list">
|
||||
</ul>
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
</li>
|
||||
<li>Source: <%= post_source_tag(post) %></li>
|
||||
<li>Rating: <%= post.pretty_rating %></li>
|
||||
<li>Score: <span id="score-for-post-<%= post.id %>"><%= post.score %></span> <% if CurrentUser.is_voter? %>(<span id="vote-links-for-post-<%= post.id %>">vote <%= link_to content_tag("i", nil, class: "far fa-thumbs-up"), post_votes_path(:post_id => post.id, :score => "up"), :remote => true, :method => :post %> <%= link_to content_tag("i", nil, class: "far fa-thumbs-down"), post_votes_path(:post_id => post.id, :score => "down"), :remote => true, :method => :post %></span><%= link_to "undo vote", post_votes_path(post), :remote => true, :method => :delete, :id => "unvote-link-for-post-#{post.id}", :class => "unvote-post-link" %>)<% end %></li>
|
||||
<li>Score: <span id="score-for-post-<%= post.id %>"><%= post.score %></span> <% if CurrentUser.is_voter? %>(<span id="vote-links-for-post-<%= post.id %>">vote <%= link_to content_tag("i", nil, class: "far fa-thumbs-up"), post_votes_path(:post_id => post.id, :score => "up"), :remote => true, :method => :post %> <%= link_to content_tag("i", nil, class: "far fa-thumbs-down"), post_votes_path(:post_id => post.id, :score => "down"), :remote => true, :method => :post %></span><%= link_to "undo vote", post_votes_path(post), :remote => true, :method => :delete, :id => "unvote-link-for-post-#{post.id}", :class => "unvote-post-link", :style => "display: none;" %>)<% end %></li>
|
||||
<li>Favorites: <span id="favcount-for-post-<%= post.id %>"><%= post.fav_count %></span>
|
||||
<% if CurrentUser.is_gold? %>
|
||||
<%= link_to "Show »".html_safe, "#", :id => "show-favlist-link" %>
|
||||
<%= link_to "« Hide".html_safe, "#", :id => "hide-favlist-link", :style => "display: none;" %>
|
||||
<%= link_to "Show »", "#", id: "show-favlist-link", style: ("display: none;" if post.fav_count == 0) %>
|
||||
<%= link_to "« Hide", "#", id: "hide-favlist-link", style: "display: none;" %>
|
||||
<div id="favlist" style="display: none;"><%= post_favlist(post) %></div>
|
||||
<% end %></li>
|
||||
<li>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<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", :"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 "Favorite", favorites_path(:post_id => post.id), :remote => true, :method => :post, :id => "add-to-favorites", :"data-shortcut" => "f", style: ("display: none;" if @post.is_favorited?) %></li>
|
||||
<li><%= link_to "Unfavorite", favorite_path(post), :remote => true, :method => :delete, :id => "remove-from-favorites", :"data-shortcut" => "shift+f", style: ("display: none;" if !@post.is_favorited?) %></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? %>
|
||||
@@ -21,11 +21,9 @@
|
||||
<% if post.is_status_locked? %>
|
||||
<li><span id="status-locked-notice">Status locked</span></li>
|
||||
<% else %>
|
||||
<% if !post.is_deleted? && !post.is_pending? %>
|
||||
<% if !post.is_deleted? && !post.is_pending? && !post.is_flagged? %>
|
||||
<li><%= link_to "Flag", new_post_flag_path(:post_id => post.id), :id => "flag" %></li>
|
||||
<% end %>
|
||||
|
||||
<% if post.is_flagged? || post.is_deleted? %>
|
||||
<% elsif post.is_flagged? || post.is_deleted? %>
|
||||
<li><%= link_to "Appeal", new_post_appeal_path(:post_id => post.id), :id => "appeal" %></li>
|
||||
<% end %>
|
||||
|
||||
@@ -39,9 +37,8 @@
|
||||
<li><%= link_to "Delete", confirm_delete_moderator_post_post_path(:post_id => post.id) %></li>
|
||||
<% end %>
|
||||
|
||||
<% if post.is_flagged? || post.is_pending? %>
|
||||
<% if post.is_approvable? && !post.is_deleted? %>
|
||||
<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 %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user