Changing to native

git-svn-id: http://svn.automattic.com/wordpress/trunk@2801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2005-08-23 01:33:52 +00:00
parent 16aa6aee11
commit c7fac7fcb6
13 changed files with 6977 additions and 6977 deletions

View File

@ -1,10 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>blank_page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body class="mceContentBody">
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>blank_page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body class="mceContentBody">
</body>
</html>

View File

@ -1,19 +1,19 @@
body {
padding: .5em;
background: #fff;
color: #000;
font: 13px Verdana, Arial, Helvetica, sans-serif;
line-height: 130%;
scrollbar-3dlight-color: #F0F0EE;
scrollbar-arrow-color: #676662;
scrollbar-base-color: #F0F0EE;
scrollbar-darkshadow-color: #DDDDDD;
scrollbar-face-color: #E0E0DD;
scrollbar-highlight-color: #F0F0EE;
scrollbar-shadow-color: #F0F0EE;
scrollbar-track-color: #F5F5F5;
}
.mceVisualAid {
border: 1px dashed #bbb;
}
body {
padding: .5em;
background: #fff;
color: #000;
font: 13px Verdana, Arial, Helvetica, sans-serif;
line-height: 130%;
scrollbar-3dlight-color: #F0F0EE;
scrollbar-arrow-color: #676662;
scrollbar-base-color: #F0F0EE;
scrollbar-darkshadow-color: #DDDDDD;
scrollbar-face-color: #E0E0DD;
scrollbar-highlight-color: #F0F0EE;
scrollbar-shadow-color: #F0F0EE;
scrollbar-track-color: #F5F5F5;
}
.mceVisualAid {
border: 1px dashed #bbb;
}

View File

