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