Update TinyMCE to 3.5.3, enable stripping of Word styles on paste

This commit is contained in:
grahamtriggs 2015-10-14 22:17:16 +01:00
parent 83404c2c80
commit 48790b7525
274 changed files with 25268 additions and 14504 deletions

40
webapp/web/js/tiny_mce/plugins/table/cell.htm vendored Executable file → Normal file
View file

@ -5,17 +5,17 @@
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="../../utils/mctabs.js"></script>
<script type="text/javascript" src="../../utils/form_utils.js"></script>
<script type="text/javascript" src="../../utils/validate.js"></script>
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
<script type="text/javascript" src="js/cell.js"></script>
<link href="css/cell.css" rel="stylesheet" type="text/css" />
<base target="_self" />
</head>
<body id="tablecell" style="display: none">
<body id="tablecell" style="display: none" role="application">
<form onsubmit="updateAction();return false;" action="#">
<div class="tabs">
<ul>
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
</ul>
</div>
@ -24,7 +24,7 @@
<fieldset>
<legend>{#table_dlg.general_props}</legend>
<table border="0" cellpadding="4" cellspacing="0">
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
<tr>
<td><label for="align">{#table_dlg.align}</label></td>
<td>
@ -71,10 +71,10 @@
<tr>
<td><label for="width">{#table_dlg.width}</label></td>
<td><input id="width" name="width" type="text" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
<td><input id="width" name="width" type="text" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
<td><label for="height">{#table_dlg.height}</label></td>
<td><input id="height" name="height" type="text" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
<td><input id="height" name="height" type="text" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
</tr>
<tr id="styleSelectRow">
@ -93,7 +93,7 @@
<fieldset>
<legend>{#table_dlg.advanced_props}</legend>
<table border="0" cellpadding="0" cellspacing="4">
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
<tr>
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
<td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
@ -125,7 +125,7 @@
<tr>
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
<td>
<table border="0" cellpadding="0" cellspacing="0">
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
<td id="backgroundimagebrowsercontainer">&nbsp;</td>
@ -134,10 +134,10 @@
</td>
</tr>
<tr>
<td class="column1"><label for="bordercolor">{#table_dlg.bordercolor}</label></td>
<tr role="group" aria-labelledby="bordercolor_label">
<td class="column1"><label id="bordercolor_label" for="bordercolor">{#table_dlg.bordercolor}</label></td>
<td>
<table border="0" cellpadding="0" cellspacing="0">
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
<td id="bordercolor_pickcontainer">&nbsp;</td>
@ -146,10 +146,10 @@
</td>
</tr>
<tr>
<td class="column1"><label for="bgcolor">{#table_dlg.bgcolor}</label></td>
<tr role="group" aria-labelledby="bgcolor_label">
<td class="column1"><label id="bgcolor_label" for="bgcolor">{#table_dlg.bgcolor}</label></td>
<td>
<table border="0" cellpadding="0" cellspacing="0">
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
<td id="bgcolor_pickcontainer">&nbsp;</td>
@ -167,17 +167,13 @@
<select id="action" name="action">
<option value="cell">{#table_dlg.cell_cell}</option>
<option value="row">{#table_dlg.cell_row}</option>
<option value="col">{#table_dlg.cell_col}</option>
<option value="all">{#table_dlg.cell_all}</option>
</select>
</div>
<div style="float: left">
<div><input type="submit" id="insert" name="insert" value="{#update}" /></div>
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<input type="submit" id="insert" name="insert" value="{#update}" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>

0
webapp/web/js/tiny_mce/plugins/table/css/cell.css vendored Executable file → Normal file
View file

0
webapp/web/js/tiny_mce/plugins/table/css/row.css vendored Executable file → Normal file
View file

0
webapp/web/js/tiny_mce/plugins/table/css/table.css vendored Executable file → Normal file
View file

2
webapp/web/js/tiny_mce/plugins/table/editor_plugin.js vendored Executable file → Normal file

File diff suppressed because one or more lines are too long

2401
webapp/web/js/tiny_mce/plugins/table/editor_plugin_src.js vendored Executable file → Normal file

File diff suppressed because it is too large Load diff

137
webapp/web/js/tiny_mce/plugins/table/js/cell.js vendored Executable file → Normal file
View file

@ -11,7 +11,7 @@ function init() {
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor')
var inst = ed;
var tdElm = ed.dom.getParent(ed.selection.getNode(), "td,th");
var tdElm = ed.dom.getParent(ed.selection.getStart(), "td,th");
var formObj = document.forms[0];
var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style"));
@ -24,7 +24,7 @@ function init() {
var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor'));
var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor'));
var className = ed.dom.getAttrib(tdElm, 'class');
var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");;
var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
var id = ed.dom.getAttrib(tdElm, 'id');
var lang = ed.dom.getAttrib(tdElm, 'lang');
var dir = ed.dom.getAttrib(tdElm, 'dir');
@ -34,58 +34,81 @@ function init() {
addClassesToList('class', 'table_cell_styles');
TinyMCE_EditableSelects.init();
formObj.bordercolor.value = bordercolor;
formObj.bgcolor.value = bgcolor;
formObj.backgroundimage.value = backgroundimage;
formObj.width.value = width;
formObj.height.value = height;
formObj.id.value = id;
formObj.lang.value = lang;
formObj.style.value = ed.dom.serializeStyle(st);
selectByValue(formObj, 'align', align);
selectByValue(formObj, 'valign', valign);
selectByValue(formObj, 'class', className, true, true);
selectByValue(formObj, 'celltype', celltype);
selectByValue(formObj, 'dir', dir);
selectByValue(formObj, 'scope', scope);
if (!ed.dom.hasClass(tdElm, 'mceSelected')) {
formObj.bordercolor.value = bordercolor;
formObj.bgcolor.value = bgcolor;
formObj.backgroundimage.value = backgroundimage;
formObj.width.value = width;
formObj.height.value = height;
formObj.id.value = id;
formObj.lang.value = lang;
formObj.style.value = ed.dom.serializeStyle(st);
selectByValue(formObj, 'align', align);
selectByValue(formObj, 'valign', valign);
selectByValue(formObj, 'class', className, true, true);
selectByValue(formObj, 'celltype', celltype);
selectByValue(formObj, 'dir', dir);
selectByValue(formObj, 'scope', scope);
// Resize some elements
if (isVisible('backgroundimagebrowser'))
document.getElementById('backgroundimage').style.width = '180px';
// Resize some elements
if (isVisible('backgroundimagebrowser'))
document.getElementById('backgroundimage').style.width = '180px';
updateColor('bordercolor_pick', 'bordercolor');
updateColor('bgcolor_pick', 'bgcolor');
updateColor('bordercolor_pick', 'bordercolor');
updateColor('bgcolor_pick', 'bgcolor');
} else
tinyMCEPopup.dom.hide('action');
}
function updateAction() {
var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0];
if (!AutoValidator.validate(formObj)) {
tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
return false;
}
tinyMCEPopup.restoreSelection();
el = ed.selection.getNode();
el = ed.selection.getStart();
tdElm = ed.dom.getParent(el, "td,th");
trElm = ed.dom.getParent(el, "tr");
tableElm = ed.dom.getParent(el, "table");
ed.execCommand('mceBeginUndoLevel');
// Cell is selected
if (ed.dom.hasClass(tdElm, 'mceSelected')) {
// Update all selected sells
tinymce.each(ed.dom.select('td.mceSelected,th.mceSelected'), function(td) {
updateCell(td);
});
ed.addVisual();
ed.nodeChanged();
inst.execCommand('mceEndUndoLevel');
tinyMCEPopup.close();
return;
}
switch (getSelectValue(formObj, 'action')) {
case "cell":
var celltype = getSelectValue(formObj, 'celltype');
var scope = getSelectValue(formObj, 'scope');
if (ed.getParam("accessibility_warnings", 1)) {
if (celltype == "th" && scope == "") {
tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), function(s) {
if (s) {
updateCell(tdElm);
function doUpdate(s) {
if (s) {
updateCell(tdElm);
ed.addVisual();
ed.nodeChanged();
inst.execCommand('mceEndUndoLevel');
tinyMCEPopup.close();
}
});
ed.addVisual();
ed.nodeChanged();
inst.execCommand('mceEndUndoLevel');
tinyMCEPopup.close();
}
};
if (ed.getParam("accessibility_warnings", 1)) {
if (celltype == "th" && scope == "")
tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), doUpdate);
else
doUpdate(1);
return;
}
@ -105,6 +128,36 @@ function updateAction() {
break;
case "col":
var curr, col = 0, cell = trElm.firstChild, rows = tableElm.getElementsByTagName("tr");
if (cell.nodeName != "TD" && cell.nodeName != "TH")
cell = nextCell(cell);
do {
if (cell == tdElm)
break;
col += cell.getAttribute("colspan")?cell.getAttribute("colspan"):1;
} while ((cell = nextCell(cell)) != null);
for (var i=0; i<rows.length; i++) {
cell = rows[i].firstChild;
if (cell.nodeName != "TD" && cell.nodeName != "TH")
cell = nextCell(cell);
curr = 0;
do {
if (curr == col) {
cell = updateCell(cell, true);
break;
}
curr += cell.getAttribute("colspan")?cell.getAttribute("colspan"):1;
} while ((cell = nextCell(cell)) != null);
}
break;
case "all":
var rows = tableElm.getElementsByTagName("tr");
@ -146,15 +199,15 @@ function updateCell(td, skip_id) {
var dom = ed.dom;
if (!skip_id)
td.setAttribute('id', formObj.id.value);
dom.setAttrib(td, 'id', formObj.id.value);
td.setAttribute('align', formObj.align.value);
td.setAttribute('vAlign', formObj.valign.value);
td.setAttribute('lang', formObj.lang.value);
td.setAttribute('dir', getSelectValue(formObj, 'dir'));
td.setAttribute('style', ed.dom.serializeStyle(ed.dom.parseStyle(formObj.style.value)));
td.setAttribute('scope', formObj.scope.value);
ed.dom.setAttrib(td, 'class', getSelectValue(formObj, 'class'));
dom.setAttrib(td, 'align', formObj.align.value);
dom.setAttrib(td, 'vAlign', formObj.valign.value);
dom.setAttrib(td, 'lang', formObj.lang.value);
dom.setAttrib(td, 'dir', getSelectValue(formObj, 'dir'));
dom.setAttrib(td, 'style', ed.dom.serializeStyle(ed.dom.parseStyle(formObj.style.value)));
dom.setAttrib(td, 'scope', formObj.scope.value);
dom.setAttrib(td, 'class', getSelectValue(formObj, 'class'));
// Clear deprecated attributes
ed.dom.setAttrib(td, 'width', '');

38
webapp/web/js/tiny_mce/plugins/table/js/merge_cells.js vendored Executable file → Normal file
View file

@ -1,29 +1,27 @@
tinyMCEPopup.requireLangPack();
function init() {
var f = document.forms[0], v;
var MergeCellsDialog = {
init : function() {
var f = document.forms[0];
tinyMCEPopup.resizeToInnerSize();
f.numcols.value = tinyMCEPopup.getWindowArg('cols', 1);
f.numrows.value = tinyMCEPopup.getWindowArg('rows', 1);
},
f.numcols.value = tinyMCEPopup.getWindowArg('numcols', 1);
f.numrows.value = tinyMCEPopup.getWindowArg('numrows', 1);
}
merge : function() {
var func, f = document.forms[0];
function mergeCells() {
var args = [], f = document.forms[0];
tinyMCEPopup.restoreSelection();
tinyMCEPopup.restoreSelection();
func = tinyMCEPopup.getWindowArg('onaction');
if (!AutoValidator.validate(f)) {
tinyMCEPopup.alert(tinyMCEPopup.getLang('invalid_data'));
return false;
func({
cols : f.numcols.value,
rows : f.numrows.value
});
tinyMCEPopup.close();
}
};
args["numcols"] = f.numcols.value;
args["numrows"] = f.numrows.value;
tinyMCEPopup.execCommand("mceTableMergeCells", false, args);
tinyMCEPopup.close();
}
tinyMCEPopup.onInit.add(init);
tinyMCEPopup.onInit.add(MergeCellsDialog.init, MergeCellsDialog);

122
webapp/web/js/tiny_mce/plugins/table/js/row.js vendored Executable file → Normal file
View file

@ -8,7 +8,7 @@ function init() {
var inst = tinyMCEPopup.editor;
var dom = inst.dom;
var trElm = dom.getParent(inst.selection.getNode(), "tr");
var trElm = dom.getParent(inst.selection.getStart(), "tr");
var formObj = document.forms[0];
var st = dom.parseStyle(dom.getAttrib(trElm, "style"));
@ -19,43 +19,72 @@ function init() {
var height = trimSize(getStyle(trElm, 'height', 'height'));
var className = dom.getAttrib(trElm, 'class');
var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor'));
var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");;
var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
var id = dom.getAttrib(trElm, 'id');
var lang = dom.getAttrib(trElm, 'lang');
var dir = dom.getAttrib(trElm, 'dir');
// Setup form
addClassesToList('class', 'table_row_styles');
TinyMCE_EditableSelects.init();
formObj.bgcolor.value = bgcolor;
formObj.backgroundimage.value = backgroundimage;
formObj.height.value = height;
formObj.id.value = id;
formObj.lang.value = lang;
formObj.style.value = dom.serializeStyle(st);
selectByValue(formObj, 'align', align);
selectByValue(formObj, 'valign', valign);
selectByValue(formObj, 'class', className, true, true);
selectByValue(formObj, 'rowtype', rowtype);
selectByValue(formObj, 'dir', dir);
setActionforRowType(formObj, rowtype);
// Resize some elements
if (isVisible('backgroundimagebrowser'))
document.getElementById('backgroundimage').style.width = '180px';
// Any cells selected
if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) {
// Setup form
addClassesToList('class', 'table_row_styles');
TinyMCE_EditableSelects.init();
updateColor('bgcolor_pick', 'bgcolor');
formObj.bgcolor.value = bgcolor;
formObj.backgroundimage.value = backgroundimage;
formObj.height.value = height;
formObj.id.value = id;
formObj.lang.value = lang;
formObj.style.value = dom.serializeStyle(st);
selectByValue(formObj, 'align', align);
selectByValue(formObj, 'valign', valign);
selectByValue(formObj, 'class', className, true, true);
selectByValue(formObj, 'dir', dir);
// Resize some elements
if (isVisible('backgroundimagebrowser'))
document.getElementById('backgroundimage').style.width = '180px';
updateColor('bgcolor_pick', 'bgcolor');
} else
tinyMCEPopup.dom.hide('action');
}
function updateAction() {
var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0];
var action = getSelectValue(formObj, 'action');
tinyMCEPopup.restoreSelection();
trElm = dom.getParent(inst.selection.getNode(), "tr");
tableElm = dom.getParent(inst.selection.getNode(), "table");
if (!AutoValidator.validate(formObj)) {
tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
return false;
}
inst.execCommand('mceBeginUndoLevel');
tinyMCEPopup.restoreSelection();
trElm = dom.getParent(inst.selection.getStart(), "tr");
tableElm = dom.getParent(inst.selection.getStart(), "table");
// Update all selected rows
if (dom.select('td.mceSelected,th.mceSelected', trElm).length > 0) {
tinymce.each(tableElm.rows, function(tr) {
var i;
for (i = 0; i < tr.cells.length; i++) {
if (dom.hasClass(tr.cells[i], 'mceSelected')) {
updateRow(tr, true);
return;
}
}
});
inst.addVisual();
inst.nodeChanged();
inst.execCommand('mceEndUndoLevel');
tinyMCEPopup.close();
return;
}
switch (action) {
case "row":
@ -98,19 +127,19 @@ function updateRow(tr_elm, skip_id, skip_parent) {
// Update row element
if (!skip_id)
tr_elm.setAttribute('id', formObj.id.value);
dom.setAttrib(tr_elm, 'id', formObj.id.value);
tr_elm.setAttribute('align', getSelectValue(formObj, 'align'));
tr_elm.setAttribute('vAlign', getSelectValue(formObj, 'valign'));
tr_elm.setAttribute('lang', formObj.lang.value);
tr_elm.setAttribute('dir', getSelectValue(formObj, 'dir'));
tr_elm.setAttribute('style', dom.serializeStyle(dom.parseStyle(formObj.style.value)));
dom.setAttrib(tr_elm, 'align', getSelectValue(formObj, 'align'));
dom.setAttrib(tr_elm, 'vAlign', getSelectValue(formObj, 'valign'));
dom.setAttrib(tr_elm, 'lang', formObj.lang.value);
dom.setAttrib(tr_elm, 'dir', getSelectValue(formObj, 'dir'));
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(formObj.style.value)));
dom.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class'));
// Clear deprecated attributes
tr_elm.setAttribute('background', '');
tr_elm.setAttribute('bgColor', '');
tr_elm.setAttribute('height', '');
dom.setAttrib(tr_elm, 'background', '');
dom.setAttrib(tr_elm, 'bgColor', '');
dom.setAttrib(tr_elm, 'height', '');
// Set styles
tr_elm.style.height = getCSSSize(formObj.height.value);
@ -138,13 +167,10 @@ function updateRow(tr_elm, skip_id, skip_parent) {
if (newParent == null) {
newParent = doc.createElement(dest);
if (dest == "thead") {
if (theTable.firstChild.nodeName == 'CAPTION')
inst.dom.insertAfter(newParent, theTable.firstChild);
else
theTable.insertBefore(newParent, theTable.firstChild);
} else
theTable.appendChild(newParent);
if (theTable.firstChild.nodeName == 'CAPTION')
inst.dom.insertAfter(newParent, theTable.firstChild);
else
theTable.insertBefore(newParent, theTable.firstChild);
}
// append the row to the new parent
@ -209,4 +235,20 @@ function changedColor() {
formObj.style.value = dom.serializeStyle(st);
}
function changedRowType() {
var formObj = document.forms[0];
var rowtype = getSelectValue(formObj, 'rowtype');
setActionforRowType(formObj, rowtype);
}
function setActionforRowType(formObj, rowtype) {
if (rowtype === "tbody") {
formObj.action.disabled = false;
} else {
selectByValue(formObj, 'action', "row");
formObj.action.disabled = true;
}
}
tinyMCEPopup.onInit.add(init);

155
webapp/web/js/tiny_mce/plugins/table/js/table.js vendored Executable file → Normal file
View file

@ -12,7 +12,7 @@ function insertTable() {
tinyMCEPopup.restoreSelection();
if (!AutoValidator.validate(formObj)) {
tinyMCEPopup.alert(inst.getLang('invalid_data'));
tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
return false;
}
@ -21,17 +21,17 @@ function insertTable() {
// Get form data
cols = formObj.elements['cols'].value;
rows = formObj.elements['rows'].value;
border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0;
border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0;
cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : "";
cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : "";
align = formObj.elements['align'].options[formObj.elements['align'].selectedIndex].value;
frame = formObj.elements['frame'].options[formObj.elements['frame'].selectedIndex].value;
rules = formObj.elements['rules'].options[formObj.elements['rules'].selectedIndex].value;
align = getSelectValue(formObj, "align");
frame = getSelectValue(formObj, "tframe");
rules = getSelectValue(formObj, "rules");
width = formObj.elements['width'].value;
height = formObj.elements['height'].value;
bordercolor = formObj.elements['bordercolor'].value;
bgcolor = formObj.elements['bgcolor'].value;
className = formObj.elements['class'].options[formObj.elements['class'].selectedIndex].value;
className = getSelectValue(formObj, "class");
id = formObj.elements['id'].value;
summary = formObj.elements['summary'].value;
style = formObj.elements['style'].value;
@ -58,11 +58,21 @@ function insertTable() {
// Update table
if (action == "update") {
inst.execCommand('mceBeginUndoLevel');
dom.setAttrib(elm, 'cellPadding', cellpadding, true);
dom.setAttrib(elm, 'cellSpacing', cellspacing, true);
dom.setAttrib(elm, 'border', border);
if (!isCssSize(border)) {
dom.setAttrib(elm, 'border', border);
} else {
dom.setAttrib(elm, 'border', '');
}
if (border == '') {
dom.setStyle(elm, 'border-width', '');
dom.setStyle(elm, 'border', '');
dom.setAttrib(elm, 'border', '');
}
dom.setAttrib(elm, 'align', align);
dom.setAttrib(elm, 'frame', frame);
dom.setAttrib(elm, 'rules', rules);
@ -81,13 +91,13 @@ function insertTable() {
if (!capEl && caption) {
capEl = elm.ownerDocument.createElement('caption');
if (!tinymce.isIE)
capEl.innerHTML = '<br mce_bogus="1"/>';
if (!tinymce.isIE || tinymce.isIE11)
capEl.innerHTML = '<br data-mce-bogus="1"/>';
elm.insertBefore(capEl, elm.firstChild);
}
if (width && /(pt|em|cm)$/.test(width)) {
if (width && inst.settings.inline_styles) {
dom.setStyle(elm, 'width', width);
dom.setAttrib(elm, 'width', '');
} else {
@ -100,10 +110,13 @@ function insertTable() {
dom.setAttrib(elm, 'bgColor', '');
dom.setAttrib(elm, 'background', '');
if (height) {
if (height && inst.settings.inline_styles) {
dom.setStyle(elm, 'height', height);
dom.setAttrib(elm, 'height', '');
}
} else {
dom.setAttrib(elm, 'height', height, true);
dom.setStyle(elm, 'height', '');
}
if (background != '')
elm.style.backgroundImage = "url('" + background + "')";
@ -118,7 +131,7 @@ function insertTable() {
if (bordercolor != "") {
elm.style.borderColor = bordercolor;
elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle;
elm.style.borderWidth = border == "" ? "1px" : border;
elm.style.borderWidth = cssSize(border);
} else
elm.style.borderColor = '';
@ -131,7 +144,7 @@ function insertTable() {
//elm.outerHTML = elm.outerHTML;
inst.nodeChanged();
inst.execCommand('mceEndUndoLevel');
inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true});
// Repaint if dimensions changed
if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight)
@ -145,14 +158,22 @@ function insertTable() {
html += '<table';
html += makeAttrib('id', id);
html += makeAttrib('border', border);
if (!isCssSize(border)) {
html += makeAttrib('border', border);
}
html += makeAttrib('cellpadding', cellpadding);
html += makeAttrib('cellspacing', cellspacing);
html += makeAttrib('data-mce-new', '1');
if (width && /(pt|em|cm)$/.test(width)) {
if (width && inst.settings.inline_styles) {
if (style)
style += '; ';
// Force px
if (/^[0-9\.]+$/.test(width))
width += 'px';
style += 'width: ' + width;
} else
html += makeAttrib('width', width);
@ -178,8 +199,8 @@ function insertTable() {
html += '>';
if (caption) {
if (!tinymce.isIE)
html += '<caption><br mce_bogus="1"/></caption>';
if (!tinymce.isIE || tinymce.isIE11)
html += '<caption><br data-mce-bogus="1"/></caption>';
else
html += '<caption></caption>';
}
@ -188,8 +209,8 @@ function insertTable() {
html += "<tr>";
for (var x=0; x<cols; x++) {
if (!tinymce.isIE)
html += '<td><br mce_bogus="1"/></td>';
if (!tinymce.isIE || tinymce.isIE11)
html += '<td><br data-mce-bogus="1"/></td>';
else
html += '<td></td>';
}
@ -199,10 +220,51 @@ function insertTable() {
html += "</table>";
inst.execCommand('mceBeginUndoLevel');
inst.execCommand('mceInsertContent', false, html);
// Move table
if (inst.settings.fix_table_elements) {
var patt = '';
inst.focus();
inst.selection.setContent('<br class="_mce_marker" />');
tinymce.each('h1,h2,h3,h4,h5,h6,p'.split(','), function(n) {
if (patt)
patt += ',';
patt += n + ' ._mce_marker';
});
tinymce.each(inst.dom.select(patt), function(n) {
inst.dom.split(inst.dom.getParent(n, 'h1,h2,h3,h4,h5,h6,p'), n);
});
dom.setOuterHTML(dom.select('br._mce_marker')[0], html);
} else
inst.execCommand('mceInsertContent', false, html);
tinymce.each(dom.select('table[data-mce-new]'), function(node) {
var tdorth = dom.select('td,th', node);
// Fixes a bug in IE where the caret cannot be placed after the table if the table is at the end of the document
if (tinymce.isIE && !tinymce.isIE11 && node.nextSibling == null) {
if (inst.settings.forced_root_block)
dom.insertAfter(dom.create(inst.settings.forced_root_block), node);
else
dom.insertAfter(dom.create('br', {'data-mce-bogus': '1'}), node);
}
try {
// IE9 might fail to do this selection
inst.selection.setCursorLocation(tdorth[0], 0);
} catch (ex) {
// Ignore
}
dom.setAttrib(node, 'data-mce-new', '');
});
inst.addVisual();
inst.execCommand('mceEndUndoLevel');
inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true});
tinyMCEPopup.close();
}
@ -240,11 +302,20 @@ function init() {
var cols = 2, rows = 2, border = tinyMCEPopup.getParam('table_default_border', '0'), cellpadding = tinyMCEPopup.getParam('table_default_cellpadding', ''), cellspacing = tinyMCEPopup.getParam('table_default_cellspacing', '');
var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = "";
var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules, frame;
var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules = "", frame = "";
var inst = tinyMCEPopup.editor, dom = inst.dom;
var formObj = document.forms[0];
var elm = dom.getParent(inst.selection.getNode(), "table");
// Hide advanced fields that isn't available in the schema
tinymce.each("summary id rules dir style frame".split(" "), function(name) {
var tr = tinyMCEPopup.dom.getParent(name, "tr") || tinyMCEPopup.dom.getParent("t" + name, "tr");
if (tr && !tinyMCEPopup.editor.schema.isValid("table", name)) {
tr.style.display = 'none';
}
});
action = tinyMCEPopup.getWindowArg('action');
if (!action)
@ -277,7 +348,7 @@ function init() {
style = dom.serializeStyle(st);
dir = dom.getAttrib(elm, 'dir');
lang = dom.getAttrib(elm, 'lang');
background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
formObj.caption.checked = elm.getElementsByTagName('caption').length > 0;
orgTableWidth = width;
@ -292,7 +363,7 @@ function init() {
// Update form
selectByValue(formObj, 'align', align);
selectByValue(formObj, 'frame', frame);
selectByValue(formObj, 'tframe', frame);
selectByValue(formObj, 'rules', rules);
selectByValue(formObj, 'class', className, true, true);
formObj.cols.value = cols;
@ -344,6 +415,20 @@ function changedSize() {
formObj.style.value = dom.serializeStyle(st);
}
function isCssSize(value) {
return /^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)$/.test(value);
}
function cssSize(value, def) {
value = tinymce.trim(value || def);
if (!isCssSize(value)) {
return parseInt(value, 10) + 'px';
}
return value;
}
function changedBackgroundImage() {
var formObj = document.forms[0];
var st = dom.parseStyle(formObj.style.value);
@ -358,8 +443,14 @@ function changedBorder() {
var st = dom.parseStyle(formObj.style.value);
// Update border width if the element has a color
if (formObj.border.value != "" && formObj.bordercolor.value != "")
st['border-width'] = formObj.border.value + "px";
if (formObj.border.value != "" && (isCssSize(formObj.border.value) || formObj.bordercolor.value != ""))
st['border-width'] = cssSize(formObj.border.value);
else {
if (!formObj.border.value) {
st['border'] = '';
st['border-width'] = '';
}
}
formObj.style.value = dom.serializeStyle(st);
}
@ -375,7 +466,7 @@ function changedColor() {
// Add border-width if it's missing
if (!st['border-width'])
st['border-width'] = formObj.border.value == "" ? "1px" : formObj.border.value + "px";
st['border-width'] = cssSize(formObj.border.value, 1);
}
formObj.style.value = dom.serializeStyle(st);
@ -386,7 +477,7 @@ function changedStyle() {
var st = dom.parseStyle(formObj.style.value);
if (st['background-image'])
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
else
formObj.backgroundimage.value = '';

75
webapp/web/js/tiny_mce/plugins/table/langs/en_dlg.js vendored Executable file → Normal file
View file

@ -1,74 +1 @@
tinyMCE.addI18n('en.table_dlg',{
general_tab:"General",
advanced_tab:"Advanced",
general_props:"General properties",
advanced_props:"Advanced properties",
rowtype:"Row in table part",
title:"Insert/Modify table",
width:"Width",
height:"Height",
cols:"Cols",
rows:"Rows",
cellspacing:"Cellspacing",
cellpadding:"Cellpadding",
border:"Border",
align:"Alignment",
align_default:"Default",
align_left:"Left",
align_right:"Right",
align_middle:"Center",
row_title:"Table row properties",
cell_title:"Table cell properties",
cell_type:"Cell type",
valign:"Vertical alignment",
align_top:"Top",
align_bottom:"Bottom",
bordercolor:"Border color",
bgcolor:"Background color",
merge_cells_title:"Merge table cells",
id:"Id",
style:"Style",
langdir:"Language direction",
langcode:"Language code",
mime:"Target MIME type",
ltr:"Left to right",
rtl:"Right to left",
bgimage:"Background image",
summary:"Summary",
td:"Data",
th:"Header",
cell_cell:"Update current cell",
cell_row:"Update all cells in row",
cell_all:"Update all cells in table",
row_row:"Update current row",
row_odd:"Update odd rows in table",
row_even:"Update even rows in table",
row_all:"Update all rows in table",
thead:"Table Head",
tbody:"Table Body",
tfoot:"Table Foot",
scope:"Scope",
rowgroup:"Row Group",
colgroup:"Col Group",
col_limit:"You've exceeded the maximum number of columns of {$cols}.",
row_limit:"You've exceeded the maximum number of rows of {$rows}.",
cell_limit:"You've exceeded the maximum number of cells of {$cells}.",
missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.",
caption:"Table caption",
frame:"Frame",
frame_none:"none",
frame_groups:"groups",
frame_rows:"rows",
frame_cols:"cols",
frame_all:"all",
rules:"Rules",
rules_void:"void",
rules_above:"above",
rules_below:"below",
rules_hsides:"hsides",
rules_lhs:"lhs",
rules_rhs:"rhs",
rules_vsides:"vsides",
rules_box:"box",
rules_border:"border"
});
tinyMCE.addI18n('en.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"Rules","frame_all":"all","frame_cols":"cols","frame_rows":"rows","frame_groups":"groups","frame_none":"none",frame:"Frame",caption:"Table Caption","missing_scope":"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.","cell_limit":"You\'ve exceeded the maximum number of cells of {$cells}.","row_limit":"You\'ve exceeded the maximum number of rows of {$rows}.","col_limit":"You\'ve exceeded the maximum number of columns of {$cols}.",colgroup:"Col Group",rowgroup:"Row Group",scope:"Scope",tfoot:"Footer",tbody:"Body",thead:"Header","row_all":"Update All Rows in Table","row_even":"Update Even Rows in Table","row_odd":"Update Odd Rows in Table","row_row":"Update Current Row","cell_all":"Update All Cells in Table","cell_row":"Update All Cells in Row","cell_cell":"Update Current Cell",th:"Header",td:"Data",summary:"Summary",bgimage:"Background Image",rtl:"Right to Left",ltr:"Left to Right",mime:"Target MIME Type",langcode:"Language Code",langdir:"Language Direction",style:"Style",id:"ID","merge_cells_title":"Merge Table Cells",bgcolor:"Background Color",bordercolor:"Border Color","align_bottom":"Bottom","align_top":"Top",valign:"Vertical Alignment","cell_type":"Cell Type","cell_title":"Table Cell Properties","row_title":"Table Row Properties","align_middle":"Center","align_right":"Right","align_left":"Left","align_default":"Default",align:"Alignment",border:"Border",cellpadding:"Cell Padding",cellspacing:"Cell Spacing",rows:"Rows",cols:"Columns",height:"Height",width:"Width",title:"Insert/Edit Table",rowtype:"Row Type","advanced_props":"Advanced Properties","general_props":"General Properties","advanced_tab":"Advanced","general_tab":"General","cell_col":"Update all cells in column"});

34
webapp/web/js/tiny_mce/plugins/table/merge_cells.htm vendored Executable file → Normal file
View file

@ -6,32 +6,26 @@
<script type="text/javascript" src="../../utils/mctabs.js"></script>
<script type="text/javascript" src="../../utils/validate.js"></script>
<script type="text/javascript" src="js/merge_cells.js"></script>
<base target="_self" />
</head>
<body style="margin: 8px" style="display: none">
<form onsubmit="mergeCells();return false;" action="#">
<body style="margin: 8px" role="application">
<form onsubmit="MergeCellsDialog.merge();return false;" action="#">
<fieldset>
<legend>{#table_dlg.merge_cells_title}</legend>
<table border="0" cellpadding="0" cellspacing="3" width="100%">
<tr>
<td>{#table_dlg.cols}:</td>
<td align="right"><input type="text" name="numcols" value="" class="number min1 mceFocus" style="width: 30px" /></td>
</tr>
<tr>
<td>{#table_dlg.rows}:</td>
<td align="right"><input type="text" name="numrows" value="" class="number min1" style="width: 30px" /></td>
</tr>
</table>
<table role="presentation" border="0" cellpadding="0" cellspacing="3" width="100%">
<tr>
<td><label for="numcols">{#table_dlg.cols}</label>:</td>
<td align="right"><input type="text" id="numcols" name="numcols" value="" class="number min1 mceFocus" style="width: 30px" aria-required="true" /></td>
</tr>
<tr>
<td><label for="numrows">{#table_dlg.rows}</label>:</td>
<td align="right"><input type="text" id="numrows" name="numrows" value="" class="number min1" style="width: 30px" aria-required="true" /></td>
</tr>
</table>
</fieldset>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#update}" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<input type="submit" id="insert" name="insert" value="{#update}" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>

61
webapp/web/js/tiny_mce/plugins/table/row.htm vendored Executable file → Normal file
View file

@ -5,17 +5,17 @@
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="../../utils/mctabs.js"></script>
<script type="text/javascript" src="../../utils/form_utils.js"></script>
<script type="text/javascript" src="../../utils/validate.js"></script>
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
<script type="text/javascript" src="js/row.js"></script>
<link href="css/row.css" rel="stylesheet" type="text/css" />
<base target="_self" />
</head>
<body id="tablerow" style="display: none">
<form onsubmit="updateAction();return false;">
<body id="tablerow" style="display: none" role="application">
<form onsubmit="updateAction();return false;" action="#">
<div class="tabs">
<ul>
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
</ul>
</div>
@ -24,11 +24,11 @@
<fieldset>
<legend>{#table_dlg.general_props}</legend>
<table border="0" cellpadding="4" cellspacing="0">
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
<tr>
<td><label for="rowtype">{#table_dlg.rowtype}</label></td>
<td class="col2">
<select id="rowtype" name="rowtype" class="mceFocus">
<select id="rowtype" name="rowtype" class="mceFocus" onChange="changedRowType();">
<option value="thead">{#table_dlg.thead}</option>
<option value="tbody">{#table_dlg.tbody}</option>
<option value="tfoot">{#table_dlg.tfoot}</option>
@ -71,7 +71,7 @@
<tr>
<td><label for="height">{#table_dlg.height}</label></td>
<td class="col2"><input name="height" type="text" id="height" value="" size="4" maxlength="4" onchange="changedSize();" /></td>
<td class="col2"><input name="height" type="text" id="height" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
</tr>
</table>
</fieldset>
@ -81,10 +81,10 @@
<fieldset>
<legend>{#table_dlg.advanced_props}</legend>
<table border="0" cellpadding="0" cellspacing="4">
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
<tr>
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
<td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
<td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
</tr>
<tr>
@ -93,45 +93,47 @@
</tr>
<tr>
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
<td>
<select id="dir" name="dir" style="width: 200px">
<option value="">{#not_set}</option>
<option value="ltr">{#table_dlg.ltr}</option>
<option value="rtl">{#table_dlg.rtl}</option>
<select id="dir" name="dir" style="width: 200px">
<option value="">{#not_set}</option>
<option value="ltr">{#table_dlg.ltr}</option>
<option value="rtl">{#table_dlg.rtl}</option>
</select>
</td>
</td>
</tr>
<tr>
<td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
<td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
<td>
<input id="lang" name="lang" type="text" value="" style="width: 200px" />
</td>
</td>
</tr>
<tr>
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
<td>
<table border="0" cellpadding="0" cellspacing="0">
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
<td id="backgroundimagebrowsercontainer">&nbsp;</td>
</tr>
</table>
</td>
</td>
</tr>
<tr>
<td class="column1"><label for="bgcolor">{#table_dlg.bgcolor}</label></td>
<td class="column1"><label for="bgcolor" id="bgcolor_label">{#table_dlg.bgcolor}</label></td>
<td>
<table border="0" cellpadding="0" cellspacing="0">
<span role="group" aria-labelledby="bgcolor_label">
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
<td id="bgcolor_pickcontainer">&nbsp;</td>
</tr>
</table>
</td>
</span>
</td>
</tr>
</table>
</fieldset>
@ -148,13 +150,8 @@
</select>
</div>
<div style="float: left">
<div><input type="submit" id="insert" name="insert" value="{#update}" /></div>
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<input type="submit" id="insert" name="insert" value="{#update}" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>

121
webapp/web/js/tiny_mce/plugins/table/table.htm vendored Executable file → Normal file
View file

@ -9,14 +9,14 @@
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
<script type="text/javascript" src="js/table.js"></script>
<link href="css/table.css" rel="stylesheet" type="text/css" />
<base target="_self" />
</head>
<body id="table" style="display: none">
<body id="table" style="display: none" role="application" aria-labelledby="app_title">
<span style="display:none;" id="app_title">{#table_dlg.title}</span>
<form onsubmit="insertTable();return false;" action="#">
<div class="tabs">
<ul>
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
<li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
<li id="general_tab" aria-controls="general_panel" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
</ul>
</div>
@ -24,48 +24,48 @@
<div id="general_panel" class="panel current">
<fieldset>
<legend>{#table_dlg.general_props}</legend>
<table border="0" cellpadding="4" cellspacing="0" width="100%">
<tr>
<td><label id="colslabel" for="cols">{#table_dlg.cols}</label></td>
<td><input id="cols" name="cols" type="text" value="" size="3" maxlength="3" class="required number min1 mceFocus" /></td>
<td><label id="rowslabel" for="rows">{#table_dlg.rows}</label></td>
<td><input id="rows" name="rows" type="text" value="" size="3" maxlength="3" class="required number min1" /></td>
</tr>
<tr>
<td><label id="cellpaddinglabel" for="cellpadding">{#table_dlg.cellpadding}</label></td>
<td><input id="cellpadding" name="cellpadding" type="text" value="" size="3" maxlength="3" class="number" /></td>
<td><label id="cellspacinglabel" for="cellspacing">{#table_dlg.cellspacing}</label></td>
<td><input id="cellspacing" name="cellspacing" type="text" value="" size="3" maxlength="3" class="number" /></td>
</tr>
<tr>
<td><label id="alignlabel" for="align">{#table_dlg.align}</label></td>
<td><select id="align" name="align">
<option value="">{#not_set}</option>
<option value="center">{#table_dlg.align_middle}</option>
<option value="left">{#table_dlg.align_left}</option>
<option value="right">{#table_dlg.align_right}</option>
</select></td>
<td><label id="borderlabel" for="border">{#table_dlg.border}</label></td>
<td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="changedBorder();" class="number" /></td>
</tr>
<tr id="width_row">
<td><label id="widthlabel" for="width">{#table_dlg.width}</label></td>
<td><input name="width" type="text" id="width" value="" size="4" maxlength="4" onchange="changedSize();" class="size" /></td>
<td><label id="heightlabel" for="height">{#table_dlg.height}</label></td>
<td><input name="height" type="text" id="height" value="" size="4" maxlength="4" onchange="changedSize();" class="size" /></td>
</tr>
<tr id="styleSelectRow">
<td><label id="classlabel" for="class">{#class_name}</label></td>
<td colspan="3">
<select id="class" name="class" class="mceEditableSelect">
<option value="" selected>{#not_set}</option>
</select></td>
</tr>
<tr>
<td class="column1"><label for="caption">{#table_dlg.caption}</label></td>
<td><input id="caption" name="caption" type="checkbox" class="checkbox" value="true" /></td>
</tr>
</table>
<table role="presentation" border="0" cellpadding="4" cellspacing="0" width="100%">
<tr>
<td><label id="colslabel" for="cols">{#table_dlg.cols}</label></td>
<td><input id="cols" name="cols" type="text" value="" size="3" maxlength="3" class="required number min1 mceFocus" aria-required="true" /></td>
<td><label id="rowslabel" for="rows">{#table_dlg.rows}</label></td>
<td><input id="rows" name="rows" type="text" value="" size="3" maxlength="3" class="required number min1" aria-required="true" /></td>
</tr>
<tr>
<td><label id="cellpaddinglabel" for="cellpadding">{#table_dlg.cellpadding}</label></td>
<td><input id="cellpadding" name="cellpadding" type="text" value="" size="3" maxlength="3" class="number" /></td>
<td><label id="cellspacinglabel" for="cellspacing">{#table_dlg.cellspacing}</label></td>
<td><input id="cellspacing" name="cellspacing" type="text" value="" size="3" maxlength="3" class="number" /></td>
</tr>
<tr>
<td><label id="alignlabel" for="align">{#table_dlg.align}</label></td>
<td><select id="align" name="align">
<option value="">{#not_set}</option>
<option value="center">{#table_dlg.align_middle}</option>
<option value="left">{#table_dlg.align_left}</option>
<option value="right">{#table_dlg.align_right}</option>
</select></td>
<td><label id="borderlabel" for="border">{#table_dlg.border}</label></td>
<td><input id="border" name="border" type="text" value="" size="3" maxlength="5" onchange="changedBorder();" class="size" /></td>
</tr>
<tr id="width_row">
<td><label id="widthlabel" for="width">{#table_dlg.width}</label></td>
<td><input name="width" type="text" id="width" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
<td><label id="heightlabel" for="height">{#table_dlg.height}</label></td>
<td><input name="height" type="text" id="height" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
</tr>
<tr id="styleSelectRow" >
<td><label id="classlabel" for="class">{#class_name}</label></td>
<td colspan="3" >
<select id="class" name="class" class="mceEditableSelect">
<option value="" selected="selected">{#not_set}</option>
</select></td>
</tr>
<tr>
<td class="column1" ><label for="caption">{#table_dlg.caption}</label></td>
<td><input id="caption" name="caption" type="checkbox" class="checkbox" value="true" /></td>
</tr>
</table>
</fieldset>
</div>
@ -73,7 +73,7 @@
<fieldset>
<legend>{#table_dlg.advanced_props}</legend>
<table border="0" cellpadding="0" cellspacing="4">
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
<tr>
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
<td><input id="id" name="id" type="text" value="" class="advfield" /></td>
@ -99,7 +99,7 @@
<tr>
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
<td>
<table border="0" cellpadding="0" cellspacing="0">
<table role="presentation" aria-labelledby="backgroundimage_label" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" class="advfield" onchange="changedBackgroundImage();" /></td>
<td id="backgroundimagebrowsercontainer">&nbsp;</td>
@ -109,9 +109,9 @@
</tr>
<tr>
<td class="column1"><label for="frame">{#table_dlg.frame}</label></td>
<td class="column1"><label for="tframe">{#table_dlg.frame}</label></td>
<td>
<select id="frame" name="frame" class="advfield">
<select id="tframe" name="tframe" class="advfield">
<option value="">{#not_set}</option>
<option value="void">{#table_dlg.rules_void}</option>
<option value="above">{#table_dlg.rules_above}</option>
@ -151,10 +151,10 @@
</td>
</tr>
<tr>
<td class="column1"><label for="bordercolor">{#table_dlg.bordercolor}</label></td>
<tr role="group" aria-labelledby="bordercolor_label">
<td class="column1"><label id="bordercolor_label" for="bordercolor">{#table_dlg.bordercolor}</label></td>
<td>
<table border="0" cellpadding="0" cellspacing="0">
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
<td id="bordercolor_pickcontainer">&nbsp;</td>
@ -163,10 +163,10 @@
</td>
</tr>
<tr>
<td class="column1"><label for="bgcolor">{#table_dlg.bgcolor}</label></td>
<tr role="group" aria-labelledby="bgcolor_label">
<td class="column1"><label id="bgcolor_label" for="bgcolor">{#table_dlg.bgcolor}</label></td>
<td>
<table border="0" cellpadding="0" cellspacing="0">
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
<td id="bgcolor_pickcontainer">&nbsp;</td>
@ -180,13 +180,8 @@
</div>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="{#insert}" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
<input type="submit" id="insert" name="insert" value="{#insert}" />
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</form>
</body>