[kupu-checkins] r48642 - kupu/trunk/kupu/common
duncan at codespeak.net
duncan at codespeak.net
Tue Nov 13 12:04:45 CET 2007
Author: duncan
Date: Tue Nov 13 12:04:45 2007
New Revision: 48642
Modified:
kupu/trunk/kupu/common/kupubasetools.js
Log:
Reduce repetition of iframe.parentNode
Modified: kupu/trunk/kupu/common/kupubasetools.js
==============================================================================
--- kupu/trunk/kupu/common/kupubasetools.js (original)
+++ kupu/trunk/kupu/common/kupubasetools.js Tue Nov 13 12:04:45 2007
@@ -2740,7 +2740,7 @@
if (window.innerWidth) {
var width = window.innerWidth;
var height = window.innerHeight;
- var tbheight = iframe.parentNode.parentNode.getElementsByClassName('kupu-tb')[0].getHeight();
+ var tbheight = fulleditor.parentNode.getElementsByClassName('kupu-tb')[0].getHeight();
var nheight = height - tbheight + 'px'
} else if (document.documentElement) {
if (!window._IE_VERSION) {
@@ -2749,12 +2749,12 @@
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 offset = fulleditor.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;
- var offset = iframe.parentNode.offsetTop;
+ var offset = fulleditor.offsetTop;
var nheight = Math.max(height - offset -1/*top border*/, 10) + 'px';
}
width = width + 'px';
More information about the kupu-checkins
mailing list