app/assets/javascripts/cms/sitemap.js in browsercms-4.0.0.alpha vs app/assets/javascripts/cms/sitemap.js in browsercms-4.0.0.beta

- old
+ new

@@ -93,11 +93,11 @@ // @param [Object] options Sitemap.prototype.open = function(row, options) { options = options || {} _.defaults(options, {animate: true}); this.changeIcon(row, 'icon-folder-open'); - var siblings = row.siblings('ul.nav'); + var siblings = row.siblings('.children'); if (options.animate) { siblings.slideToggle(); } else { siblings.show(); @@ -112,11 +112,11 @@ } }; Sitemap.prototype.close = function(row) { this.changeIcon(row, 'icon-folder'); - row.siblings('ul.nav').slideToggle(); + row.siblings('.children').slideToggle(); this.saveAsClosed(row.data('id')); }; Sitemap.prototype.toggleOpen = function(row) { if (!this.isClosable(row)) { @@ -136,11 +136,11 @@ }; var sitemap = new Sitemap(); // Enable dragging of items around the sitemap. -$(function() { +jQuery(function($){ if ($('#sitemap').exists()) { $('#sitemap .draggable').draggable({ containment: '#sitemap', revert: true, @@ -186,11 +186,11 @@ }); } }); // Open/close folders when rows are clicked. -$(function() { +jQuery(function($){ // Ensure this only loads on sitemap page. if ($('#sitemap').exists()) { sitemap.restoreOpenState(); $('.nav-list-span').on('click', function(event) { sitemap.toggleOpen($(this)); @@ -199,10 +199,10 @@ } }); // Make Sitemap filters show specific content types. -$(function() { +jQuery(function($){ $('#sitemap li[data-nodetype]').hide(); $('#filtershow').change(function() { $('#sitemap li[data-nodetype]').slideUp(); var what = $(this).val(); if (what == "none") { \ No newline at end of file