@ -1,108 +1,108 @@
body, td {
background-color: #F0F0EE;
font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana;
margin: 1em;
}
input {
background: #FFFFFF;
border: 1px solid #cccccc;
}
input, select, textarea {
border: 1px solid #808080;
}
.input_noborder {
border: 0px solid #808080;
}
#insert {
font-weight: bold;
}
#cancel {
font-weight: bold;
}
#cancel:hover {
background-color: #c00;
}
.title {
font-size: 12px;
font-weight: bold;
}
table.charmap {
border-style: solid;
border-width: 1px;
border-color: #AAAAAA;
}
td.charmap, td.charmapOver {
color: #000000;
border-color: #AAAAAA;
border-style: solid;
border-width: 1px;
text-align: center;
font-size: 12px;
}
td.charmapOver {
background-color: #CCCCCC;
cursor: arrow;
}
a.charmap {
color: #000000;
text-decoration: none
}
.wordWrapCode {
vertical-align: middle;
border: 1px none #000000;
background-color: transparent;
}
input.radio {
border: 1px none #000000;
background-color: transparent;
vertical-align: middle;
}
input.checkbox {
border: 1px none #000000;
background-color: transparent;
vertical-align: middle;
}
.mceButtonNormal, .mceButtonOver, .mceButtonDown, .mceSeparator, .mceButtonDisabled, .mceButtonSelected {
margin-left: 1px;
}
.mceButtonNormal {
border-top: 1px solid;
border-left: 1px solid;
border-bottom: 1px solid;
border-right: 1px solid;
border-color: #F0F0EE;
cursor: arrow;
}
.mceButtonOver {
border: 1px solid #0A246A;
cursor: arrow;
background-color: #B6BDD2;
}
.mceButtonDown {
cursor: arrow;
border: 1px solid #0A246A;
background-color: #8592B5;
}
legend {
font-weight: bold;
}
body, td {
background-color: #F0F0EE;
font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana;
margin: 1em;
}
input {
background: #FFFFFF;
border: 1px solid #cccccc;
}
input, select, textarea {
border: 1px solid #808080;
}
.input_noborder {
border: 0px solid #808080;
}
#insert {
font-weight: bold;
}
#cancel {
font-weight: bold;
}
#cancel:hover {
background-color: #c00;
}
.title {
font-size: 12px;
font-weight: bold;
}
table.charmap {
border-style: solid;
border-width: 1px;
border-color: #AAAAAA;
}
td.charmap, td.charmapOver {
color: #000000;
border-color: #AAAAAA;
border-style: solid;
border-width: 1px;
text-align: center;
font-size: 12px;
}
td.charmapOver {
background-color: #CCCCCC;
cursor: arrow;
}
a.charmap {
color: #000000;
text-decoration: none
}
.wordWrapCode {
vertical-align: middle;
border: 1px none #000000;
background-color: transparent;
}
input.radio {
border: 1px none #000000;
background-color: transparent;
vertical-align: middle;
}
input.checkbox {
border: 1px none #000000;
background-color: transparent;
vertical-align: middle;
}
.mceButtonNormal, .mceButtonOver, .mceButtonDown, .mceSeparator, .mceButtonDisabled, .mceButtonSelected {
margin-left: 1px;
}
.mceButtonNormal {
border-top: 1px solid;
border-left: 1px solid;
border-bottom: 1px solid;
border-right: 1px solid;
border-color: #F0F0EE;
cursor: arrow;
}
.mceButtonOver {
border: 1px solid #0A246A;
cursor: arrow;
background-color: #B6BDD2;
}
.mceButtonDown {
cursor: arrow;
border: 1px solid #0A246A;
background-color: #8592B5;
}
legend {
font-weight: bold;
}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1,188 +1,188 @@
<html>
<head>
<title>{$lang_insert_image_title}</title>
<script language="javascript" src="../../tiny_mce_popup.js"></script>
<script language="javascript">
var url = tinyMCE.getParam("external_image_list_url");
if (url != null) {
// Fix relative
if (url.charAt(0) != '/')
url = tinyMCE.documentBasePath + "/" + url;
document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>');
}
</script>
<script language="javascript">
function insertImage() {
if (window.opener) {
var src = document.forms[0].src.value;
var alt = document.forms[0].alt.value;
var border = document.forms[0].border.value;
var vspace = document.forms[0].vspace.value;
var hspace = document.forms[0].hspace.value;
var width = document.forms[0].width.value;
var height = document.forms[0].height.value;
var align = document.forms[0].align.options[document.forms[0].align.selectedIndex].value;
window.opener.tinyMCE.insertImage(src, alt, border, hspace, vspace, width, height, align);
top.close();
}
}
function init() {
// Focus form field
document.getElementById('src').focus();
var formObj = document.forms[0];
for (var i=0; i<document.forms[0].align.options.length; i++) {
if (document.forms[0].align.options[i].value == tinyMCE.getWindowArg('align'))
document.forms[0].align.options.selectedIndex = i;
}
formObj.src.value = tinyMCE.getWindowArg('src');
formObj.alt.value = tinyMCE.getWindowArg('alt');
formObj.border.value = tinyMCE.getWindowArg('border');
formObj.vspace.value = tinyMCE.getWindowArg('vspace');
formObj.hspace.value = tinyMCE.getWindowArg('hspace');
formObj.width.value = tinyMCE.getWindowArg('width');
formObj.height.value = tinyMCE.getWindowArg('height');
formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true);
// Handle file browser
if (tinyMCE.getParam("file_browser_callback") != null) {
document.getElementById('src').style.width = '180px';
var html = '';
html += '<img id="browserBtn" src="images/browse.gif"';
html += ' onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');"';
html += ' onmouseout="tinyMCE.restoreClass(this);"';
html += ' onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');"';
html += ' onclick="javascript:tinyMCE.openFileBrowser(\'src\',document.forms[0].src.value,\'image\',window);"';
html += ' width="20" height="18" border="0" title="' + tinyMCE.getLang('lang_browse') + '"';
html += ' class="mceButtonNormal" alt="' + tinyMCE.getLang('lang_browse') + '" />';
document.getElementById('browser').innerHTML = html;
}
// Auto select image in list
if (typeof(tinyMCEImageList) != "undefined" && tinyMCEImageList.length > 0) {
for (var i=0; i<formObj.image_list.length; i++) {
if (formObj.image_list.options[i].value == tinyMCE.getWindowArg('src'))
formObj.image_list.options[i].selected = true;
}
}
}
function cancelAction() {
tinyMCE.closeDialog();
}
var preloadImg = new Image();
function resetImageData() {
var formObj = document.forms[0];
formObj.width.value = formObj.height.value = "";
}
function updateImageData() {
var formObj = document.forms[0];
if (formObj.width.value == "")
formObj.width.value = preloadImg.width;
if (formObj.height.value == "")
formObj.height.value = preloadImg.height;
}
function getImageData() {
preloadImg = new Image();
tinyMCE.addEvent(preloadImg, "load", updateImageData);
tinyMCE.addEvent(preloadImg, "error", function () {var formObj = document.forms[0];formObj.width.value = formObj.height.value = "";});
preloadImg.src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], document.forms[0].src.value);
}
</script>
</head>
<body onload="init();">
<form onsubmit="insertImage();return false;">
<table border="0" cellpadding="0" cellspacing="0" width="200">
<tr>
<td align="center" valign="middle"><table border="0" cellpadding="4" cellspacing="0">
<tr>
<td colspan="2" class="title" nowrap="nowrap">{$lang_insert_image_title}</td>
</tr>
<tr>
<td nowrap="nowrap">{$lang_insert_image_src}:</td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input name="src" type="text" id="src" value="http://" style="width: 200px" onchange="getImageData();"></td>
<td id="browser"></td>
</tr>
</table></td>
</tr>
<!-- Image list -->
<script language="javascript">
if (typeof(tinyMCEImageList) != "undefined" && tinyMCEImageList.length > 0) {
var html = "";
html += '<tr><td>{$lang_image_list}:</td>';
html += '<td><select name="image_list" style="width: 200px" onchange="this.form.src.value=this.options[this.selectedIndex].value;resetImageData();getImageData();">';
html += '<option value="">---</option>';
for (var i=0; i<tinyMCEImageList.length; i++)
html += '<option value="' + tinyMCEImageList[i][1] + '">' + tinyMCEImageList[i][0] + '</option>';
html += '</select></td></tr>';
document.write(html);
}
</script>
<!-- /Image list -->
<tr>
<td nowrap="nowrap">{$lang_insert_image_alt}:</td>
<td><input name="alt" type="text" id="alt" value="" style="width: 200px"></td>
</tr>
<tr>
<td nowrap="nowrap">{$lang_insert_image_align}:</td>
<td><select name="align">
<option value="">{$lang_insert_image_align_default}</option>
<option value="baseline">{$lang_insert_image_align_baseline}</option>
<option value="top">{$lang_insert_image_align_top}</option>
<option value="middle">{$lang_insert_image_align_middle}</option>
<option value="bottom">{$lang_insert_image_align_bottom}</option>
<option value="texttop">{$lang_insert_image_align_texttop}</option>
<option value="absmiddle">{$lang_insert_image_align_absmiddle}</option>
<option value="absbottom">{$lang_insert_image_align_absbottom}</option>
<option value="left">{$lang_insert_image_align_left}</option>
<option value="right">{$lang_insert_image_align_right}</option>
</select></td>
</tr>
<tr style="display: none;">
<td nowrap="nowrap">{$lang_insert_image_dimensions}:</td>
<td><input name="width" type="text" id="width" value="" size="3" maxlength="3">
x
<input name="height" type="text" id="height" value="" size="3" maxlength="3"></td>
</tr>
<tr style="display: none;">
<td nowrap="nowrap">{$lang_insert_image_border}:</td>
<td><input name="border" type="text" id="border" value="" size="3" maxlength="3"></td>
</tr>
<tr style="display: none;">
<td nowrap="nowrap">{$lang_insert_image_vspace}:</td>
<td><input name="vspace" type="text" id="vspace" value="" size="3" maxlength="3"></td>
</tr>
<tr style="display: none;">
<td nowrap="nowrap">{$lang_insert_image_hspace}:</td>
<td><input name="hspace" type="text" id="hspace" value="" size="3" maxlength="3"></td>
</tr>
<tr>
<td nowrap="nowrap"><input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onClick="cancelAction();"></td>
<td align="right"><input type="button" id="insert" name="insert" value="{$lang_insert}" onClick="insertImage();"> </td>
</tr>
</table></td>
</tr>
</table>
</form>
</body>
</html>
<html>
<head>
<title>{$lang_insert_image_title}</title>
<script language="javascript" src="../../tiny_mce_popup.js"></script>
<script language="javascript">
var url = tinyMCE.getParam("external_image_list_url");
if (url != null) {
// Fix relative
if (url.charAt(0) != '/')
url = tinyMCE.documentBasePath + "/" + url;
document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>');
}
</script>
<script language="javascript">
function insertImage() {
if (window.opener) {
var src = document.forms[0].src.value;
var alt = document.forms[0].alt.value;
var border = document.forms[0].border.value;
var vspace = document.forms[0].vspace.value;
var hspace = document.forms[0].hspace.value;
var width = document.forms[0].width.value;
var height = document.forms[0].height.value;
var align = document.forms[0].align.options[document.forms[0].align.selectedIndex].value;
window.opener.tinyMCE.insertImage(src, alt, border, hspace, vspace, width, height, align);
top.close();
}
}
function init() {
// Focus form field
document.getElementById('src').focus();
var formObj = document.forms[0];
for (var i=0; i<document.forms[0].align.options.length; i++) {
if (document.forms[0].align.options[i].value == tinyMCE.getWindowArg('align'))
document.forms[0].align.options.selectedIndex = i;
}
formObj.src.value = tinyMCE.getWindowArg('src');
formObj.alt.value = tinyMCE.getWindowArg('alt');
formObj.border.value = tinyMCE.getWindowArg('border');
formObj.vspace.value = tinyMCE.getWindowArg('vspace');
formObj.hspace.value = tinyMCE.getWindowArg('hspace');
formObj.width.value = tinyMCE.getWindowArg('width');
formObj.height.value = tinyMCE.getWindowArg('height');
formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true);
// Handle file browser
if (tinyMCE.getParam("file_browser_callback") != null) {
document.getElementById('src').style.width = '180px';
var html = '';
html += '<img id="browserBtn" src="images/browse.gif"';
html += ' onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');"';
html += ' onmouseout="tinyMCE.restoreClass(this);"';
html += ' onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');"';
html += ' onclick="javascript:tinyMCE.openFileBrowser(\'src\',document.forms[0].src.value,\'image\',window);"';
html += ' width="20" height="18" border="0" title="' + tinyMCE.getLang('lang_browse') + '"';
html += ' class="mceButtonNormal" alt="' + tinyMCE.getLang('lang_browse') + '" />';
document.getElementById('browser').innerHTML = html;
}
// Auto select image in list
if (typeof(tinyMCEImageList) != "undefined" && tinyMCEImageList.length > 0) {
for (var i=0; i<formObj.image_list.length; i++) {
if (formObj.image_list.options[i].value == tinyMCE.getWindowArg('src'))
formObj.image_list.options[i].selected = true;
}
}
}
function cancelAction() {
tinyMCE.closeDialog();
}
var preloadImg = new Image();
function resetImageData() {
var formObj = document.forms[0];
formObj.width.value = formObj.height.value = "";
}
function updateImageData() {
var formObj = document.forms[0];
if (formObj.width.value == "")
formObj.width.value = preloadImg.width;
if (formObj.height.value == "")
formObj.height.value = preloadImg.height;
}
function getImageData() {
preloadImg = new Image();
tinyMCE.addEvent(preloadImg, "load", updateImageData);
tinyMCE.addEvent(preloadImg, "error", function () {var formObj = document.forms[0];formObj.width.value = formObj.height.value = "";});
preloadImg.src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], document.forms[0].src.value);
}
</script>
</head>
<body onload="init();">
<form onsubmit="insertImage();return false;">
<table border="0" cellpadding="0" cellspacing="0" width="200">
<tr>
<td align="center" valign="middle"><table border="0" cellpadding="4" cellspacing="0">
<tr>
<td colspan="2" class="title" nowrap="nowrap">{$lang_insert_image_title}</td>
</tr>
<tr>
<td nowrap="nowrap">{$lang_insert_image_src}:</td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input name="src" type="text" id="src" value="http://" style="width: 200px" onchange="getImageData();"></td>
<td id="browser"></td>
</tr>
</table></td>
</tr>
<!-- Image list -->
<script language="javascript">
if (typeof(tinyMCEImageList) != "undefined" && tinyMCEImageList.length > 0) {
var html = "";
html += '<tr><td>{$lang_image_list}:</td>';
html += '<td><select name="image_list" style="width: 200px" onchange="this.form.src.value=this.options[this.selectedIndex].value;resetImageData();getImageData();">';
html += '<option value="">---</option>';
for (var i=0; i<tinyMCEImageList.length; i++)
html += '<option value="' + tinyMCEImageList[i][1] + '">' + tinyMCEImageList[i][0] + '</option>';
html += '</select></td></tr>';
document.write(html);
}
</script>
<!-- /Image list -->
<tr>
<td nowrap="nowrap">{$lang_insert_image_alt}:</td>
<td><input name="alt" type="text" id="alt" value="" style="width: 200px"></td>
</tr>
<tr>
<td nowrap="nowrap">{$lang_insert_image_align}:</td>
<td><select name="align">
<option value="">{$lang_insert_image_align_default}</option>
<option value="baseline">{$lang_insert_image_align_baseline}</option>
<option value="top">{$lang_insert_image_align_top}</option>
<option value="middle">{$lang_insert_image_align_middle}</option>
<option value="bottom">{$lang_insert_image_align_bottom}</option>
<option value="texttop">{$lang_insert_image_align_texttop}</option>
<option value="absmiddle">{$lang_insert_image_align_absmiddle}</option>
<option value="absbottom">{$lang_insert_image_align_absbottom}</option>
<option value="left">{$lang_insert_image_align_left}</option>
<option value="right">{$lang_insert_image_align_right}</option>
</select></td>
</tr>
<tr style="display: none;">
<td nowrap="nowrap">{$lang_insert_image_dimensions}:</td>
<td><input name="width" type="text" id="width" value="" size="3" maxlength="3">
x
<input name="height" type="text" id="height" value="" size="3" maxlength="3"></td>
</tr>
<tr style="display: none;">
<td nowrap="nowrap">{$lang_insert_image_border}:</td>
<td><input name="border" type="text" id="border" value="" size="3" maxlength="3"></td>
</tr>
<tr style="display: none;">
<td nowrap="nowrap">{$lang_insert_image_vspace}:</td>
<td><input name="vspace" type="text" id="vspace" value="" size="3" maxlength="3"></td>
</tr>
<tr style="display: none;">
<td nowrap="nowrap">{$lang_insert_image_hspace}:</td>
<td><input name="hspace" type="text" id="hspace" value="" size="3" maxlength="3"></td>
</tr>
<tr>
<td nowrap="nowrap"><input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onClick="cancelAction();"></td>
<td align="right"><input type="button" id="insert" name="insert" value="{$lang_insert}" onClick="insertImage();"> </td>
</tr>
</table></td>
</tr>
</table>
</form>
</body>
</html>

