Commit c64b5850 authored by Jérôme Chauveau's avatar Jérôme Chauveau
Browse files

suppression utilisation jquery dans le plugin img_viewer

parent 98b0883d
Loading
Loading
Loading
Loading
+34
Changes for plugins-available/default/img_viewer/img_viewer.css: 34 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -10,3 +10,37 @@
    bottom:100px;
    right:50px;
}

.viewable{
 cursor : pointer;
}
.modal {
    position : fixed;
    top:0;
    left:0;
    width: 100%;
    height:100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(100,100,100,0.5);
    z-index: 1100;
}

.modal-content{
    position :relative;
    width: 900px;
    margin: 150px auto;
    background-color:white;
}

.modal-header{
    position: relative;
}

.modal-header .close {
    position : absolute;
    top: 5px;
    right: 5px;
    z-index: 1120;
}
 No newline at end of file
+7 −7
Changes for plugins-available/default/img_viewer/img_viewer.js: 7 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -9,11 +9,11 @@ class ImageViewer extends Plugin{
    if(viewables.length > 0) {
      $('body').append('<script type="text/javascript" src="' +baseURI + '/core/ui/lib/openseadragon/openseadragon.min.js"></script>');
      $('body').prepend('<div id="img_dialog_wrap" class="modal" tabindex="-1" role="dialog">'+
                '<div class="modal-dialog" role="document">'+
                '<div>'+
                  '<div class="modal-content">'+
                    '<div class="modal-header">'+
                      '<h5 class="modal-title" id="img-title"></h5>'+
                      '<button type="button" class="close" data-dismiss="modal" aria-label="Close">'+
                      '<button type="button" onclick="document.getElementById(\'img_dialog_wrap\').style.display=\'none\'" class="close" aria-label="Close">'+
                        '<span aria-hidden="true">&times;</span>'+
                      '</button>'+
                    '</div>'+
@@ -23,8 +23,8 @@ class ImageViewer extends Plugin{
                  '</div>'+
                '</div>'+
              '</div>');
      $('#img_dialog_wrap').hide();
      $('.viewable').css('cursor', 'pointer');
      document.getElementById('img_dialog_wrap').style.display='none';
      //$('.viewable').css('cursor', 'pointer');

         if(images.length > 1)
              $('#main-max-container').append('<div>'
@@ -41,15 +41,15 @@ class ImageViewer extends Plugin{
    }

    showImages(tileSources){
       $('#img_dialog_wrap .modal-body').html('');
       $('#img_dialog_wrap .modal-body').append('<div id="osd-viewer" style="display: flex;"></div>')
       //document.querySelector('#img_dialog_wrap .modal-body')innerHTML = '';
       document.querySelector('#img_dialog_wrap .modal-body').innerHTML = '<div id="osd-viewer" style="display: flex;"></div>'
       OpenSeadragon({
                    id:            "osd-viewer",
                    prefixUrl:     baseURI + "core/ui/lib/openseadragon/images/",
                    tileSources:   tileSources,
                    sequenceMode:  tileSources.length > 1
                });
      $('#img_dialog_wrap').modal();
      document.getElementById('img_dialog_wrap').style.display='block';
    }

    openImagesInDialog(){