]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/TinyMCE/js/themes/advanced/js/source_editor.js
upgrade TinyMCE to 3.4.x
[quix0rs-gnu-social.git] / plugins / TinyMCE / js / themes / advanced / js / source_editor.js
index 279328614c5ee8a0077295a0ff7814a24d723922..84546ad52ebc461ccdebb02e1762e8c9ea760744 100644 (file)
@@ -44,19 +44,13 @@ function toggleWordWrap(elm) {
                setWrap('off');\r
 }\r
 \r
-var wHeight=0, wWidth=0, owHeight=0, owWidth=0;\r
-\r
 function resizeInputs() {\r
-       var el = document.getElementById('htmlSource');\r
+       var vp = tinyMCEPopup.dom.getViewPort(window), el;\r
 \r
-       if (!tinymce.isIE) {\r
-                wHeight = self.innerHeight - 65;\r
-                wWidth = self.innerWidth - 16;\r
-       } else {\r
-                wHeight = document.body.clientHeight - 70;\r
-                wWidth = document.body.clientWidth - 16;\r
-       }\r
+       el = document.getElementById('htmlSource');\r
 \r
-       el.style.height = Math.abs(wHeight) + 'px';\r
-       el.style.width  = Math.abs(wWidth) + 'px';\r
+       if (el) {\r
+               el.style.width = (vp.w - 20) + 'px';\r
+               el.style.height = (vp.h - 65) + 'px';\r
+       }\r
 }\r