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