2008-03-07 Stanislas Rolland <typo3@sjbr.ca>
* Added two icons to htmlArea RTE skin for definition lists
+ * Cleaned up dead code related to htmlArea RTE popups
2008-03-06 Ingo Renner <ingo@typo3.org>
2008-03-07 Stanislas Rolland <typo3@sjbr.ca>
* Added two icons to htmlArea RTE skin for definition lists
+ * Cleaned up dead code related to htmlArea RTE popups
2008-03-05 Stanislas Rolland <typo3@sjbr.ca>
+++ /dev/null
-<html class="popupwin" style="height: 100%">
-<!--
-/***************************************************************
-* Copyright notice
-*
-* (c) 2002-2004, interactivetools.com, inc.
-* (c) 2003-2004 dynarch.com
-* (c) 2004, 2005, 2006 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
-* All rights reserved
-*
-* This script is part of the TYPO3 project. The TYPO3 project is
-* free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* The GNU General Public License can be found at
-* http://www.gnu.org/copyleft/gpl.html.
-* A copy is found in the textfile GPL.txt and important notices to the license
-* from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-* This script is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* This script is a modified version of a script published under the htmlArea License.
-* A copy of the htmlArea License may be found in the textfile HTMLAREA_LICENSE.txt.
-*
-* This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/*
- * About window for TYPO3 htmlArea RTE
- *
- * TYPO3 CVS ID: $Id$
- */
- -->
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>About HTMLArea</title>
- <script type="text/javascript" src="popup.js"></script>
- <script type="text/javascript">
- var HTMLArea = window.opener.HTMLArea;
- var RTEarea = window.opener.RTEarea;
- var _editor_CSS = window.opener._editor_CSS;
- __dlg_loadStyle(_editor_CSS);
-
- function Init() {
- __dlg_init();
- initDocument();
- __dlg_translate(HTMLArea.I18N.dialogs);
- };
-
- var TABS = [];
- var CURRENT_TAB = 0;
- var CONTENT_HEIGHT_DIFF = 0;
- var CONTENT_WIDTH_DIFF = 0;
-
- function selectTab(idx) {
- var ct = TABS[CURRENT_TAB];
- HTMLArea._removeClass(ct, "tab-current");
- ct = TABS[CURRENT_TAB = idx];
- HTMLArea._addClass(ct, "tab-current");
- for (var i = TABS.length; --i >= 0;) {
- var area = document.getElementById("tab-area-" + i);
- if (CURRENT_TAB == i) area.style.display = "block";
- else area.style.display = "none";
- }
- document.body.style.visibility = "hidden";
- document.body.style.visibility = "visible";
- document.cookie = "HTMLAREA-ABOUT-TAB=" + idx;
- }
-
- function initDocument() {
- var editor = window.dialogArguments;
- var version = document.getElementById("version");
- version.innerHTML = "htmlArea RTE v " + RTEarea[0]["version"];
- var plugins = document.getElementById("plugins");
- var j = 0, i, info;
- var html = "<table width='99%' cellpadding='0' style='border-collapse: collapse; border: 1px solid #8b8;'>" +
- "<thead><tr>" +
- "<td>Name</td>" +
- "<td>Developer</td>" +
- "<td>Sponsored by</td>" +
- "</tr></thead><tbody>";
- for (i in editor.plugins) {
- info = editor.plugins[i];
- html += "<tr><td>" + info.name + " v" + info.version + "</td>" +
- "<td><a href='" + info.developer_url + "' target='_blank' >" +
- info.developer + "</a></td>" +
- "<td><a href='" + info.sponsor_url + "' target='_blank' >" +
- info.sponsor + "</a></td>" +
- "</tr>";
- ++j;
- }
-
- if (j) {
- html += "</tbody></table>";
- plugins.innerHTML = "<p><span>The following plugins have been loaded.</span></p>" + html;
- } else {
- plugins.innerHTML = "<p><span>No plugins have been loaded.</span></p>";
- }
-
- plugins.innerHTML += "<p><span>User agent reports:</span><br/>" + navigator.userAgent + "</p>";
-
- var content = document.getElementById("tab-areas-content");
- if (window.innerHeight) {
- CONTENT_HEIGHT_DIFF = window.innerHeight - 250;
- CONTENT_WIDTH_DIFF = window.innerWidth - content.offsetWidth;
- } else {
- CONTENT_HEIGHT_DIFF = document.body.offsetHeight - 250;
- CONTENT_WIDTH_DIFF = document.body.offsetWidth - 400;
- }
- window.onresize();
-
- var bar = document.getElementById("tabbar");
- j = 0;
- for (i = bar.firstChild; i; i = i.nextSibling) {
- if(i.nodeType == 1) {
- TABS.push(i);
- i.__msh_tab = j;
- i.onmousedown = function(ev) { selectTab(this.__msh_tab); HTMLArea._stopEvent(ev || window.event); };
- var area = document.getElementById("tab-area-" + j);
- if (/tab-current/.test(i.className)) {
- CURRENT_TAB = j;
- area.style.display = "block";
- } else {
- area.style.display = "none";
- }
- ++j;
- }
- }
- if (document.cookie.match(/HTMLAREA-ABOUT-TAB=([0-1]+)/)) selectTab(RegExp.$1);
- }
-
- window.onresize = function() {
- var content = document.getElementById("tab-areas-content");
- if (window.innerHeight) {
- content.style.height = (window.innerHeight - CONTENT_HEIGHT_DIFF) + "px";
- content.style.width = (window.innerWidth - CONTENT_WIDTH_DIFF) + "px";
- } else {
- content.style.height = (document.body.offsetHeight - CONTENT_HEIGHT_DIFF) + "px";
- //content.style.width = (document.body.offsetWidth - CONTENT_WIDTH_DIFF) + "px";
- }
- }
- </script>
-</head>
-<body class="popupwin" onload="Init();">
-<div id="content">
- <div class="title" style="cursor: pointer;" onclick="window.open('http://typo3.org/extensions/repository/search/rtehtmlarea/');">About HTMLArea</div>
- <div style="overflow: auto; height: 250px;" id="tab-areas-content">
- <div id="tab-areas">
- <div id="tab-area-0">
- <h1 id="version">htmlArea RTE v 1.1.3</h1>
- <p><span>free_editor</span></p>
- <p><span>Mozilla_or_IE</span></p>
- <p><span>product_documentation</span> <a href="http://typo3.org/extensions/repository/search/rtehtmlarea/" target="_blank">typo3.org</a></p>
- <p style="text-align: center;">
- <br />
- © 2002-2004 <a href="http://interactivetools.com" target="_blank">interactivetools.com, inc.</a><br />
- © 2003-2004 <a href="http://dynarch.com" target="_blank">dynarch.com LLC.</a><br />
- © 2004-2006 <a href="http://www.fructifor.ca" target="_blank">Stanislas Rolland</a><br />
- <span>All rights reserved.</span>
- </p>
- </div>
- <div id="tab-area-1">
- <h1>Plugins</h1>
- <div id="plugins"></div>
- </div>
- </div>
- </div>
- <div class="buttons">
- <div id="tabbar">
- <div class="tab tab-current">About</div>
- <div class="tab">Plugins</div>
- </div>
- <button type="button" onclick="__dlg_close(null);">Close</button>
- </div>
-</div>
-</body></html>
\ No newline at end of file
+++ /dev/null
-<!--
-/***************************************************************
-* Copyright notice
-*
-* (c) 2002-2004, interactivetools.com, inc.
-* (c) 2003-2004 dynarch.com
-* (c) 2004, 2005, 2006 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
-* All rights reserved
-*
-* This script is part of the TYPO3 project. The TYPO3 project is
-* free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* The GNU General Public License can be found at
-* http://www.gnu.org/copyleft/gpl.html.
-* A copy is found in the textfile GPL.txt and important notices to the license
-* from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-* This script is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* This script is a modified version of a script published under the htmlArea License.
-* A copy of the htmlArea License may be found in the textfile HTMLAREA_LICENSE.txt.
-*
-* This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/*
- * Insert Image window for TYPO3 htmlArea RTE
- *
- * TYPO3 CVS ID: $Id$
- */
--->
-<html class="popupwin">
-<head>
- <title>Insert Image</title>
- <meta http-equiv="Content-Style-Type" content="text/css" />
- <script type="text/javascript" src="popup.js"></script>
- <script type="text/javascript">
- HTMLArea = window.opener.HTMLArea;
- _editor_CSS = window.opener._editor_CSS;
- __dlg_loadStyle(_editor_CSS);
- var i18n = HTMLArea.I18N.dialogs;
-
- function Init() {
- __dlg_translate(i18n);
- __dlg_init();
- var param = window.dialogArguments;
- if (param) {
- document.getElementById("f_url").value = param["f_url"];
- document.getElementById("f_alt").value = param["f_alt"];
- document.getElementById("f_border").value = param["f_border"];
- var select = document.getElementById("f_align");
- for (var i = select.options.length; --i >= 0;) {
- if (param["f_align"] == select.options[i].value) {
- select.selectedIndex = i;
- break;
- }
- }
- document.getElementById("f_vert").value = param["f_vert"];
- document.getElementById("f_horiz").value = param["f_horiz"];
- var select = document.getElementById("f_float");
- for (var i = select.options.length; --i >= 0;) {
- if (param["f_float"] == select.options[i].value) {
- select.selectedIndex = i;
- break;
- }
- }
- window.ipreview.location.replace(param.f_url);
- }
- document.getElementById("f_url").focus();
- };
-
- function onOK() {
- var required = { "f_url": "image_url_required" };
- for (var i in required) {
- var el = document.getElementById(i);
- if (!el.value) {
- alert(i18n[required[i]]);
- el.focus();
- return false;
- }
- }
- // pass data back to the calling window
- var fields = ["f_url", "f_alt", "f_align", "f_border", "f_horiz", "f_vert", "f_float"];
- var param = new Object();
- for (var i in fields) {
- var id = fields[i];
- var el = document.getElementById(id);
- param[id] = el.value;
- }
- __dlg_close(param);
- return false;
- };
-
- function onCancel() {
- __dlg_close(null);
- return false;
- };
-
- function onPreview() {
- var f_url = document.getElementById("f_url");
- var url = f_url.value;
- if (!url) {
- alert(i18n["image_url_first"]);
- f_url.focus();
- return false;
- }
- window.ipreview.location.replace(url);
- return false;
- };
-</script>
-</head>
-<body class="popuwin" onload="Init();">
-<div class="title">Insert Image</div>
-<form action="" method="get">
- <label for="f_url" class="field">Image URL:</label>
- <input type="text" id="f_url" name="url" size="65" title="Enter the image URL here" />
- <button name="preview" onclick="return onPreview();" title="Preview the image in a new window">Preview</button>
- <div class="space"></div>
- <label for="f_alt" class="field">Alternate text:</label>
- <input type="text" name="alt" id="f_alt" size="80" title="For browsers that dont support images" />
- <div class="space"></div>
- <fieldset class="floating">
- <legend>Layout</legend>
- <ul>
- <li>
- <label for="f_align" class="fl">Image alignment:</label>
- <select class="alignment" size="1" name="align" id="f_align" title="Positioning of this image">
- <option value="bottom">Bottom</option>
- <option value="middle" selected="selected">Middle</option>
- <option value="top">Top</option>
- </select>
- </li>
- <li>
- <label for="f_border" class="fl">Border thickness:</label>
- <input type="text" name="border" id="f_border" size="5" title="Leave empty for no border" />
- </li>
- <li>
- <label for="f_float" class="fl">Float:</label>
- <select class="float" size="1" name="style" id="f_float" title="Where the image should float">
- <option value="none">Non-floating</option>
- <option value="left">Left</option>
- <option value="right">Right</option>
- </select>
- </li>
- </ul>
- </fieldset>
- <fieldset>
- <legend>Spacing and padding</legend>
- <ul>
- <li>
- <label for="f_horiz" class="fl">Horizontal:</label>
- <input type="text" name="horiz" id="f_horiz" size="5" title="Horizontal padding" />
- </li>
- <li>
- <label for="f_vert" class="fl">Vertical:</label>
- <input type="text" name="vert" id="f_vert" size="5" title="Vertical padding" />
- </li>
- </ul>
- </fieldset>
- <div class="space"></div>
- <fieldset>
- <legend>Image Preview</legend>
- <div class="imagepreview">
- <iframe name="ipreview" id="ipreview" frameborder="0" src="";></iframe>
- </div>
- </fieldset>
- <div class="buttons">
- <button type="button" name="ok" onclick="return onOK();">OK</button>
- <button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
- </div>
-</form>
-</body>
-</html>
+++ /dev/null
-<!--
-/***************************************************************
-* Copyright notice
-*
-* (c) 2002-2004, interactivetools.com, inc.
-* (c) 2003-2004 dynarch.com
-* (c) 2004, 2005, 2006 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
-* All rights reserved
-*
-* This script is part of the TYPO3 project. The TYPO3 project is
-* free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* The GNU General Public License can be found at
-* http://www.gnu.org/copyleft/gpl.html.
-* A copy is found in the textfile GPL.txt and important notices to the license
-* from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-* This script is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* This script is a modified version of a script published under the htmlArea License.
-* A copy of the htmlArea License may be found in the textfile HTMLAREA_LICENSE.txt.
-*
-* This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/*
- * Insert Table window for TYPO3 htmlArea RTE
- *
- * TYPO3 CVS ID: $Id$
- */
--->
-<html class="popupwin">
-<head>
- <title>Insert Table</title>
- <meta http-equiv="Content-Style-Type" content="text/css" />
- <script type="text/javascript" src="popup.js"></script>
- <script type="text/javascript">
- HTMLArea = window.opener.HTMLArea;
- _editor_CSS = window.opener._editor_CSS;
- __dlg_loadStyle(_editor_CSS);
- var i18n = window.opener.HTMLArea.I18N.dialogs;
- var editor = window.opener.Dialog._arguments;
-
- function Init() {
- var content = document.getElementById("content");
- buildTitle(i18n, content, "Insert Table");
- var form = document.createElement("form");
- form.action = "";
- form.method = "get";
- buildDimensionFieldset(i18n,form);
- if (!editor.config.disableBordersFieldsetInTableOperations) buildBordersFieldset(i18n, form);
- if (!editor.config.disableSpacingFieldsetInTableOperations) buildSpacingFieldset(i18n, form);
- addButtons(i18n, form, ["ok","cancel"], ["OK","Cancel"]);
- content.appendChild(form);
- __dlg_init();
- document.getElementById("f_rows").focus();
- };
- function onOK() {
- var required = { "f_rows": "", "f_cols": "" };
- required["f_rows"] = i18n["You must enter a number of rows"];
- required["f_cols"] = i18n["You must enter a number of columns"];
- for (var i in required) {
- var el = document.getElementById(i);
- if (!el.value) {
- alert(required[i]);
- el.focus();
- return false;
- }
- }
- var fields = ["f_rows", "f_cols", "f_width", "f_unit", "f_border", "f_spacing", "f_padding", "f_float"];
- var param = new Object();
- for (var i in fields) {
- var id = fields[i];
- var el = document.getElementById(id);
- if(el) param[id] = el.value;
- }
- __dlg_close(param);
- return false;
- };
- function onCancel() {
- __dlg_close(null);
- return false;
- };
- function buildTitle(i18n,content,title) {
- var div = document.createElement("div");
- div.className = "title";
- div.innerHTML = i18n[title];
- content.appendChild(div);
- document.title = i18n[title];
- };
- function buildDimensionFieldset(i18n,content) {
- var fieldset = document.createElement("fieldset");
- insertLegend(i18n, fieldset, "Dimension");
- buildInput(i18n, fieldset, "f_rows", ["Rows:"], ["Number of rows"], "5", "2");
- buildInput(i18n, fieldset, "f_cols", ["Cols:"], ["Number of columns"], "5", "4");
- if (!editor.config.disableLayoutFieldsetInTableOperations) {
- buildInput(i18n, fieldset, "f_width", ["Width:"], ["Width of the table"], "5", "100");
- buildUnitField(i18n, fieldset);
- }
- content.appendChild(fieldset);
- };
- function buildBordersFieldset(i18n,content) {
- var fieldset = document.createElement("fieldset");
- fieldset.className = "floating";
- insertLegend(i18n, fieldset, "Border");
- var ul = document.createElement("ul");
- fieldset.appendChild(ul);
- var li = document.createElement("li");
- ul.appendChild(li);
- buildInput(i18n, li, "f_border", ["Border thickness:"], ["Leave empty for no border"], "5", "1", "fl", "");
- content.appendChild(fieldset);
- };
- function buildSpacingFieldset(i18n,content) {
- var fieldset = document.createElement("fieldset");
- insertLegend(i18n, fieldset, "Spacing and padding");
- var ul = document.createElement("ul");
- fieldset.appendChild(ul);
- var li = document.createElement("li");
- ul.appendChild(li);
- buildInput(i18n, li, "f_spacing", ["Cell spacing:"], ["Space between adjacent cells"], "5", "1", "fr", "");
- var li = document.createElement("li");
- ul.appendChild(li);
- buildInput(i18n, li, "f_padding", ["Cell padding:"], ["Space between content and border in cell"], "5", "1", "fr", "");
- content.appendChild(fieldset);
- };
- function buildUnitField(i18n, fieldset) {
- // Unit Select Box
- var select = document.createElement("select");
- select.id = "f_unit";
- select.name = "f_unit";
- select.title= i18n["Width unit"];
- buildSelect(i18n, select, ["Percent", "Pixels", "Em"], ["%", "px", "em"], new RegExp("%", "i"));
- fieldset.appendChild(select);
- };
- function buildTableFloatField(i18n, fieldset) {
- // Table Float Label
- var label = document.createElement("label");
- label.className = "fl";
- label.innerHTML = i18n["Float:"];
- label.htmlFor = "f_float";
- fieldset.appendChild(label);
- // Table Float Select Box
- var select = document.createElement("select");
- select.id = "f_float";
- select.name = "f_float";
- select.title= i18n["Where the table should float"];
- buildSelect(i18n, select, ["Not set", "Non-floating", "Left", "Right"], ["not set", "none", "left", "right"], new RegExp("not set", "i"));
- fieldset.appendChild(select);
- };
- function insertLegend(i18n, fieldset,legend) {
- var legendNode = document.createElement("legend");
- legendNode.innerHTML = i18n[legend];
- fieldset.appendChild(legendNode);
- };
- function buildInput(i18n, fieldset,fieldName,fieldLabel,fieldTitle, fieldSize, fieldValue, labelClass, inputClass) {
- // Field label
- var label = document.createElement("label");
- if(labelClass) label.className = labelClass;
- label.innerHTML = i18n[fieldLabel];
- label.htmlFor = fieldName;
- fieldset.appendChild(label);
- // Input field
- var input = document.createElement("input");
- input.type = "text";
- input.id = fieldName;
- input.name = fieldName;
- if(inputClass) input.className = inputClass;
- input.title = i18n[fieldTitle];
- input.size = fieldSize;
- input.value = fieldValue;
- fieldset.appendChild(input);
- };
- function buildSelect(i18n, select,options,values,selected) {
- var option;
- for (var i = 0; i < options.length; ++i) {
- option = document.createElement("option");
- option.value = values[i];
- option.innerHTML = i18n[options[i]];
- option.selected = selected.test(option.value);
- select.appendChild(option);
- }
- };
- function addButtons(i18n,content,buttons,labels) {
- var space = document.createElement("div");
- space.className = "space";
- content.appendChild(space);
- var div = document.createElement("div");
- content.appendChild(div);
- div.className = "buttons";
- for (var i = 0; i < buttons.length; ++i) {
- var button = document.createElement("button");
- button.innerHTML = i18n[labels[i]];
- switch (buttons[i]) {
- case "ok":
- button.onclick = onOK;
- break;
- case "cancel":
- button.onclick = onCancel;
- break;
- }
- div.appendChild(button);
- }
- };
-</script>
-</head>
-<body class="popupwin" onload="Init();">
-<div id="content"></div>
-</body>
-</html>
+++ /dev/null
-<!--
-/***************************************************************
-* Copyright notice
-*
-* (c) 2002-2004, interactivetools.com, inc.
-* (c) 2003-2004 dynarch.com
-* (c) 2004, 2005, 2006 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
-* All rights reserved
-*
-* This script is part of the TYPO3 project. The TYPO3 project is
-* free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* The GNU General Public License can be found at
-* http://www.gnu.org/copyleft/gpl.html.
-* A copy is found in the textfile GPL.txt and important notices to the license
-* from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-* This script is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* This script is a modified version of a script published under the htmlArea License.
-* A copy of the htmlArea License may be found in the textfile HTMLAREA_LICENSE.txt.
-*
-* This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/*
- * Insert Link window for TYPO3 htmlArea RTE
- *
- * TYPO3 CVS ID: $Id$
- */
--->
-<html class="popupwin">
-<head>
- <title>Insert/Modify Link</title>
- <script type="text/javascript" src="popup.js"></script>
- <script type="text/javascript">
- HTMLArea = window.opener.HTMLArea;
- _editor_CSS = window.opener._editor_CSS;
- __dlg_loadStyle(_editor_CSS);
- var i18n = HTMLArea.I18N.dialogs;
-
- function onTargetChanged() {
- var f = document.getElementById("f_other_target");
- if (this.value == "_other") {
- f.style.visibility = "visible";
- f.select();
- f.focus();
- } else {
- f.style.visibility = "hidden";
- }
- };
-
- function Init() {
- __dlg_translate(i18n);
- __dlg_init();
- var param = window.dialogArguments;
- var target_select = document.getElementById("f_target");
- if (param) {
- document.getElementById("f_href").value = param["f_href"];
- document.getElementById("f_title").value = param["f_title"];
- comboSelectValue(target_select, param["f_target"]);
- if (target_select.value != param.f_target) {
- var opt = document.createElement("option");
- opt.value = param.f_target;
- opt.innerHTML = opt.value;
- target_select.appendChild(opt);
- opt.selected = true;
- }
- }
- var opt = document.createElement("option");
- opt.value = "_other";
- opt.innerHTML = i18n["target_other"];
- target_select.appendChild(opt);
- target_select.onchange = onTargetChanged;
- document.getElementById("f_href").focus();
- document.getElementById("f_href").select();
- };
-
- function onOK() {
- var required = { "f_href" : i18n["link_url_required"] };
- for (var i in required) {
- var el = document.getElementById(i);
- if (!el.value) {
- alert(required[i]);
- el.focus();
- return false;
- }
- }
- // pass data back to the calling window
- var fields = ["f_href", "f_title", "f_target" ];
- var param = new Object();
- for (var i in fields) {
- var id = fields[i];
- var el = document.getElementById(id);
- param[id] = el.value;
- }
- if (param.f_target == "_other") param.f_target = document.getElementById("f_other_target").value;
- __dlg_close(param);
- return false;
- };
-
- function onCancel() {
- __dlg_close(null);
- return false;
- };
-</script>
-</head>
-<body class="popupwin" onload="Init()">
-<div id="content">
-<div class="title">Insert/Modify Link</div>
-<form action="" method="get">
- <label for="f_href" class="field">URL:</label>
- <input type="text" id="f_href" size="65" title="link_href_tooltip" />
- <div class="space"></div>
- <label for="f_title" class="field">Title (tooltip):</label>
- <input type="text" id="f_title" size="65" title="link_title_tooltip" />
- <div class="space"></div>
- <label for="f_target" class="field">Target:</label>
- <select id="f_target" title="link_target_tooltip">
- <option value="">target_none</option>
- <option value="_blank">target_blank</option>
- <option value="_self">target_self</option>
- <option value="_top">target_top</option>
- </select>
- <input type="text" name="f_other_target" id="f_other_target" size="10" style="visibility: hidden" />
- <div class="buttons">
- <button type="button" name="ok" onclick="return onOK();">OK</button>
- <button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
- </div>
-</form>
-</div>
-</body>
-</html>
+++ /dev/null
-/***************************************************************
-* Copyright notice
-*
-* (c) 2002-2004, interactivetools.com, inc.
-* (c) 2003-2004 dynarch.com
-* (c) 2004, 2005, 2006 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
-* All rights reserved
-*
-* This script is part of the TYPO3 project. The TYPO3 project is
-* free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* The GNU General Public License can be found at
-* http://www.gnu.org/copyleft/gpl.html.
-* A copy is found in the textfile GPL.txt and important notices to the license
-* from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-* This script is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* This script is a modified version of a script published under the htmlArea License.
-* A copy of the htmlArea License may be found in the textfile HTMLAREA_LICENSE.txt.
-*
-* This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/*
- * Popup utilities for TYPO3 htmlArea RTE
- *
- * TYPO3 CVS ID: $Id$
- */
-
-getAbsolutePos = function(el) {
- var r = { x: el.offsetLeft, y: el.offsetTop };
- if (el.offsetParent) {
- var tmp = getAbsolutePos(el.offsetParent);
- r.x += tmp.x;
- r.y += tmp.y;
- }
- return r;
-};
-
-comboSelectValue = function(c, val) {
- var ops = c.getElementsByTagName("option");
- for (var i = ops.length; --i >= 0;) {
- var op = ops[i];
- op.selected = (op.value == val);
- }
- c.value = val;
-};
-
-__dlg_loadStyle = function(url) {
- var head = document.getElementsByTagName("head")[0];
- var link = document.createElement("link");
- link.rel = "stylesheet";
- link.href = url;
- head.appendChild(link);
-}
-
-__dlg_init = function(bottom,noResize) {
- window.dialogArguments = window.opener.Dialog._arguments;
- // resize if allowed
- var content = document.getElementById("content");
- if ((HTMLArea.is_gecko && !HTMLArea.is_opera && !HTMLArea.is_safari) || (HTMLArea.is_opera && content)) {
- setTimeout( function() {
- try {
- if (!noResize) window.sizeToContent();
- } catch(e) {
- __dlg_resizeWindow(content);
- }
- // center on parent if allowed
- var x = window.opener.screenX + (window.opener.outerWidth - window.outerWidth) / 2;
- var y = window.opener.screenY + (window.opener.outerHeight - window.outerHeight) / 2;
- try {
- window.moveTo(x, y);
- } catch(e) { }
- }, 25);
- } else {
- var innerX,innerY;
- if (self.innerHeight) {
- // all except Explorer
- innerX = self.innerWidth;
- innerY = self.innerHeight;
- } else if (document.documentElement && document.documentElement.clientHeight) {
- // Explorer 6 Strict Mode
- innerX = document.documentElement.clientWidth;
- innerY = document.documentElement.clientHeight;
- } else if (document.body) {
- // other Explorers
- innerX = document.body.clientWidth;
- innerY = document.body.clientHeight;
- }
-
- var pageX,pageY;
- var test1 = document.body.scrollHeight;
- var test2 = document.body.offsetHeight
- if (test1 > test2) {
- // all but Explorer Mac
- pageX = document.body.scrollWidth;
- pageY = document.body.scrollHeight;
- } else {
- // Explorer Mac;
- //would also work in Explorer 6 Strict, Mozilla and Safari
- pageX = document.body.offsetWidth;
- pageY = document.body.offsetHeight;
- }
- window.resizeBy(pageX - innerX, pageY - innerY);
-
- // center on parent if allowed
- var W = document.body.offsetWidth;
- var H = document.body.offsetHeight;
- var x = (screen.availWidth - W) / 2;
- var y = (screen.availHeight - H) / 2;
- window.moveTo(x, y);
- }
- // capture escape events
- HTMLArea._addEvent(document, "keypress", __dlg_close_on_esc);
-};
-
- // Resize to content for Opera, based on size of content div
-__dlg_resizeWindow = function(content) {
- var win = window;
- var doc = win.document;
- var docElement = doc.documentElement;
- var body = doc.body;
- var myW = 0, myH = 0;
-
- var contentWidth = content.offsetWidth;
- var contentHeight = content.offsetHeight;
- win.resizeTo( contentWidth + 200, contentHeight + 200 );
- if (win.innerWidth) { myW = win.innerWidth; myH = win.innerHeight; }
- else if (docElement && docElement.clientWidth) { myW = docElement.clientWidth; myH = docElement.clientHeight; }
- else if (body && body.clientWidth) { myW = body.clientWidth; myH = body.clientHeight; }
- win.resizeTo( contentWidth + ( ( contentWidth + 200 ) - myW ), contentHeight + ( (contentHeight + 200 ) - (myH - 16) ) );
-};
-
-__dlg_translate = function(i18n) {
- var types = ["input", "label", "option", "select", "legend", "span", "td", "button", "div", "h1", "h2", "a"];
- for(var type = 0; type < types.length; ++type) {
- var spans = document.getElementsByTagName(types[type]);
- for(var i = spans.length; --i >= 0;) {
- var span = spans[i];
- if(span.firstChild && span.firstChild.data) {
- var txt = i18n[span.firstChild.data];
- if (txt) span.firstChild.data = txt;
- }
- if(span.title) {
- var txt = i18n[span.title];
- if (txt) span.title = txt;
- }
- // resetting the selected option for Mozilla
- if(types[type] == "option" && span.selected ) {
- span.selected = false;
- span.selected = true;
- }
- }
- }
- var txt = i18n[document.title];
- if(txt) document.title = txt;
-};
-
-// closes the dialog and passes the return info upper.
-__dlg_close = function(val) {
- if(window.opener && window.opener.Dialog) window.opener.Dialog._return(val);
- window.close();
-};
-
-__dlg_close_on_esc = function(ev) {
- if(!ev) var ev = window.event;
- if (ev.keyCode == 27) {
- if(window.opener && window.opener.Dialog) window.opener.Dialog._return(null);
- window.close();
- return false;
- }
- return true;
-};
+++ /dev/null
-<!--
-/***************************************************************
-* Copyright notice
-*
-* (c) 2002-2004, interactivetools.com, inc.
-* (c) 2003-2004 dynarch.com
-* (c) 2004, 2005, 2006 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
-* All rights reserved
-*
-* This script is part of the TYPO3 project. The TYPO3 project is
-* free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* The GNU General Public License can be found at
-* http://www.gnu.org/copyleft/gpl.html.
-* A copy is found in the textfile GPL.txt and important notices to the license
-* from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-* This script is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* This script is a modified version of a script published under the htmlArea License.
-* A copy of the htmlArea License may be found in the textfile HTMLAREA_LICENSE.txt.
-*
-* This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/*
- * Select Color window for TYPO3 htmlArea RTE
- *
- * TYPO3 CVS ID: $Id$
- */
--->
-<html class="popupwin">
-<head>
- <title>Select Color</title>
- <script type="text/javascript" src="popup.js"></script>
- <script type="text/javascript">
- HTMLArea = window.opener.HTMLArea;
- _editor_CSS = window.opener._editor_CSS;
- __dlg_loadStyle(_editor_CSS);
-
-function Init() {
- __dlg_translate(window.opener.HTMLArea.I18N.dialogs);
- __dlg_init();
-
- var color = window.dialogArguments;
- color = ValidateColor(color) || '000000';
- View(color); // set default color
-}
-
-function View(color) { // preview color
- document.getElementById("ColorPreview").style.backgroundColor = '#' + color;
- document.getElementById("ColorHex").value = '#' + color;
-}
-
-function Set(string) { // select color
- var color = ValidateColor(string);
- if (color == null) { alert("Invalid color code: " + string); } // invalid color
- else { // valid color
- View(color); // show selected color
- __dlg_close(color);
- }
-}
-
-function ValidateColor(string) { // return valid color code
- string = string || '';
- string = string + "";
- string = string.toUpperCase();
- var chars = '0123456789ABCDEF';
- var out = '';
-
- for (var i=0; i<string.length; i++) { // remove invalid color chars
- var schar = string.charAt(i);
- if (chars.indexOf(schar) != -1) { out += schar; }
- }
-
- if (out.length != 6) { return null; } // check length
- return out;
-}
-
-</script>
-<style type="text/css">
-.color { width: 10px; height: 10px; cursor: pointer; }
-</style>
-</head>
-<body style="background:ButtonFace; margin:0; padding:0;" onload="Init();">
-<div id="content">
-<form method="get" style="margin:0px; padding:0px;" onSubmit="Set(document.getElementById('ColorHex').value); return false;">
-<table cellspacing="0" cellpadding="4" style="border-style: none; width: 100%;">
- <tr>
- <td style="background:buttonface;" valign=center><div style="background-color: #000000; padding: 1; height: 21px; width: 50px;"><div id="ColorPreview" style="height: 100%; width: 100%;"></div></div></td>
- <td style="background:buttonface;" valign=center><input type="text" name="ColorHex" id="ColorHex" value="" size=15 style="font-size: 12px;" /></td>
- <td style="background:buttonface; width: 100%;"></td>
- </tr>
-</table>
-</form>
-
-<table cellspacing="1" cellpadding="0" style="border-style: none; width:100%; background-color: #000000; margin-bottom: 5px;">
-<tr>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#003300" onMouseOver="View('003300');" onClick="Set('003300');"></td>
-<td class="color" bgcolor="#006600" onMouseOver="View('006600');" onClick="Set('006600');"></td>
-<td class="color" bgcolor="#009900" onMouseOver="View('009900');" onClick="Set('009900');"></td>
-<td class="color" bgcolor="#00CC00" onMouseOver="View('00CC00');" onClick="Set('00CC00');"></td>
-<td class="color" bgcolor="#00FF00" onMouseOver="View('00FF00');" onClick="Set('00FF00');"></td>
-<td class="color" bgcolor="#330000" onMouseOver="View('330000');" onClick="Set('330000');"></td>
-<td class="color" bgcolor="#333300" onMouseOver="View('333300');" onClick="Set('333300');"></td>
-<td class="color" bgcolor="#336600" onMouseOver="View('336600');" onClick="Set('336600');"></td>
-<td class="color" bgcolor="#339900" onMouseOver="View('339900');" onClick="Set('339900');"></td>
-<td class="color" bgcolor="#33CC00" onMouseOver="View('33CC00');" onClick="Set('33CC00');"></td>
-<td class="color" bgcolor="#33FF00" onMouseOver="View('33FF00');" onClick="Set('33FF00');"></td>
-<td class="color" bgcolor="#660000" onMouseOver="View('660000');" onClick="Set('660000');"></td>
-<td class="color" bgcolor="#663300" onMouseOver="View('663300');" onClick="Set('663300');"></td>
-<td class="color" bgcolor="#666600" onMouseOver="View('666600');" onClick="Set('666600');"></td>
-<td class="color" bgcolor="#669900" onMouseOver="View('669900');" onClick="Set('669900');"></td>
-<td class="color" bgcolor="#66CC00" onMouseOver="View('66CC00');" onClick="Set('66CC00');"></td>
-<td class="color" bgcolor="#66FF00" onMouseOver="View('66FF00');" onClick="Set('66FF00');"></td>
-</tr>
-<tr>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#333333" onMouseOver="View('333333');" onClick="Set('333333');"></td>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#000033" onMouseOver="View('000033');" onClick="Set('000033');"></td>
-<td class="color" bgcolor="#003333" onMouseOver="View('003333');" onClick="Set('003333');"></td>
-<td class="color" bgcolor="#006633" onMouseOver="View('006633');" onClick="Set('006633');"></td>
-<td class="color" bgcolor="#009933" onMouseOver="View('009933');" onClick="Set('009933');"></td>
-<td class="color" bgcolor="#00CC33" onMouseOver="View('00CC33');" onClick="Set('00CC33');"></td>
-<td class="color" bgcolor="#00FF33" onMouseOver="View('00FF33');" onClick="Set('00FF33');"></td>
-<td class="color" bgcolor="#330033" onMouseOver="View('330033');" onClick="Set('330033');"></td>
-<td class="color" bgcolor="#333333" onMouseOver="View('333333');" onClick="Set('333333');"></td>
-<td class="color" bgcolor="#336633" onMouseOver="View('336633');" onClick="Set('336633');"></td>
-<td class="color" bgcolor="#339933" onMouseOver="View('339933');" onClick="Set('339933');"></td>
-<td class="color" bgcolor="#33CC33" onMouseOver="View('33CC33');" onClick="Set('33CC33');"></td>
-<td class="color" bgcolor="#33FF33" onMouseOver="View('33FF33');" onClick="Set('33FF33');"></td>
-<td class="color" bgcolor="#660033" onMouseOver="View('660033');" onClick="Set('660033');"></td>
-<td class="color" bgcolor="#663333" onMouseOver="View('663333');" onClick="Set('663333');"></td>
-<td class="color" bgcolor="#666633" onMouseOver="View('666633');" onClick="Set('666633');"></td>
-<td class="color" bgcolor="#669933" onMouseOver="View('669933');" onClick="Set('669933');"></td>
-<td class="color" bgcolor="#66CC33" onMouseOver="View('66CC33');" onClick="Set('66CC33');"></td>
-<td class="color" bgcolor="#66FF33" onMouseOver="View('66FF33');" onClick="Set('66FF33');"></td>
-</tr>
-<tr>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#666666" onMouseOver="View('666666');" onClick="Set('666666');"></td>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#000066" onMouseOver="View('000066');" onClick="Set('000066');"></td>
-<td class="color" bgcolor="#003366" onMouseOver="View('003366');" onClick="Set('003366');"></td>
-<td class="color" bgcolor="#006666" onMouseOver="View('006666');" onClick="Set('006666');"></td>
-<td class="color" bgcolor="#009966" onMouseOver="View('009966');" onClick="Set('009966');"></td>
-<td class="color" bgcolor="#00CC66" onMouseOver="View('00CC66');" onClick="Set('00CC66');"></td>
-<td class="color" bgcolor="#00FF66" onMouseOver="View('00FF66');" onClick="Set('00FF66');"></td>
-<td class="color" bgcolor="#330066" onMouseOver="View('330066');" onClick="Set('330066');"></td>
-<td class="color" bgcolor="#333366" onMouseOver="View('333366');" onClick="Set('333366');"></td>
-<td class="color" bgcolor="#336666" onMouseOver="View('336666');" onClick="Set('336666');"></td>
-<td class="color" bgcolor="#339966" onMouseOver="View('339966');" onClick="Set('339966');"></td>
-<td class="color" bgcolor="#33CC66" onMouseOver="View('33CC66');" onClick="Set('33CC66');"></td>
-<td class="color" bgcolor="#33FF66" onMouseOver="View('33FF66');" onClick="Set('33FF66');"></td>
-<td class="color" bgcolor="#660066" onMouseOver="View('660066');" onClick="Set('660066');"></td>
-<td class="color" bgcolor="#663366" onMouseOver="View('663366');" onClick="Set('663366');"></td>
-<td class="color" bgcolor="#666666" onMouseOver="View('666666');" onClick="Set('666666');"></td>
-<td class="color" bgcolor="#669966" onMouseOver="View('669966');" onClick="Set('669966');"></td>
-<td class="color" bgcolor="#66CC66" onMouseOver="View('66CC66');" onClick="Set('66CC66');"></td>
-<td class="color" bgcolor="#66FF66" onMouseOver="View('66FF66');" onClick="Set('66FF66');"></td>
-</tr>
-<tr>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#999999" onMouseOver="View('999999');" onClick="Set('999999');"></td>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#000099" onMouseOver="View('000099');" onClick="Set('000099');"></td>
-<td class="color" bgcolor="#003399" onMouseOver="View('003399');" onClick="Set('003399');"></td>
-<td class="color" bgcolor="#006699" onMouseOver="View('006699');" onClick="Set('006699');"></td>
-<td class="color" bgcolor="#009999" onMouseOver="View('009999');" onClick="Set('009999');"></td>
-<td class="color" bgcolor="#00CC99" onMouseOver="View('00CC99');" onClick="Set('00CC99');"></td>
-<td class="color" bgcolor="#00FF99" onMouseOver="View('00FF99');" onClick="Set('00FF99');"></td>
-<td class="color" bgcolor="#330099" onMouseOver="View('330099');" onClick="Set('330099');"></td>
-<td class="color" bgcolor="#333399" onMouseOver="View('333399');" onClick="Set('333399');"></td>
-<td class="color" bgcolor="#336699" onMouseOver="View('336699');" onClick="Set('336699');"></td>
-<td class="color" bgcolor="#339999" onMouseOver="View('339999');" onClick="Set('339999');"></td>
-<td class="color" bgcolor="#33CC99" onMouseOver="View('33CC99');" onClick="Set('33CC99');"></td>
-<td class="color" bgcolor="#33FF99" onMouseOver="View('33FF99');" onClick="Set('33FF99');"></td>
-<td class="color" bgcolor="#660099" onMouseOver="View('660099');" onClick="Set('660099');"></td>
-<td class="color" bgcolor="#663399" onMouseOver="View('663399');" onClick="Set('663399');"></td>
-<td class="color" bgcolor="#666699" onMouseOver="View('666699');" onClick="Set('666699');"></td>
-<td class="color" bgcolor="#669999" onMouseOver="View('669999');" onClick="Set('669999');"></td>
-<td class="color" bgcolor="#66CC99" onMouseOver="View('66CC99');" onClick="Set('66CC99');"></td>
-<td class="color" bgcolor="#66FF99" onMouseOver="View('66FF99');" onClick="Set('66FF99');"></td>
-</tr>
-<tr>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#CCCCCC" onMouseOver="View('CCCCCC');" onClick="Set('CCCCCC');"></td>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#0000CC" onMouseOver="View('0000CC');" onClick="Set('0000CC');"></td>
-<td class="color" bgcolor="#0033CC" onMouseOver="View('0033CC');" onClick="Set('0033CC');"></td>
-<td class="color" bgcolor="#0066CC" onMouseOver="View('0066CC');" onClick="Set('0066CC');"></td>
-<td class="color" bgcolor="#0099CC" onMouseOver="View('0099CC');" onClick="Set('0099CC');"></td>
-<td class="color" bgcolor="#00CCCC" onMouseOver="View('00CCCC');" onClick="Set('00CCCC');"></td>
-<td class="color" bgcolor="#00FFCC" onMouseOver="View('00FFCC');" onClick="Set('00FFCC');"></td>
-<td class="color" bgcolor="#3300CC" onMouseOver="View('3300CC');" onClick="Set('3300CC');"></td>
-<td class="color" bgcolor="#3333CC" onMouseOver="View('3333CC');" onClick="Set('3333CC');"></td>
-<td class="color" bgcolor="#3366CC" onMouseOver="View('3366CC');" onClick="Set('3366CC');"></td>
-<td class="color" bgcolor="#3399CC" onMouseOver="View('3399CC');" onClick="Set('3399CC');"></td>
-<td class="color" bgcolor="#33CCCC" onMouseOver="View('33CCCC');" onClick="Set('33CCCC');"></td>
-<td class="color" bgcolor="#33FFCC" onMouseOver="View('33FFCC');" onClick="Set('33FFCC');"></td>
-<td class="color" bgcolor="#6600CC" onMouseOver="View('6600CC');" onClick="Set('6600CC');"></td>
-<td class="color" bgcolor="#6633CC" onMouseOver="View('6633CC');" onClick="Set('6633CC');"></td>
-<td class="color" bgcolor="#6666CC" onMouseOver="View('6666CC');" onClick="Set('6666CC');"></td>
-<td class="color" bgcolor="#6699CC" onMouseOver="View('6699CC');" onClick="Set('6699CC');"></td>
-<td class="color" bgcolor="#66CCCC" onMouseOver="View('66CCCC');" onClick="Set('66CCCC');"></td>
-<td class="color" bgcolor="#66FFCC" onMouseOver="View('66FFCC');" onClick="Set('66FFCC');"></td>
-</tr>
-<tr>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#FFFFFF" onMouseOver="View('FFFFFF');" onClick="Set('FFFFFF');"></td>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#0000FF" onMouseOver="View('0000FF');" onClick="Set('0000FF');"></td>
-<td class="color" bgcolor="#0033FF" onMouseOver="View('0033FF');" onClick="Set('0033FF');"></td>
-<td class="color" bgcolor="#0066FF" onMouseOver="View('0066FF');" onClick="Set('0066FF');"></td>
-<td class="color" bgcolor="#0099FF" onMouseOver="View('0099FF');" onClick="Set('0099FF');"></td>
-<td class="color" bgcolor="#00CCFF" onMouseOver="View('00CCFF');" onClick="Set('00CCFF');"></td>
-<td class="color" bgcolor="#00FFFF" onMouseOver="View('00FFFF');" onClick="Set('00FFFF');"></td>
-<td class="color" bgcolor="#3300FF" onMouseOver="View('3300FF');" onClick="Set('3300FF');"></td>
-<td class="color" bgcolor="#3333FF" onMouseOver="View('3333FF');" onClick="Set('3333FF');"></td>
-<td class="color" bgcolor="#3366FF" onMouseOver="View('3366FF');" onClick="Set('3366FF');"></td>
-<td class="color" bgcolor="#3399FF" onMouseOver="View('3399FF');" onClick="Set('3399FF');"></td>
-<td class="color" bgcolor="#33CCFF" onMouseOver="View('33CCFF');" onClick="Set('33CCFF');"></td>
-<td class="color" bgcolor="#33FFFF" onMouseOver="View('33FFFF');" onClick="Set('33FFFF');"></td>
-<td class="color" bgcolor="#6600FF" onMouseOver="View('6600FF');" onClick="Set('6600FF');"></td>
-<td class="color" bgcolor="#6633FF" onMouseOver="View('6633FF');" onClick="Set('6633FF');"></td>
-<td class="color" bgcolor="#6666FF" onMouseOver="View('6666FF');" onClick="Set('6666FF');"></td>
-<td class="color" bgcolor="#6699FF" onMouseOver="View('6699FF');" onClick="Set('6699FF');"></td>
-<td class="color" bgcolor="#66CCFF" onMouseOver="View('66CCFF');" onClick="Set('66CCFF');"></td>
-<td class="color" bgcolor="#66FFFF" onMouseOver="View('66FFFF');" onClick="Set('66FFFF');"></td>
-</tr>
-<tr>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#FF0000" onMouseOver="View('FF0000');" onClick="Set('FF0000');"></td>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#990000" onMouseOver="View('990000');" onClick="Set('990000');"></td>
-<td class="color" bgcolor="#993300" onMouseOver="View('993300');" onClick="Set('993300');"></td>
-<td class="color" bgcolor="#996600" onMouseOver="View('996600');" onClick="Set('996600');"></td>
-<td class="color" bgcolor="#999900" onMouseOver="View('999900');" onClick="Set('999900');"></td>
-<td class="color" bgcolor="#99CC00" onMouseOver="View('99CC00');" onClick="Set('99CC00');"></td>
-<td class="color" bgcolor="#99FF00" onMouseOver="View('99FF00');" onClick="Set('99FF00');"></td>
-<td class="color" bgcolor="#CC0000" onMouseOver="View('CC0000');" onClick="Set('CC0000');"></td>
-<td class="color" bgcolor="#CC3300" onMouseOver="View('CC3300');" onClick="Set('CC3300');"></td>
-<td class="color" bgcolor="#CC6600" onMouseOver="View('CC6600');" onClick="Set('CC6600');"></td>
-<td class="color" bgcolor="#CC9900" onMouseOver="View('CC9900');" onClick="Set('CC9900');"></td>
-<td class="color" bgcolor="#CCCC00" onMouseOver="View('CCCC00');" onClick="Set('CCCC00');"></td>
-<td class="color" bgcolor="#CCFF00" onMouseOver="View('CCFF00');" onClick="Set('CCFF00');"></td>
-<td class="color" bgcolor="#FF0000" onMouseOver="View('FF0000');" onClick="Set('FF0000');"></td>
-<td class="color" bgcolor="#FF3300" onMouseOver="View('FF3300');" onClick="Set('FF3300');"></td>
-<td class="color" bgcolor="#FF6600" onMouseOver="View('FF6600');" onClick="Set('FF6600');"></td>
-<td class="color" bgcolor="#FF9900" onMouseOver="View('FF9900');" onClick="Set('FF9900');"></td>
-<td class="color" bgcolor="#FFCC00" onMouseOver="View('FFCC00');" onClick="Set('FFCC00');"></td>
-<td class="color" bgcolor="#FFFF00" onMouseOver="View('FFFF00');" onClick="Set('FFFF00');"></td>
-</tr>
-<tr>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#00FF00" onMouseOver="View('00FF00');" onClick="Set('00FF00');"></td>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#990033" onMouseOver="View('990033');" onClick="Set('990033');"></td>
-<td class="color" bgcolor="#993333" onMouseOver="View('993333');" onClick="Set('993333');"></td>
-<td class="color" bgcolor="#996633" onMouseOver="View('996633');" onClick="Set('996633');"></td>
-<td class="color" bgcolor="#999933" onMouseOver="View('999933');" onClick="Set('999933');"></td>
-<td class="color" bgcolor="#99CC33" onMouseOver="View('99CC33');" onClick="Set('99CC33');"></td>
-<td class="color" bgcolor="#99FF33" onMouseOver="View('99FF33');" onClick="Set('99FF33');"></td>
-<td class="color" bgcolor="#CC0033" onMouseOver="View('CC0033');" onClick="Set('CC0033');"></td>
-<td class="color" bgcolor="#CC3333" onMouseOver="View('CC3333');" onClick="Set('CC3333');"></td>
-<td class="color" bgcolor="#CC6633" onMouseOver="View('CC6633');" onClick="Set('CC6633');"></td>
-<td class="color" bgcolor="#CC9933" onMouseOver="View('CC9933');" onClick="Set('CC9933');"></td>
-<td class="color" bgcolor="#CCCC33" onMouseOver="View('CCCC33');" onClick="Set('CCCC33');"></td>
-<td class="color" bgcolor="#CCFF33" onMouseOver="View('CCFF33');" onClick="Set('CCFF33');"></td>
-<td class="color" bgcolor="#FF0033" onMouseOver="View('FF0033');" onClick="Set('FF0033');"></td>
-<td class="color" bgcolor="#FF3333" onMouseOver="View('FF3333');" onClick="Set('FF3333');"></td>
-<td class="color" bgcolor="#FF6633" onMouseOver="View('FF6633');" onClick="Set('FF6633');"></td>
-<td class="color" bgcolor="#FF9933" onMouseOver="View('FF9933');" onClick="Set('FF9933');"></td>
-<td class="color" bgcolor="#FFCC33" onMouseOver="View('FFCC33');" onClick="Set('FFCC33');"></td>
-<td class="color" bgcolor="#FFFF33" onMouseOver="View('FFFF33');" onClick="Set('FFFF33');"></td>
-</tr>
-<tr>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#0000FF" onMouseOver="View('0000FF');" onClick="Set('0000FF');"></td>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#990066" onMouseOver="View('990066');" onClick="Set('990066');"></td>
-<td class="color" bgcolor="#993366" onMouseOver="View('993366');" onClick="Set('993366');"></td>
-<td class="color" bgcolor="#996666" onMouseOver="View('996666');" onClick="Set('996666');"></td>
-<td class="color" bgcolor="#999966" onMouseOver="View('999966');" onClick="Set('999966');"></td>
-<td class="color" bgcolor="#99CC66" onMouseOver="View('99CC66');" onClick="Set('99CC66');"></td>
-<td class="color" bgcolor="#99FF66" onMouseOver="View('99FF66');" onClick="Set('99FF66');"></td>
-<td class="color" bgcolor="#CC0066" onMouseOver="View('CC0066');" onClick="Set('CC0066');"></td>
-<td class="color" bgcolor="#CC3366" onMouseOver="View('CC3366');" onClick="Set('CC3366');"></td>
-<td class="color" bgcolor="#CC6666" onMouseOver="View('CC6666');" onClick="Set('CC6666');"></td>
-<td class="color" bgcolor="#CC9966" onMouseOver="View('CC9966');" onClick="Set('CC9966');"></td>
-<td class="color" bgcolor="#CCCC66" onMouseOver="View('CCCC66');" onClick="Set('CCCC66');"></td>
-<td class="color" bgcolor="#CCFF66" onMouseOver="View('CCFF66');" onClick="Set('CCFF66');"></td>
-<td class="color" bgcolor="#FF0066" onMouseOver="View('FF0066');" onClick="Set('FF0066');"></td>
-<td class="color" bgcolor="#FF3366" onMouseOver="View('FF3366');" onClick="Set('FF3366');"></td>
-<td class="color" bgcolor="#FF6666" onMouseOver="View('FF6666');" onClick="Set('FF6666');"></td>
-<td class="color" bgcolor="#FF9966" onMouseOver="View('FF9966');" onClick="Set('FF9966');"></td>
-<td class="color" bgcolor="#FFCC66" onMouseOver="View('FFCC66');" onClick="Set('FFCC66');"></td>
-<td class="color" bgcolor="#FFFF66" onMouseOver="View('FFFF66');" onClick="Set('FFFF66');"></td>
-</tr>
-<tr>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#FFFF00" onMouseOver="View('FFFF00');" onClick="Set('FFFF00');"></td>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#990099" onMouseOver="View('990099');" onClick="Set('990099');"></td>
-<td class="color" bgcolor="#993399" onMouseOver="View('993399');" onClick="Set('993399');"></td>
-<td class="color" bgcolor="#996699" onMouseOver="View('996699');" onClick="Set('996699');"></td>
-<td class="color" bgcolor="#999999" onMouseOver="View('999999');" onClick="Set('999999');"></td>
-<td class="color" bgcolor="#99CC99" onMouseOver="View('99CC99');" onClick="Set('99CC99');"></td>
-<td class="color" bgcolor="#99FF99" onMouseOver="View('99FF99');" onClick="Set('99FF99');"></td>
-<td class="color" bgcolor="#CC0099" onMouseOver="View('CC0099');" onClick="Set('CC0099');"></td>
-<td class="color" bgcolor="#CC3399" onMouseOver="View('CC3399');" onClick="Set('CC3399');"></td>
-<td class="color" bgcolor="#CC6699" onMouseOver="View('CC6699');" onClick="Set('CC6699');"></td>
-<td class="color" bgcolor="#CC9999" onMouseOver="View('CC9999');" onClick="Set('CC9999');"></td>
-<td class="color" bgcolor="#CCCC99" onMouseOver="View('CCCC99');" onClick="Set('CCCC99');"></td>
-<td class="color" bgcolor="#CCFF99" onMouseOver="View('CCFF99');" onClick="Set('CCFF99');"></td>
-<td class="color" bgcolor="#FF0099" onMouseOver="View('FF0099');" onClick="Set('FF0099');"></td>
-<td class="color" bgcolor="#FF3399" onMouseOver="View('FF3399');" onClick="Set('FF3399');"></td>
-<td class="color" bgcolor="#FF6699" onMouseOver="View('FF6699');" onClick="Set('FF6699');"></td>
-<td class="color" bgcolor="#FF9999" onMouseOver="View('FF9999');" onClick="Set('FF9999');"></td>
-<td class="color" bgcolor="#FFCC99" onMouseOver="View('FFCC99');" onClick="Set('FFCC99');"></td>
-<td class="color" bgcolor="#FFFF99" onMouseOver="View('FFFF99');" onClick="Set('FFFF99');"></td>
-</tr>
-<tr>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#00FFFF" onMouseOver="View('00FFFF');" onClick="Set('00FFFF');"></td>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#9900CC" onMouseOver="View('9900CC');" onClick="Set('9900CC');"></td>
-<td class="color" bgcolor="#9933CC" onMouseOver="View('9933CC');" onClick="Set('9933CC');"></td>
-<td class="color" bgcolor="#9966CC" onMouseOver="View('9966CC');" onClick="Set('9966CC');"></td>
-<td class="color" bgcolor="#9999CC" onMouseOver="View('9999CC');" onClick="Set('9999CC');"></td>
-<td class="color" bgcolor="#99CCCC" onMouseOver="View('99CCCC');" onClick="Set('99CCCC');"></td>
-<td class="color" bgcolor="#99FFCC" onMouseOver="View('99FFCC');" onClick="Set('99FFCC');"></td>
-<td class="color" bgcolor="#CC00CC" onMouseOver="View('CC00CC');" onClick="Set('CC00CC');"></td>
-<td class="color" bgcolor="#CC33CC" onMouseOver="View('CC33CC');" onClick="Set('CC33CC');"></td>
-<td class="color" bgcolor="#CC66CC" onMouseOver="View('CC66CC');" onClick="Set('CC66CC');"></td>
-<td class="color" bgcolor="#CC99CC" onMouseOver="View('CC99CC');" onClick="Set('CC99CC');"></td>
-<td class="color" bgcolor="#CCCCCC" onMouseOver="View('CCCCCC');" onClick="Set('CCCCCC');"></td>
-<td class="color" bgcolor="#CCFFCC" onMouseOver="View('CCFFCC');" onClick="Set('CCFFCC');"></td>
-<td class="color" bgcolor="#FF00CC" onMouseOver="View('FF00CC');" onClick="Set('FF00CC');"></td>
-<td class="color" bgcolor="#FF33CC" onMouseOver="View('FF33CC');" onClick="Set('FF33CC');"></td>
-<td class="color" bgcolor="#FF66CC" onMouseOver="View('FF66CC');" onClick="Set('FF66CC');"></td>
-<td class="color" bgcolor="#FF99CC" onMouseOver="View('FF99CC');" onClick="Set('FF99CC');"></td>
-<td class="color" bgcolor="#FFCCCC" onMouseOver="View('FFCCCC');" onClick="Set('FFCCCC');"></td>
-<td class="color" bgcolor="#FFFFCC" onMouseOver="View('FFFFCC');" onClick="Set('FFFFCC');"></td>
-</tr>
-<tr>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#FF00FF" onMouseOver="View('FF00FF');" onClick="Set('FF00FF');"></td>
-<td class="color" bgcolor="#000000" onMouseOver="View('000000');" onClick="Set('000000');"></td>
-<td class="color" bgcolor="#9900FF" onMouseOver="View('9900FF');" onClick="Set('9900FF');"></td>
-<td class="color" bgcolor="#9933FF" onMouseOver="View('9933FF');" onClick="Set('9933FF');"></td>
-<td class="color" bgcolor="#9966FF" onMouseOver="View('9966FF');" onClick="Set('9966FF');"></td>
-<td class="color" bgcolor="#9999FF" onMouseOver="View('9999FF');" onClick="Set('9999FF');"></td>
-<td class="color" bgcolor="#99CCFF" onMouseOver="View('99CCFF');" onClick="Set('99CCFF');"></td>
-<td class="color" bgcolor="#99FFFF" onMouseOver="View('99FFFF');" onClick="Set('99FFFF');"></td>
-<td class="color" bgcolor="#CC00FF" onMouseOver="View('CC00FF');" onClick="Set('CC00FF');"></td>
-<td class="color" bgcolor="#CC33FF" onMouseOver="View('CC33FF');" onClick="Set('CC33FF');"></td>
-<td class="color" bgcolor="#CC66FF" onMouseOver="View('CC66FF');" onClick="Set('CC66FF');"></td>
-<td class="color" bgcolor="#CC99FF" onMouseOver="View('CC99FF');" onClick="Set('CC99FF');"></td>
-<td class="color" bgcolor="#CCCCFF" onMouseOver="View('CCCCFF');" onClick="Set('CCCCFF');"></td>
-<td class="color" bgcolor="#CCFFFF" onMouseOver="View('CCFFFF');" onClick="Set('CCFFFF');"></td>
-<td class="color" bgcolor="#FF00FF" onMouseOver="View('FF00FF');" onClick="Set('FF00FF');"></td>
-<td class="color" bgcolor="#FF33FF" onMouseOver="View('FF33FF');" onClick="Set('FF33FF');"></td>
-<td class="color" bgcolor="#FF66FF" onMouseOver="View('FF66FF');" onClick="Set('FF66FF');"></td>
-<td class="color" bgcolor="#FF99FF" onMouseOver="View('FF99FF');" onClick="Set('FF99FF');"></td>
-<td class="color" bgcolor="#FFCCFF" onMouseOver="View('FFCCFF');" onClick="Set('FFCCFF');"></td>
-<td class="color" bgcolor="#FFFFFF" onMouseOver="View('FFFFFF');" onClick="Set('FFFFFF');"></td>
-</tr>
-</table>
-</div>
-</body>
-</html>
-
+++ /dev/null
-/***************************************************************
-* Copyright notice
-*
-* (c) 2002-2004, interactivetools.com, inc.
-* (c) 2003-2004 dynarch.com
-* (c) 2004, 2005, 2006 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
-* All rights reserved
-*
-* This script is part of the TYPO3 project. The TYPO3 project is
-* free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* The GNU General Public License can be found at
-* http://www.gnu.org/copyleft/gpl.html.
-* A copy is found in the textfile GPL.txt and important notices to the license
-* from the author is found in LICENSE.txt distributed with these scripts.
-*
-*
-* This script is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* This script is a modified version of a script published under the htmlArea License.
-* A copy of the htmlArea License may be found in the textfile HTMLAREA_LICENSE.txt.
-*
-* This copyright notice MUST APPEAR in all copies of the script!
-***************************************************************/
-/*
- * TYPO3 CVS ID: $Id$
- */
-
-PopupWin = function(editor, _title, handler, initFunction, width, height, _opener) {
- this.editor = editor;
- this.handler = handler;
- if (typeof(initFunction) == "undefined") var initFunction = window; // pass this window object by default
- this._geckoOpenModal(editor, _title, handler, initFunction, width, height, _opener);
-};
-
- // Bring focus from the parent window to the popup
-PopupWin.prototype._parentEvent = function(ev) {
- if (this.dialogWindow && !this.dialogWindow.closed) {
- if(!ev) var ev = this.dialogWindow.opener.event;
- HTMLArea._stopEvent(ev);
- this.dialogWindow.focus();
- }
- return false;
-};
-
- // Open the popup
-PopupWin.prototype._geckoOpenModal = function(editor, _title, handler, initFunction, width, height, _opener) {
- if(!editor) var editor = this.editor;
- var dlg = editor._iframe.contentWindow.open("", "_blank", "toolbar=no,location=no,directories=no,menubar=no,resizable=yes,personalbar=no,top=100,left=100,dependent=yes,dialog=yes,chrome=no,width=" + (width?width:100) + ",height=" + (height?height:100) + ",scrollbars=no");
- if(!dlg) var dlg = window.open("", "", "toolbar=no,location=no,directories=no,menubar=no,resizable=yes,personalbar=no,top=100,left=100,dependent=yes,dialog=yes,chrome=no,width=" + (width?width:100) + ",height=" + (height?height:100) + ",scrollbars=no");
- this.dialogWindow = dlg;
- if (typeof(_opener) != "undefined") this._opener = _opener;
- else this._opener = this.dialogWindow.opener;
- var doc = this.dialogWindow.document;
- this.doc = doc;
-
- if (HTMLArea.is_ie) {
- doc.open();
- var html = "<html><head></head><body></body></html>\n";
- doc.write(html);
- doc.close();
- }
- var html = doc.documentElement;
- html.className = "popupwin";
- var head = doc.getElementsByTagName("head")[0];
- if(!doc.all) var head = doc.createElement("head");
- var title = doc.createElement("title");
- head.appendChild(title);
- doc.title = _title;
- var link = doc.createElement("link");
- link.rel = "stylesheet";
- link.type ="text/css";
- if( _editor_CSS.indexOf("http") == -1 ) link.href = _typo3_host_url + _editor_CSS;
- else link.href = _editor_CSS;
- head.appendChild(link);
- if(!doc.all) html.appendChild(head);
- var body = doc.body;
- if(!doc.all) var body = doc.createElement("body");
- body.className = "popupwin dialog";
- body.id = "--HA-body";
- var content = doc.createElement("div");
- content.className = "content";
- this.content = content;
- body.appendChild(content);
- if(!doc.all) html.appendChild(body);
- this.element = body;
-
- initFunction(this);
- this.captureEvents();
- this.dialogWindow.focus();
-};
-
- // Close the popup when escape is hit
-PopupWin.prototype._dlg_close_on_esc = function(ev) {
- if (!ev) var ev = window.event;
- if (ev.keyCode == 27) {
- this.close();
- return false;
- }
- return true;
-};
-
- // Call the form input handler
-PopupWin.prototype.callHandler = function() {
- var tags = ["input", "textarea", "select"];
- var params = new Object();
- for (var ti = tags.length; --ti >= 0;) {
- var tag = tags[ti];
- var els = this.content.getElementsByTagName(tag);
- for (var j = 0; j < els.length; ++j) {
- var el = els[j];
- var val = el.value;
- if (el.tagName.toLowerCase() == "input") {
- if (el.type == "checkbox") {
- val = el.checked;
- }
- }
- params[el.name] = val;
- }
- }
- this.handler(this, params);
- return false;
-};
-
- // Capture some events
-PopupWin.prototype.captureEvents = function() {
- // capture some events on the opener window
- var editor = this.editor;
- var _opener = this._opener;
- var self = this;
-
- function capwin(w) {
- if(HTMLArea.is_gecko) {
- w.addEventListener("focus", self._parentEvent, true);
- } else {
- HTMLArea._addEvent(w, "focus", function(ev) {self._parentEvent(ev); });
- }
- for (var i = 0; i < w.frames.length; i++) { capwin(w.frames[i]); }
- };
- capwin(window);
-
- // capture unload events
- HTMLArea._addEvent(window, "unload", function() { self.releaseEvents(); self.close(); return false; });
- if (HTMLArea.is_gecko) HTMLArea._addEvent(editor._iframe.contentWindow, "unload", function() { self.releaseEvents(); self.close(); return false; });
- HTMLArea._addEvent(self.dialogWindow, "unload", function() { self.releaseEvents(); self.close(); return false; });
- // capture escape events
- HTMLArea._addEvent(self.doc, "keypress", function(ev) { return self._dlg_close_on_esc(ev); });
-};
-
- // Release the capturing of events
-PopupWin.prototype.releaseEvents = function() {
- var editor = this.editor;
- var _opener = this._opener;
- if(_opener && !_opener.closed) {
- var self = this;
- // release the capturing of events
- function relwin(w) {
- if (HTMLArea.is_gecko) HTMLArea._removeEvent(w, "focus", self._parentEvent);
- else HTMLArea._removeEvent(w, "focus", function(ev) {self._parentEvent(ev); });
- try { for (var i = 0; i < w.frames.length; i++) { relwin(w.frames[i]); }; } catch(e) { };
- };
- relwin(_opener);
- HTMLArea._removeEvent(_opener, "unload", function() { if (!self.dialogWindow.closed) { self.releaseEvents(); self.close(); } return false; });
- if (HTMLArea.is_gecko) HTMLArea._addEvent(editor._iframe.contentWindow, "unload", function() { self.releaseEvents(); self.close(); return false; });
- }
-};
-
- // Close the popup
-PopupWin.prototype.close = function() {
- if (this.dialogWindow && this.dialogWindow.dialog) {
- this.dialogWindow.dialog.releaseEvents();
- this.dialogWindow.dialog.close();
- this.dialogWindow.dialog = null;
- }
- if (this.dialogWindow) {
- this.releaseEvents();
- if (!this.dialogWindow.closed) {
- this.dialogWindow.close();
- this.dialogWindow = null;
- }
- }
- if (HTMLArea.is_gecko && this._opener) {
- if (!this._opener.closed) this._opener.focus();
- }
-};
-
- // Add OK and Cancel buttons to the popup
-PopupWin.prototype.addButtons = function() {
- var self = this;
- var div = this.doc.createElement("div");
- this.content.appendChild(div);
- div.className = "buttons";
- for (var i = 0; i < arguments.length; ++i) {
- var btn = arguments[i];
- var button = this.doc.createElement("button");
- div.appendChild(button);
- switch (btn) {
- case "ok":
- button.innerHTML = HTMLArea.I18N.dialogs["OK"];
- button.onclick = function() {
- try { self.callHandler(); } catch(e) { };
- self.close();
- return false;
- };
- break;
- case "cancel":
- button.innerHTML = HTMLArea.I18N.dialogs["Cancel"];
- button.onclick = function() {
- self.close();
- return false;
- };
- break;
- }
- }
-};
-
- // Resize the popup and center on screen
-PopupWin.prototype.showAtElement = function() {
- var popup = this;
- var doc = popup.dialogWindow.document;
- // resize if allowed
- if (HTMLArea.is_gecko && !HTMLArea.is_safari) {
- setTimeout( function() {
- try {
- popup.dialogWindow.sizeToContent();
- popup.dialogWindow.innerWidth += 20;
- } catch(e) {
- popup.resizeWindow();
- }
- // center on parent if allowed
- var x = popup._opener.screenX + (popup._opener.outerWidth - popup.dialogWindow.outerWidth) / 2;
- var y = popup._opener.screenY + (popup._opener.outerHeight - popup.dialogWindow.outerHeight) / 2;
- try {
- popup.dialogWindow.moveTo(x, y);
- } catch(e) { }
- }, 25);
- } else {
- var innerX,innerY;
- if (popup.dialogWindow.innerHeight) {
- // all except Explorer
- innerX = popup.dialogWindow.innerWidth;
- innerY = popup.dialogWindow.innerHeight;
- } else if (doc.documentElement && doc.documentElement.clientHeight) {
- // Explorer 6 Strict Mode
- innerX = doc.documentElement.clientWidth;
- innerY = doc.documentElement.clientHeight;
- } else if (document.body) {
- // other Explorers
- innerX = doc.body.clientWidth;
- innerY = doc.body.clientHeight;
- }
-
- var pageX,pageY;
- var test1 = doc.body.scrollHeight;
- var test2 = doc.body.offsetHeight;
- if (test1 > test2) {
- // all but Explorer Mac
- pageX = doc.body.scrollWidth;
- pageY = doc.body.scrollHeight;
- } else {
- // Explorer Mac
- //would also work in Explorer 6 Strict, Mozilla and Safari
- pageX = doc.body.offsetWidth;
- pageY = doc.body.offsetHeight;
- }
- popup.dialogWindow.resizeBy(pageX - innerX, pageY - innerY);
- if (HTMLArea.is_opera) this.resizeWindow();
-
- // center on parent if allowed
- popup.dialogWindow.moveTo((screen.availWidth - doc.body.offsetWidth)/2,(screen.availHeight - doc.body.offsetHeight)/2);
- }
-};
- // Resize to content for Opera, based on size of content div
-PopupWin.prototype.resizeWindow = function() {
- var win = this.dialogWindow;
- var doc = win.document;
- var docElement = doc.documentElement;
- var body = doc.body;
- var myW = 0, myH = 0;
-
- var contentWidth = this.content.offsetWidth;
- var contentHeight = this.content.offsetHeight;
- win.resizeTo( contentWidth + 200, contentHeight + 200 );
- if (win.innerWidth) { myW = win.innerWidth; myH = win.innerHeight; }
- else if (docElement && docElement.clientWidth) { myW = docElement.clientWidth; myH = docElement.clientHeight; }
- else if (body && body.clientWidth) { myW = body.clientWidth; myH = body.clientHeight; }
- win.resizeTo( contentWidth + ( ( contentWidth + 200 ) - myW ), contentHeight + ( (contentHeight + 200 ) - (myH - 16) ) );
-};
-