orbit-basic/app/views/admin/sites/sitemap.html.erb

30 lines
908 B
Plaintext

<% content_for :side_bar do %>
<%= render 'side_bar' %>
<% end %>
<div class="site-map">
<%= render :partial => 'sitemap_block', :collection => @items %>
</div>
<% content_for :page_specific_javascript do %>
<%= javascript_include_tag "lib/jquery.masonry.min.js" %>
<script>
$(document).ready(function(){
$('.site-map').masonry({
itemSelector: '.map-block',
columnWidth: 260,
isAnimated: true
});
});
$(document).on('click', '.onoff', function () {
$(this).parents("li").toggleClass("disabled");
if($(this).parents("li").attr("class").indexOf("disabled") > 0){
$(this).text('OFF')
} else {
$(this).text('ON')
}
$.getScript('admin_sites_path' + '/' + $(this).attr('id') + '/sitemap_toggle');
});
</script>
<% end %>