summaryrefslogtreecommitdiff
path: root/public/javascripts/tiny_mce/plugins/table/js/merge_cells.js
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-02-17 21:54:39 +0100
committerhukl <contact@smyck.org>2009-02-17 21:54:39 +0100
commitf61b5b0597e0c25f084ee67d402f12a43a7a9947 (patch)
tree3b4c3f9f38637f1a7ecf703ece4fd3bc4c6e2934 /public/javascripts/tiny_mce/plugins/table/js/merge_cells.js
parent3d3b786cc43266f6292f5edd25733dbb9bd6ed06 (diff)
added tinymce editor for body area of pages
Diffstat (limited to 'public/javascripts/tiny_mce/plugins/table/js/merge_cells.js')
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/table/js/merge_cells.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/public/javascripts/tiny_mce/plugins/table/js/merge_cells.js b/public/javascripts/tiny_mce/plugins/table/js/merge_cells.js
new file mode 100755
index 0000000..31d6df0
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/table/js/merge_cells.js
@@ -0,0 +1,29 @@
1tinyMCEPopup.requireLangPack();
2
3function 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
12function 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
29tinyMCEPopup.onInit.add(init);