138 lines
5.6 KiB
HTML
138 lines
5.6 KiB
HTML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>{$lang_insert_table_title}</title>
|
|
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
|
<script language="javascript" type="text/javascript">
|
|
function insertTable() {
|
|
if (window.opener) {
|
|
var args = new Array();
|
|
args["cols"] = document.forms[0].cols.value;
|
|
args["rows"] = document.forms[0].rows.value;
|
|
args["border"] = document.forms[0].border.value;
|
|
args["cellpadding"] = document.forms[0].cellpadding.value;
|
|
args["cellspacing"] = document.forms[0].cellspacing.value;
|
|
args["width"] = document.forms[0].width.value;
|
|
args["height"] = document.forms[0].height.value;
|
|
args["align"] = document.forms[0].align.options[document.forms[0].align.selectedIndex].value;
|
|
args["className"] = document.forms[0].styleSelect.options[document.forms[0].styleSelect.selectedIndex].value;
|
|
|
|
window.opener.tinyMCE.execCommand("mceInsertTable", false, args);
|
|
top.close();
|
|
}
|
|
}
|
|
|
|
function init() {
|
|
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;
|
|
}
|
|
|
|
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;
|
|
}
|
|
}
|
|
|
|
if (tinyMCE.getWindowArg('action') == "update") {
|
|
document.forms[0].cols.disabled = true;
|
|
document.forms[0].rows.disabled = true;
|
|
}
|
|
|
|
var formObj = document.forms[0];
|
|
formObj.cols.value = tinyMCE.getWindowArg('cols');
|
|
formObj.rows.value = tinyMCE.getWindowArg('rows');
|
|
formObj.border.value = tinyMCE.getWindowArg('border');
|
|
formObj.cellpadding.value = tinyMCE.getWindowArg('cellpadding');
|
|
formObj.cellspacing.value = tinyMCE.getWindowArg('cellspacing');
|
|
formObj.width.value = tinyMCE.getWindowArg('width');
|
|
formObj.height.value = tinyMCE.getWindowArg('height');
|
|
formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'));
|
|
|
|
window.focus();
|
|
}
|
|
|
|
function cancelAction() {
|
|
top.close();
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="window.focus();init();">
|
|
<form onsubmit="insertTable();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="4" class="title">{$lang_insert_table_title}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>{$lang_insert_table_cols}:</td>
|
|
<td><input name="cols" type="text" id="cols" value="" size="3" maxlength="3"></td>
|
|
<td>{$lang_insert_table_rows}:</td>
|
|
<td><input name="rows" type="text" id="rows" value="" size="3" maxlength="3"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>{$lang_insert_table_cellpadding}:</td>
|
|
<td><input name="cellpadding" type="text" id="cellpadding" value="" size="3" maxlength="3"></td>
|
|
<td>{$lang_insert_table_cellspacing}:</td>
|
|
<td><input name="cellspacing" type="text" id="cellspacing" value="" size="3" maxlength="3"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>{$lang_insert_table_align}:</td>
|
|
<td><select name="align">
|
|
<option value="">{$lang_insert_table_align_default}</option>
|
|
<option value="center">{$lang_insert_table_align_middle}</option>
|
|
<option value="left">{$lang_insert_table_align_left}</option>
|
|
<option value="right">{$lang_insert_table_align_right}</option>
|
|
</select></td>
|
|
<td>{$lang_insert_table_border}:</td>
|
|
<td><input name="border" type="text" id="border" value="" size="3" maxlength="3"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>{$lang_insert_table_width}:</td>
|
|
<td><input name="width" type="text" id="width" value="" size="4" maxlength="4"></td>
|
|
<td>{$lang_insert_table_height}: </td>
|
|
<td><input name="height" type="text" id="height" value="" size="4" maxlength="4"></td>
|
|
</tr>
|
|
<tr>
|
|
<td>{$lang_insert_table_class}:</td>
|
|
<td>
|
|
<select name="styleSelect">
|
|
<option value="" selected>-- {$lang_theme_style_select} --</option>
|
|
</select></td>
|
|
<td align="right"> </td>
|
|
<td align="right"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td><input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertTable();"></td>
|
|
<td align="right"> </td>
|
|
<td align="right"> </td>
|
|
<td align="right"><input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="cancelAction();"></td>
|
|
</tr>
|
|
</table></td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</body>
|
|
</html>
|