View File

@ -1,189 +1,189 @@
<html>
<head>
<title>{$lang_insert_link_title}</title>
<script language="javascript" src="../../tiny_mce_popup.js"></script>
<script language="javascript">
var url = tinyMCE.getParam("external_link_list_url");
if (url != null) {
// Fix relative
if (url.charAt(0) != '/')
url = tinyMCE.documentBasePath + "/" + url;
document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>');
}
</script>
<script language="javascript">
function init() {
for (var i=0; i<document.forms[0].target.options.length; i++) {
var option = document.forms[0].target.options[i];
if (option.value == tinyMCE.getWindowArg('target'))
option.selected = true;
}
document.forms[0].href.value = tinyMCE.getWindowArg('href');
document.forms[0].linktitle.value = tinyMCE.getWindowArg('title');
document.forms[0].insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true);
var className = tinyMCE.getWindowArg('className');
var styleSelectElm = document.forms[0].styleSelect;
var stylesAr = tinyMCE.getParam('theme_advanced_styles', false);
if (stylesAr) {
stylesAr = stylesAr.split(';');
for (var i=0; i<stylesAr.length; i++) {
var key, value;
key = stylesAr[i].split('=')[0];
value = stylesAr[i].split('=')[1];
styleSelectElm.options[styleSelectElm.length] = new Option(key, value);
if (value == className)
styleSelectElm.options.selectedIndex = styleSelectElm.options.length-1;
}
} else {
var csses = tinyMCE.getCSSClasses(tinyMCE.getWindowArg('editor_id'));
for (var i=0; i<csses.length; i++) {
styleSelectElm.options[styleSelectElm.length] = new Option(csses[i], csses[i]);
if (csses[i] == className)
styleSelectElm.options.selectedIndex = styleSelectElm.options.length-1;
}
}
// Hide it if there is no styles
if (styleSelectElm.options.length == 1) {
document.getElementById('styleSelectRow').style.display = "none";
document.getElementById('styleSelectRow').style.overflow = "hidden";
document.getElementById('styleSelectRow').style.height = "0px";
}
// Handle file browser
if (tinyMCE.getParam("file_browser_callback") != null) {
document.getElementById('href').style.width = '180px';
var html = '';
html += '<img id="browserBtn" src="images/browse.gif"';
html += ' onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');"';
html += ' onmouseout="tinyMCE.restoreClass(this);"';
html += ' onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');"';
html += ' onclick="javascript:tinyMCE.openFileBrowser(\'href\',document.forms[0].href.value,\'file\',window);"';
html += ' width="20" height="18" border="0" title="' + tinyMCE.getLang('lang_browse') + '"';
html += ' class="mceButtonNormal" alt="' + tinyMCE.getLang('lang_browse') + '" />';
document.getElementById('browser').innerHTML = html;
}
// Auto select link in list
if (typeof(tinyMCELinkList) != "undefined" && tinyMCELinkList.length > 0) {
var formObj = document.forms[0];
for (var i=0; i<formObj.link_list.length; i++) {
if (formObj.link_list.options[i].value == tinyMCE.getWindowArg('href'))
formObj.link_list.options[i].selected = true;
}
}
// Focus form field
document.getElementById('href').focus();
}
function insertLink() {
if (window.opener) {
var href = document.forms[0].href.value;
var target = null;
var title = document.forms[0].linktitle.value;
var style_class = document.forms[0].styleSelect.value;
var dummy;
window.opener.tinyMCE.insertLink(href, target, title, dummy, style_class);
tinyMCE.closeDialog();
}
}
function cancelAction() {
tinyMCE.closeDialog();
}
</script>
</head>
<body onload="init();">
<form onsubmit="insertLink();return false;">
<table border="0" cellpadding="0" cellspacing="0" width="100">
<tr>
<td align="center" valign="middle"><table border="0" cellpadding="4" cellspacing="0">
<tr>
<td colspan="2" class="title" nowrap="nowrap">{$lang_insert_link_title}</td>
</tr>
<tr>
<td nowrap="nowrap">{$lang_insert_link_url}:</td>
<td> <table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input name="href" type="text" id="href" value="http://" style="width: 200px"></td>
<td id="browser"></td>
</tr>
</table></td>
</tr>
<!-- Link list -->
<script language="javascript">
if (typeof(tinyMCELinkList) != "undefined" && tinyMCELinkList.length > 0) {
var html = "";
html += '<tr><td>{$lang_link_list}:</td>';
html += '<td><select name="link_list" style="width: 200px" onchange="this.form.href.value=this.options[this.selectedIndex].value;">';
html += '<option value="">---</option>';
for (var i=0; i<tinyMCELinkList.length; i++)
html += '<option value="' + tinyMCELinkList[i][1] + '">' + tinyMCELinkList[i][0] + '</option>';
html += '</select></td></tr>';
document.write(html);
}
</script>
<!-- /Link list -->
<tr style="display: none;">
<td nowrap="nowrap">{$lang_insert_link_target}:</td>
<td><select name="target" style="width: 200px">
<option value="">{$lang_insert_link_target_same}</option>
<option value="_blank">{$lang_insert_link_target_blank}</option>
<script language="javascript">
var targets = tinyMCE.getParam('theme_advanced_link_targets', '').split(';');
for (var i=0; i<targets.length; i++) {
var key, value;
if (targets[i] == "")
continue;
key = targets[i].split('=')[0];
value = targets[i].split('=')[1];
html += '<option value="' + value + '">' + key + '</option>';
}
document.write(html);
</script>
</select></td>
</tr>
<tr>
<td nowrap="nowrap">{$lang_theme_insert_link_titlefield}:</td>
<td><input name="linktitle" type="text" id="linktitle" value="" style="width: 200px"></td>
</tr>
<tr id="styleSelectRow" style="display: none;">
<td>{$lang_class}:</td>
<td>
<select name="styleSelect">
<option value="" selected>{$lang_theme_style_select}</option>
</select></td>
<td align="right">&nbsp;</td>
<td align="right">&nbsp;</td>
</tr>
<tr>
<td><input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onClick="cancelAction();"></td>
<td align="right"><input type="button" id="insert" name="insert" value="Create hyperlink" onClick="insertLink();"> </td>
</tr>
</table></td>
</tr>
</table>
</form>
</body>
</html>
<html>
<head>
<title>{$lang_insert_link_title}</title>
<script language="javascript" src="../../tiny_mce_popup.js"></script>
<script language="javascript">
var url = tinyMCE.getParam("external_link_list_url");
if (url != null) {
// Fix relative
if (url.charAt(0) != '/')
url = tinyMCE.documentBasePath + "/" + url;
document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>');
}
</script>
<script language="javascript">
function init() {
for (var i=0; i<document.forms[0].target.options.length; i++) {
var option = document.forms[0].target.options[i];
if (option.value == tinyMCE.getWindowArg('target'))
option.selected = true;
}
document.forms[0].href.value = tinyMCE.getWindowArg('href');
document.forms[0].linktitle.value = tinyMCE.getWindowArg('title');
document.forms[0].insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true);
var className = tinyMCE.getWindowArg('className');
var styleSelectElm = document.forms[0].styleSelect;
var stylesAr = tinyMCE.getParam('theme_advanced_styles', false);
if (stylesAr) {
stylesAr = stylesAr.split(';');
for (var i=0; i<stylesAr.length; i++) {
var key, value;
key = stylesAr[i].split('=')[0];
value = stylesAr[i].split('=')[1];
styleSelectElm.options[styleSelectElm.length] = new Option(key, value);
if (value == className)
styleSelectElm.options.selectedIndex = styleSelectElm.options.length-1;
}
} else {
var csses = tinyMCE.getCSSClasses(tinyMCE.getWindowArg('editor_id'));
for (var i=0; i<csses.length; i++) {
styleSelectElm.options[styleSelectElm.length] = new Option(csses[i], csses[i]);
if (csses[i] == className)
styleSelectElm.options.selectedIndex = styleSelectElm.options.length-1;
}
}
// Hide it if there is no styles
if (styleSelectElm.options.length == 1) {
document.getElementById('styleSelectRow').style.display = "none";
document.getElementById('styleSelectRow').style.overflow = "hidden";
document.getElementById('styleSelectRow').style.height = "0px";
}
// Handle file browser
if (tinyMCE.getParam("file_browser_callback") != null) {
document.getElementById('href').style.width = '180px';
var html = '';
html += '<img id="browserBtn" src="images/browse.gif"';
html += ' onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');"';
html += ' onmouseout="tinyMCE.restoreClass(this);"';
html += ' onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');"';
html += ' onclick="javascript:tinyMCE.openFileBrowser(\'href\',document.forms[0].href.value,\'file\',window);"';
html += ' width="20" height="18" border="0" title="' + tinyMCE.getLang('lang_browse') + '"';
html += ' class="mceButtonNormal" alt="' + tinyMCE.getLang('lang_browse') + '" />';
document.getElementById('browser').innerHTML = html;
}
// Auto select link in list
if (typeof(tinyMCELinkList) != "undefined" && tinyMCELinkList.length > 0) {
var formObj = document.forms[0];
for (var i=0; i<formObj.link_list.length; i++) {
if (formObj.link_list.options[i].value == tinyMCE.getWindowArg('href'))
formObj.link_list.options[i].selected = true;
}
}
// Focus form field
document.getElementById('href').focus();
}
function insertLink() {
if (window.opener) {
var href = document.forms[0].href.value;
var target = null;
var title = document.forms[0].linktitle.value;
var style_class = document.forms[0].styleSelect.value;
var dummy;
window.opener.tinyMCE.insertLink(href, target, title, dummy, style_class);
tinyMCE.closeDialog();
}
}
function cancelAction() {
tinyMCE.closeDialog();
}
</script>
</head>
<body onload="init();">
<form onsubmit="insertLink();return false;">
<table border="0" cellpadding="0" cellspacing="0" width="100">
<tr>
<td align="center" valign="middle"><table border="0" cellpadding="4" cellspacing="0">
<tr>
<td colspan="2" class="title" nowrap="nowrap">{$lang_insert_link_title}</td>
</tr>
<tr>
<td nowrap="nowrap">{$lang_insert_link_url}:</td>
<td> <table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input name="href" type="text" id="href" value="http://" style="width: 200px"></td>
<td id="browser"></td>
</tr>
</table></td>
</tr>
<!-- Link list -->
<script language="javascript">
if (typeof(tinyMCELinkList) != "undefined" && tinyMCELinkList.length > 0) {
var html = "";
html += '<tr><td>{$lang_link_list}:</td>';
html += '<td><select name="link_list" style="width: 200px" onchange="this.form.href.value=this.options[this.selectedIndex].value;">';
html += '<option value="">---</option>';
for (var i=0; i<tinyMCELinkList.length; i++)
html += '<option value="' + tinyMCELinkList[i][1] + '">' + tinyMCELinkList[i][0] + '</option>';
html += '</select></td></tr>';
document.write(html);
}
</script>
<!-- /Link list -->
<tr style="display: none;">
<td nowrap="nowrap">{$lang_insert_link_target}:</td>
<td><select name="target" style="width: 200px">
<option value="">{$lang_insert_link_target_same}</option>
<option value="_blank">{$lang_insert_link_target_blank}</option>
<script language="javascript">
var targets = tinyMCE.getParam('theme_advanced_link_targets', '').split(';');
for (var i=0; i<targets.length; i++) {
var key, value;
if (targets[i] == "")
continue;
key = targets[i].split('=')[0];
value = targets[i].split('=')[1];
html += '<option value="' + value + '">' + key + '</option>';
}
document.write(html);
</script>
</select></td>
</tr>
<tr>
<td nowrap="nowrap">{$lang_theme_insert_link_titlefield}:</td>
<td><input name="linktitle" type="text" id="linktitle" value="" style="width: 200px"></td>
</tr>
<tr id="styleSelectRow" style="display: none;">
<td>{$lang_class}:</td>
<td>
<select name="styleSelect">
<option value="" selected>{$lang_theme_style_select}</option>
</select></td>
<td align="right">&nbsp;</td>
<td align="right">&nbsp;</td>
</tr>
<tr>
<td><input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onClick="cancelAction();"></td>
<td align="right"><input type="button" id="insert" name="insert" value="Create hyperlink" onClick="insertLink();"> </td>
</tr>
</table></td>
</tr>
</table>
</form>
</body>
</html>

