[kupu-checkins] r43402 - kupu/trunk/kupu/common
duncan at codespeak.net
duncan at codespeak.net
Tue May 15 12:10:59 CEST 2007
Author: duncan
Date: Tue May 15 12:10:58 2007
New Revision: 43402
Modified:
kupu/trunk/kupu/common/kupubasetools.js
Log:
Danny asked "Can you please add the 'kupu-fulleditor-zoomed' class to the body inside the iframe when it's in zoomed mode? I cannot create a css rule to adjust margins and sizes otherwise."
Modified: kupu/trunk/kupu/common/kupubasetools.js
==============================================================================
--- kupu/trunk/kupu/common/kupubasetools.js (original)
+++ kupu/trunk/kupu/common/kupubasetools.js Tue May 15 12:10:58 2007
@@ -1265,7 +1265,7 @@
} else {
return ed.insertNodeAtSelection(obj, 1);
}
- }
+ };
this.createImage = function(url, alttext, imgclass) {
/* create an image */
var img = this.editor.getInnerDocument().createElement('img');
@@ -1291,7 +1291,7 @@
[ed.newElement('param', {name:'movie', value:url})]);
this.newNode('OBJECT', obj);
this.editor.logMessage(_('Flash inserted'));
- }
+ };
this.setImageClass = function(imgclass) {
/* set the class of the selected image */
@@ -2821,17 +2821,20 @@
var body = document.body;
var html = document.getElementsByTagName('html')[0];
+ var doc = editor.getInnerDocument();
if (zoom) {
html.style.overflow = 'hidden';
window.scrollTo(0, 0);
editor.setClass(zoomClass);
body.className += ' '+zoomClass;
+ doc.body.className += ' '+zoomClass;
this.onresize();
} else {
html.style.overflow = '';
var fulleditor = iframe.parentNode;
fulleditor.style.width = '';
body.className = body.className.replace(/ *kupu-fulleditor-zoomed/, '');
+ doc.body.className = doc.body.className.replace(/ *kupu-fulleditor-zoomed/, '');
editor.clearClass(zoomClass);
iframe.style.width = '';
@@ -2844,7 +2847,6 @@
sourceArea.style.height = '';
};
}
- var doc = editor.getInnerDocument();
// Mozilla needs this. Yes, really!
doc.designMode=doc.designMode;
More information about the kupu-checkins
mailing list