diff --git a/htdocs/lib/web.php b/htdocs/lib/web.php index 853dcc2845767483e488d9cfff4396ed03becf83..9a7fc9fb5eca972b9037273b0f1e6ffc552ee76b 100644 --- a/htdocs/lib/web.php +++ b/htdocs/lib/web.php @@ -211,6 +211,17 @@ tinyMCE.init({ ed.on('LoadContent', function(e) { // Hide all the 2nd/3rd row menu buttons jQuery('.mce-toolbar.mce-first').siblings().toggleClass('hidden'); + // The tinymce fullscreen mode does not work properly in a transformed container div + // such as div.vertcentre + // and IE doesn't like a preset z-index + // This work-around will remove/add classes: .vertcenter .configure .blockinstane + // of the configure block div + // when toggling fullscreen + jQuery('div[aria-label="Fullscreen"]').on('click', function(e) { + jQuery('div#configureblock').toggleClass('vertcentre'); + jQuery('div#configureblock').toggleClass('blockinstance'); + jQuery('div#configureblock').toggleClass('configure'); + }); }); {$extrasetup} } @@ -232,20 +243,6 @@ function imageBrowserConfigError(form, data) { } } -function updateBlockConfigWidth(configblock, width) { - var vpdim = getViewportDimensions(); - var w = Math.max(width, 500); - var style = { - 'position': 'absolute', - 'z-index': 1 - }; - var lborder = parseFloat(getStyle(configblock, 'border-left-width')); - var lpadding = parseFloat(getStyle(configblock, 'padding-left')); - style.left = ((vpdim.w - w) / 2 - lborder - lpadding) + 'px'; - style.width = w + 'px'; - setStyle(configblock, style); -} - function custom_urlconvert (u, n, e) { // Don't convert the url on the skype status buttons. if (u.indexOf('skype:') == 0) {