View File

@ -1,86 +1,86 @@
<html>
<head>
<title>{$lang_theme_code_title}</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script language="javascript" type="text/javascript">
<!--
tinyMCE.setWindowArg('mce_windowresize', false);
function saveContent() {
if (window.opener) {
window.opener.tinyMCE.setContent(document.getElementById('htmlSource').value);
window.close();
}
}
// Fixes some charcode issues
function fixContent(html) {
html = html.replace(new RegExp('<(p|hr|table|tr|td|ol|ul|object|embed|li|blockquote)', 'gi'),'\n<$1');
html = html.replace(new RegExp('<\/(p|ol|ul|li|table|tr|td|blockquote|object)>', 'gi'),'</$1>\n');
html = tinyMCE.regexpReplace(html, '<br />','<br />\n','gi');
html = tinyMCE.regexpReplace(html, '\n\n','\n','gi');
return html;
}
function onLoadInit() {
document.forms[0].htmlSource.value = fixContent(tinyMCE.getContent(tinyMCE.getWindowArg('editor_id')));
resizeInputs();
setWrap('off');
}
function setWrap(val) {
// hard soft off
document.forms[0].htmlSource.wrap = val;
}
function toggleWordWrap(elm) {
if (elm.checked)
setWrap('soft');
else
setWrap('off');
}
var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
function resizeInputs() {
if (!tinyMCE.isMSIE) {
wHeight = self.innerHeight-80;
wWidth = self.innerWidth-25;
} else {
wHeight = document.body.clientHeight-80;
wWidth = document.body.clientWidth-25;
}
document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px';
document.forms[0].htmlSource.style.width = Math.abs(wWidth) + 'px';
}
//-->
</script>
</head>
<body scroll="no" onload="onLoadInit();" onresize="resizeInputs();">
<form name="source" onsubmit="saveContent();">
<table border="0" cellpadding="0" cellspacing="2" align="center">
<tr>
<td class="title">{$lang_theme_code_title}</td>
<td align="right"><script language="javascript" type="text/javascript">
<!--
if (tinyMCE.isMSIE) {
document.write('<input type="checkbox" name="wraped" id="wraped" onclick="toggleWordWrap(this);" class="wordWrapCode" /><label for="wraped">{$lang_theme_code_wordwrap}</label>');
}
//-->
</script></td>
</tr>
<tr>
<td colspan="2" align="center">
<textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,mono; font-size: 12px;" dir="ltr" wrap="soft"></textarea>
</td>
</tr>
<tr>
<td colspan="2" align="right"><input type="button" id="insert" name="insert" value="{$lang_update}" onclick="saveContent();" /></td>
</tr>
</table>
</form>
</body>
</html>
<html>
<head>
<title>{$lang_theme_code_title}</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script language="javascript" type="text/javascript">
<!--
tinyMCE.setWindowArg('mce_windowresize', false);
function saveContent() {
if (window.opener) {
window.opener.tinyMCE.setContent(document.getElementById('htmlSource').value);
window.close();
}
}
// Fixes some charcode issues
function fixContent(html) {
html = html.replace(new RegExp('<(p|hr|table|tr|td|ol|ul|object|embed|li|blockquote)', 'gi'),'\n<$1');
html = html.replace(new RegExp('<\/(p|ol|ul|li|table|tr|td|blockquote|object)>', 'gi'),'</$1>\n');
html = tinyMCE.regexpReplace(html, '<br />','<br />\n','gi');
html = tinyMCE.regexpReplace(html, '\n\n','\n','gi');
return html;
}
function onLoadInit() {
document.forms[0].htmlSource.value = fixContent(tinyMCE.getContent(tinyMCE.getWindowArg('editor_id')));
resizeInputs();
setWrap('off');
}
function setWrap(val) {
// hard soft off
document.forms[0].htmlSource.wrap = val;
}
function toggleWordWrap(elm) {
if (elm.checked)
setWrap('soft');
else
setWrap('off');
}
var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
function resizeInputs() {
if (!tinyMCE.isMSIE) {
wHeight = self.innerHeight-80;
wWidth = self.innerWidth-25;
} else {
wHeight = document.body.clientHeight-80;
wWidth = document.body.clientWidth-25;
}
document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px';
document.forms[0].htmlSource.style.width = Math.abs(wWidth) + 'px';
}
//-->
</script>
</head>
<body scroll="no" onload="onLoadInit();" onresize="resizeInputs();">
<form name="source" onsubmit="saveContent();">
<table border="0" cellpadding="0" cellspacing="2" align="center">
<tr>
<td class="title">{$lang_theme_code_title}</td>
<td align="right"><script language="javascript" type="text/javascript">
<!--
if (tinyMCE.isMSIE) {
document.write('<input type="checkbox" name="wraped" id="wraped" onclick="toggleWordWrap(this);" class="wordWrapCode" /><label for="wraped">{$lang_theme_code_wordwrap}</label>');
}
//-->
</script></td>
</tr>
<tr>
<td colspan="2" align="center">
<textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,mono; font-size: 12px;" dir="ltr" wrap="soft"></textarea>
</td>
</tr>
<tr>
<td colspan="2" align="right"><input type="button" id="insert" name="insert" value="{$lang_update}" onclick="saveContent();" /></td>
</tr>
</table>
</form>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -1,88 +1,88 @@
<?php
/**
* $RCSfile: tiny_mce_gzip.php,v $
* $Revision: 1.1 $
* $Date: 2005/06/14 18:55:34 $
*
* @author Moxiecode
* @copyright Copyright 2004, Moxiecode Systems AB, All rights reserved.
*
* This file compresses the TinyMCE JavaScript using GZip and
* enables the browser to do two requests instead of one for each .js file.
* Notice: This script defaults the button_tile_map option to true for extra performance.
*
* Todo:
* - Add local file cache for the GZip:ed version.
*/
// General options
$suffix = "_src"; // Set to "_src" to use source version
$expiresOffset = 3600 * 24 * 10; // 10 days util client cache expires
// Get data to load
$theme = isset($_REQUEST['theme']) ? $_REQUEST['theme'] : "";
$language = isset($_REQUEST['language']) ? $_REQUEST['language'] : "";
$plugins = isset($_REQUEST['plugins']) ? $_REQUEST['plugins'] : "";
// GZip compress and cache it for 10 days
ob_start ("ob_gzhandler");
header("Content-type: text/javascript; charset: UTF-8");
header("Cache-Control: must-revalidate");
header("Expires: " . gmdate("D, d M Y H:i:s", time() + $expiresOffset) . " GMT");
if ($theme) {
// Write main script and patch some things
echo file_get_contents(realpath("tiny_mce" . $suffix . ".js"));
echo 'TinyMCE.prototype.loadScript = function() {};';
echo "tinyMCE.init(TinyMCECompressed_settings);";
// Load theme, language pack and theme language packs
echo file_get_contents(realpath("themes/" . $theme . "/editor_template" . $suffix . ".js"));
echo file_get_contents(realpath("themes/" . $theme . "/langs/" . $language . ".js"));
echo file_get_contents(realpath("langs/" . $language . ".js"));
// Load all plugins and their language packs
$plugins = explode(",", $plugins);
foreach ($plugins as $plugin) {
$pluginFile = realpath("plugins/" . $plugin . "/editor_plugin" . $suffix . ".js");
$languageFile = realpath("plugins/" . $plugin . "/langs/" . $language . ".js");
if ($pluginFile)
echo file_get_contents($pluginFile);
if ($languageFile)
echo file_get_contents($languageFile);
}
die;
}
?>
var TinyMCECompressed_settings = null;
function TinyMCECompressed() {
}
TinyMCECompressed.prototype.init = function(settings) {
var elements = document.getElementsByTagName('script');
var scriptURL = "";
for (var i=0; i<elements.length; i++) {
if (elements[i].src && elements[i].src.indexOf("tiny_mce_gzip.php") != -1) {
scriptURL = elements[i].src;
break;
}
}
settings["theme"] = typeof(settings["theme"]) != "undefined" ? settings["theme"] : "default";
settings["plugins"] = typeof(settings["plugins"]) != "undefined" ? settings["plugins"] : "";
settings["language"] = typeof(settings["language"]) != "undefined" ? settings["language"] : "en";
settings["button_tile_map"] = typeof(settings["button_tile_map"]) != "undefined" ? settings["button_tile_map"] : true;
scriptURL += "?theme=" + escape(settings["theme"]) + "&language=" + escape(settings["language"]) + "&plugins=" + escape(settings["plugins"]);
document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + scriptURL + '"></script>');
TinyMCECompressed_settings = settings;
}
var tinyMCE = new TinyMCECompressed();
<?php
/**
* $RCSfile: tiny_mce_gzip.php,v $
* $Revision: 1.1 $
* $Date: 2005/06/14 18:55:34 $
*
* @author Moxiecode
* @copyright Copyright 2004, Moxiecode Systems AB, All rights reserved.
*
* This file compresses the TinyMCE JavaScript using GZip and
* enables the browser to do two requests instead of one for each .js file.
* Notice: This script defaults the button_tile_map option to true for extra performance.
*
* Todo:
* - Add local file cache for the GZip:ed version.
*/
// General options
$suffix = "_src"; // Set to "_src" to use source version
$expiresOffset = 3600 * 24 * 10; // 10 days util client cache expires
// Get data to load
$theme = isset($_REQUEST['theme']) ? $_REQUEST['theme'] : "";
$language = isset($_REQUEST['language']) ? $_REQUEST['language'] : "";
$plugins = isset($_REQUEST['plugins']) ? $_REQUEST['plugins'] : "";
// GZip compress and cache it for 10 days
ob_start ("ob_gzhandler");
header("Content-type: text/javascript; charset: UTF-8");
header("Cache-Control: must-revalidate");
header("Expires: " . gmdate("D, d M Y H:i:s", time() + $expiresOffset) . " GMT");
if ($theme) {
// Write main script and patch some things
echo file_get_contents(realpath("tiny_mce" . $suffix . ".js"));
echo 'TinyMCE.prototype.loadScript = function() {};';
echo "tinyMCE.init(TinyMCECompressed_settings);";
// Load theme, language pack and theme language packs
echo file_get_contents(realpath("themes/" . $theme . "/editor_template" . $suffix . ".js"));
echo file_get_contents(realpath("themes/" . $theme . "/langs/" . $language . ".js"));
echo file_get_contents(realpath("langs/" . $language . ".js"));
// Load all plugins and their language packs
$plugins = explode(",", $plugins);
foreach ($plugins as $plugin) {
$pluginFile = realpath("plugins/" . $plugin . "/editor_plugin" . $suffix . ".js");
$languageFile = realpath("plugins/" . $plugin . "/langs/" . $language . ".js");
if ($pluginFile)
echo file_get_contents($pluginFile);
if ($languageFile)
echo file_get_contents($languageFile);
}
die;
}
?>
var TinyMCECompressed_settings = null;
function TinyMCECompressed() {
}
TinyMCECompressed.prototype.init = function(settings) {
var elements = document.getElementsByTagName('script');
var scriptURL = "";
for (var i=0; i<elements.length; i++) {
if (elements[i].src && elements[i].src.indexOf("tiny_mce_gzip.php") != -1) {
scriptURL = elements[i].src;
break;
}
}
settings["theme"] = typeof(settings["theme"]) != "undefined" ? settings["theme"] : "default";
settings["plugins"] = typeof(settings["plugins"]) != "undefined" ? settings["plugins"] : "";
settings["language"] = typeof(settings["language"]) != "undefined" ? settings["language"] : "en";
settings["button_tile_map"] = typeof(settings["button_tile_map"]) != "undefined" ? settings["button_tile_map"] : true;
scriptURL += "?theme=" + escape(settings["theme"]) + "&language=" + escape(settings["language"]) + "&plugins=" + escape(settings["plugins"]);
document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + scriptURL + '"></script>');
TinyMCECompressed_settings = settings;
}
var tinyMCE = new TinyMCECompressed();

