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
This commit is contained in:
Derek Hulley
2005-12-08 07:13:07 +00:00
commit d051d1153c
920 changed files with 98871 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
/* Import plugin specific language pack */
tinyMCE.importPluginLanguagePack('fullscreen','en,sv');function TinyMCE_fullscreen_getControlHTML(control_name){switch(control_name){case "fullscreen":return '<img id="{$editor_id}_fullscreen" src="{$pluginurl}/images/fullscreen.gif" title="{$lang_fullscreen_desc}" width="20" height="20" class="mceButton'+(tinyMCE.getParam('fullscreen_is_enabled')?'Selected':'Normal')+'" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceFullScreen\');" />';}return "";}function TinyMCE_fullscreen_execCommand(editor_id,element,command,user_interface,value){switch(command){case "mceFullScreen":if(tinyMCE.getParam('fullscreen_is_enabled')){window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'),'mceSetContent',false,tinyMCE.getContent(editor_id));top.close();}else{tinyMCE.setWindowArg('editor_id',editor_id);var win=window.open(tinyMCE.baseURL+"/plugins/fullscreen/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);}return true;}return false;}

View File

@@ -0,0 +1,34 @@
/* Import plugin specific language pack */
tinyMCE.importPluginLanguagePack('fullscreen', 'en,sv');
function TinyMCE_fullscreen_getControlHTML(control_name) {
switch (control_name) {
case "fullscreen":
return '<img id="{$editor_id}_fullscreen" src="{$pluginurl}/images/fullscreen.gif" title="{$lang_fullscreen_desc}" width="20" height="20" class="mceButton' + (tinyMCE.getParam('fullscreen_is_enabled') ? 'Selected' : 'Normal') + '" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceFullScreen\');" />';
}
return "";
}
function TinyMCE_fullscreen_execCommand(editor_id, element, command, user_interface, value) {
// Handle commands
switch (command) {
case "mceFullScreen":
if (tinyMCE.getParam('fullscreen_is_enabled')) {
// In fullscreen mode
window.opener.tinyMCE.execInstanceCommand(tinyMCE.getParam('fullscreen_editor_id'), 'mceSetContent', false, tinyMCE.getContent(editor_id));
top.close();
} else {
tinyMCE.setWindowArg('editor_id', editor_id);
var win = window.open(tinyMCE.baseURL + "/plugins/fullscreen/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight);
}
return true;
}
// Pass to next handler in chain
return false;
}

View File

@@ -0,0 +1,43 @@
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script language="javascript" type="text/javascript" src="../../tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
var settings = new Array();
// Clone array
for (var name in window.opener.tinyMCE.settings)
settings[name] = window.opener.tinyMCE.settings[name];
// Set options
settings['mode'] = 'exact';
settings['elements'] = 'fullscreenarea';
settings['ask'] = false;
settings['setupcontent_callback'] = 'setupContent';
settings['fullscreen_is_enabled'] = true;
settings['fullscreen_editor_id'] = window.opener.tinyMCE.getWindowArg("editor_id");
// Init
tinyMCE.init(settings);
function setupContent(editor_id, body, doc) {
var inst = tinyMCE.getInstanceById(editor_id);
var backInst = window.opener.tinyMCE.getInstanceById(tinyMCE.getParam('fullscreen_editor_id'));
// Setup title
var divElm = document.createElement("div");
divElm.innerHTML = tinyMCELang['lang_fullscreen_title'];
document.title = divElm.innerHTML;
// Get content
inst.getBody().innerHTML = backInst.getBody().innerHTML;
}
</script>
</head>
<body style="margin: 0px; overflow: hidden;" scrolling="no" scroll="no" onload="window.focus();">
<textarea id="fullscreenarea" style="width: 100%; height: 100%"></textarea>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B

View File

@@ -0,0 +1,4 @@
// UK lang variables
tinyMCELang['lang_fullscreen_title'] = 'Fullscreen mode'
tinyMCELang['lang_fullscreen_desc'] = 'Toggle fullscreen mode'

View File

@@ -0,0 +1,17 @@
Fullscreen plugin for TinyMCE
------------------------------
This plugin adds fullscreen mode to TinyMCE.
Installation instructions:
* Add plugin to TinyMCE plugin option list example: plugins : "fullscreen".
* Add the fullscreen button name to button list, example: theme_advanced_buttons3_add : "fullscreen".
Initialization example:
tinyMCE.init({
theme : "advanced",
mode : "textareas",
plugins : "fullscreen",
theme_advanced_buttons3_add : "fullscreen",
plaintext_create_paragraphs : false
});

View File

@@ -0,0 +1,2 @@
/* Import plugin specific language pack */
tinyMCE.importPluginLanguagePack('iespell','cs,el,en,fr_ca,it,ko,sv,zh_cn,fr,de,pl');function TinyMCE_iespell_getControlHTML(control_name){if(control_name=="iespell"&&tinyMCE.isMSIE)return '<img id="{$editor_id}_iespell" src="{$pluginurl}/images/iespell.gif" title="{$lang_iespell_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceIESpell\');">';return "";}function TinyMCE_iespell_execCommand(editor_id,element,command,user_interface,value){if(command=="mceIESpell"){try{var ieSpell=new ActiveXObject("ieSpell.ieSpellExtension");ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement);}catch(e){if(e.number==-2146827859){if(confirm(tinyMCE.getLang("lang_iespell_download","",true)))window.open('http://www.iespell.com/download.php','ieSpellDownload','');}else alert("Error Loading ieSpell: Exception "+e.number);}return true;}return false;}

View File

@@ -0,0 +1,37 @@
/* Import plugin specific language pack */
tinyMCE.importPluginLanguagePack('iespell', 'cs,el,en,fr_ca,it,ko,sv,zh_cn,fr,de,pl');
/**
* Returns the HTML contents of the iespell control.
*/
function TinyMCE_iespell_getControlHTML(control_name) {
// Is it the iespell control and is the brower MSIE.
if (control_name == "iespell" && tinyMCE.isMSIE)
return '<img id="{$editor_id}_iespell" src="{$pluginurl}/images/iespell.gif" title="{$lang_iespell_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" onclick="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceIESpell\');">';
return "";
}
/**
* Executes the mceIESpell command.
*/
function TinyMCE_iespell_execCommand(editor_id, element, command, user_interface, value) {
// Handle ieSpellCommand
if (command == "mceIESpell") {
try {
var ieSpell = new ActiveXObject("ieSpell.ieSpellExtension");
ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement);
} catch (e) {
if (e.number == -2146827859) {
if (confirm(tinyMCE.getLang("lang_iespell_download", "", true)))
window.open('http://www.iespell.com/download.php', 'ieSpellDownload', '');
} else
alert("Error Loading ieSpell: Exception " + e.number);
}
return true;
}
// Pass to next handler in chain
return false;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

View File

@@ -0,0 +1,4 @@
// UK lang variables
tinyMCELang['lang_iespell_desc'] = 'Run spell checking';
tinyMCELang['lang_iespell_download'] = "ieSpell not detected. Click OK to go to download page."

View File

@@ -0,0 +1,20 @@
ieSpell plugin for TinyMCE
----------------------------
Installation instructions:
* Copy the iespell directory to the plugins directory of TinyMCE (/jscripts/tiny_mce/plugins).
* Add plugin to TinyMCE plugin option list example: plugins : "iespell".
* Add the iespell button name to button list, example: theme_advanced_buttons3_add : "iespell".
Initialization example:
tinyMCE.init({
theme : "advanced",
mode : "textareas",
plugins : "iespell",
theme_advanced_buttons3_add : "iespell"
});
Requirements:
The end user will need MSIE on Windows with the ieSpell installed. This can be downloaded
from http://www.iespell.com/download.php. Notice on other browsers than MSIE the spellchecking
button will not be visible.

View File

@@ -0,0 +1 @@
This is the location you place TinyMCE plugins.

View 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>&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 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">&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>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1018 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 929 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 942 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 936 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 935 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 928 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 928 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

View 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';

View 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>

View 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.

View 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">&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>

View 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">&nbsp;</td>
<td align="right">&nbsp;</td>
</tr>
<tr>
<td><input type="button" id="insert" name="insert" value="{$lang_insert}" 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>