Fix sitemap in page edit
This commit is contained in:
parent
17ac564fbb
commit
1f11293fbe
|
@ -1,23 +0,0 @@
|
||||||
<div class="site-map">
|
|
||||||
<% @items.each_with_index do |item, i| %>
|
|
||||||
<div class="map-block">
|
|
||||||
<h4><%= i+1 %> <a href='<%= item.path %>'><%= item.title %></a></h4>
|
|
||||||
<ul>
|
|
||||||
<% item.children.each_with_index do |child, ii| %>
|
|
||||||
<li class="clear"><%= "#{i+1}-#{ii+1}" %> <a href='<%= child.path %>'><%= child.title %></a></span></li>
|
|
||||||
<% end if item.children %>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%= javascript_include_tag "lib/jquery.masonry.min.js" %>
|
|
||||||
<script>
|
|
||||||
$(document).ready(function(){
|
|
||||||
$('.site-map').masonry({
|
|
||||||
itemSelector: '.map-block',
|
|
||||||
columnWidth: 220,
|
|
||||||
isAnimated: true
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
|
@ -214,7 +214,7 @@ module ParserCommon
|
||||||
# sitemap
|
# sitemap
|
||||||
def parse_sitemaps_edit(body = nil, page = nil, edit=nil)
|
def parse_sitemaps_edit(body = nil, page = nil, edit=nil)
|
||||||
sitemap = body.css('sitemap').first
|
sitemap = body.css('sitemap').first
|
||||||
url = admin_site_sitemap_frontend_path(@site)
|
url = front_show_sitemap_path
|
||||||
options = "?inner=true"
|
options = "?inner=true"
|
||||||
fragment = Nokogiri::HTML::DocumentFragment.new(body, "<div class='dymanic_load' path='#{url + options}'></div>")
|
fragment = Nokogiri::HTML::DocumentFragment.new(body, "<div class='dymanic_load' path='#{url + options}'></div>")
|
||||||
sitemap.swap(fragment)
|
sitemap.swap(fragment)
|
||||||
|
|
Loading…
Reference in New Issue