View File

@ -1,96 +1,96 @@
// Get tinyMCE window
var win = window.opener ? window.opener : window.dialogArguments;
var tinyMCE = null;
var tinyMCELang = null;
// Use top window if not defined
if (!win)
win = top;
var tinyMCE = win.tinyMCE;
var tinyMCELang = win.tinyMCELang;
if (!tinyMCE)
alert("tinyMCE object reference not found from popup.");
// Setup window openerer
window.opener = win;
// Setup title
var re = new RegExp('{|\\\$|}', 'g');
var title = document.title.replace(re, "");
if (typeof tinyMCELang[title] != "undefined") {
var divElm = document.createElement("div");
divElm.innerHTML = tinyMCELang[title];
document.title = divElm.innerHTML;
}
// Setup dir
if (tinyMCELang['lang_dir'])
document.dir = tinyMCELang['lang_dir'];
function TinyMCEPlugin_onLoad() {
if (tinyMCE.getWindowArg('mce_replacevariables', true))
document.body.innerHTML = tinyMCE.applyTemplate(document.body.innerHTML, tinyMCE.windowArgs);
// Auto resize window
if (tinyMCE.getWindowArg('mce_windowresize', true))
TinyMCEPopup_autoResize();
if (tinyMCE.settings["dialog_type"] == "window")
window.focus();
}
function TinyMCEPopup_autoResize() {
// Div mode, skip resize
if (tinyMCE.settings["dialog_type"] == "div")
return;
var isMSIE = (navigator.appName == "Microsoft Internet Explorer");
var isOpera = (navigator.userAgent.indexOf("Opera") != -1);
if (isOpera)
return;
if (isMSIE) {
try { window.resizeTo(10, 10); } catch (e) {}
var elm = document.body;
var width = elm.offsetWidth;
var height = elm.offsetHeight;
var dx = (elm.scrollWidth - width) + 4;
var dy = elm.scrollHeight - height;
try { window.resizeBy(dx, dy); } catch (e) {}
} else {
window.scrollBy(1000, 1000);
if (window.scrollX > 0 || window.scrollY > 0) {
window.resizeBy(window.innerWidth * 2, window.innerHeight * 2);
window.sizeToContent();
window.scrollTo(0, 0);
var x = parseInt(screen.width / 2.0) - (window.outerWidth / 2.0);
var y = parseInt(screen.height / 2.0) - (window.outerHeight / 2.0);
window.moveTo(x, y);
}
}
}
// Re-patch it
if (tinyMCE.settings["dialog_type"] == "window") {
tinyMCE.closeDialog = function() {
// Remove div or close window
if (tinyMCE.settings["dialog_type"] == "div") {
var div = document.getElementById(tinyMCE._currentDialog);
if (div)
div.parentNode.removeChild(div);
} else
window.close();
};
}
// Add onload trigger
tinyMCE.addEvent(window, "load", TinyMCEPlugin_onLoad);
// Output Popup CSS class
document.write('<link href="' + tinyMCE.getParam("popups_css") + '" rel="stylesheet" type="text/css">');
// Get tinyMCE window
var win = window.opener ? window.opener : window.dialogArguments;
var tinyMCE = null;
var tinyMCELang = null;
// Use top window if not defined
if (!win)
win = top;
var tinyMCE = win.tinyMCE;
var tinyMCELang = win.tinyMCELang;
if (!tinyMCE)
alert("tinyMCE object reference not found from popup.");
// Setup window openerer
window.opener = win;
// Setup title
var re = new RegExp('{|\\\$|}', 'g');
var title = document.title.replace(re, "");
if (typeof tinyMCELang[title] != "undefined") {
var divElm = document.createElement("div");
divElm.innerHTML = tinyMCELang[title];
document.title = divElm.innerHTML;
}
// Setup dir
if (tinyMCELang['lang_dir'])
document.dir = tinyMCELang['lang_dir'];
function TinyMCEPlugin_onLoad() {
if (tinyMCE.getWindowArg('mce_replacevariables', true))
document.body.innerHTML = tinyMCE.applyTemplate(document.body.innerHTML, tinyMCE.windowArgs);
// Auto resize window
if (tinyMCE.getWindowArg('mce_windowresize', true))
TinyMCEPopup_autoResize();
if (tinyMCE.settings["dialog_type"] == "window")
window.focus();
}
function TinyMCEPopup_autoResize() {
// Div mode, skip resize
if (tinyMCE.settings["dialog_type"] == "div")
return;
var isMSIE = (navigator.appName == "Microsoft Internet Explorer");
var isOpera = (navigator.userAgent.indexOf("Opera") != -1);
if (isOpera)
return;
if (isMSIE) {
try { window.resizeTo(10, 10); } catch (e) {}
var elm = document.body;
var width = elm.offsetWidth;
var height = elm.offsetHeight;
var dx = (elm.scrollWidth - width) + 4;
var dy = elm.scrollHeight - height;
try { window.resizeBy(dx, dy); } catch (e) {}
} else {
window.scrollBy(1000, 1000);
if (window.scrollX > 0 || window.scrollY > 0) {
window.resizeBy(window.innerWidth * 2, window.innerHeight * 2);
window.sizeToContent();
window.scrollTo(0, 0);
var x = parseInt(screen.width / 2.0) - (window.outerWidth / 2.0);
var y = parseInt(screen.height / 2.0) - (window.outerHeight / 2.0);
window.moveTo(x, y);
}
}
}
// Re-patch it
if (tinyMCE.settings["dialog_type"] == "window") {
tinyMCE.closeDialog = function() {
// Remove div or close window
if (tinyMCE.settings["dialog_type"] == "div") {
var div = document.getElementById(tinyMCE._currentDialog);
if (div)
div.parentNode.removeChild(div);
} else
window.close();
};
}
// Add onload trigger
tinyMCE.addEvent(window, "load", TinyMCEPlugin_onLoad);
// Output Popup CSS class
document.write('<link href="' + tinyMCE.getParam("popups_css") + '" rel="stylesheet" type="text/css">');

File diff suppressed because it is too large Load Diff