includes/clientside/tinymce/plugins/table/js/merge_cells.js
changeset 543 dffcbfbc4e59
parent 335 67bd3121a12e
child 588 20484deb89cd
equal deleted inserted replaced
542:5841df0ab575 543:dffcbfbc4e59
     1 tinyMCEPopup.requireLangPack();
     1 tinyMCEPopup.requireLangPack();
     2 
     2 
     3 function init() {
     3 function init() {
       
     4 	var f = document.forms[0], v;
       
     5 
     4 	tinyMCEPopup.resizeToInnerSize();
     6 	tinyMCEPopup.resizeToInnerSize();
     5 
     7 
     6 	var formObj = document.forms[0];
     8 	f.numcols.value = tinyMCEPopup.getWindowArg('numcols', 1);
     7 
     9 	f.numrows.value = tinyMCEPopup.getWindowArg('numcols', 1);
     8 	formObj.numcols.value = tinyMCEPopup.getWindowArg('numcols', 1);
       
     9 	formObj.numrows.value = tinyMCEPopup.getWindowArg('numrows', 1);
       
    10 }
    10 }
    11 
    11 
    12 function mergeCells() {
    12 function mergeCells() {
    13 	var args = new Array();
    13 	var args = [], f = document.forms[0];
    14 	var formObj = document.forms[0];
       
    15 
    14 
    16 	if (!AutoValidator.validate(formObj)) {
    15 	tinyMCEPopup.restoreSelection();
       
    16 
       
    17 	if (!AutoValidator.validate(f)) {
    17 		alert(tinyMCEPopup.getLang('invalid_data'));
    18 		alert(tinyMCEPopup.getLang('invalid_data'));
    18 		return false;
    19 		return false;
    19 	}
    20 	}
    20 
    21 
    21 	args["numcols"] = formObj.numcols.value;
    22 	args["numcols"] = f.numcols.value;
    22 	args["numrows"] = formObj.numrows.value;
    23 	args["numrows"] = f.numrows.value;
    23 
    24 
    24 	tinyMCEPopup.execCommand("mceTableMergeCells", false, args);
    25 	tinyMCEPopup.execCommand("mceTableMergeCells", false, args);
    25 	tinyMCEPopup.close();
    26 	tinyMCEPopup.close();
    26 }
    27 }
    27 
    28