Modification de l'import de swfheader : installé avec easy_install, il n'est pas...
[Plinn.git] / skins / ajax_scripts / epoz_plinn.js
1 // (c) Benoît PIN 2006-2007
2 // http://plinn.org
3 // Licence GPL
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 $
6
7 function _resetEpoz() {
8 form_path = absolute_url() + '/';
9 EpozElement = null;
10 EpozTextArea = null;
11 }
12
13 function initEpozWidget(iframe) {
14 var toolBar = iframe.parentNode;
15 var ta = toolBar.nextSibling; // ta -> textarea
16 var name = ta.name;
17
18 // change ids
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;
24
25 // populate iframe's document
26 iframe.contentWindow.document.body.innerHTML = ta.value;
27 addListener(iframe, "click", HandleEpozRedirect);
28
29 if (browser.isGecko) {
30 scriptExpr = 'EnableDesignMode("' + iframe.id + '");';
31 window.setTimeout(scriptExpr, 10);
32 }
33
34 toolBar.style.display = "inline";
35 checkbox.parentNode.style.display = "inline";
36 changeBorderStyle(iframe, "dashed");
37 }