From 8a8560c1b75ce5cb9f3b86bf3cba19c6df5000ff Mon Sep 17 00:00:00 2001 From: donncha Date: Fri, 26 Jan 2007 12:57:25 +0000 Subject: WP Merge to rev 4813 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@868 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- .../tinymce/plugins/inlinepopups/editor_plugin.js | 46 +++++++++++----------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'wp-includes/js/tinymce/plugins/inlinepopups') diff --git a/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js b/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js index 304e478..9f75e29 100644 --- a/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js +++ b/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js @@ -1,10 +1,10 @@ /** - * $Id: editor_plugin_src.js 126 2006-10-22 16:19:55Z spocke $ + * $Id: editor_plugin_src.js 172 2007-01-09 11:37:11Z spocke $ * * Moxiecode DHTML Windows script. * * @author Moxiecode - * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. + * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved. */ // Patch openWindow, closeWindow TinyMCE functions @@ -66,13 +66,17 @@ TinyMCE_Engine.prototype.openWindow = function(template, args) { } var elm = document.getElementById(this.selectedInstance.editorId + '_parent'); - var pos = tinyMCE.getAbsPosition(elm); + + if (tinyMCE.hasPlugin('fullscreen') && this.selectedInstance.getData('fullscreen').enabled) + pos = { absLeft: 0, absTop: 0 }; + else + pos = tinyMCE.getAbsPosition(elm); // Center div in editor area pos.absLeft += Math.round((elm.firstChild.clientWidth / 2) - (width / 2)); pos.absTop += Math.round((elm.firstChild.clientHeight / 2) - (height / 2)); - url += tinyMCE.settings['imp_version'] ? (url.indexOf('?')==-1?'?':'&') + 'ver=' + tinyMCE.settings['imp_version'] : ''; + url += tinyMCE.settings['imp_version'] ? (url.indexOf('?')==-1?'?':'&') + 'ver=' + tinyMCE.settings['imp_version'] : ''; // WordPress cache buster mcWindows.open(url, mcWindows.idCounter++, "modal=yes,width=" + width+ ",height=" + height + ",resizable=" + resizable + ",scrollbars=" + scrollbars + ",statusbar=" + resizable + ",left=" + pos.absLeft + ",top=" + pos.absTop); }; @@ -111,7 +115,7 @@ function TinyMCE_Windows() { this.action = "none"; this.selectedWindow = null; this.lastSelectedWindow = null; - this.zindex = 100; + this.zindex = 1001; this.mouseDownScreenX = 0; this.mouseDownScreenY = 0; this.mouseDownLayerX = 0; @@ -323,8 +327,9 @@ TinyMCE_Windows.prototype.open = function(url, name, features) { // Blocks the document events by placing a image over the whole document TinyMCE_Windows.prototype.setDocumentLock = function(state) { + var elm = document.getElementById('mcWindowEventBlocker'); + if (state) { - var elm = document.getElementById('mcWindowEventBlocker'); if (elm == null) { elm = document.createElement("div"); @@ -348,9 +353,7 @@ TinyMCE_Windows.prototype.setDocumentLock = function(state) { elm.style.zIndex = mcWindows.zindex-1; elm.style.display = "block"; - } else { - var elm = document.getElementById('mcWindowEventBlocker'); - + } else if (elm != null) { if (mcWindows.windows.length == 0) elm.parentNode.removeChild(elm); else @@ -559,7 +562,7 @@ TinyMCE_Window.prototype.close = function() { mcWindows.setDocumentLock(false); - tinyMCE.selectedInstance.getWin().focus(); + tinyMCE.selectedInstance.getWin().focus(); // WordPress: focus on the editor after closing a popup }; TinyMCE_Window.prototype.onMouseMove = function(e) { @@ -578,23 +581,22 @@ TinyMCE_Window.prototype.onMouseMove = function(e) { width = width < 100 ? 100 : width; height = height < 100 ? 100 : height; - this.wrapperIFrameElement.style.width = width+2; - this.wrapperIFrameElement.style.height = height+2; + this.wrapperIFrameElement.style.width = (width+2) + 'px'; + this.wrapperIFrameElement.style.height = (height+2) + 'px'; this.wrapperIFrameElement.width = width+2; this.wrapperIFrameElement.height = height+2; - this.winElement.style.width = width; - this.winElement.style.height = height; + this.winElement.style.width = width + 'px'; + this.winElement.style.height = height + 'px'; height = height - this.deltaHeight; - this.containerElement.style.width = width; - - this.iframeElement.style.width = width; - this.iframeElement.style.height = height; - this.bodyElement.style.width = width; - this.bodyElement.style.height = height; - this.headElement.style.width = width; - //this.statusElement.style.width = width; + this.containerElement.style.width = width + 'px'; + this.iframeElement.style.width = width + 'px'; + this.iframeElement.style.height = height + 'px'; + this.bodyElement.style.width = width + 'px'; + this.bodyElement.style.height = height + 'px'; + this.headElement.style.width = width + 'px'; + //this.statusElement.style.width = width + 'px'; mcWindows.cancelEvent(e); break; -- cgit