1 // (c) BenoƮt PIN 2006-2007
4 // $Id: epoz_plinn.js 1315 2008-07-29 15:36:15Z pin $
5 // $URL: http://svn.cri.ensmp.fr/svn/Plinn/branches/CMF-2.1/skins/ajax_scripts/epoz_plinn.js $
7 function _resetEpoz() {
8 form_path
= absolute_url() + '/';
13 function initEpozWidget(iframe
) {
14 var toolBar
= iframe
.parentNode
;
15 var ta
= toolBar
.nextSibling
; // ta -> textarea
19 iframe
.id
= IFramePrefix
+ name
;
20 iframe
.contentWindow
.document
.id
= DocPrefix
+ name
;
21 toolBar
.id
= ToolBarPrefix
+ name
;
22 var checkbox
= ta
.nextSibling
.childNodes
[0];
23 checkbox
.id
= CheckBoxPrefix
+ name
;
25 // populate iframe's document
26 iframe
.contentWindow
.document
.body
.innerHTML
= ta
.value
;
27 addListener(iframe
, "click", HandleEpozRedirect
);
29 if (browser
.isGecko
) {
30 scriptExpr
= 'EnableDesignMode("' + iframe
.id
+ '");';
31 window
.setTimeout(scriptExpr
, 10);
34 toolBar
.style
.display
= "inline";
35 checkbox
.parentNode
.style
.display
= "inline";
36 changeBorderStyle(iframe
, "dashed");