[kupu-checkins] r48473 - kupu/trunk/kupu/common
duncan at codespeak.net
duncan at codespeak.net
Fri Nov 9 15:11:41 CET 2007
Author: duncan
Date: Fri Nov 9 15:11:40 2007
New Revision: 48473
Modified:
kupu/trunk/kupu/common/kupubasetools.js
Log:
Added Danny's patch to zoom sizing code
Modified: kupu/trunk/kupu/common/kupubasetools.js
==============================================================================
--- kupu/trunk/kupu/common/kupubasetools.js (original)
+++ kupu/trunk/kupu/common/kupubasetools.js Fri Nov 9 15:11:40 2007
@@ -2740,6 +2740,8 @@
if (window.innerWidth) {
var width = window.innerWidth;
var height = window.innerHeight;
+ var tbheight = iframe.parentNode.parentNode.getElementsByClassName('kupu-tb')[0].getHeight();
+ var nheight = height - tbheight + 'px'
} else if (document.documentElement) {
if (!window._IE_VERSION) {
_IE_VERSION = /MSIE\s*([0-9.]*)/.exec(navigator.appVersion);
@@ -2747,20 +2749,22 @@
var kludge = (_IE_VERSION[1]<7)?5:0;
var width = document.documentElement.offsetWidth-kludge;
var height = document.documentElement.offsetHeight-kludge;
+ var offset = iframe.parentNode.offsetTop;
+ var nheight = Math.max(height - offset -1/*top border*/, 10) + 'px';
} else {
- var width = document.body.offsetWidth-5;
- var height = document.body.offsetHeight-5;
- }
- width = width + 'px';
- var offset = iframe.parentNode.offsetTop;
- var nheight = Math.max(height - offset -1/*top border*/, 10) + 'px';
- fulleditor.style.width = width; /*IE needs this*/
- iframe.style.width = width;
- iframe.style.height = nheight;
- if (sourceArea) {
- sourceArea.style.width = width;
- sourceArea.style.height = nheight;
- }
+ var width = document.body.offsetWidth-5;
+ var height = document.body.offsetHeight-5;
+ var offset = iframe.parentNode.offsetTop;
+ var nheight = Math.max(height - offset -1/*top border*/, 10) + 'px';
+ }
+ width = width + 'px';
+ fulleditor.style.width = width; /*IE needs this*/
+ iframe.style.width = width;
+ iframe.style.height = nheight;
+ if (sourceArea) {
+ sourceArea.style.width = width;
+ sourceArea.style.height = nheight;
+ }
};
KupuZoomTool.prototype.checkfunc = function(selNode, button, editor, event) {
More information about the kupu-checkins
mailing list