includes/clientside/tinymce/plugins/table/js/merge_cells.js
author Dan
Mon, 05 May 2008 20:28:13 -0400
changeset 544 81b4499a963e
parent 543 dffcbfbc4e59
child 588 20484deb89cd
permissions -rw-r--r--
Added TinyMCE compression support and made some supporting modifications to common.php
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
335
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
diff changeset
     1
tinyMCEPopup.requireLangPack();
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
diff changeset
     2
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
diff changeset
     3
function init() {
543
dffcbfbc4e59 Upgraded TinyMCE to version 3.0.8
Dan
parents: 335
diff changeset
     4
	var f = document.forms[0], v;
dffcbfbc4e59 Upgraded TinyMCE to version 3.0.8
Dan
parents: 335
diff changeset
     5
335
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
diff changeset
     6
	tinyMCEPopup.resizeToInnerSize();
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
diff changeset
     7
543
dffcbfbc4e59 Upgraded TinyMCE to version 3.0.8
Dan
parents: 335
diff changeset
     8
	f.numcols.value = tinyMCEPopup.getWindowArg('numcols', 1);
dffcbfbc4e59 Upgraded TinyMCE to version 3.0.8
Dan
parents: 335
diff changeset
     9
	f.numrows.value = tinyMCEPopup.getWindowArg('numcols', 1);
335
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
diff changeset
    10
}
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
diff changeset
    11
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
diff changeset
    12
function mergeCells() {
543
dffcbfbc4e59 Upgraded TinyMCE to version 3.0.8
Dan
parents: 335
diff changeset
    13
	var args = [], f = document.forms[0];
335
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
diff changeset
    14
543
dffcbfbc4e59 Upgraded TinyMCE to version 3.0.8
Dan
parents: 335
diff changeset
    15
	tinyMCEPopup.restoreSelection();
dffcbfbc4e59 Upgraded TinyMCE to version 3.0.8
Dan
parents: 335
diff changeset
    16
dffcbfbc4e59 Upgraded TinyMCE to version 3.0.8
Dan
parents: 335
diff changeset
    17
	if (!AutoValidator.validate(f)) {
335
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
diff changeset
    18
		alert(tinyMCEPopup.getLang('invalid_data'));
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
diff changeset
    19
		return false;
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
diff changeset
    20
	}
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
diff changeset
    21
543
dffcbfbc4e59 Upgraded TinyMCE to version 3.0.8
Dan
parents: 335
diff changeset
    22
	args["numcols"] = f.numcols.value;
dffcbfbc4e59 Upgraded TinyMCE to version 3.0.8
Dan
parents: 335
diff changeset
    23
	args["numrows"] = f.numrows.value;
335
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
diff changeset
    24
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
diff changeset
    25
	tinyMCEPopup.execCommand("mceTableMergeCells", false, args);
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
diff changeset
    26
	tinyMCEPopup.close();
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
diff changeset
    27
}
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
diff changeset
    28
67bd3121a12e Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
diff changeset
    29
tinyMCEPopup.onInit.add(init);