X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/ee09c737f25b21db46ed1105a407f2a1ee14cd44..v3.9-8-g882347cba8:/foto/album.inc.php diff --git a/foto/album.inc.php b/foto/album.inc.php index 9410083..6d706ca 100644 --- a/foto/album.inc.php +++ b/foto/album.inc.php @@ -24,9 +24,9 @@ function openphotoswipe(index) { closeElClasses: [], shareButtons: [ admin) { printf("\t\t\t{id:'%s', label:'%s', url:'%s'},\n", - 'cover', 'Cover instellen', "/edit/fotocover$Args?img={{image_url}}" + 'cover', 'Cover instellen', "/edit/foto/cover$Args?img={{image_url}}" ); } ?> @@ -74,7 +74,7 @@ function imgjustify() { targetRowHeight: 200, }; var layout = require('justified-layout')(ratios, config); - var thumbreplace = !window.location.search.test(/[?&]blur\b/); + var thumbreplace = !/[?&]blur\b/.test(window.location.search); gallery.style.position = 'relative'; gallery.style.height = layout.containerHeight + 'px'; @@ -104,6 +104,11 @@ function imgjustify() { } }; +if (request = window.location.hash.match(/pid=(.*)/)) { + index = images.findIndex(row => row.src == request[1]); + openphotoswipe(index); +} + window.addEventListener('resize', imgjustify, false); imgjustify();