mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Tinymce table plugin
This commit is contained in:
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>
|
||||
|
Reference in New Issue
Block a user