mirror of
https://github.com/e107inc/e107.git
synced 2025-05-03 18:59:45 +02:00
Tinymce table plugin
This commit is contained in:
parent
0c44cdd49b
commit
baccd0861b
File diff suppressed because one or more lines are too long
@ -566,6 +566,10 @@
|
||||
};
|
||||
|
||||
function pasteRows(rows, before) {
|
||||
// If we don't have any rows in the clipboard, return immediately
|
||||
if(!rows)
|
||||
return;
|
||||
|
||||
var selectedRows = getSelectedRows(),
|
||||
targetRow = selectedRows[before ? 0 : selectedRows.length - 1],
|
||||
targetCellCount = targetRow.cells.length;
|
||||
@ -1294,7 +1298,10 @@
|
||||
|
||||
/**
|
||||
* Fixes bug in Gecko where shift-enter in table cell does not place caret on new line
|
||||
*
|
||||
* Removed: Since the new enter logic seems to fix this one.
|
||||
*/
|
||||
/*
|
||||
if (tinymce.isGecko) {
|
||||
ed.onKeyDown.add(function(ed, e) {
|
||||
if (e.keyCode === tinymce.VK.ENTER && e.shiftKey) {
|
||||
@ -1307,7 +1314,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
fixTableCaretPos();
|
||||
ed.startContent = ed.getContent({format : 'raw'});
|
||||
|
@ -25,6 +25,7 @@ function init() {
|
||||
var dir = dom.getAttrib(trElm, 'dir');
|
||||
|
||||
selectByValue(formObj, 'rowtype', rowtype);
|
||||
setActionforRowType(formObj, rowtype);
|
||||
|
||||
// Any cells selected
|
||||
if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) {
|
||||
@ -234,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);
|
||||
|
@ -28,7 +28,7 @@
|
||||
<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>
|
||||
@ -83,8 +83,8 @@
|
||||
|
||||
<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,25 +93,25 @@
|
||||
</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 role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
@ -119,11 +119,11 @@
|
||||
<td id="backgroundimagebrowsercontainer"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="column1"><label for="bgcolor" id="bgcolor_label">{#table_dlg.bgcolor}</label></td>
|
||||
<td class="column1"><label for="bgcolor" id="bgcolor_label">{#table_dlg.bgcolor}</label></td>
|
||||
<td>
|
||||
<span role="group" aria-labelledby="bgcolor_label">
|
||||
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
||||
@ -133,7 +133,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
Loading…
x
Reference in New Issue
Block a user