diff --git a/app/assets/javascripts/basic/orbit_js_1.0.1.js b/app/assets/javascripts/basic/orbit_js_1.0.1.js index cc59d6d3f..0e0769c64 100644 --- a/app/assets/javascripts/basic/orbit_js_1.0.1.js +++ b/app/assets/javascripts/basic/orbit_js_1.0.1.js @@ -487,7 +487,7 @@ function openSlide() { $openSlide.each(function() { if($(this).hasClass('view-page')) { $(this).pageslide({ W: $pageslideW, iframe: true }); - } else if($('#items').length) { + } else if($('.item-groups').length) { $(this).pageslide({ W: 324 }); } else { $(this).pageslide(); diff --git a/app/assets/javascripts/lib/jquery.mjs.nestedSortable.js b/app/assets/javascripts/lib/jquery.mjs.nestedSortable.js index b41af696f..456655b1b 100644 --- a/app/assets/javascripts/lib/jquery.mjs.nestedSortable.js +++ b/app/assets/javascripts/lib/jquery.mjs.nestedSortable.js @@ -240,7 +240,7 @@ // for Orbit ----> Check the number of pages in each page - if($('#items').length) { + if($('.item-groups').length) { var $sortable = $('.sortable'), $host = $sortable.children('.navbar').eq(0), $navbar = $('.sortable li').children('.navbar'), diff --git a/app/assets/javascripts/lib/jquery.pageslide.js b/app/assets/javascripts/lib/jquery.pageslide.js index b3e508d53..e9b049bb4 100644 --- a/app/assets/javascripts/lib/jquery.pageslide.js +++ b/app/assets/javascripts/lib/jquery.pageslide.js @@ -77,7 +77,7 @@ slideAnimateIn['right'] = '+=' + slideWidth; break; default: - if($sidebarState && !$('#items').length) { + if($sidebarState && !$('.item-groups').length) { $pageslide.css({ left: '-' + (slideWidth-241) + 'px', right: 'auto' }); }else{ $pageslide.css({ left: '-' + (slideWidth-61) + 'px', right: 'auto' }); @@ -123,7 +123,7 @@ // Open $.pageslide( settings ); - if($('#items').length) { + if($('.item-groups').length) { $('.item-menu > a, .navbar-inner').removeClass("active"); $(this).parents('.navbar-inner').addClass('active').end().addClass('active'); if(!$.support.touch) { @@ -136,8 +136,9 @@ }); } } + console.log("ff") - $pageName = $self.parents('.item-title').children('a').text(); + $pageName = $self.closest('.item-menu').siblings('a').text(); $('.page-name').text($pageName); } else if($('.tags-groups').length) { $(this).parents('li').addClass("active").siblings().removeClass("active").parent('ul').siblings().children('li').removeClass("active"); @@ -247,7 +248,7 @@ break; } - if($('#items').length) { + if($('.item-groups').length) { $(".navbar-inner").removeClass("active"); $('.item-menu > a, .navbar-inner').removeClass("active"); if(!$.support.touch) { diff --git a/app/assets/javascripts/lib/orbit_js_1.0.1.js b/app/assets/javascripts/lib/orbit_js_1.0.1.js index 93aceaa30..f1b884c49 100644 --- a/app/assets/javascripts/lib/orbit_js_1.0.1.js +++ b/app/assets/javascripts/lib/orbit_js_1.0.1.js @@ -445,7 +445,7 @@ function openSlide() { $openSlide.each(function() { if($(this).hasClass('view-page')) { $(this).pageslide({ W: $pageslideW, iframe: true}); - } else if($('#items').length) { + } else if($('.item-groups').length) { $(this).pageslide({ W: 324}); } else { $(this).pageslide(); diff --git a/app/views/admin/items/index.html.erb b/app/views/admin/items/index.html.erb index a494c383a..c81c9a90f 100644 --- a/app/views/admin/items/index.html.erb +++ b/app/views/admin/items/index.html.erb @@ -9,7 +9,7 @@