Merge pull request #2982 from evazion/fix-ss-dropdown

Fix saved search dropdown on post show page.
This commit is contained in:
Albert Yi
2017-04-22 01:04:47 -07:00
committed by GitHub
4 changed files with 9 additions and 7 deletions

View File

@@ -8,11 +8,11 @@
if ($("#c-posts").length) {
this.initialize_shortcuts();
this.initialize_saved_searches();
}
if ($("#c-posts").length && $("#a-index").length) {
this.initialize_excerpt();
this.initialize_saved_searches();
}
if ($("#c-posts").length && $("#a-show").length) {

View File

@@ -59,6 +59,10 @@
<% end %>
<%= post_search_count_js %>
<div id="saved-searches-nav">
<%= render "saved_searches/interface" %>
</div>
</div>
</div>

View File

@@ -3,12 +3,6 @@
<%= post_set.presenter.post_previews_html(self) %>
</div>
<% if params[:tags] %>
<div id="saved-searches-nav">
<%= render "saved_searches/interface", :saved_searches => CurrentUser.user.saved_searches %>
</div>
<% end %>
<% if post_set.hidden_posts.present? %>
<div class="tn hidden-posts-notice">
<% if post_set.banned_posts.present? %>

View File

@@ -137,6 +137,10 @@
<div id="add-to-favgroup-dialog" title="Add to favorite group" style="display: none;">
<%= render "favorite_groups/add_to_favgroup_dialog", :post => @post %>
</div>
<div id="saved-searches-nav">
<%= render "saved_searches/interface" %>
</div>
</div>
<% content_for(:page_title) do %>