This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/includes/tinymce/jscripts/tiny_mce/plugins/table/cell.htm
2008-11-26 14:50:40 -08:00

121 lines
4.7 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_table_cell_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["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["valign"] = document.forms[0].valign.options[document.forms[0].valign.selectedIndex].value;
args["className"] = document.forms[0].styleSelect.options[document.forms[0].styleSelect.selectedIndex].value;
window.opener.tinyMCE.execCommand("mceTableCellProps", 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;
}
for (var i=0; i<document.forms[0].valign.options.length; i++) {
if (document.forms[0].valign.options[i].value == tinyMCE.getWindowArg('valign'))
document.forms[0].valign.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;
}
}
var formObj = document.forms[0];
formObj.width.value = tinyMCE.getWindowArg('width');
formObj.height.value = tinyMCE.getWindowArg('height');
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_table_cell_title}</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_class}:</td>
<td><select name="styleSelect">
<option value="" selected="selected">-- {$lang_theme_style_select} --</option>
</select></td>
</tr>
<tr>
<td>{$lang_insert_table_valign}:</td>
<td><select name="valign">
<option value="">{$lang_insert_table_align_default}</option>
<option value="top">{$lang_insert_table_align_top}</option>
<option value="middle">{$lang_insert_table_align_middle}</option>
<option value="bottom">{$lang_insert_table_align_bottom}</option>
</select></td>
<td>&nbsp;</td>
<td>&nbsp;</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><input type="button" id="insert" name="insert" value="{$lang_update}" onclick="insertTable();"></td>
<td align="right">&nbsp;</td>
<td align="right">&nbsp;</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>