diff options
Diffstat (limited to 'program/js/tiny_mce/plugins/table/js/table.js')
-rw-r--r-- | program/js/tiny_mce/plugins/table/js/table.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/program/js/tiny_mce/plugins/table/js/table.js b/program/js/tiny_mce/plugins/table/js/table.js index 2b6fd1f70..182589d69 100644 --- a/program/js/tiny_mce/plugins/table/js/table.js +++ b/program/js/tiny_mce/plugins/table/js/table.js @@ -24,14 +24,14 @@ function insertTable() { 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;
@@ -157,7 +157,7 @@ function insertTable() { style += '; ';
// Force px
- if (/[0-9\.]+/.test(width))
+ if (/^[0-9\.]+$/.test(width))
width += 'px';
style += 'width: ' + width;
@@ -322,7 +322,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;
|