mailr/public/tiny_mce/plugins/table/merge_cells.htm

57 lines
1.6 KiB
HTML

<html>
<head>
<title>{$lang_table_merge_cells_title}</title>
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script language="javascript" type="text/javascript">
function init() {
var formObj = document.forms[0];
formObj.numcols.value = tinyMCE.getWindowArg('numcols', 1);
formObj.numrows.value = tinyMCE.getWindowArg('numrows', 1);
}
function mergeCells() {
if (window.opener) {
var args = new Array();
var formObj = document.forms[0];
args["numcols"] = formObj.numcols.value;
args["numrows"] = formObj.numrows.value;
window.opener.tinyMCE.execCommand("mceTableMergeCells", false, args);
// Close the dialog
tinyMCE.closeDialog();
}
}
function cancelAction() {
// Close the dialog
tinyMCE.closeDialog();
}
</script>
</head>
<body onload="init();" style="margin: 8px">
<form onsubmit="insertTable();return false;">
<fieldset>
<legend>{$lang_table_merge_cells_title}</legend>
<table border="0" cellpadding="0" cellspacing="3" width="200">
<tr>
<td>{$lang_insert_table_cols}:</td>
<td align="right"><input type="text" name="numcols" value="" style="width: 30px" /></td>
<td>
</tr>
<tr>
<td>{$lang_insert_table_rows}:</td>
<td align="right"><input type="text" name="numrows" value="" style="width: 30px" /></td>
</tr>
<tr>
<td><input type="button" id="insert" name="insert" value="{$lang_update}" onclick="mergeCells();"></td>
<td align="right"><input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="cancelAction();"></td>
</tr>
</table>
</fieldset>
</form>
</body>
</html>