includes/clientside/tinymce/plugins/table/js/merge_cells.js
author Dan
Thu, 21 Aug 2008 11:24:56 -0400
changeset 701 dd80cde96a6c
parent 588 20484deb89cd
child 778 57ce13805b6f
permissions -rw-r--r--
Autocomplete further stabilized. Made Special:PasswordReset and Special:Register prevent use if logged in.
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);
588
20484deb89cd Upgraded TinyMCE to 3.1.0.1. Ported a couple special pages to the componentized JS system.
Dan
parents: 543
diff changeset
     9
	f.numrows.value = tinyMCEPopup.getWindowArg('numrows', 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);