Commit 90c142bd authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

déplacement bouton img_viewer + correctif util

parent f49c7da5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -7,8 +7,8 @@
}
#all-images-btn{
    position: fixed;
    top:100px;
    left:5%;
    bottom: 100px;
    right:10px;
}

.viewable{
+9 −9
Original line number Diff line number Diff line
@@ -36,15 +36,15 @@ class ImageViewer extends Plugin {
            document.getElementById('img_dialog_wrap').style.display = 'none';


            // if (images.length > 1) {
            //     let gnode =
            //         parser.parseFromString('<div id="gallery-wrap">'
            //             + '<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('main-max-container').append(document.importNode(gnode, true))

            // }
            if (images.length > 1) {
                let gnode =
                    parser.parseFromString('<div id="gallery-wrap">'
                        + '<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('text').parentElement.append(document.importNode(gnode, true))

            }
        }
    }

+1 −1
Original line number Diff line number Diff line
@@ -197,7 +197,7 @@ declare function max.util:maxHome(){
declare function max.util:getResourceFilePath($projectId, $path){
    let $xmlFormat := max.config:getXMLFormat($projectId)
    let $overPath := if(contains($path,'core/')) then replace($path,'core/','') else $path
    let $overPath := if(contains($path,$xmlFormat||'/')) then replace($path,$xmlFormat||'/','') else $path
    let $overPath := if(contains($path,$xmlFormat||'/')) then replace($path,$xmlFormat||'/','') else $overPath
    let $editionFilePath := max.util:maxHome()  || "editions/" || $projectId || "/" || $overPath
    return
        if(file:exists($editionFilePath))