Moving to root below branch label
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2005 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
139
source/web/scripts/tiny_mce/plugins/table/cell.htm
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
<html>
|
||||
<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">
|
||||
// Disable auto resize
|
||||
tinyMCE.getWindowArg('mce_windowresize', false);
|
||||
|
||||
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;
|
||||
args["bordercolor"] = document.forms[0].bordercolor.value;
|
||||
args["bgcolor"] = document.forms[0].bgcolor.value;
|
||||
|
||||
window.opener.tinyMCE.execCommand("mceTableCellProps", false, args);
|
||||
top.close();
|
||||
}
|
||||
}
|
||||
|
||||
function init() {
|
||||
if (tinyMCE.settings['table_color_fields']) {
|
||||
document.getElementById('colors').style.display = tinyMCE.isMSIE ? 'block' : 'table-row';
|
||||
TinyMCEPlugin_onLoad(); // Resize again
|
||||
}
|
||||
|
||||
document.forms[0].bordercolor.value = tinyMCE.getWindowArg('bordercolor');
|
||||
document.forms[0].bgcolor.value = tinyMCE.getWindowArg('bgcolor');
|
||||
|
||||
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');
|
||||
|
||||
// Autoresize and focus
|
||||
TinyMCEPopup_autoResize();
|
||||
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="200">
|
||||
<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> </td>
|
||||
<td> </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 id="colors" style="display: none">
|
||||
<td>{$lang_table_bordercolor}:</td>
|
||||
<td><input name="bordercolor" type="text" id="bordercolor" value="" size="9" maxlength="7"></td>
|
||||
<td>{$lang_table_bgcolor}:</td>
|
||||
<td><input name="bgcolor" type="text" id="bgcolor" value="" size="9" maxlength="7"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="button" id="insert" name="insert" value="{$lang_update}" 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>
|
2
source/web/scripts/tiny_mce/plugins/table/editor_plugin.js
vendored
Normal file
1141
source/web/scripts/tiny_mce/plugins/table/editor_plugin_src.js
vendored
Normal file
BIN
source/web/scripts/tiny_mce/plugins/table/images/buttons.gif
vendored
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
source/web/scripts/tiny_mce/plugins/table/images/table.gif
vendored
Normal file
After Width: | Height: | Size: 1018 B |
BIN
source/web/scripts/tiny_mce/plugins/table/images/table_cell_props.gif
vendored
Normal file
After Width: | Height: | Size: 369 B |
BIN
source/web/scripts/tiny_mce/plugins/table/images/table_delete_col.gif
vendored
Normal file
After Width: | Height: | Size: 929 B |
BIN
source/web/scripts/tiny_mce/plugins/table/images/table_delete_row.gif
vendored
Normal file
After Width: | Height: | Size: 942 B |
BIN
source/web/scripts/tiny_mce/plugins/table/images/table_insert_col_after.gif
vendored
Normal file
After Width: | Height: | Size: 936 B |
BIN
source/web/scripts/tiny_mce/plugins/table/images/table_insert_col_before.gif
vendored
Normal file
After Width: | Height: | Size: 935 B |
BIN
source/web/scripts/tiny_mce/plugins/table/images/table_insert_row_after.gif
vendored
Normal file
After Width: | Height: | Size: 928 B |
BIN
source/web/scripts/tiny_mce/plugins/table/images/table_insert_row_before.gif
vendored
Normal file
After Width: | Height: | Size: 928 B |
BIN
source/web/scripts/tiny_mce/plugins/table/images/table_merge_cells.gif
vendored
Normal file
After Width: | Height: | Size: 383 B |
BIN
source/web/scripts/tiny_mce/plugins/table/images/table_row_props.gif
vendored
Normal file
After Width: | Height: | Size: 367 B |
BIN
source/web/scripts/tiny_mce/plugins/table/images/table_split_cells.gif
vendored
Normal file
After Width: | Height: | Size: 396 B |
40
source/web/scripts/tiny_mce/plugins/table/langs/en.js
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
// UK lang variables
|
||||
|
||||
tinyMCELang['lang_table_desc'] = 'Inserts a new table';
|
||||
tinyMCELang['lang_table_insert_row_before_desc'] = 'Insert row before';
|
||||
tinyMCELang['lang_table_insert_row_after_desc'] = 'Insert row after';
|
||||
tinyMCELang['lang_table_delete_row_desc'] = 'Delete row';
|
||||
tinyMCELang['lang_table_insert_col_before_desc'] = 'Insert column before';
|
||||
tinyMCELang['lang_table_insert_col_after_desc'] = 'Insert column after';
|
||||
tinyMCELang['lang_table_delete_col_desc'] = 'Remove col';
|
||||
tinyMCELang['lang_insert_table_title'] = 'Insert/Modify table';
|
||||
tinyMCELang['lang_insert_table_width'] = 'Width';
|
||||
tinyMCELang['lang_insert_table_height'] = 'Height';
|
||||
tinyMCELang['lang_insert_table_cols'] = 'Columns';
|
||||
tinyMCELang['lang_insert_table_rows'] = 'Rows';
|
||||
tinyMCELang['lang_insert_table_cellspacing'] = 'Cellspacing';
|
||||
tinyMCELang['lang_insert_table_cellpadding'] = 'Cellpadding';
|
||||
tinyMCELang['lang_insert_table_border'] = 'Border';
|
||||
tinyMCELang['lang_insert_table_align'] = 'Alignment';
|
||||
tinyMCELang['lang_insert_table_align_default'] = 'Default';
|
||||
tinyMCELang['lang_insert_table_align_left'] = 'Left';
|
||||
tinyMCELang['lang_insert_table_align_right'] = 'Right';
|
||||
tinyMCELang['lang_insert_table_align_middle'] = 'Center';
|
||||
tinyMCELang['lang_insert_table_class'] = 'Class';
|
||||
tinyMCELang['lang_table_row_title'] = 'Table row properties';
|
||||
tinyMCELang['lang_table_cell_title'] = 'Table cell properties';
|
||||
tinyMCELang['lang_table_row_desc'] = 'Table row properties';
|
||||
tinyMCELang['lang_table_cell_desc'] = 'Table cell properties';
|
||||
tinyMCELang['lang_insert_table_valign'] = 'Vertical alignment';
|
||||
tinyMCELang['lang_insert_table_align_top'] = 'Top';
|
||||
tinyMCELang['lang_insert_table_align_bottom'] = 'Bottom';
|
||||
tinyMCELang['lang_table_props_desc'] = 'Table properties';
|
||||
tinyMCELang['lang_table_bordercolor'] = 'Border color';
|
||||
tinyMCELang['lang_table_bgcolor'] = 'Bg color';
|
||||
tinyMCELang['lang_table_merge_cells_title'] = 'Merge table cells';
|
||||
tinyMCELang['lang_table_split_cells_desc'] = 'Split table cells';
|
||||
tinyMCELang['lang_table_merge_cells_desc'] = 'Merge table cells';
|
||||
tinyMCELang['lang_table_cut_row_desc'] = 'Cut table row';
|
||||
tinyMCELang['lang_table_copy_row_desc'] = 'Copy table row';
|
||||
tinyMCELang['lang_table_paste_row_before_desc'] = 'Paste table row before';
|
||||
tinyMCELang['lang_table_paste_row_after_desc'] = 'Paste table row after';
|
60
source/web/scripts/tiny_mce/plugins/table/merge_cells.htm
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
<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">
|
||||
// Disable auto resize
|
||||
tinyMCE.getWindowArg('mce_windowresize', false);
|
||||
|
||||
function init() {
|
||||
var formObj = document.forms[0];
|
||||
|
||||
formObj.numcols.value = tinyMCE.getWindowArg('numcols', 1);
|
||||
formObj.numrows.value = tinyMCE.getWindowArg('numrows', 1);
|
||||
|
||||
// Autoresize and focus
|
||||
TinyMCEPopup_autoResize();
|
||||
window.focus();
|
||||
}
|
||||
|
||||
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);
|
||||
top.close();
|
||||
}
|
||||
}
|
||||
|
||||
function cancelAction() {
|
||||
top.close();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="window.focus();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>
|
44
source/web/scripts/tiny_mce/plugins/table/readme.txt
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
Table plugin for TinyMCE
|
||||
------------------------------
|
||||
|
||||
Installation instructions:
|
||||
* Copy the table directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins).
|
||||
* Add plugin to TinyMCE plugin option list example: plugins : "table".
|
||||
* Add the table button name to button list, example: theme_advanced_buttons3_add_before : "tablecontrols".
|
||||
|
||||
Initialization example:
|
||||
tinyMCE.init({
|
||||
theme : "advanced",
|
||||
mode : "textareas",
|
||||
plugins : "table",
|
||||
theme_advanced_buttons3_add_before : "tablecontrols"
|
||||
});
|
||||
|
||||
Table controls:
|
||||
tablecontrols All table control below and some separators between them.
|
||||
table Insert table control.
|
||||
row_props Edit row properties (tr).
|
||||
cell_props Edit cell properties (td).
|
||||
delete_col Delete column control.
|
||||
delete_row Delete row control.
|
||||
col_after Column after control.
|
||||
col_before Column before control.
|
||||
row_after Row after control.
|
||||
row_before Row before control.
|
||||
row_after Row after control.
|
||||
row_before Row before control.
|
||||
|
||||
Table plugin commands:
|
||||
mceInsertTable Inserts a new table at cursor location the default size is 2x2.
|
||||
If the value parameter is specified it should contain a name/value array,
|
||||
this array has the following options cols, rows, border, cellspacing, cellpadding.
|
||||
The default border is set to: 0.
|
||||
mceTableInsertRowBefore Inserts a row before/above the current cursor location.
|
||||
mceTableInsertRowAfter Inserts a row after/under the current cursor location.
|
||||
mceTableDeleteRow Deletes the row at the current cursor location.
|
||||
mceTableInsertColBefore Inserts a column before the current cursor location.
|
||||
mceTableInsertColAfter Inserts a column after the current cursor location.
|
||||
mceTableDeleteCol Deletes the column at the current cursor location.
|
||||
|
||||
Options:
|
||||
table_color_fields If set to true, tables dialogs will have color fields.
|
131
source/web/scripts/tiny_mce/plugins/table/row.htm
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>{$lang_table_row_title}</title>
|
||||
<script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
// Disable auto resize
|
||||
tinyMCE.getWindowArg('mce_windowresize', false);
|
||||
|
||||
function insertTable() {
|
||||
if (window.opener) {
|
||||
var args = new Array();
|
||||
|
||||
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;
|
||||
args["bordercolor"] = document.forms[0].bordercolor.value;
|
||||
args["bgcolor"] = document.forms[0].bgcolor.value;
|
||||
|
||||
window.opener.tinyMCE.execCommand("mceTableRowProps", false, args);
|
||||
top.close();
|
||||
}
|
||||
}
|
||||
|
||||
function init() {
|
||||
if (tinyMCE.settings['table_color_fields']) {
|
||||
document.getElementById('colors').style.display = tinyMCE.isMSIE ? 'block' : 'table-row';
|
||||
TinyMCEPlugin_onLoad(); // Resize again
|
||||
}
|
||||
|
||||
document.forms[0].bordercolor.value = tinyMCE.getWindowArg('bordercolor');
|
||||
document.forms[0].bgcolor.value = tinyMCE.getWindowArg('bgcolor');
|
||||
|
||||
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.height.value = tinyMCE.getWindowArg('height');
|
||||
|
||||
// Autoresize and focus
|
||||
TinyMCEPopup_autoResize();
|
||||
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="200">
|
||||
<tr>
|
||||
<td align="center" valign="middle"><table border="0" cellpadding="4" cellspacing="0">
|
||||
<tr>
|
||||
<td colspan="4" class="title">{$lang_table_row_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>{$lang_insert_table_height}: </td>
|
||||
<td><input name="height" type="text" id="height" value="" size="4" maxlength="4" /></td>
|
||||
</tr>
|
||||
<tr id="colors" style="display: none">
|
||||
<td>{$lang_table_bordercolor}:</td>
|
||||
<td><input name="bordercolor" type="text" id="bordercolor" value="" size="9" maxlength="7"></td>
|
||||
<td>{$lang_table_bgcolor}:</td>
|
||||
<td><input name="bgcolor" type="text" id="bgcolor" value="" size="9" maxlength="7"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="button" id="insert" name="insert" value="{$lang_update}" 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>
|
156
source/web/scripts/tiny_mce/plugins/table/table.htm
vendored
Normal file
@@ -0,0 +1,156 @@
|
||||
<html>
|
||||
<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">
|
||||
// Disable auto resize
|
||||
tinyMCE.getWindowArg('mce_windowresize', false);
|
||||
|
||||
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["bordercolor"] = document.forms[0].bordercolor.value;
|
||||
args["bgcolor"] = document.forms[0].bgcolor.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() {
|
||||
if (tinyMCE.settings['table_color_fields']) {
|
||||
document.getElementById('colors').style.display = tinyMCE.isMSIE ? 'block' : 'table-row';
|
||||
TinyMCEPlugin_onLoad(); // Resize again
|
||||
}
|
||||
|
||||
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.bordercolor.value = tinyMCE.getWindowArg('bordercolor');
|
||||
formObj.bgcolor.value = tinyMCE.getWindowArg('bgcolor');
|
||||
formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true);
|
||||
|
||||
// Autoresize and focus
|
||||
TinyMCEPopup_autoResize();
|
||||
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="200">
|
||||
<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 id="colors" style="display: none">
|
||||
<td>{$lang_table_bordercolor}:</td>
|
||||
<td><input name="bordercolor" type="text" id="bordercolor" value="" size="9" maxlength="7"></td>
|
||||
<td>{$lang_table_bgcolor}:</td>
|
||||
<td><input name="bgcolor" type="text" id="bgcolor" value="" size="9" maxlength="7"></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>
|