includes/clientside/tinymce/plugins/table/js/merge_cells.js
author Dan
Sun, 22 Mar 2009 00:55:06 -0400
changeset 885 a86a69394a95
parent 778 57ce13805b6f
permissions -rw-r--r--
Major revamp to sidebar editor. Some behavioral changes as well as being based on jQuery UI Sortables. Creation interface remains the same, but better strings merged in from stable.
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)) {
778
57ce13805b6f Upgraded TinyMCE to version 3.2.1.1
Dan
parents: 588
diff changeset
    18
		tinyMCEPopup.alert(tinyMCEPopup.getLang('invalid_data'));
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
    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);