diff options
Diffstat (limited to 'program/js/tiny_mce/plugins/table/jscripts')
-rw-r--r-- | program/js/tiny_mce/plugins/table/jscripts/merge_cells.js | 5 | ||||
-rw-r--r-- | program/js/tiny_mce/plugins/table/jscripts/table.js | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/program/js/tiny_mce/plugins/table/jscripts/merge_cells.js b/program/js/tiny_mce/plugins/table/jscripts/merge_cells.js index 51a274962..06cbb275d 100644 --- a/program/js/tiny_mce/plugins/table/jscripts/merge_cells.js +++ b/program/js/tiny_mce/plugins/table/jscripts/merge_cells.js @@ -11,6 +11,11 @@ function mergeCells() { var args = new Array();
var formObj = document.forms[0];
+ if (!AutoValidator.validate(formObj)) {
+ alert(tinyMCE.getLang('lang_invalid_data'));
+ return false;
+ }
+
args["numcols"] = formObj.numcols.value;
args["numrows"] = formObj.numrows.value;
diff --git a/program/js/tiny_mce/plugins/table/jscripts/table.js b/program/js/tiny_mce/plugins/table/jscripts/table.js index 02eaeee27..6904ed0f7 100644 --- a/program/js/tiny_mce/plugins/table/jscripts/table.js +++ b/program/js/tiny_mce/plugins/table/jscripts/table.js @@ -8,6 +8,11 @@ function insertTable() { var elm = tinyMCE.tableElm;
var cellLimit, rowLimit, colLimit;
+ if (!AutoValidator.validate(formObj)) {
+ alert(tinyMCE.getLang('lang_invalid_data'));
+ return false;
+ }
+
tinyMCEPopup.restoreSelection();
// Get form data
@@ -180,7 +185,7 @@ function init() { document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
- var cols = 2, rows = 2, border = 0, cellpadding = "", cellspacing = "";
+ var cols = 2, rows = 2, border = tinyMCE.getParam('table_default_border', '0'), cellpadding = tinyMCE.getParam('table_default_cellpadding', ''), cellspacing = tinyMCE.getParam('table_default_cellspacing', '');
var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = "";
var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "";
var inst = tinyMCE.selectedInstance;
|