fix navigation when more then one level of subgalleries
authorMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 3 Jan 2011 18:30:45 +0000 (13:30 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 3 Jan 2011 18:30:45 +0000 (13:30 -0500)
ansel/js/mobile.js

index c5803b6..615f0d1 100644 (file)
@@ -78,11 +78,10 @@ var AnselMobile = {
 
         //AnselMobile.imgs = r.imgs;
         AnselMobile.currentGallery = r;
+        $('.anselgalleries').detach();
         if (r.sg.length) {
             var l = $('<ul>').addClass('anselgalleries').attr({ 'data-role': 'listview', 'data-inset': 'true' });
             $('#thumbs').before(AnselMobile.buildGalleryList(l, r.sg).listview());
-        } else {
-            $('.anselgalleries').detach();
         }
         $('#galleryview h1').text(r.n);
         if ($.mobile.activePage.attr('id') != 'galleryview') {