includes/clientside/tinymce/plugins/table/js/merge_cells.js
author Dan
Mon, 16 Feb 2009 16:17:25 -0500
changeset 832 7152ca0a0ce9
parent 778 57ce13805b6f
permissions -rw-r--r--
Major redesign of rendering pipeline that separates pages saved with MCE from pages saved with the plaintext editor (full description in long commit message) - Pages are now stored with an extra metadata field called page_format which is "wikitext" or "xhtml" - New $flags parameter + RENDER_* constants added that control RenderMan::render() behavior - Several other changes: * Added a sprite API for Javascript and made editor use sprites when possible * Removed a number of config options from the default install schema, replaced with second parameter to getConfig() calls * MessageBox in editor mostly replaced with miniPrompt * A few bugfixes related to password changes (registration didn't even work) * Rewrote the bitfield compression algorithm used to serialize allowed MIME types * Fixed some typos in language files and strings * Fixed a Text_Wiki bug in Heading parser
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);