Kris-B / nanoGALLERY

image gallery simplified - jQuery plugin. Touch enabled, responsive, justified/cascading/grid layout and it supports pulling in Flickr, Google Photos and self hosted images.
https://nanogallery2.nanostudio.org/
439 stars 101 forks source link

locationHash doesn't work for albums deeper than 1 level #98

Open EelcoA opened 8 years ago

EelcoA commented 8 years ago

With the current software, the main gallery and the first level albums have working URL's. But when you go deeper, the URL's don't work anymore.

My proposal: In ProcessLocationHash, inspect the url, check if it goes more than 1 level deep. If it does, load the album thumbnails into the cache, so that the albumID can be found by OpenItem. This can have a performance issue when going very deep into the hierarchy or when albums are very big, but with the current setup this is the easiest solution. It works at my local site now. I had to use jQuery. ajax with async false, because the buildup of the page has to wait until the cache has been loaded.