Loading plugins/img_viewer/img_viewer.js +1 −6 Original line number Diff line number Diff line Loading @@ -26,8 +26,6 @@ class ImageViewer extends Plugin { '<div class="modal-body">' + '<p>Modal body text goes here.</p>' + '</div>' + '<div class="modal-footer">' + '</div>' + '</div>' + '</div>' + '</div>', Loading @@ -44,14 +42,12 @@ class ImageViewer extends Plugin { // + '<button id="all-images-btn" class="btn btn-secondary" onclick="MAX.plugins[\'img_viewer\'].openImagesInDialog()">' // + '<img alt="voir la galerie d\'images de la page" title="voir la galerie d\'images de la page" src="' + baseURI + 'plugins/img_viewer/images/gallery.png"/>' // + '</button></div>', "text/html").documentElement.querySelector('#gallery-wrap'); // document.getElementById('img_dialog_wrap').append(document.importNode(gnode, true)) // document.getElementById('main-max-container').append(document.importNode(gnode, true)) // } } } // pour ouvrir la visionneuse avec une seule image, // voir la fonction openImagesInDialog ci-dessous pour une collection d'images openImageInDialog(href) { let tiled = href.endsWith('dzi') || href.endsWith('json'); this.showImages(tiled ? href : {type: 'image', url: href}) Loading Loading @@ -93,7 +89,6 @@ class ImageViewer extends Plugin { document.getElementById('img_dialog_wrap').style.display = 'block'; } // pour ouvrir la visionneuse d'images avec les flèches permettant de défiler dans la collection d'images openImagesInDialog() { var tileSources = []; var images = document.querySelectorAll('#text img'); Loading Loading
plugins/img_viewer/img_viewer.js +1 −6 Original line number Diff line number Diff line Loading @@ -26,8 +26,6 @@ class ImageViewer extends Plugin { '<div class="modal-body">' + '<p>Modal body text goes here.</p>' + '</div>' + '<div class="modal-footer">' + '</div>' + '</div>' + '</div>' + '</div>', Loading @@ -44,14 +42,12 @@ class ImageViewer extends Plugin { // + '<button id="all-images-btn" class="btn btn-secondary" onclick="MAX.plugins[\'img_viewer\'].openImagesInDialog()">' // + '<img alt="voir la galerie d\'images de la page" title="voir la galerie d\'images de la page" src="' + baseURI + 'plugins/img_viewer/images/gallery.png"/>' // + '</button></div>', "text/html").documentElement.querySelector('#gallery-wrap'); // document.getElementById('img_dialog_wrap').append(document.importNode(gnode, true)) // document.getElementById('main-max-container').append(document.importNode(gnode, true)) // } } } // pour ouvrir la visionneuse avec une seule image, // voir la fonction openImagesInDialog ci-dessous pour une collection d'images openImageInDialog(href) { let tiled = href.endsWith('dzi') || href.endsWith('json'); this.showImages(tiled ? href : {type: 'image', url: href}) Loading Loading @@ -93,7 +89,6 @@ class ImageViewer extends Plugin { document.getElementById('img_dialog_wrap').style.display = 'block'; } // pour ouvrir la visionneuse d'images avec les flèches permettant de défiler dans la collection d'images openImagesInDialog() { var tileSources = []; var images = document.querySelectorAll('#text img'); Loading