summaryrefslogtreecommitdiff
path: root/program/js/tiny_mce/plugins/table/js/row.js
diff options
context:
space:
mode:
Diffstat (limited to 'program/js/tiny_mce/plugins/table/js/row.js')
-rw-r--r--program/js/tiny_mce/plugins/table/js/row.js31
1 files changed, 13 insertions, 18 deletions
diff --git a/program/js/tiny_mce/plugins/table/js/row.js b/program/js/tiny_mce/plugins/table/js/row.js
index 70d95b672..b275e6ea9 100644
--- a/program/js/tiny_mce/plugins/table/js/row.js
+++ b/program/js/tiny_mce/plugins/table/js/row.js
@@ -80,8 +80,6 @@ function updateAction() {
return;
}
- inst.execCommand('mceBeginUndoLevel');
-
switch (action) {
case "row":
updateRow(trElm);
@@ -123,19 +121,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);
@@ -163,13 +161,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