Fix Selection-Mode: Blockiere Lightbox wenn Auswahl aktiv
initSelectionMode wird jetzt VOR initPoptrox aufgerufen und nutzt einen direkten Click-Handler auf a.image mit stopImmediatePropagation, damit Poptrox im Selection-Mode nicht mehr die Lightbox oeffnet. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -193,8 +193,8 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
initThumbs();
|
initThumbs();
|
||||||
initPoptrox();
|
|
||||||
initSelectionMode(images);
|
initSelectionMode(images);
|
||||||
|
initPoptrox();
|
||||||
},
|
},
|
||||||
error: function() {
|
error: function() {
|
||||||
$main.html('<p style="text-align:center;color:#fff;padding:2em;">Keine Bilder gefunden. Lade Bilder in deinen Nextcloud-Ordner hoch.</p>');
|
$main.html('<p style="text-align:center;color:#fff;padding:2em;">Keine Bilder gefunden. Lade Bilder in deinen Nextcloud-Ordner hoch.</p>');
|
||||||
@@ -339,16 +339,16 @@
|
|||||||
$toolbar.toggleClass('visible', selectionActive);
|
$toolbar.toggleClass('visible', selectionActive);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Klick auf Thumbnail im Selection-Mode
|
// Klick auf Thumbnail im Selection-Mode (direkt auf a.image, VOR poptrox gebunden)
|
||||||
$(document).on('click', '.thumb', function(e) {
|
$main.find('.thumb a.image').on('click', function(e) {
|
||||||
if (!selectionActive) return;
|
if (!selectionActive) return;
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopImmediatePropagation();
|
||||||
|
|
||||||
var $thumb = $(this);
|
var $thumb = $(this).closest('.thumb');
|
||||||
var $img = $thumb.find('img');
|
var $img = $thumb.find('img');
|
||||||
var imgName = $img.data('name');
|
var imgName = $img.data('name');
|
||||||
var imgHref = $thumb.find('a.image').attr('href');
|
var imgHref = $(this).attr('href');
|
||||||
|
|
||||||
// Ordner aus href extrahieren
|
// Ordner aus href extrahieren
|
||||||
var folder = null;
|
var folder = null;
|
||||||
|
|||||||
2
assets/js/main.min.js
vendored
2
assets/js/main.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user