diff --git a/VERSIONS_HOTLINE/64357 b/VERSIONS_HOTLINE/64357 new file mode 100644 index 0000000000000000000000000000000000000000..22620b5ad0a429a6a66631f5f3f54b882b7924ac --- /dev/null +++ b/VERSIONS_HOTLINE/64357 @@ -0,0 +1 @@ + - ticket #64357 : Correction des problèmes d'affichage sur tablette Apple des popups \ No newline at end of file diff --git a/public/opac/js/subModal.js b/public/opac/js/subModal.js index c6126807a88a1b32c86879966e61b01d8f895711..a7b0c32e6ad3a8ba2cbc382abd8e6a75f76e7cf1 100644 --- a/public/opac/js/subModal.js +++ b/public/opac/js/subModal.js @@ -109,20 +109,21 @@ var fixWindowPositionAndWidth = function(dialog) { var max_height = Math.round($(window).height() * 0.8); + var window_width = Math.round($(window).width()); + var min_width = 400; + dialog .css('position', 'fixed') .css('top', '15%') - .css('left', '20%') - .css('width', '60%') + .css('left', window_width < min_width ? '0' : '20%') + .css('width', window_width < min_width ? '100%' : '60%') .css('max-height', max_height + 'px') .find('.ui-dialog-content') .css('max-height', (max_height - 50) + 'px') .css('width', 'auto') .css('overflow-y', 'auto'); - - dialog.position({of: $(window)}); - } + } window.opacShowModal = function(url, width, height, returnFunc, showCloseBox, titleDialog) {