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:
Kroonk
2026-04-16 23:17:03 +02:00
parent 74f1da13a3
commit f4c106bd19
2 changed files with 7 additions and 7 deletions

View File

@@ -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;

File diff suppressed because one or more lines are too long