X-Git-Url: https://scm.cri.ensmp.fr/git/Plinn.git/blobdiff_plain/3c4367d8e03450e9a73e61f4247145d2b6c86a33..959d888c17d1403d2eeecc19bc4b5e2c8d1debf6:/Products/Plinn/skins/ajax_scripts/epoz_plinn.js diff --git a/Products/Plinn/skins/ajax_scripts/epoz_plinn.js b/Products/Plinn/skins/ajax_scripts/epoz_plinn.js new file mode 100644 index 0000000..0dcc93d --- /dev/null +++ b/Products/Plinn/skins/ajax_scripts/epoz_plinn.js @@ -0,0 +1,37 @@ +// (c) Benoît PIN 2006-2007 +// http://plinn.org +// Licence GPL +// +// + +function _resetEpoz() { + form_path = absolute_url() + '/'; + EpozElement = null; + EpozTextArea = null; +} + +function initEpozWidget(iframe) { + var toolBar = iframe.parentNode; + var ta = toolBar.nextSibling; // ta -> textarea + var name = ta.name; + + // change ids + iframe.id = IFramePrefix + name; + iframe.contentWindow.document.id = DocPrefix + name; + toolBar.id = ToolBarPrefix + name; + var checkbox = ta.nextSibling.childNodes[0]; + checkbox.id = CheckBoxPrefix + name; + + // populate iframe's document + iframe.contentWindow.document.body.innerHTML = ta.value; + addListener(iframe, "click", HandleEpozRedirect); + + if (browser.isGecko) { + scriptExpr = 'EnableDesignMode("' + iframe.id + '");'; + window.setTimeout(scriptExpr, 10); + } + + toolBar.style.display = "inline"; + checkbox.parentNode.style.display = "inline"; + changeBorderStyle(iframe, "dashed"); +}