From 1ff5766f84fac1d651d3fcb18cb500555f1ad302 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 27 Oct 2010 12:54:58 -0400 Subject: [PATCH] Upgrade TinyMCE --- webcit/tiny_mce/langs/da.js | 20 +- webcit/tiny_mce/langs/de.js | 58 +- webcit/tiny_mce/langs/en.js | 20 +- webcit/tiny_mce/langs/es.js | 24 +- webcit/tiny_mce/langs/et.js | 170 + webcit/tiny_mce/langs/fr.js | 170 + webcit/tiny_mce/langs/hu.js | 170 + webcit/tiny_mce/langs/it.js | 24 +- webcit/tiny_mce/langs/nl.js | 28 +- webcit/tiny_mce/langs/pt.js | 82 +- webcit/tiny_mce/langs/ru.js | 173 + .../tiny_mce/plugins/advhr/editor_plugin.js | 2 +- .../plugins/advhr/editor_plugin_src.js | 12 +- webcit/tiny_mce/plugins/advhr/langs/et_dlg.js | 5 + webcit/tiny_mce/plugins/advhr/langs/fr_dlg.js | 5 + webcit/tiny_mce/plugins/advhr/langs/hu_dlg.js | 5 + webcit/tiny_mce/plugins/advhr/langs/it_dlg.js | 4 +- webcit/tiny_mce/plugins/advhr/langs/ru_dlg.js | 5 + webcit/tiny_mce/plugins/advhr/rule.htm | 12 +- .../plugins/advimage/editor_plugin.js | 2 +- .../plugins/advimage/editor_plugin_src.js | 12 +- webcit/tiny_mce/plugins/advimage/image.htm | 20 +- webcit/tiny_mce/plugins/advimage/js/image.js | 4 +- .../tiny_mce/plugins/advimage/langs/de_dlg.js | 4 +- .../tiny_mce/plugins/advimage/langs/et_dlg.js | 43 + .../tiny_mce/plugins/advimage/langs/fr_dlg.js | 43 + .../tiny_mce/plugins/advimage/langs/hu_dlg.js | 43 + .../tiny_mce/plugins/advimage/langs/pt_dlg.js | 30 +- .../tiny_mce/plugins/advimage/langs/ru_dlg.js | 43 + .../tiny_mce/plugins/advlink/editor_plugin.js | 2 +- .../plugins/advlink/editor_plugin_src.js | 12 +- webcit/tiny_mce/plugins/advlink/js/advlink.js | 5 +- .../tiny_mce/plugins/advlink/langs/de_dlg.js | 4 +- .../tiny_mce/plugins/advlink/langs/et_dlg.js | 52 + .../tiny_mce/plugins/advlink/langs/fr_dlg.js | 52 + .../tiny_mce/plugins/advlink/langs/hu_dlg.js | 52 + .../tiny_mce/plugins/advlink/langs/nl_dlg.js | 2 +- .../tiny_mce/plugins/advlink/langs/pt_dlg.js | 42 +- .../tiny_mce/plugins/advlink/langs/ru_dlg.js | 52 + webcit/tiny_mce/plugins/advlink/link.htm | 50 +- .../tiny_mce/plugins/advlist/editor_plugin.js | 1 + .../plugins/advlist/editor_plugin_src.js | 154 + .../plugins/autoresize/editor_plugin.js | 1 + .../plugins/autoresize/editor_plugin_src.js | 119 + .../plugins/autosave/editor_plugin.js | 2 +- .../plugins/autosave/editor_plugin_src.js | 406 +- webcit/tiny_mce/plugins/autosave/langs/en.js | 4 + .../tiny_mce/plugins/bbcode/editor_plugin.js | 2 +- .../plugins/bbcode/editor_plugin_src.js | 12 +- .../plugins/compat2x/editor_plugin.js | 1 - .../plugins/compat2x/editor_plugin_src.js | 613 - .../plugins/contextmenu/editor_plugin.js | 2 +- .../plugins/contextmenu/editor_plugin_src.js | 67 +- .../plugins/directionality/editor_plugin.js | 2 +- .../directionality/editor_plugin_src.js | 12 +- .../plugins/emotions/editor_plugin.js | 2 +- .../plugins/emotions/editor_plugin_src.js | 14 +- webcit/tiny_mce/plugins/emotions/emotions.htm | 3 +- .../tiny_mce/plugins/emotions/langs/es_dlg.js | 2 +- .../tiny_mce/plugins/emotions/langs/et_dlg.js | 20 + .../tiny_mce/plugins/emotions/langs/fr_dlg.js | 20 + .../tiny_mce/plugins/emotions/langs/hu_dlg.js | 20 + .../tiny_mce/plugins/emotions/langs/nl_dlg.js | 2 +- .../tiny_mce/plugins/emotions/langs/pt_dlg.js | 8 +- .../tiny_mce/plugins/emotions/langs/ru_dlg.js | 20 + webcit/tiny_mce/plugins/example/dialog.htm | 9 +- .../tiny_mce/plugins/example/editor_plugin.js | 2 +- .../plugins/example/editor_plugin_src.js | 12 +- .../plugins/fullpage/editor_plugin.js | 2 +- .../plugins/fullpage/editor_plugin_src.js | 22 +- webcit/tiny_mce/plugins/fullpage/fullpage.htm | 28 +- .../tiny_mce/plugins/fullpage/js/fullpage.js | 26 +- .../tiny_mce/plugins/fullpage/langs/de_dlg.js | 2 +- .../tiny_mce/plugins/fullpage/langs/et_dlg.js | 85 + .../tiny_mce/plugins/fullpage/langs/fr_dlg.js | 85 + .../tiny_mce/plugins/fullpage/langs/hu_dlg.js | 85 + .../tiny_mce/plugins/fullpage/langs/pt_dlg.js | 38 +- .../tiny_mce/plugins/fullpage/langs/ru_dlg.js | 85 + .../plugins/fullscreen/editor_plugin.js | 2 +- .../plugins/fullscreen/editor_plugin_src.js | 21 +- .../plugins/fullscreen/fullscreen.htm | 2 - .../tiny_mce/plugins/iespell/editor_plugin.js | 2 +- .../plugins/iespell/editor_plugin_src.js | 12 +- .../plugins/inlinepopups/editor_plugin.js | 2 +- .../plugins/inlinepopups/editor_plugin_src.js | 18 +- .../inlinepopups/skins/clearlooks2/window.css | 12 +- .../plugins/insertdatetime/editor_plugin.js | 2 +- .../insertdatetime/editor_plugin_src.js | 12 +- .../tiny_mce/plugins/layer/editor_plugin.js | 2 +- .../plugins/layer/editor_plugin_src.js | 12 +- .../plugins/legacyoutput/editor_plugin.js | 1 + .../plugins/legacyoutput/editor_plugin_src.js | 136 + .../tiny_mce/plugins/media/editor_plugin.js | 2 +- .../plugins/media/editor_plugin_src.js | 55 +- webcit/tiny_mce/plugins/media/js/media.js | 6 +- webcit/tiny_mce/plugins/media/langs/de_dlg.js | 4 +- webcit/tiny_mce/plugins/media/langs/et_dlg.js | 103 + webcit/tiny_mce/plugins/media/langs/fr_dlg.js | 103 + webcit/tiny_mce/plugins/media/langs/hu_dlg.js | 103 + webcit/tiny_mce/plugins/media/langs/nl_dlg.js | 2 +- webcit/tiny_mce/plugins/media/langs/pt_dlg.js | 58 +- webcit/tiny_mce/plugins/media/langs/ru_dlg.js | 103 + webcit/tiny_mce/plugins/media/media.htm | 15 +- .../plugins/nonbreaking/editor_plugin.js | 2 +- .../plugins/nonbreaking/editor_plugin_src.js | 14 +- .../plugins/noneditable/editor_plugin.js | 2 +- .../plugins/noneditable/editor_plugin_src.js | 12 +- .../plugins/pagebreak/editor_plugin.js | 2 +- .../plugins/pagebreak/editor_plugin_src.js | 12 +- webcit/tiny_mce/plugins/paste/blank.htm | 22 - webcit/tiny_mce/plugins/paste/css/blank.css | 14 - .../tiny_mce/plugins/paste/css/pasteword.css | 3 - .../tiny_mce/plugins/paste/editor_plugin.js | 2 +- .../plugins/paste/editor_plugin_src.js | 1149 +- webcit/tiny_mce/plugins/paste/js/pastetext.js | 62 +- webcit/tiny_mce/plugins/paste/js/pasteword.js | 91 +- webcit/tiny_mce/plugins/paste/langs/et_dlg.js | 5 + webcit/tiny_mce/plugins/paste/langs/fr_dlg.js | 5 + webcit/tiny_mce/plugins/paste/langs/hu_dlg.js | 5 + webcit/tiny_mce/plugins/paste/langs/ru_dlg.js | 5 + webcit/tiny_mce/plugins/paste/pastetext.htm | 29 +- webcit/tiny_mce/plugins/paste/pasteword.htm | 16 +- .../tiny_mce/plugins/preview/editor_plugin.js | 2 +- .../plugins/preview/editor_plugin_src.js | 14 +- webcit/tiny_mce/plugins/preview/preview.html | 16 +- .../tiny_mce/plugins/print/editor_plugin.js | 2 +- .../plugins/print/editor_plugin_src.js | 10 +- webcit/tiny_mce/plugins/safari/blank.htm | 1 - .../tiny_mce/plugins/safari/editor_plugin.js | 1 - .../plugins/safari/editor_plugin_src.js | 511 - webcit/tiny_mce/plugins/save/editor_plugin.js | 2 +- .../plugins/save/editor_plugin_src.js | 9 +- .../plugins/searchreplace/editor_plugin.js | 2 +- .../searchreplace/editor_plugin_src.js | 11 +- .../plugins/searchreplace/js/searchreplace.js | 12 + .../plugins/searchreplace/langs/et_dlg.js | 16 + .../plugins/searchreplace/langs/fr_dlg.js | 16 + .../plugins/searchreplace/langs/hu_dlg.js | 16 + .../plugins/searchreplace/langs/pt_dlg.js | 10 +- .../plugins/searchreplace/langs/ru_dlg.js | 16 + .../plugins/searchreplace/searchreplace.htm | 14 +- .../plugins/spellchecker/editor_plugin.js | 2 +- .../plugins/spellchecker/editor_plugin_src.js | 133 +- .../tiny_mce/plugins/style/editor_plugin.js | 2 +- .../plugins/style/editor_plugin_src.js | 9 +- webcit/tiny_mce/plugins/style/js/props.js | 14 +- webcit/tiny_mce/plugins/style/langs/et_dlg.js | 63 + webcit/tiny_mce/plugins/style/langs/fr_dlg.js | 63 + webcit/tiny_mce/plugins/style/langs/hu_dlg.js | 63 + webcit/tiny_mce/plugins/style/langs/it_dlg.js | 6 +- webcit/tiny_mce/plugins/style/langs/pt_dlg.js | 16 +- webcit/tiny_mce/plugins/style/langs/ru_dlg.js | 63 + webcit/tiny_mce/plugins/style/props.htm | 16 +- .../plugins/tabfocus/editor_plugin.js | 1 + .../plugins/tabfocus/editor_plugin_src.js | 112 + webcit/tiny_mce/plugins/table/cell.htm | 10 +- .../tiny_mce/plugins/table/editor_plugin.js | 2 +- .../plugins/table/editor_plugin_src.js | 1839 +-- webcit/tiny_mce/plugins/table/js/cell.js | 65 +- .../tiny_mce/plugins/table/js/merge_cells.js | 38 +- webcit/tiny_mce/plugins/table/js/row.js | 71 +- webcit/tiny_mce/plugins/table/js/table.js | 65 +- webcit/tiny_mce/plugins/table/langs/de_dlg.js | 38 +- webcit/tiny_mce/plugins/table/langs/et_dlg.js | 74 + webcit/tiny_mce/plugins/table/langs/fr_dlg.js | 74 + webcit/tiny_mce/plugins/table/langs/hu_dlg.js | 74 + webcit/tiny_mce/plugins/table/langs/it_dlg.js | 12 +- webcit/tiny_mce/plugins/table/langs/nl_dlg.js | 6 +- webcit/tiny_mce/plugins/table/langs/pt_dlg.js | 48 +- webcit/tiny_mce/plugins/table/langs/ru_dlg.js | 74 + webcit/tiny_mce/plugins/table/merge_cells.htm | 14 +- webcit/tiny_mce/plugins/table/row.htm | 12 +- webcit/tiny_mce/plugins/table/table.htm | 16 +- .../plugins/template/editor_plugin.js | 2 +- .../plugins/template/editor_plugin_src.js | 17 +- .../tiny_mce/plugins/template/langs/de_dlg.js | 6 +- .../tiny_mce/plugins/template/langs/es_dlg.js | 2 +- .../tiny_mce/plugins/template/langs/et_dlg.js | 15 + .../tiny_mce/plugins/template/langs/fr_dlg.js | 15 + .../tiny_mce/plugins/template/langs/hu_dlg.js | 15 + .../tiny_mce/plugins/template/langs/nl_dlg.js | 8 +- .../tiny_mce/plugins/template/langs/pt_dlg.js | 10 +- .../tiny_mce/plugins/template/langs/ru_dlg.js | 15 + webcit/tiny_mce/plugins/template/template.htm | 12 +- .../plugins/visualchars/editor_plugin.js | 2 +- .../plugins/visualchars/editor_plugin_src.js | 42 +- .../plugins/wordcount/editor_plugin.js | 1 + .../plugins/wordcount/editor_plugin_src.js | 98 + webcit/tiny_mce/plugins/xhtmlxtras/abbr.htm | 14 +- .../tiny_mce/plugins/xhtmlxtras/acronym.htm | 14 +- .../plugins/xhtmlxtras/attributes.htm | 14 +- webcit/tiny_mce/plugins/xhtmlxtras/cite.htm | 14 +- webcit/tiny_mce/plugins/xhtmlxtras/del.htm | 17 +- .../plugins/xhtmlxtras/editor_plugin.js | 2 +- .../plugins/xhtmlxtras/editor_plugin_src.js | 26 +- webcit/tiny_mce/plugins/xhtmlxtras/ins.htm | 17 +- webcit/tiny_mce/plugins/xhtmlxtras/js/abbr.js | 13 +- .../tiny_mce/plugins/xhtmlxtras/js/acronym.js | 11 +- .../plugins/xhtmlxtras/js/attributes.js | 11 +- webcit/tiny_mce/plugins/xhtmlxtras/js/cite.js | 11 +- webcit/tiny_mce/plugins/xhtmlxtras/js/del.js | 11 +- .../plugins/xhtmlxtras/js/element_common.js | 18 +- webcit/tiny_mce/plugins/xhtmlxtras/js/ins.js | 11 +- .../plugins/xhtmlxtras/langs/et_dlg.js | 32 + .../plugins/xhtmlxtras/langs/fr_dlg.js | 32 + .../plugins/xhtmlxtras/langs/hu_dlg.js | 32 + .../plugins/xhtmlxtras/langs/nl_dlg.js | 2 +- .../plugins/xhtmlxtras/langs/pt_dlg.js | 14 +- .../plugins/xhtmlxtras/langs/ru_dlg.js | 32 + webcit/tiny_mce/themes/advanced/about.htm | 6 +- webcit/tiny_mce/themes/advanced/anchor.htm | 12 +- webcit/tiny_mce/themes/advanced/charmap.htm | 4 +- .../tiny_mce/themes/advanced/color_picker.htm | 7 +- .../themes/advanced/editor_template.js | 2 +- .../themes/advanced/editor_template_src.js | 472 +- webcit/tiny_mce/themes/advanced/image.htm | 24 +- webcit/tiny_mce/themes/advanced/img/icons.gif | Bin 11505 -> 11794 bytes webcit/tiny_mce/themes/advanced/js/anchor.js | 14 +- webcit/tiny_mce/themes/advanced/js/charmap.js | 10 + webcit/tiny_mce/themes/advanced/js/image.js | 4 +- webcit/tiny_mce/themes/advanced/js/link.js | 11 +- .../themes/advanced/js/source_editor.js | 22 +- webcit/tiny_mce/themes/advanced/langs/de.js | 8 +- .../tiny_mce/themes/advanced/langs/de_dlg.js | 8 +- webcit/tiny_mce/themes/advanced/langs/es.js | 8 +- .../tiny_mce/themes/advanced/langs/es_dlg.js | 4 +- webcit/tiny_mce/themes/advanced/langs/et.js | 62 + .../tiny_mce/themes/advanced/langs/et_dlg.js | 51 + webcit/tiny_mce/themes/advanced/langs/fr.js | 62 + .../tiny_mce/themes/advanced/langs/fr_dlg.js | 51 + webcit/tiny_mce/themes/advanced/langs/hu.js | 62 + .../tiny_mce/themes/advanced/langs/hu_dlg.js | 51 + .../tiny_mce/themes/advanced/langs/it_dlg.js | 10 +- webcit/tiny_mce/themes/advanced/langs/pt.js | 74 +- .../tiny_mce/themes/advanced/langs/pt_dlg.js | 28 +- webcit/tiny_mce/themes/advanced/langs/ru.js | 62 + .../tiny_mce/themes/advanced/langs/ru_dlg.js | 51 + webcit/tiny_mce/themes/advanced/link.htm | 14 +- .../themes/advanced/skins/default/content.css | 10 +- .../themes/advanced/skins/default/dialog.css | 9 +- .../themes/advanced/skins/default/ui.css | 11 +- .../themes/advanced/skins/o2k7/content.css | 10 +- .../themes/advanced/skins/o2k7/dialog.css | 7 +- .../themes/advanced/skins/o2k7/ui.css | 8 +- .../themes/advanced/source_editor.htm | 11 +- .../tiny_mce/themes/simple/editor_template.js | 2 +- .../themes/simple/editor_template_src.js | 10 +- webcit/tiny_mce/themes/simple/langs/de.js | 6 +- webcit/tiny_mce/themes/simple/langs/et.js | 11 + webcit/tiny_mce/themes/simple/langs/fr.js | 11 + webcit/tiny_mce/themes/simple/langs/hu.js | 11 + webcit/tiny_mce/themes/simple/langs/pt.js | 6 +- webcit/tiny_mce/themes/simple/langs/ru.js | 11 + webcit/tiny_mce/tiny_mce.js | 2 +- webcit/tiny_mce/tiny_mce_popup.js | 299 +- webcit/tiny_mce/tiny_mce_src.js | 12610 ++++++++++------ webcit/tiny_mce/utils/editable_selects.js | 9 +- webcit/tiny_mce/utils/form_utils.js | 15 +- webcit/tiny_mce/utils/mctabs.js | 9 +- webcit/tiny_mce/utils/validate.js | 9 +- 260 files changed, 15681 insertions(+), 8774 deletions(-) create mode 100644 webcit/tiny_mce/langs/et.js create mode 100644 webcit/tiny_mce/langs/fr.js create mode 100644 webcit/tiny_mce/langs/hu.js create mode 100644 webcit/tiny_mce/langs/ru.js create mode 100644 webcit/tiny_mce/plugins/advhr/langs/et_dlg.js create mode 100644 webcit/tiny_mce/plugins/advhr/langs/fr_dlg.js create mode 100644 webcit/tiny_mce/plugins/advhr/langs/hu_dlg.js create mode 100644 webcit/tiny_mce/plugins/advhr/langs/ru_dlg.js create mode 100644 webcit/tiny_mce/plugins/advimage/langs/et_dlg.js create mode 100644 webcit/tiny_mce/plugins/advimage/langs/fr_dlg.js create mode 100644 webcit/tiny_mce/plugins/advimage/langs/hu_dlg.js create mode 100644 webcit/tiny_mce/plugins/advimage/langs/ru_dlg.js create mode 100644 webcit/tiny_mce/plugins/advlink/langs/et_dlg.js create mode 100644 webcit/tiny_mce/plugins/advlink/langs/fr_dlg.js create mode 100644 webcit/tiny_mce/plugins/advlink/langs/hu_dlg.js create mode 100644 webcit/tiny_mce/plugins/advlink/langs/ru_dlg.js create mode 100644 webcit/tiny_mce/plugins/advlist/editor_plugin.js create mode 100644 webcit/tiny_mce/plugins/advlist/editor_plugin_src.js create mode 100644 webcit/tiny_mce/plugins/autoresize/editor_plugin.js create mode 100644 webcit/tiny_mce/plugins/autoresize/editor_plugin_src.js create mode 100644 webcit/tiny_mce/plugins/autosave/langs/en.js delete mode 100644 webcit/tiny_mce/plugins/compat2x/editor_plugin.js delete mode 100644 webcit/tiny_mce/plugins/compat2x/editor_plugin_src.js create mode 100644 webcit/tiny_mce/plugins/emotions/langs/et_dlg.js create mode 100644 webcit/tiny_mce/plugins/emotions/langs/fr_dlg.js create mode 100644 webcit/tiny_mce/plugins/emotions/langs/hu_dlg.js create mode 100644 webcit/tiny_mce/plugins/emotions/langs/ru_dlg.js create mode 100644 webcit/tiny_mce/plugins/fullpage/langs/et_dlg.js create mode 100644 webcit/tiny_mce/plugins/fullpage/langs/fr_dlg.js create mode 100644 webcit/tiny_mce/plugins/fullpage/langs/hu_dlg.js create mode 100644 webcit/tiny_mce/plugins/fullpage/langs/ru_dlg.js create mode 100644 webcit/tiny_mce/plugins/legacyoutput/editor_plugin.js create mode 100644 webcit/tiny_mce/plugins/legacyoutput/editor_plugin_src.js create mode 100644 webcit/tiny_mce/plugins/media/langs/et_dlg.js create mode 100644 webcit/tiny_mce/plugins/media/langs/fr_dlg.js create mode 100644 webcit/tiny_mce/plugins/media/langs/hu_dlg.js create mode 100644 webcit/tiny_mce/plugins/media/langs/ru_dlg.js delete mode 100644 webcit/tiny_mce/plugins/paste/blank.htm delete mode 100644 webcit/tiny_mce/plugins/paste/css/blank.css delete mode 100644 webcit/tiny_mce/plugins/paste/css/pasteword.css create mode 100644 webcit/tiny_mce/plugins/paste/langs/et_dlg.js create mode 100644 webcit/tiny_mce/plugins/paste/langs/fr_dlg.js create mode 100644 webcit/tiny_mce/plugins/paste/langs/hu_dlg.js create mode 100644 webcit/tiny_mce/plugins/paste/langs/ru_dlg.js delete mode 100644 webcit/tiny_mce/plugins/safari/blank.htm delete mode 100644 webcit/tiny_mce/plugins/safari/editor_plugin.js delete mode 100644 webcit/tiny_mce/plugins/safari/editor_plugin_src.js create mode 100644 webcit/tiny_mce/plugins/searchreplace/langs/et_dlg.js create mode 100644 webcit/tiny_mce/plugins/searchreplace/langs/fr_dlg.js create mode 100644 webcit/tiny_mce/plugins/searchreplace/langs/hu_dlg.js create mode 100644 webcit/tiny_mce/plugins/searchreplace/langs/ru_dlg.js create mode 100644 webcit/tiny_mce/plugins/style/langs/et_dlg.js create mode 100644 webcit/tiny_mce/plugins/style/langs/fr_dlg.js create mode 100644 webcit/tiny_mce/plugins/style/langs/hu_dlg.js create mode 100644 webcit/tiny_mce/plugins/style/langs/ru_dlg.js create mode 100644 webcit/tiny_mce/plugins/tabfocus/editor_plugin.js create mode 100644 webcit/tiny_mce/plugins/tabfocus/editor_plugin_src.js create mode 100644 webcit/tiny_mce/plugins/table/langs/et_dlg.js create mode 100644 webcit/tiny_mce/plugins/table/langs/fr_dlg.js create mode 100644 webcit/tiny_mce/plugins/table/langs/hu_dlg.js create mode 100644 webcit/tiny_mce/plugins/table/langs/ru_dlg.js create mode 100644 webcit/tiny_mce/plugins/template/langs/et_dlg.js create mode 100644 webcit/tiny_mce/plugins/template/langs/fr_dlg.js create mode 100644 webcit/tiny_mce/plugins/template/langs/hu_dlg.js create mode 100644 webcit/tiny_mce/plugins/template/langs/ru_dlg.js create mode 100644 webcit/tiny_mce/plugins/wordcount/editor_plugin.js create mode 100644 webcit/tiny_mce/plugins/wordcount/editor_plugin_src.js create mode 100644 webcit/tiny_mce/plugins/xhtmlxtras/langs/et_dlg.js create mode 100644 webcit/tiny_mce/plugins/xhtmlxtras/langs/fr_dlg.js create mode 100644 webcit/tiny_mce/plugins/xhtmlxtras/langs/hu_dlg.js create mode 100644 webcit/tiny_mce/plugins/xhtmlxtras/langs/ru_dlg.js create mode 100644 webcit/tiny_mce/themes/advanced/langs/et.js create mode 100644 webcit/tiny_mce/themes/advanced/langs/et_dlg.js create mode 100644 webcit/tiny_mce/themes/advanced/langs/fr.js create mode 100644 webcit/tiny_mce/themes/advanced/langs/fr_dlg.js create mode 100644 webcit/tiny_mce/themes/advanced/langs/hu.js create mode 100644 webcit/tiny_mce/themes/advanced/langs/hu_dlg.js create mode 100644 webcit/tiny_mce/themes/advanced/langs/ru.js create mode 100644 webcit/tiny_mce/themes/advanced/langs/ru_dlg.js create mode 100644 webcit/tiny_mce/themes/simple/langs/et.js create mode 100644 webcit/tiny_mce/themes/simple/langs/fr.js create mode 100644 webcit/tiny_mce/themes/simple/langs/hu.js create mode 100644 webcit/tiny_mce/themes/simple/langs/ru.js diff --git a/webcit/tiny_mce/langs/da.js b/webcit/tiny_mce/langs/da.js index 6b638c6b0..7fdce8275 100644 --- a/webcit/tiny_mce/langs/da.js +++ b/webcit/tiny_mce/langs/da.js @@ -91,7 +91,9 @@ desc:"Rediger CSS stil" paste:{ paste_text_desc:"Inds\u00E6t ikke-formatteret tekst", paste_word_desc:"Inds\u00E6t fra Word", -selectall_desc:"V\u00E6lg alle" +selectall_desc:"V\u00E6lg alle", +plaintext_mode_sticky:"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.", +plaintext_mode:"Paste is now in plain text mode. Click again to toggle back to regular paste mode." }, paste_dlg:{ text_title:"Anvend CTRL+V p\u00E5 tastaturet for at inds\u00E6tte teksten.", @@ -121,7 +123,9 @@ col:"Kolonne", cell:"Celle" }, autosave:{ -unload_msg:"Har du foretaget nogle \u00E6ndringer, vil de g\u00E5 tabt, hvis du navigerer v\u00E6k fra denne side." +unload_msg:"Har du foretaget nogle \u00E6ndringer, vil de g\u00E5 tabt, hvis du navigerer v\u00E6k fra denne side.", +restore_content:"Restore auto-saved content.", +warning_message:"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?." }, fullscreen:{ desc:"Vis/skjul fuldsk\u00E6rmstilstand" @@ -152,4 +156,16 @@ no_mpell:"Ingen stavefejl fundet." }, pagebreak:{ desc:"Inds\u00E6t sideskift." +}, +advlist:{ +types:"Types", +def:"Default", +lower_alpha:"Lower alpha", +lower_greek:"Lower greek", +lower_roman:"Lower roman", +upper_alpha:"Upper alpha", +upper_roman:"Upper roman", +circle:"Circle", +disc:"Disc", +square:"Square" }}}); \ No newline at end of file diff --git a/webcit/tiny_mce/langs/de.js b/webcit/tiny_mce/langs/de.js index 3384a12b7..937c5bf17 100644 --- a/webcit/tiny_mce/langs/de.js +++ b/webcit/tiny_mce/langs/de.js @@ -1,25 +1,25 @@ tinyMCE.addI18n({de:{ common:{ -edit_confirm:"Wollen Sie diesen Textbereich mit WYSIWYG bearbeiten?", +edit_confirm:"M\u00F6chten Sie diesen Text jetzt bearbeiten?", apply:"\u00DCbernehmen", insert:"Einf\u00FCgen", update:"Aktualisieren", cancel:"Abbrechen", close:"Schlie\u00DFen", browse:"Durchsuchen", -class_name:"Klasse", -not_set:"-- Nicht gesetzt --", +class_name:"CSS-Klasse", +not_set:"- unbestimmt -", clipboard_msg:"Kopieren, Ausschneiden und Einf\u00FCgen sind im Mozilla Firefox nicht m\u00F6glich.\nM\u00F6chten Sie mehr \u00FCber dieses Problem erfahren?", clipboard_no_support:"Wird derzeit in Ihrem Browser nicht unterst\u00FCtzt. Bitte benutzen Sie stattdessen die Tastenk\u00FCrzel.", -popup_blocked:"Leider hat Ihr Popup-Blocker ein Fenster unterbunden, das f\u00FCr den Betrieb dieses Programms n\u00F6tig ist. Bitte deaktivieren Sie den Popup-Blocker, um die volle Funktionalit\u00E4t zu erlangen.", +popup_blocked:"Leider hat Ihr Popup-Blocker ein Fenster unterbunden, das f\u00FCr den Betrieb dieses Programms n\u00F6tig ist. Bitte deaktivieren Sie den Popup-Blocker f\u00FCr diese Seite.", invalid_data:"Fehler: Sie haben ung\u00FCltige Werte eingegeben (rot markiert).", more_colors:"Weitere Farben" }, contextmenu:{ align:"Ausrichtung", -left:"Links", -center:"Mittig", -right:"Rechts", +left:"Linksb\u00FCndig", +center:"Zentriert", +right:"Rechtsb\u00FCndig", full:"Blocksatz" }, insertdatetime:{ @@ -28,7 +28,7 @@ time_fmt:"%H:%M:%S", insertdate_desc:"Datum einf\u00FCgen", inserttime_desc:"Zeit einf\u00FCgen", months_long:"Januar,Februar,M\u00E4rz,April,Mai,Juni,Juli,August,September,Oktober,November,Dezember", -months_short:"Jan,Feb,M\u00E4rz,Apr,Mai,Juni,Juli,Aug,Sept,Okt,Nov,Dez", +months_short:"Jan,Feb,M\u00E4r,Apr,Mai,Juni,Juli,Aug,Sept,Okt,Nov,Dez", day_long:"Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,Freitag,Samstag,Sonntag", day_short:"So,Mo,Di,Mi,Do,Fr,Sa,So" }, @@ -44,8 +44,8 @@ rtl_desc:"Schrift von rechts nach links" }, layer:{ insertlayer_desc:"Neue Ebene einf\u00FCgen", -forward_desc:"Vor verschieben", -backward_desc:"Zur\u00FCck verschieben", +forward_desc:"Nach vorne holen", +backward_desc:"Nach hinten legen", absolute_desc:"Absolute Positionierung", content:"Neue Ebene..." }, @@ -88,9 +88,11 @@ style:{ desc:"CSS-Styles bearbeiten" }, paste:{ -paste_text_desc:"Als normalen Text einf\u00FCgen", +paste_text_desc:"Als einfachen Text einf\u00FCgen", paste_word_desc:"Mit Formatierungen (aus Word) einf\u00FCgen", -selectall_desc:"Alles ausw\u00E4hlen" +selectall_desc:"Alles ausw\u00E4hlen", +plaintext_mode_sticky:"Einf\u00FCgemodus ist nun \"Nur Text\". Erneut klicken (oder das Einf\u00FCgen aus der Zwischenablage) stellt den Normalmodus wieder her.", +plaintext_mode:"Einf\u00FCgemodus ist nun \"Nur Text\". Erneut klicken stellt den Normalmodus wieder her." }, paste_dlg:{ text_title:"Dr\u00FCcken Sie auf Ihrer Tastatur Strg+V, um den Text einzuf\u00FCgen.", @@ -98,15 +100,15 @@ text_linebreaks:"Zeilenumbr\u00FCche beibehalten", word_title:"Dr\u00FCcken Sie auf Ihrer Tastatur Strg+V, um den Text einzuf\u00FCgen." }, table:{ -desc:"Tabelle erstellen", +desc:"Tabelle erstellen/bearbeiten", row_before_desc:"Zeile oberhalb einf\u00FCgen", row_after_desc:"Zeile unterhalb einf\u00FCgen", -delete_row_desc:"Zeile entfernen", +delete_row_desc:"Zeile l\u00F6schen", col_before_desc:"Spalte links einf\u00FCgen", col_after_desc:"Spalte rechts einf\u00FCgen", delete_col_desc:"Spalte l\u00F6schen", -split_cells_desc:"Vereinte Zellen trennen", -merge_cells_desc:"Zellen vereinen", +split_cells_desc:"Verbundene Zellen trennen", +merge_cells_desc:"Zellen verbinden", row_desc:"Eigenschaften der Zeile", cell_desc:"Eigenschaften der Zelle", props_desc:"Eigenschaften der Tabelle", @@ -114,14 +116,16 @@ paste_row_before_desc:"Zeile oberhalb aus der Zwischenablage einf\u00FCgen", paste_row_after_desc:"Zeile unterhalb aus der Zwischenablage einf\u00FCgen", cut_row_desc:"Zeile ausschneiden", copy_row_desc:"Zeile kopieren", -del:"Tabelle entfernen", +del:"Tabelle l\u00F6schen", row:"Zeile", col:"Spalte", cell:"Zelle", cellprops_delta_width:"150" }, autosave:{ -unload_msg:"Ihre \u00C4nderungen werden verloren gehen, wenn Sie die Seite verlassen." +unload_msg:"Ihre \u00C4nderungen werden verloren gehen, wenn Sie die Seite verlassen.", +restore_content:"Automatisch gespeicherten Inhalt wiederherstellen.", +warning_message:"Wenn Sie den Inhalt wiederherstellen, gehen die aktuellen Daten im Editor verloren.\n\nSind sie sicher, dass Sie den Inhalt wiederherstellen m\u00F6chten?" }, fullscreen:{ desc:"Vollbildschirm" @@ -134,10 +138,10 @@ fullpage:{ desc:"Dokument-Eigenschaften" }, template:{ -desc:"Vorgefertigten Vorlageninhalt einf\u00FCgen" +desc:"Inhalt aus Vorlage einf\u00FCgen" }, visualchars:{ -desc:"Sichtbarkeit der Steuerzeichen an/aus." +desc:"Sichtbarkeit der Steuerzeichen an/aus" }, spellchecker:{ desc:"Rechtschreibpr\u00FCfung an/aus", @@ -151,5 +155,17 @@ no_sug:"Keine Vorschl\u00E4ge", no_mpell:"Keine Rechtschreibfehler gefunden." }, pagebreak:{ -desc:"Seitenumbruch Einf\u00FCgen." +desc:"Seitenumbruch einf\u00FCgen" +}, +advlist:{ +types:"Typen", +def:"Standard", +lower_alpha:"a. b. c.", +lower_greek:"1. 2. 3.", +lower_roman:"i. ii. iii.", +upper_alpha:"A. B. C.", +upper_roman:"I. II. III.", +circle:"Kreis", +disc:"Punkt", +square:"Quadrat" }}}); \ No newline at end of file diff --git a/webcit/tiny_mce/langs/en.js b/webcit/tiny_mce/langs/en.js index 8519b4de7..ea4a1b0e1 100644 --- a/webcit/tiny_mce/langs/en.js +++ b/webcit/tiny_mce/langs/en.js @@ -90,7 +90,9 @@ desc:"Edit CSS Style" paste:{ paste_text_desc:"Paste as Plain Text", paste_word_desc:"Paste from Word", -selectall_desc:"Select All" +selectall_desc:"Select All", +plaintext_mode_sticky:"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.", +plaintext_mode:"Paste is now in plain text mode. Click again to toggle back to regular paste mode." }, paste_dlg:{ text_title:"Use CTRL+V on your keyboard to paste the text into the window.", @@ -120,7 +122,9 @@ col:"Column", cell:"Cell" }, autosave:{ -unload_msg:"The changes you made will be lost if you navigate away from this page." +unload_msg:"The changes you made will be lost if you navigate away from this page.", +restore_content:"Restore auto-saved content.", +warning_message:"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?." }, fullscreen:{ desc:"Toggle fullscreen mode" @@ -151,4 +155,16 @@ no_mpell:"No misspellings found." }, pagebreak:{ desc:"Insert page break." +}, +advlist:{ +types:"Types", +def:"Default", +lower_alpha:"Lower alpha", +lower_greek:"Lower greek", +lower_roman:"Lower roman", +upper_alpha:"Upper alpha", +upper_roman:"Upper roman", +circle:"Circle", +disc:"Disc", +square:"Square" }}}); \ No newline at end of file diff --git a/webcit/tiny_mce/langs/es.js b/webcit/tiny_mce/langs/es.js index 6509cb97b..d9ab9a691 100644 --- a/webcit/tiny_mce/langs/es.js +++ b/webcit/tiny_mce/langs/es.js @@ -90,7 +90,9 @@ desc:"Editar Estilo CSS" paste:{ paste_text_desc:"Pegar como texto plano", paste_word_desc:"Pegar desde Word", -selectall_desc:"Seleccionar todo" +selectall_desc:"Elegir todo", +plaintext_mode_sticky:"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.", +plaintext_mode:"Paste is now in plain text mode. Click again to toggle back to regular paste mode." }, paste_dlg:{ text_title:"Use CTRL+V en su teclado para pegar el texto en la ventana.", @@ -120,7 +122,9 @@ col:"Columna", cell:"Celda" }, autosave:{ -unload_msg:"Los cambios realizados se perder\u00E1n si sale de esta p\u00E1gina." +unload_msg:"Los cambios realizados se perder\u00E1n si sale de esta p\u00E1gina.", +restore_content:"Reestablecer contenido guardado autom\u00E1ticamente", +warning_message:"Se reestablece en contenido guardado, perder\u00E1 todo el contenido que est\u00E1 actualmente en el editor.\n\nEst\u00E1 seguro de que quiere reestablecer el contenido guardado." }, fullscreen:{ desc:"Cambiar a modo Pantalla Completa" @@ -130,7 +134,9 @@ desc:"Insertar/editar medio embebido", edit:"Editar medio embebido" }, fullpage:{ -desc:"Propiedades del documento" +desc:"Propiedades del documento", +delta_width:"Ancho", +delta_height:"Alto" }, template:{ desc:"Insertar contenido de plantilla predefinida" @@ -151,4 +157,16 @@ no_mpell:"No se encontraron errores." }, pagebreak:{ desc:"Insertar fin de p\u00E1gina" +}, +advlist:{ +types:"Tipo", +def:"Preestablecido", +lower_alpha:"Menos opaco", +lower_greek:"Menos greek", +lower_roman:"Menos roman", +upper_alpha:"M\u00E1s opaco", +upper_roman:"M\u00E1s roman", +circle:"Circulo", +disc:"Disc", +square:"Cuadro" }}}); \ No newline at end of file diff --git a/webcit/tiny_mce/langs/et.js b/webcit/tiny_mce/langs/et.js new file mode 100644 index 000000000..43686727d --- /dev/null +++ b/webcit/tiny_mce/langs/et.js @@ -0,0 +1,170 @@ +tinyMCE.addI18n({et:{ +common:{ +edit_confirm:"Kas soovite kasutada WYSIWYG re\u017Eiimi sellel tekstialal?", +apply:"Rakenda", +insert:"Sisesta", +update:"Uuenda", +cancel:"T\u00FChista", +close:"Sule", +browse:"Sirvi", +class_name:"Klass", +not_set:"-- Seadmata --", +clipboard_msg:"Kopeeri/L\u00F5ika/Kleebi ei ole saadaval Mozillas ja Firefoxis.\nKas soovite rohkem infot selle probleemi kohta?", +clipboard_no_support:"Hetkel ei ole toetatud Teie lehitseja poolt, kasutage klaviatuuri otseteid selle asemel.", +popup_blocked:"Vabandust, aga Teie h\u00FCpikakna t\u00F5kestaja on blokeerinud akna, mis varustab rakenduse funktsionaalsust. Palun lubage h\u00FCpikaknad sellel kodulehel, et t\u00E4ielikult kasutada seda vahendit.", +invalid_data:"Viga: Kehtetud v\u00E4\u00E4rtused sisestatud, need on m\u00E4rgitud punasega.", +more_colors:"Rohkem v\u00E4rve" +}, +contextmenu:{ +align:"Joondus", +left:"Vasak", +center:"Kesk", +right:"Parem", +full:"T\u00E4is" +}, +insertdatetime:{ +date_fmt:"%A-%k-%p", +time_fmt:"%T:%M:%S", +insertdate_desc:"Sisesta kuup\u00E4ev", +inserttime_desc:"Sisesta aeg", +months_long:"Jaanuar,Veebruar,M\u00E4rts,Aprill,Mai,Juuni,Juuli,August,September,Oktoober,November,Detsember", +months_short:"Jaan,Veeb,M\u00E4rts,Apr,Mai,Juuni,Juuli,Aug,Sept,Okt,Nov,Dets", +day_long:"P\u00FChap\u00E4ev,Esmasp\u00E4ev,Teisip\u00E4ev,Kolmap\u00E4ev,Neljap\u00E4ev,Reede,Laup\u00E4ev,P\u00FChap\u00E4ev", +day_short:"P,E,T,K,N,R,L,P" +}, +print:{ +print_desc:"Print" +}, +preview:{ +preview_desc:"Eelvaade" +}, +directionality:{ +ltr_desc:"Suund vasakult paremale", +rtl_desc:"Suund paremalt vasakule" +}, +layer:{ +insertlayer_desc:"Sisesta uus kiht", +forward_desc:"Liiguta edasi", +backward_desc:"Liiguta tagasi", +absolute_desc:"L\u00FClita \u00FCmber absoluutne positsioneerimine", +content:"Uus kiht..." +}, +save:{ +save_desc:"Salvesta", +cancel_desc:"T\u00FChista k\u00F5ik muudatused" +}, +nonbreaking:{ +nonbreaking_desc:"Sisesta mittekatkestav t\u00FChik" +}, +iespell:{ +iespell_desc:"\u00D5igekirja kontroll", +download:"ie\u00D5igekiri tuvastamata. Kas soovite paigaldada n\u00FC\u00FCd?" +}, +advhr:{ +advhr_desc:"Horisontaalne joonlaud" +}, +emotions:{ +emotions_desc:"Emotsioonid" +}, +searchreplace:{ +search_desc:"Otsi", +replace_desc:"Otsi/Asenda" +}, +advimage:{ +image_desc:"Sisesta/redigeeri pilt" +}, +advlink:{ +link_desc:"Sisesta/redigeeri link" +}, +xhtmlxtras:{ +cite_desc:"Tsitaat", +abbr_desc:"L\u00FChend", +acronym_desc:"Akron\u00FC\u00FCm", +del_desc:"Kustutus", +ins_desc:"Lisandus", +attribs_desc:"Sisesta muuda atribuute" +}, +style:{ +desc:"Redigeeri CSS stiili" +}, +paste:{ +paste_text_desc:"Kleebi tavalise tekstina", +paste_word_desc:"Kleebi Wordist", +selectall_desc:"Vali k\u00F5ik", +plaintext_mode_sticky:"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.", +plaintext_mode:"Paste is now in plain text mode. Click again to toggle back to regular paste mode." +}, +paste_dlg:{ +text_title:"Vajuta CTRL+V oma klaviatuuril teksti aknasse kleepimiseks.", +text_linebreaks:"J\u00E4ta reavahetused", +word_title:"Vajuta CTRL+V oma klaviatuuril teksti aknasse kleepimiseks." +}, +table:{ +desc:"Sisestab uue tabeli", +row_before_desc:"Sisesta rida ette", +row_after_desc:"Sisesta rida j\u00E4rgi", +delete_row_desc:"Kustuta rida", +col_before_desc:"Sisesta veerg ette", +col_after_desc:"Sisesta veerg j\u00E4rgi", +delete_col_desc:"Kustuta veerg", +split_cells_desc:"Eralda \u00FChendatud tabeli lahtrid", +merge_cells_desc:"\u00DChenda tabeli lahtrid", +row_desc:"Tabeli rea omadused", +cell_desc:"Tabeli lahtri omadused", +props_desc:"Tabeli omadused", +paste_row_before_desc:"Kleebi tabeli rida ette", +paste_row_after_desc:"Kleebi tabeli rida j\u00E4rgi", +cut_row_desc:"L\u00F5ika tabeli rida", +copy_row_desc:"Kopeeri tabeli rida", +del:"Kustuta tabel", +row:"Rida", +col:"Veerg", +cell:"Lahter" +}, +autosave:{ +unload_msg:"Tehtud muudatused kaovad, kui lahkute siit lehelt.", +restore_content:"Restore auto-saved content.", +warning_message:"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?." +}, +fullscreen:{ +desc:"L\u00FClita \u00FCmber t\u00E4isekraani re\u017Eiim" +}, +media:{ +desc:"Sisesta / redigeeri manustatud meedia", +edit:"Redigeeri manustatud meedia" +}, +fullpage:{ +desc:"Dokumendi omadused" +}, +template:{ +desc:"Sisesta eeldefineeritud \u0161ablooni sisu" +}, +visualchars:{ +desc:"Visuaalsed kontrollt\u00E4hem\u00E4rgid sisse/v\u00E4lja" +}, +spellchecker:{ +desc:"L\u00FClita \u00FCmber \u00F5igekirja kontroll", +menu:"\u00D5igekirja kontrolli seaded", +ignore_word:"J\u00E4ta s\u00F5na vahele", +ignore_words:"J\u00E4ra k\u00F5ik vahele", +langs:"Keeled", +wait:"Palun oota...", +sug:"Soovitused", +no_sug:"Soovitusi pole", +no_mpell:"Valesti kirjutamisi ei leitud." +}, +pagebreak:{ +desc:"Sisesta lehevahetus." +}, +advlist:{ +types:"Types", +def:"Default", +lower_alpha:"Lower alpha", +lower_greek:"Lower greek", +lower_roman:"Lower roman", +upper_alpha:"Upper alpha", +upper_roman:"Upper roman", +circle:"Circle", +disc:"Disc", +square:"Square" +}}}); \ No newline at end of file diff --git a/webcit/tiny_mce/langs/fr.js b/webcit/tiny_mce/langs/fr.js new file mode 100644 index 000000000..64421488a --- /dev/null +++ b/webcit/tiny_mce/langs/fr.js @@ -0,0 +1,170 @@ +tinyMCE.addI18n({fr:{ +common:{ +edit_confirm:"Souhaitez-vous utiliser le mode WYSIWYG pour cette zone de texte ?", +apply:"Appliquer", +insert:"Ins\u00E9rer", +update:"Mettre \u00E0 jour", +cancel:"Annuler", +close:"Fermer", +browse:"parcourir", +class_name:"Classe", +not_set:"-- non d\u00E9fini --", +clipboard_msg:"Les fonctions Copier/Couper/Coller ne sont pas valables sur Mozilla et Firefox.\nSouhaitez-vous avoir plus d'informations sur ce sujet ?", +clipboard_no_support:"Actuellement non support\u00E9 par votre navigateur.\n Veuillez utiliser les raccourcis clavier \u00E0 la place.", +popup_blocked:"D\u00E9sol\u00E9, nous avons d\u00E9tect\u00E9 que votre bloqueur de popup a bloqu\u00E9 une fen\u00EAtre dont l'application a besoin. Vous devez d\u00E9sactiver votre bloqueur de popup pour pouvoir utiliser cet outil.", +invalid_data:"Erreur : saisie de valeurs incorrectes. Elles sont mises en \u00E9vidence en rouge.", +more_colors:"Plus de couleurs" +}, +contextmenu:{ +align:"Alignement", +left:"Gauche", +center:"Centr\u00E9", +right:"Droite", +full:"Justifi\u00E9" +}, +insertdatetime:{ +date_fmt:"%d-%m-%Y", +time_fmt:"%H:%M:%S", +insertdate_desc:"Ins\u00E9rer la date", +inserttime_desc:"Ins\u00E9rer l'heure", +months_long:"Janvier,F\u00E9vrier,Mars,Avril,Mai,Juin,Juillet,Ao\u00FBt,Septembre,Octobre,Novembre,D\u00E9cembre", +months_short:"Jan,F\u00E9v,Mar,Avr,Mai,Juin,Juil,Ao\u00FBt,Sep,Oct,Nov,D\u00E9c", +day_long:"Dimanche,Lundi,Mardi,Mercredi,Jeudi,Vendredi,Samedi,Dimanche", +day_short:"Dim,Lun,Mar,Mer,Jeu,Ven,Sam,Dim" +}, +print:{ +print_desc:"Imprimer" +}, +preview:{ +preview_desc:"Pr\u00E9visualiser" +}, +directionality:{ +ltr_desc:"\u00C9criture de gauche \u00E0 droite", +rtl_desc:"\u00C9criture de droite \u00E0 gauche" +}, +layer:{ +insertlayer_desc:"Ins\u00E9rer une nouvelle couche", +forward_desc:"D\u00E9placer vers l'avant", +backward_desc:"D\u00E9placer vers l'arri\u00E8re", +absolute_desc:"Activer le positionnement absolu", +content:"Nouvelle couche\u2026" +}, +save:{ +save_desc:"Enregistrer", +cancel_desc:"Annuler toutes les modifications" +}, +nonbreaking:{ +nonbreaking_desc:"Ins\u00E9rer une espace ins\u00E9cable" +}, +iespell:{ +iespell_desc:"Lancer le v\u00E9rificateur d'orthographe", +download:"ieSpell n'est pas install\u00E9. Souhaitez-vous l'installer maintenant ?" +}, +advhr:{ +advhr_desc:"Ins\u00E9rer un trait horizontal" +}, +emotions:{ +emotions_desc:"\u00C9motic\u00F4nes" +}, +searchreplace:{ +search_desc:"Rechercher", +replace_desc:"Rechercher / remplacer" +}, +advimage:{ +image_desc:"Ins\u00E9rer / \u00E9diter une image" +}, +advlink:{ +link_desc:"Ins\u00E9rer / \u00E9diter un lien" +}, +xhtmlxtras:{ +cite_desc:"Citation", +abbr_desc:"Abr\u00E9viation", +acronym_desc:"Acronyme", +del_desc:"Barr\u00E9", +ins_desc:"Ins\u00E9r\u00E9", +attribs_desc:"Ins\u00E9rer / \u00E9diter les attributs" +}, +style:{ +desc:"\u00C9diter la feuille de style (CSS)" +}, +paste:{ +paste_text_desc:"Coller comme texte brut", +paste_word_desc:"Coller un texte cr\u00E9\u00E9 sous Word", +selectall_desc:"Tout s\u00E9lectionner", +plaintext_mode_sticky:"Le collage est actuellement en mode texte non format\u00E9. Cliquez \u00E0 nouveau pour revenir en mode de collage ordinaire. Apr\u00E8s avoir coll\u00E9 quelque chose, vous retournerez en mode de collage ordinaire.", +plaintext_mode:"Le collage est actuellement en mode texte non format\u00E9. Cliquez \u00E0 nouveau pour revenir en mode de collage ordinaire." +}, +paste_dlg:{ +text_title:"Utilisez CTRL+V sur votre clavier pour coller le texte dans la fen\u00EAtre.", +text_linebreaks:"Conserver les retours \u00E0 la ligne", +word_title:"Utilisez CTRL+V sur votre clavier pour coller le texte dans la fen\u00EAtre." +}, +table:{ +desc:"Ins\u00E9rer un nouveau tableau", +row_before_desc:"Ins\u00E9rer une ligne avant", +row_after_desc:"Ins\u00E9rer une ligne apr\u00E8s", +delete_row_desc:"Effacer la ligne", +col_before_desc:"Ins\u00E9rer une colonne avant", +col_after_desc:"Ins\u00E9rer une colonne apr\u00E8s", +delete_col_desc:"Effacer la colonne", +split_cells_desc:"Scinder les cellules fusionn\u00E9es", +merge_cells_desc:"Fusionner les cellules", +row_desc:"Propri\u00E9t\u00E9s de la ligne", +cell_desc:"Propri\u00E9t\u00E9s de la cellule", +props_desc:"Propri\u00E9t\u00E9s du tableau", +paste_row_before_desc:"Coller la ligne avant", +paste_row_after_desc:"Coller la ligne apr\u00E8s", +cut_row_desc:"Couper la ligne", +copy_row_desc:"Copier la ligne", +del:"Effacer le tableau", +row:"Ligne", +col:"Colonne", +cell:"Cellule" +}, +autosave:{ +unload_msg:"Les modifications apport\u00E9es seront perdus si vous quittez cette page.", +restore_content:"Restaurer le contenu auto-sauvegard\u00E9.", +warning_message:"Si vous restaurez le contenu sauv\u00E9, vous perdrez le contenu qui est actuellement dans l'\u00E9diteur.\n\n\u00CAtes-vous s\u00FBr de vouloir restaurer le contenu sauv\u00E9 ?" +}, +fullscreen:{ +desc:"Passer en mode plein \u00E9cran" +}, +media:{ +desc:"Ins\u00E9rer / \u00E9diter un m\u00E9dia incorpor\u00E9", +edit:"\u00C9diter un m\u00E9dia incorpor\u00E9" +}, +fullpage:{ +desc:"Propri\u00E9t\u00E9s du document" +}, +template:{ +desc:"Ins\u00E9rer un mod\u00E8le pr\u00E9d\u00E9fini." +}, +visualchars:{ +desc:"Activer les caract\u00E8res de mise en page." +}, +spellchecker:{ +desc:"Activer le v\u00E9rificateur d'orthographe", +menu:"Param\u00E8tres du v\u00E9rificateur d'orthographe", +ignore_word:"Ignorer le mot", +ignore_words:"Tout ignorer", +langs:"Langues", +wait:"Veuillez patienter\u2026", +sug:"Suggestions", +no_sug:"Aucune suggestion", +no_mpell:"Aucune erreur trouv\u00E9e." +}, +pagebreak:{ +desc:"Ins\u00E9rer un saut de page." +}, +advlist:{ +types:"Types", +def:"Defaut", +lower_alpha:"Alpha minuscule", +lower_greek:"Grec minuscule", +lower_roman:"Romain minuscule", +upper_alpha:"Alpha majuscule", +upper_roman:"Romain majuscule", +circle:"Cercle", +disc:"Disque", +square:"Carr\u00E9" +}}}); \ No newline at end of file diff --git a/webcit/tiny_mce/langs/hu.js b/webcit/tiny_mce/langs/hu.js new file mode 100644 index 000000000..e83ec9d71 --- /dev/null +++ b/webcit/tiny_mce/langs/hu.js @@ -0,0 +1,170 @@ +tinyMCE.addI18n({hu:{ +common:{ +edit_confirm:"Haszn\u00E1lni k\u00EDv\u00E1nja a sz\u00F6vegszerkeszt\u0151 m\u00F3dot ebben a sz\u00F6vegdobozban?", +apply:"Alkalmaz\u00E1s", +insert:"Besz\u00FAr\u00E1s", +update:"Friss\u00EDt\u00E9s", +cancel:"M\u00E9gsem", +close:"Bez\u00E1r\u00E1s", +browse:"Tall\u00F3z\u00E1s", +class_name:"Oszt\u00E1ly", +not_set:"-- Nincs megadva --", +clipboard_msg:"A M\u00E1sol\u00E1s/Kiv\u00E1g\u00E1s/Besz\u00FAr\u00E1s funkci\u00F3k nem \u00E9rhet\u0151ek el Mozilla \u00E9s Firefox alatt.\nK\u00EDv\u00E1n t\u00F6bbet tudni err\u0151l a t\u00E9m\u00E1r\u00F3l?", +clipboard_no_support:"Jelenleg nem t\u00E1mogatja a b\u00F6ng\u00E9sz\u0151je, haszn\u00E1lja a billenty\u0171kombin\u00E1ci\u00F3kat helyette.", +popup_blocked:"A felugr\u00F3 ablakok tilt\u00E1sa miatt nem siker\u00FClt megjelen\u00EDteni egy, az alkalmaz\u00E1shoz sz\u00FCks\u00E9ges ablakot. Enged\u00E9lyezze a b\u00F6ng\u00E9sz\u0151j\u00E9ben a felugr\u00F3 ablakokat, hogy minden funkci\u00F3t haszn\u00E1lhasson.", +invalid_data:"Hiba: \u00C9rv\u00E9nytelen adatok, pirossal jel\u00F6lve.", +more_colors:"T\u00F6bb sz\u00EDn" +}, +contextmenu:{ +align:"Igaz\u00EDt\u00E1s", +left:"Balra", +center:"K\u00F6z\u00E9pre", +right:"Jobbra", +full:"Sorkiz\u00E1r\u00E1s" +}, +insertdatetime:{ +date_fmt:"%Y.%m.%d.", +time_fmt:"%H:%M:%S", +insertdate_desc:"D\u00E1tum besz\u00FAr\u00E1sa", +inserttime_desc:"Id\u0151 besz\u00FAr\u00E1sa", +months_long:"janu\u00E1r,febru\u00E1r,m\u00E1rcius,\u00E1prilis,m\u00E1jus,j\u00FAnius,j\u00FAlius,augusztus,szeptember,okt\u00F3ber,november,december", +months_short:"jan,feb,m\u00E1r,\u00E1pr,m\u00E1j,j\u00FAn,j\u00FAl,aug,szept,okt,nov,dec", +day_long:"vas\u00E1rnap,h\u00E9tf\u0151,kedd,szerda,cs\u00FCt\u00F6rt\u00F6k,p\u00E9ntek,szombat,vas\u00E1rnap", +day_short:"V,H,K,Sze,Cs,P,Szo,V" +}, +print:{ +print_desc:"Nyomtat\u00E1s" +}, +preview:{ +preview_desc:"El\u0151n\u00E9zet" +}, +directionality:{ +ltr_desc:"Balr\u00F3l jobbra", +rtl_desc:"Jobbr\u00F3l balra" +}, +layer:{ +insertlayer_desc:"\u00DAj r\u00E9teg besz\u00FAr\u00E1sa", +forward_desc:"Mozgat\u00E1s el\u0151re", +backward_desc:"Mozgat\u00E1s h\u00E1tra", +absolute_desc:"Abszol\u00FAt poz\u00EDci\u00F3 ki-/bekapcsol\u00E1sa", +content:"\u00DAj r\u00E9teg..." +}, +save:{ +save_desc:"Ment\u00E9s", +cancel_desc:"\u00D6sszes v\u00E1ltoz\u00E1s visszavon\u00E1sa" +}, +nonbreaking:{ +nonbreaking_desc:"Nemsort\u00F6r\u0151 sz\u00F3k\u00F6z besz\u00FAr\u00E1sa" +}, +iespell:{ +iespell_desc:"Helyes\u00EDr\u00E1s-ellen\u0151rz\u00E9s futtat\u00E1sa", +download:"ieSpell nem tal\u00E1lhat\u00F3. Telep\u00EDti most?" +}, +advhr:{ +advhr_desc:"V\u00EDzszintes vonal" +}, +emotions:{ +emotions_desc:"Hangulatjelek" +}, +searchreplace:{ +search_desc:"Keres\u00E9s", +replace_desc:"Keres\u00E9s/Csere" +}, +advimage:{ +image_desc:"K\u00E9p besz\u00FAr\u00E1sa/szerkeszt\u00E9se" +}, +advlink:{ +link_desc:"Link besz\u00FAr\u00E1sa/szerkeszt\u00E9s" +}, +xhtmlxtras:{ +cite_desc:"Id\u00E9zet", +abbr_desc:"R\u00F6vid\u00EDt\u00E9s", +acronym_desc:"Bet\u0171sz\u00F3", +del_desc:"T\u00F6r\u00F6lt", +ins_desc:"Besz\u00FArt", +attribs_desc:"Tulajdons\u00E1gok besz\u00FAr\u00E1sa/szerkeszt\u00E9se" +}, +style:{ +desc:"CSS st\u00EDlus szerkeszt\u00E9se" +}, +paste:{ +paste_text_desc:"Besz\u00FAr\u00E1s sz\u00F6vegk\u00E9nt", +paste_word_desc:"Besz\u00FAr\u00E1s Wordb\u0151l", +selectall_desc:"Mindent kijel\u00F6l", +plaintext_mode_sticky:"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.", +plaintext_mode:"Paste is now in plain text mode. Click again to toggle back to regular paste mode." +}, +paste_dlg:{ +text_title:"Haszn\u00E1lja a Ctrl+V-t a billenty\u0171zet\u00E9n a beilleszt\u00E9shez.", +text_linebreaks:"Sort\u00F6r\u00E9sek megtart\u00E1sa", +word_title:"Haszn\u00E1lja a Ctrl+V-t a billenty\u0171zet\u00E9n a beilleszt\u00E9shez." +}, +table:{ +desc:"T\u00E1bl\u00E1zat besz\u00FAr\u00E1sa/szerkeszt\u00E9se", +row_before_desc:"Sor besz\u00FAr\u00E1sa el\u00E9", +row_after_desc:"Sor besz\u00FAr\u00E1sa ut\u00E1na", +delete_row_desc:"Sor t\u00F6rl\u00E9se", +col_before_desc:"Oszlop besz\u00FAr\u00E1sa el\u00E9", +col_after_desc:"Oszlop besz\u00FAr\u00E1sa ut\u00E1na", +delete_col_desc:"Oszlop t\u00F6rl\u00E9se", +split_cells_desc:"Cell\u00E1k feloszt\u00E1sa", +merge_cells_desc:"Cell\u00E1k \u00F6sszevon\u00E1sa", +row_desc:"Sor tulajdons\u00E1gai", +cell_desc:"Cella tulajdons\u00E1gai", +props_desc:"T\u00E1bl\u00E1zat tulajdons\u00E1gai", +paste_row_before_desc:"Sor bem\u00E1sol\u00E1sa el\u00E9", +paste_row_after_desc:"Sor bem\u00E1sol\u00E1sa ut\u00E1na", +cut_row_desc:"Sor kiv\u00E1g\u00E1sa", +copy_row_desc:"Sor m\u00E1sol\u00E1sa", +del:"T\u00E1bl\u00E1zat t\u00F6rl\u00E9se", +row:"Sor", +col:"Oszlop", +cell:"Cella" +}, +autosave:{ +unload_msg:"A m\u00F3dos\u00EDt\u00E1sok nem lesznek mentve, ha elhagyja az oldalt.", +restore_content:"Restore auto-saved content.", +warning_message:"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?." +}, +fullscreen:{ +desc:"Teljesk\u00E9perny\u0151s m\u00F3d ki-/bekapcsol\u00E1sa" +}, +media:{ +desc:"Be\u00E1gyazott m\u00E9dia besz\u00FAr\u00E1sa/szerkeszt\u00E9se", +edit:"Be\u00E1gyazott m\u00E9dia szerkeszt\u00E9se" +}, +fullpage:{ +desc:"Dokumentum tulajdons\u00E1gai" +}, +template:{ +desc:"Sablon beilleszt\u00E9se" +}, +visualchars:{ +desc:"Vizu\u00E1lis vez\u00E9rl\u0151karakterek be/ki." +}, +spellchecker:{ +desc:"Helyes\u00EDr\u00E1s-ellen\u0151rz\u0151 ki-/bekapcsol\u00E1sa", +menu:"Helyes\u00EDr\u00E1s-ellen\u0151rz\u0151 tulajdons\u00E1gai", +ignore_word:"Sz\u00F3 kihagy\u00E1sa", +ignore_words:"Mindet kihagy", +langs:"Nyelvek", +wait:"K\u00E9rem, v\u00E1rjon...", +sug:"Aj\u00E1nl\u00E1sok", +no_sug:"Nincs aj\u00E1nl\u00E1s", +no_mpell:"Nem tal\u00E1ltam helyes\u00EDr\u00E1si hib\u00E1t." +}, +pagebreak:{ +desc:"Oldalt\u00F6r\u00E9s besz\u00FAr\u00E1sa." +}, +advlist:{ +types:"Types", +def:"Default", +lower_alpha:"Lower alpha", +lower_greek:"Lower greek", +lower_roman:"Lower roman", +upper_alpha:"Upper alpha", +upper_roman:"Upper roman", +circle:"K\u00F6r", +disc:"Lemez", +square:"Square" +}}}); \ No newline at end of file diff --git a/webcit/tiny_mce/langs/it.js b/webcit/tiny_mce/langs/it.js index bfdb5a4fc..c7ff49e23 100644 --- a/webcit/tiny_mce/langs/it.js +++ b/webcit/tiny_mce/langs/it.js @@ -11,7 +11,7 @@ class_name:"Classe", not_set:"-- Non impostato --", clipboard_msg:"Copia/Taglia/Incolla non \u00E8 disponibile in Mozilla e Firefox.\nSi desidera avere maggiori informazioni su questo problema?", clipboard_no_support:"Attualmente non supportato dal browser in uso, usare le scorciatoie da tastiera.", -popup_blocked:"Spiacente, ma il blocco delle popup ha disabilitato una finestra che fornisce funzionalit\u00E0 dell'applicazione. Si deve disabilitare il blocco delle popup per questo sito per poter utlizzare appieno questo strumento.", +popup_blocked:"Spiacente, ma il blocco popup ha disabilitato una finestra che fornisce funzionalit\u00E0 dell'applicazione. Si deve disabilitare il blocco popup per questo sito per poter utlizzare appieno questo strumento.", invalid_data:"Errore: valori inseriti non validi, sono marcati in rosso.", more_colors:"Colori aggiuntivi" }, @@ -50,7 +50,7 @@ absolute_desc:"Attiva/Disattiva posizionamento assoluto", content:"Nuovo layer..." }, save:{ -save_desc:"Save", +save_desc:"Salva", cancel_desc:"Cancella tutte le modifiche" }, nonbreaking:{ @@ -90,7 +90,9 @@ desc:"Modifica stile CSS" paste:{ paste_text_desc:"Incolla come testo semplice", paste_word_desc:"Incolla da Word", -selectall_desc:"Seleziona tutto" +selectall_desc:"Seleziona tutto", +plaintext_mode_sticky:"Incolla adesso e in modalit\u00E0 testo. Clicca nuovamente per tornare alla modalit\u00E0 normale. Dopo che avrai incollato qualcosa tornerai alla modalit\u00E0 normale", +plaintext_mode:"Incolla adesso e in modalit\u00E0 testo. Clicca nuovamente per tornare alla modalit\u00E0 normale." }, paste_dlg:{ text_title:"Premere CTRL+V sulla tastiera per incollare il testo nella finestra.", @@ -120,7 +122,9 @@ col:"Colonna", cell:"Cella" }, autosave:{ -unload_msg:"I cambiamenti effettuati saranno persi se si abbandona la pagina corrente." +unload_msg:"I cambiamenti effettuati saranno persi se si abbandona la pagina corrente.", +restore_content:"Ripristina i dati salvati automaticamente", +warning_message:"Se ripristini i dati salvati automaticamente perderai i dati attuali dell'editor\n\nSei sicuro di voler ripristinare i dati?." }, fullscreen:{ desc:"Attiva/disattiva modalit\u00E0 a tutto schermo" @@ -151,4 +155,16 @@ no_mpell:"Nessun errore rilevato." }, pagebreak:{ desc:"Inserisci intterruzione di pagina." +}, +advlist:{ +types:"Tipi", +def:"Default", +lower_alpha:"Minuscolo alfanumerico", +lower_greek:"Minuscolo lettera greca", +lower_roman:"Minuscolo lettere romane", +upper_alpha:"Maiuscolo alfanumerico", +upper_roman:"Maiuscolo lettere romane", +circle:"Cerchio", +disc:"Punto", +square:"Quadrato" }}}); \ No newline at end of file diff --git a/webcit/tiny_mce/langs/nl.js b/webcit/tiny_mce/langs/nl.js index 491a01ddb..9901525dc 100644 --- a/webcit/tiny_mce/langs/nl.js +++ b/webcit/tiny_mce/langs/nl.js @@ -11,7 +11,7 @@ class_name:"Klasse", not_set:"- Standaard -", clipboard_msg:"Kopi\u00EBren/knippen/plakken is niet beschikbaar in Mozilla en Firefox.\nWilt u meer informatie over deze beperking?", clipboard_no_support:"Kopi\u00EBren/knippen/plakken wordt niet ondersteund door uw browser, gebruik hiervoor de sneltoetsen.", -popup_blocked:"U zult uw popup-blocker tijdelijk moeten uitschakelen voor deze website om gebruik te kunnen maken van alle fucties van deze teksteditor.", +popup_blocked:"U zult uw popup-blocker tijdelijk moeten uitschakelen voor deze website om gebruik te kunnen maken van alle functies van deze teksteditor.", invalid_data:"Fout: Er zijn ongeldige waardes ingevoerd, deze zijn rood gemarkeerd.", more_colors:"Meer kleuren" }, @@ -30,7 +30,7 @@ inserttime_desc:"Tijd invoegen", months_long:"Januari,Februari,Maart,April,Mei,Juni,Juli,Augustus,September,Oktober,November,December", months_short:"Jan,Feb,Mar,Apr,Mei,Jun,Jul,Aug,Sep,Okt,Nov,Dec", day_long:"Zondag,Maandag,Dinsdag,Woensdag,Donderdag,Vrijdag,Zaterdag,Zondag", -day_short:"Zo,Ma,Di,Wo,Do,Vr,Zat,Zon" +day_short:"zo,ma,di,wo,do,vr,za,zo" }, print:{ print_desc:"Afdrukken" @@ -90,7 +90,9 @@ desc:"CSS Stijl bewerken" paste:{ paste_text_desc:"Als platte tekst plakken", paste_word_desc:"Vanuit Word plakken", -selectall_desc:"Alles selecteren" +selectall_desc:"Alles selecteren", +plaintext_mode_sticky:"Plakken is nu in plattetekstmodus. Klik nog een keer om terug te gaan naar normaal plakken. Nadat u iets plakt, keert u terug naar normaal plakken.", +plaintext_mode:"Plakken is nu in plattetekstmoduse. Klik nog een keer om terug te gaan naar normaal plakken." }, paste_dlg:{ text_title:"Gebruik Ctrl+V om tekst in het venster te plakken.", @@ -120,7 +122,9 @@ col:"Kolom", cell:"Cel" }, autosave:{ -unload_msg:"De wijzigingen zullen verloren gaan als u nu deze pagina verlaat." +unload_msg:"De wijzigingen zullen verloren gaan als u nu deze pagina verlaat.", +restore_content:"Automatisch opgeslagen inhoud laden.", +warning_message:"Als u de opgeslagen inhoud laadt, verliest u de inhoud die zich momenteel in de editor bevindt.\n\nWeet u zeker dat u de opgeslagen inhoud wilt laden?" }, fullscreen:{ desc:"Volledig scherm" @@ -133,7 +137,7 @@ fullpage:{ desc:"Documenteigenschappen" }, template:{ -desc:"Voorgedefineerd sjabloon invoegen" +desc:"Voorgedefinieerd sjabloon invoegen" }, visualchars:{ desc:"Zichtbare symbolen" @@ -144,11 +148,23 @@ menu:"Instellingen spellingcontrole", ignore_word:"Woord negeren", ignore_words:"Alles negeren", langs:"Talen", -wait:"Een ogenblik geduld...", +wait:"Een ogenblik geduld\u2026", sug:"Suggesties", no_sug:"Geen suggesties", no_mpell:"Geen spelfouten gevonden." }, pagebreak:{ desc:"Pagina-einde invoegen" +}, +advlist:{ +types:"Types", +def:"Standaard", +lower_alpha:"Alfa (klein)", +lower_greek:"Griekse letters (klein)", +lower_roman:"Romeinse letters (klein)", +upper_alpha:"Alfa (groot)", +upper_roman:"Romeinse letters (groot)", +circle:"Cirkel", +disc:"Schijf", +square:"Vierkant" }}}); \ No newline at end of file diff --git a/webcit/tiny_mce/langs/pt.js b/webcit/tiny_mce/langs/pt.js index 453571337..65d4a59f8 100644 --- a/webcit/tiny_mce/langs/pt.js +++ b/webcit/tiny_mce/langs/pt.js @@ -1,6 +1,6 @@ tinyMCE.addI18n({pt:{ common:{ -edit_confirm:"Deseja usar o modo de edi\u00C3\u00A7\u00C3\u00A3o avan\u00C3\u00A7ado neste campo de texto?", +edit_confirm:"Deseja usar o modo de edi\u00E7\u00E3o avan\u00E7ado neste campo de texto?", apply:"Aplicar", insert:"Inserir", update:"Atualizar", @@ -8,11 +8,11 @@ cancel:"Cancelar", close:"Fechar", browse:"Procurar", class_name:"Classe", -not_set:"-- N\u00C3\u00A3o especificado --", -clipboard_msg:"Copiar/cortar/colar n\u00C3\u00A3o est\u00C3\u00A1 dispon\u00C3\u00ADvel no Mozilla/Firefox.\nDeseja mais informa\u00C3\u00A7\u00C3\u00B5es sobre este problema?", -clipboard_no_support:"O seu navegador n\u00C3\u00A3o tem suporte para esta fun\u00C3\u00A7\u00C3\u00A3o, use os atalhos do teclado.", -popup_blocked:"Detectamos que o seu bloqueador de popups bloqueou uma janela que \u00C3\u00A9 essencial para o aplicativo. Voc\u00C3\u00AA precisa desativar o bloqueador de popups para utilizar esta ferramenta.", -invalid_data:"Erro: Valores inv\u00C3\u00A1lidos est\u00C3\u00A3o marcados em vermelho.", +not_set:"-- N/A --", +clipboard_msg:"Copiar/recortar/colar n\u00E3o est\u00E1 dispon\u00EDvel no Mozilla e Firefox.\nDeseja mais informa\u00E7\u00F5es sobre este problema?", +clipboard_no_support:"O seu browser n\u00E3o suporta esta fun\u00E7\u00E3o, use os atalhos do teclado.", +popup_blocked:"Detectamos que o seu bloqueador de popups bloqueou uma janela que \u00E9 essencial para a aplica\u00E7\u00E3o. Voc\u00EA precisa desativar o bloqueador de janelas de popups para utilizar esta ferramenta.", +invalid_data:"Erro: Valores inv\u00E1lidos marcados em vermelho.", more_colors:"Mais Cores" }, contextmenu:{ @@ -20,23 +20,23 @@ align:"Alinhamento", left:"Esquerda", center:"Centro", right:"Direita", -full:"Justificar" +full:"Justificado" }, insertdatetime:{ date_fmt:"%d-%m-%Y", time_fmt:"%H:%M:%S", insertdate_desc:"Inserir data", inserttime_desc:"Inserir hora", -months_long:"Janeiro,Fevereiro,Mar\u00C3\u00A7o,Abril,Maio,Junho,Julho,Agosto,Setembro,Outubro,Novembro,Dezembro", +months_long:"Janeiro,Fevereiro,Mar\u00E7o,Abril,Maio,Junho,Julho,Agosto,Setembro,Outubro,Novembro,Dezembro", months_short:"Jan,Fev,Mar,Abr,Mai,Jun,Jul,Ago,Set,Out,Nov,Dez", -day_long:"Domingo,Segunda-Feira,Ter\u00C3\u00A7a-Feira,Quarta-Feira,Quinta-Feira,Sexta-Feira,S\u00C3\u00A1bado,Domingo", +day_long:"Domingo,Segunda-feira,Ter\u00E7a-feira,Quarta-feira,Quinta-feira,Sexta-feira,S\u00E1bado,Domingo", day_short:"Dom,Seg,Ter,Qua,Qui,Sex,Sab,Dom" }, print:{ print_desc:"Imprimir" }, preview:{ -preview_desc:"Pr\u00C3\u00A9-Visualizar" +preview_desc:"Pr\u00E9-visualizar" }, directionality:{ ltr_desc:"Da esquerda para direita", @@ -45,20 +45,20 @@ rtl_desc:"Da direita para esquerda" layer:{ insertlayer_desc:"Inserir nova camada", forward_desc:"Mover para frente", -backward_desc:"Mover para tr\u00C3\u00A1s", -absolute_desc:"Alternar posicionamento absoluto", +backward_desc:"Mover para tr\u00E1s", +absolute_desc:"Alternar o posicionamento absoluto", content:"Nova camada..." }, save:{ save_desc:"Salvar", -cancel_desc:"Cancelar todas as altera\u00C3\u00A7\u00C3\u00B5es" +cancel_desc:"Cancelar todas as altera\u00E7\u00F5es" }, nonbreaking:{ -nonbreaking_desc:"Inserir um espa\u00C3\u00A7o" +nonbreaking_desc:"Inserir um espa\u00E7o \"sem quebra\"" }, iespell:{ iespell_desc:"Verificar ortografia", -download:"Aplicativo de ortografia n\u00C3\u00A3o-detectado. Deseja instal\u00C3\u00A1-lo agora?" +download:"Plugin de ortografia n\u00E3o-detectado. Deseja instalar agora?" }, advhr:{ advhr_desc:"Separador horizontal" @@ -77,9 +77,9 @@ advlink:{ link_desc:"Inserir/editar hyperlink" }, xhtmlxtras:{ -cite_desc:"Cita\u00C3\u00A7\u00C3\u00A3o", -abbr_desc:"Abrevia\u00C3\u00A7\u00C3\u00A3o", -acronym_desc:"Acr\u00C3\u00B4nimo", +cite_desc:"Cita\u00E7\u00E3o", +abbr_desc:"Abrevia\u00E7\u00E3o", +acronym_desc:"Acr\u00F4nimo", del_desc:"Apagar", ins_desc:"Inserir", attribs_desc:"Inserir/Editar atributos" @@ -90,7 +90,9 @@ desc:"Editar CSS" paste:{ paste_text_desc:"Colar como texto simples", paste_word_desc:"Colar (copiado do WORD)", -selectall_desc:"Selecionar tudo" +selectall_desc:"Selecionar tudo", +plaintext_mode_sticky:"Comando colar est\u00E1 em modo texto simples. Clique novamente para voltar para o modo normal. Depois de colar alguma coisa retornar\u00E1 para o modo normal.", +plaintext_mode:"Comando colar est\u00E1 em modo texto simples. Clique novamente para voltar para o modo normal." }, paste_dlg:{ text_title:"Use CTRL+V para colar o texto na janela.", @@ -105,29 +107,31 @@ delete_row_desc:"Apagar linha", col_before_desc:"Inserir coluna antes", col_after_desc:"Inserir coluna depois", delete_col_desc:"Remover coluna", -split_cells_desc:"Dividir c\u00C3\u00A9lulas", -merge_cells_desc:"Unir c\u00C3\u00A9lulas", +split_cells_desc:"Dividir c\u00E9lulas", +merge_cells_desc:"Unir c\u00E9lulas", row_desc:"Propriedades das linhas", -cell_desc:"Propriedades das c\u00C3\u00A9lulas", +cell_desc:"Propriedades das c\u00E9lulas", props_desc:"Propriedades da tabela", paste_row_before_desc:"Colar linha antes", paste_row_after_desc:"Colar linha depois", -cut_row_desc:"Cortar linha", +cut_row_desc:"Recortar linha", copy_row_desc:"Copiar linha", del:"Apagar tabela", row:"Linha", col:"Coluna", -cell:"C\u00C3\u00A9lula" +cell:"C\u00E9lula" }, autosave:{ -unload_msg:"As mudan\u00C3\u00A7as efetuadas ser\u00C3\u00A3o perdidas se sair desta p\u00C3\u00A1gina." +unload_msg:"As mudan\u00E7as efetuadas ser\u00E3o perdidas se sair desta p\u00E1gina.", +restore_content:"Restaura conte\u00FAdo salvo automaticamente.", +warning_message:"Se restaurar o conte\u00FAdo, voc\u00EA ir\u00E1 perder tudo que est\u00E1 atualmente no editor.\n\nTem certeza que quer restaurar o conte\u00FAdo salvo?" }, fullscreen:{ desc:"Tela Inteira" }, media:{ -desc:"Inserir/Editar m\u00C3\u00ADdia incorporada", -edit:"Editar m\u00C3\u00ADdia incorporada" +desc:"Inserir/Editar m\u00EDdia incorporada", +edit:"Editar m\u00EDdia incorporada" }, fullpage:{ desc:"Propriedades do Documento" @@ -139,16 +143,28 @@ visualchars:{ desc:"Caracteres de controle visual ligado/desligado" }, spellchecker:{ -desc:"Alternar verifica\u00C3\u00A7\u00C3\u00A3o ortogr\u00C3\u00A1fica", -menu:"Configura\u00C3\u00A7\u00C3\u00B5es de ortografia", +desc:"Alternar verifica\u00E7\u00E3o ortogr\u00E1fica", +menu:"Configura\u00E7\u00F5es de ortografia", ignore_word:"Ignorar palavra", ignore_words:"Ignorar tudo", langs:"Linguagens", wait:"Aguarde...", -sug:"Sugest\u00C3\u00B5es", -no_sug:"Sem sugest\u00C3\u00B5es", -no_mpell:"N\u00C3\u00A3o foram detectados erros de ortografia." +sug:"Sugest\u00F5es", +no_sug:"Sem sugest\u00F5es", +no_mpell:"N\u00E3o foram detectados erros de ortografia." }, pagebreak:{ -desc:"Inserir quebra de p\u00C3\u00A1gina." +desc:"Inserir quebra de p\u00E1gina." +}, +advlist:{ +types:"Tipos", +def:"Padr\u00E3o", +lower_alpha:"Alfabeto min\u00FAsculo", +lower_greek:"Alfabeto grego", +lower_roman:"Num. romanos min\u00FAsculos", +upper_alpha:"Alfabeto mai\u00FAsculos", +upper_roman:"Num. romanos mai\u00FAsculos", +circle:"C\u00EDrculo", +disc:"Disco", +square:"Quadrado" }}}); \ No newline at end of file diff --git a/webcit/tiny_mce/langs/ru.js b/webcit/tiny_mce/langs/ru.js new file mode 100644 index 000000000..796b089d7 --- /dev/null +++ b/webcit/tiny_mce/langs/ru.js @@ -0,0 +1,173 @@ +tinyMCE.addI18n({ru:{ +common:{ +edit_confirm:"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C WYSIWYG \u0440\u0435\u0436\u0438\u043C \u0434\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u043F\u043E\u043B\u044F?", +apply:"\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C", +insert:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C", +update:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C", +cancel:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C", +close:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C", +browse:"\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440", +class_name:"\u041A\u043B\u0430\u0441\u0441", +not_set:"- \u041D\u0435 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E -", +clipboard_msg:"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435, \u0432\u044B\u0440\u0435\u0437\u043A\u0430 \u0438 \u0432\u0441\u0442\u0430\u0432\u043A\u0430 \u043D\u0435 \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0442 \u0432 Firefox.\r\n\u0425\u043E\u0442\u0438\u0442\u0435 \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u0431\u043E\u043B\u0435\u0435 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u0443\u044E \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044E?", +clipboard_no_support:"\u041D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u0412\u0430\u0448\u0438\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043E\u043C, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u0433\u043E\u0440\u044F\u0447\u0438\u0435 \u043A\u043B\u0430\u0432\u0438\u0448\u0438.", +popup_blocked:"\u0411\u043B\u043E\u043A\u0438\u0440\u0430\u0442\u043E\u0440 \u0432\u0441\u043F\u043B\u044B\u0432\u0430\u044E\u0449\u0438\u0445 \u043E\u043A\u043E\u043D \u0437\u0430\u043A\u0440\u044B\u043B \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E\u0435 \u043E\u043A\u043D\u043E. \u0414\u043B\u044F \u043F\u043E\u043B\u043D\u043E\u0446\u0435\u043D\u043D\u043E\u0439 \u0440\u0430\u0431\u043E\u0442\u044B, \u043E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u043A\u0443 \u043D\u0430 \u044D\u0442\u043E\u043C \u0441\u0430\u0439\u0442\u0435.", +invalid_data:"\u041E\u0448\u0438\u0431\u043A\u0430: \u0412\u0432\u0435\u0434\u0435\u043D\u043E \u043D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435, \u043E\u043D\u043E \u043E\u0442\u043C\u0435\u0447\u0435\u043D\u043E \u043A\u0440\u0430\u0441\u043D\u044B\u043C.", +more_colors:"\u0414\u0440\u0443\u0433\u0438\u0435 \u0446\u0432\u0435\u0442\u0430..." +}, +contextmenu:{ +align:"\u0412\u044B\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u043D\u0438\u0435", +left:"\u041F\u043E \u043B\u0435\u0432\u043E\u043C\u0443 \u043A\u0440\u0430\u044E", +center:"\u041F\u043E \u0446\u0435\u043D\u0442\u0440\u0443", +right:"\u041F\u043E \u043F\u0440\u0430\u0432\u043E\u043C\u0443 \u043A\u0440\u0430\u044E", +full:"\u041F\u043E \u0448\u0438\u0440\u0438\u043D\u0435" +}, +insertdatetime:{ +date_fmt:"%d.%m.%Y", +time_fmt:"%H:%M:%S", +insertdate_desc:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0434\u0430\u0442\u0443", +inserttime_desc:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0432\u0440\u0435\u043C\u044F", +months_long:"\u044F\u043D\u0432\u0430\u0440\u044C,\u0444\u0435\u0432\u0440\u0430\u043B\u044C,\u043C\u0430\u0440\u0442,\u0430\u043F\u0440\u0435\u043B\u044C,\u043C\u0430\u0439,\u0438\u044E\u043D\u044C,\u0438\u044E\u043B\u044C,\u0430\u0432\u0433\u0443\u0441\u0442,\u0441\u0435\u043D\u0442\u044F\u0431\u0440\u044C,\u043E\u043A\u0442\u044F\u0431\u0440\u044C,\u043D\u043E\u044F\u0431\u0440\u044C,\u0434\u0435\u043A\u0430\u0431\u0440\u044C", +months_short:"\u044F\u043D\u0432,\u0444\u0435\u0432,\u043C\u0430\u0440\u0442,\u0430\u043F\u0440,\u043C\u0430\u0439,\u0438\u044E\u043D\u044C,\u0438\u044E\u043B\u044C,\u0430\u0432\u0433,\u0441\u0435\u043D,\u043E\u043A\u0442,\u043D\u043E\u044F,\u0434\u0435\u043A", +day_long:"\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435,\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A,\u0432\u0442\u043E\u0440\u043D\u0438\u043A,\u0441\u0440\u0435\u0434\u0430,\u0447\u0435\u0442\u0432\u0435\u0440\u0433,\u043F\u044F\u0442\u043D\u0438\u0446\u0430,\u0441\u0443\u0431\u0431\u043E\u0442\u0430,\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435", +day_short:"\u0432\u0441,\u043F\u043D,\u0432\u0442,\u0441\u0440,\u0447\u0442,\u043F\u0442,\u0441\u0431,\u0432\u0441" +}, +print:{ +print_desc:"\u041F\u0435\u0447\u0430\u0442\u044C" +}, +preview:{ +preview_desc:"\u041F\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440" +}, +directionality:{ +ltr_desc:"\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u043B\u0435\u0432\u0430 \u043D\u0430\u043F\u0440\u0430\u0432\u043E", +rtl_desc:"\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u043F\u0440\u0430\u0432\u0430 \u043D\u0430\u043B\u0435\u0432\u043E" +}, +layer:{ +insertlayer_desc:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0441\u043B\u043E\u0439", +forward_desc:"\u041D\u0430 \u043F\u0435\u0440\u0435\u0434\u043D\u0438\u0439 \u043F\u043B\u0430\u043D", +backward_desc:"\u041D\u0430 \u0437\u0430\u0434\u043D\u0438\u0439 \u043F\u043B\u0430\u043D", +absolute_desc:"\u0410\u0431\u0441\u043E\u043B\u044E\u0442\u043D\u043E\u0435 \u043F\u043E\u0437\u0438\u0446\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435", +content:"\u041D\u043E\u0432\u044B\u0439 \u0441\u043B\u043E\u0439" +}, +save:{ +save_desc:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C", +cancel_desc:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0432\u0441\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F" +}, +nonbreaking:{ +nonbreaking_desc:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043D\u0435\u0440\u0430\u0437\u0440\u044B\u0432\u043D\u044B\u0439 \u043F\u0440\u043E\u0431\u0435\u043B" +}, +iespell:{ +iespell_desc:"\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u043E\u0440\u0444\u043E\u0433\u0440\u0430\u0444\u0438\u044E", +download:"ieSpell \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D. \u0416\u0435\u043B\u0430\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C?" +}, +advhr:{ +advhr_desc:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044C" +}, +emotions:{ +emotions_desc:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0441\u043C\u0430\u0439\u043B" +}, +searchreplace:{ +search_desc:"\u041D\u0430\u0439\u0442\u0438", +replace_desc:"\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C" +}, +advimage:{ +image_desc:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C/\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435", +delta_width:"200" +}, +advlink:{ +link_desc:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C/\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443", +delta_width:"200" +}, +xhtmlxtras:{ +cite_desc:"\u0426\u0438\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435", +abbr_desc:"\u0421\u043E\u043A\u0440\u0430\u0449\u0435\u043D\u0438\u0435", +acronym_desc:"\u0410\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0446\u0438\u044F", +del_desc:"\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435", +ins_desc:"\u0417\u0430\u043C\u0435\u043D\u0430", +attribs_desc:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C/\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u044D\u043B\u0435\u043C\u0435\u043D\u0442" +}, +style:{ +desc:"\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C CSS \u0441\u0442\u0438\u043B\u044C" +}, +paste:{ +paste_text_desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043A\u0430\u043A \u0442\u0435\u043A\u0441\u0442", +paste_word_desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0438\u0437 Word", +selectall_desc:"\u0412\u044B\u0434\u0435\u043B\u0438\u0442\u044C \u0432\u0441\u0435", +plaintext_mode_sticky:"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.", +plaintext_mode:"Paste is now in plain text mode. Click again to toggle back to regular paste mode." +}, +paste_dlg:{ +text_title:"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043B\u044F \u0432\u0441\u0442\u0430\u0432\u043A\u0438 \u0442\u0435\u043A\u0441\u0442\u0430 \u0432 \u043E\u043A\u043D\u043E.", +text_linebreaks:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043F\u0435\u0440\u0435\u043D\u043E\u0441\u044B \u0441\u0442\u0440\u043E\u043A", +word_title:"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043B\u044F \u0432\u0441\u0442\u0430\u0432\u043A\u0438 \u0442\u0435\u043A\u0441\u0442\u0430 \u0432 \u043E\u043A\u043D\u043E." +}, +table:{ +desc:"\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0435/\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435 \u0442\u0430\u0431\u043B\u0438\u0446\u044B", +row_before_desc:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 \u0441\u0432\u0435\u0440\u0445\u0443", +row_after_desc:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 \u0441\u043D\u0438\u0437\u0443", +delete_row_desc:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443", +col_before_desc:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0441\u0442\u043E\u043B\u0431\u0435\u0446 \u0441\u043B\u0435\u0432\u0430", +col_after_desc:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0441\u0442\u043E\u043B\u0431\u0435\u0446 \u0441\u043F\u0440\u0430\u0432\u0430", +delete_col_desc:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0442\u043E\u043B\u0431\u0435\u0446", +split_cells_desc:"\u0420\u0430\u0437\u0431\u0438\u0442\u044C \u044F\u0447\u0435\u0439\u043A\u0443", +merge_cells_desc:"\u041E\u0431\u044A\u0435\u0434\u0438\u043D\u0438\u0442\u044C \u044F\u0447\u0435\u0439\u043A\u0438", +row_desc:"\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0441\u0442\u0440\u043E\u043A\u0438", +cell_desc:"\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u044F\u0447\u0435\u0439\u043A\u0438", +props_desc:"\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0442\u0430\u0431\u043B\u0438\u0446\u044B", +paste_row_before_desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 \u0441\u0432\u0435\u0440\u0445\u0443", +paste_row_after_desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 \u0441\u043D\u0438\u0437\u0443", +cut_row_desc:"\u0412\u044B\u0440\u0435\u0437\u0430\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443", +copy_row_desc:"\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443", +del:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0442\u0430\u0431\u043B\u0438\u0446\u0443", +row:"\u0421\u0442\u0440\u043E\u043A\u0430", +col:"\u0421\u0442\u043E\u043B\u0431\u0435\u0446", +cell:"\u042F\u0447\u0435\u0439\u043A\u0430", +cellprops_delta_width:"30" +}, +autosave:{ +unload_msg:"\u041F\u0440\u043E\u0438\u0437\u0432\u0435\u0434\u0435\u043D\u043D\u044B\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0431\u0443\u0434\u0443\u0442 \u0443\u0442\u0435\u0440\u044F\u043D\u044B, \u0435\u0441\u043B\u0438 \u0412\u044B \u0443\u0439\u0434\u0435\u0442\u0435 \u0441 \u044D\u0442\u043E\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B.", +restore_content:"\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435", +warning_message:"\u0412\u0441\u0435 \u043F\u0440\u043E\u0438\u0437\u0432\u0435\u0434\u0435\u043D\u043D\u044B\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0431\u0443\u0434\u0443\u0442 \u0443\u0442\u0435\u0440\u044F\u043D\u044B.\n\n\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u044F?" +}, +fullscreen:{ +desc:"\u041F\u043E\u043B\u043D\u043E\u044D\u043A\u0440\u0430\u043D\u043D\u044B\u0439 \u0440\u0435\u0436\u0438\u043C" +}, +media:{ +desc:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C/\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043A\u043B\u0438", +edit:"\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u043A\u043B\u0438\u043F\u0430" +}, +fullpage:{ +desc:"\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430" +}, +template:{ +desc:"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D" +}, +visualchars:{ +desc:"\u0412\u0441\u0435 \u0437\u043D\u0430\u043A\u0438" +}, +spellchecker:{ +desc:"\u041F\u0440\u0430\u0432\u043E\u043F\u0438\u0441\u0430\u043D\u0438\u0435", +menu:"\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u043F\u0440\u0430\u0432\u043E\u043F\u0438\u0441\u0430\u043D\u0438\u044F", +ignore_word:"\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C", +ignore_words:"\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0432\u0441\u0435", +langs:"\u042F\u0437\u044B\u043A\u0438", +wait:"\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435...", +sug:"\u0412\u0430\u0440\u0438\u0430\u043D\u0442\u044B", +no_sug:"\u041D\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u043E\u0432", +no_mpell:"\u041E\u0448\u0438\u0431\u043E\u043A \u043D\u0435 \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E." +}, +pagebreak:{ +desc:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0440\u0430\u0437\u0440\u044B\u0432 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B" +}, +advlist:{ +types:"\u0421\u0438\u043C\u0432\u043E\u043B\u044B", +def:"\u0421\u0442\u0430\u043D\u0434\u0430\u0440\u0442\u043D\u044B\u0435", +lower_alpha:"\u0421\u0442\u0440\u043E\u0447\u043D\u044B\u0435 \u043B\u0430\u0442\u0438\u043D\u0441\u043A\u0438\u0435 \u0431\u0443\u043A\u0432\u044B", +lower_greek:"\u0421\u0442\u0440\u043E\u0447\u043D\u044B\u0435 \u0433\u0440\u0435\u0447\u0435\u0441\u043A\u0438\u0435 \u0431\u0443\u043A\u0432\u044B", +lower_roman:"\u0421\u0442\u0440\u043E\u0447\u043D\u044B\u0435 \u0440\u0438\u043C\u0441\u043A\u0438\u0435 \u0446\u0438\u0444\u0440\u044B", +upper_alpha:"\u0417\u0430\u0433\u043B\u0430\u0432\u043D\u044B\u0435 \u043B\u0430\u0442\u0438\u043D\u0441\u043A\u0438\u0435 \u0431\u0443\u043A\u0432\u044B", +upper_roman:"\u0417\u0430\u0433\u043B\u0430\u0432\u043D\u044B\u0435 \u0440\u0438\u043C\u0441\u043A\u0438\u0435 \u0446\u0438\u0444\u0440\u044B", +circle:"\u041A\u0440\u0443\u0433\u0438", +disc:"\u041E\u043A\u0440\u0443\u0436\u043D\u043E\u0441\u0442\u0438", +square:"\u041A\u0432\u0430\u0434\u0440\u0430\u0442\u044B" +}}}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/advhr/editor_plugin.js b/webcit/tiny_mce/plugins/advhr/editor_plugin.js index f3350043f..4d3b062de 100644 --- a/webcit/tiny_mce/plugins/advhr/editor_plugin.js +++ b/webcit/tiny_mce/plugins/advhr/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.AdvancedHRPlugin',{init:function(ed,url){ed.addCommand('mceAdvancedHr',function(){ed.windowManager.open({file:url+'/rule.htm',width:250+parseInt(ed.getLang('advhr.delta_width',0)),height:160+parseInt(ed.getLang('advhr.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('advhr',{title:'advhr.advhr_desc',cmd:'mceAdvancedHr'});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('advhr',n.nodeName=='HR');});ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName==='HR')ed.selection.select(e);});},getInfo:function(){return{longname:'Advanced HR',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('advhr',tinymce.plugins.AdvancedHRPlugin);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.AdvancedHRPlugin",{init:function(a,b){a.addCommand("mceAdvancedHr",function(){a.windowManager.open({file:b+"/rule.htm",width:250+parseInt(a.getLang("advhr.delta_width",0)),height:160+parseInt(a.getLang("advhr.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("advhr",{title:"advhr.advhr_desc",cmd:"mceAdvancedHr"});a.onNodeChange.add(function(d,c,e){c.setActive("advhr",e.nodeName=="HR")});a.onClick.add(function(c,d){d=d.target;if(d.nodeName==="HR"){c.selection.select(d)}})},getInfo:function(){return{longname:"Advanced HR",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advhr",tinymce.plugins.AdvancedHRPlugin)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/advhr/editor_plugin_src.js b/webcit/tiny_mce/plugins/advhr/editor_plugin_src.js index 356971786..0c652d330 100644 --- a/webcit/tiny_mce/plugins/advhr/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/advhr/editor_plugin_src.js @@ -1,5 +1,11 @@ -/* - * Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -48,4 +54,4 @@ // Register plugin tinymce.PluginManager.add('advhr', tinymce.plugins.AdvancedHRPlugin); -})(); +})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/advhr/langs/et_dlg.js b/webcit/tiny_mce/plugins/advhr/langs/et_dlg.js new file mode 100644 index 000000000..5022d7dff --- /dev/null +++ b/webcit/tiny_mce/plugins/advhr/langs/et_dlg.js @@ -0,0 +1,5 @@ +tinyMCE.addI18n('et.advhr_dlg',{ +width:"Laius", +size:"K\u00F5rgus", +noshade:"Ilma varjuta" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/advhr/langs/fr_dlg.js b/webcit/tiny_mce/plugins/advhr/langs/fr_dlg.js new file mode 100644 index 000000000..0b954bfb5 --- /dev/null +++ b/webcit/tiny_mce/plugins/advhr/langs/fr_dlg.js @@ -0,0 +1,5 @@ +tinyMCE.addI18n('fr.advhr_dlg',{ +width:"Largeur", +size:"Hauteur", +noshade:"Pas d'ombre" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/advhr/langs/hu_dlg.js b/webcit/tiny_mce/plugins/advhr/langs/hu_dlg.js new file mode 100644 index 000000000..c29cce286 --- /dev/null +++ b/webcit/tiny_mce/plugins/advhr/langs/hu_dlg.js @@ -0,0 +1,5 @@ +tinyMCE.addI18n('hu.advhr_dlg',{ +width:"Sz\u00E9less\u00E9g", +size:"Magass\u00E1g", +noshade:"\u00C1rny\u00E9k n\u00E9lk\u00FCl" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/advhr/langs/it_dlg.js b/webcit/tiny_mce/plugins/advhr/langs/it_dlg.js index fc7ef18fd..d3f57a84e 100644 --- a/webcit/tiny_mce/plugins/advhr/langs/it_dlg.js +++ b/webcit/tiny_mce/plugins/advhr/langs/it_dlg.js @@ -1,5 +1,5 @@ tinyMCE.addI18n('it.advhr_dlg',{ -width:"Width", -size:"Height", +width:"Larghezza", +size:"Altezza", noshade:"Senza ombreggiatura" }); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/advhr/langs/ru_dlg.js b/webcit/tiny_mce/plugins/advhr/langs/ru_dlg.js new file mode 100644 index 000000000..45e9d6750 --- /dev/null +++ b/webcit/tiny_mce/plugins/advhr/langs/ru_dlg.js @@ -0,0 +1,5 @@ +tinyMCE.addI18n('ru.advhr_dlg',{ +width:"\u0428\u0438\u0440\u0438\u043D\u0430", +size:"\u0412\u044B\u0441\u043E\u0442\u0430", +noshade:"\u0411\u0435\u0437 \u0442\u0435\u043D\u0438" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/advhr/rule.htm b/webcit/tiny_mce/plugins/advhr/rule.htm index 8f20f7fa8..fc37b2aec 100644 --- a/webcit/tiny_mce/plugins/advhr/rule.htm +++ b/webcit/tiny_mce/plugins/advhr/rule.htm @@ -7,7 +7,6 @@ -
@@ -22,7 +21,7 @@ - - + @@ -89,7 +88,7 @@ - @@ -123,7 +122,7 @@ - + @@ -158,7 +157,7 @@ - + @@ -171,7 +170,7 @@ - +
+ - - -
- -
+ + diff --git a/webcit/tiny_mce/plugins/advimage/editor_plugin.js b/webcit/tiny_mce/plugins/advimage/editor_plugin.js index 3af50573e..4c7a9c3a8 100644 --- a/webcit/tiny_mce/plugins/advimage/editor_plugin.js +++ b/webcit/tiny_mce/plugins/advimage/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.AdvancedImagePlugin',{init:function(ed,url){ed.addCommand('mceAdvImage',function(){if(ed.dom.getAttrib(ed.selection.getNode(),'class').indexOf('mceItem')!=-1)return;ed.windowManager.open({file:url+'/image.htm',width:480+parseInt(ed.getLang('advimage.delta_width',0)),height:385+parseInt(ed.getLang('advimage.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('image',{title:'advimage.image_desc',cmd:'mceAdvImage'});},getInfo:function(){return{longname:'Advanced image',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('advimage',tinymce.plugins.AdvancedImagePlugin);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.AdvancedImagePlugin",{init:function(a,b){a.addCommand("mceAdvImage",function(){if(a.dom.getAttrib(a.selection.getNode(),"class").indexOf("mceItem")!=-1){return}a.windowManager.open({file:b+"/image.htm",width:480+parseInt(a.getLang("advimage.delta_width",0)),height:385+parseInt(a.getLang("advimage.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("image",{title:"advimage.image_desc",cmd:"mceAdvImage"})},getInfo:function(){return{longname:"Advanced image",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advimage",tinymce.plugins.AdvancedImagePlugin)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/advimage/editor_plugin_src.js b/webcit/tiny_mce/plugins/advimage/editor_plugin_src.js index 0b96fd641..2625dd213 100644 --- a/webcit/tiny_mce/plugins/advimage/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/advimage/editor_plugin_src.js @@ -1,5 +1,11 @@ -/* - * Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -41,4 +47,4 @@ // Register plugin tinymce.PluginManager.add('advimage', tinymce.plugins.AdvancedImagePlugin); -})(); +})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/advimage/image.htm b/webcit/tiny_mce/plugins/advimage/image.htm index dd84083f4..79cff3f19 100644 --- a/webcit/tiny_mce/plugins/advimage/image.htm +++ b/webcit/tiny_mce/plugins/advimage/image.htm @@ -9,7 +9,6 @@ -
@@ -38,7 +37,7 @@
+ x px
@@ -225,13 +224,8 @@
-
- -
- -
- -
+ +
diff --git a/webcit/tiny_mce/plugins/advimage/js/image.js b/webcit/tiny_mce/plugins/advimage/js/image.js index 64fc6f677..3bda86a2d 100644 --- a/webcit/tiny_mce/plugins/advimage/js/image.js +++ b/webcit/tiny_mce/plugins/advimage/js/image.js @@ -272,6 +272,7 @@ var ImageDialog = { cl = tinyMCEPopup.editor.dom.getClasses(); if (cl.length > 0) { + lst.options.length = 0; lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); tinymce.each(cl, function(o) { @@ -285,6 +286,7 @@ var ImageDialog = { var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; l = window[l]; + lst.options.length = 0; if (l && l.length > 0) { lst.options[lst.options.length] = new Option('', ''); @@ -412,7 +414,7 @@ var ImageDialog = { } // Merge - dom.get('style').value = dom.serializeStyle(dom.parseStyle(img.style.cssText)); + dom.get('style').value = dom.serializeStyle(dom.parseStyle(img.style.cssText), 'img'); } }, diff --git a/webcit/tiny_mce/plugins/advimage/langs/de_dlg.js b/webcit/tiny_mce/plugins/advimage/langs/de_dlg.js index 1e7983d8b..e70459679 100644 --- a/webcit/tiny_mce/plugins/advimage/langs/de_dlg.js +++ b/webcit/tiny_mce/plugins/advimage/langs/de_dlg.js @@ -5,7 +5,7 @@ tab_advanced:"Erweitert", general:"Allgemein", title:"Titel", preview:"Vorschau", -constrain_proportions:"Ausma\u00DFe", +constrain_proportions:"Seitenverh\u00E4ltnis beibehalten", langdir:"Schriftrichtung", langcode:"Sprachcode", long_desc:"Ausf\u00FChrliche Beschreibung", @@ -21,7 +21,7 @@ mouseover:"bei Mauskontakt", mouseout:"bei keinem Mauskontakt", misc:"Verschiedenes", example_img:"Aussehen der Vorschau", -missing_alt:"Wollen Sie wirklich keine Beschreibung eingeben? Bestimmte Benutzer mit k\u00F6rperlichen Einschr\u00E4nkungen k\u00F6nnen so nicht darauf zugrifen, ebenso solche, die einen Textbrowser benutzen oder die Anzeige von Bildern deaktiviert haben.", +missing_alt:"Wollen Sie wirklich keine Beschreibung eingeben? Bestimmte Benutzer mit k\u00F6rperlichen Einschr\u00E4nkungen k\u00F6nnen so nicht darauf zugreifen, ebenso solche, die einen Textbrowser benutzen oder die Anzeige von Bildern deaktiviert haben.", dialog_title:"Bild einf\u00FCgen/bearbeiten", src:"Adresse", alt:"Beschreibung", diff --git a/webcit/tiny_mce/plugins/advimage/langs/et_dlg.js b/webcit/tiny_mce/plugins/advimage/langs/et_dlg.js new file mode 100644 index 000000000..aeb58ac26 --- /dev/null +++ b/webcit/tiny_mce/plugins/advimage/langs/et_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('et.advimage_dlg',{ +tab_general:"\u00DCldine", +tab_appearance:"V\u00E4limus", +tab_advanced:"P\u00F5hjalikum", +general:"\u00DCldine", +title:"Pealkiri", +preview:"Eelvaade", +constrain_proportions:"Piira proportioone", +langdir:"Keele suund", +langcode:"Keele kood", +long_desc:"Pikk kirjelduse link", +style:"Stiil", +classes:"Klassid", +ltr:"Vasakult paremale", +rtl:"Paremalt vasakule", +id:"ID", +map:"Pildi kaart", +swap_image:"Vaheta pilti", +alt_image:"Alternatiivne pilt", +mouseover:"\u201EKursor peal\u201C", +mouseout:"\u201EKursor maas\u201C", +misc:"Mitmesugune", +example_img:"Eelvaate pildi v\u00E4limus", +missing_alt:"Oled kindel, et soovid j\u00E4tkata pildile kirjeldust lisamata?", +dialog_title:"Sisesta/muuda pilti", +src:"Pildi URL", +alt:"Pildi kirjeldus", +list:"Piltide nimekiri", +border:"Raam", +dimensions:"M\u00F5\u00F5tmed", +vspace:"Vertikaalne vahe", +hspace:"Horisontaalne vahe", +align:"Joondus", +align_baseline:"Baas", +align_top:"\u00DCleval", +align_middle:"Keskel", +align_bottom:"All", +align_texttop:"Tekst \u00FCleval", +align_textbottom:"Tekst all", +align_left:"Vasakul", +align_right:"Paremal", +image_list:"Piltide nimekiri" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/advimage/langs/fr_dlg.js b/webcit/tiny_mce/plugins/advimage/langs/fr_dlg.js new file mode 100644 index 000000000..92b691639 --- /dev/null +++ b/webcit/tiny_mce/plugins/advimage/langs/fr_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('fr.advimage_dlg',{ +tab_general:"G\u00E9n\u00E9ral", +tab_appearance:"Apparence", +tab_advanced:"Avanc\u00E9", +general:"G\u00E9n\u00E9ral", +title:"Titre", +preview:"Pr\u00E9visualisation", +constrain_proportions:"Conserver les proportions", +langdir:"Sens de lecture", +langcode:"Code de la langue", +long_desc:"Description longue du lien", +style:"Style", +classes:"Classes", +ltr:"De gauche \u00E0 droite", +rtl:"De droite \u00E0 gauche", +id:"Id", +map:"Image cliquable", +swap_image:"Image de remplacement", +alt_image:"Image alternative", +mouseover:"au survol de la souris", +mouseout:"\u00E0 la sortie de la souris", +misc:"Divers", +example_img:"Apparence de l'image", +missing_alt:"\u00CAtes-vous s\u00FBr de vouloir continuer sans d\u00E9finir de description pour l'image ? Sans elle, l'image peut ne pas \u00EAtre accessible \u00E0 certains utilisateurs handicap\u00E9s, ceux utilisant un navigateur texte ou ceux qui naviguent sans affichage des images.", +dialog_title:"Ins\u00E9rer / \u00E9diter une image", +src:"URL de l'image", +alt:"Description de l'image", +list:"Liste d'images", +border:"Bordure", +dimensions:"Dimensions", +vspace:"Espacement vertical", +hspace:"Espacement horizontal", +align:"Alignement", +align_baseline:"Normal", +align_top:"En haut", +align_middle:"Au milieu", +align_bottom:"En bas", +align_texttop:"Texte en haut", +align_textbottom:"Texte en bas", +align_left:"Gauche (flottant)", +align_right:"Droite (flottant)", +image_list:"Liste d'images" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/advimage/langs/hu_dlg.js b/webcit/tiny_mce/plugins/advimage/langs/hu_dlg.js new file mode 100644 index 000000000..383a7712a --- /dev/null +++ b/webcit/tiny_mce/plugins/advimage/langs/hu_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('hu.advimage_dlg',{ +tab_general:"\u00C1ltal\u00E1nos", +tab_appearance:"Megjelen\u00E9s", +tab_advanced:"Halad\u00F3", +general:"\u00C1ltal\u00E1nos", +title:"C\u00EDm", +preview:"El\u0151n\u00E9zet", +constrain_proportions:"Ar\u00E1nytart\u00E1s", +langdir:"Nyelv \u00EDr\u00E1s ir\u00E1ny", +langcode:"Nyelv k\u00F3d", +long_desc:"B\u0151vebb le\u00EDr\u00E1s link", +style:"Style", +classes:"Class-ok", +ltr:"Balr\u00F3l jobbra", +rtl:"Jobbr\u00F3l balra", +id:"Id", +map:"K\u00E9p t\u00E9rk\u00E9p", +swap_image:"K\u00E9pcsere", +alt_image:"Alternat\u00EDv k\u00E9p", +mouseover:"K\u00E9p az eg\u00E9rkurzor f\u00F6l\u00E9vitelekor", +mouseout:"K\u00E9p az eg\u00E9rkurzor lev\u00E9telekor", +misc:"Vegyes", +example_img:"El\u0151n\u00E9zeti k\u00E9p", +missing_alt:"Biztosan folytatja helyettes\u00EDt\u0151 sz\u00F6veg n\u00E9lk\u00FCl? En\u00E9lk\u00FCl a korl\u00E1toz\u00E1ssal \u00E9l\u0151k, sz\u00F6veges b\u00F6ng\u00E9sz\u0151t haszn\u00E1l\u00F3k \u00E9s a k\u00E9pek megjelen\u00EDt\u00E9s\u00E9t letilt\u00F3 felhaszn\u00E1l\u00F3k h\u00E1tr\u00E1nyban lesznek.", +dialog_title:"K\u00E9p besz\u00FAr\u00E1s/szerkeszt\u00E9s", +src:"K\u00E9p URL", +alt:"K\u00E9p helyettes\u00EDt\u0151 sz\u00F6vege", +list:"K\u00E9plista", +border:"Keret", +dimensions:"Dimenzi\u00F3k", +vspace:"F\u00FCgg\u0151leges t\u00E1vols\u00E1g", +hspace:"V\u00EDzszintes t\u00E1vols\u00E1g", +align:"Igaz\u00EDt\u00E1s", +align_baseline:"Alapvonalhoz", +align_top:"Fentre", +align_middle:"K\u00F6z\u00E9pre", +align_bottom:"Lentre", +align_texttop:"Sz\u00F6veg tetej\u00E9hez", +align_textbottom:"Sz\u00F6veg alj\u00E1hoz", +align_left:"Balra", +align_right:"Jobbra", +image_list:"K\u00E9plista" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/advimage/langs/pt_dlg.js b/webcit/tiny_mce/plugins/advimage/langs/pt_dlg.js index 5f3885dee..f7b45b498 100644 --- a/webcit/tiny_mce/plugins/advimage/langs/pt_dlg.js +++ b/webcit/tiny_mce/plugins/advimage/langs/pt_dlg.js @@ -1,14 +1,14 @@ tinyMCE.addI18n('pt.advimage_dlg',{ tab_general:"Geral", -tab_appearance:"Apar\u00C3\u00AAncia", -tab_advanced:"Avan\u00C3\u00A7ado", +tab_appearance:"Apar\u00EAncia", +tab_advanced:"Avan\u00E7ado", general:"Geral", -title:"T\u00C3\u00ADtulo", -preview:"Pr\u00C3\u00A9-Visualiza\u00C3\u00A7\u00C3\u00A3o", -constrain_proportions:"Manter propor\u00C3\u00A7\u00C3\u00B5es", -langdir:"Dire\u00C3\u00A7\u00C3\u00A3o do texto", -langcode:"C\u00C3\u00B3digo de idioma", -long_desc:"Descri\u00C3\u00A7\u00C3\u00A3o extensa", +title:"T\u00EDtulo", +preview:"Pr\u00E9-Visualiza\u00E7\u00E3o", +constrain_proportions:"Manter propor\u00E7\u00F5es", +langdir:"Dire\u00E7\u00E3o do texto", +langcode:"C\u00F3digo do idioma", +long_desc:"Descri\u00E7\u00E3o extensa", style:"Estilo", classes:"Classes", ltr:"Da esquerda para a direita", @@ -20,16 +20,16 @@ alt_image:"Imagem alternativa", mouseover:"mouseover", mouseout:"mouseout", misc:"Misto", -example_img:"Pr\u00C3\u00A9-visualiza\u00C3\u00A7\u00C3\u00A3o", -missing_alt:"Tem certeza que deseja continuar sem acrescentar uma descri\u00C3\u00A7\u00C3\u00A3o \u00C3\u00A0\u00C3\u0082 imagem? (Isto pode gerar problemas de acessibilidade em alguns navegadores)", +example_img:"Pr\u00E9-Visualiza\u00E7\u00E3o", +missing_alt:"Tem certeza que deseja continuar sem acrescentar uma descri\u00E7\u00E3o \u00E0 imagem? (Isto pode gerar problemas de acessibilidade em alguns navegadores)", dialog_title:"Inserir/editar imagem", -src:"Endere\u00C3\u00A7o da imagem", -alt:"Descri\u00C3\u00A7\u00C3\u00A3o da imagem", +src:"Endere\u00E7o da imagem", +alt:"Descri\u00E7\u00E3o da imagem", list:"Lista de imagens", border:"Limite", -dimensions:"Dimens\u00C3\u00B5es", -vspace:"Espa\u00C3\u00A7o vertical", -hspace:"Espa\u00C3\u00A7o horizontal", +dimensions:"Dimens\u00F5es", +vspace:"Espa\u00E7o vertical", +hspace:"Espa\u00E7o horizontal", align:"Alinhamento", align_baseline:"Sobre a linha de texto", align_top:"Topo", diff --git a/webcit/tiny_mce/plugins/advimage/langs/ru_dlg.js b/webcit/tiny_mce/plugins/advimage/langs/ru_dlg.js new file mode 100644 index 000000000..17b2b5ea6 --- /dev/null +++ b/webcit/tiny_mce/plugins/advimage/langs/ru_dlg.js @@ -0,0 +1,43 @@ +tinyMCE.addI18n('ru.advimage_dlg',{ +tab_general:"\u041E\u0431\u0449\u0435\u0435", +tab_appearance:"\u041F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", +tab_advanced:"\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u043E", +general:"\u041E\u0431\u0449\u0438\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B", +title:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A", +preview:"\u041F\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440", +constrain_proportions:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043F\u0440\u043E\u043F\u043E\u0440\u0446\u0438\u0438", +langdir:"\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0442\u0435\u043A\u0441\u0442\u0430", +langcode:"\u041A\u043E\u0434 \u044F\u0437\u044B\u043A\u0430", +long_desc:"\u0421\u0441\u044B\u043B\u043A\u0430 \u043D\u0430 \u043F\u043E\u043B\u043D\u043E\u0435 \u043E\u043F\u0438\u0441\u0430\u043D\u0438\u0435", +style:"\u0421\u0442\u0438\u043B\u044C", +classes:"\u041A\u043B\u0430\u0441\u0441\u044B", +ltr:"\u0421\u043B\u0435\u0432\u0430 \u043D\u0430\u043F\u0440\u0430\u0432\u043E", +rtl:"\u0421\u043F\u0440\u0430\u0432\u0430 \u043D\u0430\u043B\u0435\u0432\u043E", +id:"\u0418\u043C\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430", +map:"\u041A\u0430\u0440\u0442\u0430 \u0441\u0441\u044B\u043B\u043E\u043A", +swap_image:"\u0414\u0438\u043D\u0430\u043C\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435", +alt_image:"\u0410\u043B\u044C\u0442\u0435\u0440\u043D\u0430\u0442\u0438\u0432\u043D\u043E\u0435 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435", +mouseover:"\u041F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438", +mouseout:"\u0412 \u043F\u043E\u043A\u043E\u0435", +misc:"\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B", +example_img:"\u041F\u0440\u0438\u043C\u0435\u0440 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F", +missing_alt:"\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u0431\u0435\u0437 \u043E\u043F\u0438\u0441\u0430\u043D\u0438\u044F? \u0411\u0435\u0437 \u044D\u0442\u043E\u0433\u043E \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u043D\u0435\u043A\u043E\u0442\u043E\u0440\u044B\u043C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F\u043C.", +dialog_title:"\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F", +src:"\u0410\u0434\u0440\u0435\u0441", +alt:"\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435", +list:"\u0421\u043F\u0438\u0441\u043E\u043A", +border:"\u0413\u0440\u0430\u043D\u0438\u0446\u0430", +dimensions:"\u0420\u0430\u0437\u043C\u0435\u0440", +vspace:"\u0412\u0435\u0440\u0442. \u043E\u0442\u0441\u0442\u0443\u043F", +hspace:"\u0413\u043E\u0440\u0438\u0437. \u043E\u0442\u0441\u0442\u0443\u043F", +align:"\u0412\u044B\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u043D\u0438\u0435", +align_baseline:"\u041F\u043E \u0431\u0430\u0437\u043E\u0432\u043E\u0439 \u043B\u0438\u043D\u0438\u0438", +align_top:"\u041F\u043E \u0432\u0435\u0440\u0445\u043D\u0435\u043C\u0443 \u043A\u0440\u0430\u044E", +align_middle:"\u041F\u043E \u0446\u0435\u043D\u0442\u0440\u0443", +align_bottom:"\u041F\u043E \u043D\u0438\u0436\u043D\u0435\u043C\u0443 \u043A\u0440\u0430\u044E", +align_texttop:"\u041F\u043E \u0432\u0435\u0440\u0445\u043D\u0435\u043C\u0443 \u043A\u0440\u0430\u044E \u0442\u0435\u043A\u0441\u0442\u0430", +align_textbottom:"\u041F\u043E \u043D\u0438\u0436\u043D\u0435\u043C\u0443 \u043A\u0440\u0430\u044E \u0442\u0435\u043A\u0441\u0442\u0430", +align_left:"\u041F\u043E \u043B\u0435\u0432\u043E\u043C\u0443 \u043A\u0440\u0430\u044E", +align_right:"\u041F\u043E \u043F\u0440\u0430\u0432\u043E\u043C\u0443 \u043A\u0440\u0430\u044E", +image_list:"\u0421\u043F\u0438\u0441\u043E\u043A \u043A\u0430\u0440\u0442\u0438\u043D\u043E\u043A" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/advlink/editor_plugin.js b/webcit/tiny_mce/plugins/advlink/editor_plugin.js index 4899f7b8c..983fe5a9c 100644 --- a/webcit/tiny_mce/plugins/advlink/editor_plugin.js +++ b/webcit/tiny_mce/plugins/advlink/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.AdvancedLinkPlugin',{init:function(ed,url){this.editor=ed;ed.addCommand('mceAdvLink',function(){var se=ed.selection;if(se.isCollapsed()&&!ed.dom.getParent(se.getNode(),'A'))return;ed.windowManager.open({file:url+'/link.htm',width:480+parseInt(ed.getLang('advlink.delta_width',0)),height:400+parseInt(ed.getLang('advlink.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('link',{title:'advlink.link_desc',cmd:'mceAdvLink'});ed.addShortcut('ctrl+k','advlink.advlink_desc','mceAdvLink');ed.onNodeChange.add(function(ed,cm,n,co){cm.setDisabled('link',co&&n.nodeName!='A');cm.setActive('link',n.nodeName=='A'&&!n.name);});},getInfo:function(){return{longname:'Advanced link',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('advlink',tinymce.plugins.AdvancedLinkPlugin);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.AdvancedLinkPlugin",{init:function(a,b){this.editor=a;a.addCommand("mceAdvLink",function(){var c=a.selection;if(c.isCollapsed()&&!a.dom.getParent(c.getNode(),"A")){return}a.windowManager.open({file:b+"/link.htm",width:480+parseInt(a.getLang("advlink.delta_width",0)),height:400+parseInt(a.getLang("advlink.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("link",{title:"advlink.link_desc",cmd:"mceAdvLink"});a.addShortcut("ctrl+k","advlink.advlink_desc","mceAdvLink");a.onNodeChange.add(function(d,c,f,e){c.setDisabled("link",e&&f.nodeName!="A");c.setActive("link",f.nodeName=="A"&&!f.name)})},getInfo:function(){return{longname:"Advanced link",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlink",tinymce.plugins.AdvancedLinkPlugin)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/advlink/editor_plugin_src.js b/webcit/tiny_mce/plugins/advlink/editor_plugin_src.js index fa782b6e8..14e46a762 100644 --- a/webcit/tiny_mce/plugins/advlink/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/advlink/editor_plugin_src.js @@ -1,5 +1,11 @@ -/* - * Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -52,4 +58,4 @@ // Register plugin tinymce.PluginManager.add('advlink', tinymce.plugins.AdvancedLinkPlugin); -})(); +})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/advlink/js/advlink.js b/webcit/tiny_mce/plugins/advlink/js/advlink.js index a89625014..b78e82f76 100644 --- a/webcit/tiny_mce/plugins/advlink/js/advlink.js +++ b/webcit/tiny_mce/plugins/advlink/js/advlink.js @@ -116,7 +116,7 @@ function checkPrefix(n) { if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email'))) n.value = 'mailto:' + n.value; - if (/^\s*www./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external'))) + if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external'))) n.value = 'http://' + n.value; } @@ -354,7 +354,7 @@ function setAttrib(elm, attrib, value) { // Clean up the style if (attrib == 'style') - value = dom.serializeStyle(dom.parseStyle(value)); + value = dom.serializeStyle(dom.parseStyle(value), 'a'); dom.setAttrib(elm, attrib, value); } @@ -402,6 +402,7 @@ function insertAction() { // Create new anchor elements if (elm == null) { + inst.getDoc().execCommand("unlink", false, null); tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';}); diff --git a/webcit/tiny_mce/plugins/advlink/langs/de_dlg.js b/webcit/tiny_mce/plugins/advlink/langs/de_dlg.js index a52dded75..5a68302d9 100644 --- a/webcit/tiny_mce/plugins/advlink/langs/de_dlg.js +++ b/webcit/tiny_mce/plugins/advlink/langs/de_dlg.js @@ -3,8 +3,8 @@ title:"Link einf\u00FCgen/bearbeiten", url:"Adresse", target:"Fenster", titlefield:"Titel", -is_email:"Bei der Adresse scheint es sich um eine E-Mail-Adresse zu handeln. Wollen Sie das dazu ben\u00F6tigte mailto: voranstellen?", -is_external:"Bei der Adresse scheint es sich um einen externen Link zu handeln. M\u00F6chten Sie, dass zur korrekten Verlinkung ein http:// vorangestellt wird?", +is_email:"Diese Adresse scheint eine E-Mail-Adresse zu sein. M\u00F6chten Sie das dazu ben\u00F6tigte \"mailto:\" voranstellen?", +is_external:"Diese Adresse scheint ein externer Link zu sein. M\u00F6chten Sie das dazu ben\u00F6tigte \"http://\" voranstellen?", list:"Linkliste", general_tab:"Allgemein", popup_tab:"Popup", diff --git a/webcit/tiny_mce/plugins/advlink/langs/et_dlg.js b/webcit/tiny_mce/plugins/advlink/langs/et_dlg.js new file mode 100644 index 000000000..6aadbb24a --- /dev/null +++ b/webcit/tiny_mce/plugins/advlink/langs/et_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('et.advlink_dlg',{ +title:"Sisesta muuda linki", +url:" URL\u2019i link", +target:"Sihtm\u00E4rk", +titlefield:"Pealkiri", +is_email:" URL, mille sisestasid, tundub olevat e-posti aadress, kas soovid sellele lisada mailto: funktsiooni?", +is_external:"URL, mille sisestasid, tundub olevat v\u00E4line link, kas soovid sellele lisada http://?", +list:"Linkide nimekiri", +general_tab:"\u00DCldine", +popup_tab:"Pop-up", +events_tab:"S\u00FCndmused", +advanced_tab:"P\u00F5hjalikum", +general_props:"\u00DCldised seadistused", +popup_props:"Pop-up\u2019i seadistus", +event_props:"S\u00FCndmused", +advanced_props:"\u00DCldised seadistused", +popup_opts:"Valikud", +anchor_names:"Ankrud", +target_same:"Ava selles aknas/raamis", +target_parent:"Ava pea-aknas/raamis", +target_top:"Ava k\u00F5rgeimas raamis (asenda k\u00F5ik raamid)", +target_blank:"Ava uues aknas", +popup:"Javascript\u2019i pop-up", +popup_url:"Pop-up\u2019i URL", +popup_name:"Akna nimi", +popup_return:"Sisesta 'tagasiminek eba\u00F5nnestus'", +popup_scrollbars:"N\u00E4ita kerimisribasid", +popup_statusbar:"N\u00E4ita staatuse riba", +popup_toolbar:"N\u00E4ita seadistusriba", +popup_menubar:"N\u00E4ita men\u00FC\u00FCriba", +popup_location:"N\u00E4ita asukohariba", +popup_resizable:"Muuda akna suurus muudetavaks", +popup_dependent:"S\u00F5ltuv (ainult Mozilla/Firefox)", +popup_size:"Suurus", +popup_position:"Positsioon (X/Y)", +id:"ID", +style:"Stiil", +classes:"Klassid", +target_name:"Sihtm\u00E4rgi nimi", +langdir:"Keele suund", +target_langcode:"Sihtm\u00E4rgi keel", +langcode:"Keele kood", +encoding:"Sihtm\u00E4rgi kodeering", +mime:"M\u00E4rgista MIME t\u00FC\u00FCp", +rel:"Seo leht sihtm\u00E4rgiga", +rev:"Seo sihtm\u00E4rk lehega", +tabindex:"Sisujuht", +accesskey:"Ligip\u00E4\u00E4suklahv", +ltr:"Vasakult paremale", +rtl:"Paremalt vasakule", +link_list:"Linkide list" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/advlink/langs/fr_dlg.js b/webcit/tiny_mce/plugins/advlink/langs/fr_dlg.js new file mode 100644 index 000000000..a17db8f15 --- /dev/null +++ b/webcit/tiny_mce/plugins/advlink/langs/fr_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('fr.advlink_dlg',{ +title:"Ins\u00E9rer / \u00E9diter un lien", +url:"URL du lien", +target:"Cible", +titlefield:"Titre", +is_email:"L'URL que vous avez saisie semble \u00EAtre une adresse e-mail, souhaitez-vous ajouter le pr\u00E9fixe \u00AB mailto: \u00BB ?", +is_external:"L'URL que vous avez saisie semble \u00EAtre une adresse web externe. Souhaitez-vous ajouter le pr\u00E9fixe \u00AB http:// \u00BB ?", +list:"Liste de liens", +general_tab:"G\u00E9n\u00E9ral", +popup_tab:"Popup", +events_tab:"\u00C9v\u00E8nements", +advanced_tab:"Avanc\u00E9", +general_props:"Propri\u00E9t\u00E9s g\u00E9n\u00E9rales", +popup_props:"Propri\u00E9t\u00E9s de la popup", +event_props:"\u00C9v\u00E8nements", +advanced_props:"Propri\u00E9t\u00E9s avanc\u00E9es", +popup_opts:"Options", +anchor_names:"Ancres", +target_same:"Ouvrir dans cette fen\u00EAtre / dans ce cadre", +target_parent:"Ouvrir dans la fen\u00EAtre / le cadre parent", +target_top:"Ouvrir dans le cadre principal (remplace tous les cadres)", +target_blank:"Ouvrir dans une nouvelle fen\u00EAtre", +popup:"Popup Javascript", +popup_url:"URL de la popup", +popup_name:"Nom de la fen\u00EAtre", +popup_return:"Ins\u00E9rer 'return false'", +popup_scrollbars:"Afficher les ascenseurs", +popup_statusbar:"Afficher la barre d'\u00E9tat", +popup_toolbar:"Afficher la barre d'outils", +popup_menubar:"Afficher la barre de menu", +popup_location:"Afficher la barre d'adresse", +popup_resizable:"Autoriser le redimensionnement de la fen\u00EAtre", +popup_dependent:"D\u00E9pendante (seulement sous Mozilla/Firefox)", +popup_size:"Taille", +popup_position:"Position (X/Y)", +id:"Id", +style:"Style", +classes:"Classes", +target_name:"Nom de la cible", +langdir:"Sens de lecture", +target_langcode:"Langue de la cible", +langcode:"Code de la langue", +encoding:"Encodage de la cible", +mime:"Type MIME de la cible", +rel:"Relation de la page \u00E0 la cible", +rev:"Relation de la cible \u00E0 la page", +tabindex:"Tabindex", +accesskey:"Touche d'acc\u00E8s rapide", +ltr:"Gauche \u00E0 droite", +rtl:"Droite \u00E0 gauche", +link_list:"Liste des liens" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/advlink/langs/hu_dlg.js b/webcit/tiny_mce/plugins/advlink/langs/hu_dlg.js new file mode 100644 index 000000000..2399ad88a --- /dev/null +++ b/webcit/tiny_mce/plugins/advlink/langs/hu_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('hu.advlink_dlg',{ +title:"Link besz\u00FAr\u00E1s/szerkeszt\u00E9s", +url:"Link URL", +target:"Target", +titlefield:"C\u00EDm", +is_email:"A be\u00EDrt URL e-mail c\u00EDmnek t\u0171nik, k\u00EDv\u00E1nja a sz\u00FCks\u00E9ges mailto:-t el\u00E9 tenni?", +is_external:"A be\u00EDrt URL k\u00FCls\u0151 hivatkoz\u00E1snak t\u0171nik, k\u00EDv\u00E1nja a sz\u00FCks\u00E9ges http://-t el\u00E9 tenni?", +list:"Link lista", +general_tab:"\u00C1ltal\u00E1nos", +popup_tab:"Felugr\u00F3 ablak", +events_tab:"Esem\u00E9nyek", +advanced_tab:"Halad\u00F3", +general_props:"\u00C1ltal\u00E1nos tulajdons\u00E1gok", +popup_props:"Felugr\u00F3 ablak tulajdons\u00E1gai", +event_props:"Esem\u00E9nyek", +advanced_props:"Halad\u00F3 tulajdons\u00E1gok", +popup_opts:"Be\u00E1ll\u00EDt\u00E1sok", +anchor_names:"Horgonyok", +target_same:"Azonos ablakban/keretben megnyit\u00E1s", +target_parent:"Sz\u00FCl\u0151 ablakban/keretben megnyit\u00E1s", +target_top:"Azonos ablakban/keretben megnyit\u00E1s legfel\u00FCl", +target_blank:"\u00DAj ablakban megnyit\u00E1s", +popup:"JavaScript felugr\u00F3 ablak", +popup_url:"Felugr\u00F3 ablak URL", +popup_name:"Ablakn\u00E9v", +popup_return:"'return false' besz\u00FAr\u00E1sa", +popup_scrollbars:"G\u00F6rget\u0151s\u00E1vok mutat\u00E1sa", +popup_statusbar:"St\u00E1tuszsor mutat\u00E1sa", +popup_toolbar:"Eszk\u00F6zsor mutat\u00E1sa", +popup_menubar:"Men\u00FCsor mutat\u00E1sa", +popup_location:"C\u00EDm mez\u0151 mutat\u00E1sa", +popup_resizable:"\u00C1tm\u00E9retezhet\u0151 ablak", +popup_dependent:"F\u00FCgg\u0151 (csak Mozilla/Firefox)", +popup_size:"M\u00E9ret", +popup_position:"Poz\u00EDci\u00F3 (X/Y)", +id:"Id", +style:"Style", +classes:"Class-ok", +target_name:"C\u00E9l neve", +langdir:"Nyelv \u00EDr\u00E1s ir\u00E1ny", +target_langcode:"C\u00E9l nyelv", +langcode:"Nyelv k\u00F3d", +encoding:"C\u00E9l karakterk\u00F3dol\u00E1s", +mime:"C\u00E9l MIME t\u00EDpus", +rel:"Oldal kapcsolata a c\u00E9llal", +rev:"C\u00E9l kapcsolata az oldallal", +tabindex:"Tabindex", +accesskey:"Gyorsgomb", +ltr:"Balr\u00F3l jobbra", +rtl:"Jobbr\u00F3l balra", +link_list:"Link lista" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/advlink/langs/nl_dlg.js b/webcit/tiny_mce/plugins/advlink/langs/nl_dlg.js index 4db7120fe..e8f2fd608 100644 --- a/webcit/tiny_mce/plugins/advlink/langs/nl_dlg.js +++ b/webcit/tiny_mce/plugins/advlink/langs/nl_dlg.js @@ -35,7 +35,7 @@ popup_size:"Grootte", popup_position:"Positie (X/Y)", id:"Id", style:"Stijl", -classes:"Klasses", +classes:"Klassen", target_name:"Doel", langdir:"Taalrichting", target_langcode:"Taal", diff --git a/webcit/tiny_mce/plugins/advlink/langs/pt_dlg.js b/webcit/tiny_mce/plugins/advlink/langs/pt_dlg.js index baf647ac8..aa4a08cfa 100644 --- a/webcit/tiny_mce/plugins/advlink/langs/pt_dlg.js +++ b/webcit/tiny_mce/plugins/advlink/langs/pt_dlg.js @@ -2,48 +2,48 @@ tinyMCE.addI18n('pt.advlink_dlg',{ title:"Inserir/editar hyperlink", url:"URL do hyperlink", target:"Alvo", -titlefield:"T\u00C3\u00ADtulo", -is_email:"A URL digitada parece ser um endere\u00C3\u00A7o de e-mail. Deseja acrescentar o (necess\u00C3\u00A1rio) prefixo mailto:?", -is_external:"A URL digitada parece conduzir a um link externo. Deseja acrescentar o (necess\u00C3\u00A1rio) prefixo http://?", +titlefield:"T\u00EDtulo", +is_email:"A URL digitada parece ser um endere\u00E7o de e-mail. Deseja acrescentar o prefixo necess\u00E1rio mailto:?", +is_external:"A URL digitada parece conduzir a um link externo. Deseja acrescentar o prefixo necess\u00E1rio http://?", list:"Lista de hyperlinks", general_tab:"Geral", popup_tab:"Popup", events_tab:"Eventos", -advanced_tab:"Avan\u00C3\u00A7ado", +advanced_tab:"Avan\u00E7ado", general_props:"Propriedades gerais", popup_props:"Propriedades de popup", event_props:"Eventos", -advanced_props:"Propriedades avan\u00C3\u00A7adas", -popup_opts:"Op\u00C3\u00A7\u00C3\u00B5es", -anchor_names:"\u00C3\u0082ncoras", +advanced_props:"Propriedades avan\u00E7adas", +popup_opts:"Op\u00E7\u00F5es", +anchor_names:"\u00C2ncoras", target_same:"Abrir nesta janela/quadro", target_parent:"Abrir na janela/quadro pai", -target_top:"Abrir na p\u00C3\u00A1gina inteira (substitui todos os quadros)", +target_top:"Abrir na p\u00E1gina inteira (substitui todos os quadros)", target_blank:"Abrir numa nova janela", popup:"Popup javascript", popup_url:"URL do popup", popup_name:"Nome da janela", popup_return:"Inserir \"return false\"", -popup_scrollbars:"Mostrar barras de scroll", -popup_statusbar:"Mostrar barra de status", -popup_toolbar:"Mostrar barras de ferramentas", -popup_menubar:"Mostrar barra de menu", -popup_location:"Mostrar barra de endere\u00C3\u00A7os", -popup_resizable:"Permitir altera\u00C3\u00A7\u00C3\u00A3o do tamanho da janela", +popup_scrollbars:"Mostrar as barras de scroll", +popup_statusbar:"Mostrar a barra de status", +popup_toolbar:"Mostrar a barra de ferramentas", +popup_menubar:"Mostrar a barra de menu", +popup_location:"Mostrar a barra de endere\u00E7os", +popup_resizable:"Permitir altera\u00E7\u00E3o do tamanho da janela", popup_dependent:"Dependente (Mozilla/Firefox apenas)", popup_size:"Tamanho", -popup_position:"Posi\u00C3\u00A7\u00C3\u00A3o (X/Y)", +popup_position:"Posi\u00E7\u00E3o (X/Y)", id:"Id", style:"Estilo", classes:"Classes", target_name:"Nome do alvo", -langdir:"Dire\u00C3\u00A7\u00C3\u00A3o do texto", -target_langcode:"linguagem alvo", -langcode:"C\u00C3\u00B3digo da linguagem", -encoding:"Codifica\u00C3\u00A7\u00C3\u00A3o de caracteres", +langdir:"Dire\u00E7\u00E3o do texto", +target_langcode:"Idioma alvo", +langcode:"C\u00F3digo do idioma", +encoding:"Codifica\u00E7\u00E3o de caracteres", mime:"Tipo MIME alvo", -rel:"Rela\u00C3\u00A7\u00C3\u00A3o p\u00C3\u00A1gina/alvo", -rev:"Rela\u00C3\u00A7\u00C3\u00A3o alvo/p\u00C3\u00A1gina", +rel:"Rela\u00E7\u00E3o p\u00E1gina/alvo", +rev:"Rela\u00E7\u00E3o alvo/p\u00E1gina", tabindex:"Tabindex", accesskey:"Chave de acesso", ltr:"Da esquerda para a direita", diff --git a/webcit/tiny_mce/plugins/advlink/langs/ru_dlg.js b/webcit/tiny_mce/plugins/advlink/langs/ru_dlg.js new file mode 100644 index 000000000..420e14e6b --- /dev/null +++ b/webcit/tiny_mce/plugins/advlink/langs/ru_dlg.js @@ -0,0 +1,52 @@ +tinyMCE.addI18n('ru.advlink_dlg',{ +title:"\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0441\u0441\u044B\u043B\u043A\u0438", +url:"\u0410\u0434\u0440\u0435\u0441", +target:"\u0426\u0435\u043B\u044C", +titlefield:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A", +is_email:"\u0412\u0432\u0435\u0434\u0435\u043D\u043D\u044B\u0439 \u0430\u0434\u0440\u0435\u0441 \u043D\u0430\u043F\u043E\u043C\u0438\u043D\u0430\u0435\u0442 \u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0443\u044E \u043F\u043E\u0447\u0442\u0443, \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u0440\u0435\u0444\u0438\u043A\u0441 mailto:?", +is_external:"\u0412\u0432\u0435\u0434\u0435\u043D\u043D\u044B\u0439 \u0430\u0434\u0440\u0435\u0441 \u043D\u0430\u043F\u043E\u043C\u0438\u043D\u0430\u0435\u0442 \u0432\u043D\u0435\u0448\u043D\u044E\u044E \u0441\u0441\u044B\u043B\u043A\u0443, \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u0440\u0435\u0444\u0438\u043A\u0441 http://?", +list:"\u0421\u043F\u0438\u0441\u043E\u043A", +general_tab:"\u041E\u0431\u0449\u0435\u0435", +popup_tab:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u0435", +events_tab:"\u0421\u043E\u0431\u044B\u0442\u0438\u044F", +advanced_tab:"\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u043E", +general_props:"\u041E\u0431\u0449\u0438\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B", +popup_props:"\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u044F", +event_props:"\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0441\u043E\u0431\u044B\u0442\u0438\u0439", +advanced_props:"\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B", +popup_opts:"\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u0430", +anchor_names:"\u042F\u043A\u043E\u0440\u044F", +target_same:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u044D\u0442\u043E\u043C \u043E\u043A\u043D\u0435/\u043A\u0430\u0434\u0440\u0435", +target_parent:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u0440\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u0441\u043A\u043E\u043C \u043E\u043A\u043D\u0435/\u043A\u0430\u0434\u0440\u0435", +target_top:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u0432\u0435\u0440\u0445\u043D\u0435\u043C \u043A\u0430\u0434\u0440\u0435 (\u0437\u0430\u043C\u0435\u043D\u0438\u0442\u044C \u0432\u0441\u0435 \u043A\u0430\u0434\u0440\u044B)", +target_blank:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u043D\u043E\u0432\u043E\u043C \u043E\u043A\u043D\u0435", +popup:"\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u0435 \u0441 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0435\u043C Java", +popup_url:"\u0410\u0434\u0440\u0435\u0441", +popup_name:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u043A\u043D\u0430", +popup_return:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C 'return false'", +popup_scrollbars:"\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u043F\u043E\u043B\u043E\u0441\u044B \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438", +popup_statusbar:"\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u044F", +popup_toolbar:"\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u043F\u0430\u043D\u0435\u043B\u0438 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u043E\u0432", +popup_menubar:"\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u043C\u0435\u043D\u044E", +popup_location:"\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u043F\u0430\u043D\u0435\u043B\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u044F", +popup_resizable:"\u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u044F\u0442\u044C \u0440\u0430\u0437\u043C\u0435\u0440", +popup_dependent:"\u0417\u0430\u0432\u0438\u0441\u0438\u043C\u043E\u0441\u0442\u044C (\u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F Firefox)", +popup_size:"\u0420\u0430\u0437\u043C\u0435\u0440", +popup_position:"\u041F\u043E\u0437\u0438\u0446\u0438\u044F (X/Y)", +id:"\u0418\u043C\u044F", +style:"\u0421\u0442\u0438\u043B\u044C", +classes:"\u041A\u043B\u0430\u0441\u0441\u044B", +target_name:"\u0418\u043C\u044F \u0446\u0435\u043B\u0438", +langdir:"\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0442\u0435\u043A\u0441\u0442\u0430", +target_langcode:"\u042F\u0437\u044B\u043A \u0446\u0435\u043B\u0438", +langcode:"\u041A\u043E\u0434 \u044F\u0437\u044B\u043A\u0430", +encoding:"\u041A\u043E\u0434\u0438\u0440\u043E\u0432\u043A\u0430 \u0446\u0435\u043B\u0438", +mime:"MIME \u0442\u0438\u043F \u0446\u0435\u043B\u0438", +rel:"\u041E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u043A \u0446\u0435\u043B\u0438", +rev:"\u041E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u0435 \u0446\u0435\u043B\u0438 \u043A \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435", +tabindex:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A", +accesskey:"\u041A\u043B\u044E\u0447 \u0434\u043E\u0441\u0442\u0443\u043F\u0430", +ltr:"\u0421\u043B\u0435\u0432\u0430 \u043D\u0430\u043F\u0440\u0430\u0432\u043E", +rtl:"\u0421\u043F\u0440\u0430\u0432\u0430 \u043D\u0430\u043B\u0435\u0432\u043E", +link_list:"\u0421\u043F\u0438\u0441\u043E\u043A \u0441\u0441\u044B\u043B\u043E\u043A" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/advlink/link.htm b/webcit/tiny_mce/plugins/advlink/link.htm index f46e8f832..876669c6b 100644 --- a/webcit/tiny_mce/plugins/advlink/link.htm +++ b/webcit/tiny_mce/plugins/advlink/link.htm @@ -8,7 +8,6 @@ -
@@ -28,7 +27,7 @@ - + @@ -710,16 +709,9 @@
-
-
- -
 
-
-
- -
- -
+ + +
diff --git a/webcit/tiny_mce/plugins/tabfocus/editor_plugin.js b/webcit/tiny_mce/plugins/tabfocus/editor_plugin.js new file mode 100644 index 000000000..27d244022 --- /dev/null +++ b/webcit/tiny_mce/plugins/tabfocus/editor_plugin.js @@ -0,0 +1 @@ +(function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(i){o=c.getParent(l.id,"form");n=o.elements;if(o){d(n,function(s,r){if(s.id==l.id){j=r;return false}});if(i>0){for(m=j+1;m=0;m--){if(n[m].type!="hidden"){return n[m]}}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(l=tinymce.get(n.id||n.name)){l.focus()}else{window.setTimeout(function(){window.focus();n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e);if(tinymce.isGecko){f.onKeyPress.add(h);f.onKeyDown.add(e)}else{f.onKeyDown.add(h)}f.onInit.add(function(){d(c.select("a:first,a:last",f.getContainer()),function(i){a.add(i,"focus",function(){f.focus()})})})},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/tabfocus/editor_plugin_src.js b/webcit/tiny_mce/plugins/tabfocus/editor_plugin_src.js new file mode 100644 index 000000000..c2be2f40a --- /dev/null +++ b/webcit/tiny_mce/plugins/tabfocus/editor_plugin_src.js @@ -0,0 +1,112 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode; + + tinymce.create('tinymce.plugins.TabFocusPlugin', { + init : function(ed, url) { + function tabCancel(ed, e) { + if (e.keyCode === 9) + return Event.cancel(e); + }; + + function tabHandler(ed, e) { + var x, i, f, el, v; + + function find(d) { + f = DOM.getParent(ed.id, 'form'); + el = f.elements; + + if (f) { + each(el, function(e, i) { + if (e.id == ed.id) { + x = i; + return false; + } + }); + + if (d > 0) { + for (i = x + 1; i < el.length; i++) { + if (el[i].type != 'hidden') + return el[i]; + } + } else { + for (i = x - 1; i >= 0; i--) { + if (el[i].type != 'hidden') + return el[i]; + } + } + } + + return null; + }; + + if (e.keyCode === 9) { + v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next'))); + + if (v.length == 1) { + v[1] = v[0]; + v[0] = ':prev'; + } + + // Find element to focus + if (e.shiftKey) { + if (v[0] == ':prev') + el = find(-1); + else + el = DOM.get(v[0]); + } else { + if (v[1] == ':next') + el = find(1); + else + el = DOM.get(v[1]); + } + + if (el) { + if (ed = tinymce.get(el.id || el.name)) + ed.focus(); + else + window.setTimeout(function() {window.focus();el.focus();}, 10); + + return Event.cancel(e); + } + } + }; + + ed.onKeyUp.add(tabCancel); + + if (tinymce.isGecko) { + ed.onKeyPress.add(tabHandler); + ed.onKeyDown.add(tabCancel); + } else + ed.onKeyDown.add(tabHandler); + + ed.onInit.add(function() { + each(DOM.select('a:first,a:last', ed.getContainer()), function(n) { + Event.add(n, 'focus', function() {ed.focus();}); + }); + }); + }, + + getInfo : function() { + return { + longname : 'Tabfocus', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin); +})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/table/cell.htm b/webcit/tiny_mce/plugins/table/cell.htm index 60264db8e..d243e1d83 100644 --- a/webcit/tiny_mce/plugins/table/cell.htm +++ b/webcit/tiny_mce/plugins/table/cell.htm @@ -8,7 +8,6 @@ -
@@ -171,13 +170,8 @@ -
-
-
- -
- -
+ + diff --git a/webcit/tiny_mce/plugins/table/editor_plugin.js b/webcit/tiny_mce/plugins/table/editor_plugin.js index 97a9d2567..484f81c37 100644 --- a/webcit/tiny_mce/plugins/table/editor_plugin.js +++ b/webcit/tiny_mce/plugins/table/editor_plugin.js @@ -1 +1 @@ -(function(){var each=tinymce.each;tinymce.create('tinymce.plugins.TablePlugin',{init:function(ed,url){var t=this;t.editor=ed;t.url=url;each([['table','table.desc','mceInsertTable',true],['delete_table','table.del','mceTableDelete'],['delete_col','table.delete_col_desc','mceTableDeleteCol'],['delete_row','table.delete_row_desc','mceTableDeleteRow'],['col_after','table.col_after_desc','mceTableInsertColAfter'],['col_before','table.col_before_desc','mceTableInsertColBefore'],['row_after','table.row_after_desc','mceTableInsertRowAfter'],['row_before','table.row_before_desc','mceTableInsertRowBefore'],['row_props','table.row_desc','mceTableRowProps',true],['cell_props','table.cell_desc','mceTableCellProps',true],['split_cells','table.split_cells_desc','mceTableSplitCells',true],['merge_cells','table.merge_cells_desc','mceTableMergeCells',true]],function(c){ed.addButton(c[0],{title:c[1],cmd:c[2],ui:c[3]});});if(ed.getParam('inline_styles')){ed.onPreProcess.add(function(ed,o){var dom=ed.dom;each(dom.select('table',o.node),function(n){var v;if(v=dom.getAttrib(n,'width')){dom.setStyle(n,'width',v);dom.setAttrib(n,'width');}if(v=dom.getAttrib(n,'height')){dom.setStyle(n,'height',v);dom.setAttrib(n,'height');}});});}ed.onInit.add(function(){if(ed&&ed.plugins.contextmenu){ed.plugins.contextmenu.onContextMenu.add(function(th,m,e){var sm,se=ed.selection,el=se.getNode()||ed.getBody();if(ed.dom.getParent(e,'td')||ed.dom.getParent(e,'th')){m.removeAll();if(el.nodeName=='A'&&!ed.dom.getAttrib(el,'name')){m.add({title:'advanced.link_desc',icon:'link',cmd:ed.plugins.advlink?'mceAdvLink':'mceLink',ui:true});m.add({title:'advanced.unlink_desc',icon:'unlink',cmd:'UnLink'});m.addSeparator();}if(el.nodeName=='IMG'&&el.className.indexOf('mceItem')==-1){m.add({title:'advanced.image_desc',icon:'image',cmd:ed.plugins.advimage?'mceAdvImage':'mceImage',ui:true});m.addSeparator();}m.add({title:'table.desc',icon:'table',cmd:'mceInsertTable',ui:true,value:{action:'insert'}});m.add({title:'table.props_desc',icon:'table_props',cmd:'mceInsertTable',ui:true});m.add({title:'table.del',icon:'delete_table',cmd:'mceTableDelete',ui:true});m.addSeparator();sm=m.addMenu({title:'table.cell'});sm.add({title:'table.cell_desc',icon:'cell_props',cmd:'mceTableCellProps',ui:true});sm.add({title:'table.split_cells_desc',icon:'split_cells',cmd:'mceTableSplitCells',ui:true});sm.add({title:'table.merge_cells_desc',icon:'merge_cells',cmd:'mceTableMergeCells',ui:true});sm=m.addMenu({title:'table.row'});sm.add({title:'table.row_desc',icon:'row_props',cmd:'mceTableRowProps',ui:true});sm.add({title:'table.row_before_desc',icon:'row_before',cmd:'mceTableInsertRowBefore'});sm.add({title:'table.row_after_desc',icon:'row_after',cmd:'mceTableInsertRowAfter'});sm.add({title:'table.delete_row_desc',icon:'delete_row',cmd:'mceTableDeleteRow'});sm.addSeparator();sm.add({title:'table.cut_row_desc',icon:'cut',cmd:'mceTableCutRow'});sm.add({title:'table.copy_row_desc',icon:'copy',cmd:'mceTableCopyRow'});sm.add({title:'table.paste_row_before_desc',icon:'paste',cmd:'mceTablePasteRowBefore'});sm.add({title:'table.paste_row_after_desc',icon:'paste',cmd:'mceTablePasteRowAfter'});sm=m.addMenu({title:'table.col'});sm.add({title:'table.col_before_desc',icon:'col_before',cmd:'mceTableInsertColBefore'});sm.add({title:'table.col_after_desc',icon:'col_after',cmd:'mceTableInsertColAfter'});sm.add({title:'table.delete_col_desc',icon:'delete_col',cmd:'mceTableDeleteCol'});}else m.add({title:'table.desc',icon:'table',cmd:'mceInsertTable',ui:true});});}});ed.onKeyDown.add(function(ed,e){if(e.keyCode==9&&ed.dom.getParent(ed.selection.getNode(),'TABLE')){if(!tinymce.isGecko&&!tinymce.isOpera){tinyMCE.execInstanceCommand(ed.editorId,"mceTableMoveToNextRow",true);return tinymce.dom.Event.cancel(e);}ed.undoManager.add();}});if(!tinymce.isIE){if(ed.getParam('table_selection',true)){ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName==='TABLE')ed.selection.select(e);});}}ed.onNodeChange.add(function(ed,cm,n){var p=ed.dom.getParent(n,'td,th,caption');cm.setActive('table',n.nodeName==='TABLE'||!!p);if(p&&p.nodeName==='CAPTION')p=null;cm.setDisabled('delete_table',!p);cm.setDisabled('delete_col',!p);cm.setDisabled('delete_table',!p);cm.setDisabled('delete_row',!p);cm.setDisabled('col_after',!p);cm.setDisabled('col_before',!p);cm.setDisabled('row_after',!p);cm.setDisabled('row_before',!p);cm.setDisabled('row_props',!p);cm.setDisabled('cell_props',!p);cm.setDisabled('split_cells',!p||(parseInt(ed.dom.getAttrib(p,'colspan','1'))<2&&parseInt(ed.dom.getAttrib(p,'rowspan','1'))<2));cm.setDisabled('merge_cells',!p);});if(!tinymce.isIE){ed.onBeforeSetContent.add(function(ed,o){if(o.initial)o.content=o.content.replace(/<(td|th)([^>]+|)>\s*<\/(td|th)>/g,tinymce.isOpera?'<$1$2> ':'<$1$2>
');});}},execCommand:function(cmd,ui,val){var ed=this.editor,b;switch(cmd){case"mceTableMoveToNextRow":case"mceInsertTable":case"mceTableRowProps":case"mceTableCellProps":case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":case"mceTableDelete":ed.execCommand('mceBeginUndoLevel');this._doExecCommand(cmd,ui,val);ed.execCommand('mceEndUndoLevel');return true;}return false;},getInfo:function(){return{longname:'Tables',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/table',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_doExecCommand:function(command,user_interface,value){var inst=this.editor,ed=inst,url=this.url;var focusElm=inst.selection.getNode();var trElm=inst.dom.getParent(focusElm,"tr");var tdElm=inst.dom.getParent(focusElm,"td,th");var tableElm=inst.dom.getParent(focusElm,"table");var doc=inst.contentWindow.document;var tableBorder=tableElm?tableElm.getAttribute("border"):"";if(trElm&&tdElm==null)tdElm=trElm.cells[0];function inArray(ar,v){for(var i=0;i0&&inArray(ar[i],v))return true;if(ar[i]==v)return true;}return false;}function select(dx,dy){var td;grid=getTableGrid(tableElm);dx=dx||0;dy=dy||0;dx=Math.max(cpos.cellindex+dx,0);dy=Math.max(cpos.rowindex+dy,0);inst.execCommand('mceRepaint');td=getCell(grid,dy,dx);if(td){inst.selection.select(td.firstChild||td);inst.selection.collapse(1);}};function makeTD(){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='
';}function getColRowSpan(td){var colspan=inst.dom.getAttrib(td,"colspan");var rowspan=inst.dom.getAttrib(td,"rowspan");colspan=colspan==""?1:parseInt(colspan);rowspan=rowspan==""?1:parseInt(rowspan);return{colspan:colspan,rowspan:rowspan};}function getCellPos(grid,td){var x,y;for(y=0;y1){for(var i=x;i1)td.rowSpan=sd.rowspan+1;lastElm=td;}deleteMarked(tableElm);}}function prevElm(node,name){while((node=node.previousSibling)!=null){if(node.nodeName==name)return node;}return null;}function nextElm(node,names){var namesAr=names.split(',');while((node=node.nextSibling)!=null){for(var i=0;i1){do{var nexttd=nextElm(td,"TD,TH");if(td._delete)td.parentNode.removeChild(td);}while((td=nexttd)!=null);}}while((tr=next)!=null);}function addRows(td_elm,tr_elm,rowspan){td_elm.rowSpan=1;var trNext=nextElm(tr_elm,"TR");for(var i=1;i';if(tinymce.isIE)trNext.insertBefore(newTD,trNext.cells(td_elm.cellIndex));else trNext.insertBefore(newTD,trNext.cells[td_elm.cellIndex]);trNext=nextElm(trNext,"TR");}}function copyRow(doc,table,tr){var grid=getTableGrid(table);var newTR=tr.cloneNode(false);var cpos=getCellPos(grid,tr.cells[0]);var lastCell=null;var tableBorder=inst.dom.getAttrib(table,"border");var tdElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){var newTD=null;if(lastCell!=tdElm){for(var i=0;i';}newTD.colSpan=1;newTD.rowSpan=1;newTR.appendChild(newTD);lastCell=tdElm;}return newTR;}switch(command){case"mceTableMoveToNextRow":var nextCell=getNextCell(tableElm,tdElm);if(!nextCell){inst.execCommand("mceTableInsertRowAfter",tdElm);nextCell=getNextCell(tableElm,tdElm);}inst.selection.select(nextCell);inst.selection.collapse(true);return true;case"mceTableRowProps":if(trElm==null)return true;if(user_interface){inst.windowManager.open({url:url+'/row.htm',width:400+parseInt(inst.getLang('table.rowprops_delta_width',0)),height:295+parseInt(inst.getLang('table.rowprops_delta_height',0)),inline:1},{plugin_url:url});}return true;case"mceTableCellProps":if(tdElm==null)return true;if(user_interface){inst.windowManager.open({url:url+'/cell.htm',width:400+parseInt(inst.getLang('table.cellprops_delta_width',0)),height:295+parseInt(inst.getLang('table.cellprops_delta_height',0)),inline:1},{plugin_url:url});}return true;case"mceInsertTable":if(user_interface){inst.windowManager.open({url:url+'/table.htm',width:400+parseInt(inst.getLang('table.table_delta_width',0)),height:320+parseInt(inst.getLang('table.table_delta_height',0)),inline:1},{plugin_url:url,action:value?value.action:0});}return true;case"mceTableDelete":var table=inst.dom.getParent(inst.selection.getNode(),"table");if(table){table.parentNode.removeChild(table);inst.execCommand('mceRepaint');}return true;case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":if(!tableElm)return true;if(trElm&&tableElm!=trElm.parentNode)tableElm=trElm.parentNode;if(tableElm&&trElm){switch(command){case"mceTableCutRow":if(!trElm||!tdElm)return true;inst.tableRowClipboard=copyRow(doc,tableElm,trElm);inst.execCommand("mceTableDeleteRow");break;case"mceTableCopyRow":if(!trElm||!tdElm)return true;inst.tableRowClipboard=copyRow(doc,tableElm,trElm);break;case"mceTablePasteRowBefore":if(!trElm||!tdElm)return true;var newTR=inst.tableRowClipboard.cloneNode(true);var prevTR=prevElm(trElm,"TR");if(prevTR!=null)trimRow(tableElm,prevTR,prevTR.cells[0],newTR);trElm.parentNode.insertBefore(newTR,trElm);break;case"mceTablePasteRowAfter":if(!trElm||!tdElm)return true;var nextTR=nextElm(trElm,"TR");var newTR=inst.tableRowClipboard.cloneNode(true);trimRow(tableElm,trElm,tdElm,newTR);if(nextTR==null)trElm.parentNode.appendChild(newTR);else nextTR.parentNode.insertBefore(newTR,nextTR);break;case"mceTableInsertRowBefore":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var newTR=doc.createElement("tr");var lastTDElm=null;cpos.rowindex--;if(cpos.rowindex<0)cpos.rowindex=0;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['rowspan']==1){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='
';newTD.colSpan=tdElm.colSpan;newTR.appendChild(newTD);}else tdElm.rowSpan=sd['rowspan']+1;lastTDElm=tdElm;}}trElm.parentNode.insertBefore(newTR,trElm);select(0,1);break;case"mceTableInsertRowAfter":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var newTR=doc.createElement("tr");var lastTDElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['rowspan']==1){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='
';newTD.colSpan=tdElm.colSpan;newTR.appendChild(newTD);}else tdElm.rowSpan=sd['rowspan']+1;lastTDElm=tdElm;}}if(newTR.hasChildNodes()){var nextTR=nextElm(trElm,"TR");if(nextTR)nextTR.parentNode.insertBefore(newTR,nextTR);else tableElm.appendChild(newTR);}select(0,1);break;case"mceTableDeleteRow":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);if(grid.length==1&&tableElm.nodeName=='TBODY'){inst.dom.remove(inst.dom.getParent(tableElm,"table"));return true;}var cells=trElm.cells;var nextTR=nextElm(trElm,"TR");for(var x=0;x1){var newTD=cells[x].cloneNode(true);var sd=getColRowSpan(cells[x]);newTD.rowSpan=sd.rowspan-1;var nextTD=nextTR.cells[x];if(nextTD==null)nextTR.appendChild(newTD);else nextTR.insertBefore(newTD,nextTD);}}var lastTDElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd.rowspan>1){tdElm.rowSpan=sd.rowspan-1;}else{trElm=tdElm.parentNode;if(trElm.parentNode)trElm._delete=true;}lastTDElm=tdElm;}}deleteMarked(tableElm);select(0,-1);break;case"mceTableInsertColBefore":if(!trElm||!tdElm)return true;var grid=getTableGrid(inst.dom.getParent(tableElm,"table"));var cpos=getCellPos(grid,tdElm);var lastTDElm=null;for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']==1){var newTD=doc.createElement(tdElm.nodeName);if(!tinymce.isIE)newTD.innerHTML='
';newTD.rowSpan=tdElm.rowSpan;tdElm.parentNode.insertBefore(newTD,tdElm);}else tdElm.colSpan++;lastTDElm=tdElm;}}select();break;case"mceTableInsertColAfter":if(!trElm||!tdElm)return true;var grid=getTableGrid(inst.dom.getParent(tableElm,"table"));var cpos=getCellPos(grid,tdElm);var lastTDElm=null;for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']==1){var newTD=doc.createElement(tdElm.nodeName);if(!tinymce.isIE)newTD.innerHTML='
';newTD.rowSpan=tdElm.rowSpan;var nextTD=nextElm(tdElm,"TD,TH");if(nextTD==null)tdElm.parentNode.appendChild(newTD);else nextTD.parentNode.insertBefore(newTD,nextTD);}else tdElm.colSpan++;lastTDElm=tdElm;}}select(1);break;case"mceTableDeleteCol":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var lastTDElm=null;if((grid.length>1&&grid[0].length<=1)&&tableElm.nodeName=='TBODY'){inst.dom.remove(inst.dom.getParent(tableElm,"table"));return true;}for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']>1)tdElm.colSpan=sd['colspan']-1;else{if(tdElm.parentNode)tdElm.parentNode.removeChild(tdElm);}lastTDElm=tdElm;}}select(-1);break;case"mceTableSplitCells":if(!trElm||!tdElm)return true;var spandata=getColRowSpan(tdElm);var colspan=spandata["colspan"];var rowspan=spandata["rowspan"];if(colspan>1||rowspan>1){tdElm.colSpan=1;for(var i=1;i';trElm.insertBefore(newTD,nextElm(tdElm,"TD,TH"));if(rowspan>1)addRows(newTD,trElm,rowspan);}addRows(tdElm,trElm,rowspan);}tableElm=inst.dom.getParent(inst.selection.getNode(),"table");break;case"mceTableMergeCells":var rows=[];var sel=inst.selection.getSel();var grid=getTableGrid(tableElm);if(tinymce.isIE||sel.rangeCount==1){if(user_interface){var sp=getColRowSpan(tdElm);inst.windowManager.open({url:url+'/merge_cells.htm',width:240+parseInt(inst.getLang('table.merge_cells_delta_width',0)),height:110+parseInt(inst.getLang('table.merge_cells_delta_height',0)),inline:1},{action:"update",numcols:sp.colspan,numrows:sp.rowspan,plugin_url:url});return true;}else{var numRows=parseInt(value['numrows']);var numCols=parseInt(value['numcols']);var cpos=getCellPos(grid,tdElm);if((""+numRows)=="NaN")numRows=1;if((""+numCols)=="NaN")numCols=1;var tRows=tableElm.rows;for(var y=cpos.rowindex;y0)rows[rows.length]=rowCells;var td=getCell(grid,cpos.rowindex,cpos.cellindex);each(ed.dom.select('br',td),function(e,i){if(i>0&&ed.dom.getAttrib('mce_bogus'))ed.dom.remove(e);});}}}else{var cells=[];var sel=inst.selection.getSel();var lastTR=null;var curRow=null;var x1=-1,y1=-1,x2,y2;if(sel.rangeCount<2)return true;for(var i=0;i0)rows[rows.length]=rowCells;}var curRow=[];var lastTR=null;for(var y=0;ycolSpan)colSpan=rowColSpan;lastRowSpan=-1;}var lastColSpan=-1;for(var x=0;xrowSpan)rowSpan=colRowSpan;lastColSpan=-1;}tdElm=rows[0][0];tdElm.rowSpan=rowSpan;tdElm.colSpan=colSpan;for(var y=0;y0))tdElm.innerHTML+=html;if(rows[y][x]!=tdElm&&!rows[y][x]._deleted){var cpos=getCellPos(grid,rows[y][x]);var tr=rows[y][x].parentNode;tr.removeChild(rows[y][x]);rows[y][x]._deleted=true;if(!tr.hasChildNodes()){tr.parentNode.removeChild(tr);var lastCell=null;for(var x=0;cellElm=getCell(grid,cpos.rowindex,x);x++){if(cellElm!=lastCell&&cellElm.rowSpan>1)cellElm.rowSpan--;lastCell=cellElm;}if(tdElm.rowSpan>1)tdElm.rowSpan--;}}}}each(ed.dom.select('br',tdElm),function(e,i){if(i>0&&ed.dom.getAttrib(e,'mce_bogus'))ed.dom.remove(e);});break;}tableElm=inst.dom.getParent(inst.selection.getNode(),"table");inst.addVisual(tableElm);inst.nodeChanged();}return true;}return false;}});tinymce.PluginManager.add('table',tinymce.plugins.TablePlugin);})(); \ No newline at end of file +(function(c){var d=c.each;function b(f,g){var h=g.ownerDocument,e=h.createRange(),j;e.setStartBefore(g);e.setEnd(f.endContainer,f.endOffset);j=h.createElement("body");j.appendChild(e.cloneContents());return j.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(G,F,J){var f,K,C,o;s();o=F.getParent(J.getStart(),"th,td");if(o){K=E(o);C=H();o=w(K.x,K.y)}function z(M,L){M=M.cloneNode(L);M.removeAttribute("id");return M}function s(){var L=0;f=[];d(["thead","tbody","tfoot"],function(M){var N=F.select("> "+M+" tr",G);d(N,function(O,P){P+=L;d(F.select("> td, > th",O),function(V,Q){var R,S,T,U;if(f[P]){while(f[P][Q]){Q++}}T=h(V,"rowspan");U=h(V,"colspan");for(S=P;S'}return false}},"childNodes");L=z(L,false);L.rowSpan=L.colSpan=1;if(M){L.appendChild(M)}else{if(!c.isIE){L.innerHTML='
'}}return L}function q(){var L=F.createRng();d(F.select("tr",G),function(M){if(M.cells.length==0){F.remove(M)}});if(F.select("tr",G).length==0){L.setStartAfter(G);L.setEndAfter(G);J.setRng(L);F.remove(G);return}d(F.select("thead,tbody,tfoot",G),function(M){if(M.rows.length==0){F.remove(M)}});s();row=f[Math.min(f.length-1,K.y)];if(row){J.select(row[Math.min(row.length-1,K.x)].elm,true);J.collapse(true)}}function t(R,P,T,Q){var O,M,L,N,S;O=f[P][R].elm.parentNode;for(L=1;L<=T;L++){O=F.getNext(O,"tr");if(O){for(M=R;M>=0;M--){S=f[P+L][M].elm;if(S.parentNode==O){for(N=1;N<=Q;N++){F.insertAfter(e(S),S)}break}}if(M==-1){for(N=1;N<=Q;N++){O.insertBefore(e(O.cells[0]),O.cells[0])}}}}}function B(){d(f,function(L,M){d(L,function(O,N){var R,Q,S,P;if(j(O)){O=O.elm;R=h(O,"colspan");Q=h(O,"rowspan");if(R>1||Q>1){O.colSpan=O.rowSpan=1;for(P=0;P1){Q.rowSpan=rowSpan+1;continue}}else{if(L>0&&f[L-1][P]){T=f[L-1][P].elm;rowSpan=h(T,"rowspan");if(rowSpan>1){T.rowSpan=rowSpan+1;continue}}}M=e(Q);M.colSpan=Q.colSpan;S.appendChild(M);N=Q}}if(S.hasChildNodes()){if(!O){F.insertAfter(S,R)}else{R.parentNode.insertBefore(S,R)}}}function g(M){var N,L;d(f,function(O,P){d(O,function(R,Q){if(j(R)){N=Q;if(M){return false}}});if(M){return !N}});d(f,function(R,S){var O=R[N].elm,P,Q;if(O!=L){Q=h(O,"colspan");P=h(O,"rowspan");if(Q==1){if(!M){F.insertAfter(e(O),O);t(N,S,P-1,Q)}else{O.parentNode.insertBefore(e(O),O);t(N,S,P-1,Q)}}else{O.colSpan++}L=O}})}function n(){var L=[];d(f,function(M,N){d(M,function(P,O){if(j(P)&&c.inArray(L,O)===-1){d(f,function(S){var Q=S[O].elm,R;R=h(Q,"colspan");if(R>1){Q.colSpan=R-1}else{F.remove(Q)}});L.push(O)}})});q()}function m(){var M;function L(P){var O,Q,N;O=F.getNext(P,"tr");d(P.cells,function(R){var S=h(R,"rowspan");if(S>1){R.rowSpan=S-1;Q=E(R);t(Q.x,Q.y,1,1)}});Q=E(P.cells[0]);d(f[Q.y],function(R){var S;R=R.elm;if(R!=N){S=h(R,"rowspan");if(S<=1){F.remove(R)}else{R.rowSpan=S-1}N=R}})}M=k();d(M.reverse(),function(N){L(N)});q()}function D(){var L=k();F.remove(L);q();return L}function I(){var L=k();d(L,function(N,M){L[M]=z(N,true)});return L}function A(N,M){var O=k(),L=O[M?0:O.length-1],P=L.cells.length;d(f,function(R){var Q;P=0;d(R,function(T,S){if(T.real){P+=T.colspan}if(T.elm.parentNode==L){Q=1}});if(Q){return false}});if(!M){N.reverse()}d(N,function(S){var R=S.cells.length,Q;for(i=0;iM){M=Q}if(P>L){L=P}if(R.real){T=R.colspan-1;S=R.rowspan-1;if(T){if(Q+T>M){M=Q+T}}if(S){if(P+S>L){L=P+S}}}}})});return{x:M,y:L}}function u(R){var O,N,T,S,M,L,P,Q;C=E(R);if(K&&C){O=Math.min(K.x,C.x);N=Math.min(K.y,C.y);T=Math.max(K.x,C.x);S=Math.max(K.y,C.y);M=T;L=S;for(y=N;y<=L;y++){R=f[y][O];if(!R.real){if(O-(R.colspan-1)M){M=x+P}}if(Q){if(y+Q>L){L=y+Q}}}}}F.removeClass(F.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=N;y<=L;y++){for(x=O;x<=M;x++){F.addClass(f[y][x].elm,"mceSelected")}}}}c.extend(this,{deleteTable:r,split:B,merge:p,insertRow:l,insertCol:g,deleteCols:n,deleteRows:m,cutRows:D,copyRows:I,pasteRows:A,getPos:E,setStartCell:v,setEndCell:u})}c.create("tinymce.plugins.TablePlugin",{init:function(f,g){var e,k;function j(n){var m=f.selection,l=f.dom.getParent(n||m.getNode(),"table");if(l){return new a(l,f.dom,m)}}function h(){f.getBody().style.webkitUserSelect="";f.dom.removeClass(f.dom.select("td.mceSelected,th.mceSelected"),"mceSelected")}d([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(l){f.addButton(l[0],{title:l[1],cmd:l[2],ui:l[3]})});if(!c.isIE){f.onClick.add(function(l,m){m=m.target;if(m.nodeName==="TABLE"){l.selection.select(m)}})}f.onNodeChange.add(function(m,l,q){var o;q=m.selection.getStart();o=m.dom.getParent(q,"td,th,caption");l.setActive("table",q.nodeName==="TABLE"||!!o);if(o&&o.nodeName==="CAPTION"){o=0}l.setDisabled("delete_table",!o);l.setDisabled("delete_col",!o);l.setDisabled("delete_table",!o);l.setDisabled("delete_row",!o);l.setDisabled("col_after",!o);l.setDisabled("col_before",!o);l.setDisabled("row_after",!o);l.setDisabled("row_before",!o);l.setDisabled("row_props",!o);l.setDisabled("cell_props",!o);l.setDisabled("split_cells",!o);l.setDisabled("merge_cells",!o)});f.onInit.add(function(m){var l,p,q=m.dom,n;e=m.windowManager;m.onMouseDown.add(function(r,s){if(s.button!=2){h();p=q.getParent(s.target,"td,th");l=q.getParent(p,"table")}});q.bind(m.getDoc(),"mouseover",function(u){var s,r,t=u.target;if(p&&(n||t!=p)&&(t.nodeName=="TD"||t.nodeName=="TH")){r=q.getParent(t,"table");if(r==l){if(!n){n=j(r);n.setStartCell(p);m.getBody().style.webkitUserSelect="none"}n.setEndCell(t)}s=m.selection.getSel();if(s.removeAllRanges){s.removeAllRanges()}else{s.empty()}u.preventDefault()}});m.onMouseUp.add(function(A,B){var s,u=A.selection,C,D=u.getSel(),r,v,t,z;if(p){if(n){A.getBody().style.webkitUserSelect=""}function w(E,G){var F=new c.dom.TreeWalker(E,E);do{if(E.nodeType==3&&c.trim(E.nodeValue).length!=0){if(G){s.setStart(E,0)}else{s.setEnd(E,E.nodeValue.length)}return}if(E.nodeName=="BR"){if(G){s.setStartBefore(E)}else{s.setEndBefore(E)}return}}while(E=(G?F.next():F.prev()))}C=q.select("td.mceSelected,th.mceSelected");if(C.length>0){s=q.createRng();v=C[0];z=C[C.length-1];w(v,1);r=new c.dom.TreeWalker(v,q.getParent(C[0],"table"));do{if(v.nodeName=="TD"||v.nodeName=="TH"){if(!q.hasClass(v,"mceSelected")){break}t=v}}while(v=r.next());w(t);u.setRng(s)}A.nodeChanged();p=n=l=null}});m.onKeyUp.add(function(r,s){h()});if(m&&m.plugins.contextmenu){m.plugins.contextmenu.onContextMenu.add(function(t,r,v){var w,u=m.selection,s=u.getNode()||m.getBody();if(m.dom.getParent(v,"td")||m.dom.getParent(v,"th")||m.dom.select("td.mceSelected,th.mceSelected").length){r.removeAll();if(s.nodeName=="A"&&!m.dom.getAttrib(s,"name")){r.add({title:"advanced.link_desc",icon:"link",cmd:m.plugins.advlink?"mceAdvLink":"mceLink",ui:true});r.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});r.addSeparator()}if(s.nodeName=="IMG"&&s.className.indexOf("mceItem")==-1){r.add({title:"advanced.image_desc",icon:"image",cmd:m.plugins.advimage?"mceAdvImage":"mceImage",ui:true});r.addSeparator()}r.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});r.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});r.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});r.addSeparator();w=r.addMenu({title:"table.cell"});w.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});w.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});w.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});w=r.addMenu({title:"table.row"});w.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});w.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});w.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});w.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});w.addSeparator();w.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});w.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});w.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!k);w.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!k);w=r.addMenu({title:"table.col"});w.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});w.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});w.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{r.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(!c.isIE){function o(){var r;for(r=m.getBody().lastChild;r&&r.nodeType==3&&!r.nodeValue.length;r=r.previousSibling){}if(r&&r.nodeName=="TABLE"){m.dom.add(m.getBody(),"p",null,'
')}}if(c.isGecko){m.onKeyDown.add(function(s,u){var r,t,v=s.dom;if(u.keyCode==37||u.keyCode==38){r=s.selection.getRng();t=v.getParent(r.startContainer,"table");if(t&&s.getBody().firstChild==t){if(b(r,t)){r=v.createRng();r.setStartBefore(t);r.setEndBefore(t);s.selection.setRng(r);u.preventDefault()}}}})}m.onKeyUp.add(o);m.onSetContent.add(o);m.onVisualAid.add(o);m.onPreProcess.add(function(r,t){var s=t.node.lastChild;if(s&&s.childNodes.length==1&&s.firstChild.nodeName=="BR"){r.dom.remove(s)}});o()}});d({mceTableSplitCells:function(l){l.split()},mceTableMergeCells:function(m){var n,o,l;l=f.dom.getParent(f.selection.getNode(),"th,td");if(l){n=l.rowSpan;o=l.colSpan}if(!f.dom.select("td.mceSelected,th.mceSelected").length){e.open({url:g+"/merge_cells.htm",width:240+parseInt(f.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(f.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:n,cols:o,onaction:function(p){m.merge(l,p.cols,p.rows)},plugin_url:g})}else{m.merge()}},mceTableInsertRowBefore:function(l){l.insertRow(true)},mceTableInsertRowAfter:function(l){l.insertRow()},mceTableInsertColBefore:function(l){l.insertCol(true)},mceTableInsertColAfter:function(l){l.insertCol()},mceTableDeleteCol:function(l){l.deleteCols()},mceTableDeleteRow:function(l){l.deleteRows()},mceTableCutRow:function(l){k=l.cutRows()},mceTableCopyRow:function(l){k=l.copyRows()},mceTablePasteRowBefore:function(l){l.pasteRows(k,true)},mceTablePasteRowAfter:function(l){l.pasteRows(k)},mceTableDelete:function(l){l.deleteTable()}},function(m,l){f.addCommand(l,function(){var n=j();if(n){m(n);f.execCommand("mceRepaint");h()}})});d({mceInsertTable:function(l){e.open({url:g+"/table.htm",width:400+parseInt(f.getLang("table.table_delta_width",0)),height:320+parseInt(f.getLang("table.table_delta_height",0)),inline:1},{plugin_url:g,action:l?l.action:0})},mceTableRowProps:function(){e.open({url:g+"/row.htm",width:400+parseInt(f.getLang("table.rowprops_delta_width",0)),height:295+parseInt(f.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:g})},mceTableCellProps:function(){e.open({url:g+"/cell.htm",width:400+parseInt(f.getLang("table.cellprops_delta_width",0)),height:295+parseInt(f.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:g})}},function(m,l){f.addCommand(l,function(n,o){m(o)})})}});c.PluginManager.add("table",c.plugins.TablePlugin)})(tinymce); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/table/editor_plugin_src.js b/webcit/tiny_mce/plugins/table/editor_plugin_src.js index 80cf748a3..8c30e2049 100644 --- a/webcit/tiny_mce/plugins/table/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/table/editor_plugin_src.js @@ -1,1136 +1,1139 @@ /** - * $Id: editor_plugin_src.js 953 2008-11-04 10:16:50Z spocke $ + * editor_plugin_src.js * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ -(function() { +(function(tinymce) { var each = tinymce.each; - tinymce.create('tinymce.plugins.TablePlugin', { - init : function(ed, url) { - var t = this; + // Checks if the selection/caret is at the start of the specified block element + function isAtStart(rng, par) { + var doc = par.ownerDocument, rng2 = doc.createRange(), elm; - t.editor = ed; - t.url = url; + rng2.setStartBefore(par); + rng2.setEnd(rng.endContainer, rng.endOffset); - // Register buttons - each([ - ['table', 'table.desc', 'mceInsertTable', true], - ['delete_table', 'table.del', 'mceTableDelete'], - ['delete_col', 'table.delete_col_desc', 'mceTableDeleteCol'], - ['delete_row', 'table.delete_row_desc', 'mceTableDeleteRow'], - ['col_after', 'table.col_after_desc', 'mceTableInsertColAfter'], - ['col_before', 'table.col_before_desc', 'mceTableInsertColBefore'], - ['row_after', 'table.row_after_desc', 'mceTableInsertRowAfter'], - ['row_before', 'table.row_before_desc', 'mceTableInsertRowBefore'], - ['row_props', 'table.row_desc', 'mceTableRowProps', true], - ['cell_props', 'table.cell_desc', 'mceTableCellProps', true], - ['split_cells', 'table.split_cells_desc', 'mceTableSplitCells', true], - ['merge_cells', 'table.merge_cells_desc', 'mceTableMergeCells', true] - ], function(c) { - ed.addButton(c[0], {title : c[1], cmd : c[2], ui : c[3]}); - }); + elm = doc.createElement('body'); + elm.appendChild(rng2.cloneContents()); - if (ed.getParam('inline_styles')) { - // Force move of attribs to styles in strict mode - ed.onPreProcess.add(function(ed, o) { - var dom = ed.dom; + // Check for text characters of other elements that should be treated as content + return elm.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi, '-').replace(/<[^>]+>/g, '').length == 0; + }; - each(dom.select('table', o.node), function(n) { - var v; + /** + * Table Grid class. + */ + function TableGrid(table, dom, selection) { + var grid, startPos, endPos, selectedCell; - if (v = dom.getAttrib(n, 'width')) { - dom.setStyle(n, 'width', v); - dom.setAttrib(n, 'width'); - } + buildGrid(); + selectedCell = dom.getParent(selection.getStart(), 'th,td'); + if (selectedCell) { + startPos = getPos(selectedCell); + endPos = findEndPos(); + selectedCell = getCell(startPos.x, startPos.y); + } - if (v = dom.getAttrib(n, 'height')) { - dom.setStyle(n, 'height', v); - dom.setAttrib(n, 'height'); - } - }); - }); - } + function cloneNode(node, children) { + node = node.cloneNode(children); + node.removeAttribute('id'); - ed.onInit.add(function() { - if (ed && ed.plugins.contextmenu) { - ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) { - var sm, se = ed.selection, el = se.getNode() || ed.getBody(); + return node; + } - if (ed.dom.getParent(e, 'td') || ed.dom.getParent(e, 'th')) { - m.removeAll(); + function buildGrid() { + var startY = 0; - if (el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) { - m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true}); - m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'}); - m.addSeparator(); - } + grid = []; - if (el.nodeName == 'IMG' && el.className.indexOf('mceItem') == -1) { - m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true}); - m.addSeparator(); - } + each(['thead', 'tbody', 'tfoot'], function(part) { + var rows = dom.select('> ' + part + ' tr', table); - m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', ui : true, value : {action : 'insert'}}); - m.add({title : 'table.props_desc', icon : 'table_props', cmd : 'mceInsertTable', ui : true}); - m.add({title : 'table.del', icon : 'delete_table', cmd : 'mceTableDelete', ui : true}); - m.addSeparator(); + each(rows, function(tr, y) { + y += startY; - // Cell menu - sm = m.addMenu({title : 'table.cell'}); - sm.add({title : 'table.cell_desc', icon : 'cell_props', cmd : 'mceTableCellProps', ui : true}); - sm.add({title : 'table.split_cells_desc', icon : 'split_cells', cmd : 'mceTableSplitCells', ui : true}); - sm.add({title : 'table.merge_cells_desc', icon : 'merge_cells', cmd : 'mceTableMergeCells', ui : true}); + each(dom.select('> td, > th', tr), function(td, x) { + var x2, y2, rowspan, colspan; - // Row menu - sm = m.addMenu({title : 'table.row'}); - sm.add({title : 'table.row_desc', icon : 'row_props', cmd : 'mceTableRowProps', ui : true}); - sm.add({title : 'table.row_before_desc', icon : 'row_before', cmd : 'mceTableInsertRowBefore'}); - sm.add({title : 'table.row_after_desc', icon : 'row_after', cmd : 'mceTableInsertRowAfter'}); - sm.add({title : 'table.delete_row_desc', icon : 'delete_row', cmd : 'mceTableDeleteRow'}); - sm.addSeparator(); - sm.add({title : 'table.cut_row_desc', icon : 'cut', cmd : 'mceTableCutRow'}); - sm.add({title : 'table.copy_row_desc', icon : 'copy', cmd : 'mceTableCopyRow'}); - sm.add({title : 'table.paste_row_before_desc', icon : 'paste', cmd : 'mceTablePasteRowBefore'}); - sm.add({title : 'table.paste_row_after_desc', icon : 'paste', cmd : 'mceTablePasteRowAfter'}); + // Skip over existing cells produced by rowspan + if (grid[y]) { + while (grid[y][x]) + x++; + } - // Column menu - sm = m.addMenu({title : 'table.col'}); - sm.add({title : 'table.col_before_desc', icon : 'col_before', cmd : 'mceTableInsertColBefore'}); - sm.add({title : 'table.col_after_desc', icon : 'col_after', cmd : 'mceTableInsertColAfter'}); - sm.add({title : 'table.delete_col_desc', icon : 'delete_col', cmd : 'mceTableDeleteCol'}); - } else - m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', ui : true}); + // Get col/rowspan from cell + rowspan = getSpanVal(td, 'rowspan'); + colspan = getSpanVal(td, 'colspan'); + + // Fill out rowspan/colspan right and down + for (y2 = y; y2 < y + rowspan; y2++) { + if (!grid[y2]) + grid[y2] = []; + + for (x2 = x; x2 < x + colspan; x2++) { + grid[y2][x2] = { + part : part, + real : y2 == y && x2 == x, + elm : td, + rowspan : rowspan, + colspan : colspan + }; + } + } }); - } + }); + + startY += rows.length; }); + }; - // Add undo level when new rows are created using the tab key - ed.onKeyDown.add(function(ed, e) { - if (e.keyCode == 9 && ed.dom.getParent(ed.selection.getNode(), 'TABLE')) { - if (!tinymce.isGecko && !tinymce.isOpera) { - tinyMCE.execInstanceCommand(ed.editorId, "mceTableMoveToNextRow", true); - return tinymce.dom.Event.cancel(e); - } + function getCell(x, y) { + var row; - ed.undoManager.add(); - } + row = grid[y]; + if (row) + return row[x]; + }; + + function getSpanVal(td, name) { + return parseInt(td.getAttribute(name) || 1); + }; + + function isCellSelected(cell) { + return dom.hasClass(cell.elm, 'mceSelected') || cell == selectedCell; + }; + + function getSelectedRows() { + var rows = []; + + each(table.rows, function(row) { + each(row.cells, function(cell) { + if (dom.hasClass(cell, 'mceSelected') || cell == selectedCell.elm) { + rows.push(row); + return false; + } + }); }); - // Select whole table is a table border is clicked - if (!tinymce.isIE) { - if (ed.getParam('table_selection', true)) { - ed.onClick.add(function(ed, e) { - e = e.target; + return rows; + }; - if (e.nodeName === 'TABLE') - ed.selection.select(e); - }); - } - } + function deleteTable() { + var rng = dom.createRng(); - ed.onNodeChange.add(function(ed, cm, n) { - var p = ed.dom.getParent(n, 'td,th,caption'); + rng.setStartAfter(table); + rng.setEndAfter(table); - cm.setActive('table', n.nodeName === 'TABLE' || !!p); - if (p && p.nodeName === 'CAPTION') - p = null; + selection.setRng(rng); - cm.setDisabled('delete_table', !p); - cm.setDisabled('delete_col', !p); - cm.setDisabled('delete_table', !p); - cm.setDisabled('delete_row', !p); - cm.setDisabled('col_after', !p); - cm.setDisabled('col_before', !p); - cm.setDisabled('row_after', !p); - cm.setDisabled('row_before', !p); - cm.setDisabled('row_props', !p); - cm.setDisabled('cell_props', !p); - cm.setDisabled('split_cells', !p || (parseInt(ed.dom.getAttrib(p, 'colspan', '1')) < 2 && parseInt(ed.dom.getAttrib(p, 'rowspan', '1')) < 2)); - cm.setDisabled('merge_cells', !p); - }); + dom.remove(table); + }; - // Padd empty table cells - if (!tinymce.isIE) { - ed.onBeforeSetContent.add(function(ed, o) { - if (o.initial) - o.content = o.content.replace(/<(td|th)([^>]+|)>\s*<\/(td|th)>/g, tinymce.isOpera ? '<$1$2> ' : '<$1$2>
'); - }); - } - }, - - execCommand : function(cmd, ui, val) { - var ed = this.editor, b; - - // Is table command - switch (cmd) { - case "mceTableMoveToNextRow": - case "mceInsertTable": - case "mceTableRowProps": - case "mceTableCellProps": - case "mceTableSplitCells": - case "mceTableMergeCells": - case "mceTableInsertRowBefore": - case "mceTableInsertRowAfter": - case "mceTableDeleteRow": - case "mceTableInsertColBefore": - case "mceTableInsertColAfter": - case "mceTableDeleteCol": - case "mceTableCutRow": - case "mceTableCopyRow": - case "mceTablePasteRowBefore": - case "mceTablePasteRowAfter": - case "mceTableDelete": - ed.execCommand('mceBeginUndoLevel'); - this._doExecCommand(cmd, ui, val); - ed.execCommand('mceEndUndoLevel'); - - return true; - } + function cloneCell(cell) { + var formatNode; - // Pass to next handler in chain - return false; - }, - - getInfo : function() { - return { - longname : 'Tables', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/table', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - }, - - // Private plugin internal methods - - /** - * Executes the table commands. - */ - _doExecCommand : function(command, user_interface, value) { - var inst = this.editor, ed = inst, url = this.url; - var focusElm = inst.selection.getNode(); - var trElm = inst.dom.getParent(focusElm, "tr"); - var tdElm = inst.dom.getParent(focusElm, "td,th"); - var tableElm = inst.dom.getParent(focusElm, "table"); - var doc = inst.contentWindow.document; - var tableBorder = tableElm ? tableElm.getAttribute("border") : ""; - - // Get first TD if no TD found - if (trElm && tdElm == null) - tdElm = trElm.cells[0]; - - function inArray(ar, v) { - for (var i=0; i 0 && inArray(ar[i], v)) - return true; - - // Found value - if (ar[i] == v) - return true; - } + // Clone formats + tinymce.walk(cell, function(node) { + var curNode; - return false; - } + if (node.nodeType == 3) { + each(dom.getParents(node.parentNode, null, cell).reverse(), function(node) { + node = cloneNode(node, false); - function select(dx, dy) { - var td; + if (!formatNode) + formatNode = curNode = node; + else if (curNode) + curNode.appendChild(node); - grid = getTableGrid(tableElm); - dx = dx || 0; - dy = dy || 0; - dx = Math.max(cpos.cellindex + dx, 0); - dy = Math.max(cpos.rowindex + dy, 0); + curNode = node; + }); - // Recalculate grid and select - inst.execCommand('mceRepaint'); - td = getCell(grid, dy, dx); + // Add something to the inner node + if (curNode) + curNode.innerHTML = tinymce.isIE ? ' ' : '
'; - if (td) { - inst.selection.select(td.firstChild || td); - inst.selection.collapse(1); + return false; } - }; + }, 'childNodes'); - function makeTD() { - var newTD = doc.createElement("td"); + cell = cloneNode(cell, false); + cell.rowSpan = cell.colSpan = 1; + if (formatNode) { + cell.appendChild(formatNode); + } else { if (!tinymce.isIE) - newTD.innerHTML = '
'; + cell.innerHTML = '
'; } - function getColRowSpan(td) { - var colspan = inst.dom.getAttrib(td, "colspan"); - var rowspan = inst.dom.getAttrib(td, "rowspan"); + return cell; + }; - colspan = colspan == "" ? 1 : parseInt(colspan); - rowspan = rowspan == "" ? 1 : parseInt(rowspan); + function cleanup() { + var rng = dom.createRng(); - return {colspan : colspan, rowspan : rowspan}; + // Empty rows + each(dom.select('tr', table), function(tr) { + if (tr.cells.length == 0) + dom.remove(tr); + }); + + // Empty table + if (dom.select('tr', table).length == 0) { + rng.setStartAfter(table); + rng.setEndAfter(table); + selection.setRng(rng); + dom.remove(table); + return; } - function getCellPos(grid, td) { - var x, y; + // Empty header/body/footer + each(dom.select('thead,tbody,tfoot', table), function(part) { + if (part.rows.length == 0) + dom.remove(part); + }); - for (y=0; y= 0; x2--) { + cell = grid[y + r][x2].elm; - for (i = 0; i < table.rows.length; i++) - for (j = 0; j < table.rows[i].cells.length; j++, x++) - cells[x] = table.rows[i].cells[j]; + if (cell.parentNode == tr) { + // Append clones after + for (c = 1; c <= cols; c++) + dom.insertAfter(cloneCell(cell), cell); - for (i = 0; i < cells.length; i++) - if (cells[i] == cell) - if (nextCell = cells[i+1]) - return nextCell; + break; + } + } + + if (x2 == -1) { + // Insert nodes before first cell + for (c = 1; c <= cols; c++) + tr.insertBefore(cloneCell(tr.cells[0]), tr.cells[0]); + } + } } + }; - function getTableGrid(table) { - var grid = [], rows = table.rows, x, y, td, sd, xstart, x2, y2; + function split() { + each(grid, function(row, y) { + each(row, function(cell, x) { + var colSpan, rowSpan, newCell, i; - for (y=0; y 1 || rowSpan > 1) { + cell.colSpan = cell.rowSpan = 1; - // Fill box - for (y2=y; y2 1) { // Remove due to colspan - for (var i=x; i 1) - td.rowSpan = sd.rowspan + 1; + for (x = 0; x < grid[0].length; x++) { + cell = grid[posY][x].elm; - lastElm = td; + if (cell != lastCell) { + if (!before) { + rowSpan = getSpanVal(cell, 'rowspan'); + if (rowSpan > 1) { + cell.rowSpan = rowSpan + 1; + continue; + } + } else { + // Check if cell above can be expanded + if (posY > 0 && grid[posY - 1][x]) { + otherCell = grid[posY - 1][x].elm; + rowSpan = getSpanVal(otherCell, 'rowspan'); + if (rowSpan > 1) { + otherCell.rowSpan = rowSpan + 1; + continue; + } + } } - deleteMarked(tableElm); - } - } + // Insert new cell into new row + newCell = cloneCell(cell) + newCell.colSpan = cell.colSpan; + newRow.appendChild(newCell); - function prevElm(node, name) { - while ((node = node.previousSibling) != null) { - if (node.nodeName == name) - return node; + lastCell = cell; } + } - return null; + if (newRow.hasChildNodes()) { + if (!before) + dom.insertAfter(newRow, rowElm); + else + rowElm.parentNode.insertBefore(newRow, rowElm); } + }; - function nextElm(node, names) { - var namesAr = names.split(','); + function insertCol(before) { + var posX, lastCell; - while ((node = node.nextSibling) != null) { - for (var i=0; i 1) { - do { - var nexttd = nextElm(td, "TD,TH"); + // Get selected column indexes + each(grid, function(row, y) { + each(row, function(cell, x) { + if (isCellSelected(cell) && tinymce.inArray(cols, x) === -1) { + each(grid, function(row) { + var cell = row[x].elm, colSpan; + + colSpan = getSpanVal(cell, 'colspan'); + + if (colSpan > 1) + cell.colSpan = colSpan - 1; + else + dom.remove(cell); + }); - if (td._delete) - td.parentNode.removeChild(td); - } while ((td = nexttd) != null); + cols.push(x); } - } while ((tr = next) != null); - } + }); + }); - function addRows(td_elm, tr_elm, rowspan) { - // Add rows - td_elm.rowSpan = 1; - var trNext = nextElm(tr_elm, "TR"); - for (var i=1; i 1) { + cell.rowSpan = rowSpan - 1; + pos = getPos(cell); + fillLeftDown(pos.x, pos.y, 1, 1); } + }); + + // Delete cells + pos = getPos(tr.cells[0]); + each(grid[pos.y], function(cell) { + var rowSpan; + + cell = cell.elm; - if (newTD == null) { - newTD = doc.createElement("td"); + if (cell != lastCell) { + rowSpan = getSpanVal(cell, 'rowspan'); - if (!tinymce.isIE) - newTD.innerHTML = '
'; + if (rowSpan <= 1) + dom.remove(cell); + else + cell.rowSpan = rowSpan - 1; + + lastCell = cell; } + }); + }; - // Reset col/row span - newTD.colSpan = 1; - newTD.rowSpan = 1; + // Get selected rows and move selection out of scope + rows = getSelectedRows(); - newTR.appendChild(newTD); + // Delete all selected rows + each(rows.reverse(), function(tr) { + deleteRow(tr); + }); - lastCell = tdElm; - } + cleanup(); + }; - return newTR; - } + function cutRows() { + var rows = getSelectedRows(); - // ---- Commands ----- + dom.remove(rows); + cleanup(); - // Handle commands - switch (command) { - case "mceTableMoveToNextRow": - var nextCell = getNextCell(tableElm, tdElm); + return rows; + }; - if (!nextCell) { - inst.execCommand("mceTableInsertRowAfter", tdElm); - nextCell = getNextCell(tableElm, tdElm); - } + function copyRows() { + var rows = getSelectedRows(); - inst.selection.select(nextCell); - inst.selection.collapse(true); + each(rows, function(row, i) { + rows[i] = cloneNode(row, true); + }); - return true; + return rows; + }; - case "mceTableRowProps": - if (trElm == null) - return true; + function pasteRows(rows, before) { + var selectedRows = getSelectedRows(), + targetRow = selectedRows[before ? 0 : selectedRows.length - 1], + targetCellCount = targetRow.cells.length; - if (user_interface) { - inst.windowManager.open({ - url : url + '/row.htm', - width : 400 + parseInt(inst.getLang('table.rowprops_delta_width', 0)), - height : 295 + parseInt(inst.getLang('table.rowprops_delta_height', 0)), - inline : 1 - }, { - plugin_url : url - }); - } + // Calc target cell count + each(grid, function(row) { + var match; - return true; + targetCellCount = 0; + each(row, function(cell, x) { + if (cell.real) + targetCellCount += cell.colspan; - case "mceTableCellProps": - if (tdElm == null) - return true; + if (cell.elm.parentNode == targetRow) + match = 1; + }); - if (user_interface) { - inst.windowManager.open({ - url : url + '/cell.htm', - width : 400 + parseInt(inst.getLang('table.cellprops_delta_width', 0)), - height : 295 + parseInt(inst.getLang('table.cellprops_delta_height', 0)), - inline : 1 - }, { - plugin_url : url - }); - } + if (match) + return false; + }); - return true; + if (!before) + rows.reverse(); - case "mceInsertTable": - if (user_interface) { - inst.windowManager.open({ - url : url + '/table.htm', - width : 400 + parseInt(inst.getLang('table.table_delta_width', 0)), - height : 320 + parseInt(inst.getLang('table.table_delta_height', 0)), - inline : 1 - }, { - plugin_url : url, - action : value ? value.action : 0 - }); - } + each(rows, function(row) { + var cellCount = row.cells.length, cell; - return true; + // Remove col/rowspans + for (i = 0; i < cellCount; i++) { + cell = row.cells[i]; + cell.colSpan = cell.rowSpan = 1; + } - case "mceTableDelete": - var table = inst.dom.getParent(inst.selection.getNode(), "table"); - if (table) { - table.parentNode.removeChild(table); - inst.execCommand('mceRepaint'); - } - return true; - - case "mceTableSplitCells": - case "mceTableMergeCells": - case "mceTableInsertRowBefore": - case "mceTableInsertRowAfter": - case "mceTableDeleteRow": - case "mceTableInsertColBefore": - case "mceTableInsertColAfter": - case "mceTableDeleteCol": - case "mceTableCutRow": - case "mceTableCopyRow": - case "mceTablePasteRowBefore": - case "mceTablePasteRowAfter": - // No table just return (invalid command) - if (!tableElm) - return true; - - // Table has a tbody use that reference - // Changed logic by ApTest 2005.07.12 (www.aptest.com) - // Now lookk at the focused element and take its parentNode. That will be a tbody or a table. - if (trElm && tableElm != trElm.parentNode) - tableElm = trElm.parentNode; - - if (tableElm && trElm) { - switch (command) { - case "mceTableCutRow": - if (!trElm || !tdElm) - return true; - - inst.tableRowClipboard = copyRow(doc, tableElm, trElm); - inst.execCommand("mceTableDeleteRow"); - break; - - case "mceTableCopyRow": - if (!trElm || !tdElm) - return true; - - inst.tableRowClipboard = copyRow(doc, tableElm, trElm); - break; - - case "mceTablePasteRowBefore": - if (!trElm || !tdElm) - return true; - - var newTR = inst.tableRowClipboard.cloneNode(true); - - var prevTR = prevElm(trElm, "TR"); - if (prevTR != null) - trimRow(tableElm, prevTR, prevTR.cells[0], newTR); - - trElm.parentNode.insertBefore(newTR, trElm); - break; - - case "mceTablePasteRowAfter": - if (!trElm || !tdElm) - return true; - - var nextTR = nextElm(trElm, "TR"); - var newTR = inst.tableRowClipboard.cloneNode(true); - - trimRow(tableElm, trElm, tdElm, newTR); - - if (nextTR == null) - trElm.parentNode.appendChild(newTR); - else - nextTR.parentNode.insertBefore(newTR, nextTR); - - break; - - case "mceTableInsertRowBefore": - if (!trElm || !tdElm) - return true; - - var grid = getTableGrid(tableElm); - var cpos = getCellPos(grid, tdElm); - var newTR = doc.createElement("tr"); - var lastTDElm = null; - - cpos.rowindex--; - if (cpos.rowindex < 0) - cpos.rowindex = 0; - - // Create cells - for (var x=0; tdElm = getCell(grid, cpos.rowindex, x); x++) { - if (tdElm != lastTDElm) { - var sd = getColRowSpan(tdElm); - - if (sd['rowspan'] == 1) { - var newTD = doc.createElement("td"); - - if (!tinymce.isIE) - newTD.innerHTML = '
'; - - newTD.colSpan = tdElm.colSpan; - - newTR.appendChild(newTD); - } else - tdElm.rowSpan = sd['rowspan'] + 1; - - lastTDElm = tdElm; - } - } + // Needs more cells + for (i = cellCount; i < targetCellCount; i++) + row.appendChild(cloneCell(row.cells[cellCount - 1])); - trElm.parentNode.insertBefore(newTR, trElm); - select(0, 1); - break; + // Needs less cells + for (i = targetCellCount; i < cellCount; i++) + dom.remove(row.cells[i]); - case "mceTableInsertRowAfter": - if (!trElm || !tdElm) - return true; + // Add before/after + if (before) + targetRow.parentNode.insertBefore(row, targetRow); + else + dom.insertAfter(row, targetRow); + }); + }; - var grid = getTableGrid(tableElm); - var cpos = getCellPos(grid, tdElm); - var newTR = doc.createElement("tr"); - var lastTDElm = null; + function getPos(target) { + var pos; - // Create cells - for (var x=0; tdElm = getCell(grid, cpos.rowindex, x); x++) { - if (tdElm != lastTDElm) { - var sd = getColRowSpan(tdElm); + each(grid, function(row, y) { + each(row, function(cell, x) { + if (cell.elm == target) { + pos = {x : x, y : y}; + return false; + } + }); - if (sd['rowspan'] == 1) { - var newTD = doc.createElement("td"); + return !pos; + }); - if (!tinymce.isIE) - newTD.innerHTML = '
'; + return pos; + }; - newTD.colSpan = tdElm.colSpan; + function setStartCell(cell) { + startPos = getPos(cell); + }; - newTR.appendChild(newTD); - } else - tdElm.rowSpan = sd['rowspan'] + 1; + function findEndPos() { + var pos, maxX, maxY; - lastTDElm = tdElm; - } - } + maxX = maxY = 0; - if (newTR.hasChildNodes()) { - var nextTR = nextElm(trElm, "TR"); - if (nextTR) - nextTR.parentNode.insertBefore(newTR, nextTR); - else - tableElm.appendChild(newTR); - } + each(grid, function(row, y) { + each(row, function(cell, x) { + var colSpan, rowSpan; - select(0, 1); - break; + if (isCellSelected(cell)) { + cell = grid[y][x]; - case "mceTableDeleteRow": - if (!trElm || !tdElm) - return true; + if (x > maxX) + maxX = x; - var grid = getTableGrid(tableElm); - var cpos = getCellPos(grid, tdElm); + if (y > maxY) + maxY = y; - // Only one row, remove whole table - if (grid.length == 1 && tableElm.nodeName == 'TBODY') { - inst.dom.remove(inst.dom.getParent(tableElm, "table")); - return true; - } + if (cell.real) { + colSpan = cell.colspan - 1; + rowSpan = cell.rowspan - 1; - // Move down row spanned cells - var cells = trElm.cells; - var nextTR = nextElm(trElm, "TR"); - for (var x=0; x 1) { - var newTD = cells[x].cloneNode(true); - var sd = getColRowSpan(cells[x]); + if (colSpan) { + if (x + colSpan > maxX) + maxX = x + colSpan; + } - newTD.rowSpan = sd.rowspan - 1; + if (rowSpan) { + if (y + rowSpan > maxY) + maxY = y + rowSpan; + } + } + } + }); + }); - var nextTD = nextTR.cells[x]; + return {x : maxX, y : maxY}; + }; - if (nextTD == null) - nextTR.appendChild(newTD); - else - nextTR.insertBefore(newTD, nextTD); - } - } + function setEndCell(cell) { + var startX, startY, endX, endY, maxX, maxY, colSpan, rowSpan; - // Delete cells - var lastTDElm = null; - for (var x=0; tdElm = getCell(grid, cpos.rowindex, x); x++) { - if (tdElm != lastTDElm) { - var sd = getColRowSpan(tdElm); + endPos = getPos(cell); - if (sd.rowspan > 1) { - tdElm.rowSpan = sd.rowspan - 1; - } else { - trElm = tdElm.parentNode; + if (startPos && endPos) { + // Get start/end positions + startX = Math.min(startPos.x, endPos.x); + startY = Math.min(startPos.y, endPos.y); + endX = Math.max(startPos.x, endPos.x); + endY = Math.max(startPos.y, endPos.y); - if (trElm.parentNode) - trElm._delete = true; - } + // Expand end positon to include spans + maxX = endX; + maxY = endY; - lastTDElm = tdElm; - } - } + // Expand startX + for (y = startY; y <= maxY; y++) { + cell = grid[y][startX]; - deleteMarked(tableElm); + if (!cell.real) { + if (startX - (cell.colspan - 1) < startX) + startX -= cell.colspan - 1; + } + } - select(0, -1); - break; + // Expand startY + for (x = startX; x <= maxX; x++) { + cell = grid[startY][x]; - case "mceTableInsertColBefore": - if (!trElm || !tdElm) - return true; + if (!cell.real) { + if (startY - (cell.rowspan - 1) < startY) + startY -= cell.rowspan - 1; + } + } - var grid = getTableGrid(inst.dom.getParent(tableElm, "table")); - var cpos = getCellPos(grid, tdElm); - var lastTDElm = null; + // Find max X, Y + for (y = startY; y <= endY; y++) { + for (x = startX; x <= endX; x++) { + cell = grid[y][x]; - for (var y=0; tdElm = getCell(grid, y, cpos.cellindex); y++) { - if (tdElm != lastTDElm) { - var sd = getColRowSpan(tdElm); + if (cell.real) { + colSpan = cell.colspan - 1; + rowSpan = cell.rowspan - 1; - if (sd['colspan'] == 1) { - var newTD = doc.createElement(tdElm.nodeName); + if (colSpan) { + if (x + colSpan > maxX) + maxX = x + colSpan; + } - if (!tinymce.isIE) - newTD.innerHTML = '
'; + if (rowSpan) { + if (y + rowSpan > maxY) + maxY = y + rowSpan; + } + } + } + } - newTD.rowSpan = tdElm.rowSpan; + // Remove current selection + dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected'); - tdElm.parentNode.insertBefore(newTD, tdElm); - } else - tdElm.colSpan++; + // Add new selection + for (y = startY; y <= maxY; y++) { + for (x = startX; x <= maxX; x++) + dom.addClass(grid[y][x].elm, 'mceSelected'); + } + } + }; + + // Expose to public + tinymce.extend(this, { + deleteTable : deleteTable, + split : split, + merge : merge, + insertRow : insertRow, + insertCol : insertCol, + deleteCols : deleteCols, + deleteRows : deleteRows, + cutRows : cutRows, + copyRows : copyRows, + pasteRows : pasteRows, + getPos : getPos, + setStartCell : setStartCell, + setEndCell : setEndCell + }); + }; - lastTDElm = tdElm; - } - } + tinymce.create('tinymce.plugins.TablePlugin', { + init : function(ed, url) { + var winMan, clipboardRows; - select(); - break; + function createTableGrid(node) { + var selection = ed.selection, tblElm = ed.dom.getParent(node || selection.getNode(), 'table'); - case "mceTableInsertColAfter": - if (!trElm || !tdElm) - return true; + if (tblElm) + return new TableGrid(tblElm, ed.dom, selection); + }; - var grid = getTableGrid(inst.dom.getParent(tableElm, "table")); - var cpos = getCellPos(grid, tdElm); - var lastTDElm = null; + function cleanup() { + // Restore selection possibilities + ed.getBody().style.webkitUserSelect = ''; + ed.dom.removeClass(ed.dom.select('td.mceSelected,th.mceSelected'), 'mceSelected'); + }; - for (var y=0; tdElm = getCell(grid, y, cpos.cellindex); y++) { - if (tdElm != lastTDElm) { - var sd = getColRowSpan(tdElm); + // Register buttons + each([ + ['table', 'table.desc', 'mceInsertTable', true], + ['delete_table', 'table.del', 'mceTableDelete'], + ['delete_col', 'table.delete_col_desc', 'mceTableDeleteCol'], + ['delete_row', 'table.delete_row_desc', 'mceTableDeleteRow'], + ['col_after', 'table.col_after_desc', 'mceTableInsertColAfter'], + ['col_before', 'table.col_before_desc', 'mceTableInsertColBefore'], + ['row_after', 'table.row_after_desc', 'mceTableInsertRowAfter'], + ['row_before', 'table.row_before_desc', 'mceTableInsertRowBefore'], + ['row_props', 'table.row_desc', 'mceTableRowProps', true], + ['cell_props', 'table.cell_desc', 'mceTableCellProps', true], + ['split_cells', 'table.split_cells_desc', 'mceTableSplitCells', true], + ['merge_cells', 'table.merge_cells_desc', 'mceTableMergeCells', true] + ], function(c) { + ed.addButton(c[0], {title : c[1], cmd : c[2], ui : c[3]}); + }); - if (sd['colspan'] == 1) { - var newTD = doc.createElement(tdElm.nodeName); + // Select whole table is a table border is clicked + if (!tinymce.isIE) { + ed.onClick.add(function(ed, e) { + e = e.target; - if (!tinymce.isIE) - newTD.innerHTML = '
'; + if (e.nodeName === 'TABLE') + ed.selection.select(e); + }); + } - newTD.rowSpan = tdElm.rowSpan; + // Handle node change updates + ed.onNodeChange.add(function(ed, cm, n) { + var p; - var nextTD = nextElm(tdElm, "TD,TH"); - if (nextTD == null) - tdElm.parentNode.appendChild(newTD); - else - nextTD.parentNode.insertBefore(newTD, nextTD); - } else - tdElm.colSpan++; + n = ed.selection.getStart(); + p = ed.dom.getParent(n, 'td,th,caption'); + cm.setActive('table', n.nodeName === 'TABLE' || !!p); - lastTDElm = tdElm; - } - } + // Disable table tools if we are in caption + if (p && p.nodeName === 'CAPTION') + p = 0; - select(1); - break; + cm.setDisabled('delete_table', !p); + cm.setDisabled('delete_col', !p); + cm.setDisabled('delete_table', !p); + cm.setDisabled('delete_row', !p); + cm.setDisabled('col_after', !p); + cm.setDisabled('col_before', !p); + cm.setDisabled('row_after', !p); + cm.setDisabled('row_before', !p); + cm.setDisabled('row_props', !p); + cm.setDisabled('cell_props', !p); + cm.setDisabled('split_cells', !p); + cm.setDisabled('merge_cells', !p); + }); - case "mceTableDeleteCol": - if (!trElm || !tdElm) - return true; + ed.onInit.add(function(ed) { + var startTable, startCell, dom = ed.dom, tableGrid; - var grid = getTableGrid(tableElm); - var cpos = getCellPos(grid, tdElm); - var lastTDElm = null; + winMan = ed.windowManager; - // Only one col, remove whole table - if ((grid.length > 1 && grid[0].length <= 1) && tableElm.nodeName == 'TBODY') { - inst.dom.remove(inst.dom.getParent(tableElm, "table")); - return true; - } + // Add cell selection logic + ed.onMouseDown.add(function(ed, e) { + if (e.button != 2) { + cleanup(); - // Delete cells - for (var y=0; tdElm = getCell(grid, y, cpos.cellindex); y++) { - if (tdElm != lastTDElm) { - var sd = getColRowSpan(tdElm); + startCell = dom.getParent(e.target, 'td,th'); + startTable = dom.getParent(startCell, 'table'); + } + }); - if (sd['colspan'] > 1) - tdElm.colSpan = sd['colspan'] - 1; - else { - if (tdElm.parentNode) - tdElm.parentNode.removeChild(tdElm); - } + dom.bind(ed.getDoc(), 'mouseover', function(e) { + var sel, table, target = e.target; - lastTDElm = tdElm; - } - } + if (startCell && (tableGrid || target != startCell) && (target.nodeName == 'TD' || target.nodeName == 'TH')) { + table = dom.getParent(target, 'table'); + if (table == startTable) { + if (!tableGrid) { + tableGrid = createTableGrid(table); + tableGrid.setStartCell(startCell); - select(-1); - break; + ed.getBody().style.webkitUserSelect = 'none'; + } - case "mceTableSplitCells": - if (!trElm || !tdElm) - return true; + tableGrid.setEndCell(target); + } - var spandata = getColRowSpan(tdElm); + // Remove current selection + sel = ed.selection.getSel(); - var colspan = spandata["colspan"]; - var rowspan = spandata["rowspan"]; + if (sel.removeAllRanges) + sel.removeAllRanges(); + else + sel.empty(); - // Needs splitting - if (colspan > 1 || rowspan > 1) { - // Generate cols - tdElm.colSpan = 1; - for (var i=1; i 1) - addRows(newTD, trElm, rowspan); - } + function setPoint(node, start) { + var walker = new tinymce.dom.TreeWalker(node, node); - addRows(tdElm, trElm, rowspan); - } + do { + // Text node + if (node.nodeType == 3 && tinymce.trim(node.nodeValue).length != 0) { + if (start) + rng.setStart(node, 0); + else + rng.setEnd(node, node.nodeValue.length); - // Apply visual aids - tableElm = inst.dom.getParent(inst.selection.getNode(), "table"); - break; + return; + } - case "mceTableMergeCells": - var rows = []; - var sel = inst.selection.getSel(); - var grid = getTableGrid(tableElm); - - if (tinymce.isIE || sel.rangeCount == 1) { - if (user_interface) { - // Setup template - var sp = getColRowSpan(tdElm); - - inst.windowManager.open({ - url : url + '/merge_cells.htm', - width : 240 + parseInt(inst.getLang('table.merge_cells_delta_width', 0)), - height : 110 + parseInt(inst.getLang('table.merge_cells_delta_height', 0)), - inline : 1 - }, { - action : "update", - numcols : sp.colspan, - numrows : sp.rowspan, - plugin_url : url - }); - - return true; - } else { - var numRows = parseInt(value['numrows']); - var numCols = parseInt(value['numcols']); - var cpos = getCellPos(grid, tdElm); - - if (("" + numRows) == "NaN") - numRows = 1; - - if (("" + numCols) == "NaN") - numCols = 1; - - // Get rows and cells - var tRows = tableElm.rows; - for (var y=cpos.rowindex; y 0) - rows[rows.length] = rowCells; - - var td = getCell(grid, cpos.rowindex, cpos.cellindex); - each(ed.dom.select('br', td), function(e, i) { - if (i > 0 && ed.dom.getAttrib('mce_bogus')) - ed.dom.remove(e); - }); - } + // BR element + if (node.nodeName == 'BR') { + if (start) + rng.setStartBefore(node); + else + rng.setEndBefore(node); - //return true; + return; } - } else { - var cells = []; - var sel = inst.selection.getSel(); - var lastTR = null; - var curRow = null; - var x1 = -1, y1 = -1, x2, y2; - - // Only one cell selected, whats the point? - if (sel.rangeCount < 2) - return true; - - // Get all selected cells - for (var i=0; i 0) { + rng = dom.createRng(); + node = selectedCells[0]; + endNode = selectedCells[selectedCells.length - 1]; + + setPoint(node, 1); + walker = new tinymce.dom.TreeWalker(node, dom.getParent(selectedCells[0], 'table')); + + do { + if (node.nodeName == 'TD' || node.nodeName == 'TH') { + if (!dom.hasClass(node, 'mceSelected')) break; - if (tdElm.nodeName == "TD" || tdElm.nodeName == "TH") - cells[cells.length] = tdElm; + lastNode = node; } + } while (node = walker.next()); - // Get rows and cells - var tRows = tableElm.rows; - for (var y=0; y 0) - rows[rows.length] = rowCells; - } + ed.onKeyUp.add(function(ed, e) { + cleanup(); + }); - // Find selected cells in grid and box - var curRow = []; - var lastTR = null; - for (var y=0; y colSpan) - colSpan = rowColSpan; + // Skip empty text nodes form the end + for (last = ed.getBody().lastChild; last && last.nodeType == 3 && !last.nodeValue.length; last = last.previousSibling) ; - lastRowSpan = -1; - } + if (last && last.nodeName == 'TABLE') + ed.dom.add(ed.getBody(), 'p', null, '
'); + }; - // Validate vertical and get total rowspan - var lastColSpan = -1; - for (var x=0; x rowSpan) - rowSpan = colRowSpan; + ed.onKeyUp.add(fixTableCaretPos); + ed.onSetContent.add(fixTableCaretPos); + ed.onVisualAid.add(fixTableCaretPos); - lastColSpan = -1; - } + ed.onPreProcess.add(function(ed, o) { + var last = o.node.lastChild; - // Setup td - tdElm = rows[0][0]; - tdElm.rowSpan = rowSpan; - tdElm.colSpan = colSpan; + if (last && last.childNodes.length == 1 && last.firstChild.nodeName == 'BR') + ed.dom.remove(last); + }); - // Merge cells - for (var y=0; y 0)) - tdElm.innerHTML += html; + // Register action commands + each({ + mceTableSplitCells : function(grid) { + grid.split(); + }, - // Not current cell - if (rows[y][x] != tdElm && !rows[y][x]._deleted) { - var cpos = getCellPos(grid, rows[y][x]); - var tr = rows[y][x].parentNode; + mceTableMergeCells : function(grid) { + var rowSpan, colSpan, cell; - tr.removeChild(rows[y][x]); - rows[y][x]._deleted = true; + cell = ed.dom.getParent(ed.selection.getNode(), 'th,td'); + if (cell) { + rowSpan = cell.rowSpan; + colSpan = cell.colSpan; + } - // Empty TR, remove it - if (!tr.hasChildNodes()) { - tr.parentNode.removeChild(tr); + if (!ed.dom.select('td.mceSelected,th.mceSelected').length) { + winMan.open({ + url : url + '/merge_cells.htm', + width : 240 + parseInt(ed.getLang('table.merge_cells_delta_width', 0)), + height : 110 + parseInt(ed.getLang('table.merge_cells_delta_height', 0)), + inline : 1 + }, { + rows : rowSpan, + cols : colSpan, + onaction : function(data) { + grid.merge(cell, data.cols, data.rows); + }, + plugin_url : url + }); + } else + grid.merge(); + }, - var lastCell = null; - for (var x=0; cellElm = getCell(grid, cpos.rowindex, x); x++) { - if (cellElm != lastCell && cellElm.rowSpan > 1) - cellElm.rowSpan--; + mceTableInsertRowBefore : function(grid) { + grid.insertRow(true); + }, - lastCell = cellElm; - } + mceTableInsertRowAfter : function(grid) { + grid.insertRow(); + }, - if (tdElm.rowSpan > 1) - tdElm.rowSpan--; - } - } - } - } + mceTableInsertColBefore : function(grid) { + grid.insertCol(true); + }, - // Remove all but one bogus br - each(ed.dom.select('br', tdElm), function(e, i) { - if (i > 0 && ed.dom.getAttrib(e, 'mce_bogus')) - ed.dom.remove(e); - }); + mceTableInsertColAfter : function(grid) { + grid.insertCol(); + }, - break; - } + mceTableDeleteCol : function(grid) { + grid.deleteCols(); + }, - tableElm = inst.dom.getParent(inst.selection.getNode(), "table"); - inst.addVisual(tableElm); - inst.nodeChanged(); - } + mceTableDeleteRow : function(grid) { + grid.deleteRows(); + }, - return true; - } + mceTableCutRow : function(grid) { + clipboardRows = grid.cutRows(); + }, + + mceTableCopyRow : function(grid) { + clipboardRows = grid.copyRows(); + }, + + mceTablePasteRowBefore : function(grid) { + grid.pasteRows(clipboardRows, true); + }, + + mceTablePasteRowAfter : function(grid) { + grid.pasteRows(clipboardRows); + }, - // Pass to next handler in chain - return false; + mceTableDelete : function(grid) { + grid.deleteTable(); + } + }, function(func, name) { + ed.addCommand(name, function() { + var grid = createTableGrid(); + + if (grid) { + func(grid); + ed.execCommand('mceRepaint'); + cleanup(); + } + }); + }); + + // Register dialog commands + each({ + mceInsertTable : function(val) { + winMan.open({ + url : url + '/table.htm', + width : 400 + parseInt(ed.getLang('table.table_delta_width', 0)), + height : 320 + parseInt(ed.getLang('table.table_delta_height', 0)), + inline : 1 + }, { + plugin_url : url, + action : val ? val.action : 0 + }); + }, + + mceTableRowProps : function() { + winMan.open({ + url : url + '/row.htm', + width : 400 + parseInt(ed.getLang('table.rowprops_delta_width', 0)), + height : 295 + parseInt(ed.getLang('table.rowprops_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + }, + + mceTableCellProps : function() { + winMan.open({ + url : url + '/cell.htm', + width : 400 + parseInt(ed.getLang('table.cellprops_delta_width', 0)), + height : 295 + parseInt(ed.getLang('table.cellprops_delta_height', 0)), + inline : 1 + }, { + plugin_url : url + }); + } + }, function(func, name) { + ed.addCommand(name, function(ui, val) { + func(val); + }); + }); } }); // Register plugin tinymce.PluginManager.add('table', tinymce.plugins.TablePlugin); -})(); \ No newline at end of file +})(tinymce); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/table/js/cell.js b/webcit/tiny_mce/plugins/table/js/cell.js index f23b06751..b5fc1fda3 100644 --- a/webcit/tiny_mce/plugins/table/js/cell.js +++ b/webcit/tiny_mce/plugins/table/js/cell.js @@ -11,7 +11,7 @@ function init() { document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor') var inst = ed; - var tdElm = ed.dom.getParent(ed.selection.getNode(), "td,th"); + var tdElm = ed.dom.getParent(ed.selection.getStart(), "td,th"); var formObj = document.forms[0]; var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style")); @@ -24,7 +24,7 @@ function init() { var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor')); var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor')); var className = ed.dom.getAttrib(tdElm, 'class'); - var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");; + var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); var id = ed.dom.getAttrib(tdElm, 'id'); var lang = ed.dom.getAttrib(tdElm, 'lang'); var dir = ed.dom.getAttrib(tdElm, 'dir'); @@ -34,38 +34,55 @@ function init() { addClassesToList('class', 'table_cell_styles'); TinyMCE_EditableSelects.init(); - formObj.bordercolor.value = bordercolor; - formObj.bgcolor.value = bgcolor; - formObj.backgroundimage.value = backgroundimage; - formObj.width.value = width; - formObj.height.value = height; - formObj.id.value = id; - formObj.lang.value = lang; - formObj.style.value = ed.dom.serializeStyle(st); - selectByValue(formObj, 'align', align); - selectByValue(formObj, 'valign', valign); - selectByValue(formObj, 'class', className, true, true); - selectByValue(formObj, 'celltype', celltype); - selectByValue(formObj, 'dir', dir); - selectByValue(formObj, 'scope', scope); - - // Resize some elements - if (isVisible('backgroundimagebrowser')) - document.getElementById('backgroundimage').style.width = '180px'; - - updateColor('bordercolor_pick', 'bordercolor'); - updateColor('bgcolor_pick', 'bgcolor'); + if (!ed.dom.hasClass(tdElm, 'mceSelected')) { + formObj.bordercolor.value = bordercolor; + formObj.bgcolor.value = bgcolor; + formObj.backgroundimage.value = backgroundimage; + formObj.width.value = width; + formObj.height.value = height; + formObj.id.value = id; + formObj.lang.value = lang; + formObj.style.value = ed.dom.serializeStyle(st); + selectByValue(formObj, 'align', align); + selectByValue(formObj, 'valign', valign); + selectByValue(formObj, 'class', className, true, true); + selectByValue(formObj, 'celltype', celltype); + selectByValue(formObj, 'dir', dir); + selectByValue(formObj, 'scope', scope); + + // Resize some elements + if (isVisible('backgroundimagebrowser')) + document.getElementById('backgroundimage').style.width = '180px'; + + updateColor('bordercolor_pick', 'bordercolor'); + updateColor('bgcolor_pick', 'bgcolor'); + } else + tinyMCEPopup.dom.hide('action'); } function updateAction() { var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0]; tinyMCEPopup.restoreSelection(); - el = ed.selection.getNode(); + el = ed.selection.getStart(); tdElm = ed.dom.getParent(el, "td,th"); trElm = ed.dom.getParent(el, "tr"); tableElm = ed.dom.getParent(el, "table"); + // Cell is selected + if (ed.dom.hasClass(tdElm, 'mceSelected')) { + // Update all selected sells + tinymce.each(ed.dom.select('td.mceSelected,th.mceSelected'), function(td) { + updateCell(td); + }); + + ed.addVisual(); + ed.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + tinyMCEPopup.close(); + return; + } + ed.execCommand('mceBeginUndoLevel'); switch (getSelectValue(formObj, 'action')) { diff --git a/webcit/tiny_mce/plugins/table/js/merge_cells.js b/webcit/tiny_mce/plugins/table/js/merge_cells.js index 31d6df0ab..7ee4bf040 100644 --- a/webcit/tiny_mce/plugins/table/js/merge_cells.js +++ b/webcit/tiny_mce/plugins/table/js/merge_cells.js @@ -1,29 +1,27 @@ tinyMCEPopup.requireLangPack(); -function init() { - var f = document.forms[0], v; +var MergeCellsDialog = { + init : function() { + var f = document.forms[0]; - tinyMCEPopup.resizeToInnerSize(); + f.numcols.value = tinyMCEPopup.getWindowArg('cols', 1); + f.numrows.value = tinyMCEPopup.getWindowArg('rows', 1); + }, - f.numcols.value = tinyMCEPopup.getWindowArg('numcols', 1); - f.numrows.value = tinyMCEPopup.getWindowArg('numrows', 1); -} + merge : function() { + var func, f = document.forms[0]; -function mergeCells() { - var args = [], f = document.forms[0]; + tinyMCEPopup.restoreSelection(); - tinyMCEPopup.restoreSelection(); + func = tinyMCEPopup.getWindowArg('onaction'); - if (!AutoValidator.validate(f)) { - tinyMCEPopup.alert(tinyMCEPopup.getLang('invalid_data')); - return false; - } - - args["numcols"] = f.numcols.value; - args["numrows"] = f.numrows.value; + func({ + cols : f.numcols.value, + rows : f.numrows.value + }); - tinyMCEPopup.execCommand("mceTableMergeCells", false, args); - tinyMCEPopup.close(); -} + tinyMCEPopup.close(); + } +}; -tinyMCEPopup.onInit.add(init); +tinyMCEPopup.onInit.add(MergeCellsDialog.init, MergeCellsDialog); diff --git a/webcit/tiny_mce/plugins/table/js/row.js b/webcit/tiny_mce/plugins/table/js/row.js index d25f635f6..70d95b672 100644 --- a/webcit/tiny_mce/plugins/table/js/row.js +++ b/webcit/tiny_mce/plugins/table/js/row.js @@ -8,7 +8,7 @@ function init() { var inst = tinyMCEPopup.editor; var dom = inst.dom; - var trElm = dom.getParent(inst.selection.getNode(), "tr"); + var trElm = dom.getParent(inst.selection.getStart(), "tr"); var formObj = document.forms[0]; var st = dom.parseStyle(dom.getAttrib(trElm, "style")); @@ -19,32 +19,37 @@ function init() { var height = trimSize(getStyle(trElm, 'height', 'height')); var className = dom.getAttrib(trElm, 'class'); var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor')); - var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");; + var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); var id = dom.getAttrib(trElm, 'id'); var lang = dom.getAttrib(trElm, 'lang'); var dir = dom.getAttrib(trElm, 'dir'); - // Setup form - addClassesToList('class', 'table_row_styles'); - TinyMCE_EditableSelects.init(); - - formObj.bgcolor.value = bgcolor; - formObj.backgroundimage.value = backgroundimage; - formObj.height.value = height; - formObj.id.value = id; - formObj.lang.value = lang; - formObj.style.value = dom.serializeStyle(st); - selectByValue(formObj, 'align', align); - selectByValue(formObj, 'valign', valign); - selectByValue(formObj, 'class', className, true, true); selectByValue(formObj, 'rowtype', rowtype); - selectByValue(formObj, 'dir', dir); - - // Resize some elements - if (isVisible('backgroundimagebrowser')) - document.getElementById('backgroundimage').style.width = '180px'; - updateColor('bgcolor_pick', 'bgcolor'); + // Any cells selected + if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) { + // Setup form + addClassesToList('class', 'table_row_styles'); + TinyMCE_EditableSelects.init(); + + formObj.bgcolor.value = bgcolor; + formObj.backgroundimage.value = backgroundimage; + formObj.height.value = height; + formObj.id.value = id; + formObj.lang.value = lang; + formObj.style.value = dom.serializeStyle(st); + selectByValue(formObj, 'align', align); + selectByValue(formObj, 'valign', valign); + selectByValue(formObj, 'class', className, true, true); + selectByValue(formObj, 'dir', dir); + + // Resize some elements + if (isVisible('backgroundimagebrowser')) + document.getElementById('backgroundimage').style.width = '180px'; + + updateColor('bgcolor_pick', 'bgcolor'); + } else + tinyMCEPopup.dom.hide('action'); } function updateAction() { @@ -52,8 +57,28 @@ function updateAction() { var action = getSelectValue(formObj, 'action'); tinyMCEPopup.restoreSelection(); - trElm = dom.getParent(inst.selection.getNode(), "tr"); - tableElm = dom.getParent(inst.selection.getNode(), "table"); + trElm = dom.getParent(inst.selection.getStart(), "tr"); + tableElm = dom.getParent(inst.selection.getStart(), "table"); + + // Update all selected rows + if (dom.select('td.mceSelected,th.mceSelected', trElm).length > 0) { + tinymce.each(tableElm.rows, function(tr) { + var i; + + for (i = 0; i < tr.cells.length; i++) { + if (dom.hasClass(tr.cells[i], 'mceSelected')) { + updateRow(tr, true); + return; + } + } + }); + + inst.addVisual(); + inst.nodeChanged(); + inst.execCommand('mceEndUndoLevel'); + tinyMCEPopup.close(); + return; + } inst.execCommand('mceBeginUndoLevel'); diff --git a/webcit/tiny_mce/plugins/table/js/table.js b/webcit/tiny_mce/plugins/table/js/table.js index a7f3c3ae8..cfcdf545c 100644 --- a/webcit/tiny_mce/plugins/table/js/table.js +++ b/webcit/tiny_mce/plugins/table/js/table.js @@ -24,14 +24,14 @@ function insertTable() { border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0; cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : ""; cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : ""; - align = formObj.elements['align'].options[formObj.elements['align'].selectedIndex].value; - frame = formObj.elements['frame'].options[formObj.elements['frame'].selectedIndex].value; - rules = formObj.elements['rules'].options[formObj.elements['rules'].selectedIndex].value; + align = getSelectValue(formObj, "align"); + frame = getSelectValue(formObj, "tframe"); + rules = getSelectValue(formObj, "rules"); width = formObj.elements['width'].value; height = formObj.elements['height'].value; bordercolor = formObj.elements['bordercolor'].value; bgcolor = formObj.elements['bgcolor'].value; - className = formObj.elements['class'].options[formObj.elements['class'].selectedIndex].value; + className = getSelectValue(formObj, "class"); id = formObj.elements['id'].value; summary = formObj.elements['summary'].value; style = formObj.elements['style'].value; @@ -82,7 +82,7 @@ function insertTable() { capEl = elm.ownerDocument.createElement('caption'); if (!tinymce.isIE) - capEl.innerHTML = '
'; + capEl.innerHTML = '
'; elm.insertBefore(capEl, elm.firstChild); } @@ -151,11 +151,16 @@ function insertTable() { html += makeAttrib('border', border); html += makeAttrib('cellpadding', cellpadding); html += makeAttrib('cellspacing', cellspacing); + html += makeAttrib('_mce_new', '1'); if (width && inst.settings.inline_styles) { if (style) style += '; '; + // Force px + if (/^[0-9\.]+$/.test(width)) + width += 'px'; + style += 'width: ' + width; } else html += makeAttrib('width', width); @@ -182,7 +187,7 @@ function insertTable() { if (caption) { if (!tinymce.isIE) - html += '
'; + html += ''; else html += ''; } @@ -192,7 +197,7 @@ function insertTable() { for (var x=0; x'); + + tinymce.each('h1,h2,h3,h4,h5,h6,p'.split(','), function(n) { + if (patt) + patt += ','; + + patt += n + ' ._mce_marker'; + }); + + tinymce.each(inst.dom.select(patt), function(n) { + inst.dom.split(inst.dom.getParent(n, 'h1,h2,h3,h4,h5,h6,p'), n); + }); + + dom.setOuterHTML(dom.select('br._mce_marker')[0], html); + } else + inst.execCommand('mceInsertContent', false, html); + + tinymce.each(dom.select('table[_mce_new]'), function(node) { + var td = dom.select('td', node); + + try { + // IE9 might fail to do this selection + inst.selection.select(td[0], true); + inst.selection.collapse(); + } catch (ex) { + // Ignore + } + + dom.setAttrib(node, '_mce_new', ''); + }); + inst.addVisual(); inst.execCommand('mceEndUndoLevel'); @@ -243,7 +284,7 @@ function init() { var cols = 2, rows = 2, border = tinyMCEPopup.getParam('table_default_border', '0'), cellpadding = tinyMCEPopup.getParam('table_default_cellpadding', ''), cellspacing = tinyMCEPopup.getParam('table_default_cellspacing', ''); var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = ""; - var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules, frame; + var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules = "", frame = ""; var inst = tinyMCEPopup.editor, dom = inst.dom; var formObj = document.forms[0]; var elm = dom.getParent(inst.selection.getNode(), "table"); @@ -280,7 +321,7 @@ function init() { style = dom.serializeStyle(st); dir = dom.getAttrib(elm, 'dir'); lang = dom.getAttrib(elm, 'lang'); - background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); + background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); formObj.caption.checked = elm.getElementsByTagName('caption').length > 0; orgTableWidth = width; @@ -295,7 +336,7 @@ function init() { // Update form selectByValue(formObj, 'align', align); - selectByValue(formObj, 'frame', frame); + selectByValue(formObj, 'tframe', frame); selectByValue(formObj, 'rules', rules); selectByValue(formObj, 'class', className, true, true); formObj.cols.value = cols; @@ -389,7 +430,7 @@ function changedStyle() { var st = dom.parseStyle(formObj.style.value); if (st['background-image']) - formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); + formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1"); else formObj.backgroundimage.value = ''; diff --git a/webcit/tiny_mce/plugins/table/langs/de_dlg.js b/webcit/tiny_mce/plugins/table/langs/de_dlg.js index 7bbe7fa1a..850ffc906 100644 --- a/webcit/tiny_mce/plugins/table/langs/de_dlg.js +++ b/webcit/tiny_mce/plugins/table/langs/de_dlg.js @@ -3,7 +3,7 @@ general_tab:"Allgemein", advanced_tab:"Erweitert", general_props:"Allgemeine Einstellungen", advanced_props:"Erweiterte Einstellungen", -rowtype:"Row in table part", +rowtype:"Gruppierung", title:"Tabelle einf\u00FCgen/bearbeiten", width:"Breite", height:"H\u00F6he", @@ -47,28 +47,28 @@ row_all:"Alle Zeilen ver\u00E4ndern", thead:"Tabellenkopf", tbody:"Tabelleninhalt", tfoot:"Tabellenfu\u00DF", -scope:"Zusammenhang", +scope:"Bezug", rowgroup:"Vertikal gruppieren", colgroup:"Horizontal gruppieren", col_limit:"Sie haben die maximale Spaltenzahl von {$cols} \u00FCberschritten.", row_limit:"Sie haben die maximale Zeilenzahl von {$rows} \u00FCberschritten.", cell_limit:"Sie haben die maximale Zellenzahl von {$cells} \u00FCberschritten.", -missing_scope:"Sind Sie sicher, dass Sie keinen Zusammenhang f\u00FCr diese \u00DCberschrift angeben wollen? Benutzer mit k\u00F6rperlichen Einschr\u00E4nkungen k\u00F6nnten Schwierigkeiten haben, den Inhalt der Tabelle zu verstehen.", +missing_scope:"Wollen Sie wirklich keine Beziehung f\u00FCr diese \u00DCberschrift angeben? Benutzer mit k\u00F6rperlichen Einschr\u00E4nkungen k\u00F6nnten Schwierigkeiten haben, den Inhalt der Tabelle zu verstehen.", caption:"Beschriftung der Tabelle", -frame:"Gitter", -frame_none:"keins", -frame_groups:"Gruppen", -frame_rows:"Zeilen", -frame_cols:"Spalten", -frame_all:"Alle", -rules:"Rules", -rules_void:"void", -rules_above:"above", -rules_below:"below", -rules_hsides:"hsides", -rules_lhs:"lhs", -rules_rhs:"rhs", -rules_vsides:"vsides", -rules_box:"box", -rules_border:"border" +frame:"Rahmen", +frame_none:"keine", +frame_groups:"zwischen Gruppen", +frame_rows:"zwischen Zeilen", +frame_cols:"zwischen Spalten", +frame_all:"zwischen allen Zellen", +rules:"Gitter", +rules_void:"keins", +rules_above:"nur oben", +rules_below:"nur unten", +rules_hsides:"oben und unten", +rules_lhs:"nur links", +rules_rhs:"nur rechts", +rules_vsides:"links und rechts", +rules_box:"alle 4 Seiten (Box)", +rules_border:"alle 4 Seiten (Border)" }); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/table/langs/et_dlg.js b/webcit/tiny_mce/plugins/table/langs/et_dlg.js new file mode 100644 index 000000000..dae6d97f1 --- /dev/null +++ b/webcit/tiny_mce/plugins/table/langs/et_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('et.table_dlg',{ +general_tab:"\u00DCldine", +advanced_tab:"T\u00E4psustatud", +general_props:"\u00DCldised seaded", +advanced_props:"T\u00E4psustatud seaded", +rowtype:"Rida rea osas", +title:"Sisesta/muuda tabelit", +width:"Laius", +height:"K\u00F5rgus", +cols:"Veerge", +rows:"Ridu", +cellspacing:"Veeru laius", +cellpadding:"Veeru t\u00E4ide", +border:"Raam", +align:"Joondus", +align_default:"Vaikimisi", +align_left:"Vasak", +align_right:"Parem", +align_middle:"Keskel", +row_title:"Tabeli rea seaded", +cell_title:"Tabeli veeru seaded", +cell_type:"Veeru t\u00FC\u00FCp", +valign:"Vertikaalne joondus", +align_top:"\u00DCleval", +align_bottom:"All", +bordercolor:"Raami v\u00E4rv", +bgcolor:"Tausta v\u00E4rv", +merge_cells_title:"\u00DChenda lahtrid", +id:"ID", +style:"Stiil", +langdir:"Keele suund", +langcode:"Keele kood", +mime:"M\u00E4rgista MIME t\u00FC\u00FCp", +ltr:"Vasakult paremale", +rtl:"Paremalt vasakule", +bgimage:"Tausta pilt", +summary:"Kokkuv\u00F5te", +td:"Info", +th:"P\u00E4is", +cell_cell:"Uuenda antud lahtrit", +cell_row:"Uuenda k\u00F5iki lahtreid reas", +cell_all:"Uuenda k\u00F5iki lahtreid tabelis", +row_row:"Uuenda antud rida", +row_odd:"Uuenda paarituid ridu tabelis", +row_even:"Uuenda paaris ridu tabelis", +row_all:"Uuenda k\u00F5iki ridu tabelis", +thead:"Tabeli p\u00E4is", +tbody:"Tabeli sisu", +tfoot:"Tabeli jalus", +scope:"Ulatus", +rowgroup:"Rea grupp", +colgroup:"Veeru grupp", +col_limit:"Oled j\u00F5udnud maksemaalse arvu veegudeni.", +row_limit:"Oled j\u00F5udnud maksimaalse arvu ridadeni", +cell_limit:"Oled j\u00F5udnud maksimaalse arvu elementideni", +missing_scope:"Oled kindel, et soovid j\u00E4tkata t\u00E4psustamata antud tabeli p\u00E4ise nime?", +caption:"Tabeli seletus", +frame:"Raam", +frame_none:"mitte \u00FCkski", +frame_groups:"grupid", +frame_rows:"read", +frame_cols:"veerud", +frame_all:"k\u00F5ik", +rules:"Reeglid", +rules_void:"t\u00FChi", +rules_above:"\u00FCleval", +rules_below:"all", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"kast", +rules_border:"raam" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/table/langs/fr_dlg.js b/webcit/tiny_mce/plugins/table/langs/fr_dlg.js new file mode 100644 index 000000000..a8bda8d43 --- /dev/null +++ b/webcit/tiny_mce/plugins/table/langs/fr_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('fr.table_dlg',{ +general_tab:"G\u00E9n\u00E9ral", +advanced_tab:"Avanc\u00E9", +general_props:"Propri\u00E9t\u00E9s g\u00E9n\u00E9rales", +advanced_props:"Propri\u00E9t\u00E9s avanc\u00E9es", +rowtype:"Type de ligne", +title:"Ins\u00E9rer / modifier un tableau", +width:"Largeur", +height:"Hauteur", +cols:"Colonnes", +rows:"Lignes", +cellspacing:"Espacement entre les cellules", +cellpadding:"Espacement dans les cellules", +border:"Bordure", +align:"Alignement", +align_default:"Par d\u00E9faut", +align_left:"Gauche", +align_right:"Droite", +align_middle:"Centr\u00E9", +row_title:"Propri\u00E9t\u00E9s de la ligne", +cell_title:"Propri\u00E9t\u00E9s de la cellule", +cell_type:"Type de cellule", +valign:"Alignement vertical", +align_top:"Haut", +align_bottom:"Bas", +bordercolor:"Couleur de la bordure", +bgcolor:"Couleur du fond", +merge_cells_title:"Fusionner les cellules", +id:"Id", +style:"Style", +langdir:"Sens de lecture", +langcode:"Code de la langue", +mime:"Type MIME de la cible", +ltr:"De gauche \u00E0 droite", +rtl:"de droite \u00E0 gauche", +bgimage:"Image de fond", +summary:"R\u00E9sum\u00E9", +td:"Donn\u00E9es", +th:"Titre", +cell_cell:"Mettre \u00E0 jour la cellule courante", +cell_row:"Mettre \u00E0 jour toutes les cellules de la ligne", +cell_all:"Mettre \u00E0 jour toutes les cellules du tableau", +row_row:"Mettre \u00E0 jour la ligne courante", +row_odd:"Mettre \u00E0 jour les lignes impaires", +row_even:"Mettre \u00E0 jour les lignes paires", +row_all:"Mettre \u00E0 jour toutes les lignes du tableau", +thead:"En-t\u00EAtes de tableau", +tbody:"Corps de tableau", +tfoot:"Pied de tableau", +scope:"Port\u00E9e", +rowgroup:"Groupe de lignes", +colgroup:"Groupe de colonnes", +col_limit:"Vous avez d\u00E9pass\u00E9 le nombre maximum de colonnes ({$cols}).", +row_limit:"Vous avez d\u00E9pass\u00E9 le nombre maximum de lignes ({$rows}).", +cell_limit:"Vous avez d\u00E9pass\u00E9 le nombre maximum de cellules ({$cells}).", +missing_scope:"\u00CAtes-vous s\u00FBr de vouloir continuer sans sp\u00E9cifier de port\u00E9e pour cette cellule de titre ? Sans port\u00E9e, cela peut \u00EAtre difficile pour certains utilisateurs de comprendre le contenu ou les donn\u00E9es affich\u00E9es dans le tableau.", +caption:"Afficher la l\u00E9gende du tableau", +frame:"Cadre", +frame_none:"aucun", +frame_groups:"groupe", +frame_rows:"lignes", +frame_cols:"colonnes", +frame_all:"tous", +rules:"R\u00E8gles", +rules_void:"aucune", +rules_above:"au-dessus", +rules_below:"au-dessous", +rules_hsides:"horizontales", +rules_lhs:"\u00E0 gauche", +rules_rhs:"\u00E0 droite", +rules_vsides:"verticales", +rules_box:"bo\u00EEte", +rules_border:"bordure" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/table/langs/hu_dlg.js b/webcit/tiny_mce/plugins/table/langs/hu_dlg.js new file mode 100644 index 000000000..6e4dd4ab4 --- /dev/null +++ b/webcit/tiny_mce/plugins/table/langs/hu_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('hu.table_dlg',{ +general_tab:"\u00C1ltal\u00E1nos", +advanced_tab:"Halad\u00F3", +general_props:"\u00C1ltal\u00E1nos tulajdons\u00E1gok", +advanced_props:"Halad\u00F3 tulajdons\u00E1gok", +rowtype:"Sor a t\u00E1bl\u00E1ban", +title:"T\u00E1bl\u00E1zat besz\u00FAr\u00E1sa/szerkeszt\u00E9se", +width:"Sz\u00E9less\u00E9g", +height:"Magass\u00E1g", +cols:"Oszlopok", +rows:"Sorok", +cellspacing:"Cellak\u00F6z", +cellpadding:"Cella bels\u0151k\u00F6z", +border:"Keret", +align:"Igaz\u00EDt\u00E1s", +align_default:"Alap\u00E9rtelmezett", +align_left:"Balra", +align_right:"Jobbra", +align_middle:"K\u00F6z\u00E9pre", +row_title:"Sor tulajdons\u00E1gai", +cell_title:"Cella tulajdons\u00E1gai", +cell_type:"Cellat\u00EDpus", +valign:"F\u00FCgg\u0151leges igaz\u00EDt\u00E1s", +align_top:"Fel", +align_bottom:"Le", +bordercolor:"Keretsz\u00EDn", +bgcolor:"H\u00E1tt\u00E9rsz\u00EDn", +merge_cells_title:"Cell\u00E1k \u00F6sszevon\u00E1sa", +id:"Id", +style:"St\u00EDlus", +langdir:"\u00CDr\u00E1s ir\u00E1ny", +langcode:"Nyelvk\u00F3d", +mime:"C\u00E9l MIME t\u00EDpus", +ltr:"Balr\u00F3l jobbra", +rtl:"Jobbr\u00F3l balra", +bgimage:"H\u00E1tt\u00E9rk\u00E9p", +summary:"\u00D6sszegz\u00E9s", +td:"Adat", +th:"Fejl\u00E9c", +cell_cell:"Cella friss\u00EDt\u00E9se", +cell_row:"Sor \u00F6sszes cell\u00E1j\u00E1nak friss\u00EDt\u00E9se", +cell_all:"T\u00E1bl\u00E1zat \u00F6sszes cell\u00E1j\u00E1nak friss\u00EDt\u00E9se", +row_row:"Sor friss\u00EDt\u00E9se", +row_odd:"P\u00E1ratlan sorok friss\u00EDt\u00E9se", +row_even:"P\u00E1ros sorok friss\u00EDt\u00E9se", +row_all:"Minden sor friss\u00EDt\u00E9se", +thead:"T\u00E1bl\u00E1zat fej", +tbody:"T\u00E1bl\u00E1zat test", +tfoot:"T\u00E1bl\u00E1zat l\u00E1b", +scope:"Hat\u00F3k\u00F6r", +rowgroup:"Sor csoport", +colgroup:"Oszlop csoport", +col_limit:"T\u00FAll\u00E9pte a maxim\u00E1lis oszlopsz\u00E1mot, ami {$cols}.", +row_limit:"T\u00FAll\u00E9pte a maxim\u00E1lis sorsz\u00E1mot, ami {$rows}.", +cell_limit:"T\u00FAll\u00E9pte a maxim\u00E1lis cellasz\u00E1mot, ami {$cells}.", +missing_scope:"Biztosan folytatni akarja an\u00E9lk\u00FCl, hogy hat\u00F3k\u00F6rt adna ennek a fejl\u00E9ccell\u00E1nak? Korl\u00E1toz\u00E1sokkal \u00E9l\u0151k sz\u00E1m\u00E1ra neh\u00E9z lesz meg\u00E9rteni a t\u00E1bl\u00E1zat tartalm\u00E1t.", +caption:"C\u00EDmsor", +frame:"Keret", +frame_none:"nincs", +frame_groups:"csoportok", +frame_rows:"sorok", +frame_cols:"oszlopok", +frame_all:"mind", +rules:"Vonalak", +rules_void:"sehol", +rules_above:"f\u00F6l\u00F6tte", +rules_below:"alatta", +rules_hsides:"v. oldalak", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"f. oldalak", +rules_box:"doboz", +rules_border:"keret" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/table/langs/it_dlg.js b/webcit/tiny_mce/plugins/table/langs/it_dlg.js index 4f6734070..65a9a0632 100644 --- a/webcit/tiny_mce/plugins/table/langs/it_dlg.js +++ b/webcit/tiny_mce/plugins/table/langs/it_dlg.js @@ -62,13 +62,13 @@ frame_rows:"righe", frame_cols:"colonne", frame_all:"tutte", rules:"Regole", -rules_void:"void", -rules_above:"above", -rules_below:"below", -rules_hsides:"hsides", +rules_void:"vuoto", +rules_above:"sopra", +rules_below:"sotto", +rules_hsides:"lato orizz.", rules_lhs:"lhs", rules_rhs:"rhs", -rules_vsides:"vsides", +rules_vsides:"lato vert.", rules_box:"box", -rules_border:"border" +rules_border:"bordo" }); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/table/langs/nl_dlg.js b/webcit/tiny_mce/plugins/table/langs/nl_dlg.js index 9aa03fdae..0f72b17bd 100644 --- a/webcit/tiny_mce/plugins/table/langs/nl_dlg.js +++ b/webcit/tiny_mce/plugins/table/langs/nl_dlg.js @@ -43,7 +43,7 @@ cell_all:"Alle cellen in tabel bijwerken", row_row:"Huidige rij bijwerken", row_odd:"Oneven rijen bijwerken", row_even:"Even rijen bijwerken", -row_all:"Alle rijen bijweken", +row_all:"Alle rijen bijwerken", thead:"Tabelkop", tbody:"Tabellichaam", tfoot:"Tabelvoet", @@ -65,10 +65,10 @@ rules:"Hulplijnen", rules_void:"Geen", rules_above:"Boven", rules_below:"Onder", -rules_hsides:"Horizontale zijdes", +rules_hsides:"Horizontale zijden", rules_lhs:"Linkerzijkant", rules_rhs:"Rechterzijkant", -rules_vsides:"Verticale zijdes", +rules_vsides:"Verticale zijden", rules_box:"Box", rules_border:"Rand" }); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/table/langs/pt_dlg.js b/webcit/tiny_mce/plugins/table/langs/pt_dlg.js index 2f330e7d7..4c1196326 100644 --- a/webcit/tiny_mce/plugins/table/langs/pt_dlg.js +++ b/webcit/tiny_mce/plugins/table/langs/pt_dlg.js @@ -1,60 +1,60 @@ tinyMCE.addI18n('pt.table_dlg',{ general_tab:"Geral", -advanced_tab:"Avan\u00C3\u00A7ado", +advanced_tab:"Avan\u00E7ado", general_props:"Propriedades gerais", -advanced_props:"Propriedades avan\u00C3\u00A7adas", +advanced_props:"Propriedades avan\u00E7adas", rowtype:"Linha na parte da tabela", title:"Inserir/modificar tabela", width:"Largura", height:"Altura", cols:"Colunas", rows:"Linhas", -cellspacing:"Cellspacing", -cellpadding:"Cellpadding", +cellspacing:"Espa\u00E7amento da C\u00E9lula", +cellpadding:"Enchimento da C\u00E9lula", border:"Limites", -align:"Alinhamento", -align_default:"Padr\u00C3\u00A3o", +align:"Alinha.", +align_default:"Padr\u00E3o", align_left:"Esquerda", align_right:"Direita", align_middle:"Centro", row_title:"Propriedades de linhas", -cell_title:"Propriedades de c\u00C3\u00A9lulas", -cell_type:"Tipo de c\u00C3\u00A9lula", -valign:"Alinhamento vertical", +cell_title:"Propriedades de c\u00E9lulas", +cell_type:"Tipo c\u00E9l.", +valign:"Alinha. vert.", align_top:"Topo", align_bottom:"Abaixo", bordercolor:"Cor dos limites", bgcolor:"Cor de fundo", -merge_cells_title:"Unir c\u00C3\u00A9lulas", +merge_cells_title:"Unir c\u00E9lulas", id:"Id", style:"Estilo", -langdir:"Dire\u00C3\u00A7\u00C3\u00A3o do texto", -langcode:"C\u00C3\u00B3digo da linguagem", +langdir:"Dire\u00E7\u00E3o do texto", +langcode:"C\u00F3digo do idioma", mime:"MIME alvo", ltr:"Da esquerda para a direita", rtl:"Da direita para a esquerda", bgimage:"Imagem de fundo", -summary:"Sum\u00C3\u00A1rio", +summary:"Sum\u00E1rio", td:"Dados", th:"Campo", -cell_cell:"Atualizar esta c\u00C3\u00A9lula", -cell_row:"Atualizar todas as c\u00C3\u00A9lulas na linha", -cell_all:"Atualizar todas as c\u00C3\u00A9lulas na tabela", -row_row:"Atcualizar esta linha", -row_odd:"Atualizar linhas \u00C3\u00ADmpares", +cell_cell:"Atualizar esta c\u00E9lula", +cell_row:"Atualizar todas as c\u00E9lulas na linha", +cell_all:"Atualizar todas as c\u00E9lulas na tabela", +row_row:"Atualizar esta linha", +row_odd:"Atualizar linhas \u00EDmpares", row_even:"Atualizar linhas pares", row_all:"Atualizar todas as linhas", thead:"Topo da tabela", tbody:"Corpo da tabela", -tfoot:"Rodap\u00C3\u00A9 da tabela", +tfoot:"Rodap\u00E9 da tabela", scope:"Alcance", rowgroup:"Grupo linhas", colgroup:"Grupo colunas", -col_limit:"Excedeu o n\u00C3\u00BAmero m\u00C3\u00A1ximo de colunas de {$cols}.", -row_limit:"Excedeu o n\u00C3\u00BAmero m\u00C3\u00A1ximo de linhas de {$rows}.", -cell_limit:"Excedeu o n\u00C3\u00BAmero m\u00C3\u00A1ximo de c\u00C3\u00A9lulas de {$cells}.", -missing_scope:"Tem certeza de que quer continuar sem especificar um escopo para esta c\u00C3\u00A9lula? (Isso poder\u00C3\u00A1 causar dificuldades a usu\u00C3\u00A1rios deficientes)", -caption:"T\u00C3\u00ADtulo da tabela", +col_limit:"Excedeu o n\u00FAmero m\u00E1ximo de colunas de {$cols}.", +row_limit:"Excedeu o n\u00FAmero m\u00E1ximo de linhas de {$rows}.", +cell_limit:"Excedeu o n\u00FAmero m\u00E1ximo de c\u00E9lulas de {$cells}.", +missing_scope:"Tem certeza de que quer continuar sem especificar um escopo para esta c\u00E9lula? (Isso poder\u00E1 causar dificuldades a usu\u00E1rios deficientes)", +caption:"T\u00EDtulo da tabela", frame:"Frame", frame_none:"Nenhum", frame_groups:"Grupos", diff --git a/webcit/tiny_mce/plugins/table/langs/ru_dlg.js b/webcit/tiny_mce/plugins/table/langs/ru_dlg.js new file mode 100644 index 000000000..b5b03ee1e --- /dev/null +++ b/webcit/tiny_mce/plugins/table/langs/ru_dlg.js @@ -0,0 +1,74 @@ +tinyMCE.addI18n('ru.table_dlg',{ +general_tab:"\u041E\u0431\u0449\u0435\u0435", +advanced_tab:"\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u043E", +general_props:"\u041E\u0431\u0449\u0438\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B", +advanced_props:"\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B", +rowtype:"\u0422\u0438\u043F \u0441\u0442\u0440\u043E\u043A\u0438", +title:"\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0442\u0430\u0431\u043B\u0438\u0446\u044B", +width:"\u0428\u0438\u0440\u0438\u043D\u0430", +height:"\u0412\u044B\u0441\u043E\u0442\u0430", +cols:"\u0421\u0442\u043E\u043B\u0431\u0446\u044B", +rows:"\u0421\u0442\u0440\u043E\u043A\u0438", +cellspacing:"\u0420\u0430\u0441\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u043C\u0435\u0436\u0434\u0443 \u044F\u0447\u0435\u0439\u043A\u0430\u043C\u0438", +cellpadding:"\u041E\u0442\u0441\u0442\u0443\u043F\u044B \u0432 \u044F\u0447\u0435\u0439\u043A\u0430\u0445", +border:"\u0413\u0440\u0430\u043D\u0438\u0446\u0430", +align:"\u0412\u044B\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u043D\u0438\u0435", +align_default:"\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E", +align_left:"\u041F\u043E \u043B\u0435\u0432\u043E\u043C\u0443 \u043A\u0440\u0430\u044E", +align_right:"\u041F\u043E \u043F\u0440\u0430\u0432\u043E\u043C\u0443 \u043A\u0440\u0430\u044E", +align_middle:"\u041F\u043E \u0446\u0435\u043D\u0442\u0440\u0443", +row_title:"\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0441\u0442\u0440\u043E\u043A\u0438", +cell_title:"\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u044F\u0447\u0435\u0439\u043A\u0438", +cell_type:"\u0422\u0438\u043F", +valign:"\u0412\u0435\u0440\u0442. \u0432\u044B\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u043D\u0438\u0435", +align_top:"\u041F\u043E \u0432\u0435\u0440\u0445\u043D\u0435\u043C\u0443 \u043A\u0440\u0430\u044E", +align_bottom:"\u041F\u043E \u043D\u0438\u0436\u043D\u0435\u043C\u0443 \u043A\u0440\u0430\u044E", +bordercolor:"\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B", +bgcolor:"\u0426\u0432\u0435\u0442 \u0437\u0430\u043B\u0438\u0432\u043A\u0438", +merge_cells_title:"\u041E\u0431\u044A\u0435\u0434\u0438\u043D\u0438\u0442\u044C \u044F\u0447\u0435\u0439\u043A\u0438", +id:"\u0418\u043C\u044F", +style:"\u0421\u0442\u0438\u043B\u044C", +langdir:"\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0442\u0435\u043A\u0441\u0442\u0430", +langcode:"\u041A\u043E\u0434 \u044F\u0437\u044B\u043A\u0430", +mime:"MIME \u0442\u0438\u043F \u0446\u0435\u043B\u0438", +ltr:"\u0421\u043B\u0435\u0432\u0430 \u043D\u0430\u043F\u0440\u0430\u0432\u043E", +rtl:"\u0421\u043F\u0440\u0430\u0432\u0430 \u043D\u0430\u043B\u0435\u0432\u043E", +bgimage:"\u0424\u043E\u043D\u043E\u0432\u043E\u0435 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435", +summary:"\u041E\u0431\u0449\u0435\u0435", +td:"\u0414\u0430\u043D\u043D\u044B\u0435", +th:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A", +cell_cell:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0442\u0435\u043A\u0443\u0449\u0443\u044E \u044F\u0447\u0435\u0439\u043A\u0443", +cell_row:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u0441\u0435 \u044F\u0447\u0435\u0439\u043A\u0438 \u0432 \u0441\u0442\u0440\u043E\u043A\u0435", +cell_all:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u0441\u0435 \u044F\u0447\u0435\u0439\u043A\u0438 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u0435", +row_row:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0442\u0435\u043A\u0443\u0449\u0443\u044E \u0441\u0442\u0440\u043E\u043A\u0443", +row_odd:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u043D\u0435\u0447\u0435\u0442\u043D\u044B\u0435 \u0441\u0442\u0440\u043E\u043A\u0438 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u0435", +row_even:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0447\u0435\u0442\u043D\u044B\u0435 \u0441\u0442\u0440\u043E\u043A\u0438 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u0435", +row_all:"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0432\u0441\u0435 \u0441\u0442\u0440\u043E\u043A\u0438 \u0432 \u0442\u0430\u0431\u043B\u0438\u0446\u0435", +thead:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A", +tbody:"\u0422\u0435\u043B\u043E", +tfoot:"\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u0435", +scope:"\u041E\u0431\u043B\u0430\u0441\u0442\u044C", +rowgroup:"\u0413\u0440\u0443\u043F\u043F\u0430 \u0441\u0442\u0440\u043E\u043A", +colgroup:"\u0413\u0440\u0443\u043F\u043F\u0430 \u0441\u0442\u043E\u043B\u0431\u0446\u043E\u0432", +col_limit:"\u0414\u043E\u0441\u0442\u0438\u0433\u043D\u0443\u0442 \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0432\u0439 \u043F\u0440\u0435\u0434\u0435\u043B, \u0432 $ \u043A\u043E\u043B\u043E\u043D\u043E\u043A.", +row_limit:"\u0414\u043E\u0441\u0442\u0438\u0433\u043D\u0443\u0442 \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0432\u0439 \u043F\u0440\u0435\u0434\u0435\u043B, \u0432 $ \u0441\u0442\u0440\u043E\u043A.", +cell_limit:"\u0414\u043E\u0441\u0442\u0438\u0433\u043D\u0443\u0442 \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0432\u0439 \u043F\u0440\u0435\u0434\u0435\u043B, \u0432 $ \u044F\u0447\u0435\u0435\u043A.", +missing_scope:"\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u0431\u0435\u0437 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u043D\u0438\u044F \u043E\u0431\u043B\u0430\u0441\u0442\u0438 \u0437\u0430\u0433\u043B\u043E\u043B\u0432\u043A\u0430? \u0411\u0435\u0437 \u044D\u0442\u043E\u0433\u043E \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0442\u0440\u0443\u0434\u043D\u0435\u043D\u043E \u0432\u043E\u0441\u043F\u0440\u0438\u044F\u0442\u0438\u0435 \u0442\u0430\u0431\u043B\u0438\u0446\u044B \u043D\u0435\u043A\u043E\u0442\u043E\u0440\u044B\u043C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F\u043C.", +caption:"\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A", +frame:"\u041A\u0430\u0434\u0440", +frame_none:"none", +frame_groups:"groups", +frame_rows:"rows", +frame_cols:"cols", +frame_all:"all", +rules:"\u041F\u0440\u0430\u0432\u0438\u043B\u0430", +rules_void:"void", +rules_above:"above", +rules_below:"below", +rules_hsides:"hsides", +rules_lhs:"lhs", +rules_rhs:"rhs", +rules_vsides:"vsides", +rules_box:"box", +rules_border:"border" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/table/merge_cells.htm b/webcit/tiny_mce/plugins/table/merge_cells.htm index 9d34a886b..9736ed8c0 100644 --- a/webcit/tiny_mce/plugins/table/merge_cells.htm +++ b/webcit/tiny_mce/plugins/table/merge_cells.htm @@ -6,10 +6,9 @@ - - -
+ +
{#table_dlg.merge_cells_title}
@@ -38,25 +37,25 @@ - + - + - + - + @@ -73,7 +72,7 @@
 
 
 
- + - + @@ -260,8 +259,7 @@ - - + @@ -811,13 +809,8 @@
-
- -
- -
- -
+ +
diff --git a/webcit/tiny_mce/plugins/nonbreaking/editor_plugin.js b/webcit/tiny_mce/plugins/nonbreaking/editor_plugin.js index 4fce503c1..eb40a6a39 100644 --- a/webcit/tiny_mce/plugins/nonbreaking/editor_plugin.js +++ b/webcit/tiny_mce/plugins/nonbreaking/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.Nonbreaking',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceNonBreaking',function(){ed.execCommand('mceInsertContent',false,(ed.plugins.visualchars&&ed.plugins.visualchars.state)?'·':' ');});ed.addButton('nonbreaking',{title:'nonbreaking.nonbreaking_desc',cmd:'mceNonBreaking'});if(ed.getParam('nonbreaking_force_tab')){ed.onKeyDown.add(function(ed,e){if(tinymce.isIE&&e.keyCode==9){ed.execCommand('mceNonBreaking');ed.execCommand('mceNonBreaking');ed.execCommand('mceNonBreaking');tinymce.dom.Event.cancel(e);}});}},getInfo:function(){return{longname:'Nonbreaking space',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('nonbreaking',tinymce.plugins.Nonbreaking);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.Nonbreaking",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceNonBreaking",function(){a.execCommand("mceInsertContent",false,(a.plugins.visualchars&&a.plugins.visualchars.state)?' ':" ")});a.addButton("nonbreaking",{title:"nonbreaking.nonbreaking_desc",cmd:"mceNonBreaking"});if(a.getParam("nonbreaking_force_tab")){a.onKeyDown.add(function(d,f){if(tinymce.isIE&&f.keyCode==9){d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");tinymce.dom.Event.cancel(f)}})}},getInfo:function(){return{longname:"Nonbreaking space",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("nonbreaking",tinymce.plugins.Nonbreaking)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/nonbreaking/editor_plugin_src.js b/webcit/tiny_mce/plugins/nonbreaking/editor_plugin_src.js index 216bfd11f..ca83ee26e 100644 --- a/webcit/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/nonbreaking/editor_plugin_src.js @@ -1,5 +1,11 @@ -/* - * Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -11,7 +17,7 @@ // Register commands ed.addCommand('mceNonBreaking', function() { - ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? '·' : ' '); + ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? ' ' : ' '); }); // Register buttons @@ -44,4 +50,4 @@ // Register plugin tinymce.PluginManager.add('nonbreaking', tinymce.plugins.Nonbreaking); -})(); +})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/noneditable/editor_plugin.js b/webcit/tiny_mce/plugins/noneditable/editor_plugin.js index 8a1b8f075..9945cd858 100644 --- a/webcit/tiny_mce/plugins/noneditable/editor_plugin.js +++ b/webcit/tiny_mce/plugins/noneditable/editor_plugin.js @@ -1 +1 @@ -(function(){var Event=tinymce.dom.Event;tinymce.create('tinymce.plugins.NonEditablePlugin',{init:function(ed,url){var t=this,editClass,nonEditClass;t.editor=ed;editClass=ed.getParam("noneditable_editable_class","mceEditable");nonEditClass=ed.getParam("noneditable_noneditable_class","mceNonEditable");ed.onNodeChange.addToTop(function(ed,cm,n){var sc,ec;sc=ed.dom.getParent(ed.selection.getStart(),function(n){return ed.dom.hasClass(n,nonEditClass);});ec=ed.dom.getParent(ed.selection.getEnd(),function(n){return ed.dom.hasClass(n,nonEditClass);});if(sc||ec){t._setDisabled(1);return false;}else t._setDisabled(0);});},getInfo:function(){return{longname:'Non editable elements',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_block:function(ed,e){var k=e.keyCode;if((k>32&&k<41)||(k>111&&k<124))return;return Event.cancel(e);},_setDisabled:function(s){var t=this,ed=t.editor;tinymce.each(ed.controlManager.controls,function(c){c.setDisabled(s);});if(s!==t.disabled){if(s){ed.onKeyDown.addToTop(t._block);ed.onKeyPress.addToTop(t._block);ed.onKeyUp.addToTop(t._block);ed.onPaste.addToTop(t._block);}else{ed.onKeyDown.remove(t._block);ed.onKeyPress.remove(t._block);ed.onKeyUp.remove(t._block);ed.onPaste.remove(t._block);}t.disabled=s;}}});tinymce.PluginManager.add('noneditable',tinymce.plugins.NonEditablePlugin);})(); \ No newline at end of file +(function(){var a=tinymce.dom.Event;tinymce.create("tinymce.plugins.NonEditablePlugin",{init:function(d,e){var f=this,c,b;f.editor=d;c=d.getParam("noneditable_editable_class","mceEditable");b=d.getParam("noneditable_noneditable_class","mceNonEditable");d.onNodeChange.addToTop(function(h,g,k){var j,i;j=h.dom.getParent(h.selection.getStart(),function(l){return h.dom.hasClass(l,b)});i=h.dom.getParent(h.selection.getEnd(),function(l){return h.dom.hasClass(l,b)});if(j||i){f._setDisabled(1);return false}else{f._setDisabled(0)}})},getInfo:function(){return{longname:"Non editable elements",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_block:function(c,d){var b=d.keyCode;if((b>32&&b<41)||(b>111&&b<124)){return}return a.cancel(d)},_setDisabled:function(d){var c=this,b=c.editor;tinymce.each(b.controlManager.controls,function(e){e.setDisabled(d)});if(d!==c.disabled){if(d){b.onKeyDown.addToTop(c._block);b.onKeyPress.addToTop(c._block);b.onKeyUp.addToTop(c._block);b.onPaste.addToTop(c._block)}else{b.onKeyDown.remove(c._block);b.onKeyPress.remove(c._block);b.onKeyUp.remove(c._block);b.onPaste.remove(c._block)}c.disabled=d}}});tinymce.PluginManager.add("noneditable",tinymce.plugins.NonEditablePlugin)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/noneditable/editor_plugin_src.js b/webcit/tiny_mce/plugins/noneditable/editor_plugin_src.js index 00c8b139a..656c971b8 100644 --- a/webcit/tiny_mce/plugins/noneditable/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/noneditable/editor_plugin_src.js @@ -1,5 +1,11 @@ -/* - * Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -81,4 +87,4 @@ // Register plugin tinymce.PluginManager.add('noneditable', tinymce.plugins.NonEditablePlugin); -})(); +})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/pagebreak/editor_plugin.js b/webcit/tiny_mce/plugins/pagebreak/editor_plugin.js index 177ea95ba..a212f6963 100644 --- a/webcit/tiny_mce/plugins/pagebreak/editor_plugin.js +++ b/webcit/tiny_mce/plugins/pagebreak/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.PageBreakPlugin',{init:function(ed,url){var pb='',cls='mcePageBreak',sep=ed.getParam('pagebreak_separator',''),pbRE;pbRE=new RegExp(sep.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(a){return'\\'+a;}),'g');ed.addCommand('mcePageBreak',function(){ed.execCommand('mceInsertContent',0,pb);});ed.addButton('pagebreak',{title:'pagebreak.desc',cmd:cls});ed.onInit.add(function(){if(ed.settings.content_css!==false)ed.dom.loadCSS(url+"/css/content.css");if(ed.theme.onResolveName){ed.theme.onResolveName.add(function(th,o){if(o.node.nodeName=='IMG'&&ed.dom.hasClass(o.node,cls))o.name='pagebreak';});}});ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName==='IMG'&&ed.dom.hasClass(e,cls))ed.selection.select(e);});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('pagebreak',n.nodeName==='IMG'&&ed.dom.hasClass(n,cls));});ed.onBeforeSetContent.add(function(ed,o){o.content=o.content.replace(pbRE,pb);});ed.onPostProcess.add(function(ed,o){if(o.get)o.content=o.content.replace(/]+>/g,function(im){if(im.indexOf('class="mcePageBreak')!==-1)im=sep;return im;});});},getInfo:function(){return{longname:'PageBreak',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('pagebreak',tinymce.plugins.PageBreakPlugin);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.PageBreakPlugin",{init:function(b,d){var f='',a="mcePageBreak",c=b.getParam("pagebreak_separator",""),e;e=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(g){return"\\"+g}),"g");b.addCommand("mcePageBreak",function(){b.execCommand("mceInsertContent",0,f)});b.addButton("pagebreak",{title:"pagebreak.desc",cmd:a});b.onInit.add(function(){if(b.settings.content_css!==false){b.dom.loadCSS(d+"/css/content.css")}if(b.theme.onResolveName){b.theme.onResolveName.add(function(g,h){if(h.node.nodeName=="IMG"&&b.dom.hasClass(h.node,a)){h.name="pagebreak"}})}});b.onClick.add(function(g,h){h=h.target;if(h.nodeName==="IMG"&&g.dom.hasClass(h,a)){g.selection.select(h)}});b.onNodeChange.add(function(h,g,i){g.setActive("pagebreak",i.nodeName==="IMG"&&h.dom.hasClass(i,a))});b.onBeforeSetContent.add(function(g,h){h.content=h.content.replace(e,f)});b.onPostProcess.add(function(g,h){if(h.get){h.content=h.content.replace(/]+>/g,function(i){if(i.indexOf('class="mcePageBreak')!==-1){i=c}return i})}})},getInfo:function(){return{longname:"PageBreak",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("pagebreak",tinymce.plugins.PageBreakPlugin)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/pagebreak/editor_plugin_src.js b/webcit/tiny_mce/plugins/pagebreak/editor_plugin_src.js index 8f4711558..4e1eb0a7a 100644 --- a/webcit/tiny_mce/plugins/pagebreak/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/pagebreak/editor_plugin_src.js @@ -1,5 +1,11 @@ -/* - * Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -68,4 +74,4 @@ // Register plugin tinymce.PluginManager.add('pagebreak', tinymce.plugins.PageBreakPlugin); -})(); +})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/paste/blank.htm b/webcit/tiny_mce/plugins/paste/blank.htm deleted file mode 100644 index 7ba26bd65..000000000 --- a/webcit/tiny_mce/plugins/paste/blank.htm +++ /dev/null @@ -1,22 +0,0 @@ - - -blank_page - - - - - - - - - diff --git a/webcit/tiny_mce/plugins/paste/css/blank.css b/webcit/tiny_mce/plugins/paste/css/blank.css deleted file mode 100644 index 6b16bac25..000000000 --- a/webcit/tiny_mce/plugins/paste/css/blank.css +++ /dev/null @@ -1,14 +0,0 @@ -html, body {height:98%} -body { -background-color: #FFFFFF; -font-family: Verdana, Arial, Helvetica, sans-serif; -font-size: 10px; -scrollbar-3dlight-color: #F0F0EE; -scrollbar-arrow-color: #676662; -scrollbar-base-color: #F0F0EE; -scrollbar-darkshadow-color: #DDDDDD; -scrollbar-face-color: #E0E0DD; -scrollbar-highlight-color: #F0F0EE; -scrollbar-shadow-color: #F0F0EE; -scrollbar-track-color: #F5F5F5; -} diff --git a/webcit/tiny_mce/plugins/paste/css/pasteword.css b/webcit/tiny_mce/plugins/paste/css/pasteword.css deleted file mode 100644 index b3be6270b..000000000 --- a/webcit/tiny_mce/plugins/paste/css/pasteword.css +++ /dev/null @@ -1,3 +0,0 @@ -.sourceIframe { - border: 1px solid #808080; -} diff --git a/webcit/tiny_mce/plugins/paste/editor_plugin.js b/webcit/tiny_mce/plugins/paste/editor_plugin.js index eeeebd5bb..3785ab2d0 100644 --- a/webcit/tiny_mce/plugins/paste/editor_plugin.js +++ b/webcit/tiny_mce/plugins/paste/editor_plugin.js @@ -1 +1 @@ -(function(){var Event=tinymce.dom.Event;tinymce.create('tinymce.plugins.PastePlugin',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mcePasteText',function(ui,v){if(ui){if((ed.getParam('paste_use_dialog',true))||(!tinymce.isIE)){ed.windowManager.open({file:url+'/pastetext.htm',width:450,height:400,inline:1},{plugin_url:url});}else t._insertText(clipboardData.getData("Text"),true);}else t._insertText(v.html,v.linebreaks);});ed.addCommand('mcePasteWord',function(ui,v){if(ui){if((ed.getParam('paste_use_dialog',true))||(!tinymce.isIE)){ed.windowManager.open({file:url+'/pasteword.htm',width:450,height:400,inline:1},{plugin_url:url});}else t._insertText(t._clipboardHTML());}else t._insertWordContent(v);});ed.addCommand('mceSelectAll',function(){ed.execCommand('selectall');});ed.addButton('pastetext',{title:'paste.paste_text_desc',cmd:'mcePasteText',ui:true});ed.addButton('pasteword',{title:'paste.paste_word_desc',cmd:'mcePasteWord',ui:true});ed.addButton('selectall',{title:'paste.selectall_desc',cmd:'mceSelectAll'});if(ed.getParam("paste_auto_cleanup_on_paste",false)){ed.onPaste.add(function(ed,e){return t._handlePasteEvent(e)});}if(!tinymce.isIE&&ed.getParam("paste_auto_cleanup_on_paste",false)){ed.onKeyDown.add(function(ed,e){if(e.ctrlKey&&e.keyCode==86){window.setTimeout(function(){ed.execCommand("mcePasteText",true);},1);Event.cancel(e);}});}},getInfo:function(){return{longname:'Paste text/word',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_handlePasteEvent:function(e){var html=this._clipboardHTML(),ed=this.editor,sel=ed.selection,r;if(ed&&(r=sel.getRng())&&r.text.length>0)ed.execCommand('delete');if(html&&html.length>0)ed.execCommand('mcePasteWord',false,html);return Event.cancel(e);},_insertText:function(content,bLinebreaks){content=this.editor.dom.encode(content);if(content&&content.length>0){if(!this.editor.selection.isCollapsed())this.editor.execCommand("Delete");if(bLinebreaks){if(this.editor.getParam("paste_create_paragraphs",true)){var rl=this.editor.getParam("paste_replace_list",'\u2122,TM,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');for(var i=0;i

');content=content.replace(/\r\r/g,'

');content=content.replace(/\n\n/g,'

');if((pos=content.indexOf('

'))!=-1){this.editor.execCommand("Delete");var node=this.editor.selection.getNode();var breakElms=[];do{if(node.nodeType==1){if(node.nodeName=="TD"||node.nodeName=="BODY")break;breakElms[breakElms.length]=node;}}while(node=node.parentNode);var before="",after="

";before+=content.substring(0,pos);for(var i=0;i";after+="<"+breakElms[(breakElms.length-1)-i].nodeName+">";}before+="

";content=before+content.substring(pos+7)+after;}}if(this.editor.getParam("paste_create_linebreaks",true)){content=content.replace(/\r\n/g,'
');content=content.replace(/\r/g,'
');content=content.replace(/\n/g,'
');}}this.editor.execCommand("mceInsertRawHTML",false,content);}},_insertWordContent:function(content){var t=this,ed=t.editor;if(content&&content.length>0){var bull=String.fromCharCode(8226);var middot=String.fromCharCode(183);if(ed.getParam('paste_insert_word_content_callback'))content=ed.execCallback('paste_insert_word_content_callback','before',content);var rl=ed.getParam("paste_replace_list",'\u2122,TM,\u2026,...,\x93|\x94|\u201c|\u201d,",\x60|\x91|\x92|\u2018|\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');for(var i=0;i(.*?)<\/p>','gi'),'

$1

');}content=content.replace(new RegExp('tab-stops: list [0-9]+.0pt">','gi'),'">'+"--list--");content=content.replace(new RegExp(bull+"(.*?)
","gi"),"

"+middot+"$1

");content=content.replace(new RegExp('','gi'),""+bull);content=content.replace(/<\/o:p>/gi,"");content=content.replace(new RegExp('
]+>/g,"");if(this.editor.getParam("paste_remove_spans",true))content=content.replace(/<\/?span[^>]*>/gi,"");if(this.editor.getParam("paste_remove_styles",true))content=content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)','gi'),"<$1$3");content=content.replace(/<\/?font[^>]*>/gi,"");switch(this.editor.getParam("paste_strip_class_attributes","all")){case"all":content=content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");break;case"mso":content=content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)','gi'),"<$1$3");break;}content=content.replace(new RegExp('href="?'+this._reEscape(""+document.location)+'','gi'),'href="'+this.editor.documentBaseURI.getURI());content=content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");content=content.replace(/<\\?\?xml[^>]*>/gi,"");content=content.replace(/<\/?\w+:[^>]*>/gi,"");content=content.replace(/-- page break --\s*

 <\/p>/gi,"");content=content.replace(/-- page break --/gi,"");if(!this.editor.getParam('force_p_newlines')){content=content.replace('','','gi');content=content.replace('

','

','gi');}if(!tinymce.isIE&&!this.editor.getParam('force_p_newlines')){content=content.replace(/<\/?p[^>]*>/gi,"");}content=content.replace(/<\/?div[^>]*>/gi,"");if(this.editor.getParam("paste_convert_middot_lists",true)){var div=ed.dom.create("div",null,content);var className=this.editor.getParam("paste_unindented_list_class","unIndentedList");while(this._convertMiddots(div,"--list--"));while(this._convertMiddots(div,middot,className));while(this._convertMiddots(div,bull));content=div.innerHTML;}if(this.editor.getParam("paste_convert_headers_to_strong",false)){content=content.replace(/ <\/h[1-6]>/gi,'

  

');content=content.replace(//gi,'

');content=content.replace(/<\/h[1-6]>/gi,'

');content=content.replace(/ <\/b>/gi,'  ');content=content.replace(/^( )*/gi,'');}content=content.replace(/--list--/gi,"");if(ed.getParam('paste_insert_word_content_callback'))content=ed.execCallback('paste_insert_word_content_callback','after',content);this.editor.execCommand("mceInsertContent",false,content);if(this.editor.getParam('paste_force_cleanup_wordpaste',true)){var ed=this.editor;window.setTimeout(function(){ed.execCommand("mceCleanup");},1);}}},_reEscape:function(s){var l="?.\\*[](){}+^$:";var o="";for(var i=0;i');if(r!=e.getDoc().body){j=p.getPos(e.selection.getStart(),r).y}else{j=r.scrollTop}p.setStyles(m,{position:"absolute",left:-10000,top:j,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){k=p.doc.body.createTextRange();k.moveToElementText(m);k.execCommand("Paste");p.remove(m);if(m.innerHTML==="\uFEFF"){e.execCommand("mcePasteWord");s.preventDefault();return}i({content:m.innerHTML});return tinymce.dom.Event.cancel(s)}else{function o(n){n.preventDefault()}p.bind(e.getDoc(),"mousedown",o);p.bind(e.getDoc(),"keydown",o);q=e.selection.getRng();m=m.firstChild;k=e.getDoc().createRange();k.setStart(m,0);k.setEnd(m,1);l.setRng(k);window.setTimeout(function(){var t="",n=p.select("div.mcePaste");c(n,function(v){var u=v.firstChild;if(u&&u.nodeName=="DIV"&&u.style.marginTop&&u.style.backgroundColor){p.remove(u,1)}c(p.select("div.mcePaste",v),function(w){p.remove(w,1)});c(p.select("span.Apple-style-span",v),function(w){p.remove(w,1)});c(p.select("br[_mce_bogus]",v),function(w){p.remove(w)});t+=v.innerHTML});c(n,function(u){p.remove(u)});if(q){l.setRng(q)}i({content:t});p.unbind(e.getDoc(),"mousedown",o);p.unbind(e.getDoc(),"keydown",o)},0)}}if(b(e,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){e.onKeyDown.add(function(j,k){if(((tinymce.isMac?k.metaKey:k.ctrlKey)&&k.keyCode==86)||(k.shiftKey&&k.keyCode==45)){h(k)}})}else{e.onPaste.addToTop(function(j,k){return h(k)})}}if(b(e,"paste_block_drop")){e.onInit.add(function(){e.dom.bind(e.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(j){j.preventDefault();j.stopPropagation();return false})})}g._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(i,f){var l=this.editor,k=f.content,q=tinymce.grep,p=tinymce.explode,g=tinymce.trim,m,j;function e(h){c(h,function(o){if(o.constructor==RegExp){k=k.replace(o,"")}else{k=k.replace(o[0],o[1])}})}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(k)||f.wordContent){f.wordContent=true;e([/^\s*( )+/gi,/( |]*>)+\s*$/gi]);if(b(l,"paste_convert_headers_to_strong")){k=k.replace(/

]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"

$1

")}if(b(l,"paste_convert_middot_lists")){e([[//gi,"$&__MCE_ITEM__"],[/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"]])}e([//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"]]);do{m=k.length;k=k.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(m!=k.length);if(b(l,"paste_retain_style_properties").replace(/^none$/i,"").length==0){k=k.replace(/<\/?span[^>]*>/gi,"")}else{e([[/([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(u,h,t){var v=[],o=0,r=p(g(t).replace(/"/gi,"'"),";");c(r,function(s){var w,y,z=p(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":v[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":v[o++]="text-align:"+y;return;case"vert-align":v[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":v[o++]="color:"+y;return;case"mso-background":case"mso-highlight":v[o++]="background:"+y;return;case"mso-default-height":v[o++]="min-height:"+x(y);return;case"mso-default-width":v[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":v[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){v[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){v[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}v[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+v.join(";")+'"'}else{return h}}]])}}if(b(l,"paste_convert_headers_to_strong")){e([[/]*>/gi,"

"],[/<\/h[1-6][^>]*>/gi,"

"]])}j=b(l,"paste_strip_class_attributes");if(j!=="none"){function n(r,o){if(j==="all"){return""}var h=q(p(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(s){return(/^(?!mso)/i.test(s))});return h.length?' class="'+h.join(" ")+'"':""}k=k.replace(/ class="([^"]+)"/gi,n);k=k.replace(/ class=(\w+)/gi,n)}if(b(l,"paste_remove_spans")){k=k.replace(/<\/?span[^>]*>/gi,"")}f.content=k},_postProcess:function(h,j){var g=this,f=g.editor,i=f.dom,e;if(j.wordContent){c(i.select("a",j.node),function(k){if(!k.href||k.href.indexOf("#_Toc")!=-1){i.remove(k,1)}});if(b(f,"paste_convert_middot_lists")){g._convertLists(h,j)}e=b(f,"paste_retain_style_properties");if((tinymce.is(e,"string"))&&(e!=="all")&&(e!=="*")){e=tinymce.explode(e.replace(/^none$/i,""));c(i.select("*",j.node),function(n){var o={},l=0,m,p,k;if(e){for(m=0;m0){i.setStyles(n,o)}else{if(n.nodeName=="SPAN"&&!n.className){i.remove(n,true)}}})}}if(b(f,"paste_remove_styles")||(b(f,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(i.select("*[style]",j.node),function(k){k.removeAttribute("style");k.removeAttribute("_mce_style")})}else{if(tinymce.isWebKit){c(i.select("*",j.node),function(k){k.removeAttribute("_mce_style")})}}},_convertLists:function(h,f){var j=h.editor.dom,i,m,e=-1,g,n=[],l,k;c(j.select("p",f.node),function(u){var r,v="",t,s,o,q;for(r=u.firstChild;r&&r.nodeType==3;r=r.nextSibling){v+=r.nodeValue}v=u.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o]\s*\u00a0*/.test(v)){t="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0{2,}/.test(v)){t="ol"}if(t){g=parseFloat(u.style.marginLeft||0);if(g>e){n.push(g)}if(!i||t!=l){i=j.create(t);j.insertAfter(i,u)}else{if(g>e){i=m.appendChild(j.create(t))}else{if(g]*>/gi,"");if(t=="ul"&&/^[\u2022\u00b7\u00a7\u00d8o]/.test(p)){j.remove(w)}else{if(/^[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){j.remove(w)}}});s=u.innerHTML;if(t=="ul"){s=u.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o]\s*( |\u00a0)+\s*/,"")}else{s=u.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}m=i.appendChild(j.create("li",0,s));j.remove(u);e=g;l=t}else{i=e=0}});k=f.node.innerHTML;if(k.indexOf("__MCE_ITEM__")!=-1){f.node.innerHTML=k.replace(/__MCE_ITEM__/g,"")}},_insertBlockContent:function(l,h,m){var f,j,g=l.selection,q,n,e,o,i,k="mce_marker";function p(t){var s;if(tinymce.isIE){s=l.getDoc().body.createTextRange();s.moveToElementText(t);s.collapse(false);s.select()}else{g.select(t,1);g.collapse(false)}}this._insert('',1);j=h.get(k);f=h.getParent(j,"p,h1,h2,h3,h4,h5,h6,ul,ol,th,td");if(f&&!/TD|TH/.test(f.nodeName)){j=h.split(f,j);c(h.create("div",0,m).childNodes,function(r){q=j.parentNode.insertBefore(r.cloneNode(true),j)});p(q)}else{h.setOuterHTML(j,m);g.select(l.getBody(),1);g.collapse(0)}while(n=h.get(k)){h.remove(n)}n=g.getStart();e=h.getViewPort(l.getWin());o=l.dom.getPos(n).y;i=n.clientHeight;if(oe.y+e.h){l.getDoc().body.scrollTop=o0)){if(!d){d=("34,quot,38,amp,39,apos,60,lt,62,gt,"+j.serializer.settings.entities).split(",")}if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(v)){q([/[\n\r]+/g])}else{q([/\r+/g])}q([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/ /gi," "],[/&(#\d+|[a-z0-9]{1,10});/gi,function(i,h){if(h.charAt(0)==="#"){return String.fromCharCode(h.slice(1))}else{return((i=y(d,h))>0)?String.fromCharCode(d[i-1]):" "}}],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"],[/\n{3,}/g,"\n\n"],/^\s+|\s+$/g]);v=x.encode(v);if(!s.isCollapsed()){z.execCommand("Delete",false,null)}if(m(o,"array")||(m(o,"array"))){q(o)}else{if(m(o,"string")){q(new RegExp(o,"gi"))}}if(g=="none"){q([[/\n+/g," "]])}else{if(g=="br"){q([[/\n/g,"
"]])}else{q([/^\s+|\s+$/g,[/\n\n/g,"

"],[/\n/g,"
"]])}}if((l=v.indexOf("

"))!=-1){k=v.lastIndexOf("

");r=s.getNode();e=[];do{if(r.nodeType==1){if(r.nodeName=="TD"||r.nodeName=="BODY"){break}e[e.length]=r}}while(r=r.parentNode);if(e.length>0){p=v.substring(0,l);f="";for(t=0,u=e.length;t";f+="<"+e[e.length-t-1].nodeName.toLowerCase()+">"}if(l==k){v=p+f+v.substring(l+7)}else{v=p+v.substring(l+4,k+4)+f+v.substring(k+7)}}}j.execCommand("mceInsertRawHTML",false,v+' ');window.setTimeout(function(){var h=x.get("_plain_text_marker"),B,i,A,w;s.select(h,false);z.execCommand("Delete",false,null);h=null;B=s.getStart();i=x.getViewPort(n);A=x.getPos(B).y;w=B.clientHeight;if((Ai.y+i.h)){z.body.scrollTop=A

]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi, "

$1

"); + } - return Event.cancel(e); - }, + if (getParam(ed, "paste_convert_middot_lists")) { + process([ + [//gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker + [/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list and symbol spans to item markers + ]); + } - _insertText : function(content, bLinebreaks) { - content = this.editor.dom.encode(content); + process([ + // Word comments like conditional comments etc + //gi, + + // Remove comments, scripts (e.g., msoShowComment), XML tag, VML content, MS Office namespaced tags, and a few other tags + /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi, + + // Convert into for line-though + [/<(\/?)s>/gi, "<$1strike>"], + + // Replace nsbp entites to char since it's easier to handle + [/ /gi, "\u00a0"] + ]); + + // Remove bad attributes, with or without quotes, ensuring that attribute text is really inside a tag. + // If JavaScript had a RegExp look-behind, we could have integrated this with the last process() array and got rid of the loop. But alas, it does not, so we cannot. + do { + len = h.length; + h = h.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi, "$1"); + } while (len != h.length); + + // Remove all spans if no styles is to be retained + if (getParam(ed, "paste_retain_style_properties").replace(/^none$/i, "").length == 0) { + h = h.replace(/<\/?span[^>]*>/gi, ""); + } else { + // We're keeping styles, so at least clean them up. + // CSS Reference: http://msdn.microsoft.com/en-us/library/aa155477.aspx + + process([ + // Convert ___ to string of alternating breaking/non-breaking spaces of same length + [/([\s\u00a0]*)<\/span>/gi, + function(str, spaces) { + return (spaces.length > 0)? spaces.replace(/./, " ").slice(Math.floor(spaces.length/2)).split("").join("\u00a0") : ""; + } + ], + + // Examine all styles: delete junk, transform some, and keep the rest + [/(<[a-z][^>]*)\sstyle="([^"]*)"/gi, + function(str, tag, style) { + var n = [], + i = 0, + s = explode(trim(style).replace(/"/gi, "'"), ";"); + + // Examine each style definition within the tag's style attribute + each(s, function(v) { + var name, value, + parts = explode(v, ":"); + + function ensureUnits(v) { + return v + ((v !== "0") && (/\d$/.test(v)))? "px" : ""; + } + + if (parts.length == 2) { + name = parts[0].toLowerCase(); + value = parts[1].toLowerCase(); + + // Translate certain MS Office styles into their CSS equivalents + switch (name) { + case "mso-padding-alt": + case "mso-padding-top-alt": + case "mso-padding-right-alt": + case "mso-padding-bottom-alt": + case "mso-padding-left-alt": + case "mso-margin-alt": + case "mso-margin-top-alt": + case "mso-margin-right-alt": + case "mso-margin-bottom-alt": + case "mso-margin-left-alt": + case "mso-table-layout-alt": + case "mso-height": + case "mso-width": + case "mso-vertical-align-alt": + n[i++] = name.replace(/^mso-|-alt$/g, "") + ":" + ensureUnits(value); + return; + + case "horiz-align": + n[i++] = "text-align:" + value; + return; + + case "vert-align": + n[i++] = "vertical-align:" + value; + return; + + case "font-color": + case "mso-foreground": + n[i++] = "color:" + value; + return; + + case "mso-background": + case "mso-highlight": + n[i++] = "background:" + value; + return; + + case "mso-default-height": + n[i++] = "min-height:" + ensureUnits(value); + return; + + case "mso-default-width": + n[i++] = "min-width:" + ensureUnits(value); + return; + + case "mso-padding-between-alt": + n[i++] = "border-collapse:separate;border-spacing:" + ensureUnits(value); + return; + + case "text-line-through": + if ((value == "single") || (value == "double")) { + n[i++] = "text-decoration:line-through"; + } + return; + + case "mso-zero-height": + if (value == "yes") { + n[i++] = "display:none"; + } + return; + } - if (content && content.length > 0) { - // Delete any highlighted text before pasting - if (!this.editor.selection.isCollapsed()) - this.editor.execCommand("Delete"); - - if (bLinebreaks) { - // Special paragraph treatment - if (this.editor.getParam("paste_create_paragraphs", true)) { - var rl = this.editor.getParam("paste_replace_list", '\u2122,TM,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(','); - for (var i=0; i

'); - content = content.replace(/\r\r/g, '

'); - content = content.replace(/\n\n/g, '

'); - - // Has paragraphs - if ((pos = content.indexOf('

')) != -1) { - this.editor.execCommand("Delete"); - - var node = this.editor.selection.getNode(); - - // Get list of elements to break - var breakElms = []; - - do { - if (node.nodeType == 1) { - // Don't break tables and break at body - if (node.nodeName == "TD" || node.nodeName == "BODY") - break; - - breakElms[breakElms.length] = node; - } - } while(node = node.parentNode); - - var before = "", after = "

"; - before += content.substring(0, pos); - - for (var i=0; i"; - after += "<" + breakElms[(breakElms.length-1)-i].nodeName + ">"; - } - - before += "

"; - content = before + content.substring(pos+7) + after; - } - } - - if (this.editor.getParam("paste_create_linebreaks", true)) { - content = content.replace(/\r\n/g, '
'); - content = content.replace(/\r/g, '
'); - content = content.replace(/\n/g, '
'); - } - } + // Eliminate all MS Office style definitions that have no CSS equivalent by examining the first characters in the name + if (/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(name)) { + return; + } + + // If it reached this point, it must be a valid CSS style + n[i++] = name + ":" + parts[1]; // Lower-case name, but keep value case + } + }); - this.editor.execCommand("mceInsertRawHTML", false, content); + // If style attribute contained any valid styles the re-write it; otherwise delete style attribute. + if (i > 0) { + return tag + ' style="' + n.join(';') + '"'; + } else { + return tag; + } + } + ] + ]); + } } - }, - _insertWordContent : function(content) { - var t = this, ed = t.editor; + // Replace headers with + if (getParam(ed, "paste_convert_headers_to_strong")) { + process([ + [/]*>/gi, "

"], + [/<\/h[1-6][^>]*>/gi, "

"] + ]); + } - if (content && content.length > 0) { - // Cleanup Word content - var bull = String.fromCharCode(8226); - var middot = String.fromCharCode(183); + // Class attribute options are: leave all as-is ("none"), remove all ("all"), or remove only those starting with mso ("mso"). + // Note:- paste_strip_class_attributes: "none", verify_css_classes: true is also a good variation. + stripClass = getParam(ed, "paste_strip_class_attributes"); - if (ed.getParam('paste_insert_word_content_callback')) - content = ed.execCallback('paste_insert_word_content_callback', 'before', content); + if (stripClass !== "none") { + function removeClasses(match, g1) { + if (stripClass === "all") + return ''; - var rl = ed.getParam("paste_replace_list", '\u2122,TM,\u2026,...,\x93|\x94|\u201c|\u201d,",\x60|\x91|\x92|\u2018|\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(','); - for (var i=0; i(.*?)<\/p>', 'gi'), '

$1

'); - } + return cls.length ? ' class="' + cls.join(" ") + '"' : ''; + }; - content = content.replace(new RegExp('tab-stops: list [0-9]+.0pt">', 'gi'), '">' + "--list--"); - content = content.replace(new RegExp(bull + "(.*?)
", "gi"), "

" + middot + "$1

"); - content = content.replace(new RegExp('', 'gi'), "" + bull); // Covert to bull list - content = content.replace(/<\/o:p>/gi, ""); - content = content.replace(new RegExp('
]+>/g, ""); // Header elements + h = h.replace(/ class="([^"]+)"/gi, removeClasses); + h = h.replace(/ class=(\w+)/gi, removeClasses); + } - if (this.editor.getParam("paste_remove_spans", true)) - content = content.replace(/<\/?span[^>]*>/gi, ""); + // Remove spans option + if (getParam(ed, "paste_remove_spans")) { + h = h.replace(/<\/?span[^>]*>/gi, ""); + } - if (this.editor.getParam("paste_remove_styles", true)) - content = content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)', 'gi'), "<$1$3"); + //console.log('After preprocess:' + h); - content = content.replace(/<\/?font[^>]*>/gi, ""); + o.content = h; + }, - // Strips class attributes. - switch (this.editor.getParam("paste_strip_class_attributes", "all")) { - case "all": - content = content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3"); - break; + /** + * Various post process items. + */ + _postProcess : function(pl, o) { + var t = this, ed = t.editor, dom = ed.dom, styleProps; + + if (o.wordContent) { + // Remove named anchors or TOC links + each(dom.select('a', o.node), function(a) { + if (!a.href || a.href.indexOf('#_Toc') != -1) + dom.remove(a, 1); + }); - case "mso": - content = content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)', 'gi'), "<$1$3"); - break; + if (getParam(ed, "paste_convert_middot_lists")) { + t._convertLists(pl, o); } - content = content.replace(new RegExp('href="?' + this._reEscape("" + document.location) + '', 'gi'), 'href="' + this.editor.documentBaseURI.getURI()); - content = content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3"); - content = content.replace(/<\\?\?xml[^>]*>/gi, ""); - content = content.replace(/<\/?\w+:[^>]*>/gi, ""); - content = content.replace(/-- page break --\s*

 <\/p>/gi, ""); // Remove pagebreaks - content = content.replace(/-- page break --/gi, ""); // Remove pagebreaks - - // content = content.replace(/\/? */gi, "");   - // content = content.replace(/

 <\/p>/gi, ''); - - if (!this.editor.getParam('force_p_newlines')) { - content = content.replace('', '' ,'gi'); - content = content.replace('

', '

' ,'gi'); - } + // Process styles + styleProps = getParam(ed, "paste_retain_style_properties"); // retained properties - if (!tinymce.isIE && !this.editor.getParam('force_p_newlines')) { - content = content.replace(/<\/?p[^>]*>/gi, ""); - } + // Process only if a string was specified and not equal to "all" or "*" + if ((tinymce.is(styleProps, "string")) && (styleProps !== "all") && (styleProps !== "*")) { + styleProps = tinymce.explode(styleProps.replace(/^none$/i, "")); - content = content.replace(/<\/?div[^>]*>/gi, ""); + // Retains some style properties + each(dom.select('*', o.node), function(el) { + var newStyle = {}, npc = 0, i, sp, sv; - // Convert all middlot lists to UL lists - if (this.editor.getParam("paste_convert_middot_lists", true)) { - var div = ed.dom.create("div", null, content); + // Store a subset of the existing styles + if (styleProps) { + for (i = 0; i < styleProps.length; i++) { + sp = styleProps[i]; + sv = dom.getStyle(el, sp); - // Convert all middot paragraphs to li elements - var className = this.editor.getParam("paste_unindented_list_class", "unIndentedList"); + if (sv) { + newStyle[sp] = sv; + npc++; + } + } + } - while (this._convertMiddots(div, "--list--")) ; // bull - while (this._convertMiddots(div, middot, className)) ; // Middot - while (this._convertMiddots(div, bull)) ; // bull + // Remove all of the existing styles + dom.setAttrib(el, 'style', ''); - content = div.innerHTML; + if (styleProps && npc > 0) + dom.setStyles(el, newStyle); // Add back the stored subset of styles + else // Remove empty span tags that do not have class attributes + if (el.nodeName == 'SPAN' && !el.className) + dom.remove(el, true); + }); } + } - // Replace all headers with strong and fix some other issues - if (this.editor.getParam("paste_convert_headers_to_strong", false)) { - content = content.replace(/ <\/h[1-6]>/gi, '

  

'); - content = content.replace(//gi, '

'); - content = content.replace(/<\/h[1-6]>/gi, '

'); - content = content.replace(/ <\/b>/gi, '  '); - content = content.replace(/^( )*/gi, ''); + // Remove all style information or only specifically on WebKit to avoid the style bug on that browser + if (getParam(ed, "paste_remove_styles") || (getParam(ed, "paste_remove_styles_if_webkit") && tinymce.isWebKit)) { + each(dom.select('*[style]', o.node), function(el) { + el.removeAttribute('style'); + el.removeAttribute('_mce_style'); + }); + } else { + if (tinymce.isWebKit) { + // We need to compress the styles on WebKit since if you paste it will become + // Removing the mce_style that contains the real value will force the Serializer engine to compress the styles + each(dom.select('*', o.node), function(el) { + el.removeAttribute('_mce_style'); + }); } + } + }, - content = content.replace(/--list--/gi, ""); // Remove --list-- + /** + * Converts the most common bullet and number formats in Office into a real semantic UL/LI list. + */ + _convertLists : function(pl, o) { + var dom = pl.editor.dom, listElm, li, lastMargin = -1, margin, levels = [], lastType, html; + + // Convert middot lists into real semantic lists + each(dom.select('p', o.node), function(p) { + var sib, val = '', type, html, idx, parents; + + // Get text node value at beginning of paragraph + for (sib = p.firstChild; sib && sib.nodeType == 3; sib = sib.nextSibling) + val += sib.nodeValue; + + val = p.innerHTML.replace(/<\/?\w+[^>]*>/gi, '').replace(/ /g, '\u00a0'); + + // Detect unordered lists look for bullets + if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o]\s*\u00a0*/.test(val)) + type = 'ul'; + + // Detect ordered lists 1., a. or ixv. + if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0{2,}/.test(val)) + type = 'ol'; + + // Check if node value matches the list pattern: o   + if (type) { + margin = parseFloat(p.style.marginLeft || 0); + + if (margin > lastMargin) + levels.push(margin); + + if (!listElm || type != lastType) { + listElm = dom.create(type); + dom.insertAfter(listElm, p); + } else { + // Nested list element + if (margin > lastMargin) { + listElm = li.appendChild(dom.create(type)); + } else if (margin < lastMargin) { + // Find parent level based on margin value + idx = tinymce.inArray(levels, margin); + parents = dom.getParents(listElm.parentNode, type); + listElm = parents[parents.length - 1 - idx] || listElm; + } + } - if (ed.getParam('paste_insert_word_content_callback')) - content = ed.execCallback('paste_insert_word_content_callback', 'after', content); + // Remove middot or number spans if they exists + each(dom.select('span', p), function(span) { + var html = span.innerHTML.replace(/<\/?\w+[^>]*>/gi, ''); - // Insert cleaned content - this.editor.execCommand("mceInsertContent", false, content); + // Remove span with the middot or the number + if (type == 'ul' && /^[\u2022\u00b7\u00a7\u00d8o]/.test(html)) + dom.remove(span); + else if (/^[\s\S]*\w+\.( |\u00a0)*\s*/.test(html)) + dom.remove(span); + }); - if (this.editor.getParam('paste_force_cleanup_wordpaste', true)) { - var ed = this.editor; + html = p.innerHTML; - window.setTimeout(function() { - ed.execCommand("mceCleanup"); - }, 1); // Do normal cleanup detached from this thread + // Remove middot/list items + if (type == 'ul') + html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o]\s*( |\u00a0)+\s*/, ''); + else + html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.( |\u00a0)+\s*/, ''); + + // Create li and add paragraph data into the new li + li = listElm.appendChild(dom.create('li', 0, html)); + dom.remove(p); + + lastMargin = margin; + lastType = type; + } else + listElm = lastMargin = 0; // End list element + }); + + // Remove any left over makers + html = o.node.innerHTML; + if (html.indexOf('__MCE_ITEM__') != -1) + o.node.innerHTML = html.replace(/__MCE_ITEM__/g, ''); + }, + + /** + * This method will split the current block parent and insert the contents inside the split position. + * This logic can be improved so text nodes at the start/end remain in the start/end block elements + */ + _insertBlockContent : function(ed, dom, content) { + var parentBlock, marker, sel = ed.selection, last, elm, vp, y, elmHeight, markerId = 'mce_marker'; + + function select(n) { + var r; + + if (tinymce.isIE) { + r = ed.getDoc().body.createTextRange(); + r.moveToElementText(n); + r.collapse(false); + r.select(); + } else { + sel.select(n, 1); + sel.collapse(false); } } - }, - _reEscape : function(s) { - var l = "?.\\*[](){}+^$:"; - var o = ""; + // Insert a marker for the caret position + this._insert('', 1); + marker = dom.get(markerId); + parentBlock = dom.getParent(marker, 'p,h1,h2,h3,h4,h5,h6,ul,ol,th,td'); - for (var i=0; i vp.y + vp.h) + ed.getDoc().body.scrollTop = y < vp.y ? y : y - vp.h + 25; }, - _convertMiddots : function(div, search, class_name) { - var ed = this.editor, mdot = String.fromCharCode(183), bull = String.fromCharCode(8226); - var nodes, prevul, i, p, ul, li, np, cp, li; - - nodes = div.getElementsByTagName("p"); - for (i=0; i 0)) { + if (!entities) + entities = ("34,quot,38,amp,39,apos,60,lt,62,gt," + ed.serializer.settings.entities).split(","); + + // If HTML content with line-breaking tags, then remove all cr/lf chars because only tags will break a line + if (/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(h)) { + process([ + /[\n\r]+/g + ]); + } else { + // Otherwise just get rid of carriage returns (only need linefeeds) + process([ + /\r+/g + ]); + } + + process([ + [/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi, "\n\n"], // Block tags get a blank line after them + [/]*>|<\/tr>/gi, "\n"], // Single linebreak for
tags and table rows + [/<\/t[dh]>\s*]*>/gi, "\t"], // Table cells get tabs betweem them + /<[a-z!\/?][^>]*>/gi, // Delete all remaining tags + [/ /gi, " "], // Convert non-break spaces to regular spaces (remember, *plain text*) + [ + // HTML entity + /&(#\d+|[a-z0-9]{1,10});/gi, + + // Replace with actual character + function(e, s) { + if (s.charAt(0) === "#") { + return String.fromCharCode(s.slice(1)); + } + else { + return ((e = inArray(entities, s)) > 0)? String.fromCharCode(entities[e-1]) : " "; } + } + ], + [/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"], // Cool little RegExp deletes whitespace around linebreak chars. + [/\n{3,}/g, "\n\n"], // Max. 2 consecutive linebreaks + /^\s+|\s+$/g // Trim the front & back + ]); - cp = np.nextSibling; - li = ed.dom.create("li"); - li.innerHTML = np.innerHTML.replace(new RegExp('' + mdot + '|' + bull + '|--list--| ', "gi"), ''); - np.parentNode.removeChild(np); - ul.appendChild(li); - np = cp; - } + h = dom.encode(h); - p.parentNode.replaceChild(ul, p); + // Delete any highlighted text before pasting + if (!sel.isCollapsed()) { + d.execCommand("Delete", false, null); + } - return true; + // Perform default or custom replacements + if (is(rl, "array") || (is(rl, "array"))) { + process(rl); + } + else if (is(rl, "string")) { + process(new RegExp(rl, "gi")); } - } - return false; - }, + // Treat paragraphs as specified in the config + if (linebr == "none") { + process([ + [/\n+/g, " "] + ]); + } + else if (linebr == "br") { + process([ + [/\n/g, "
"] + ]); + } + else { + process([ + /^\s+|\s+$/g, + [/\n\n/g, "

"], + [/\n/g, "
"] + ]); + } + + // This next piece of code handles the situation where we're pasting more than one paragraph of plain + // text, and we are pasting the content into the middle of a block node in the editor. The block + // node gets split at the selection point into "Para A" and "Para B" (for the purposes of explaining). + // The first paragraph of the pasted text is appended to "Para A", and the last paragraph of the + // pasted text is prepended to "Para B". Any other paragraphs of pasted text are placed between + // "Para A" and "Para B". This code solves a host of problems with the original plain text plugin and + // now handles styles correctly. (Pasting plain text into a styled paragraph is supposed to make the + // plain text take the same style as the existing paragraph.) + if ((pos = h.indexOf("

")) != -1) { + rpos = h.lastIndexOf("

"); + node = sel.getNode(); + breakElms = []; // Get list of elements to break + + do { + if (node.nodeType == 1) { + // Don't break tables and break at body + if (node.nodeName == "TD" || node.nodeName == "BODY") { + break; + } + + breakElms[breakElms.length] = node; + } + } while (node = node.parentNode); - _clipboardHTML : function() { - var div = document.getElementById('_TinyMCE_clipboardHTML'); + // Are we in the middle of a block node? + if (breakElms.length > 0) { + before = h.substring(0, pos); + after = ""; - if (!div) { - var div = document.createElement('DIV'); - div.id = '_TinyMCE_clipboardHTML'; + for (i=0, len=breakElms.length; i"; + after += "<" + breakElms[breakElms.length-i-1].nodeName.toLowerCase() + ">"; + } - with (div.style) { - visibility = 'hidden'; - overflow = 'hidden'; - position = 'absolute'; - width = 1; - height = 1; + if (pos == rpos) { + h = before + after + h.substring(pos+7); + } + else { + h = before + h.substring(pos+4, rpos+4) + after + h.substring(rpos+7); + } + } } - document.body.appendChild(div); + // Insert content at the caret, plus add a marker for repositioning the caret + ed.execCommand("mceInsertRawHTML", false, h + ' '); + + // Reposition the caret to the marker, which was placed immediately after the inserted content. + // Needs to be done asynchronously (in window.setTimeout) or else it doesn't work in all browsers. + // The second part of the code scrolls the content up if the caret is positioned off-screen. + // This is only necessary for WebKit browsers, but it doesn't hurt to use for all. + window.setTimeout(function() { + var marker = dom.get('_plain_text_marker'), + elm, vp, y, elmHeight; + + sel.select(marker, false); + d.execCommand("Delete", false, null); + marker = null; + + // Get element, position and height + elm = sel.getStart(); + vp = dom.getViewPort(w); + y = dom.getPos(elm).y; + elmHeight = elm.clientHeight; + + // Is element within viewport if not then scroll it into view + if ((y < vp.y) || (y + elmHeight > vp.y + vp.h)) { + d.body.scrollTop = y < vp.y ? y : y - vp.h + 25; + } + }, 0); + } + }, + + /** + * This method will open the old style paste dialogs. Some users might want the old behavior but still use the new cleanup engine. + */ + _legacySupport : function() { + var t = this, ed = t.editor; + + // Register command(s) for backwards compatibility + ed.addCommand("mcePasteWord", function() { + ed.windowManager.open({ + file: t.url + "/pasteword.htm", + width: parseInt(getParam(ed, "paste_dialog_width")), + height: parseInt(getParam(ed, "paste_dialog_height")), + inline: 1 + }); + }); + + if (getParam(ed, "paste_text_use_dialog")) { + ed.addCommand("mcePasteText", function() { + ed.windowManager.open({ + file : t.url + "/pastetext.htm", + width: parseInt(getParam(ed, "paste_dialog_width")), + height: parseInt(getParam(ed, "paste_dialog_height")), + inline : 1 + }); + }); } - div.innerHTML = ''; - var rng = document.body.createTextRange(); - rng.moveToElementText(div); - rng.execCommand('Paste'); - var html = div.innerHTML; - div.innerHTML = ''; - return html; + // Register button for backwards compatibility + ed.addButton("pasteword", {title : "paste.paste_word_desc", cmd : "mcePasteWord"}); } }); // Register plugin - tinymce.PluginManager.add('paste', tinymce.plugins.PastePlugin); + tinymce.PluginManager.add("paste", tinymce.plugins.PastePlugin); })(); diff --git a/webcit/tiny_mce/plugins/paste/js/pastetext.js b/webcit/tiny_mce/plugins/paste/js/pastetext.js index 326bb16a2..c524f9eb0 100644 --- a/webcit/tiny_mce/plugins/paste/js/pastetext.js +++ b/webcit/tiny_mce/plugins/paste/js/pastetext.js @@ -1,42 +1,36 @@ tinyMCEPopup.requireLangPack(); -function saveContent() { - if (document.forms[0].htmlSource.value == '') { +var PasteTextDialog = { + init : function() { + this.resize(); + }, + + insert : function() { + var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines; + + // Convert linebreaks into paragraphs + if (document.getElementById('linebreaks').checked) { + lines = h.split(/\r?\n/); + if (lines.length > 1) { + h = ''; + tinymce.each(lines, function(row) { + h += '

' + row + '

'; + }); + } + } + + tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h}); tinyMCEPopup.close(); - return false; - } - - tinyMCEPopup.execCommand('mcePasteText', false, { - html : document.forms[0].htmlSource.value, - linebreaks : document.forms[0].linebreaks.checked - }); - - tinyMCEPopup.close(); -} + }, -function onLoadInit() { - tinyMCEPopup.resizeToInnerSize(); + resize : function() { + var vp = tinyMCEPopup.dom.getViewPort(window), el; - // Remove Gecko spellchecking - if (tinymce.isGecko) - document.body.spellcheck = tinyMCEPopup.getParam("gecko_spellcheck"); + el = document.getElementById('content'); - resizeInputs(); -} - -var wHeight=0, wWidth=0, owHeight=0, owWidth=0; - -function resizeInputs() { - if (!tinymce.isIE) { - wHeight = self.innerHeight-80; - wWidth = self.innerWidth-17; - } else { - wHeight = document.body.clientHeight-80; - wWidth = document.body.clientWidth-17; + el.style.width = (vp.w - 20) + 'px'; + el.style.height = (vp.h - 90) + 'px'; } +}; - document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px'; - document.forms[0].htmlSource.style.width = Math.abs(wWidth) + 'px'; -} - -tinyMCEPopup.onInit.add(onLoadInit); \ No newline at end of file +tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog); diff --git a/webcit/tiny_mce/plugins/paste/js/pasteword.js b/webcit/tiny_mce/plugins/paste/js/pasteword.js index 6701b99fc..a52731c36 100644 --- a/webcit/tiny_mce/plugins/paste/js/pasteword.js +++ b/webcit/tiny_mce/plugins/paste/js/pasteword.js @@ -1,56 +1,51 @@ tinyMCEPopup.requireLangPack(); -function saveContent() { - var html = document.getElementById("frmData").contentWindow.document.body.innerHTML; - - if (html == ''){ +var PasteWordDialog = { + init : function() { + var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = ''; + + // Create iframe + el.innerHTML = ''; + ifr = document.getElementById('iframe'); + doc = ifr.contentWindow.document; + + // Force absolute CSS urls + css = [ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css")]; + css = css.concat(tinymce.explode(ed.settings.content_css) || []); + tinymce.each(css, function(u) { + cssHTML += ''; + }); + + // Write content into iframe + doc.open(); + doc.write('' + cssHTML + ''); + doc.close(); + + doc.designMode = 'on'; + this.resize(); + + window.setTimeout(function() { + ifr.contentWindow.focus(); + }, 10); + }, + + insert : function() { + var h = document.getElementById('iframe').contentWindow.document.body.innerHTML; + + tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h, wordContent : true}); tinyMCEPopup.close(); - return false; - } - - tinyMCEPopup.execCommand('mcePasteWord', false, html); - tinyMCEPopup.close(); -} - -function onLoadInit() { - tinyMCEPopup.resizeToInnerSize(); - - // Fix for endless reloading in FF - window.setTimeout(createIFrame, 10); -} - -function createIFrame() { - document.getElementById('iframecontainer').innerHTML = ''; -} + }, -var wHeight=0, wWidth=0, owHeight=0, owWidth=0; + resize : function() { + var vp = tinyMCEPopup.dom.getViewPort(window), el; -function initIframe(doc) { - var dir = tinyMCEPopup.editor.settings.directionality; - - doc.body.dir = dir; - - // Remove Gecko spellchecking - if (tinymce.isGecko) - doc.body.spellcheck = tinyMCEPopup.getParam("gecko_spellcheck"); - - resizeInputs(); -} - -function resizeInputs() { - if (!tinymce.isIE) { - wHeight = self.innerHeight - 80; - wWidth = self.innerWidth - 18; - } else { - wHeight = document.body.clientHeight - 80; - wWidth = document.body.clientWidth - 18; - } + el = document.getElementById('iframe'); - var elm = document.getElementById('frmData'); - if (elm) { - elm.style.height = Math.abs(wHeight) + 'px'; - elm.style.width = Math.abs(wWidth) + 'px'; + if (el) { + el.style.width = (vp.w - 20) + 'px'; + el.style.height = (vp.h - 90) + 'px'; + } } -} +}; -tinyMCEPopup.onInit.add(onLoadInit); +tinyMCEPopup.onInit.add(PasteWordDialog.init, PasteWordDialog); diff --git a/webcit/tiny_mce/plugins/paste/langs/et_dlg.js b/webcit/tiny_mce/plugins/paste/langs/et_dlg.js new file mode 100644 index 000000000..6dd40f5b8 --- /dev/null +++ b/webcit/tiny_mce/plugins/paste/langs/et_dlg.js @@ -0,0 +1,5 @@ +tinyMCE.addI18n('et.paste_dlg',{ +text_title:"Vajuta CTRL+V oma klaviatuuril teksti aknasse kleepimiseks.", +text_linebreaks:"J\u00E4ta reavahetused", +word_title:"Vajuta CTRL+V oma klaviatuuril teksti aknasse kleepimiseks." +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/paste/langs/fr_dlg.js b/webcit/tiny_mce/plugins/paste/langs/fr_dlg.js new file mode 100644 index 000000000..c4d43ea1f --- /dev/null +++ b/webcit/tiny_mce/plugins/paste/langs/fr_dlg.js @@ -0,0 +1,5 @@ +tinyMCE.addI18n('fr.paste_dlg',{ +text_title:"Utilisez CTRL+V sur votre clavier pour coller le texte dans la fen\u00EAtre.", +text_linebreaks:"Conserver les retours \u00E0 la ligne", +word_title:"Utilisez CTRL+V sur votre clavier pour coller le texte dans la fen\u00EAtre." +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/paste/langs/hu_dlg.js b/webcit/tiny_mce/plugins/paste/langs/hu_dlg.js new file mode 100644 index 000000000..f7f285291 --- /dev/null +++ b/webcit/tiny_mce/plugins/paste/langs/hu_dlg.js @@ -0,0 +1,5 @@ +tinyMCE.addI18n('hu.paste_dlg',{ +text_title:"Haszn\u00E1lja a Ctrl+V-t a billenty\u0171zet\u00E9n a beilleszt\u00E9shez.", +text_linebreaks:"Sort\u00F6r\u00E9sek megtart\u00E1sa", +word_title:"Haszn\u00E1lja a Ctrl+V-t a billenty\u0171zet\u00E9n a beilleszt\u00E9shez." +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/paste/langs/ru_dlg.js b/webcit/tiny_mce/plugins/paste/langs/ru_dlg.js new file mode 100644 index 000000000..91f4a4013 --- /dev/null +++ b/webcit/tiny_mce/plugins/paste/langs/ru_dlg.js @@ -0,0 +1,5 @@ +tinyMCE.addI18n('ru.paste_dlg',{ +text_title:"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043B\u044F \u0432\u0441\u0442\u0430\u0432\u043A\u0438 \u0442\u0435\u043A\u0441\u0442\u0430 \u0432 \u043E\u043A\u043D\u043E.", +text_linebreaks:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043F\u0435\u0440\u0435\u043D\u043E\u0441\u044B \u0441\u0442\u0440\u043E\u043A", +word_title:"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043B\u044F \u0432\u0441\u0442\u0430\u0432\u043A\u0438 \u0442\u0435\u043A\u0441\u0442\u0430 \u0432 \u043E\u043A\u043D\u043E." +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/paste/pastetext.htm b/webcit/tiny_mce/plugins/paste/pastetext.htm index 2f2b341a1..b65594547 100644 --- a/webcit/tiny_mce/plugins/paste/pastetext.htm +++ b/webcit/tiny_mce/plugins/paste/pastetext.htm @@ -1,34 +1,27 @@ {#paste.paste_text_desc} - - - -
-
{#paste.paste_text_desc}
+ + +
{#paste.paste_text_desc}
-
- -
+
+ +
-
+
-
{#paste_dlg.text_title}
+
{#paste_dlg.text_title}
- + -
-
+
-
- -
-
- + \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/paste/pasteword.htm b/webcit/tiny_mce/plugins/paste/pasteword.htm index 9e5ab1b5b..0f6bb4121 100644 --- a/webcit/tiny_mce/plugins/paste/pasteword.htm +++ b/webcit/tiny_mce/plugins/paste/pasteword.htm @@ -1,14 +1,11 @@ - {#paste.paste_word_desc} - - - -
+ +
{#paste.paste_word_desc}
{#paste_dlg.word_title}
@@ -16,13 +13,8 @@
-
- -
- -
- -
+ +
diff --git a/webcit/tiny_mce/plugins/preview/editor_plugin.js b/webcit/tiny_mce/plugins/preview/editor_plugin.js index deb4bce93..507909c5f 100644 --- a/webcit/tiny_mce/plugins/preview/editor_plugin.js +++ b/webcit/tiny_mce/plugins/preview/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.Preview',{init:function(ed,url){var t=this,css=tinymce.explode(ed.settings.content_css);t.editor=ed;tinymce.each(css,function(u,k){css[k]=ed.documentBaseURI.toAbsolute(u);});ed.addCommand('mcePreview',function(){ed.windowManager.open({file:ed.getParam("plugin_preview_pageurl",url+"/preview.html"),width:parseInt(ed.getParam("plugin_preview_width","550")),height:parseInt(ed.getParam("plugin_preview_height","600")),resizable:"yes",scrollbars:"yes",popup_css:css.join(','),inline:ed.getParam("plugin_preview_inline",1)},{base:ed.documentBaseURI.getURI()});});ed.addButton('preview',{title:'preview.preview_desc',cmd:'mcePreview'});},getInfo:function(){return{longname:'Preview',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('preview',tinymce.plugins.Preview);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.Preview",{init:function(a,b){var d=this,c=tinymce.explode(a.settings.content_css);d.editor=a;tinymce.each(c,function(f,e){c[e]=a.documentBaseURI.toAbsolute(f)});a.addCommand("mcePreview",function(){a.windowManager.open({file:a.getParam("plugin_preview_pageurl",b+"/preview.html"),width:parseInt(a.getParam("plugin_preview_width","550")),height:parseInt(a.getParam("plugin_preview_height","600")),resizable:"yes",scrollbars:"yes",popup_css:c?c.join(","):a.baseURI.toAbsolute("themes/"+a.settings.theme+"/skins/"+a.settings.skin+"/content.css"),inline:a.getParam("plugin_preview_inline",1)},{base:a.documentBaseURI.getURI()})});a.addButton("preview",{title:"preview.preview_desc",cmd:"mcePreview"})},getInfo:function(){return{longname:"Preview",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("preview",tinymce.plugins.Preview)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/preview/editor_plugin_src.js b/webcit/tiny_mce/plugins/preview/editor_plugin_src.js index d3bb164ad..80f00f0d9 100644 --- a/webcit/tiny_mce/plugins/preview/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/preview/editor_plugin_src.js @@ -1,5 +1,11 @@ -/* - * Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -21,7 +27,7 @@ height : parseInt(ed.getParam("plugin_preview_height", "600")), resizable : "yes", scrollbars : "yes", - popup_css : css.join(','), + popup_css : css ? css.join(',') : ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css"), inline : ed.getParam("plugin_preview_inline", 1) }, { base : ed.documentBaseURI.getURI() @@ -44,4 +50,4 @@ // Register plugin tinymce.PluginManager.add('preview', tinymce.plugins.Preview); -})(); +})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/preview/preview.html b/webcit/tiny_mce/plugins/preview/preview.html index 7960f7858..67e7b142f 100644 --- a/webcit/tiny_mce/plugins/preview/preview.html +++ b/webcit/tiny_mce/plugins/preview/preview.html @@ -1,19 +1,17 @@ + - + - {#preview.preview_desc} - + diff --git a/webcit/tiny_mce/plugins/print/editor_plugin.js b/webcit/tiny_mce/plugins/print/editor_plugin.js index 7d09a87c4..b5b3a55ed 100644 --- a/webcit/tiny_mce/plugins/print/editor_plugin.js +++ b/webcit/tiny_mce/plugins/print/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.Print',{init:function(ed,url){ed.addCommand('mcePrint',function(){ed.getWin().print();});ed.addButton('print',{title:'print.print_desc',cmd:'mcePrint'});},getInfo:function(){return{longname:'Print',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('print',tinymce.plugins.Print);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.Print",{init:function(a,b){a.addCommand("mcePrint",function(){a.getWin().print()});a.addButton("print",{title:"print.print_desc",cmd:"mcePrint"})},getInfo:function(){return{longname:"Print",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("print",tinymce.plugins.Print)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/print/editor_plugin_src.js b/webcit/tiny_mce/plugins/print/editor_plugin_src.js index 67d57fc4b..3933fe656 100644 --- a/webcit/tiny_mce/plugins/print/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/print/editor_plugin_src.js @@ -1,5 +1,11 @@ -/* - * Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { diff --git a/webcit/tiny_mce/plugins/safari/blank.htm b/webcit/tiny_mce/plugins/safari/blank.htm deleted file mode 100644 index 266808ce2..000000000 --- a/webcit/tiny_mce/plugins/safari/blank.htm +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/safari/editor_plugin.js b/webcit/tiny_mce/plugins/safari/editor_plugin.js deleted file mode 100644 index 4daac19ff..000000000 --- a/webcit/tiny_mce/plugins/safari/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var Event=tinymce.dom.Event,grep=tinymce.grep,each=tinymce.each,inArray=tinymce.inArray,isOldWebKit=tinymce.isOldWebKit;function isEmpty(d,e,f){var w,n;w=d.createTreeWalker(e,NodeFilter.SHOW_ALL,null,false);while(n=w.nextNode()){if(f){if(!f(n))return false;}if(n.nodeType==3&&n.nodeValue&&/[^\s\u00a0]+/.test(n.nodeValue))return false;if(n.nodeType==1&&/^(HR|IMG|TABLE)$/.test(n.nodeName))return false;}return true;};tinymce.create('tinymce.plugins.Safari',{init:function(ed){var t=this,dom;if(!tinymce.isWebKit)return;t.editor=ed;t.webKitFontSizes=['x-small','small','medium','large','x-large','xx-large','-webkit-xxx-large'];t.namedFontSizes=['xx-small','x-small','small','medium','large','x-large','xx-large'];ed.addCommand('CreateLink',function(u,v){var n=ed.selection.getNode(),dom=ed.dom,a;if(n&&(/^(left|right)$/i.test(dom.getStyle(n,'float',1))||/^(left|right)$/i.test(dom.getAttrib(n,'align')))){a=dom.create('a',{href:v},n.cloneNode());n.parentNode.replaceChild(a,n);ed.selection.select(a);}else ed.getDoc().execCommand("CreateLink",false,v);});ed.onPaste.add(function(ed,e){function removeStyles(e){e=e.target;if(e.nodeType==1){e.style.cssText='';each(ed.dom.select('*',e),function(e){e.style.cssText='';});}};Event.add(ed.getDoc(),'DOMNodeInserted',removeStyles);window.setTimeout(function(){Event.remove(ed.getDoc(),'DOMNodeInserted',removeStyles);},0);});ed.onKeyUp.add(function(ed,e){var h,b,r,n,s;if(e.keyCode==46||e.keyCode==8){b=ed.getBody();h=b.innerHTML;s=ed.selection;if(b.childNodes.length==1&&!/<(img|hr)/.test(h)&&tinymce.trim(h.replace(/<[^>]+>/g,'')).length==0){ed.setContent('


',{format:'raw'});n=b.firstChild;r=s.getRng();r.setStart(n,0);r.setEnd(n,0);s.setRng(r);}}});ed.addCommand('FormatBlock',function(u,v){var dom=ed.dom,e=dom.getParent(ed.selection.getNode(),dom.isBlock);if(e)dom.replace(dom.create(v),e,1);else ed.getDoc().execCommand("FormatBlock",false,v);});ed.addCommand('mceInsertContent',function(u,v){ed.getDoc().execCommand("InsertText",false,'mce_marker');ed.getBody().innerHTML=ed.getBody().innerHTML.replace(/mce_marker/g,ed.dom.processHTML(v)+'XX');ed.selection.select(ed.dom.get('_mce_tmp'));ed.getDoc().execCommand("Delete",false,' ');});ed.onKeyPress.add(function(ed,e){var se,li,lic,r1,r2,n,sel,doc,be,af,pa;if(e.keyCode==13){sel=ed.selection;se=sel.getNode();if(e.shiftKey||ed.settings.force_br_newlines&&se.nodeName!='LI'){t._insertBR(ed);Event.cancel(e);}if(li=dom.getParent(se,'LI')){lic=dom.getParent(li,'OL,UL');doc=ed.getDoc();pa=dom.create('p');dom.add(pa,'br',{mce_bogus:"1"});if(isEmpty(doc,li)){if(n=dom.getParent(lic.parentNode,'LI,OL,UL'))return;n=dom.getParent(lic,'p,h1,h2,h3,h4,h5,h6,div')||lic;r1=doc.createRange();r1.setStartBefore(n);r1.setEndBefore(li);r2=doc.createRange();r2.setStartAfter(li);r2.setEndAfter(n);be=r1.cloneContents();af=r2.cloneContents();if(!isEmpty(doc,af))dom.insertAfter(af,n);dom.insertAfter(pa,n);if(!isEmpty(doc,be))dom.insertAfter(be,n);dom.remove(n);n=pa.firstChild;r1=doc.createRange();r1.setStartBefore(n);r1.setEndBefore(n);sel.setRng(r1);return Event.cancel(e);}}}});ed.onExecCommand.add(function(ed,cmd){var sel,dom,bl,bm;if(cmd=='InsertUnorderedList'||cmd=='InsertOrderedList'){sel=ed.selection;dom=ed.dom;if(bl=dom.getParent(sel.getNode(),function(n){return/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName);})){bm=sel.getBookmark();dom.remove(bl,1);sel.moveToBookmark(bm);}}});ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName=='IMG'){t.selElm=e;ed.selection.select(e);}else t.selElm=null;});ed.onInit.add(function(){t._fixWebKitSpans();if(isOldWebKit)t._patchSafari2x(ed);});ed.onSetContent.add(function(){dom=ed.dom;each(['strong','b','em','u','strike','sub','sup','a'],function(v){each(grep(dom.select(v)).reverse(),function(n){var nn=n.nodeName.toLowerCase(),st;if(nn=='a'){if(n.name)dom.replace(dom.create('img',{mce_name:'a',name:n.name,'class':'mceItemAnchor'}),n);return;}switch(nn){case'b':case'strong':if(nn=='b')nn='strong';st='font-weight: bold;';break;case'em':st='font-style: italic;';break;case'u':st='text-decoration: underline;';break;case'sub':st='vertical-align: sub;';break;case'sup':st='vertical-align: super;';break;case'strike':st='text-decoration: line-through;';break;}dom.replace(dom.create('span',{mce_name:nn,style:st,'class':'Apple-style-span'}),n,1);});});});ed.onPreProcess.add(function(ed,o){dom=ed.dom;each(grep(o.node.getElementsByTagName('span')).reverse(),function(n){var v,bg;if(o.get){if(dom.hasClass(n,'Apple-style-span')){bg=n.style.backgroundColor;switch(dom.getAttrib(n,'mce_name')){case'font':if(!ed.settings.convert_fonts_to_spans)dom.setAttrib(n,'style','');break;case'strong':case'em':case'sub':case'sup':dom.setAttrib(n,'style','');break;case'strike':case'u':if(!ed.settings.inline_styles)dom.setAttrib(n,'style','');else dom.setAttrib(n,'mce_name','');break;default:if(!ed.settings.inline_styles)dom.setAttrib(n,'style','');}if(bg)n.style.backgroundColor=bg;}}if(dom.hasClass(n,'mceItemRemoved'))dom.remove(n,1);});});ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/
<\/(h[1-6]|div|p|address|pre)>/g,'');o.content=o.content.replace(/ id=\"undefined\"/g,'');});},getInfo:function(){return{longname:'Safari compatibility',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/safari',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_fixWebKitSpans:function(){var t=this,ed=t.editor;if(!isOldWebKit){Event.add(ed.getDoc(),'DOMNodeInserted',function(e){e=e.target;if(e&&e.nodeType==1)t._fixAppleSpan(e);});}else{ed.onExecCommand.add(function(){each(ed.dom.select('span'),function(n){t._fixAppleSpan(n);});ed.nodeChanged();});}},_fixAppleSpan:function(e){var ed=this.editor,dom=ed.dom,fz=this.webKitFontSizes,fzn=this.namedFontSizes,s=ed.settings,st,p;if(dom.getAttrib(e,'mce_fixed'))return;if(e.nodeName=='SPAN'&&e.className=='Apple-style-span'){st=e.style;if(!s.convert_fonts_to_spans){if(st.fontSize){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'size',inArray(fz,st.fontSize)+1);}if(st.fontFamily){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'face',st.fontFamily);}if(st.color){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'color',dom.toHex(st.color));}if(st.backgroundColor){dom.setAttrib(e,'mce_name','font');dom.setStyle(e,'background-color',st.backgroundColor);}}else{if(st.fontSize)dom.setStyle(e,'fontSize',fzn[inArray(fz,st.fontSize)]);}if(st.fontWeight=='bold')dom.setAttrib(e,'mce_name','strong');if(st.fontStyle=='italic')dom.setAttrib(e,'mce_name','em');if(st.textDecoration=='underline')dom.setAttrib(e,'mce_name','u');if(st.textDecoration=='line-through')dom.setAttrib(e,'mce_name','strike');if(st.verticalAlign=='super')dom.setAttrib(e,'mce_name','sup');if(st.verticalAlign=='sub')dom.setAttrib(e,'mce_name','sub');dom.setAttrib(e,'mce_fixed','1');}},_patchSafari2x:function(ed){var t=this,setContent,getNode,dom=ed.dom,lr;if(ed.windowManager.onBeforeOpen){ed.windowManager.onBeforeOpen.add(function(){r=ed.selection.getRng();});}ed.selection.select=function(n){this.getSel().setBaseAndExtent(n,0,n,1);};getNode=ed.selection.getNode;ed.selection.getNode=function(){return t.selElm||getNode.call(this);};ed.selection.getRng=function(){var t=this,s=t.getSel(),d=ed.getDoc(),r,rb,ra,di;if(s.anchorNode){r=d.createRange();try{rb=d.createRange();rb.setStart(s.anchorNode,s.anchorOffset);rb.collapse(1);ra=d.createRange();ra.setStart(s.focusNode,s.focusOffset);ra.collapse(1);di=rb.compareBoundaryPoints(rb.START_TO_END,ra)<0;r.setStart(di?s.anchorNode:s.focusNode,di?s.anchorOffset:s.focusOffset);r.setEnd(di?s.focusNode:s.anchorNode,di?s.focusOffset:s.anchorOffset);lr=r;}catch(ex){}}return r||lr;};setContent=ed.selection.setContent;ed.selection.setContent=function(h,s){var r=this.getRng(),b;try{setContent.call(this,h,s);}catch(ex){b=dom.create('body');b.innerHTML=h;each(b.childNodes,function(n){r.insertNode(n.cloneNode(true));});}};},_insertBR:function(ed){var dom=ed.dom,s=ed.selection,r=s.getRng(),br;r.insertNode(br=dom.create('br'));r.setStartAfter(br);r.setEndAfter(br);s.setRng(r);if(s.getSel().focusNode==br.previousSibling){s.select(dom.insertAfter(dom.doc.createTextNode('\u00a0'),br));s.collapse(1);}ed.getWin().scrollTo(0,dom.getPos(s.getRng().startContainer).y);}});tinymce.PluginManager.add('safari',tinymce.plugins.Safari);})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/safari/editor_plugin_src.js b/webcit/tiny_mce/plugins/safari/editor_plugin_src.js deleted file mode 100644 index a547d2d9d..000000000 --- a/webcit/tiny_mce/plugins/safari/editor_plugin_src.js +++ /dev/null @@ -1,511 +0,0 @@ -/* - * Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. - */ - -(function() { - var Event = tinymce.dom.Event, grep = tinymce.grep, each = tinymce.each, inArray = tinymce.inArray, isOldWebKit = tinymce.isOldWebKit; - - function isEmpty(d, e, f) { - var w, n; - - w = d.createTreeWalker(e, NodeFilter.SHOW_ALL, null, false); - while (n = w.nextNode()) { - // Filter func - if (f) { - if (!f(n)) - return false; - } - - // Non whitespace text node - if (n.nodeType == 3 && n.nodeValue && /[^\s\u00a0]+/.test(n.nodeValue)) - return false; - - // Is non text element byt still content - if (n.nodeType == 1 && /^(HR|IMG|TABLE)$/.test(n.nodeName)) - return false; - } - - return true; - }; - - tinymce.create('tinymce.plugins.Safari', { - init : function(ed) { - var t = this, dom; - - // Ignore on non webkit - if (!tinymce.isWebKit) - return; - - t.editor = ed; - t.webKitFontSizes = ['x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', '-webkit-xxx-large']; - t.namedFontSizes = ['xx-small', 'x-small','small','medium','large','x-large', 'xx-large']; - - // Safari CreateLink command will not work correctly on images that is aligned - ed.addCommand('CreateLink', function(u, v) { - var n = ed.selection.getNode(), dom = ed.dom, a; - - if (n && (/^(left|right)$/i.test(dom.getStyle(n, 'float', 1)) || /^(left|right)$/i.test(dom.getAttrib(n, 'align')))) { - a = dom.create('a', {href : v}, n.cloneNode()); - n.parentNode.replaceChild(a, n); - ed.selection.select(a); - } else - ed.getDoc().execCommand("CreateLink", false, v); - }); - - ed.onPaste.add(function(ed, e) { - function removeStyles(e) { - e = e.target; - - if (e.nodeType == 1) { - e.style.cssText = ''; - - each(ed.dom.select('*', e), function(e) { - e.style.cssText = ''; - }); - } - }; - - Event.add(ed.getDoc(), 'DOMNodeInserted', removeStyles); - - window.setTimeout(function() { - Event.remove(ed.getDoc(), 'DOMNodeInserted', removeStyles); - }, 0); - }); - - ed.onKeyUp.add(function(ed, e) { - var h, b, r, n, s; - - // If backspace or delete key - if (e.keyCode == 46 || e.keyCode == 8) { - b = ed.getBody(); - h = b.innerHTML; - s = ed.selection; - - // If there is no text content or images or hr elements then remove everything - if (b.childNodes.length == 1 && !/<(img|hr)/.test(h) && tinymce.trim(h.replace(/<[^>]+>/g, '')).length == 0) { - // Inject paragrah and bogus br - ed.setContent('


', {format : 'raw'}); - - // Move caret before bogus br - n = b.firstChild; - r = s.getRng(); - r.setStart(n, 0); - r.setEnd(n, 0); - s.setRng(r); - } - } - }); - - // Workaround for FormatBlock bug, http://bugs.webkit.org/show_bug.cgi?id=16004 - ed.addCommand('FormatBlock', function(u, v) { - var dom = ed.dom, e = dom.getParent(ed.selection.getNode(), dom.isBlock); - - if (e) - dom.replace(dom.create(v), e, 1); - else - ed.getDoc().execCommand("FormatBlock", false, v); - }); - - // Workaround for InsertHTML bug, http://bugs.webkit.org/show_bug.cgi?id=16382 - ed.addCommand('mceInsertContent', function(u, v) { - ed.getDoc().execCommand("InsertText", false, 'mce_marker'); - ed.getBody().innerHTML = ed.getBody().innerHTML.replace(/mce_marker/g, ed.dom.processHTML(v) + 'XX'); - ed.selection.select(ed.dom.get('_mce_tmp')); - ed.getDoc().execCommand("Delete", false, ' '); - }); - - ed.onKeyPress.add(function(ed, e) { - var se, li, lic, r1, r2, n, sel, doc, be, af, pa; - - if (e.keyCode == 13) { - sel = ed.selection; - se = sel.getNode(); - - // Workaround for missing shift+enter support, http://bugs.webkit.org/show_bug.cgi?id=16973 - if (e.shiftKey || ed.settings.force_br_newlines && se.nodeName != 'LI') { - t._insertBR(ed); - Event.cancel(e); - } - - // Workaround for DIV elements produced by Safari - if (li = dom.getParent(se, 'LI')) { - lic = dom.getParent(li, 'OL,UL'); - doc = ed.getDoc(); - - pa = dom.create('p'); - dom.add(pa, 'br', {mce_bogus : "1"}); - - if (isEmpty(doc, li)) { - // If list in list then use browser default behavior - if (n = dom.getParent(lic.parentNode, 'LI,OL,UL')) - return; - - n = dom.getParent(lic, 'p,h1,h2,h3,h4,h5,h6,div') || lic; - - // Create range from the start of block element to the list item - r1 = doc.createRange(); - r1.setStartBefore(n); - r1.setEndBefore(li); - - // Create range after the list to the end of block element - r2 = doc.createRange(); - r2.setStartAfter(li); - r2.setEndAfter(n); - - be = r1.cloneContents(); - af = r2.cloneContents(); - - if (!isEmpty(doc, af)) - dom.insertAfter(af, n); - - dom.insertAfter(pa, n); - - if (!isEmpty(doc, be)) - dom.insertAfter(be, n); - - dom.remove(n); - - n = pa.firstChild; - r1 = doc.createRange(); - r1.setStartBefore(n); - r1.setEndBefore(n); - sel.setRng(r1); - - return Event.cancel(e); - } - } - } - }); - - // Safari doesn't place lists outside block elements - ed.onExecCommand.add(function(ed, cmd) { - var sel, dom, bl, bm; - - if (cmd == 'InsertUnorderedList' || cmd == 'InsertOrderedList') { - sel = ed.selection; - dom = ed.dom; - - if (bl = dom.getParent(sel.getNode(), function(n) {return /^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName);})) { - bm = sel.getBookmark(); - dom.remove(bl, 1); - sel.moveToBookmark(bm); - } - } - }); - - // Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250 - ed.onClick.add(function(ed, e) { - e = e.target; - - if (e.nodeName == 'IMG') { - t.selElm = e; - ed.selection.select(e); - } else - t.selElm = null; - }); - - ed.onInit.add(function() { - t._fixWebKitSpans(); - - if (isOldWebKit) - t._patchSafari2x(ed); - }); - - ed.onSetContent.add(function() { - dom = ed.dom; - - // Convert strong,b,em,u,strike to spans - each(['strong','b','em','u','strike','sub','sup','a'], function(v) { - each(grep(dom.select(v)).reverse(), function(n) { - var nn = n.nodeName.toLowerCase(), st; - - // Convert anchors into images - if (nn == 'a') { - if (n.name) - dom.replace(dom.create('img', {mce_name : 'a', name : n.name, 'class' : 'mceItemAnchor'}), n); - - return; - } - - switch (nn) { - case 'b': - case 'strong': - if (nn == 'b') - nn = 'strong'; - - st = 'font-weight: bold;'; - break; - - case 'em': - st = 'font-style: italic;'; - break; - - case 'u': - st = 'text-decoration: underline;'; - break; - - case 'sub': - st = 'vertical-align: sub;'; - break; - - case 'sup': - st = 'vertical-align: super;'; - break; - - case 'strike': - st = 'text-decoration: line-through;'; - break; - } - - dom.replace(dom.create('span', {mce_name : nn, style : st, 'class' : 'Apple-style-span'}), n, 1); - }); - }); - }); - - ed.onPreProcess.add(function(ed, o) { - dom = ed.dom; - - each(grep(o.node.getElementsByTagName('span')).reverse(), function(n) { - var v, bg; - - if (o.get) { - if (dom.hasClass(n, 'Apple-style-span')) { - bg = n.style.backgroundColor; - - switch (dom.getAttrib(n, 'mce_name')) { - case 'font': - if (!ed.settings.convert_fonts_to_spans) - dom.setAttrib(n, 'style', ''); - break; - - case 'strong': - case 'em': - case 'sub': - case 'sup': - dom.setAttrib(n, 'style', ''); - break; - - case 'strike': - case 'u': - if (!ed.settings.inline_styles) - dom.setAttrib(n, 'style', ''); - else - dom.setAttrib(n, 'mce_name', ''); - - break; - - default: - if (!ed.settings.inline_styles) - dom.setAttrib(n, 'style', ''); - } - - - if (bg) - n.style.backgroundColor = bg; - } - } - - if (dom.hasClass(n, 'mceItemRemoved')) - dom.remove(n, 1); - }); - }); - - ed.onPostProcess.add(function(ed, o) { - // Safari adds BR at end of all block elements - o.content = o.content.replace(/
<\/(h[1-6]|div|p|address|pre)>/g, ''); - - // Safari adds id="undefined" to HR elements - o.content = o.content.replace(/ id=\"undefined\"/g, ''); - }); - }, - - getInfo : function() { - return { - longname : 'Safari compatibility', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/safari', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - }, - - // Internal methods - - _fixWebKitSpans : function() { - var t = this, ed = t.editor; - - if (!isOldWebKit) { - // Use mutator events on new WebKit - Event.add(ed.getDoc(), 'DOMNodeInserted', function(e) { - e = e.target; - - if (e && e.nodeType == 1) - t._fixAppleSpan(e); - }); - } else { - // Do post command processing in old WebKit since the browser crashes on Mutator events :( - ed.onExecCommand.add(function() { - each(ed.dom.select('span'), function(n) { - t._fixAppleSpan(n); - }); - - ed.nodeChanged(); - }); - } - }, - - _fixAppleSpan : function(e) { - var ed = this.editor, dom = ed.dom, fz = this.webKitFontSizes, fzn = this.namedFontSizes, s = ed.settings, st, p; - - if (dom.getAttrib(e, 'mce_fixed')) - return; - - // Handle Apple style spans - if (e.nodeName == 'SPAN' && e.className == 'Apple-style-span') { - st = e.style; - - if (!s.convert_fonts_to_spans) { - if (st.fontSize) { - dom.setAttrib(e, 'mce_name', 'font'); - dom.setAttrib(e, 'size', inArray(fz, st.fontSize) + 1); - } - - if (st.fontFamily) { - dom.setAttrib(e, 'mce_name', 'font'); - dom.setAttrib(e, 'face', st.fontFamily); - } - - if (st.color) { - dom.setAttrib(e, 'mce_name', 'font'); - dom.setAttrib(e, 'color', dom.toHex(st.color)); - } - - if (st.backgroundColor) { - dom.setAttrib(e, 'mce_name', 'font'); - dom.setStyle(e, 'background-color', st.backgroundColor); - } - } else { - if (st.fontSize) - dom.setStyle(e, 'fontSize', fzn[inArray(fz, st.fontSize)]); - } - - if (st.fontWeight == 'bold') - dom.setAttrib(e, 'mce_name', 'strong'); - - if (st.fontStyle == 'italic') - dom.setAttrib(e, 'mce_name', 'em'); - - if (st.textDecoration == 'underline') - dom.setAttrib(e, 'mce_name', 'u'); - - if (st.textDecoration == 'line-through') - dom.setAttrib(e, 'mce_name', 'strike'); - - if (st.verticalAlign == 'super') - dom.setAttrib(e, 'mce_name', 'sup'); - - if (st.verticalAlign == 'sub') - dom.setAttrib(e, 'mce_name', 'sub'); - - dom.setAttrib(e, 'mce_fixed', '1'); - } - }, - - _patchSafari2x : function(ed) { - var t = this, setContent, getNode, dom = ed.dom, lr; - - // Inline dialogs - if (ed.windowManager.onBeforeOpen) { - ed.windowManager.onBeforeOpen.add(function() { - r = ed.selection.getRng(); - }); - } - - // Fake select on 2.x - ed.selection.select = function(n) { - this.getSel().setBaseAndExtent(n, 0, n, 1); - }; - - getNode = ed.selection.getNode; - ed.selection.getNode = function() { - return t.selElm || getNode.call(this); - }; - - // Fake range on Safari 2.x - ed.selection.getRng = function() { - var t = this, s = t.getSel(), d = ed.getDoc(), r, rb, ra, di; - - // Fake range on Safari 2.x - if (s.anchorNode) { - r = d.createRange(); - - try { - // Setup before range - rb = d.createRange(); - rb.setStart(s.anchorNode, s.anchorOffset); - rb.collapse(1); - - // Setup after range - ra = d.createRange(); - ra.setStart(s.focusNode, s.focusOffset); - ra.collapse(1); - - // Setup start/end points by comparing locations - di = rb.compareBoundaryPoints(rb.START_TO_END, ra) < 0; - r.setStart(di ? s.anchorNode : s.focusNode, di ? s.anchorOffset : s.focusOffset); - r.setEnd(di ? s.focusNode : s.anchorNode, di ? s.focusOffset : s.anchorOffset); - - lr = r; - } catch (ex) { - // Sometimes fails, at least we tried to do it by the book. I hope Safari 2.x will go disappear soooon!!! - } - } - - return r || lr; - }; - - // Fix setContent so it works - setContent = ed.selection.setContent; - ed.selection.setContent = function(h, s) { - var r = this.getRng(), b; - - try { - setContent.call(this, h, s); - } catch (ex) { - // Workaround for Safari 2.x - b = dom.create('body'); - b.innerHTML = h; - - each(b.childNodes, function(n) { - r.insertNode(n.cloneNode(true)); - }); - } - }; - }, - - _insertBR : function(ed) { - var dom = ed.dom, s = ed.selection, r = s.getRng(), br; - - // Insert BR element - r.insertNode(br = dom.create('br')); - - // Place caret after BR - r.setStartAfter(br); - r.setEndAfter(br); - s.setRng(r); - - // Could not place caret after BR then insert an nbsp entity and move the caret - if (s.getSel().focusNode == br.previousSibling) { - s.select(dom.insertAfter(dom.doc.createTextNode('\u00a0'), br)); - s.collapse(1); - } - - // Scroll to new position, scrollIntoView can't be used due to bug: http://bugs.webkit.org/show_bug.cgi?id=16117 - ed.getWin().scrollTo(0, dom.getPos(s.getRng().startContainer).y); - } - }); - - // Register plugin - tinymce.PluginManager.add('safari', tinymce.plugins.Safari); -})(); - diff --git a/webcit/tiny_mce/plugins/save/editor_plugin.js b/webcit/tiny_mce/plugins/save/editor_plugin.js index 8a13e7d35..8e9399667 100644 --- a/webcit/tiny_mce/plugins/save/editor_plugin.js +++ b/webcit/tiny_mce/plugins/save/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.Save',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceSave',t._save,t);ed.addCommand('mceCancel',t._cancel,t);ed.addButton('save',{title:'save.save_desc',cmd:'mceSave'});ed.addButton('cancel',{title:'save.cancel_desc',cmd:'mceCancel'});ed.onNodeChange.add(t._nodeChange,t);ed.addShortcut('ctrl+s',ed.getLang('save.save_desc'),'mceSave');},getInfo:function(){return{longname:'Save',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_nodeChange:function(ed,cm,n){var ed=this.editor;if(ed.getParam('save_enablewhendirty')){cm.setDisabled('save',!ed.isDirty());cm.setDisabled('cancel',!ed.isDirty());}},_save:function(){var ed=this.editor,formObj,os,i,elementId;formObj=tinymce.DOM.get(ed.id).form||tinymce.DOM.getParent(ed.id,'form');if(ed.getParam("save_enablewhendirty")&&!ed.isDirty())return;tinyMCE.triggerSave();if(os=ed.getParam("save_onsavecallback")){if(ed.execCallback('save_onsavecallback',ed)){ed.startContent=tinymce.trim(ed.getContent({format:'raw'}));ed.nodeChanged();}return;}if(formObj){ed.isNotDirty=true;if(formObj.onsubmit==null||formObj.onsubmit()!=false)formObj.submit();ed.nodeChanged();}else ed.windowManager.alert("Error: No form element found.");},_cancel:function(){var ed=this.editor,os,h=tinymce.trim(ed.startContent);if(os=ed.getParam("save_oncancelcallback")){ed.execCallback('save_oncancelcallback',ed);return;}ed.setContent(h);ed.undoManager.clear();ed.nodeChanged();}});tinymce.PluginManager.add('save',tinymce.plugins.Save);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.Save",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceSave",c._save,c);a.addCommand("mceCancel",c._cancel,c);a.addButton("save",{title:"save.save_desc",cmd:"mceSave"});a.addButton("cancel",{title:"save.cancel_desc",cmd:"mceCancel"});a.onNodeChange.add(c._nodeChange,c);a.addShortcut("ctrl+s",a.getLang("save.save_desc"),"mceSave")},getInfo:function(){return{longname:"Save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,c){var b=this.editor;if(b.getParam("save_enablewhendirty")){a.setDisabled("save",!b.isDirty());a.setDisabled("cancel",!b.isDirty())}},_save:function(){var c=this.editor,a,e,d,b;a=tinymce.DOM.get(c.id).form||tinymce.DOM.getParent(c.id,"form");if(c.getParam("save_enablewhendirty")&&!c.isDirty()){return}tinyMCE.triggerSave();if(e=c.getParam("save_onsavecallback")){if(c.execCallback("save_onsavecallback",c)){c.startContent=tinymce.trim(c.getContent({format:"raw"}));c.nodeChanged()}return}if(a){c.isNotDirty=true;if(a.onsubmit==null||a.onsubmit()!=false){a.submit()}c.nodeChanged()}else{c.windowManager.alert("Error: No form element found.")}},_cancel:function(){var a=this.editor,c,b=tinymce.trim(a.startContent);if(c=a.getParam("save_oncancelcallback")){a.execCallback("save_oncancelcallback",a);return}a.setContent(b);a.undoManager.clear();a.nodeChanged()}});tinymce.PluginManager.add("save",tinymce.plugins.Save)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/save/editor_plugin_src.js b/webcit/tiny_mce/plugins/save/editor_plugin_src.js index b38be4d63..f5a3de8f5 100644 --- a/webcit/tiny_mce/plugins/save/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/save/editor_plugin_src.js @@ -1,8 +1,11 @@ /** - * $Id: editor_plugin_src.js 851 2008-05-26 15:38:49Z spocke $ + * editor_plugin_src.js * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { diff --git a/webcit/tiny_mce/plugins/searchreplace/editor_plugin.js b/webcit/tiny_mce/plugins/searchreplace/editor_plugin.js index 7fd913b2b..cd9c985b7 100644 --- a/webcit/tiny_mce/plugins/searchreplace/editor_plugin.js +++ b/webcit/tiny_mce/plugins/searchreplace/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.SearchReplacePlugin',{init:function(ed,url){function open(m){ed.windowManager.open({file:url+'/searchreplace.htm',width:420+parseInt(ed.getLang('searchreplace.delta_width',0)),height:160+parseInt(ed.getLang('searchreplace.delta_height',0)),inline:1,auto_focus:0},{mode:m,search_string:ed.selection.getContent({format:'text'}),plugin_url:url});};ed.addCommand('mceSearch',function(){open('search');});ed.addCommand('mceReplace',function(){open('replace');});ed.addButton('search',{title:'searchreplace.search_desc',cmd:'mceSearch'});ed.addButton('replace',{title:'searchreplace.replace_desc',cmd:'mceReplace'});ed.addShortcut('ctrl+f','searchreplace.search_desc','mceSearch');},getInfo:function(){return{longname:'Search/Replace',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('searchreplace',tinymce.plugins.SearchReplacePlugin);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.SearchReplacePlugin",{init:function(a,c){function b(d){a.windowManager.open({file:c+"/searchreplace.htm",width:420+parseInt(a.getLang("searchreplace.delta_width",0)),height:170+parseInt(a.getLang("searchreplace.delta_height",0)),inline:1,auto_focus:0},{mode:d,search_string:a.selection.getContent({format:"text"}),plugin_url:c})}a.addCommand("mceSearch",function(){b("search")});a.addCommand("mceReplace",function(){b("replace")});a.addButton("search",{title:"searchreplace.search_desc",cmd:"mceSearch"});a.addButton("replace",{title:"searchreplace.replace_desc",cmd:"mceReplace"});a.addShortcut("ctrl+f","searchreplace.search_desc","mceSearch")},getInfo:function(){return{longname:"Search/Replace",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("searchreplace",tinymce.plugins.SearchReplacePlugin)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/searchreplace/editor_plugin_src.js b/webcit/tiny_mce/plugins/searchreplace/editor_plugin_src.js index 59edc3b25..1433a06a4 100644 --- a/webcit/tiny_mce/plugins/searchreplace/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/searchreplace/editor_plugin_src.js @@ -1,8 +1,11 @@ /** - * $Id: editor_plugin_src.js 686 2008-03-09 18:13:49Z spocke $ + * editor_plugin_src.js * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -12,7 +15,7 @@ ed.windowManager.open({ file : url + '/searchreplace.htm', width : 420 + parseInt(ed.getLang('searchreplace.delta_width', 0)), - height : 160 + parseInt(ed.getLang('searchreplace.delta_height', 0)), + height : 170 + parseInt(ed.getLang('searchreplace.delta_height', 0)), inline : 1, auto_focus : 0 }, { diff --git a/webcit/tiny_mce/plugins/searchreplace/js/searchreplace.js b/webcit/tiny_mce/plugins/searchreplace/js/searchreplace.js index a8585cccc..0137ba0fd 100644 --- a/webcit/tiny_mce/plugins/searchreplace/js/searchreplace.js +++ b/webcit/tiny_mce/plugins/searchreplace/js/searchreplace.js @@ -42,6 +42,10 @@ var SearchReplaceDialog = { ca = f[m + '_panel_casesensitivebox'].checked; rs = f['replace_panel_replacestring'].value; + if (tinymce.isIE) { + r = ed.getDoc().selection.createRange(); + } + if (s == '') return; @@ -75,6 +79,10 @@ var SearchReplaceDialog = { r.select(); replace(); fo = 1; + + if (b) { + r.moveEnd("character", -(rs.length)); // Otherwise will loop forever + } } tinyMCEPopup.storeSelection(); @@ -102,6 +110,10 @@ var SearchReplaceDialog = { se.collapse(b); r = se.getRng(); + if (tinymce.isIE) { + r = ed.getDoc().selection.createRange(); + } + // Whats the point if (!s) return; diff --git a/webcit/tiny_mce/plugins/searchreplace/langs/et_dlg.js b/webcit/tiny_mce/plugins/searchreplace/langs/et_dlg.js new file mode 100644 index 000000000..fcafedd78 --- /dev/null +++ b/webcit/tiny_mce/plugins/searchreplace/langs/et_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('et.searchreplace_dlg',{ +searchnext_desc:"Otsi uuesti", +notfound:"Otsing on l\u00F5petatud. Otsis\u00F5na ei leitud.", +search_title:"Otsi", +replace_title:"Otsi/Asenda", +allreplaced:"K\u00F5ik otsis\u00F5na ilmingud on asendatud.", +findwhat:"Otsi mida", +replacewith:"Asenda millega", +direction:"Suund", +up:"\u00DCles", +down:"Alla", +mcase:"Vasta suurusele", +findnext:"Otsi j\u00E4rgmine", +replace:"Asenda", +replaceall:"Asenda k\u00F5ik" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/searchreplace/langs/fr_dlg.js b/webcit/tiny_mce/plugins/searchreplace/langs/fr_dlg.js new file mode 100644 index 000000000..a151c6c39 --- /dev/null +++ b/webcit/tiny_mce/plugins/searchreplace/langs/fr_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('fr.searchreplace_dlg',{ +searchnext_desc:"Suivant", +notfound:"La recherche est termin\u00E9e. La cha\u00EEne recherch\u00E9e n'a pas \u00E9t\u00E9 trouv\u00E9e.", +search_title:"Rechercher", +replace_title:"Rechercher / remplacer", +allreplaced:"Toutes les occurrences de la cha\u00EEne recherch\u00E9e ont \u00E9t\u00E9 remplac\u00E9es.", +findwhat:"Rechercher ceci", +replacewith:"Remplacer par", +direction:"Direction", +up:"Vers le haut", +down:"Vers le bas", +mcase:"Sensible \u00E0 la casse", +findnext:"Rechercher le suivant", +replace:"Remplacer", +replaceall:"Tout remplacer" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/searchreplace/langs/hu_dlg.js b/webcit/tiny_mce/plugins/searchreplace/langs/hu_dlg.js new file mode 100644 index 000000000..7c6dee711 --- /dev/null +++ b/webcit/tiny_mce/plugins/searchreplace/langs/hu_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('hu.searchreplace_dlg',{ +searchnext_desc:"Keres\u00E9s megint", +notfound:"A keres\u00E9s v\u00E9get \u00E9rt. A keresett sz\u00F6vegr\u00E9sz nem tal\u00E1lhat\u00F3.", +search_title:"Keres\u00E9s", +replace_title:"Keres\u00E9s/Csere", +allreplaced:"A keresett r\u00E9szsz\u00F6veg minden el\u0151fordul\u00E1sa cser\u00E9lve lett.", +findwhat:"Mit cser\u00E9l", +replacewith:"Mire cser\u00E9l", +direction:"Ir\u00E1ny", +up:"Fel", +down:"Le", +mcase:"Kis- \u00E9s nagybet\u0171k megk\u00FCl\u00F6nb\u00F6ztet\u00E9se", +findnext:"Keres\u00E9s", +replace:"Csere", +replaceall:"Minden tal\u00E1lat cser\u00E9je" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/searchreplace/langs/pt_dlg.js b/webcit/tiny_mce/plugins/searchreplace/langs/pt_dlg.js index 16e9aae43..df9c0297a 100644 --- a/webcit/tiny_mce/plugins/searchreplace/langs/pt_dlg.js +++ b/webcit/tiny_mce/plugins/searchreplace/langs/pt_dlg.js @@ -1,16 +1,16 @@ tinyMCE.addI18n('pt.searchreplace_dlg',{ searchnext_desc:"Localizar novamente", -notfound:"A pesquisa foi conclu\u00C3\u00ADda sem resultados.", +notfound:"A pesquisa foi conclu\u00EDda sem resultados.", search_title:"Localizar", replace_title:"Localizar/substituir", -allreplaced:"Todas as substitui\u00C3\u00A7\u00C3\u00B5es foram efetuadas.", +allreplaced:"Todas as substitui\u00E7\u00F5es foram efetuadas.", findwhat:"Localizar", replacewith:"Substituir com", -direction:"Dire\u00C3\u00A7\u00C3\u00A3o", +direction:"Dire\u00E7\u00E3o", up:"Acima", down:"Abaixo", -mcase:"Diferenciar mai\u00C3\u00BAsculas/min\u00C3\u00BAsculas", -findnext:"Localizar pr\u00C3\u00B3ximo", +mcase:"Diferenciar mai\u00FAsculas", +findnext:"Localizar pr\u00F3ximo", replace:"Substituir", replaceall:"Substituir todos" }); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/searchreplace/langs/ru_dlg.js b/webcit/tiny_mce/plugins/searchreplace/langs/ru_dlg.js new file mode 100644 index 000000000..b2ec4402c --- /dev/null +++ b/webcit/tiny_mce/plugins/searchreplace/langs/ru_dlg.js @@ -0,0 +1,16 @@ +tinyMCE.addI18n('ru.searchreplace_dlg',{ +searchnext_desc:"\u041D\u0430\u0439\u0442\u0438 \u0435\u0449\u0435", +notfound:"\u041F\u043E\u0438\u0441\u043A \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D. \u0421\u043E\u043E\u0442\u0432\u0435\u0441\u0442\u0432\u0438\u0439 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E.", +search_title:"\u041F\u043E\u0438\u0441\u043A", +replace_title:"\u041F\u043E\u0438\u0441\u043A \u0438 \u0437\u0430\u043C\u0435\u043D\u0430", +allreplaced:"\u0412\u0441\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044F \u043F\u043E\u0438\u0441\u043A\u0430 \u0431\u044B\u043B\u0438 \u0437\u0430\u043C\u0435\u043D\u0435\u043D\u044B.", +findwhat:"\u041F\u043E\u0438\u0441\u043A", +replacewith:"\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C \u043D\u0430", +direction:"\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435", +up:"\u0412\u0432\u0435\u0440\u0445 ", +down:"\u0412\u043D\u0438\u0437", +mcase:"\u0423\u0447\u0438\u0442\u044B\u0432\u0430\u0442\u044C \u0440\u0435\u0433\u0438\u0441\u0442\u0440", +findnext:"\u041D\u0430\u0439\u0442\u0438 \u0434\u0430\u043B\u0435\u0435", +replace:"\u0417\u0430\u043C\u0435\u043D\u0430", +replaceall:"\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C \u0432\u0441\u0435" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/searchreplace/searchreplace.htm b/webcit/tiny_mce/plugins/searchreplace/searchreplace.htm index 9c95a6a30..d0424cfc9 100644 --- a/webcit/tiny_mce/plugins/searchreplace/searchreplace.htm +++ b/webcit/tiny_mce/plugins/searchreplace/searchreplace.htm @@ -7,7 +7,6 @@ -
@@ -90,15 +89,10 @@
-
- - - -
- -
- -
+ + + +
diff --git a/webcit/tiny_mce/plugins/spellchecker/editor_plugin.js b/webcit/tiny_mce/plugins/spellchecker/editor_plugin.js index 9cb679961..a9ec3b9cf 100644 --- a/webcit/tiny_mce/plugins/spellchecker/editor_plugin.js +++ b/webcit/tiny_mce/plugins/spellchecker/editor_plugin.js @@ -1 +1 @@ -(function(){var JSONRequest=tinymce.util.JSONRequest,each=tinymce.each,DOM=tinymce.DOM;tinymce.create('tinymce.plugins.SpellcheckerPlugin',{getInfo:function(){return{longname:'Spellchecker',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker',version:tinymce.majorVersion+"."+tinymce.minorVersion};},init:function(ed,url){var t=this,cm;t.url=url;t.editor=ed;ed.addCommand('mceSpellCheck',function(){if(!t.active){ed.setProgressState(1);t._sendRPC('checkWords',[t.selectedLang,t._getWords()],function(r){if(r.length>0){t.active=1;t._markWords(r);ed.setProgressState(0);ed.nodeChanged();}else{ed.setProgressState(0);ed.windowManager.alert('spellchecker.no_mpell');}});}else t._done();});ed.onInit.add(function(){if(ed.settings.content_css!==false)ed.dom.loadCSS(url+'/css/content.css');});ed.onClick.add(t._showMenu,t);ed.onContextMenu.add(t._showMenu,t);ed.onBeforeGetContent.add(function(){if(t.active)t._removeWords();});ed.onNodeChange.add(function(ed,cm){cm.setActive('spellchecker',t.active);});ed.onSetContent.add(function(){t._done();});ed.onBeforeGetContent.add(function(){t._done();});ed.onBeforeExecCommand.add(function(ed,cmd){if(cmd=='mceFullScreen')t._done();});t.languages={};each(ed.getParam('spellchecker_languages','+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv','hash'),function(v,k){if(k.indexOf('+')===0){k=k.substring(1);t.selectedLang=v;}t.languages[k]=v;});},createControl:function(n,cm){var t=this,c,ed=t.editor;if(n=='spellchecker'){c=cm.createSplitButton(n,{title:'spellchecker.desc',cmd:'mceSpellCheck',scope:t});c.onRenderMenu.add(function(c,m){m.add({title:'spellchecker.langs','class':'mceMenuItemTitle'}).setDisabled(1);each(t.languages,function(v,k){var o={icon:1},mi;o.onclick=function(){mi.setSelected(1);t.selectedItem.setSelected(0);t.selectedItem=mi;t.selectedLang=v;};o.title=k;mi=m.add(o);mi.setSelected(v==t.selectedLang);if(v==t.selectedLang)t.selectedItem=mi;})});return c;}},_walk:function(n,f){var d=this.editor.getDoc(),w;if(d.createTreeWalker){w=d.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,false);while((n=w.nextNode())!=null)f.call(this,n);}else tinymce.walk(n,f,'childNodes');},_getSeparators:function(){var re='',i,str=this.editor.getParam('spellchecker_word_separator_chars','\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}����������������\u201d\u201c');for(i=0;i$1
$2');v=v.replace(r3,'$1$2');dom.replace(dom.create('span',{'class':'mceItemHidden'},v),n);}}});se.moveToBookmark(b);},_showMenu:function(ed,e){var t=this,ed=t.editor,m=t._menu,p1,dom=ed.dom,vp=dom.getViewPort(ed.getWin());if(!m){p1=DOM.getPos(ed.getContentAreaContainer());m=ed.controlManager.createDropMenu('spellcheckermenu',{offset_x:p1.x,offset_y:p1.y,'class':'mceNoIcons'});t._menu=m;}if(dom.hasClass(e.target,'mceItemHiddenSpellWord')){m.removeAll();m.add({title:'spellchecker.wait','class':'mceMenuItemTitle'}).setDisabled(1);t._sendRPC('getSuggestions',[t.selectedLang,dom.decode(e.target.innerHTML)],function(r){m.removeAll();if(r.length>0){m.add({title:'spellchecker.sug','class':'mceMenuItemTitle'}).setDisabled(1);each(r,function(v){m.add({title:v,onclick:function(){dom.replace(ed.getDoc().createTextNode(v),e.target);t._checkDone();}});});m.addSeparator();}else m.add({title:'spellchecker.no_sug','class':'mceMenuItemTitle'}).setDisabled(1);m.add({title:'spellchecker.ignore_word',onclick:function(){dom.remove(e.target,1);t._checkDone();}});m.add({title:'spellchecker.ignore_words',onclick:function(){t._removeWords(dom.decode(e.target.innerHTML));t._checkDone();}});m.update();});ed.selection.select(e.target);p1=dom.getPos(e.target);m.showMenu(p1.x,p1.y+e.target.offsetHeight-vp.y);return tinymce.dom.Event.cancel(e);}else m.hideMenu();},_checkDone:function(){var t=this,ed=t.editor,dom=ed.dom,o;each(dom.select('span'),function(n){if(n&&dom.hasClass(n,'mceItemHiddenSpellWord')){o=true;return false;}});if(!o)t._done();},_done:function(){var t=this,la=t.active;if(t.active){t.active=0;t._removeWords();if(t._menu)t._menu.hideMenu();if(la)t.editor.nodeChanged();}},_sendRPC:function(m,p,cb){var t=this,url=t.editor.getParam("spellchecker_rpc_url","{backend}");if(url=='{backend}'){t.editor.setProgressState(0);alert('Please specify: spellchecker_rpc_url');return;}JSONRequest.sendRPC({url:url,method:m,params:p,success:cb,error:function(e,x){t.editor.setProgressState(0);t.editor.windowManager.alert(e.errstr||('Error response: '+x.responseText));}});}});tinymce.PluginManager.add('spellchecker',tinymce.plugins.SpellcheckerPlugin);})(); \ No newline at end of file +(function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;g.rpcUrl=e.getParam("spellchecker_rpc_url","{backend}");if(g.rpcUrl=="{backend}"){if(tinymce.isIE){return}g.hasSupport=true;e.onContextMenu.addToTop(function(h,i){if(g.active){return false}})}e.addCommand("mceSpellCheck",function(){if(g.rpcUrl=="{backend}"){g.editor.getBody().spellcheck=g.active=!g.active;return}if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);if(e.getParam("spellchecker_report_no_misspellings",true)){e.windowManager.alert("spellchecker.no_mpell")}}})}else{g._done()}});e.onInit.add(function(){if(e.settings.content_css!==false){e.dom.loadCSS(f+"/css/content.css")}});e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){if(f.rpcUrl=="{backend}"){if(f.hasSupport){g=d.createButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f})}return g}g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){l.setSelected(1);f.selectedItem.setSelected(0);f.selectedItem=l;f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);if(n==f.selectedLang){f.selectedItem=l}})});return g}},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c');for(d=0;d$1
$2');q=q.replace(g,'$1$2');j.replace(j.create("span",{"class":"mceItemHidden"},q),r)}}});l.moveToBookmark(m)},_showMenu:function(h,j){var i=this,h=i.editor,d=i._menu,l,k=h.dom,g=k.getViewPort(h.getWin()),f=j.target;j=0;if(!d){l=b.getPos(h.getContentAreaContainer());d=h.controlManager.createDropMenu("spellcheckermenu",{offset_x:l.x,offset_y:l.y,"class":"mceNoIcons"});i._menu=d}if(k.hasClass(f,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);i._sendRPC("getSuggestions",[i.selectedLang,k.decode(f.innerHTML)],function(m){var e;d.removeAll();if(m.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(m,function(n){d.add({title:n,onclick:function(){k.replace(h.getDoc().createTextNode(n),f);i._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}e=i.editor.getParam("spellchecker_enable_ignore_rpc","");d.add({title:"spellchecker.ignore_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});d.add({title:"spellchecker.ignore_words",onclick:function(){var n=f.innerHTML;i._removeWords(k.decode(n));i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWords",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});if(i.editor.getParam("spellchecker_enable_learn_rpc")){d.add({title:"spellchecker.learn_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();h.setProgressState(1);i._sendRPC("learnWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}})}d.update()});h.selection.select(f);l=k.getPos(f);d.showMenu(l.x,l.y+f.offsetHeight-g.y);return tinymce.dom.Event.cancel(j)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,g,d){var f=this;a.sendRPC({url:f.rpcUrl,method:e,params:g,success:d,error:function(i,h){f.editor.setProgressState(0);f.editor.windowManager.alert(i.errstr||("Error response: "+h.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/spellchecker/editor_plugin_src.js b/webcit/tiny_mce/plugins/spellchecker/editor_plugin_src.js index c913c4603..d8680baf2 100644 --- a/webcit/tiny_mce/plugins/spellchecker/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/spellchecker/editor_plugin_src.js @@ -1,8 +1,11 @@ /** - * $Id: editor_plugin_src.js 425 2007-11-21 15:17:39Z spocke $ + * editor_plugin_src.js * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -24,9 +27,30 @@ t.url = url; t.editor = ed; + t.rpcUrl = ed.getParam("spellchecker_rpc_url", "{backend}"); + + if (t.rpcUrl == '{backend}') { + // Sniff if the browser supports native spellchecking (Don't know of a better way) + if (tinymce.isIE) + return; + + t.hasSupport = true; + + // Disable the context menu when spellchecking is active + ed.onContextMenu.addToTop(function(ed, e) { + if (t.active) + return false; + }); + } // Register commands ed.addCommand('mceSpellCheck', function() { + if (t.rpcUrl == '{backend}') { + // Enable/disable native spellchecker + t.editor.getBody().spellcheck = t.active = !t.active; + return; + } + if (!t.active) { ed.setProgressState(1); t._sendRPC('checkWords', [t.selectedLang, t._getWords()], function(r) { @@ -37,7 +61,9 @@ ed.nodeChanged(); } else { ed.setProgressState(0); - ed.windowManager.alert('spellchecker.no_mpell'); + + if (ed.getParam('spellchecker_report_no_misspellings', true)) + ed.windowManager.alert('spellchecker.no_mpell'); } }); } else @@ -89,6 +115,15 @@ var t = this, c, ed = t.editor; if (n == 'spellchecker') { + // Use basic button if we use the native spellchecker + if (t.rpcUrl == '{backend}') { + // Create simple toggle button if we have native support + if (t.hasSupport) + c = cm.createButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t}); + + return c; + } + c = cm.createSplitButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t}); c.onRenderMenu.add(function(c, m) { @@ -141,7 +176,7 @@ }, _getWords : function() { - var ed = this.editor, wl = [], tx = '', lo = {}; + var ed = this.editor, wl = [], tx = '', lo = {}, rawWords = []; // Get area text this._walk(ed.getBody(), function(n) { @@ -149,12 +184,19 @@ tx += n.nodeValue + ' '; }); - // Split words by separator - tx = tx.replace(new RegExp('([0-9]|[' + this._getSeparators() + '])', 'g'), ' '); - tx = tinymce.trim(tx.replace(/(\s+)/g, ' ')); + // split the text up into individual words + if (ed.getParam('spellchecker_word_pattern')) { + // look for words that match the pattern + rawWords = tx.match('(' + ed.getParam('spellchecker_word_pattern') + ')', 'gi'); + } else { + // Split words by separator + tx = tx.replace(new RegExp('([0-9]|[' + this._getSeparators() + '])', 'g'), ' '); + tx = tinymce.trim(tx.replace(/(\s+)/g, ' ')); + rawWords = tx.split(' '); + } // Build word array and remove duplicates - each(tx.split(' '), function(v) { + each(rawWords, function(v) { if (!lo[v]) { wl.push(v); lo[v] = 1; @@ -219,7 +261,9 @@ }, _showMenu : function(ed, e) { - var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin()); + var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin()), wordSpan = e.target; + + e = 0; // Fixes IE memory leak if (!m) { p1 = DOM.getPos(ed.getContentAreaContainer()); @@ -234,18 +278,20 @@ t._menu = m; } - if (dom.hasClass(e.target, 'mceItemHiddenSpellWord')) { + if (dom.hasClass(wordSpan, 'mceItemHiddenSpellWord')) { m.removeAll(); m.add({title : 'spellchecker.wait', 'class' : 'mceMenuItemTitle'}).setDisabled(1); - t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(e.target.innerHTML)], function(r) { + t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(wordSpan.innerHTML)], function(r) { + var ignoreRpc; + m.removeAll(); if (r.length > 0) { m.add({title : 'spellchecker.sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1); each(r, function(v) { m.add({title : v, onclick : function() { - dom.replace(ed.getDoc().createTextNode(v), e.target); + dom.replace(ed.getDoc().createTextNode(v), wordSpan); t._checkDone(); }}); }); @@ -254,28 +300,67 @@ } else m.add({title : 'spellchecker.no_sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + ignoreRpc = t.editor.getParam("spellchecker_enable_ignore_rpc", ''); m.add({ title : 'spellchecker.ignore_word', onclick : function() { - dom.remove(e.target, 1); + var word = wordSpan.innerHTML; + + dom.remove(wordSpan, 1); t._checkDone(); + + // tell the server if we need to + if (ignoreRpc) { + ed.setProgressState(1); + t._sendRPC('ignoreWord', [t.selectedLang, word], function(r) { + ed.setProgressState(0); + }); + } } }); m.add({ title : 'spellchecker.ignore_words', onclick : function() { - t._removeWords(dom.decode(e.target.innerHTML)); + var word = wordSpan.innerHTML; + + t._removeWords(dom.decode(word)); t._checkDone(); + + // tell the server if we need to + if (ignoreRpc) { + ed.setProgressState(1); + t._sendRPC('ignoreWords', [t.selectedLang, word], function(r) { + ed.setProgressState(0); + }); + } } }); + + if (t.editor.getParam("spellchecker_enable_learn_rpc")) { + m.add({ + title : 'spellchecker.learn_word', + onclick : function() { + var word = wordSpan.innerHTML; + + dom.remove(wordSpan, 1); + t._checkDone(); + + ed.setProgressState(1); + t._sendRPC('learnWord', [t.selectedLang, word], function(r) { + ed.setProgressState(0); + }); + } + }); + } + m.update(); }); - ed.selection.select(e.target); - p1 = dom.getPos(e.target); - m.showMenu(p1.x, p1.y + e.target.offsetHeight - vp.y); + ed.selection.select(wordSpan); + p1 = dom.getPos(wordSpan); + m.showMenu(p1.x, p1.y + wordSpan.offsetHeight - vp.y); return tinymce.dom.Event.cancel(e); } else @@ -312,16 +397,10 @@ }, _sendRPC : function(m, p, cb) { - var t = this, url = t.editor.getParam("spellchecker_rpc_url", "{backend}"); - - if (url == '{backend}') { - t.editor.setProgressState(0); - alert('Please specify: spellchecker_rpc_url'); - return; - } + var t = this; JSONRequest.sendRPC({ - url : url, + url : t.rpcUrl, method : m, params : p, success : cb, @@ -335,4 +414,4 @@ // Register plugin tinymce.PluginManager.add('spellchecker', tinymce.plugins.SpellcheckerPlugin); -})(); \ No newline at end of file +})(); diff --git a/webcit/tiny_mce/plugins/style/editor_plugin.js b/webcit/tiny_mce/plugins/style/editor_plugin.js index 6ebaa91ca..cab2153c4 100644 --- a/webcit/tiny_mce/plugins/style/editor_plugin.js +++ b/webcit/tiny_mce/plugins/style/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.StylePlugin',{init:function(ed,url){ed.addCommand('mceStyleProps',function(){ed.windowManager.open({file:url+'/props.htm',width:480+parseInt(ed.getLang('style.delta_width',0)),height:320+parseInt(ed.getLang('style.delta_height',0)),inline:1},{plugin_url:url,style_text:ed.selection.getNode().style.cssText});});ed.addCommand('mceSetElementStyle',function(ui,v){if(e=ed.selection.getNode()){ed.dom.setAttrib(e,'style',v);ed.execCommand('mceRepaint');}});ed.onNodeChange.add(function(ed,cm,n){cm.setDisabled('styleprops',n.nodeName==='BODY');});ed.addButton('styleprops',{title:'style.desc',cmd:'mceStyleProps'});},getInfo:function(){return{longname:'Style',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('style',tinymce.plugins.StylePlugin);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.StylePlugin",{init:function(a,b){a.addCommand("mceStyleProps",function(){a.windowManager.open({file:b+"/props.htm",width:480+parseInt(a.getLang("style.delta_width",0)),height:320+parseInt(a.getLang("style.delta_height",0)),inline:1},{plugin_url:b,style_text:a.selection.getNode().style.cssText})});a.addCommand("mceSetElementStyle",function(d,c){if(e=a.selection.getNode()){a.dom.setAttrib(e,"style",c);a.execCommand("mceRepaint")}});a.onNodeChange.add(function(d,c,f){c.setDisabled("styleprops",f.nodeName==="BODY")});a.addButton("styleprops",{title:"style.desc",cmd:"mceStyleProps"})},getInfo:function(){return{longname:"Style",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("style",tinymce.plugins.StylePlugin)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/style/editor_plugin_src.js b/webcit/tiny_mce/plugins/style/editor_plugin_src.js index 6c817ce48..5f7755f18 100644 --- a/webcit/tiny_mce/plugins/style/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/style/editor_plugin_src.js @@ -1,8 +1,11 @@ /** - * $Id: editor_plugin_src.js 787 2008-04-10 11:40:57Z spocke $ + * editor_plugin_src.js * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { diff --git a/webcit/tiny_mce/plugins/style/js/props.js b/webcit/tiny_mce/plugins/style/js/props.js index cafd6b1cf..a8dd93dec 100644 --- a/webcit/tiny_mce/plugins/style/js/props.js +++ b/webcit/tiny_mce/plugins/style/js/props.js @@ -10,9 +10,9 @@ var defaultFonts = "" + "Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif"; var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger"; -var defaultMeasurement = "+pixels=px;points=pt;em;in;cm;mm;picas;ems;exs;%"; -var defaultSpacingMeasurement = "pixels=px;points=pt;in;cm;mm;picas;+ems;exs;%"; -var defaultIndentMeasurement = "pixels=px;+points=pt;in;cm;mm;picas;ems;exs;%"; +var defaultMeasurement = "+pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%"; +var defaultSpacingMeasurement = "pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;+ems=em;exs=ex;%"; +var defaultIndentMeasurement = "pixels=px;+points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%"; var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900"; var defaultTextStyle = "normal;italic;oblique"; var defaultVariant = "normal;small-caps"; @@ -247,12 +247,12 @@ function setupFormData() { } function getMeasurement(s) { - return s.replace(/^([0-9]+)(.*)$/, "$2"); + return s.replace(/^([0-9.]+)(.*)$/, "$2"); } function getNum(s) { - if (new RegExp('^[0-9]+[a-z%]+$', 'gi').test(s)) - return s.replace(/[^0-9]/g, ''); + if (new RegExp('^(?:[0-9.]+)(?:[a-z%]+)$', 'gi').test(s)) + return s.replace(/[^0-9.]/g, ''); return s; } @@ -478,7 +478,7 @@ function generateCSS() { ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : ""); ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : ""); } else - ce.style.borderWidth = f.border_width_top.value; + ce.style.borderWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : ""); if (!f.border_color_same.checked) { ce.style.borderTopColor = f.border_color_top.value; diff --git a/webcit/tiny_mce/plugins/style/langs/et_dlg.js b/webcit/tiny_mce/plugins/style/langs/et_dlg.js new file mode 100644 index 000000000..65b514549 --- /dev/null +++ b/webcit/tiny_mce/plugins/style/langs/et_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('et.style_dlg',{ +title:"Muuda CSS stiili", +apply:"Rakenda", +text_tab:"Tekst", +background_tab:"Taust", +block_tab:"Plokk", +box_tab:"Kast", +border_tab:"Raam", +list_tab:"Nimekiri", +positioning_tab:"Positsioneerimine", +text_props:"Tekst", +text_font:"Font", +text_size:"Suurus", +text_weight:"Raskus", +text_style:"Stiil", +text_variant:"Variant", +text_lineheight:"Joone k\u00F5rgus", +text_case:"Kast", +text_color:"V\u00E4rv", +text_decoration:"Dekoratioon", +text_overline:"\u00FClejoon", +text_underline:"alajoon", +text_striketrough:"l\u00E4bikriipsutus", +text_blink:"vilgutus", +text_none:"mitte \u00FCkski", +background_color:"Tausta v\u00E4rv", +background_image:"Tausta pilt", +background_repeat:"Kordus", +background_attachment:"Manus", +background_hpos:"Horisontaalne asend", +background_vpos:"Vertikaalne asend", +block_wordspacing:"S\u00F5nade avardamine", +block_letterspacing:"T\u00E4he avardamine", +block_vertical_alignment:"Vertikaalne joondus", +block_text_align:"Teksti joondus", +block_text_indent:"Teksti taandus", +block_whitespace:"T\u00FChimik", +block_display:"Kuva", +box_width:"Laius", +box_height:"K\u00F5rgus", +box_float:"H\u00F5ljuv", +box_clear:"Puhas", +padding:"T\u00E4idis", +same:"Sama k\u00F5igile", +top:"\u00DCleval", +right:"Paremal", +bottom:"All", +left:"Vasakul", +margin:"Serv", +style:"Stiil", +width:"Laius", +height:"K\u00F5rgus", +color:"V\u00E4rv", +list_type:"T\u00FC\u00FCp", +bullet_image:"Punkt pilt", +position:"Positsioon", +positioning_type:"T\u00FC\u00FCp", +visibility:"N\u00E4htavus", +zindex:"Z-viit", +overflow:"\u00DClevool", +placement:"Asetus", +clip:"Klipp" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/style/langs/fr_dlg.js b/webcit/tiny_mce/plugins/style/langs/fr_dlg.js new file mode 100644 index 000000000..28897f866 --- /dev/null +++ b/webcit/tiny_mce/plugins/style/langs/fr_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('fr.style_dlg',{ +title:"\u00C9diter la feuille de style", +apply:"Appliquer", +text_tab:"Texte", +background_tab:"Fond", +block_tab:"Bloc", +box_tab:"Bo\u00EEte", +border_tab:"Bordure", +list_tab:"Liste", +positioning_tab:"Positionnement", +text_props:"Texte", +text_font:"Police", +text_size:"Taille", +text_weight:"Gras", +text_style:"Style", +text_variant:"Variante", +text_lineheight:"Hauteur de ligne", +text_case:"Casse", +text_color:"Couleur", +text_decoration:"D\u00E9coration", +text_overline:"ligne au-dessus", +text_underline:"soulign\u00E9", +text_striketrough:"barr\u00E9", +text_blink:"clignotant", +text_none:"aucun", +background_color:"Couleur de fond", +background_image:"Image de fond", +background_repeat:"R\u00E9p\u00E9ter", +background_attachment:"Attachement", +background_hpos:"Position horizontale", +background_vpos:"Position verticale", +block_wordspacing:"Espacement des mots ", +block_letterspacing:"Espacement des lettres", +block_vertical_alignment:"Alignement vertical", +block_text_align:"Alignement du texte", +block_text_indent:"Indentation du texte", +block_whitespace:"Fin de ligne", +block_display:"Affichage", +box_width:"Largeur", +box_height:"Hauteur", +box_float:"Flottant", +box_clear:"Vider", +padding:"Espacement", +same:"Identique pour tous", +top:"Haut", +right:"Droit", +bottom:"Bas", +left:"Gauche", +margin:"Marge", +style:"Style", +width:"Largeur", +height:"Hauteur", +color:"Couleur", +list_type:"Type", +bullet_image:"Image de puce", +position:"Position", +positioning_type:"Type", +visibility:"Visibilit\u00E9", +zindex:"Z-index", +overflow:"D\u00E9bordement", +placement:"Placement", +clip:"Clip" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/style/langs/hu_dlg.js b/webcit/tiny_mce/plugins/style/langs/hu_dlg.js new file mode 100644 index 000000000..580d0e8c7 --- /dev/null +++ b/webcit/tiny_mce/plugins/style/langs/hu_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('hu.style_dlg',{ +title:"CSS st\u00EDlus szerkest\u00E9se", +apply:"Alkalmaz", +text_tab:"Sz\u00F6veg", +background_tab:"H\u00E1tt\u00E9r", +block_tab:"Blokk", +box_tab:"Doboz", +border_tab:"Keret", +list_tab:"Lista", +positioning_tab:"Poz\u00EDci\u00F3", +text_props:"Sz\u00F6veg", +text_font:"Bet\u0171t\u00EDpus", +text_size:"M\u00E9ret", +text_weight:"Sz\u00E9less\u00E9g", +text_style:"St\u00EDlus", +text_variant:"V\u00E1ltozat", +text_lineheight:"Sormagass\u00E1g", +text_case:"eset", +text_color:"sz\u00EDn", +text_decoration:"dekor\u00E1ci\u00F3", +text_overline:"fel\u00FClh\u00FAz\u00E1s", +text_underline:"alulh\u00FAz\u00E1s", +text_striketrough:"\u00E1th\u00FAz\u00E1s", +text_blink:"villog\u00E1s", +text_none:"egyik sem", +background_color:"H\u00E1tt\u00E9rsz\u00EDn", +background_image:"H\u00E1tt\u00E9rk\u00E9p", +background_repeat:"Ism\u00E9tl\u00E9s", +background_attachment:"Csatolm\u00E1ny", +background_hpos:"V\u00EDzszintes hely", +background_vpos:"F\u00FCgg\u0151leges hely", +block_wordspacing:"Sz\u00F3t\u00E1vols\u00E1g", +block_letterspacing:"Bet\u0171t\u00E1vols\u00E1g", +block_vertical_alignment:"F\u00FCgg\u0151leges igaz\u00EDt\u00E1s", +block_text_align:"Sz\u00F6veg igaz\u00EDt\u00E1sa", +block_text_indent:"Sz\u00F6veg beh\u00FAz\u00E1sa", +block_whitespace:"\u00DCres helyek", +block_display:"Megjelen\u00EDt\u00E9s", +box_width:"Sz\u00E9less\u00E9g", +box_height:"Magass\u00E1g", +box_float:"Lebeg\u00E9s (float)", +box_clear:"Lebeg\u00E9s (float) t\u00F6rl\u00E9se", +padding:"Bels\u0151 marg\u00F3", +same:"Mindenhol ugyanaz", +top:"Fel\u00FCl", +right:"Jobbra", +bottom:"Lent", +left:"Balra", +margin:"Marg\u00F3", +style:"St\u00EDlus", +width:"Sz\u00E9less\u00E9g", +height:"Magass\u00E1g", +color:"Sz\u00EDn", +list_type:"T\u00EDpus", +bullet_image:"Elemk\u00E9p", +position:"Poz\u00EDci\u00F3", +positioning_type:"T\u00EDpus", +visibility:"L\u00E1that\u00F3s\u00E1g", +zindex:"Z-index", +overflow:"Kifut\u00E1s", +placement:"Elhelyez\u00E9s", +clip:"Lev\u00E1g\u00E1s" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/style/langs/it_dlg.js b/webcit/tiny_mce/plugins/style/langs/it_dlg.js index ad983ed85..ab30a1997 100644 --- a/webcit/tiny_mce/plugins/style/langs/it_dlg.js +++ b/webcit/tiny_mce/plugins/style/langs/it_dlg.js @@ -38,8 +38,8 @@ block_whitespace:"Whitespace", block_display:"Visualizzazione", box_width:"Larghezza", box_height:"Altezza", -box_float:"Float", -box_clear:"Clear", +box_float:"Fluttuante", +box_clear:"Pulito", padding:"Spazio dal bordo", same:"Uguale per tutti", top:"Superiore", @@ -52,7 +52,7 @@ width:"Larghezza", height:"Altezza", color:"Colore", list_type:"Tipo", -bullet_image:"Immagine bullet", +bullet_image:"Immagine Punto", position:"Posizione", positioning_type:"Tipo", visibility:"Visibilit\u00E0", diff --git a/webcit/tiny_mce/plugins/style/langs/pt_dlg.js b/webcit/tiny_mce/plugins/style/langs/pt_dlg.js index 945276af4..fbc5dcc36 100644 --- a/webcit/tiny_mce/plugins/style/langs/pt_dlg.js +++ b/webcit/tiny_mce/plugins/style/langs/pt_dlg.js @@ -15,9 +15,9 @@ text_weight:"Peso", text_style:"Estilo", text_variant:"Variante", text_lineheight:"Altura da linha", -text_case:"Mai\u00C3\u00BAscula/min\u00C3\u00BAscula", +text_case:"Mai\u00FAscula", text_color:"Cor", -text_decoration:"Decora\u00C3\u00A7\u00C3\u00A3o", +text_decoration:"Decora\u00E7\u00E3o", text_overline:"Sobrelinha", text_underline:"Sublinhado", text_striketrough:"Riscado", @@ -27,14 +27,14 @@ background_color:"Cor de fundo", background_image:"Imagem de fundo", background_repeat:"Repetir", background_attachment:"Fixar", -background_hpos:"Posi\u00C3\u00A7\u00C3\u00A3o horizontal", -background_vpos:"Posi\u00C3\u00A7\u00C3\u00A3o vertical", -block_wordspacing:"Espa\u00C3\u00A7amento de palavras", -block_letterspacing:"Espa\u00C3\u00A7amento de letras", +background_hpos:"Posi\u00E7\u00E3o horizontal", +background_vpos:"Posi\u00E7\u00E3o vertical", +block_wordspacing:"Espa\u00E7amento de palavras", +block_letterspacing:"Espa\u00E7amento de letras", block_vertical_alignment:"Alinhamento vertical", block_text_align:"Alinhamento de texto", block_text_indent:"Indent", -block_whitespace:"Espa\u00C3\u00A7o", +block_whitespace:"Espa\u00E7o", block_display:"Display", box_width:"Largura", box_height:"Altura", @@ -53,7 +53,7 @@ height:"Altura", color:"Cor", list_type:"Tipo", bullet_image:"Imagem de lista", -position:"Posi\u00C3\u00A7\u00C3\u00A3o", +position:"Posi\u00E7\u00E3o", positioning_type:"Tipo", visibility:"Visibilidade", zindex:"Z-index", diff --git a/webcit/tiny_mce/plugins/style/langs/ru_dlg.js b/webcit/tiny_mce/plugins/style/langs/ru_dlg.js new file mode 100644 index 000000000..ce0c15b6b --- /dev/null +++ b/webcit/tiny_mce/plugins/style/langs/ru_dlg.js @@ -0,0 +1,63 @@ +tinyMCE.addI18n('ru.style_dlg',{ +title:"\u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440 CSS \u0441\u0442\u0438\u043B\u044F", +apply:"\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C", +text_tab:"\u0422\u0435\u043A\u0441\u0442", +background_tab:"\u0424\u043E\u043D", +block_tab:"\u0411\u043B\u043E\u043A", +box_tab:"\u041A\u0440\u0430\u044F", +border_tab:"\u0413\u0440\u0430\u043D\u0438\u0446\u0430", +list_tab:"\u0421\u043F\u0438\u0441\u043E\u043A", +positioning_tab:"\u041F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435", +text_props:"\u0422\u0435\u043A\u0441\u0442", +text_font:"\u0428\u0440\u0438\u0444\u0442", +text_size:"\u0420\u0430\u0437\u043C\u0435\u0440", +text_weight:"\u0422\u043E\u043B\u0449\u0438\u043D\u0430", +text_style:"\u0421\u0442\u0438\u043B\u044C", +text_variant:"\u0412\u0430\u0440\u0438\u0430\u043D\u0442", +text_lineheight:"\u0412\u044B\u0441\u043E\u0442\u0430 \u0441\u0442\u0440\u043E\u043A\u0438", +text_case:"\u0420\u0435\u0433\u0438\u0441\u0442\u0440", +text_color:"\u0426\u0432\u0435\u0442", +text_decoration:"\u041E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435", +text_overline:"\u0421 \u0432\u0435\u0440\u0445\u043D\u0435\u0439 \u0447\u0435\u0440\u0442\u043E\u0439", +text_underline:"\u041F\u043E\u0434\u0447\u0435\u0440\u043A\u043D\u0443\u0442\u044B\u0439", +text_striketrough:"\u0417\u0430\u0447\u0435\u0440\u043A\u043D\u0443\u0442\u044B\u0439", +text_blink:"\u041C\u0435\u0440\u0446\u0430\u044E\u0449\u0438\u0439", +text_none:"\u0411\u0435\u0437 \u0432\u0441\u0435\u0433\u043E", +background_color:"\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430", +background_image:"\u0424\u043E\u043D\u043E\u0432\u043E\u0435 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435", +background_repeat:"\u041F\u043E\u0432\u0442\u043E\u0440", +background_attachment:"\u041F\u0440\u0438\u0432\u044F\u0437\u043A\u0430", +background_hpos:"\u0413\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u0430\u044F \u043F\u043E\u0437\u0438\u0446\u0438\u044F", +background_vpos:"\u0412\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u0430\u044F \u043F\u043E\u0437\u0438\u0446\u0438\u044F", +block_wordspacing:"\u041E\u0442\u0441\u0442\u0443\u043F\u044B \u043C\u0435\u0436\u0434\u0443 \u0441\u043B\u043E\u0432\u0430\u043C\u0438", +block_letterspacing:"\u041E\u0442\u0441\u0442\u0443\u043F\u044B \u043C\u0435\u0436\u0434\u0443 \u0431\u0443\u043A\u0432\u0430\u043C\u0438", +block_vertical_alignment:"\u0412\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u043E\u0435 \u0432\u044B\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u043D\u0438\u0435", +block_text_align:"\u0412\u044B\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u043D\u0438\u0435 \u0442\u0435\u043A\u0441\u0442\u0430", +block_text_indent:"\u041E\u0442\u0441\u0442\u0443\u043F \u0442\u0435\u043A\u0441\u0442\u0430", +block_whitespace:"\u041F\u0440\u043E\u0431\u0435\u043B", +block_display:"\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435", +box_width:"\u0428\u0438\u0440\u0438\u043D\u0430", +box_height:"\u0412\u044B\u0441\u043E\u0442\u0430", +box_float:"\u041F\u043B\u0430\u0432\u0430\u044E\u0449\u0438\u0439", +box_clear:"\u042F\u0432\u043D\u044B\u0439", +padding:"\u041F\u043E\u043B\u044F", +same:"\u041E\u0434\u0438\u043D\u0430\u043A\u043E\u0432\u043E \u0434\u043B\u044F \u0432\u0441\u0435\u0445", +top:"\u0412\u0432\u0435\u0440\u0445", +right:"\u0421\u043F\u0440\u0430\u0432\u0430", +bottom:"\u0421\u043D\u0438\u0437\u0443", +left:"\u0421\u043B\u0435\u0432\u0430", +margin:"\u041E\u0442\u0441\u0442\u0443\u043F\u044B", +style:"\u0421\u0442\u0438\u043B\u044C", +width:"\u0428\u0438\u0440\u0438\u043D\u0430", +height:"\u0412\u044B\u0441\u043E\u0442\u0430", +color:"\u0426\u0432\u0435\u0442", +list_type:"\u0422\u0438\u043F", +bullet_image:"\u041C\u0430\u0440\u043A\u0435\u0440", +position:"\u041F\u043E\u0437\u0438\u0446\u0438\u044F", +positioning_type:"\u0422\u0438\u043F", +visibility:"\u0412\u0438\u0434\u0438\u043C\u043E\u0441\u0442\u044C", +zindex:"Z-\u0438\u043D\u0434\u0435\u043A\u0441", +overflow:"\u041F\u0435\u0440\u0435\u043F\u043E\u043B\u043D\u0435\u043D\u0435", +placement:"\u0420\u0430\u0437\u043C\u0435\u0449\u0435\u043D\u0438\u0435", +clip:"\u041E\u0442\u0441\u0435\u0447\u0435\u043D\u0438\u0435" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/style/props.htm b/webcit/tiny_mce/plugins/style/props.htm index 54538e357..549ed0408 100644 --- a/webcit/tiny_mce/plugins/style/props.htm +++ b/webcit/tiny_mce/plugins/style/props.htm @@ -8,7 +8,6 @@ - @@ -41,7 +40,7 @@
- +
   @@ -84,19 +83,19 @@ - + - - + - - + @@ -109,27 +108,27 @@
  
  +   x px
  +   / (c /c = center)
- + - + - + - + - + - + - + - +
@@ -326,13 +325,8 @@
-
- -
- -
- -
+ +
diff --git a/webcit/tiny_mce/plugins/advlist/editor_plugin.js b/webcit/tiny_mce/plugins/advlist/editor_plugin.js new file mode 100644 index 000000000..02d16971a --- /dev/null +++ b/webcit/tiny_mce/plugins/advlist/editor_plugin.js @@ -0,0 +1 @@ +(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.AdvListPlugin",{init:function(b,c){var d=this;d.editor=b;function e(g){var f=[];a(g.split(/,/),function(h){f.push({title:"advlist."+(h=="default"?"def":h.replace(/-/g,"_")),styles:{listStyleType:h=="default"?"":h}})});return f}d.numlist=b.getParam("advlist_number_styles")||e("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");d.bullist=b.getParam("advlist_bullet_styles")||e("default,circle,disc,square")},createControl:function(d,b){var f=this,e,h;if(d=="numlist"||d=="bullist"){if(f[d][0].title=="advlist.def"){h=f[d][0]}function c(i,k){var j=true;a(k.styles,function(m,l){if(f.editor.dom.getStyle(i,l)!=m){j=false;return false}});return j}function g(){var k,i=f.editor,l=i.dom,j=i.selection;k=l.getParent(j.getNode(),"ol,ul");if(!k||k.nodeName==(d=="bullist"?"OL":"UL")||c(k,h)){i.execCommand(d=="bullist"?"InsertUnorderedList":"InsertOrderedList")}if(h){k=l.getParent(j.getNode(),"ol,ul");if(k){l.setStyles(k,h.styles);k.removeAttribute("_mce_style")}}}e=b.createSplitButton(d,{title:"advanced."+d+"_desc","class":"mce_"+d,onclick:function(){g()}});e.onRenderMenu.add(function(i,j){j.onShowMenu.add(function(){var m=f.editor.dom,l=m.getParent(f.editor.selection.getNode(),"ol,ul"),k;if(l||h){k=f[d];a(j.items,function(n){var o=true;n.setSelected(0);if(l&&!n.isDisabled()){a(k,function(p){if(p.id==n.id){if(!c(l,p)){o=false;return false}}});if(o){n.setSelected(1)}}});if(!l){j.items[h.id].setSelected(1)}}});j.add({id:f.editor.dom.uniqueId(),title:"advlist.types","class":"mceMenuItemTitle"}).setDisabled(1);a(f[d],function(k){k.id=f.editor.dom.uniqueId();j.add({id:k.id,title:k.title,onclick:function(){h=k;g()}})})});return e}},getInfo:function(){return{longname:"Advanced lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlist",tinymce.plugins.AdvListPlugin)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/advlist/editor_plugin_src.js b/webcit/tiny_mce/plugins/advlist/editor_plugin_src.js new file mode 100644 index 000000000..a61887a92 --- /dev/null +++ b/webcit/tiny_mce/plugins/advlist/editor_plugin_src.js @@ -0,0 +1,154 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + var each = tinymce.each; + + tinymce.create('tinymce.plugins.AdvListPlugin', { + init : function(ed, url) { + var t = this; + + t.editor = ed; + + function buildFormats(str) { + var formats = []; + + each(str.split(/,/), function(type) { + formats.push({ + title : 'advlist.' + (type == 'default' ? 'def' : type.replace(/-/g, '_')), + styles : { + listStyleType : type == 'default' ? '' : type + } + }); + }); + + return formats; + }; + + // Setup number formats from config or default + t.numlist = ed.getParam("advlist_number_styles") || buildFormats("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman"); + t.bullist = ed.getParam("advlist_bullet_styles") || buildFormats("default,circle,disc,square"); + }, + + createControl: function(name, cm) { + var t = this, btn, format; + + if (name == 'numlist' || name == 'bullist') { + // Default to first item if it's a default item + if (t[name][0].title == 'advlist.def') + format = t[name][0]; + + function hasFormat(node, format) { + var state = true; + + each(format.styles, function(value, name) { + // Format doesn't match + if (t.editor.dom.getStyle(node, name) != value) { + state = false; + return false; + } + }); + + return state; + }; + + function applyListFormat() { + var list, ed = t.editor, dom = ed.dom, sel = ed.selection; + + // Check for existing list element + list = dom.getParent(sel.getNode(), 'ol,ul'); + + // Switch/add list type if needed + if (!list || list.nodeName == (name == 'bullist' ? 'OL' : 'UL') || hasFormat(list, format)) + ed.execCommand(name == 'bullist' ? 'InsertUnorderedList' : 'InsertOrderedList'); + + // Append styles to new list element + if (format) { + list = dom.getParent(sel.getNode(), 'ol,ul'); + + if (list) { + dom.setStyles(list, format.styles); + list.removeAttribute('_mce_style'); + } + } + }; + + btn = cm.createSplitButton(name, { + title : 'advanced.' + name + '_desc', + 'class' : 'mce_' + name, + onclick : function() { + applyListFormat(); + } + }); + + btn.onRenderMenu.add(function(btn, menu) { + menu.onShowMenu.add(function() { + var dom = t.editor.dom, list = dom.getParent(t.editor.selection.getNode(), 'ol,ul'), fmtList; + + if (list || format) { + fmtList = t[name]; + + // Unselect existing items + each(menu.items, function(item) { + var state = true; + + item.setSelected(0); + + if (list && !item.isDisabled()) { + each(fmtList, function(fmt) { + if (fmt.id == item.id) { + if (!hasFormat(list, fmt)) { + state = false; + return false; + } + } + }); + + if (state) + item.setSelected(1); + } + }); + + // Select the current format + if (!list) + menu.items[format.id].setSelected(1); + } + }); + + menu.add({id : t.editor.dom.uniqueId(), title : 'advlist.types', 'class' : 'mceMenuItemTitle'}).setDisabled(1); + + each(t[name], function(item) { + item.id = t.editor.dom.uniqueId(); + + menu.add({id : item.id, title : item.title, onclick : function() { + format = item; + applyListFormat(); + }}); + }); + }); + + return btn; + } + }, + + getInfo : function() { + return { + longname : 'Advanced lists', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('advlist', tinymce.plugins.AdvListPlugin); +})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/autoresize/editor_plugin.js b/webcit/tiny_mce/plugins/autoresize/editor_plugin.js new file mode 100644 index 000000000..1676b154a --- /dev/null +++ b/webcit/tiny_mce/plugins/autoresize/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.AutoResizePlugin",{init:function(a,c){var d=this;if(a.getParam("fullscreen_is_enabled")){return}function b(){var h=a.getDoc(),e=h.body,j=h.documentElement,g=tinymce.DOM,i=d.autoresize_min_height,f;f=tinymce.isIE?e.scrollHeight:j.offsetHeight;if(f>d.autoresize_min_height){i=f}g.setStyle(g.get(a.id+"_ifr"),"height",i+"px");if(d.throbbing){a.setProgressState(false);a.setProgressState(true)}}d.editor=a;d.autoresize_min_height=a.getElement().offsetHeight;a.onChange.add(b);a.onSetContent.add(b);a.onPaste.add(b);a.onKeyUp.add(b);a.onPostRender.add(b);if(a.getParam("autoresize_on_init",true)){a.onInit.add(function(f,e){f.setProgressState(true);d.throbbing=true;f.getBody().style.overflowY="hidden"});a.onLoadContent.add(function(f,e){b();setTimeout(function(){b();f.setProgressState(false);d.throbbing=false},1250)})}a.addCommand("mceAutoResize",b)},getInfo:function(){return{longname:"Auto Resize",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autoresize",tinymce.plugins.AutoResizePlugin)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/autoresize/editor_plugin_src.js b/webcit/tiny_mce/plugins/autoresize/editor_plugin_src.js new file mode 100644 index 000000000..c260b7a24 --- /dev/null +++ b/webcit/tiny_mce/plugins/autoresize/editor_plugin_src.js @@ -0,0 +1,119 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + /** + * Auto Resize + * + * This plugin automatically resizes the content area to fit its content height. + * It will retain a minimum height, which is the height of the content area when + * it's initialized. + */ + tinymce.create('tinymce.plugins.AutoResizePlugin', { + /** + * Initializes the plugin, this will be executed after the plugin has been created. + * This call is done before the editor instance has finished it's initialization so use the onInit event + * of the editor instance to intercept that event. + * + * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. + * @param {string} url Absolute URL to where the plugin is located. + */ + init : function(ed, url) { + var t = this; + + if (ed.getParam('fullscreen_is_enabled')) + return; + + /** + * This method gets executed each time the editor needs to resize. + */ + function resize() { + var d = ed.getDoc(), b = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight; + + // Get height differently depending on the browser used + myHeight = tinymce.isIE ? b.scrollHeight : de.offsetHeight; + + // Don't make it smaller than the minimum height + if (myHeight > t.autoresize_min_height) + resizeHeight = myHeight; + + // Resize content element + DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px'); + + // if we're throbbing, we'll re-throb to match the new size + if (t.throbbing) { + ed.setProgressState(false); + ed.setProgressState(true); + } + }; + + t.editor = ed; + + // Define minimum height + t.autoresize_min_height = ed.getElement().offsetHeight; + + // Add appropriate listeners for resizing content area + ed.onChange.add(resize); + ed.onSetContent.add(resize); + ed.onPaste.add(resize); + ed.onKeyUp.add(resize); + ed.onPostRender.add(resize); + + if (ed.getParam('autoresize_on_init', true)) { + // Things to do when the editor is ready + ed.onInit.add(function(ed, l) { + // Show throbber until content area is resized properly + ed.setProgressState(true); + t.throbbing = true; + + // Hide scrollbars + ed.getBody().style.overflowY = "hidden"; + }); + + ed.onLoadContent.add(function(ed, l) { + resize(); + + // Because the content area resizes when its content CSS loads, + // and we can't easily add a listener to its onload event, + // we'll just trigger a resize after a short loading period + setTimeout(function() { + resize(); + + // Disable throbber + ed.setProgressState(false); + t.throbbing = false; + }, 1250); + }); + } + + // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample'); + ed.addCommand('mceAutoResize', resize); + }, + + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @return {Object} Name/value array containing information about the plugin. + */ + getInfo : function() { + return { + longname : 'Auto Resize', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('autoresize', tinymce.plugins.AutoResizePlugin); +})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/autosave/editor_plugin.js b/webcit/tiny_mce/plugins/autosave/editor_plugin.js index 01a994ee5..6e485400b 100644 --- a/webcit/tiny_mce/plugins/autosave/editor_plugin.js +++ b/webcit/tiny_mce/plugins/autosave/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.AutoSavePlugin',{init:function(ed,url){var t=this;t.editor=ed;window.onbeforeunload=tinymce.plugins.AutoSavePlugin._beforeUnloadHandler;},getInfo:function(){return{longname:'Auto save',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave',version:tinymce.majorVersion+"."+tinymce.minorVersion};},'static':{_beforeUnloadHandler:function(){var msg;tinymce.each(tinyMCE.editors,function(ed){if(ed.getParam("fullscreen_is_enabled"))return;if(ed.isDirty()){msg=ed.getLang("autosave.unload_msg");return false;}});return msg;}}});tinymce.PluginManager.add('autosave',tinymce.plugins.AutoSavePlugin);})(); \ No newline at end of file +(function(e){var c="autosave",g="restoredraft",b=true,f,d,a=e.util.Dispatcher;e.create("tinymce.plugins.AutoSave",{init:function(i,j){var h=this,l=i.settings;h.editor=i;function k(n){var m={s:1000,m:60000};n=/^(\d+)([ms]?)$/.exec(""+n);return(n[2]?m[n[2]]:1)*parseInt(n)}e.each({ask_before_unload:b,interval:"30s",retention:"20m",minlength:50},function(n,m){m=c+"_"+m;if(l[m]===f){l[m]=n}});l.autosave_interval=k(l.autosave_interval);l.autosave_retention=k(l.autosave_retention);i.addButton(g,{title:c+".restore_content",onclick:function(){if(i.getContent({draft:true}).replace(/\s| |<\/?p[^>]*>|]*>/gi,"").length>0){i.windowManager.confirm(c+".warning_message",function(m){if(m){h.restoreDraft()}})}else{h.restoreDraft()}}});i.onNodeChange.add(function(){var m=i.controlManager;if(m.get(g)){m.setDisabled(g,!h.hasDraft())}});i.onInit.add(function(){if(i.controlManager.get(g)){h.setupStorage(i);setInterval(function(){h.storeDraft();i.nodeChanged()},l.autosave_interval)}});h.onStoreDraft=new a(h);h.onRestoreDraft=new a(h);h.onRemoveDraft=new a(h);if(!d){window.onbeforeunload=e.plugins.AutoSave._beforeUnloadHandler;d=b}},getInfo:function(){return{longname:"Auto save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave",version:e.majorVersion+"."+e.minorVersion}},getExpDate:function(){return new Date(new Date().getTime()+this.editor.settings.autosave_retention).toUTCString()},setupStorage:function(i){var h=this,k=c+"_test",j="OK";h.key=c+i.id;e.each([function(){if(localStorage){localStorage.setItem(k,j);if(localStorage.getItem(k)===j){localStorage.removeItem(k);return localStorage}}},function(){if(sessionStorage){sessionStorage.setItem(k,j);if(sessionStorage.getItem(k)===j){sessionStorage.removeItem(k);return sessionStorage}}},function(){if(e.isIE){i.getElement().style.behavior="url('#default#userData')";return{autoExpires:b,setItem:function(l,n){var m=i.getElement();m.setAttribute(l,n);m.expires=h.getExpDate();m.save("TinyMCE")},getItem:function(l){var m=i.getElement();m.load("TinyMCE");return m.getAttribute(l)},removeItem:function(l){i.getElement().removeAttribute(l)}}}},],function(l){try{h.storage=l();if(h.storage){return false}}catch(m){}})},storeDraft:function(){var i=this,l=i.storage,j=i.editor,h,k;if(l){if(!l.getItem(i.key)&&!j.isDirty()){return}k=j.getContent({draft:true});if(k.length>j.settings.autosave_minlength){h=i.getExpDate();if(!i.storage.autoExpires){i.storage.setItem(i.key+"_expires",h)}i.storage.setItem(i.key,k);i.onStoreDraft.dispatch(i,{expires:h,content:k})}}},restoreDraft:function(){var h=this,i=h.storage;if(i){content=i.getItem(h.key);if(content){h.editor.setContent(content);h.onRestoreDraft.dispatch(h,{content:content})}}},hasDraft:function(){var h=this,k=h.storage,i,j;if(k){j=!!k.getItem(h.key);if(j){if(!h.storage.autoExpires){i=new Date(k.getItem(h.key+"_expires"));if(new Date().getTime()]*>|]*>/gi, "").length > 0) { + // Show confirm dialog if the editor isn't empty + ed.windowManager.confirm( + PLUGIN_NAME + ".warning_message", + function(ok) { + if (ok) + self.restoreDraft(); + } + ); + } else + self.restoreDraft(); + } + }); - window.onbeforeunload = tinymce.plugins.AutoSavePlugin._beforeUnloadHandler; + // Enable/disable restoredraft button depending on if there is a draft stored or not + ed.onNodeChange.add(function() { + var controlManager = ed.controlManager; + + if (controlManager.get(RESTORE_DRAFT)) + controlManager.setDisabled(RESTORE_DRAFT, !self.hasDraft()); + }); + + ed.onInit.add(function() { + // Check if the user added the restore button, then setup auto storage logic + if (ed.controlManager.get(RESTORE_DRAFT)) { + // Setup storage engine + self.setupStorage(ed); + + // Auto save contents each interval time + setInterval(function() { + self.storeDraft(); + ed.nodeChanged(); + }, settings.autosave_interval); + } + }); + + /** + * This event gets fired when a draft is stored to local storage. + * + * @event onStoreDraft + * @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event. + * @param {Object} draft Draft object containing the HTML contents of the editor. + */ + self.onStoreDraft = new Dispatcher(self); + + /** + * This event gets fired when a draft is restored from local storage. + * + * @event onStoreDraft + * @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event. + * @param {Object} draft Draft object containing the HTML contents of the editor. + */ + self.onRestoreDraft = new Dispatcher(self); + + /** + * This event gets fired when a draft removed/expired. + * + * @event onRemoveDraft + * @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event. + * @param {Object} draft Draft object containing the HTML contents of the editor. + */ + self.onRemoveDraft = new Dispatcher(self); + + // Add ask before unload dialog only add one unload handler + if (!unloadHandlerAdded) { + window.onbeforeunload = tinymce.plugins.AutoSave._beforeUnloadHandler; + unloadHandlerAdded = TRUE; + } }, + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @method getInfo + * @return {Object} Name/value array containing information about the plugin. + */ getInfo : function() { return { longname : 'Auto save', @@ -22,20 +193,224 @@ }; }, - // Private plugin internal methods + /** + * Returns an expiration date UTC string. + * + * @method getExpDate + * @return {String} Expiration date UTC string. + */ + getExpDate : function() { + return new Date( + new Date().getTime() + this.editor.settings.autosave_retention + ).toUTCString(); + }, + + /** + * This method will setup the storage engine. If the browser has support for it. + * + * @method setupStorage + */ + setupStorage : function(ed) { + var self = this, testKey = PLUGIN_NAME + '_test', testVal = "OK"; + + self.key = PLUGIN_NAME + ed.id; + + // Loop though each storage engine type until we find one that works + tinymce.each([ + function() { + // Try HTML5 Local Storage + if (localStorage) { + localStorage.setItem(testKey, testVal); + + if (localStorage.getItem(testKey) === testVal) { + localStorage.removeItem(testKey); + + return localStorage; + } + } + }, + + function() { + // Try HTML5 Session Storage + if (sessionStorage) { + sessionStorage.setItem(testKey, testVal); + + if (sessionStorage.getItem(testKey) === testVal) { + sessionStorage.removeItem(testKey); + + return sessionStorage; + } + } + }, + + function() { + // Try IE userData + if (tinymce.isIE) { + ed.getElement().style.behavior = "url('#default#userData')"; + + // Fake localStorage on old IE + return { + autoExpires : TRUE, + + setItem : function(key, value) { + var userDataElement = ed.getElement(); + + userDataElement.setAttribute(key, value); + userDataElement.expires = self.getExpDate(); + userDataElement.save("TinyMCE"); + }, + + getItem : function(key) { + var userDataElement = ed.getElement(); + + userDataElement.load("TinyMCE"); - 'static' : { - _beforeUnloadHandler : function() { + return userDataElement.getAttribute(key); + }, + + removeItem : function(key) { + ed.getElement().removeAttribute(key); + } + }; + } + }, + ], function(setup) { + // Try executing each function to find a suitable storage engine + try { + self.storage = setup(); + + if (self.storage) + return false; + } catch (e) { + // Ignore + } + }); + }, + + /** + * This method will store the current contents in the the storage engine. + * + * @method storeDraft + */ + storeDraft : function() { + var self = this, storage = self.storage, editor = self.editor, expires, content; + + // Is the contents dirty + if (storage) { + // If there is no existing key and the contents hasn't been changed since + // it's original value then there is no point in saving a draft + if (!storage.getItem(self.key) && !editor.isDirty()) + return; + + // Store contents if the contents if longer than the minlength of characters + content = editor.getContent({draft: true}); + if (content.length > editor.settings.autosave_minlength) { + expires = self.getExpDate(); + + // Store expiration date if needed IE userData has auto expire built in + if (!self.storage.autoExpires) + self.storage.setItem(self.key + "_expires", expires); + + self.storage.setItem(self.key, content); + self.onStoreDraft.dispatch(self, { + expires : expires, + content : content + }); + } + } + }, + + /** + * This method will restore the contents from the storage engine back to the editor. + * + * @method restoreDraft + */ + restoreDraft : function() { + var self = this, storage = self.storage; + + if (storage) { + content = storage.getItem(self.key); + + if (content) { + self.editor.setContent(content); + self.onRestoreDraft.dispatch(self, { + content : content + }); + } + } + }, + + /** + * This method will return true/false if there is a local storage draft available. + * + * @method hasDraft + * @return {boolean} true/false state if there is a local draft. + */ + hasDraft : function() { + var self = this, storage = self.storage, expDate, exists; + + if (storage) { + // Does the item exist at all + exists = !!storage.getItem(self.key); + if (exists) { + // Storage needs autoexpire + if (!self.storage.autoExpires) { + expDate = new Date(storage.getItem(self.key + "_expires")); + + // Contents hasn't expired + if (new Date().getTime() < expDate.getTime()) + return TRUE; + + // Remove it if it has + self.removeDraft(); + } else + return TRUE; + } + } + + return false; + }, + + /** + * Removes the currently stored draft. + * + * @method removeDraft + */ + removeDraft : function() { + var self = this, storage = self.storage, key = self.key, content; + + if (storage) { + // Get current contents and remove the existing draft + content = storage.getItem(key); + storage.removeItem(key); + storage.removeItem(key + "_expires"); + + // Dispatch remove event if we had any contents + if (content) { + self.onRemoveDraft.dispatch(self, { + content : content + }); + } + } + }, + + "static" : { + // Internal unload handler will be called before the page is unloaded + _beforeUnloadHandler : function(e) { var msg; tinymce.each(tinyMCE.editors, function(ed) { + // Store a draft for each editor instance + if (ed.plugins.autosave) + ed.plugins.autosave.storeDraft(); + + // Never ask in fullscreen mode if (ed.getParam("fullscreen_is_enabled")) return; - if (ed.isDirty()) { + // Setup a return message if the editor is dirty + if (!msg && ed.isDirty() && ed.getParam("autosave_ask_before_unload")) msg = ed.getLang("autosave.unload_msg"); - return false; - } }); return msg; @@ -43,6 +418,5 @@ } }); - // Register plugin - tinymce.PluginManager.add('autosave', tinymce.plugins.AutoSavePlugin); -})(); + tinymce.PluginManager.add('autosave', tinymce.plugins.AutoSave); +})(tinymce); diff --git a/webcit/tiny_mce/plugins/autosave/langs/en.js b/webcit/tiny_mce/plugins/autosave/langs/en.js new file mode 100644 index 000000000..fce6bd3e1 --- /dev/null +++ b/webcit/tiny_mce/plugins/autosave/langs/en.js @@ -0,0 +1,4 @@ +tinyMCE.addI18n('en.autosave',{ +restore_content: "Restore auto-saved content", +warning_message: "If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/bbcode/editor_plugin.js b/webcit/tiny_mce/plugins/bbcode/editor_plugin.js index 88f7ea650..930fdff0a 100644 --- a/webcit/tiny_mce/plugins/bbcode/editor_plugin.js +++ b/webcit/tiny_mce/plugins/bbcode/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.BBCodePlugin',{init:function(ed,url){var t=this,dialect=ed.getParam('bbcode_dialect','punbb').toLowerCase();ed.onBeforeSetContent.add(function(ed,o){o.content=t['_'+dialect+'_bbcode2html'](o.content);});ed.onPostProcess.add(function(ed,o){if(o.set)o.content=t['_'+dialect+'_bbcode2html'](o.content);if(o.get)o.content=t['_'+dialect+'_html2bbcode'](o.content);});},getInfo:function(){return{longname:'BBCode Plugin',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_punbb_html2bbcode:function(s){s=tinymce.trim(s);function rep(re,str){s=s.replace(re,str);};rep(/(.*?)<\/a>/gi,"[url=$1]$2[/url]");rep(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");rep(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");rep(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");rep(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");rep(/(.*?)<\/span>/gi,"[color=$1]$2[/color]");rep(/(.*?)<\/font>/gi,"[color=$1]$2[/color]");rep(/(.*?)<\/span>/gi,"[size=$1]$2[/size]");rep(/(.*?)<\/font>/gi,"$1");rep(//gi,"[img]$1[/img]");rep(/(.*?)<\/span>/gi,"[code]$1[/code]");rep(/(.*?)<\/span>/gi,"[quote]$1[/quote]");rep(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");rep(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");rep(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");rep(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");rep(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");rep(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");rep(/<\/(strong|b)>/gi,"[/b]");rep(/<(strong|b)>/gi,"[b]");rep(/<\/(em|i)>/gi,"[/i]");rep(/<(em|i)>/gi,"[i]");rep(/<\/u>/gi,"[/u]");rep(/(.*?)<\/span>/gi,"[u]$1[/u]");rep(//gi,"[u]");rep(/]*>/gi,"[quote]");rep(/<\/blockquote>/gi,"[/quote]");rep(/
/gi,"\n");rep(//gi,"\n");rep(/
/gi,"\n");rep(/

/gi,"");rep(/<\/p>/gi,"\n");rep(/ /gi," ");rep(/"/gi,"\"");rep(/</gi,"<");rep(/>/gi,">");rep(/&/gi,"&");return s;},_punbb_bbcode2html:function(s){s=tinymce.trim(s);function rep(re,str){s=s.replace(re,str);};rep(/\n/gi,"
");rep(/\[b\]/gi,"");rep(/\[\/b\]/gi,"");rep(/\[i\]/gi,"");rep(/\[\/i\]/gi,"");rep(/\[u\]/gi,"");rep(/\[\/u\]/gi,"");rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"$2");rep(/\[url\](.*?)\[\/url\]/gi,"$1");rep(/\[img\](.*?)\[\/img\]/gi,"");rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"$2");rep(/\[code\](.*?)\[\/code\]/gi,"$1 ");rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"$1 ");return s;}});tinymce.PluginManager.add('bbcode',tinymce.plugins.BBCodePlugin);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a,b){var d=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.onBeforeSetContent.add(function(e,f){f.content=d["_"+c+"_bbcode2html"](f.content)});a.onPostProcess.add(function(e,f){if(f.set){f.content=d["_"+c+"_bbcode2html"](f.content)}if(f.get){f.content=d["_"+c+"_html2bbcode"](f.content)}})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_punbb_html2bbcode:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/(.*?)<\/a>/gi,"[url=$1]$2[/url]");b(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/(.*?)<\/span>/gi,"[color=$1]$2[/color]");b(/(.*?)<\/font>/gi,"[color=$1]$2[/color]");b(/(.*?)<\/span>/gi,"[size=$1]$2[/size]");b(/(.*?)<\/font>/gi,"$1");b(//gi,"[img]$1[/img]");b(/(.*?)<\/span>/gi,"[code]$1[/code]");b(/(.*?)<\/span>/gi,"[quote]$1[/quote]");b(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");b(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");b(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");b(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");b(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");b(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");b(/<\/(strong|b)>/gi,"[/b]");b(/<(strong|b)>/gi,"[b]");b(/<\/(em|i)>/gi,"[/i]");b(/<(em|i)>/gi,"[i]");b(/<\/u>/gi,"[/u]");b(/(.*?)<\/span>/gi,"[u]$1[/u]");b(//gi,"[u]");b(/]*>/gi,"[quote]");b(/<\/blockquote>/gi,"[/quote]");b(/
/gi,"\n");b(//gi,"\n");b(/
/gi,"\n");b(/

/gi,"");b(/<\/p>/gi,"\n");b(/ /gi," ");b(/"/gi,'"');b(/</gi,"<");b(/>/gi,">");b(/&/gi,"&");return a},_punbb_bbcode2html:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/\n/gi,"
");b(/\[b\]/gi,"");b(/\[\/b\]/gi,"");b(/\[i\]/gi,"");b(/\[\/i\]/gi,"");b(/\[u\]/gi,"");b(/\[\/u\]/gi,"");b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'$2');b(/\[url\](.*?)\[\/url\]/gi,'$1');b(/\[img\](.*?)\[\/img\]/gi,'');b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'$2');b(/\[code\](.*?)\[\/code\]/gi,'$1 ');b(/\[quote.*?\](.*?)\[\/quote\]/gi,'$1 ');return a}});tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/bbcode/editor_plugin_src.js b/webcit/tiny_mce/plugins/bbcode/editor_plugin_src.js index 4ab226376..5586637f3 100644 --- a/webcit/tiny_mce/plugins/bbcode/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/bbcode/editor_plugin_src.js @@ -1,5 +1,11 @@ -/* - * Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -111,4 +117,4 @@ // Register plugin tinymce.PluginManager.add('bbcode', tinymce.plugins.BBCodePlugin); -})(); +})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/compat2x/editor_plugin.js b/webcit/tiny_mce/plugins/compat2x/editor_plugin.js deleted file mode 100644 index 02a1da8b4..000000000 --- a/webcit/tiny_mce/plugins/compat2x/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each,is=tinymce.is;tinymce.create('tinymce.plugins.Compat2x',{getInfo:function(){return{longname:'Compat2x',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/compat2x',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};}});(function(){tinymce.extend(tinyMCE,{addToLang:function(p,l){each(l,function(v,k){tinyMCE.i18n[(tinyMCE.settings.language||'en')+'.'+(p?p+'_':'')+k]=v;});},getInstanceById:function(n){return this.get(n);}});})();(function(){var EditorManager=tinymce.EditorManager;tinyMCE.instances={};tinyMCE.plugins={};tinymce.PluginManager.onAdd.add(function(pm,n,p){tinyMCE.plugins[n]=p;});tinyMCE.majorVersion=tinymce.majorVersion;tinyMCE.minorVersion=tinymce.minorVersion;tinyMCE.releaseDate=tinymce.releaseDate;tinyMCE.baseURL=tinymce.baseURL;tinyMCE.isIE=tinyMCE.isMSIE=tinymce.isIE||tinymce.isOpera;tinyMCE.isMSIE5=tinymce.isIE;tinyMCE.isMSIE5_0=tinymce.isIE;tinyMCE.isMSIE7=tinymce.isIE;tinyMCE.isGecko=tinymce.isGecko;tinyMCE.isSafari=tinymce.isWebKit;tinyMCE.isOpera=tinymce.isOpera;tinyMCE.isMac=false;tinyMCE.isNS7=false;tinyMCE.isNS71=false;tinyMCE.compat=true;TinyMCE_Engine=tinyMCE;tinymce.extend(tinyMCE,{getParam:function(n,dv){return this.activeEditor.getParam(n,dv);},addEvent:function(e,na,f,sc){tinymce.dom.Event.add(e,na,f,sc||this);},getControlHTML:function(n){return EditorManager.activeEditor.controlManager.createControl(n);},loadCSS:function(u){tinymce.DOM.loadCSS(u);},importCSS:function(doc,u){if(doc==document)this.loadCSS(u);else new tinymce.dom.DOMUtils(doc).loadCSS(u);},log:function(){console.debug.apply(console,arguments);},getLang:function(n,dv){var v=EditorManager.activeEditor.getLang(n.replace(/^lang_/g,''),dv);if(/^[0-9\-.]+$/g.test(v))return parseInt(v);return v;},isInstance:function(o){return o!=null&&typeof(o)=="object"&&o.execCommand;},triggerNodeChange:function(){EditorManager.activeEditor.nodeChanged();},regexpReplace:function(in_str,reg_exp,replace_str,opts){var re;if(in_str==null)return in_str;if(typeof(opts)=="undefined")opts='g';re=new RegExp(reg_exp,opts);return in_str.replace(re,replace_str);},trim:function(s){return tinymce.trim(s);},xmlEncode:function(s){return tinymce.DOM.encode(s);},explode:function(s,d){var o=[];tinymce.each(s.split(d),function(v){if(v!='')o.push(v);});return o;},switchClass:function(id,cls){var b;if(/^mceButton/.test(cls)){b=EditorManager.activeEditor.controlManager.get(id);if(!b)return;switch(cls){case"mceButtonNormal":b.setDisabled(false);b.setActive(false);return;case"mceButtonDisabled":b.setDisabled(true);return;case"mceButtonSelected":b.setActive(true);b.setDisabled(false);return;}}},addCSSClass:function(e,n,b){return tinymce.DOM.addClass(e,n,b);},hasCSSClass:function(e,n){return tinymce.DOM.hasClass(e,n);},removeCSSClass:function(e,n){return tinymce.DOM.removeClass(e,n);},getCSSClasses:function(){var cl=EditorManager.activeEditor.dom.getClasses(),o=[];each(cl,function(c){o.push(c['class']);});return o;},setWindowArg:function(n,v){EditorManager.activeEditor.windowManager.params[n]=v;},getWindowArg:function(n,dv){var wm=EditorManager.activeEditor.windowManager,v;v=wm.getParam(n);if(v==='')return'';return v||wm.getFeature(n)||dv;},getParentNode:function(n,f){return this._getDOM().getParent(n,f);},selectElements:function(n,na,f){var i,a=[],nl,x;for(x=0,na=na.split(',');x + {#emotions_dlg.title} -

diff --git a/webcit/tiny_mce/plugins/emotions/langs/es_dlg.js b/webcit/tiny_mce/plugins/emotions/langs/es_dlg.js index 1cc3ac922..0d95db55d 100644 --- a/webcit/tiny_mce/plugins/emotions/langs/es_dlg.js +++ b/webcit/tiny_mce/plugins/emotions/langs/es_dlg.js @@ -3,7 +3,7 @@ title:"Insertar emoticon", desc:"Emoticones", cool:"Todo bien", cry:"Llora", -embarassed:"Verg\u00C3\u0083\u00C2\u00BCenza", +embarassed:"Verg\u00FCenza", foot_in_mouth:"Pie en la boca", frown:"Triste", innocent:"Inocente", diff --git a/webcit/tiny_mce/plugins/emotions/langs/et_dlg.js b/webcit/tiny_mce/plugins/emotions/langs/et_dlg.js new file mode 100644 index 000000000..398a4de90 --- /dev/null +++ b/webcit/tiny_mce/plugins/emotions/langs/et_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('et.emotions_dlg',{ +title:"Sisesta emotsioon", +desc:"Emotsioonid", +cool:"Lahe", +cry:"Nutt", +embarassed:"H\u00E4bitunne", +foot_in_mouth:"Jalg suus", +frown:"Kulmu kortsutamine", +innocent:"S\u00FC\u00FCtu", +kiss:"Suudlus", +laughing:"Naermine", +money_mouth:"Rahasuu", +sealed:"Suletud", +smile:"Naeratus", +surprised:"\u00DCllatunud", +tongue_out:"Keel v\u00E4ljas", +undecided:"K\u00F5hklev", +wink:"Silmapilgutus", +yell:"Karje" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/emotions/langs/fr_dlg.js b/webcit/tiny_mce/plugins/emotions/langs/fr_dlg.js new file mode 100644 index 000000000..e9ba93d8c --- /dev/null +++ b/webcit/tiny_mce/plugins/emotions/langs/fr_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('fr.emotions_dlg',{ +title:"Ins\u00E9rer une \u00E9motic\u00F4ne", +desc:"\u00C9motic\u00F4nes", +cool:"Cool", +cry:"En pleurs", +embarassed:"Embarrass\u00E9", +foot_in_mouth:"Pied de nez", +frown:"D\u00E9\u00E7u", +innocent:"Innocent", +kiss:"Bisou", +laughing:"Rigolant", +money_mouth:"Avare", +sealed:"Bouche cousue", +smile:"Sourire", +surprised:"Surpris", +tongue_out:"Langue tir\u00E9e", +undecided:"Incertain", +wink:"Clin d'\u0153il", +yell:"Criant" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/emotions/langs/hu_dlg.js b/webcit/tiny_mce/plugins/emotions/langs/hu_dlg.js new file mode 100644 index 000000000..083e6abf6 --- /dev/null +++ b/webcit/tiny_mce/plugins/emotions/langs/hu_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('hu.emotions_dlg',{ +title:"Hangulatjel besz\u00FAr\u00E1sa", +desc:"Hangulatjelek", +cool:"Kir\u00E1ly", +cry:"S\u00EDr\u00F3s", +embarassed:"Zavarban van", +foot_in_mouth:"L\u00E1b a sz\u00E1jban", +frown:"Rosszall", +innocent:"\u00C1rtatlan", +kiss:"Cs\u00F3k", +laughing:"Nevet\u00E9s", +money_mouth:"P\u00E9nz besz\u00E9l", +sealed:"Lakat a sz\u00E1j\u00E1n", +smile:"Vigyor", +surprised:"Meglepett", +tongue_out:"Nyelv\u00F6lt\u00E9s", +undecided:"Hat\u00E1rozatlan", +wink:"Kacsint\u00E1s", +yell:"\u00DCv\u00F6lt\u00E9s" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/emotions/langs/nl_dlg.js b/webcit/tiny_mce/plugins/emotions/langs/nl_dlg.js index f98e1da70..39f797d94 100644 --- a/webcit/tiny_mce/plugins/emotions/langs/nl_dlg.js +++ b/webcit/tiny_mce/plugins/emotions/langs/nl_dlg.js @@ -5,7 +5,7 @@ cool:"Stoer", cry:"Huilen", embarassed:"Schamen", foot_in_mouth:"Verstomd", -frown:"Wenkbrouw ophalen", +frown:"Wenkbrauw ophalen", innocent:"Onschuldig", kiss:"Zoenen", laughing:"Lachen", diff --git a/webcit/tiny_mce/plugins/emotions/langs/pt_dlg.js b/webcit/tiny_mce/plugins/emotions/langs/pt_dlg.js index 4055eb97f..c79cec8e4 100644 --- a/webcit/tiny_mce/plugins/emotions/langs/pt_dlg.js +++ b/webcit/tiny_mce/plugins/emotions/langs/pt_dlg.js @@ -2,10 +2,10 @@ tinyMCE.addI18n('pt.emotions_dlg',{ title:"Inserir emoticon", desc:"Emoticons", cool:"Fixe", -cry:"Chor\u00C3\u00A3o", -embarassed:"Embara\u00C3\u00A7ado", +cry:"Chor\u00E3o", +embarassed:"Embara\u00E7ado", foot_in_mouth:"Disse asneira", -frown:"Decep\u00C3\u00A7\u00C3\u00A3o", +frown:"Decep\u00E7\u00E3o", innocent:"Inocente", kiss:"Beijo", laughing:"Riso", @@ -13,7 +13,7 @@ money_mouth:"Avarez", sealed:"Boca Fechada", smile:"Sorriso", surprised:"Surpresa", -tongue_out:"L\u00C3\u00ADngua de fora", +tongue_out:"L\u00EDngua de fora", undecided:"Indeciso", wink:"Piscadela", yell:"Irado" diff --git a/webcit/tiny_mce/plugins/emotions/langs/ru_dlg.js b/webcit/tiny_mce/plugins/emotions/langs/ru_dlg.js new file mode 100644 index 000000000..5186e0a35 --- /dev/null +++ b/webcit/tiny_mce/plugins/emotions/langs/ru_dlg.js @@ -0,0 +1,20 @@ +tinyMCE.addI18n('ru.emotions_dlg',{ +title:"\u0412\u044B\u0431\u043E\u0440 \u0441\u043C\u0430\u0439\u043B\u0430", +desc:"\u0421\u043C\u0430\u0439\u043B\u044B", +cool:"Cool", +cry:"Cry", +embarassed:"Embarassed", +foot_in_mouth:"Foot in mouth", +frown:"Frown", +innocent:"Innocent", +kiss:"Kiss", +laughing:"Laughing", +money_mouth:"Money mouth", +sealed:"Sealed", +smile:"Smile", +surprised:"Surprised", +tongue_out:"Tongue out", +undecided:"Undecided", +wink:"Wink", +yell:"Yell" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/example/dialog.htm b/webcit/tiny_mce/plugins/example/dialog.htm index b4c62840e..50b2b3445 100644 --- a/webcit/tiny_mce/plugins/example/dialog.htm +++ b/webcit/tiny_mce/plugins/example/dialog.htm @@ -13,13 +13,8 @@

Custom arg:

-
- -
- -
- -
+ +
diff --git a/webcit/tiny_mce/plugins/example/editor_plugin.js b/webcit/tiny_mce/plugins/example/editor_plugin.js index cb7010d18..ec1f81ea4 100644 --- a/webcit/tiny_mce/plugins/example/editor_plugin.js +++ b/webcit/tiny_mce/plugins/example/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.PluginManager.requireLangPack('example');tinymce.create('tinymce.plugins.ExamplePlugin',{init:function(ed,url){ed.addCommand('mceExample',function(){ed.windowManager.open({file:url+'/dialog.htm',width:320+parseInt(ed.getLang('example.delta_width',0)),height:120+parseInt(ed.getLang('example.delta_height',0)),inline:1},{plugin_url:url,some_custom_arg:'custom arg'});});ed.addButton('example',{title:'example.desc',cmd:'mceExample',image:url+'/img/example.gif'});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('example',n.nodeName=='IMG');});},createControl:function(n,cm){return null;},getInfo:function(){return{longname:'Example plugin',author:'Some author',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example',version:"1.0"};}});tinymce.PluginManager.add('example',tinymce.plugins.ExamplePlugin);})(); \ No newline at end of file +(function(){tinymce.PluginManager.requireLangPack("example");tinymce.create("tinymce.plugins.ExamplePlugin",{init:function(a,b){a.addCommand("mceExample",function(){a.windowManager.open({file:b+"/dialog.htm",width:320+parseInt(a.getLang("example.delta_width",0)),height:120+parseInt(a.getLang("example.delta_height",0)),inline:1},{plugin_url:b,some_custom_arg:"custom arg"})});a.addButton("example",{title:"example.desc",cmd:"mceExample",image:b+"/img/example.gif"});a.onNodeChange.add(function(d,c,e){c.setActive("example",e.nodeName=="IMG")})},createControl:function(b,a){return null},getInfo:function(){return{longname:"Example plugin",author:"Some author",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example",version:"1.0"}}});tinymce.PluginManager.add("example",tinymce.plugins.ExamplePlugin)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/example/editor_plugin_src.js b/webcit/tiny_mce/plugins/example/editor_plugin_src.js index 5705a1401..9a0e7da15 100644 --- a/webcit/tiny_mce/plugins/example/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/example/editor_plugin_src.js @@ -1,5 +1,11 @@ -/* - * Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -75,4 +81,4 @@ // Register plugin tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin); -})(); +})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/fullpage/editor_plugin.js b/webcit/tiny_mce/plugins/fullpage/editor_plugin.js index 727beb574..aeaa66979 100644 --- a/webcit/tiny_mce/plugins/fullpage/editor_plugin.js +++ b/webcit/tiny_mce/plugins/fullpage/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.FullPagePlugin',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceFullPageProperties',function(){ed.windowManager.open({file:url+'/fullpage.htm',width:430+parseInt(ed.getLang('fullpage.delta_width',0)),height:495+parseInt(ed.getLang('fullpage.delta_height',0)),inline:1},{plugin_url:url,head_html:t.head});});ed.addButton('fullpage',{title:'fullpage.desc',cmd:'mceFullPageProperties'});ed.onBeforeSetContent.add(t._setContent,t);ed.onSetContent.add(t._setBodyAttribs,t);ed.onGetContent.add(t._getContent,t);},getInfo:function(){return{longname:'Fullpage',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_setBodyAttribs:function(ed,o){var bdattr,i,len,kv,k,v,t,attr=this.head.match(/body(.*?)>/i);if(attr&&attr[1]){bdattr=attr[1].match(/\s*(\w+\s*=\s*".*?"|\w+\s*=\s*'.*?'|\w+\s*=\s*\w+|\w+)\s*/g);if(bdattr){for(i=0,len=bdattr.length;i',sp);t.head=c.substring(0,sp+1);ep=c.indexOf('\n';t.head+=ed.getParam('fullpage_default_doctype','');t.head+='\n\n\n'+ed.getParam('fullpage_default_title','Untitled document')+'\n';if(v=ed.getParam('fullpage_default_encoding'))t.head+='\n';if(v=ed.getParam('fullpage_default_font_family'))st+='font-family: '+v+';';if(v=ed.getParam('fullpage_default_font_size'))st+='font-size: '+v+';';if(v=ed.getParam('fullpage_default_text_color'))st+='color: '+v+';';t.head+='\n\n';t.foot='\n\n';}},_getContent:function(ed,o){var t=this;o.content=tinymce.trim(t.head)+'\n'+tinymce.trim(o.content)+'\n'+tinymce.trim(t.foot);}});tinymce.PluginManager.add('fullpage',tinymce.plugins.FullPagePlugin);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.FullPagePlugin",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceFullPageProperties",function(){a.windowManager.open({file:b+"/fullpage.htm",width:430+parseInt(a.getLang("fullpage.delta_width",0)),height:495+parseInt(a.getLang("fullpage.delta_height",0)),inline:1},{plugin_url:b,head_html:c.head})});a.addButton("fullpage",{title:"fullpage.desc",cmd:"mceFullPageProperties"});a.onBeforeSetContent.add(c._setContent,c);a.onSetContent.add(c._setBodyAttribs,c);a.onGetContent.add(c._getContent,c)},getInfo:function(){return{longname:"Fullpage",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_setBodyAttribs:function(d,a){var l,c,e,g,b,h,j,f=this.head.match(/body(.*?)>/i);if(f&&f[1]){l=f[1].match(/\s*(\w+\s*=\s*".*?"|\w+\s*=\s*'.*?'|\w+\s*=\s*\w+|\w+)\s*/g);if(l){for(c=0,e=l.length;c",a);h.head=f.substring(0,a+1);j=f.indexOf("\n'}h.head+=d.getParam("fullpage_default_doctype",'');h.head+="\n\n\n"+d.getParam("fullpage_default_title","Untitled document")+"\n";if(g=d.getParam("fullpage_default_encoding")){h.head+='\n'}if(g=d.getParam("fullpage_default_font_family")){i+="font-family: "+g+";"}if(g=d.getParam("fullpage_default_font_size")){i+="font-size: "+g+";"}if(g=d.getParam("fullpage_default_text_color")){i+="color: "+g+";"}h.head+="\n\n";h.foot="\n\n"}},_getContent:function(a,c){var b=this;if(!c.source_view||!a.getParam("fullpage_hide_in_source_view")){c.content=tinymce.trim(b.head)+"\n"+tinymce.trim(c.content)+"\n"+tinymce.trim(b.foot)}}});tinymce.PluginManager.add("fullpage",tinymce.plugins.FullPagePlugin)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/fullpage/editor_plugin_src.js b/webcit/tiny_mce/plugins/fullpage/editor_plugin_src.js index 146d3c2d3..a2c9df898 100644 --- a/webcit/tiny_mce/plugins/fullpage/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/fullpage/editor_plugin_src.js @@ -1,5 +1,11 @@ -/* - * Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -79,6 +85,13 @@ _setContent : function(ed, o) { var t = this, sp, ep, c = o.content, v, st = ''; + // Ignore raw updated if we already have a head, this will fix issues with undo/redo keeping the head/foot separate + if (o.format == 'raw' && t.head) + return; + + if (o.source_view && ed.getParam('fullpage_hide_in_source_view')) + return; + // Parse out head, body and footer c = c.replace(/<(\/?)BODY/gi, '<$1body'); sp = c.indexOf(' -
@@ -26,27 +25,27 @@ - + - + - + - + - + - + - + - + @@ -95,7 +94,7 @@ - +
  
  
  
  
  
  
  
  
  
@@ -564,13 +563,8 @@
-
- -
- -
- -
+ +
diff --git a/webcit/tiny_mce/plugins/fullpage/js/fullpage.js b/webcit/tiny_mce/plugins/fullpage/js/fullpage.js index 89059ef66..a1bb719a3 100644 --- a/webcit/tiny_mce/plugins/fullpage/js/fullpage.js +++ b/webcit/tiny_mce/plugins/fullpage/js/fullpage.js @@ -1,3 +1,13 @@ +/** + * fullpage.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + tinyMCEPopup.requireLangPack(); var doc; @@ -114,7 +124,7 @@ function init() { // Preprocess the HTML disable scripts and urls h = h.replace(/ -
diff --git a/webcit/tiny_mce/plugins/iespell/editor_plugin.js b/webcit/tiny_mce/plugins/iespell/editor_plugin.js index 06dae75df..e9cba106c 100644 --- a/webcit/tiny_mce/plugins/iespell/editor_plugin.js +++ b/webcit/tiny_mce/plugins/iespell/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.IESpell',{init:function(ed,url){var t=this,sp;if(!tinymce.isIE)return;t.editor=ed;ed.addCommand('mceIESpell',function(){try{sp=new ActiveXObject("ieSpell.ieSpellExtension");sp.CheckDocumentNode(ed.getDoc().documentElement);}catch(e){if(e.number==-2146827859){ed.windowManager.confirm(ed.getLang("iespell.download"),function(s){if(s)window.open('http://www.iespell.com/download.php','ieSpellDownload','');});}else ed.windowManager.alert("Error Loading ieSpell: Exception "+e.number);}});ed.addButton('iespell',{title:'iespell.iespell_desc',cmd:'mceIESpell'});},getInfo:function(){return{longname:'IESpell (IE Only)',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('iespell',tinymce.plugins.IESpell);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.IESpell",{init:function(a,b){var c=this,d;if(!tinymce.isIE){return}c.editor=a;a.addCommand("mceIESpell",function(){try{d=new ActiveXObject("ieSpell.ieSpellExtension");d.CheckDocumentNode(a.getDoc().documentElement)}catch(f){if(f.number==-2146827859){a.windowManager.confirm(a.getLang("iespell.download"),function(e){if(e){window.open("http://www.iespell.com/download.php","ieSpellDownload","")}})}else{a.windowManager.alert("Error Loading ieSpell: Exception "+f.number)}}});a.addButton("iespell",{title:"iespell.iespell_desc",cmd:"mceIESpell"})},getInfo:function(){return{longname:"IESpell (IE Only)",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("iespell",tinymce.plugins.IESpell)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/iespell/editor_plugin_src.js b/webcit/tiny_mce/plugins/iespell/editor_plugin_src.js index af5f36029..1b2bb9846 100644 --- a/webcit/tiny_mce/plugins/iespell/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/iespell/editor_plugin_src.js @@ -1,5 +1,11 @@ -/* - * Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -45,4 +51,4 @@ // Register plugin tinymce.PluginManager.add('iespell', tinymce.plugins.IESpell); -})(); +})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/inlinepopups/editor_plugin.js b/webcit/tiny_mce/plugins/inlinepopups/editor_plugin.js index 5560b6b18..e57c9438d 100644 --- a/webcit/tiny_mce/plugins/inlinepopups/editor_plugin.js +++ b/webcit/tiny_mce/plugins/inlinepopups/editor_plugin.js @@ -1 +1 @@ -(function(){var DOM=tinymce.DOM,Element=tinymce.dom.Element,Event=tinymce.dom.Event,each=tinymce.each,is=tinymce.is;tinymce.create('tinymce.plugins.InlinePopups',{init:function(ed,url){ed.onBeforeRenderUI.add(function(){ed.windowManager=new tinymce.InlineWindowManager(ed);DOM.loadCSS(url+'/skins/'+(ed.settings.inlinepopups_skin||'clearlooks2')+"/window.css");});},getInfo:function(){return{longname:'InlinePopups',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager',{InlineWindowManager:function(ed){var t=this;t.parent(ed);t.zIndex=300000;t.count=0;t.windows={};},open:function(f,p){var t=this,id,opt='',ed=t.editor,dw=0,dh=0,vp,po,mdf,clf,we,w,u;f=f||{};p=p||{};if(!f.inline)return t.parent(f,p);if(!f.type)t.bookmark=ed.selection.getBookmark('simple');id=DOM.uniqueId();vp=DOM.getViewPort();f.width=parseInt(f.width||320);f.height=parseInt(f.height||240)+(tinymce.isIE?8:0);f.min_width=parseInt(f.min_width||150);f.min_height=parseInt(f.min_height||100);f.max_width=parseInt(f.max_width||2000);f.max_height=parseInt(f.max_height||2000);f.left=f.left||Math.round(Math.max(vp.x,vp.x+(vp.w/ 2.0) - (f.width /2.0)));f.top=f.top||Math.round(Math.max(vp.y,vp.y+(vp.h/ 2.0) - (f.height /2.0)));f.movable=f.resizable=true;p.mce_width=f.width;p.mce_height=f.height;p.mce_inline=true;p.mce_window_id=id;p.mce_auto_focus=f.auto_focus;t.features=f;t.params=p;t.onOpen.dispatch(t,f,p);if(f.type){opt+=' mceModal';if(f.type)opt+=' mce'+f.type.substring(0,1).toUpperCase()+f.type.substring(1);f.resizable=false;}if(f.statusbar)opt+=' mceStatusbar';if(f.resizable)opt+=' mceResizable';if(f.minimizable)opt+=' mceMinimizable';if(f.maximizable)opt+=' mceMaximizable';if(f.movable)opt+=' mceMovable';t._addAll(DOM.doc.body,['div',{id:id,'class':ed.settings.inlinepopups_skin||'clearlooks2',style:'width:100px;height:100px'},['div',{id:id+'_wrapper','class':'mceWrapper'+opt},['div',{id:id+'_top','class':'mceTop'},['div',{'class':'mceLeft'}],['div',{'class':'mceCenter'}],['div',{'class':'mceRight'}],['span',{id:id+'_title'},f.title||'']],['div',{id:id+'_middle','class':'mceMiddle'},['div',{id:id+'_left','class':'mceLeft'}],['span',{id:id+'_content'}],['div',{id:id+'_right','class':'mceRight'}]],['div',{id:id+'_bottom','class':'mceBottom'},['div',{'class':'mceLeft'}],['div',{'class':'mceCenter'}],['div',{'class':'mceRight'}],['span',{id:id+'_status'},'Content']],['a',{'class':'mceMove',tabindex:'-1',href:'javascript:;'}],['a',{'class':'mceMin',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{'class':'mceMax',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{'class':'mceMed',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{'class':'mceClose',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{id:id+'_resize_n','class':'mceResize mceResizeN',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_s','class':'mceResize mceResizeS',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_w','class':'mceResize mceResizeW',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_e','class':'mceResize mceResizeE',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_nw','class':'mceResize mceResizeNW',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_ne','class':'mceResize mceResizeNE',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_sw','class':'mceResize mceResizeSW',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_se','class':'mceResize mceResizeSE',tabindex:'-1',href:'javascript:;'}]]]);DOM.setStyles(id,{top:-10000,left:-10000});if(tinymce.isGecko)DOM.setStyle(id,'overflow','auto');if(!f.type){dw+=DOM.get(id+'_left').clientWidth;dw+=DOM.get(id+'_right').clientWidth;dh+=DOM.get(id+'_top').clientHeight;dh+=DOM.get(id+'_bottom').clientHeight;}DOM.setStyles(id,{top:f.top,left:f.left,width:f.width+dw,height:f.height+dh});u=f.url||f.file;if(u){if(tinymce.relaxedDomain)u+=(u.indexOf('?')==-1?'?':'&')+'mce_rdomain='+tinymce.relaxedDomain;u=tinymce._addVer(u);}if(!f.type){DOM.add(id+'_content','iframe',{id:id+'_ifr',src:'javascript:""',frameBorder:0,style:'border:0;width:10px;height:10px'});DOM.setStyles(id+'_ifr',{width:f.width,height:f.height});DOM.setAttrib(id+'_ifr','src',u);}else{DOM.add(id+'_wrapper','a',{id:id+'_ok','class':'mceButton mceOk',href:'javascript:;',onmousedown:'return false;'},'Ok');if(f.type=='confirm')DOM.add(id+'_wrapper','a',{'class':'mceButton mceCancel',href:'javascript:;',onmousedown:'return false;'},'Cancel');DOM.add(id+'_middle','div',{'class':'mceIcon'});DOM.setHTML(id+'_content',f.content.replace('\n','
'));}mdf=Event.add(id,'mousedown',function(e){var n=e.target,w,vp;w=t.windows[id];t.focus(id);if(n.nodeName=='A'||n.nodeName=='a'){if(n.className=='mceMax'){w.oldPos=w.element.getXY();w.oldSize=w.element.getSize();vp=DOM.getViewPort();vp.w-=2;vp.h-=2;w.element.moveTo(vp.x,vp.y);w.element.resizeTo(vp.w,vp.h);DOM.setStyles(id+'_ifr',{width:vp.w-w.deltaWidth,height:vp.h-w.deltaHeight});DOM.addClass(id+'_wrapper','mceMaximized');}else if(n.className=='mceMed'){w.element.moveTo(w.oldPos.x,w.oldPos.y);w.element.resizeTo(w.oldSize.w,w.oldSize.h);w.iframeElement.resizeTo(w.oldSize.w-w.deltaWidth,w.oldSize.h-w.deltaHeight);DOM.removeClass(id+'_wrapper','mceMaximized');}else if(n.className=='mceMove')return t._startDrag(id,e,n.className);else if(DOM.hasClass(n,'mceResize'))return t._startDrag(id,e,n.className.substring(13));}});clf=Event.add(id,'click',function(e){var n=e.target;t.focus(id);if(n.nodeName=='A'||n.nodeName=='a'){switch(n.className){case'mceClose':t.close(null,id);return Event.cancel(e);case'mceButton mceOk':case'mceButton mceCancel':f.button_func(n.className=='mceButton mceOk');return Event.cancel(e);}}});w=t.windows[id]={id:id,mousedown_func:mdf,click_func:clf,element:new Element(id,{blocker:1,container:ed.getContainer()}),iframeElement:new Element(id+'_ifr'),features:f,deltaWidth:dw,deltaHeight:dh};w.iframeElement.on('focus',function(){t.focus(id);});if(t.count==0&&t.editor.getParam('dialog_type','modal')=='modal'){DOM.add(DOM.doc.body,'div',{id:'mceModalBlocker','class':(t.editor.settings.inlinepopups_skin||'clearlooks2')+'_modalBlocker',style:{zIndex:t.zIndex-1}});DOM.show('mceModalBlocker');}else DOM.setStyle('mceModalBlocker','z-index',t.zIndex-1);if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!DOM.boxModel))DOM.setStyles('mceModalBlocker',{position:'absolute',width:vp.w-2,height:vp.h-2});t.focus(id);t._fixIELayout(id,1);if(DOM.get(id+'_ok'))DOM.get(id+'_ok').focus();t.count++;return w;},focus:function(id){var t=this,w;if(w=t.windows[id]){w.zIndex=this.zIndex++;w.element.setStyle('zIndex',w.zIndex);w.element.update();id=id+'_wrapper';DOM.removeClass(t.lastId,'mceFocus');DOM.addClass(id,'mceFocus');t.lastId=id;}},_addAll:function(te,ne){var i,n,t=this,dom=tinymce.DOM;if(is(ne,'string'))te.appendChild(dom.doc.createTextNode(ne));else if(ne.length){te=te.appendChild(dom.create(ne[0],ne[1]));for(i=2;iix){fw=w;ix=w.zIndex;}});if(fw)t.focus(fw.id);}},setTitle:function(w,ti){var e;w=this._findId(w);if(e=DOM.get(w+'_title'))e.innerHTML=DOM.encode(ti);},alert:function(txt,cb,s){var t=this,w;w=t.open({title:t,type:'alert',button_func:function(s){if(cb)cb.call(s||t,s);t.close(null,w.id);},content:DOM.encode(t.editor.getLang(txt,txt)),inline:1,width:400,height:130});},confirm:function(txt,cb,s){var t=this,w;w=t.open({title:t,type:'confirm',button_func:function(s){if(cb)cb.call(s||t,s);t.close(null,w.id);},content:DOM.encode(t.editor.getLang(txt,txt)),inline:1,width:400,height:130});},_findId:function(w){var t=this;if(typeof(w)=='string')return w;each(t.windows,function(wo){var ifr=DOM.get(wo.id+'_ifr');if(ifr&&w==ifr.contentWindow){w=wo.id;return false;}});return w;},_fixIELayout:function(id,s){var w,img;if(!tinymce.isIE6)return;each(['n','s','w','e','nw','ne','sw','se'],function(v){var e=DOM.get(id+'_resize_'+v);DOM.setStyles(e,{width:s?e.clientWidth:'',height:s?e.clientHeight:'',cursor:DOM.getStyle(e,'cursor',1)});DOM.setStyle(id+"_bottom",'bottom','-1px');e=0;});if(w=this.windows[id]){w.element.hide();w.element.show();each(DOM.select('div,a',id),function(e,i){if(e.currentStyle.backgroundImage!='none'){img=new Image();img.src=e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,'$1');}});DOM.get(id).style.filter='';}}});tinymce.PluginManager.add('inlinepopups',tinymce.plugins.InlinePopups);})(); \ No newline at end of file +(function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(r,j){var y=this,i,k="",q=y.editor,g=0,s=0,h,m,n,o,l,v,x;r=r||{};j=j||{};if(!r.inline){return y.parent(r,j)}if(!r.type){y.bookmark=q.selection.getBookmark(1)}i=d.uniqueId();h=d.getViewPort();r.width=parseInt(r.width||320);r.height=parseInt(r.height||240)+(tinymce.isIE?8:0);r.min_width=parseInt(r.min_width||150);r.min_height=parseInt(r.min_height||100);r.max_width=parseInt(r.max_width||2000);r.max_height=parseInt(r.max_height||2000);r.left=r.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(r.width/2)));r.top=r.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(r.height/2)));r.movable=r.resizable=true;j.mce_width=r.width;j.mce_height=r.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=r.auto_focus;y.features=r;y.params=j;y.onOpen.dispatch(y,r,j);if(r.type){k+=" mceModal";if(r.type){k+=" mce"+r.type.substring(0,1).toUpperCase()+r.type.substring(1)}r.resizable=false}if(r.statusbar){k+=" mceStatusbar"}if(r.resizable){k+=" mceResizable"}if(r.minimizable){k+=" mceMinimizable"}if(r.maximizable){k+=" mceMaximizable"}if(r.movable){k+=" mceMovable"}y._addAll(d.doc.body,["div",{id:i,"class":(q.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},r.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!r.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;s+=d.get(i+"_top").clientHeight;s+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:r.top,left:r.left,width:r.width+g,height:r.height+s});x=r.url||r.file;if(x){if(tinymce.relaxedDomain){x+=(x.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}x=tinymce._addVer(x)}if(!r.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:r.width,height:r.height});d.setAttrib(i+"_ifr","src",x)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(r.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",r.content.replace("\n","
"))}n=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=y.windows[i];y.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return y._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return y._startDrag(i,t,u.className.substring(13))}}}}}});o=a.add(i,"click",function(f){var p=f.target;y.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":y.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":r.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});v=y.windows[i]={id:i,mousedown_func:n,click_func:o,element:new b(i,{blocker:1,container:q.getContainer()}),iframeElement:new b(i+"_ifr"),features:r,deltaWidth:g,deltaHeight:s};v.iframeElement.on("focus",function(){y.focus(i)});if(y.count==0&&y.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(y.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:y.zIndex-1}});d.show("mceModalBlocker")}else{d.setStyle("mceModalBlocker","z-index",y.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}y.focus(i);y._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}y.count++;return v},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;gf){i=m;f=m.zIndex}});if(i){h.focus(i.id)}}},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/inlinepopups/editor_plugin_src.js b/webcit/tiny_mce/plugins/inlinepopups/editor_plugin_src.js index 0b23b8bda..0c1de3703 100644 --- a/webcit/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/inlinepopups/editor_plugin_src.js @@ -1,5 +1,11 @@ -/* - * Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -47,7 +53,7 @@ // Only store selection if the type is a normal window if (!f.type) - t.bookmark = ed.selection.getBookmark('simple'); + t.bookmark = ed.selection.getBookmark(1); id = DOM.uniqueId(); vp = DOM.getViewPort(); @@ -101,7 +107,7 @@ // Create DOM objects t._addAll(DOM.doc.body, - ['div', {id : id, 'class' : ed.settings.inlinepopups_skin || 'clearlooks2', style : 'width:100px;height:100px'}, + ['div', {id : id, 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE && window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'}, ['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt}, ['div', {id : id + '_top', 'class' : 'mceTop'}, ['div', {'class' : 'mceLeft'}], @@ -263,7 +269,7 @@ DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1); if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel)) - DOM.setStyles('mceModalBlocker', {position : 'absolute', width : vp.w - 2, height : vp.h - 2}); + DOM.setStyles('mceModalBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2}); t.focus(id); t._fixIELayout(id, 1); @@ -355,7 +361,7 @@ }); if (tinymce.isIE6 || (tinymce.isIE && !DOM.boxModel)) - DOM.setStyles('mceEventBlocker', {position : 'absolute', width : vp.w - 2, height : vp.h - 2}); + DOM.setStyles('mceEventBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2}); eb = new Element('mceEventBlocker'); eb.update(); diff --git a/webcit/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css b/webcit/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css index 5e6fd7d3c..202a85370 100644 --- a/webcit/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +++ b/webcit/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css @@ -87,4 +87,14 @@ .clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)} .clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px} .clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto} -.clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)} \ No newline at end of file +.clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)} + +/* IE9 fixes */ +.clearlooks2.ie9 .mceTop .mceCenter {clip:auto;} +.clearlooks2.ie9 .mceMiddle {clip:auto;} +.clearlooks2.ie9 .mceMiddle .mceLeft, .clearlooks2.ie9 .mceMiddle .mceRight {top: 23px;} +.clearlooks2.ie9 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {top:13px;} +.clearlooks2.ie9 .mceModal .mceMiddle {top:23px} +.clearlooks2.ie9 .mceModal .mceMiddle .mceLeft, .clearlooks2.ie9 .mceModal .mceMiddle .mceRight {top: 0} +.clearlooks2.ie9 .mceMiddle .mceIcon {top:13px} +.clearlooks2.ie9 .mceTop .mceCenter {top:0; right:auto; left:6px; width:calc(100%-12px)} diff --git a/webcit/tiny_mce/plugins/insertdatetime/editor_plugin.js b/webcit/tiny_mce/plugins/insertdatetime/editor_plugin.js index 34d4ceca5..938ce6b17 100644 --- a/webcit/tiny_mce/plugins/insertdatetime/editor_plugin.js +++ b/webcit/tiny_mce/plugins/insertdatetime/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.InsertDateTime',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceInsertDate',function(){var str=t._getDateTime(new Date(),ed.getParam("plugin_insertdate_dateFormat",ed.getLang('insertdatetime.date_fmt')));ed.execCommand('mceInsertContent',false,str);});ed.addCommand('mceInsertTime',function(){var str=t._getDateTime(new Date(),ed.getParam("plugin_insertdate_timeFormat",ed.getLang('insertdatetime.time_fmt')));ed.execCommand('mceInsertContent',false,str);});ed.addButton('insertdate',{title:'insertdatetime.insertdate_desc',cmd:'mceInsertDate'});ed.addButton('inserttime',{title:'insertdatetime.inserttime_desc',cmd:'mceInsertTime'});},getInfo:function(){return{longname:'Insert date/time',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_getDateTime:function(d,fmt){var ed=this.editor;function addZeros(value,len){value=""+value;if(value.length-1){nl[ci].style.zIndex=z[fi];nl[fi].style.zIndex=z[ci];}else{if(z[ci]>0)nl[ci].style.zIndex=z[ci]-1;}}else{for(i=0;iz[ci]){fi=i;break;}}if(fi>-1){nl[ci].style.zIndex=z[fi];nl[fi].style.zIndex=z[ci];}else nl[ci].style.zIndex=z[ci]+1;}ed.execCommand('mceRepaint');},_getParentLayer:function(n){return this.editor.dom.getParent(n,function(n){return n.nodeType==1&&/^(absolute|relative|static)$/i.test(n.style.position);});},_insertLayer:function(){var ed=this.editor,p=ed.dom.getPos(ed.dom.getParent(ed.selection.getNode(),'*'));ed.dom.add(ed.getBody(),'div',{style:{position:'absolute',left:p.x,top:(p.y>20?p.y:20),width:100,height:100},'class':'mceItemVisualAid'},ed.selection.getContent()||ed.getLang('layer.content'));},_toggleAbsolute:function(){var ed=this.editor,le=this._getParentLayer(ed.selection.getNode());if(!le)le=ed.dom.getParent(ed.selection.getNode(),'DIV,P,IMG');if(le){if(le.style.position.toLowerCase()=="absolute"){ed.dom.setStyles(le,{position:'',left:'',top:'',width:'',height:''});ed.dom.removeClass(le,'mceItemVisualAid');}else{if(le.style.left=="")le.style.left=20+'px';if(le.style.top=="")le.style.top=20+'px';if(le.style.width=="")le.style.width=le.width?(le.width+'px'):'100px';if(le.style.height=="")le.style.height=le.height?(le.height+'px'):'100px';le.style.position="absolute";ed.addVisual(ed.getBody());}ed.execCommand('mceRepaint');ed.nodeChanged();}}});tinymce.PluginManager.add('layer',tinymce.plugins.Layer);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.Layer",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceInsertLayer",c._insertLayer,c);a.addCommand("mceMoveForward",function(){c._move(1)});a.addCommand("mceMoveBackward",function(){c._move(-1)});a.addCommand("mceMakeAbsolute",function(){c._toggleAbsolute()});a.addButton("moveforward",{title:"layer.forward_desc",cmd:"mceMoveForward"});a.addButton("movebackward",{title:"layer.backward_desc",cmd:"mceMoveBackward"});a.addButton("absolute",{title:"layer.absolute_desc",cmd:"mceMakeAbsolute"});a.addButton("insertlayer",{title:"layer.insertlayer_desc",cmd:"mceInsertLayer"});a.onInit.add(function(){if(tinymce.isIE){a.getDoc().execCommand("2D-Position",false,true)}});a.onNodeChange.add(c._nodeChange,c);a.onVisualAid.add(c._visualAid,c)},getInfo:function(){return{longname:"Layer",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var c,d;c=this._getParentLayer(e);d=b.dom.getParent(e,"DIV,P,IMG");if(!d){a.setDisabled("absolute",1);a.setDisabled("moveforward",1);a.setDisabled("movebackward",1)}else{a.setDisabled("absolute",0);a.setDisabled("moveforward",!c);a.setDisabled("movebackward",!c);a.setActive("absolute",c&&c.style.position.toLowerCase()=="absolute")}},_visualAid:function(a,c,b){var d=a.dom;tinymce.each(d.select("div,p",c),function(f){if(/^(absolute|relative|static)$/i.test(f.style.position)){if(b){d.addClass(f,"mceItemVisualAid")}else{d.removeClass(f,"mceItemVisualAid")}}})},_move:function(h){var b=this.editor,f,g=[],e=this._getParentLayer(b.selection.getNode()),c=-1,j=-1,a;a=[];tinymce.walk(b.getBody(),function(d){if(d.nodeType==1&&/^(absolute|relative|static)$/i.test(d.style.position)){a.push(d)}},"childNodes");for(f=0;f-1){a[c].style.zIndex=g[j];a[j].style.zIndex=g[c]}else{if(g[c]>0){a[c].style.zIndex=g[c]-1}}}else{for(f=0;fg[c]){j=f;break}}if(j>-1){a[c].style.zIndex=g[j];a[j].style.zIndex=g[c]}else{a[c].style.zIndex=g[c]+1}}b.execCommand("mceRepaint")},_getParentLayer:function(a){return this.editor.dom.getParent(a,function(b){return b.nodeType==1&&/^(absolute|relative|static)$/i.test(b.style.position)})},_insertLayer:function(){var a=this.editor,b=a.dom.getPos(a.dom.getParent(a.selection.getNode(),"*"));a.dom.add(a.getBody(),"div",{style:{position:"absolute",left:b.x,top:(b.y>20?b.y:20),width:100,height:100},"class":"mceItemVisualAid"},a.selection.getContent()||a.getLang("layer.content"))},_toggleAbsolute:function(){var a=this.editor,b=this._getParentLayer(a.selection.getNode());if(!b){b=a.dom.getParent(a.selection.getNode(),"DIV,P,IMG")}if(b){if(b.style.position.toLowerCase()=="absolute"){a.dom.setStyles(b,{position:"",left:"",top:"",width:"",height:""});a.dom.removeClass(b,"mceItemVisualAid")}else{if(b.style.left==""){b.style.left=20+"px"}if(b.style.top==""){b.style.top=20+"px"}if(b.style.width==""){b.style.width=b.width?(b.width+"px"):"100px"}if(b.style.height==""){b.style.height=b.height?(b.height+"px"):"100px"}b.style.position="absolute";a.addVisual(a.getBody())}a.execCommand("mceRepaint");a.nodeChanged()}}});tinymce.PluginManager.add("layer",tinymce.plugins.Layer)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/layer/editor_plugin_src.js b/webcit/tiny_mce/plugins/layer/editor_plugin_src.js index d76048605..d5aa86548 100644 --- a/webcit/tiny_mce/plugins/layer/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/layer/editor_plugin_src.js @@ -1,5 +1,11 @@ -/* - * Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -203,4 +209,4 @@ // Register plugin tinymce.PluginManager.add('layer', tinymce.plugins.Layer); -})(); +})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/legacyoutput/editor_plugin.js b/webcit/tiny_mce/plugins/legacyoutput/editor_plugin.js new file mode 100644 index 000000000..29d43c524 --- /dev/null +++ b/webcit/tiny_mce/plugins/legacyoutput/editor_plugin.js @@ -0,0 +1 @@ +(function(a){a.onAddEditor.addToTop(function(c,b){b.settings.inline_styles=false});a.create("tinymce.plugins.LegacyOutput",{init:function(b){b.onInit.add(function(){var c="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",e=a.explode(b.settings.font_size_style_values),d=b.serializer;b.formatter.register({alignleft:{selector:c,attributes:{align:"left"}},aligncenter:{selector:c,attributes:{align:"center"}},alignright:{selector:c,attributes:{align:"right"}},alignfull:{selector:c,attributes:{align:"full"}},bold:{inline:"b"},italic:{inline:"i"},underline:{inline:"u"},strikethrough:{inline:"strike"},fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(f){return a.inArray(e,f.value)+1}}},forecolor:{inline:"font",styles:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}});d._setup();a.each("b,i,u,strike".split(","),function(f){var g=d.rules[f];if(!g){d.addRules(f)}});if(!d.rules.font){d.addRules("font[face|size|color|style]")}a.each(c.split(","),function(f){var h=d.rules[f],g;if(h){a.each(h.attribs,function(j,i){if(i.name=="align"){g=true;return false}});if(!g){h.attribs.push({name:"align"})}}});b.onNodeChange.add(function(g,k){var j,f,h,i;f=g.dom.getParent(g.selection.getNode(),"font");if(f){h=f.face;i=f.size}if(j=k.get("fontselect")){j.select(function(l){return l==h})}if(j=k.get("fontsizeselect")){j.select(function(m){var l=a.inArray(e,m.fontSize);return l+1==i})}})})},getInfo:function(){return{longname:"LegacyOutput",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("legacyoutput",a.plugins.LegacyOutput)})(tinymce); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/legacyoutput/editor_plugin_src.js b/webcit/tiny_mce/plugins/legacyoutput/editor_plugin_src.js new file mode 100644 index 000000000..e852da15e --- /dev/null +++ b/webcit/tiny_mce/plugins/legacyoutput/editor_plugin_src.js @@ -0,0 +1,136 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + * + * This plugin will force TinyMCE to produce deprecated legacy output such as font elements, u elements, align + * attributes and so forth. There are a few cases where these old items might be needed for example in email applications or with Flash + * + * However you should NOT use this plugin if you are building some system that produces web contents such as a CMS. All these elements are + * not apart of the newer specifications for HTML and XHTML. + */ + +(function(tinymce) { + // Override inline_styles setting to force TinyMCE to produce deprecated contents + tinymce.onAddEditor.addToTop(function(tinymce, editor) { + editor.settings.inline_styles = false; + }); + + // Create the legacy ouput plugin + tinymce.create('tinymce.plugins.LegacyOutput', { + init : function(editor) { + editor.onInit.add(function() { + var alignElements = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', + fontSizes = tinymce.explode(editor.settings.font_size_style_values), + serializer = editor.serializer; + + // Override some internal formats to produce legacy elements and attributes + editor.formatter.register({ + // Change alignment formats to use the deprecated align attribute + alignleft : {selector : alignElements, attributes : {align : 'left'}}, + aligncenter : {selector : alignElements, attributes : {align : 'center'}}, + alignright : {selector : alignElements, attributes : {align : 'right'}}, + alignfull : {selector : alignElements, attributes : {align : 'full'}}, + + // Change the basic formatting elements to use deprecated element types + bold : {inline : 'b'}, + italic : {inline : 'i'}, + underline : {inline : 'u'}, + strikethrough : {inline : 'strike'}, + + // Change font size and font family to use the deprecated font element + fontname : {inline : 'font', attributes : {face : '%value'}}, + fontsize : { + inline : 'font', + attributes : { + size : function(vars) { + return tinymce.inArray(fontSizes, vars.value) + 1; + } + } + }, + + // Setup font elements for colors as well + forecolor : {inline : 'font', styles : {color : '%value'}}, + hilitecolor : {inline : 'font', styles : {backgroundColor : '%value'}} + }); + + // Force parsing of the serializer rules + serializer._setup(); + + // Check that deprecated elements are allowed if not add them + tinymce.each('b,i,u,strike'.split(','), function(name) { + var rule = serializer.rules[name]; + + if (!rule) + serializer.addRules(name); + }); + + // Add font element if it's missing + if (!serializer.rules["font"]) + serializer.addRules("font[face|size|color|style]"); + + // Add the missing and depreacted align attribute for the serialization engine + tinymce.each(alignElements.split(','), function(name) { + var rule = serializer.rules[name], found; + + if (rule) { + tinymce.each(rule.attribs, function(name, attr) { + if (attr.name == 'align') { + found = true; + return false; + } + }); + + if (!found) + rule.attribs.push({name : 'align'}); + } + }); + + // Listen for the onNodeChange event so that we can do special logic for the font size and font name drop boxes + editor.onNodeChange.add(function(editor, control_manager) { + var control, fontElm, fontName, fontSize; + + // Find font element get it's name and size + fontElm = editor.dom.getParent(editor.selection.getNode(), 'font'); + if (fontElm) { + fontName = fontElm.face; + fontSize = fontElm.size; + } + + // Select/unselect the font name in droplist + if (control = control_manager.get('fontselect')) { + control.select(function(value) { + return value == fontName; + }); + } + + // Select/unselect the font size in droplist + if (control = control_manager.get('fontsizeselect')) { + control.select(function(value) { + var index = tinymce.inArray(fontSizes, value.fontSize); + + return index + 1 == fontSize; + }); + } + }); + }); + }, + + getInfo : function() { + return { + longname : 'LegacyOutput', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + // Register plugin + tinymce.PluginManager.add('legacyoutput', tinymce.plugins.LegacyOutput); +})(tinymce); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/media/editor_plugin.js b/webcit/tiny_mce/plugins/media/editor_plugin.js index b226b00d3..4bbe367e3 100644 --- a/webcit/tiny_mce/plugins/media/editor_plugin.js +++ b/webcit/tiny_mce/plugins/media/editor_plugin.js @@ -1 +1 @@ -(function(){var each=tinymce.each;tinymce.create('tinymce.plugins.MediaPlugin',{init:function(ed,url){var t=this;t.editor=ed;t.url=url;function isMediaElm(n){return/^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(n.className);};ed.onPreInit.add(function(){ed.serializer.addRules('param[name|value|_mce_value]');});ed.addCommand('mceMedia',function(){ed.windowManager.open({file:url+'/media.htm',width:430+parseInt(ed.getLang('media.delta_width',0)),height:470+parseInt(ed.getLang('media.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('media',{title:'media.desc',cmd:'mceMedia'});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('media',n.nodeName=='IMG'&&isMediaElm(n));});ed.onInit.add(function(){var lo={mceItemFlash:'flash',mceItemShockWave:'shockwave',mceItemWindowsMedia:'windowsmedia',mceItemQuickTime:'quicktime',mceItemRealMedia:'realmedia'};ed.selection.onSetContent.add(function(){t._spansToImgs(ed.getBody());});ed.selection.onBeforeSetContent.add(t._objectsToSpans,t);if(ed.settings.content_css!==false)ed.dom.loadCSS(url+"/css/content.css");if(ed.theme.onResolveName){ed.theme.onResolveName.add(function(th,o){if(o.name=='img'){each(lo,function(v,k){if(ed.dom.hasClass(o.node,k)){o.name=v;o.title=ed.dom.getAttrib(o.node,'title');return false;}});}});}if(ed&&ed.plugins.contextmenu){ed.plugins.contextmenu.onContextMenu.add(function(th,m,e){if(e.nodeName=='IMG'&&/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(e.className)){m.add({title:'media.edit',icon:'media',cmd:'mceMedia'});}});}});ed.onBeforeSetContent.add(t._objectsToSpans,t);ed.onSetContent.add(function(){t._spansToImgs(ed.getBody());});ed.onPreProcess.add(function(ed,o){var dom=ed.dom;if(o.set){t._spansToImgs(o.node);each(dom.select('IMG',o.node),function(n){var p;if(isMediaElm(n)){p=t._parse(n.title);dom.setAttrib(n,'width',dom.getAttrib(n,'width',p.width||100));dom.setAttrib(n,'height',dom.getAttrib(n,'height',p.height||100));}});}if(o.get){each(dom.select('IMG',o.node),function(n){var ci,cb,mt;if(ed.getParam('media_use_script')){if(isMediaElm(n))n.className=n.className.replace(/mceItem/g,'mceTemp');return;}switch(n.className){case'mceItemFlash':ci='d27cdb6e-ae6d-11cf-96b8-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='application/x-shockwave-flash';break;case'mceItemShockWave':ci='166b1bca-3f9c-11cf-8075-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';mt='application/x-director';break;case'mceItemWindowsMedia':ci=ed.getParam('media_wmp6_compatible')?'05589fa1-c356-11ce-bf01-00aa0055595a':'6bf52a52-394a-11d3-b153-00c04f79faa6';cb='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';mt='application/x-mplayer2';break;case'mceItemQuickTime':ci='02bf25d5-8c17-4b23-bc80-d3488abddc6b';cb='http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';mt='video/quicktime';break;case'mceItemRealMedia':ci='cfcdaa03-8be4-11cf-b84b-0020afbbccfa';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='audio/x-pn-realaudio-plugin';break;}if(ci){dom.replace(t._buildObj({classid:ci,codebase:cb,type:mt},n),n);}});}});ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/_mce_value=/g,'value=');});if(ed.getParam('media_use_script')){function getAttr(s,n){n=new RegExp(n+'=\"([^\"]+)\"','g').exec(s);return n?ed.dom.decode(n[1]):'';};ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/]+>/g,function(im){var cl=getAttr(im,'class');if(/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(cl)){at=t._parse(getAttr(im,'title'));at.width=getAttr(im,'width');at.height=getAttr(im,'height');im='';}return im;});});}},getInfo:function(){return{longname:'Media',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_objectsToSpans:function(ed,o){var t=this,h=o.content;h=h.replace(/]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi,function(a,b,c){var o=t._parse(c);return''});h=h.replace(/]*)>/gi,'');h=h.replace(/]*)\/?>/gi,'');h=h.replace(/]*)>/gi,'');h=h.replace(/<\/(object)([^>]*)>/gi,'');h=h.replace(/<\/embed>/gi,'');h=h.replace(/]*)>/gi,function(a,b){return''});h=h.replace(/\/ class=\"mceItemParam\"><\/span>/gi,'class="mceItemParam">');o.content=h;},_buildObj:function(o,n){var ob,ed=this.editor,dom=ed.dom,p=this._parse(n.title),stc;stc=ed.getParam('media_strict',true)&&o.type=='application/x-shockwave-flash';p.width=o.width=dom.getAttrib(n,'width')||100;p.height=o.height=dom.getAttrib(n,'height')||100;if(p.src)p.src=ed.convertURL(p.src,'src',n);if(stc){ob=dom.create('span',{mce_name:'object',type:'application/x-shockwave-flash',data:p.src,width:o.width,height:o.height});}else{ob=dom.create('span',{mce_name:'object',classid:"clsid:"+o.classid,codebase:o.codebase,width:o.width,height:o.height});}each(p,function(v,k){if(!/^(width|height|codebase|classid|_cx|_cy)$/.test(k)){if(o.type=='application/x-mplayer2'&&k=='src')k='url';if(v)dom.add(ob,'span',{mce_name:'param',name:k,'_mce_value':v});}});if(!stc)dom.add(ob,'span',tinymce.extend({mce_name:'embed',type:o.type},p));return ob;},_spansToImgs:function(p){var t=this,dom=t.editor.dom,im,ci;each(dom.select('span',p),function(n){if(dom.getAttrib(n,'class')=='mceItemObject'){ci=dom.getAttrib(n,"classid").toLowerCase().replace(/\s+/g,'');switch(ci){case'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000':dom.replace(t._createImg('mceItemFlash',n),n);break;case'clsid:166b1bca-3f9c-11cf-8075-444553540000':dom.replace(t._createImg('mceItemShockWave',n),n);break;case'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6':case'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95':case'clsid:05589fa1-c356-11ce-bf01-00aa0055595a':dom.replace(t._createImg('mceItemWindowsMedia',n),n);break;case'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b':dom.replace(t._createImg('mceItemQuickTime',n),n);break;case'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa':dom.replace(t._createImg('mceItemRealMedia',n),n);break;default:dom.replace(t._createImg('mceItemFlash',n),n);}return;}if(dom.getAttrib(n,'class')=='mceItemEmbed'){switch(dom.getAttrib(n,'type')){case'application/x-shockwave-flash':dom.replace(t._createImg('mceItemFlash',n),n);break;case'application/x-director':dom.replace(t._createImg('mceItemShockWave',n),n);break;case'application/x-mplayer2':dom.replace(t._createImg('mceItemWindowsMedia',n),n);break;case'video/quicktime':dom.replace(t._createImg('mceItemQuickTime',n),n);break;case'audio/x-pn-realaudio-plugin':dom.replace(t._createImg('mceItemRealMedia',n),n);break;default:dom.replace(t._createImg('mceItemFlash',n),n);}}});},_createImg:function(cl,n){var im,dom=this.editor.dom,pa={},ti='',args;args=['id','name','width','height','bgcolor','align','flashvars','src','wmode','allowfullscreen','quality'];im=dom.create('img',{src:this.url+'/img/trans.gif',width:dom.getAttrib(n,'width')||100,height:dom.getAttrib(n,'height')||100,'class':cl});each(args,function(na){var v=dom.getAttrib(n,na);if(v)pa[na]=v;});each(dom.select('span',n),function(n){if(dom.hasClass(n,'mceItemParam'))pa[dom.getAttrib(n,'name')]=dom.getAttrib(n,'_mce_value');});if(pa.movie){pa.src=pa.movie;delete pa.movie;}n=dom.select('.mceItemEmbed',n)[0];if(n){each(args,function(na){var v=dom.getAttrib(n,na);if(v&&!pa[na])pa[na]=v;});}delete pa.width;delete pa.height;im.title=this._serialize(pa);return im;},_parse:function(s){return tinymce.util.JSON.parse('{'+s+'}');},_serialize:function(o){return tinymce.util.JSON.serialize(o).replace(/[{}]/g,'');}});tinymce.PluginManager.add('media',tinymce.plugins.MediaPlugin);})(); \ No newline at end of file +(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.MediaPlugin",{init:function(b,c){var e=this;e.editor=b;e.url=c;function f(g){return/^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(g.className)}b.onPreInit.add(function(){b.serializer.addRules("param[name|value|_mce_value]")});b.addCommand("mceMedia",function(){b.windowManager.open({file:c+"/media.htm",width:430+parseInt(b.getLang("media.delta_width",0)),height:470+parseInt(b.getLang("media.delta_height",0)),inline:1},{plugin_url:c})});b.addButton("media",{title:"media.desc",cmd:"mceMedia"});b.onNodeChange.add(function(h,g,i){g.setActive("media",i.nodeName=="IMG"&&f(i))});b.onInit.add(function(){var g={mceItemFlash:"flash",mceItemShockWave:"shockwave",mceItemWindowsMedia:"windowsmedia",mceItemQuickTime:"quicktime",mceItemRealMedia:"realmedia"};b.selection.onSetContent.add(function(){e._spansToImgs(b.getBody())});b.selection.onBeforeSetContent.add(e._objectsToSpans,e);if(b.settings.content_css!==false){b.dom.loadCSS(c+"/css/content.css")}if(b.theme&&b.theme.onResolveName){b.theme.onResolveName.add(function(h,i){if(i.name=="img"){a(g,function(l,j){if(b.dom.hasClass(i.node,j)){i.name=l;i.title=b.dom.getAttrib(i.node,"title");return false}})}})}if(b&&b.plugins.contextmenu){b.plugins.contextmenu.onContextMenu.add(function(i,h,j){if(j.nodeName=="IMG"&&/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(j.className)){h.add({title:"media.edit",icon:"media",cmd:"mceMedia"})}})}});b.onBeforeSetContent.add(e._objectsToSpans,e);b.onSetContent.add(function(){e._spansToImgs(b.getBody())});b.onPreProcess.add(function(g,i){var h=g.dom;if(i.set){e._spansToImgs(i.node);a(h.select("IMG",i.node),function(k){var j;if(f(k)){j=e._parse(k.title);h.setAttrib(k,"width",h.getAttrib(k,"width",j.width||100));h.setAttrib(k,"height",h.getAttrib(k,"height",j.height||100))}})}if(i.get){a(h.select("IMG",i.node),function(m){var l,j,k;if(g.getParam("media_use_script")){if(f(m)){m.className=m.className.replace(/mceItem/g,"mceTemp")}return}switch(m.className){case"mceItemFlash":l="d27cdb6e-ae6d-11cf-96b8-444553540000";j="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0";k="application/x-shockwave-flash";break;case"mceItemShockWave":l="166b1bca-3f9c-11cf-8075-444553540000";j="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0";k="application/x-director";break;case"mceItemWindowsMedia":l=g.getParam("media_wmp6_compatible")?"05589fa1-c356-11ce-bf01-00aa0055595a":"6bf52a52-394a-11d3-b153-00c04f79faa6";j="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701";k="application/x-mplayer2";break;case"mceItemQuickTime":l="02bf25d5-8c17-4b23-bc80-d3488abddc6b";j="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0";k="video/quicktime";break;case"mceItemRealMedia":l="cfcdaa03-8be4-11cf-b84b-0020afbbccfa";j="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0";k="audio/x-pn-realaudio-plugin";break}if(l){h.replace(e._buildObj({classid:l,codebase:j,type:k},m),m)}})}});b.onPostProcess.add(function(g,h){h.content=h.content.replace(/_mce_value=/g,"value=")});function d(g,h){h=new RegExp(h+'="([^"]+)"',"g").exec(g);return h?b.dom.decode(h[1]):""}b.onPostProcess.add(function(g,h){if(g.getParam("media_use_script")){h.content=h.content.replace(/]+>/g,function(j){var i=d(j,"class");if(/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(i)){at=e._parse(d(j,"title"));at.width=d(j,"width");at.height=d(j,"height");j=' - @@ -52,7 +51,7 @@
 
 


@@ -25,13 +24,8 @@
-
- -
- -
- -
+ +
diff --git a/webcit/tiny_mce/plugins/table/row.htm b/webcit/tiny_mce/plugins/table/row.htm index fe75bf607..092e6c827 100644 --- a/webcit/tiny_mce/plugins/table/row.htm +++ b/webcit/tiny_mce/plugins/table/row.htm @@ -8,10 +8,9 @@ - - +
-
-
-
- -
- -
+ + diff --git a/webcit/tiny_mce/plugins/table/table.htm b/webcit/tiny_mce/plugins/table/table.htm index 75136e607..f26903922 100644 --- a/webcit/tiny_mce/plugins/table/table.htm +++ b/webcit/tiny_mce/plugins/table/table.htm @@ -9,7 +9,6 @@ - @@ -58,7 +57,7 @@ @@ -109,9 +108,9 @@ - + - + @@ -141,14 +140,9 @@
-
- -
-
- -
+ +
- diff --git a/webcit/tiny_mce/plugins/xhtmlxtras/cite.htm b/webcit/tiny_mce/plugins/xhtmlxtras/cite.htm index 7d9eaba4d..d0a3e3a8e 100644 --- a/webcit/tiny_mce/plugins/xhtmlxtras/cite.htm +++ b/webcit/tiny_mce/plugins/xhtmlxtras/cite.htm @@ -9,7 +9,6 @@ - @@ -133,17 +132,10 @@
-
- -
-
- -
-
- -
+ + +
- diff --git a/webcit/tiny_mce/plugins/xhtmlxtras/del.htm b/webcit/tiny_mce/plugins/xhtmlxtras/del.htm index d03c4568a..8b07fa842 100644 --- a/webcit/tiny_mce/plugins/xhtmlxtras/del.htm +++ b/webcit/tiny_mce/plugins/xhtmlxtras/del.htm @@ -9,7 +9,6 @@ - @@ -31,7 +30,7 @@
- @@ -180,13 +179,8 @@
-
- -
- -
- -
+ +
diff --git a/webcit/tiny_mce/plugins/template/editor_plugin.js b/webcit/tiny_mce/plugins/template/editor_plugin.js index 0f7fb0158..ebe3c27d7 100644 --- a/webcit/tiny_mce/plugins/template/editor_plugin.js +++ b/webcit/tiny_mce/plugins/template/editor_plugin.js @@ -1 +1 @@ -(function(){var each=tinymce.each;tinymce.create('tinymce.plugins.TemplatePlugin',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceTemplate',function(ui){ed.windowManager.open({file:url+'/template.htm',width:ed.getParam('template_popup_width',750),height:ed.getParam('template_popup_height',600),inline:1},{plugin_url:url});});ed.addCommand('mceInsertTemplate',t._insertTemplate,t);ed.addButton('template',{title:'template.desc',cmd:'mceTemplate'});ed.onPreProcess.add(function(ed,o){var dom=ed.dom;each(dom.select('div',o.node),function(e){if(dom.hasClass(e,'mceTmpl')){each(dom.select('*',e),function(e){if(dom.hasClass(e,ed.getParam('template_mdate_classes','mdate').replace(/\s+/g,'|')))e.innerHTML=t._getDateTime(new Date(),ed.getParam("template_mdate_format",ed.getLang("template.mdate_format")));});t._replaceVals(e);}});});},getInfo:function(){return{longname:'Template plugin',author:'Moxiecode Systems AB',authorurl:'http://www.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/template',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_insertTemplate:function(ui,v){var t=this,ed=t.editor,h,el,dom=ed.dom,sel=ed.selection.getContent();h=v.content;each(t.editor.getParam('template_replace_values'),function(v,k){if(typeof(v)!='function')h=h.replace(new RegExp('\\{\\$'+k+'\\}','g'),v);});el=dom.create('div',null,h);n=dom.select('.mceTmpl',el);if(n&&n.length>0){el=dom.create('div',null);el.appendChild(n[0].cloneNode(true));}function hasClass(n,c){return new RegExp('\\b'+c+'\\b','g').test(n.className);};each(dom.select('*',el),function(n){if(hasClass(n,ed.getParam('template_cdate_classes','cdate').replace(/\s+/g,'|')))n.innerHTML=t._getDateTime(new Date(),ed.getParam("template_cdate_format",ed.getLang("template.cdate_format")));if(hasClass(n,ed.getParam('template_mdate_classes','mdate').replace(/\s+/g,'|')))n.innerHTML=t._getDateTime(new Date(),ed.getParam("template_mdate_format",ed.getLang("template.mdate_format")));if(hasClass(n,ed.getParam('template_selected_content_classes','selcontent').replace(/\s+/g,'|')))n.innerHTML=sel;});t._replaceVals(el);ed.execCommand('mceInsertContent',false,el.innerHTML);ed.addVisual();},_replaceVals:function(e){var dom=this.editor.dom,vl=this.editor.getParam('template_replace_values');each(dom.select('*',e),function(e){each(vl,function(v,k){if(dom.hasClass(e,k)){if(typeof(vl[k])=='function')vl[k](e);}});});},_getDateTime:function(d,fmt){if(!fmt)return"";function addZeros(value,len){var i;value=""+value;if(value.length0){c=d.create("div",null);c.appendChild(n[0].cloneNode(true))}function e(l,h){return new RegExp("\\b"+h+"\\b","g").test(l.className)}a(d.select("*",c),function(h){if(e(h,g.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))){h.innerHTML=k._getDateTime(new Date(),g.getParam("template_cdate_format",g.getLang("template.cdate_format")))}if(e(h,g.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))){h.innerHTML=k._getDateTime(new Date(),g.getParam("template_mdate_format",g.getLang("template.mdate_format")))}if(e(h,g.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))){h.innerHTML=b}});k._replaceVals(c);g.execCommand("mceInsertContent",false,c.innerHTML);g.addVisual()},_replaceVals:function(c){var d=this.editor.dom,b=this.editor.getParam("template_replace_values");a(d.select("*",c),function(f){a(b,function(g,e){if(d.hasClass(f,e)){if(typeof(b[e])=="function"){b[e](f)}}})})},_getDateTime:function(e,b){if(!b){return""}function c(g,d){var f;g=""+g;if(g.length -
@@ -24,15 +23,8 @@
-
- -
- -
- -
- -
+ +
diff --git a/webcit/tiny_mce/plugins/visualchars/editor_plugin.js b/webcit/tiny_mce/plugins/visualchars/editor_plugin.js index e1e4238a3..94719f93a 100644 --- a/webcit/tiny_mce/plugins/visualchars/editor_plugin.js +++ b/webcit/tiny_mce/plugins/visualchars/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.VisualChars',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceVisualChars',t._toggleVisualChars,t);ed.addButton('visualchars',{title:'visualchars.desc',cmd:'mceVisualChars'});ed.onBeforeGetContent.add(function(ed,o){if(t.state){t.state=true;t._toggleVisualChars();}});},getInfo:function(){return{longname:'Visual characters',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_toggleVisualChars:function(){var t=this,ed=t.editor,nl,i,h,d=ed.getDoc(),b=ed.getBody(),nv,s=ed.selection,bo;t.state=!t.state;ed.controlManager.setActive('visualchars',t.state);if(t.state){nl=[];tinymce.walk(b,function(n){if(n.nodeType==3&&n.nodeValue&&n.nodeValue.indexOf('\u00a0')!=-1)nl.push(n);},'childNodes');for(i=0;i$1');nv=nv.replace(/\u00a0/g,'\u00b7');ed.dom.setOuterHTML(nl[i],nv,d);}}else{nl=tinymce.grep(ed.dom.select('span',b),function(n){return ed.dom.hasClass(n,'mceVisualNbsp');});for(i=0;i$1');c=k.dom.create("div",null,l);while(node=c.lastChild){k.dom.insertAfter(node,a[g])}k.dom.remove(a[g])}}else{a=k.dom.select("span.mceItemNbsp",o);for(g=a.length-1;g>=0;g--){k.dom.remove(a[g],1)}}q.moveToBookmark(f)}});tinymce.PluginManager.add("visualchars",tinymce.plugins.VisualChars)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/visualchars/editor_plugin_src.js b/webcit/tiny_mce/plugins/visualchars/editor_plugin_src.js index 02ec4e698..35856e26a 100644 --- a/webcit/tiny_mce/plugins/visualchars/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/visualchars/editor_plugin_src.js @@ -1,8 +1,11 @@ /** - * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ + * editor_plugin_src.js * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -19,9 +22,9 @@ ed.addButton('visualchars', {title : 'visualchars.desc', cmd : 'mceVisualChars'}); ed.onBeforeGetContent.add(function(ed, o) { - if (t.state) { + if (t.state && o.format != 'raw' && !o.draft) { t.state = true; - t._toggleVisualChars(); + t._toggleVisualChars(false); } }); }, @@ -38,12 +41,15 @@ // Private methods - _toggleVisualChars : function() { - var t = this, ed = t.editor, nl, i, h, d = ed.getDoc(), b = ed.getBody(), nv, s = ed.selection, bo; + _toggleVisualChars : function(bookmark) { + var t = this, ed = t.editor, nl, i, h, d = ed.getDoc(), b = ed.getBody(), nv, s = ed.selection, bo, div, bm; t.state = !t.state; ed.controlManager.setActive('visualchars', t.state); + if (bookmark) + bm = s.getBookmark(); + if (t.state) { nl = []; tinymce.walk(b, function(n) { @@ -51,20 +57,24 @@ nl.push(n); }, 'childNodes'); - for (i=0; i$1'); - nv = nv.replace(/\u00a0/g, '\u00b7'); - ed.dom.setOuterHTML(nl[i], nv, d); + nv = nv.replace(/(\u00a0)/g, '$1'); + + div = ed.dom.create('div', null, nv); + while (node = div.lastChild) + ed.dom.insertAfter(node, nl[i]); + + ed.dom.remove(nl[i]); } } else { - nl = tinymce.grep(ed.dom.select('span', b), function(n) { - return ed.dom.hasClass(n, 'mceVisualNbsp'); - }); + nl = ed.dom.select('span.mceItemNbsp', b); - for (i=0; i= 0; i--) + ed.dom.remove(nl[i], 1); } + + s.moveToBookmark(bm); } }); diff --git a/webcit/tiny_mce/plugins/wordcount/editor_plugin.js b/webcit/tiny_mce/plugins/wordcount/editor_plugin.js new file mode 100644 index 000000000..a099e6a8c --- /dev/null +++ b/webcit/tiny_mce/plugins/wordcount/editor_plugin.js @@ -0,0 +1 @@ +(function(){tinymce.create("tinymce.plugins.WordCount",{block:0,id:null,countre:null,cleanre:null,init:function(a,b){var c=this,d=0;c.countre=a.getParam("wordcount_countregex",/\S\s+/g);c.cleanre=a.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$¿'"_+=\\\/-]*/g);c.id=a.id+"-word-count";a.onPostRender.add(function(f,e){var g,h;h=f.getParam("wordcount_target_id");if(!h){g=tinymce.DOM.get(f.id+"_path_row");if(g){tinymce.DOM.add(g.parentNode,"div",{style:"float: right"},f.getLang("wordcount.words","Words: ")+'0')}}else{tinymce.DOM.add(h,"span",{},'0')}});a.onInit.add(function(e){e.selection.onSetContent.add(function(){c._count(e)});c._count(e)});a.onSetContent.add(function(e){c._count(e)});a.onKeyUp.add(function(f,g){if(g.keyCode==d){return}if(13==g.keyCode||8==d||46==d){c._count(f)}d=g.keyCode})},_count:function(b){var c=this,a=0;if(c.block){return}c.block=1;setTimeout(function(){var d=b.getContent({format:"raw"});if(d){d=d.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ");d=d.replace(c.cleanre,"");d.replace(c.countre,function(){a++})}tinymce.DOM.setHTML(c.id,a.toString());setTimeout(function(){c.block=0},2000)},1)},getInfo:function(){return{longname:"Word Count plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("wordcount",tinymce.plugins.WordCount)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/wordcount/editor_plugin_src.js b/webcit/tiny_mce/plugins/wordcount/editor_plugin_src.js new file mode 100644 index 000000000..5cb92fa0f --- /dev/null +++ b/webcit/tiny_mce/plugins/wordcount/editor_plugin_src.js @@ -0,0 +1,98 @@ +/** + * editor_plugin_src.js + * + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing + */ + +(function() { + tinymce.create('tinymce.plugins.WordCount', { + block : 0, + id : null, + countre : null, + cleanre : null, + + init : function(ed, url) { + var t = this, last = 0; + + t.countre = ed.getParam('wordcount_countregex', /\S\s+/g); + t.cleanre = ed.getParam('wordcount_cleanregex', /[0-9.(),;:!?%#$¿'"_+=\\\/-]*/g); + t.id = ed.id + '-word-count'; + + ed.onPostRender.add(function(ed, cm) { + var row, id; + + // Add it to the specified id or the theme advanced path + id = ed.getParam('wordcount_target_id'); + if (!id) { + row = tinymce.DOM.get(ed.id + '_path_row'); + + if (row) + tinymce.DOM.add(row.parentNode, 'div', {'style': 'float: right'}, ed.getLang('wordcount.words', 'Words: ') + '0'); + } else + tinymce.DOM.add(id, 'span', {}, '0'); + }); + + ed.onInit.add(function(ed) { + ed.selection.onSetContent.add(function() { + t._count(ed); + }); + + t._count(ed); + }); + + ed.onSetContent.add(function(ed) { + t._count(ed); + }); + + ed.onKeyUp.add(function(ed, e) { + if (e.keyCode == last) + return; + + if (13 == e.keyCode || 8 == last || 46 == last) + t._count(ed); + + last = e.keyCode; + }); + }, + + _count : function(ed) { + var t = this, tc = 0; + + // Keep multiple calls from happening at the same time + if (t.block) + return; + + t.block = 1; + + setTimeout(function() { + var tx = ed.getContent({format : 'raw'}); + + if (tx) { + tx = tx.replace(/<.[^<>]*?>/g, ' ').replace(/ | /gi, ' '); // remove html tags and space chars + tx = tx.replace(t.cleanre, ''); // remove numbers and punctuation + tx.replace(t.countre, function() {tc++;}); // count the words + } + + tinymce.DOM.setHTML(t.id, tc.toString()); + + setTimeout(function() {t.block = 0;}, 2000); + }, 1); + }, + + getInfo: function() { + return { + longname : 'Word Count plugin', + author : 'Moxiecode Systems AB', + authorurl : 'http://tinymce.moxiecode.com', + infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount', + version : tinymce.majorVersion + "." + tinymce.minorVersion + }; + } + }); + + tinymce.PluginManager.add('wordcount', tinymce.plugins.WordCount); +})(); diff --git a/webcit/tiny_mce/plugins/xhtmlxtras/abbr.htm b/webcit/tiny_mce/plugins/xhtmlxtras/abbr.htm index 580028432..3aeac0deb 100644 --- a/webcit/tiny_mce/plugins/xhtmlxtras/abbr.htm +++ b/webcit/tiny_mce/plugins/xhtmlxtras/abbr.htm @@ -9,7 +9,6 @@ -
@@ -133,17 +132,10 @@
-
- -
-
- -
-
- -
+ + +
-
diff --git a/webcit/tiny_mce/plugins/xhtmlxtras/acronym.htm b/webcit/tiny_mce/plugins/xhtmlxtras/acronym.htm index 54e4c9d9e..31ee7b70f 100644 --- a/webcit/tiny_mce/plugins/xhtmlxtras/acronym.htm +++ b/webcit/tiny_mce/plugins/xhtmlxtras/acronym.htm @@ -9,7 +9,6 @@ -
@@ -133,17 +132,10 @@
-
- -
-
- -
-
- -
+ + +
-
diff --git a/webcit/tiny_mce/plugins/xhtmlxtras/attributes.htm b/webcit/tiny_mce/plugins/xhtmlxtras/attributes.htm index cfbb409ab..17054da3e 100644 --- a/webcit/tiny_mce/plugins/xhtmlxtras/attributes.htm +++ b/webcit/tiny_mce/plugins/xhtmlxtras/attributes.htm @@ -8,7 +8,6 @@ -
@@ -36,12 +35,12 @@
::
- +
@@ -153,18 +152,10 @@
-
- -
-
- -
-
- -
+ + +
- - diff --git a/webcit/tiny_mce/plugins/xhtmlxtras/editor_plugin.js b/webcit/tiny_mce/plugins/xhtmlxtras/editor_plugin.js index 00c178e53..a9393ad6d 100644 --- a/webcit/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +++ b/webcit/tiny_mce/plugins/xhtmlxtras/editor_plugin.js @@ -1 +1 @@ -(function(){tinymce.create('tinymce.plugins.XHTMLXtrasPlugin',{init:function(ed,url){ed.addCommand('mceCite',function(){ed.windowManager.open({file:url+'/cite.htm',width:350+parseInt(ed.getLang('xhtmlxtras.cite_delta_width',0)),height:250+parseInt(ed.getLang('xhtmlxtras.cite_delta_height',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAcronym',function(){ed.windowManager.open({file:url+'/acronym.htm',width:350+parseInt(ed.getLang('xhtmlxtras.acronym_delta_width',0)),height:250+parseInt(ed.getLang('xhtmlxtras.acronym_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAbbr',function(){ed.windowManager.open({file:url+'/abbr.htm',width:350+parseInt(ed.getLang('xhtmlxtras.abbr_delta_width',0)),height:250+parseInt(ed.getLang('xhtmlxtras.abbr_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceDel',function(){ed.windowManager.open({file:url+'/del.htm',width:340+parseInt(ed.getLang('xhtmlxtras.del_delta_width',0)),height:310+parseInt(ed.getLang('xhtmlxtras.del_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceIns',function(){ed.windowManager.open({file:url+'/ins.htm',width:340+parseInt(ed.getLang('xhtmlxtras.ins_delta_width',0)),height:310+parseInt(ed.getLang('xhtmlxtras.ins_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAttributes',function(){ed.windowManager.open({file:url+'/attributes.htm',width:380,height:370,inline:1},{plugin_url:url});});ed.addButton('cite',{title:'xhtmlxtras.cite_desc',cmd:'mceCite'});ed.addButton('acronym',{title:'xhtmlxtras.acronym_desc',cmd:'mceAcronym'});ed.addButton('abbr',{title:'xhtmlxtras.abbr_desc',cmd:'mceAbbr'});ed.addButton('del',{title:'xhtmlxtras.del_desc',cmd:'mceDel'});ed.addButton('ins',{title:'xhtmlxtras.ins_desc',cmd:'mceIns'});ed.addButton('attribs',{title:'xhtmlxtras.attribs_desc',cmd:'mceAttributes'});if(tinymce.isIE){function fix(ed,o){if(o.set){o.content=o.content.replace(/]+)>/gi,'');o.content=o.content.replace(/<\/abbr>/gi,'');}};ed.onBeforeSetContent.add(fix);ed.onPostProcess.add(fix);}ed.onNodeChange.add(function(ed,cm,n,co){n=ed.dom.getParent(n,'CITE,ACRONYM,ABBR,DEL,INS');cm.setDisabled('cite',co);cm.setDisabled('acronym',co);cm.setDisabled('abbr',co);cm.setDisabled('del',co);cm.setDisabled('ins',co);cm.setDisabled('attribs',n&&n.nodeName=='BODY');cm.setActive('cite',0);cm.setActive('acronym',0);cm.setActive('abbr',0);cm.setActive('del',0);cm.setActive('ins',0);if(n){do{cm.setDisabled(n.nodeName.toLowerCase(),0);cm.setActive(n.nodeName.toLowerCase(),1);}while(n=n.parentNode);}});},getInfo:function(){return{longname:'XHTML Xtras Plugin',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('xhtmlxtras',tinymce.plugins.XHTMLXtrasPlugin);})(); \ No newline at end of file +(function(){tinymce.create("tinymce.plugins.XHTMLXtrasPlugin",{init:function(a,b){a.addCommand("mceCite",function(){a.windowManager.open({file:b+"/cite.htm",width:350+parseInt(a.getLang("xhtmlxtras.cite_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.cite_delta_height",0)),inline:1},{plugin_url:b})});a.addCommand("mceAcronym",function(){a.windowManager.open({file:b+"/acronym.htm",width:350+parseInt(a.getLang("xhtmlxtras.acronym_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.acronym_delta_width",0)),inline:1},{plugin_url:b})});a.addCommand("mceAbbr",function(){a.windowManager.open({file:b+"/abbr.htm",width:350+parseInt(a.getLang("xhtmlxtras.abbr_delta_width",0)),height:250+parseInt(a.getLang("xhtmlxtras.abbr_delta_width",0)),inline:1},{plugin_url:b})});a.addCommand("mceDel",function(){a.windowManager.open({file:b+"/del.htm",width:340+parseInt(a.getLang("xhtmlxtras.del_delta_width",0)),height:310+parseInt(a.getLang("xhtmlxtras.del_delta_width",0)),inline:1},{plugin_url:b})});a.addCommand("mceIns",function(){a.windowManager.open({file:b+"/ins.htm",width:340+parseInt(a.getLang("xhtmlxtras.ins_delta_width",0)),height:310+parseInt(a.getLang("xhtmlxtras.ins_delta_width",0)),inline:1},{plugin_url:b})});a.addCommand("mceAttributes",function(){a.windowManager.open({file:b+"/attributes.htm",width:380,height:370,inline:1},{plugin_url:b})});a.addButton("cite",{title:"xhtmlxtras.cite_desc",cmd:"mceCite"});a.addButton("acronym",{title:"xhtmlxtras.acronym_desc",cmd:"mceAcronym"});a.addButton("abbr",{title:"xhtmlxtras.abbr_desc",cmd:"mceAbbr"});a.addButton("del",{title:"xhtmlxtras.del_desc",cmd:"mceDel"});a.addButton("ins",{title:"xhtmlxtras.ins_desc",cmd:"mceIns"});a.addButton("attribs",{title:"xhtmlxtras.attribs_desc",cmd:"mceAttributes"});a.onNodeChange.add(function(d,c,f,e){f=d.dom.getParent(f,"CITE,ACRONYM,ABBR,DEL,INS");c.setDisabled("cite",e);c.setDisabled("acronym",e);c.setDisabled("abbr",e);c.setDisabled("del",e);c.setDisabled("ins",e);c.setDisabled("attribs",f&&f.nodeName=="BODY");c.setActive("cite",0);c.setActive("acronym",0);c.setActive("abbr",0);c.setActive("del",0);c.setActive("ins",0);if(f){do{c.setDisabled(f.nodeName.toLowerCase(),0);c.setActive(f.nodeName.toLowerCase(),1)}while(f=f.parentNode)}});a.onPreInit.add(function(){a.dom.create("abbr")})},getInfo:function(){return{longname:"XHTML Xtras Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("xhtmlxtras",tinymce.plugins.XHTMLXtrasPlugin)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js b/webcit/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js index bef06f2d2..5f9d9bd50 100644 --- a/webcit/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +++ b/webcit/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js @@ -1,8 +1,11 @@ /** - * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ + * editor_plugin_src.js * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { @@ -83,18 +86,6 @@ ed.addButton('ins', {title : 'xhtmlxtras.ins_desc', cmd : 'mceIns'}); ed.addButton('attribs', {title : 'xhtmlxtras.attribs_desc', cmd : 'mceAttributes'}); - if (tinymce.isIE) { - function fix(ed, o) { - if (o.set) { - o.content = o.content.replace(/]+)>/gi, ''); - o.content = o.content.replace(/<\/abbr>/gi, ''); - } - }; - - ed.onBeforeSetContent.add(fix); - ed.onPostProcess.add(fix); - } - ed.onNodeChange.add(function(ed, cm, n, co) { n = ed.dom.getParent(n, 'CITE,ACRONYM,ABBR,DEL,INS'); @@ -118,6 +109,11 @@ } while (n = n.parentNode); } }); + + ed.onPreInit.add(function() { + // Fixed IE issue where it can't handle these elements correctly + ed.dom.create('abbr'); + }); }, getInfo : function() { diff --git a/webcit/tiny_mce/plugins/xhtmlxtras/ins.htm b/webcit/tiny_mce/plugins/xhtmlxtras/ins.htm index c0f056ff3..6c5470cfc 100644 --- a/webcit/tiny_mce/plugins/xhtmlxtras/ins.htm +++ b/webcit/tiny_mce/plugins/xhtmlxtras/ins.htm @@ -9,7 +9,6 @@ -
@@ -31,7 +30,7 @@ - +
@@ -153,18 +152,10 @@
-
- -
-
- -
-
- -
+ + +
-
- diff --git a/webcit/tiny_mce/plugins/xhtmlxtras/js/abbr.js b/webcit/tiny_mce/plugins/xhtmlxtras/js/abbr.js index e84b6a837..4b51a2572 100644 --- a/webcit/tiny_mce/plugins/xhtmlxtras/js/abbr.js +++ b/webcit/tiny_mce/plugins/xhtmlxtras/js/abbr.js @@ -1,8 +1,11 @@ - /** - * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ +/** + * abbr.js * - * @author Moxiecode - based on work by Andrew Tetlaw - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ function init() { @@ -13,7 +16,7 @@ function init() { } function insertAbbr() { - SXE.insertElement(tinymce.isIE ? 'html:abbr' : 'abbr'); + SXE.insertElement('abbr'); tinyMCEPopup.close(); } diff --git a/webcit/tiny_mce/plugins/xhtmlxtras/js/acronym.js b/webcit/tiny_mce/plugins/xhtmlxtras/js/acronym.js index 933d122cb..6ec2f8871 100644 --- a/webcit/tiny_mce/plugins/xhtmlxtras/js/acronym.js +++ b/webcit/tiny_mce/plugins/xhtmlxtras/js/acronym.js @@ -1,8 +1,11 @@ - /** - * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ +/** + * acronym.js * - * @author Moxiecode - based on work by Andrew Tetlaw - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ function init() { diff --git a/webcit/tiny_mce/plugins/xhtmlxtras/js/attributes.js b/webcit/tiny_mce/plugins/xhtmlxtras/js/attributes.js index 23c7fa4c2..d62a219e6 100644 --- a/webcit/tiny_mce/plugins/xhtmlxtras/js/attributes.js +++ b/webcit/tiny_mce/plugins/xhtmlxtras/js/attributes.js @@ -1,8 +1,11 @@ - /** - * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ +/** + * attributes.js * - * @author Moxiecode - based on work by Andrew Tetlaw - * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ function init() { diff --git a/webcit/tiny_mce/plugins/xhtmlxtras/js/cite.js b/webcit/tiny_mce/plugins/xhtmlxtras/js/cite.js index c36f7fd87..009b71546 100644 --- a/webcit/tiny_mce/plugins/xhtmlxtras/js/cite.js +++ b/webcit/tiny_mce/plugins/xhtmlxtras/js/cite.js @@ -1,8 +1,11 @@ - /** - * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ +/** + * cite.js * - * @author Moxiecode - based on work by Andrew Tetlaw - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ function init() { diff --git a/webcit/tiny_mce/plugins/xhtmlxtras/js/del.js b/webcit/tiny_mce/plugins/xhtmlxtras/js/del.js index 7049f2beb..9e5d8c571 100644 --- a/webcit/tiny_mce/plugins/xhtmlxtras/js/del.js +++ b/webcit/tiny_mce/plugins/xhtmlxtras/js/del.js @@ -1,8 +1,11 @@ - /** - * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ +/** + * del.js * - * @author Moxiecode - based on work by Andrew Tetlaw - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ function init() { diff --git a/webcit/tiny_mce/plugins/xhtmlxtras/js/element_common.js b/webcit/tiny_mce/plugins/xhtmlxtras/js/element_common.js index 5cdeb21a4..5b494a566 100644 --- a/webcit/tiny_mce/plugins/xhtmlxtras/js/element_common.js +++ b/webcit/tiny_mce/plugins/xhtmlxtras/js/element_common.js @@ -1,8 +1,11 @@ - /** - * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ +/** + * element_common.js * - * @author Moxiecode - based on work by Andrew Tetlaw - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ tinyMCEPopup.requireLangPack(); @@ -157,9 +160,6 @@ SXE.insertElement = function(element_name) { if(s.length > 0) { tagName = element_name; - if (tinymce.isIE && element_name.indexOf('html:') == 0) - element_name = element_name.substring(5).toLowerCase(); - insertInlineElement(element_name); var elementArray = tinymce.grep(SXE.inst.dom.select(element_name)); for (var i=0; i + {#advanced_dlg.about_title} @@ -48,9 +48,7 @@
-
- -
+
diff --git a/webcit/tiny_mce/themes/advanced/anchor.htm b/webcit/tiny_mce/themes/advanced/anchor.htm index 9e4c0b91a..2bc63fcfd 100644 --- a/webcit/tiny_mce/themes/advanced/anchor.htm +++ b/webcit/tiny_mce/themes/advanced/anchor.htm @@ -4,7 +4,6 @@ {#advanced_dlg.anchor_title} -
@@ -13,19 +12,14 @@ {#advanced_dlg.anchor_title} - {#advanced_dlg.anchor_name}: + {#advanced_dlg.anchor_name}:
-
- -
- -
- -
+ +
diff --git a/webcit/tiny_mce/themes/advanced/charmap.htm b/webcit/tiny_mce/themes/advanced/charmap.htm index e4c734484..3991b8141 100644 --- a/webcit/tiny_mce/themes/advanced/charmap.htm +++ b/webcit/tiny_mce/themes/advanced/charmap.htm @@ -1,11 +1,9 @@ - + {#advanced_dlg.charmap_title} - - diff --git a/webcit/tiny_mce/themes/advanced/color_picker.htm b/webcit/tiny_mce/themes/advanced/color_picker.htm index a8f297c60..096e7550c 100644 --- a/webcit/tiny_mce/themes/advanced/color_picker.htm +++ b/webcit/tiny_mce/themes/advanced/color_picker.htm @@ -5,7 +5,6 @@ - @@ -22,7 +21,7 @@
{#advanced_dlg.colorpicker_picker_title}
- +
@@ -61,9 +60,7 @@
-
- -
+
diff --git a/webcit/tiny_mce/themes/advanced/editor_template.js b/webcit/tiny_mce/themes/advanced/editor_template.js index d72d5425f..c5a1719a7 100644 --- a/webcit/tiny_mce/themes/advanced/editor_template.js +++ b/webcit/tiny_mce/themes/advanced/editor_template.js @@ -1 +1 @@ -(function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,extend=tinymce.extend,each=tinymce.each,Cookie=tinymce.util.Cookie,lastExtID,explode=tinymce.explode;tinymce.ThemeManager.requireLangPack('advanced');tinymce.create('tinymce.themes.AdvancedTheme',{sizes:[8,10,12,14,18,24,36],controls:{bold:['bold_desc','Bold'],italic:['italic_desc','Italic'],underline:['underline_desc','Underline'],strikethrough:['striketrough_desc','Strikethrough'],justifyleft:['justifyleft_desc','JustifyLeft'],justifycenter:['justifycenter_desc','JustifyCenter'],justifyright:['justifyright_desc','JustifyRight'],justifyfull:['justifyfull_desc','JustifyFull'],bullist:['bullist_desc','InsertUnorderedList'],numlist:['numlist_desc','InsertOrderedList'],outdent:['outdent_desc','Outdent'],indent:['indent_desc','Indent'],cut:['cut_desc','Cut'],copy:['copy_desc','Copy'],paste:['paste_desc','Paste'],undo:['undo_desc','Undo'],redo:['redo_desc','Redo'],link:['link_desc','mceLink'],unlink:['unlink_desc','unlink'],image:['image_desc','mceImage'],cleanup:['cleanup_desc','mceCleanup'],help:['help_desc','mceHelp'],code:['code_desc','mceCodeEditor'],hr:['hr_desc','InsertHorizontalRule'],removeformat:['removeformat_desc','RemoveFormat'],sub:['sub_desc','subscript'],sup:['sup_desc','superscript'],forecolor:['forecolor_desc','ForeColor'],forecolorpicker:['forecolor_desc','mceForeColor'],backcolor:['backcolor_desc','HiliteColor'],backcolorpicker:['backcolor_desc','mceBackColor'],charmap:['charmap_desc','mceCharMap'],visualaid:['visualaid_desc','mceToggleVisualAid'],anchor:['anchor_desc','mceInsertAnchor'],newdocument:['newdocument_desc','mceNewDocument'],blockquote:['blockquote_desc','mceBlockQuote']},stateControls:['bold','italic','underline','strikethrough','bullist','numlist','justifyleft','justifycenter','justifyright','justifyfull','sub','sup','blockquote'],init:function(ed,url){var t=this,s,v,o;t.editor=ed;t.url=url;t.onResolveName=new tinymce.util.Dispatcher(this);t.settings=s=extend({theme_advanced_path:true,theme_advanced_toolbar_location:'bottom',theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",readonly:ed.settings.readonly},ed.settings);if(!s.font_size_style_values)s.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt";if(tinymce.is(s.theme_advanced_font_sizes,'string')){s.font_size_style_values=tinymce.explode(s.font_size_style_values);s.font_size_classes=tinymce.explode(s.font_size_classes||'');o={};ed.settings.theme_advanced_font_sizes=s.theme_advanced_font_sizes;each(ed.getParam('theme_advanced_font_sizes','','hash'),function(v,k){var cl;if(k==v&&v>=1&&v<=7){k=v+' ('+t.sizes[v-1]+'pt)';if(ed.settings.convert_fonts_to_spans){cl=s.font_size_classes[v-1];v=s.font_size_style_values[v-1]||(t.sizes[v-1]+'pt');}}if(/\s*\./.test(v))cl=v.replace(/\./g,'');o[k]=cl?{'class':cl}:{fontSize:v};});s.theme_advanced_font_sizes=o;}if((v=s.theme_advanced_path_location)&&v!='none')s.theme_advanced_statusbar_location=s.theme_advanced_path_location;if(s.theme_advanced_statusbar_location=='none')s.theme_advanced_statusbar_location=0;ed.onInit.add(function(){ed.onNodeChange.add(t._nodeChanged,t);if(ed.settings.content_css!==false)ed.dom.loadCSS(ed.baseURI.toAbsolute("themes/advanced/skins/"+ed.settings.skin+"/content.css"));});ed.onSetProgressState.add(function(ed,b,ti){var co,id=ed.id,tb;if(b){t.progressTimer=setTimeout(function(){co=ed.getContainer();co=co.insertBefore(DOM.create('DIV',{style:'position:relative'}),co.firstChild);tb=DOM.get(ed.id+'_tbl');DOM.add(co,'div',{id:id+'_blocker','class':'mceBlocker',style:{width:tb.clientWidth+2,height:tb.clientHeight+2}});DOM.add(co,'div',{id:id+'_progress','class':'mceProgress',style:{left:tb.clientWidth/ 2, top : tb.clientHeight /2}});},ti||0);}else{DOM.remove(id+'_blocker');DOM.remove(id+'_progress');clearTimeout(t.progressTimer);}});DOM.loadCSS(s.editor_css?ed.documentBaseURI.toAbsolute(s.editor_css):url+"/skins/"+ed.settings.skin+"/ui.css");if(s.skin_variant)DOM.loadCSS(url+"/skins/"+ed.settings.skin+"/ui_"+s.skin_variant+".css");},createControl:function(n,cf){var cd,c;if(c=cf.createControl(n))return c;switch(n){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu();}if((cd=this.controls[n]))return cf.createButton(n,{title:"advanced."+cd[0],cmd:cd[1],ui:cd[2],value:cd[3]});},execCommand:function(cmd,ui,val){var f=this['_'+cmd];if(f){f.call(this,ui,val);return true;}return false;},_importClasses:function(e){var ed=this.editor,c=ed.controlManager.get('styleselect');if(c.getLength()==0){each(ed.dom.getClasses(),function(o){c.add(o['class'],o['class']);});}},_createStyleSelect:function(n){var t=this,ed=t.editor,cf=ed.controlManager,c=cf.createListBox('styleselect',{title:'advanced.style_select',onselect:function(v){if(c.selectedValue===v){ed.execCommand('mceSetStyleInfo',0,{command:'removeformat'});c.select();return false;}else ed.execCommand('mceSetCSSClass',0,v);}});if(c){each(ed.getParam('theme_advanced_styles','','hash'),function(v,k){if(v)c.add(t.editor.translate(k),v);});c.onPostRender.add(function(ed,n){if(!c.NativeListBox){Event.add(n.id+'_text','focus',t._importClasses,t);Event.add(n.id+'_text','mousedown',t._importClasses,t);Event.add(n.id+'_open','focus',t._importClasses,t);Event.add(n.id+'_open','mousedown',t._importClasses,t);}else Event.add(n.id,'focus',t._importClasses,t);});}return c;},_createFontSelect:function(){var c,t=this,ed=t.editor;c=ed.controlManager.createListBox('fontselect',{title:'advanced.fontdefault',cmd:'FontName'});if(c){each(ed.getParam('theme_advanced_fonts',t.settings.theme_advanced_fonts,'hash'),function(v,k){c.add(ed.translate(k),v,{style:v.indexOf('dings')==-1?'font-family:'+v:''});});}return c;},_createFontSizeSelect:function(){var t=this,ed=t.editor,c,i=0,cl=[];c=ed.controlManager.createListBox('fontsizeselect',{title:'advanced.font_size',onselect:function(v){if(v.fontSize)ed.execCommand('FontSize',false,v.fontSize);else{each(t.settings.theme_advanced_font_sizes,function(v,k){if(v['class'])cl.push(v['class']);});ed.editorCommands._applyInlineStyle('span',{'class':v['class']},{check_classes:cl});}}});if(c){each(t.settings.theme_advanced_font_sizes,function(v,k){var fz=v.fontSize;if(fz>=1&&fz<=7)fz=t.sizes[parseInt(fz)-1]+'pt';c.add(k,v,{'style':'font-size:'+fz,'class':'mceFontSize'+(i++)+(' '+(v['class']||''))});});}return c;},_createBlockFormats:function(){var c,fmts={p:'advanced.paragraph',address:'advanced.address',pre:'advanced.pre',h1:'advanced.h1',h2:'advanced.h2',h3:'advanced.h3',h4:'advanced.h4',h5:'advanced.h5',h6:'advanced.h6',div:'advanced.div',blockquote:'advanced.blockquote',code:'advanced.code',dt:'advanced.dt',dd:'advanced.dd',samp:'advanced.samp'},t=this;c=t.editor.controlManager.createListBox('formatselect',{title:'advanced.block',cmd:'FormatBlock'});if(c){each(t.editor.getParam('theme_advanced_blockformats',t.settings.theme_advanced_blockformats,'hash'),function(v,k){c.add(t.editor.translate(k!=v?k:fmts[v]),v,{'class':'mce_formatPreview mce_'+v});});}return c;},_createForeColorMenu:function(){var c,t=this,s=t.settings,o={},v;if(s.theme_advanced_more_colors){o.more_colors_func=function(){t._mceColorPicker(0,{color:c.value,func:function(co){c.setColor(co);}});};}if(v=s.theme_advanced_text_colors)o.colors=v;if(s.theme_advanced_default_foreground_color)o.default_color=s.theme_advanced_default_foreground_color;o.title='advanced.forecolor_desc';o.cmd='ForeColor';o.scope=this;c=t.editor.controlManager.createColorSplitButton('forecolor',o);return c;},_createBackColorMenu:function(){var c,t=this,s=t.settings,o={},v;if(s.theme_advanced_more_colors){o.more_colors_func=function(){t._mceColorPicker(0,{color:c.value,func:function(co){c.setColor(co);}});};}if(v=s.theme_advanced_background_colors)o.colors=v;if(s.theme_advanced_default_background_color)o.default_color=s.theme_advanced_default_background_color;o.title='advanced.backcolor_desc';o.cmd='HiliteColor';o.scope=this;c=t.editor.controlManager.createColorSplitButton('backcolor',o);return c;},renderUI:function(o){var n,ic,tb,t=this,ed=t.editor,s=t.settings,sc,p,nl;n=p=DOM.create('span',{id:ed.id+'_parent','class':'mceEditor '+ed.settings.skin+'Skin'+(s.skin_variant?' '+ed.settings.skin+'Skin'+t._ufirst(s.skin_variant):'')});if(!DOM.boxModel)n=DOM.add(n,'div',{'class':'mceOldBoxModel'});n=sc=DOM.add(n,'table',{id:ed.id+'_tbl','class':'mceLayout',cellSpacing:0,cellPadding:0});n=tb=DOM.add(n,'tbody');switch((s.theme_advanced_layout_manager||'').toLowerCase()){case"rowlayout":ic=t._rowLayout(s,tb,o);break;case"customlayout":ic=ed.execCallback("theme_advanced_custom_layout",s,tb,o,p);break;default:ic=t._simpleLayout(s,tb,o,p);}n=o.targetNode;nl=DOM.stdMode?sc.getElementsByTagName('tr'):sc.rows;DOM.addClass(nl[0],'mceFirst');DOM.addClass(nl[nl.length-1],'mceLast');each(DOM.select('tr',tb),function(n){DOM.addClass(n.firstChild,'mceFirst');DOM.addClass(n.childNodes[n.childNodes.length-1],'mceLast');});if(DOM.get(s.theme_advanced_toolbar_container))DOM.get(s.theme_advanced_toolbar_container).appendChild(p);else DOM.insertAfter(p,n);Event.add(ed.id+'_path_row','click',function(e){e=e.target;if(e.nodeName=='A'){t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/,'$1'));return Event.cancel(e);}});if(!ed.getParam('accessibility_focus')||ed.getParam('tab_focus'))Event.add(DOM.add(p,'a',{href:'#'},''),'focus',function(){tinyMCE.get(ed.id).focus();});if(s.theme_advanced_toolbar_location=='external')o.deltaHeight=0;t.deltaHeight=o.deltaHeight;o.targetNode=null;return{iframeContainer:ic,editorContainer:ed.id+'_parent',sizeContainer:sc,deltaHeight:o.deltaHeight};},getInfo:function(){return{longname:'Advanced theme',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',version:tinymce.majorVersion+"."+tinymce.minorVersion}},resizeBy:function(dw,dh){var e=DOM.get(this.editor.id+'_tbl');this.resizeTo(e.clientWidth+dw,e.clientHeight+dh);},resizeTo:function(w,h){var ed=this.editor,s=ed.settings,e=DOM.get(ed.id+'_tbl'),ifr=DOM.get(ed.id+'_ifr'),dh;w=Math.max(s.theme_advanced_resizing_min_width||100,w);h=Math.max(s.theme_advanced_resizing_min_height||100,h);w=Math.min(s.theme_advanced_resizing_max_width||0xFFFF,w);h=Math.min(s.theme_advanced_resizing_max_height||0xFFFF,h);dh=e.clientHeight-ifr.clientHeight;DOM.setStyle(ifr,'height',h-dh);DOM.setStyles(e,{width:w,height:h});},destroy:function(){var id=this.editor.id;Event.clear(id+'_resize');Event.clear(id+'_path_row');Event.clear(id+'_external_close');},_simpleLayout:function(s,tb,o,p){var t=this,ed=t.editor,lo=s.theme_advanced_toolbar_location,sl=s.theme_advanced_statusbar_location,n,ic,etb,c;if(s.readonly){n=DOM.add(tb,'tr');n=ic=DOM.add(n,'td',{'class':'mceIframeContainer'});return ic;}if(lo=='top')t._addToolbars(tb,o);if(lo=='external'){n=c=DOM.create('div',{style:'position:relative'});n=DOM.add(n,'div',{id:ed.id+'_external','class':'mceExternalToolbar'});DOM.add(n,'a',{id:ed.id+'_external_close',href:'javascript:;','class':'mceExternalClose'});n=DOM.add(n,'table',{id:ed.id+'_tblext',cellSpacing:0,cellPadding:0});etb=DOM.add(n,'tbody');if(p.firstChild.className=='mceOldBoxModel')p.firstChild.appendChild(c);else p.insertBefore(c,p.firstChild);t._addToolbars(etb,o);ed.onMouseUp.add(function(){var e=DOM.get(ed.id+'_external');DOM.show(e);DOM.hide(lastExtID);var f=Event.add(ed.id+'_external_close','click',function(){DOM.hide(ed.id+'_external');Event.remove(ed.id+'_external_close','click',f);});DOM.show(e);DOM.setStyle(e,'top',0-DOM.getRect(ed.id+'_tblext').h-1);DOM.hide(e);DOM.show(e);e.style.filter='';lastExtID=ed.id+'_external';e=null;});}if(sl=='top')t._addStatusBar(tb,o);if(!s.theme_advanced_toolbar_container){n=DOM.add(tb,'tr');n=ic=DOM.add(n,'td',{'class':'mceIframeContainer'});}if(lo=='bottom')t._addToolbars(tb,o);if(sl=='bottom')t._addStatusBar(tb,o);return ic;},_rowLayout:function(s,tb,o){var t=this,ed=t.editor,dc,da,cf=ed.controlManager,n,ic,to,a;dc=s.theme_advanced_containers_default_class||'';da=s.theme_advanced_containers_default_align||'center';each(explode(s.theme_advanced_containers||''),function(c,i){var v=s['theme_advanced_container_'+c]||'';switch(v.toLowerCase()){case'mceeditor':n=DOM.add(tb,'tr');n=ic=DOM.add(n,'td',{'class':'mceIframeContainer'});break;case'mceelementpath':t._addStatusBar(tb,o);break;default:a=(s['theme_advanced_container_'+c+'_align']||da).toLowerCase();a='mce'+t._ufirst(a);n=DOM.add(DOM.add(tb,'tr'),'td',{'class':'mceToolbar '+(s['theme_advanced_container_'+c+'_class']||dc)+' '+a||da});to=cf.createToolbar("toolbar"+i);t._addControls(v,to);DOM.setHTML(n,to.renderHTML());o.deltaHeight-=s.theme_advanced_row_height;}});return ic;},_addControls:function(v,tb){var t=this,s=t.settings,di,cf=t.editor.controlManager;if(s.theme_advanced_disable&&!t._disabled){di={};each(explode(s.theme_advanced_disable),function(v){di[v]=1;});t._disabled=di;}else di=t._disabled;each(explode(v),function(n){var c;if(di&&di[n])return;if(n=='tablecontrols'){each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"],function(n){n=t.createControl(n,cf);if(n)tb.add(n);});return;}c=t.createControl(n,cf);if(c)tb.add(c);});},_addToolbars:function(c,o){var t=this,i,tb,ed=t.editor,s=t.settings,v,cf=ed.controlManager,di,n,h=[],a;a=s.theme_advanced_toolbar_align.toLowerCase();a='mce'+t._ufirst(a);n=DOM.add(DOM.add(c,'tr'),'td',{'class':'mceToolbar '+a});if(!ed.getParam('accessibility_focus')||ed.getParam('tab_focus'))h.push(DOM.createHTML('a',{href:'#',onfocus:'tinyMCE.get(\''+ed.id+'\').focus();'},''));h.push(DOM.createHTML('a',{href:'#',accesskey:'q',title:ed.getLang("advanced.toolbar_focus")},''));for(i=1;(v=s['theme_advanced_buttons'+i]);i++){tb=cf.createToolbar("toolbar"+i,{'class':'mceToolbarRow'+i});if(s['theme_advanced_buttons'+i+'_add'])v+=','+s['theme_advanced_buttons'+i+'_add'];if(s['theme_advanced_buttons'+i+'_add_before'])v=s['theme_advanced_buttons'+i+'_add_before']+','+v;t._addControls(v,tb);h.push(tb.renderHTML());o.deltaHeight-=s.theme_advanced_row_height;}h.push(DOM.createHTML('a',{href:'#',accesskey:'z',title:ed.getLang("advanced.toolbar_focus"),onfocus:'tinyMCE.getInstanceById(\''+ed.id+'\').focus();'},''));DOM.setHTML(n,h.join(''));},_addStatusBar:function(tb,o){var n,t=this,ed=t.editor,s=t.settings,r,mf,me,td;n=DOM.add(tb,'tr');n=td=DOM.add(n,'td',{'class':'mceStatusbar'});n=DOM.add(n,'div',{id:ed.id+'_path_row'},s.theme_advanced_path?ed.translate('advanced.path')+': ':' ');DOM.add(n,'a',{href:'#',accesskey:'x'});if(s.theme_advanced_resizing&&!tinymce.isOldWebKit){DOM.add(td,'a',{id:ed.id+'_resize',href:'javascript:;',onclick:"return false;",'class':'mceResize'});if(s.theme_advanced_resizing_use_cookie){ed.onPostRender.add(function(){var o=Cookie.getHash("TinyMCE_"+ed.id+"_size"),c=DOM.get(ed.id+'_tbl');if(!o)return;if(s.theme_advanced_resize_horizontal)c.style.width=Math.max(10,o.cw)+'px';c.style.height=Math.max(10,o.ch)+'px';DOM.get(ed.id+'_ifr').style.height=Math.max(10,parseInt(o.ch)+t.deltaHeight)+'px';});}ed.onPostRender.add(function(){Event.add(ed.id+'_resize','mousedown',function(e){var c,p,w,h,n,pa;c=DOM.get(ed.id+'_tbl');w=c.clientWidth;h=c.clientHeight;miw=s.theme_advanced_resizing_min_width||100;mih=s.theme_advanced_resizing_min_height||100;maw=s.theme_advanced_resizing_max_width||0xFFFF;mah=s.theme_advanced_resizing_max_height||0xFFFF;p=DOM.add(DOM.get(ed.id+'_parent'),'div',{'class':'mcePlaceHolder'});DOM.setStyles(p,{width:w,height:h});DOM.hide(c);DOM.show(p);r={x:e.screenX,y:e.screenY,w:w,h:h,dx:null,dy:null};mf=Event.add(DOM.doc,'mousemove',function(e){var w,h;r.dx=e.screenX-r.x;r.dy=e.screenY-r.y;w=Math.max(miw,r.w+r.dx);h=Math.max(mih,r.h+r.dy);w=Math.min(maw,w);h=Math.min(mah,h);if(s.theme_advanced_resize_horizontal)p.style.width=w+'px';p.style.height=h+'px';return Event.cancel(e);});me=Event.add(DOM.doc,'mouseup',function(e){var ifr;Event.remove(DOM.doc,'mousemove',mf);Event.remove(DOM.doc,'mouseup',me);c.style.display='';DOM.remove(p);if(r.dx===null)return;ifr=DOM.get(ed.id+'_ifr');if(s.theme_advanced_resize_horizontal)c.style.width=Math.max(10,r.w+r.dx)+'px';c.style.height=Math.max(10,r.h+r.dy)+'px';ifr.style.height=Math.max(10,ifr.clientHeight+r.dy)+'px';if(s.theme_advanced_resizing_use_cookie){Cookie.setHash("TinyMCE_"+ed.id+"_size",{cw:r.w+r.dx,ch:r.h+r.dy});}});return Event.cancel(e);});});}o.deltaHeight-=21;n=tb=null;},_nodeChanged:function(ed,cm,n,co){var t=this,p,de=0,v,c,s=t.settings,cl,fz,fn;if(s.readonly)return;tinymce.each(t.stateControls,function(c){cm.setActive(c,ed.queryCommandState(t.controls[c][1]));});cm.setActive('visualaid',ed.hasVisual);cm.setDisabled('undo',!ed.undoManager.hasUndo()&&!ed.typing);cm.setDisabled('redo',!ed.undoManager.hasRedo());cm.setDisabled('outdent',!ed.queryCommandState('Outdent'));p=DOM.getParent(n,'A');if(c=cm.get('link')){if(!p||!p.name){c.setDisabled(!p&&co);c.setActive(!!p);}}if(c=cm.get('unlink')){c.setDisabled(!p&&co);c.setActive(!!p&&!p.name);}if(c=cm.get('anchor')){c.setActive(!!p&&p.name);if(tinymce.isWebKit){p=DOM.getParent(n,'IMG');c.setActive(!!p&&DOM.getAttrib(p,'mce_name')=='a');}}p=DOM.getParent(n,'IMG');if(c=cm.get('image'))c.setActive(!!p&&n.className.indexOf('mceItem')==-1);if(c=cm.get('styleselect')){if(n.className){t._importClasses();c.select(n.className);}else c.select();}if(c=cm.get('formatselect')){p=DOM.getParent(n,DOM.isBlock);if(p)c.select(p.nodeName.toLowerCase());}if(ed.settings.convert_fonts_to_spans){ed.dom.getParent(n,function(n){if(n.nodeName==='SPAN'){if(!cl&&n.className)cl=n.className;if(!fz&&n.style.fontSize)fz=n.style.fontSize;if(!fn&&n.style.fontFamily)fn=n.style.fontFamily.replace(/[\"\']+/g,'').replace(/^([^,]+).*/,'$1').toLowerCase();}return false;});if(c=cm.get('fontselect')){c.select(function(v){return v.replace(/^([^,]+).*/,'$1').toLowerCase()==fn;});}if(c=cm.get('fontsizeselect')){c.select(function(v){if(v.fontSize&&v.fontSize===fz)return true;if(v['class']&&v['class']===cl)return true;});}}else{if(c=cm.get('fontselect'))c.select(ed.queryCommandValue('FontName'));if(c=cm.get('fontsizeselect')){v=ed.queryCommandValue('FontSize');c.select(function(iv){return iv.fontSize==v;});}}if(s.theme_advanced_path&&s.theme_advanced_statusbar_location){p=DOM.get(ed.id+'_path')||DOM.add(ed.id+'_path_row','span',{id:ed.id+'_path'});DOM.setHTML(p,'');ed.dom.getParent(n,function(n){var na=n.nodeName.toLowerCase(),u,pi,ti='';if(n.nodeType!=1||n.nodeName==='BR'||(DOM.hasClass(n,'mceItemHidden')||DOM.hasClass(n,'mceItemRemoved')))return;if(v=DOM.getAttrib(n,'mce_name'))na=v;if(tinymce.isIE&&n.scopeName!=='HTML')na=n.scopeName+':'+na;na=na.replace(/mce\:/g,'');switch(na){case'b':na='strong';break;case'i':na='em';break;case'img':if(v=DOM.getAttrib(n,'src'))ti+='src: '+v+' ';break;case'a':if(v=DOM.getAttrib(n,'name')){ti+='name: '+v+' ';na+='#'+v;}if(v=DOM.getAttrib(n,'href'))ti+='href: '+v+' ';break;case'font':if(s.convert_fonts_to_spans)na='span';if(v=DOM.getAttrib(n,'face'))ti+='font: '+v+' ';if(v=DOM.getAttrib(n,'size'))ti+='size: '+v+' ';if(v=DOM.getAttrib(n,'color'))ti+='color: '+v+' ';break;case'span':if(v=DOM.getAttrib(n,'style'))ti+='style: '+v+' ';break;}if(v=DOM.getAttrib(n,'id'))ti+='id: '+v+' ';if(v=n.className){v=v.replace(/(webkit-[\w\-]+|Apple-[\w\-]+|mceItem\w+|mceVisualAid)/g,'');if(v&&v.indexOf('mceItem')==-1){ti+='class: '+v+' ';if(DOM.isBlock(n)||na=='img'||na=='span')na+='.'+v;}}na=na.replace(/(html:)/g,'');na={name:na,node:n,title:ti};t.onResolveName.dispatch(t,na);ti=na.title;na=na.name;pi=DOM.create('a',{'href':"javascript:;",onmousedown:"return false;",title:ti,'class':'mcePath_'+(de++)},na);if(p.hasChildNodes()){p.insertBefore(DOM.doc.createTextNode(' \u00bb '),p.firstChild);p.insertBefore(pi,p.firstChild);}else p.appendChild(pi);},ed.getBody());}},_sel:function(v){this.editor.execCommand('mceSelectNodeDepth',false,v);},_mceInsertAnchor:function(ui,v){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/anchor.htm',width:320+parseInt(ed.getLang('advanced.anchor_delta_width',0)),height:90+parseInt(ed.getLang('advanced.anchor_delta_height',0)),inline:true},{theme_url:this.url});},_mceCharMap:function(){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/charmap.htm',width:550+parseInt(ed.getLang('advanced.charmap_delta_width',0)),height:250+parseInt(ed.getLang('advanced.charmap_delta_height',0)),inline:true},{theme_url:this.url});},_mceHelp:function(){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/about.htm',width:480,height:380,inline:true},{theme_url:this.url});},_mceColorPicker:function(u,v){var ed=this.editor;v=v||{};ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/color_picker.htm',width:375+parseInt(ed.getLang('advanced.colorpicker_delta_width',0)),height:250+parseInt(ed.getLang('advanced.colorpicker_delta_height',0)),close_previous:false,inline:true},{input_color:v.color,func:v.func,theme_url:this.url});},_mceCodeEditor:function(ui,val){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/source_editor.htm',width:parseInt(ed.getParam("theme_advanced_source_editor_width",720)),height:parseInt(ed.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url});},_mceImage:function(ui,val){var ed=this.editor;if(ed.dom.getAttrib(ed.selection.getNode(),'class').indexOf('mceItem')!=-1)return;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/image.htm',width:355+parseInt(ed.getLang('advanced.image_delta_width',0)),height:275+parseInt(ed.getLang('advanced.image_delta_height',0)),inline:true},{theme_url:this.url});},_mceLink:function(ui,val){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/link.htm',width:310+parseInt(ed.getLang('advanced.link_delta_width',0)),height:200+parseInt(ed.getLang('advanced.link_delta_height',0)),inline:true},{theme_url:this.url});},_mceNewDocument:function(){var ed=this.editor;ed.windowManager.confirm('advanced.newdocument',function(s){if(s)ed.execCommand('mceSetContent',false,'');});},_mceForeColor:function(){var t=this;this._mceColorPicker(0,{color:t.fgColor,func:function(co){t.fgColor=co;t.editor.execCommand('ForeColor',false,co);}});},_mceBackColor:function(){var t=this;this._mceColorPicker(0,{color:t.bgColor,func:function(co){t.bgColor=co;t.editor.execCommand('HiliteColor',false,co);}});},_ufirst:function(s){return s.substring(0,1).toUpperCase()+s.substring(1);}});tinymce.ThemeManager.add('advanced',tinymce.themes.AdvancedTheme);}()); \ No newline at end of file +(function(e){var d=e.DOM,b=e.dom.Event,h=e.extend,f=e.each,a=e.util.Cookie,g,c=e.explode;e.ThemeManager.requireLangPack("advanced");e.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(j,k){var l=this,m,i,n;l.editor=j;l.url=k;l.onResolveName=new e.util.Dispatcher(this);l.settings=m=h({theme_advanced_path:true,theme_advanced_toolbar_location:"bottom",theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",readonly:j.settings.readonly},j.settings);if(!m.font_size_style_values){m.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(e.is(m.theme_advanced_font_sizes,"string")){m.font_size_style_values=e.explode(m.font_size_style_values);m.font_size_classes=e.explode(m.font_size_classes||"");n={};j.settings.theme_advanced_font_sizes=m.theme_advanced_font_sizes;f(j.getParam("theme_advanced_font_sizes","","hash"),function(q,p){var o;if(p==q&&q>=1&&q<=7){p=q+" ("+l.sizes[q-1]+"pt)";o=m.font_size_classes[q-1];q=m.font_size_style_values[q-1]||(l.sizes[q-1]+"pt")}if(/^\s*\./.test(q)){o=q.replace(/\./g,"")}n[p]=o?{"class":o}:{fontSize:q}});m.theme_advanced_font_sizes=n}if((i=m.theme_advanced_path_location)&&i!="none"){m.theme_advanced_statusbar_location=m.theme_advanced_path_location}if(m.theme_advanced_statusbar_location=="none"){m.theme_advanced_statusbar_location=0}j.onInit.add(function(){if(!j.settings.readonly){j.onNodeChange.add(l._nodeChanged,l)}if(j.settings.content_css!==false){j.dom.loadCSS(j.baseURI.toAbsolute(k+"/skins/"+j.settings.skin+"/content.css"))}});j.onSetProgressState.add(function(q,o,r){var s,t=q.id,p;if(o){l.progressTimer=setTimeout(function(){s=q.getContainer();s=s.insertBefore(d.create("DIV",{style:"position:relative"}),s.firstChild);p=d.get(q.id+"_tbl");d.add(s,"div",{id:t+"_blocker","class":"mceBlocker",style:{width:p.clientWidth+2,height:p.clientHeight+2}});d.add(s,"div",{id:t+"_progress","class":"mceProgress",style:{left:p.clientWidth/2,top:p.clientHeight/2}})},r||0)}else{d.remove(t+"_blocker");d.remove(t+"_progress");clearTimeout(l.progressTimer)}});d.loadCSS(m.editor_css?j.documentBaseURI.toAbsolute(m.editor_css):k+"/skins/"+j.settings.skin+"/ui.css");if(m.skin_variant){d.loadCSS(k+"/skins/"+j.settings.skin+"/ui_"+m.skin_variant+".css")}},createControl:function(l,i){var j,k;if(k=i.createControl(l)){return k}switch(l){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((j=this.controls[l])){return i.createButton(l,{title:"advanced."+j[0],cmd:j[1],ui:j[2],value:j[3]})}},execCommand:function(k,j,l){var i=this["_"+k];if(i){i.call(this,j,l);return true}return false},_importClasses:function(k){var i=this.editor,j=i.controlManager.get("styleselect");if(j.getLength()==0){f(i.dom.getClasses(),function(n,l){var m="style_"+l;i.formatter.register(m,{inline:"span",attributes:{"class":n["class"]},selector:"*"});j.add(n["class"],m)})}},_createStyleSelect:function(m){var k=this,i=k.editor,j=i.controlManager,l;l=j.createListBox("styleselect",{title:"advanced.style_select",onselect:function(o){var p,n=[];f(l.items,function(q){n.push(q.value)});i.focus();i.undoManager.add();p=i.formatter.matchAll(n);if(!o||p[0]==o){i.formatter.remove(p[0])}else{i.formatter.apply(o)}i.undoManager.add();i.nodeChanged();return false}});i.onInit.add(function(){var o=0,n=i.getParam("style_formats");if(n){f(n,function(p){var q,r=0;f(p,function(){r++});if(r>1){q=p.name=p.name||"style_"+(o++);i.formatter.register(q,p);l.add(p.title,q)}else{l.add(p.title)}})}else{f(i.getParam("theme_advanced_styles","","hash"),function(r,q){var p;if(r){p="style_"+(o++);i.formatter.register(p,{inline:"span",classes:r,selector:"*"});l.add(k.editor.translate(q),p)}})}});if(l.getLength()==0){l.onPostRender.add(function(o,p){if(!l.NativeListBox){b.add(p.id+"_text","focus",k._importClasses,k);b.add(p.id+"_text","mousedown",k._importClasses,k);b.add(p.id+"_open","focus",k._importClasses,k);b.add(p.id+"_open","mousedown",k._importClasses,k)}else{b.add(p.id,"focus",k._importClasses,k)}})}return l},_createFontSelect:function(){var k,j=this,i=j.editor;k=i.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(l){var m=k.items[k.selectedIndex];if(!l&&m){i.execCommand("FontName",false,m.value);return}i.execCommand("FontName",false,l);k.select(function(n){return l==n});return false}});if(k){f(i.getParam("theme_advanced_fonts",j.settings.theme_advanced_fonts,"hash"),function(m,l){k.add(i.translate(l),m,{style:m.indexOf("dings")==-1?"font-family:"+m:""})})}return k},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(i){var o=n.items[n.selectedIndex];if(!i&&o){o=o.value;if(o["class"]){k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}return}if(i["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:i["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,i.fontSize)}n.select(function(p){return i==p});return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(o,i){var p=o.fontSize;if(p>=1&&p<=7){p=m.sizes[parseInt(p)-1]+"pt"}n.add(i,o,{style:"font-size:"+p,"class":"mceFontSize"+(l++)+(" "+(o["class"]||""))})})}return n},_createBlockFormats:function(){var k,i={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},j=this;k=j.editor.controlManager.createListBox("formatselect",{title:"advanced.block",cmd:"FormatBlock"});if(k){f(j.editor.getParam("theme_advanced_blockformats",j.settings.theme_advanced_blockformats,"hash"),function(m,l){k.add(j.editor.translate(l!=m?l:i[m]),m,{"class":"mce_formatPreview mce_"+m})})}return k},_createForeColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_text_colors){l.colors=i}if(k.theme_advanced_default_foreground_color){l.default_color=k.theme_advanced_default_foreground_color}l.title="advanced.forecolor_desc";l.cmd="ForeColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("forecolor",l);return m},_createBackColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_background_colors){l.colors=i}if(k.theme_advanced_default_background_color){l.default_color=k.theme_advanced_default_background_color}l.title="advanced.backcolor_desc";l.cmd="HiliteColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("backcolor",l);return m},renderUI:function(k){var m,l,q,v=this,r=v.editor,w=v.settings,u,j,i;m=j=d.create("span",{id:r.id+"_parent","class":"mceEditor "+r.settings.skin+"Skin"+(w.skin_variant?" "+r.settings.skin+"Skin"+v._ufirst(w.skin_variant):"")});if(!d.boxModel){m=d.add(m,"div",{"class":"mceOldBoxModel"})}m=u=d.add(m,"table",{id:r.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});m=q=d.add(m,"tbody");switch((w.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":l=v._rowLayout(w,q,k);break;case"customlayout":l=r.execCallback("theme_advanced_custom_layout",w,q,k,j);break;default:l=v._simpleLayout(w,q,k,j)}m=k.targetNode;i=d.stdMode?u.getElementsByTagName("tr"):u.rows;d.addClass(i[0],"mceFirst");d.addClass(i[i.length-1],"mceLast");f(d.select("tr",q),function(o){d.addClass(o.firstChild,"mceFirst");d.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(d.get(w.theme_advanced_toolbar_container)){d.get(w.theme_advanced_toolbar_container).appendChild(j)}else{d.insertAfter(j,m)}b.add(r.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){v._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return b.cancel(n)}});if(!r.getParam("accessibility_focus")){b.add(d.add(j,"a",{href:"#"},""),"focus",function(){tinyMCE.get(r.id).focus()})}if(w.theme_advanced_toolbar_location=="external"){k.deltaHeight=0}v.deltaHeight=k.deltaHeight;k.targetNode=null;return{iframeContainer:l,editorContainer:r.id+"_parent",sizeContainer:u,deltaHeight:k.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:e.majorVersion+"."+e.minorVersion}},resizeBy:function(i,j){var k=d.get(this.editor.id+"_tbl");this.resizeTo(k.clientWidth+i,k.clientHeight+j)},resizeTo:function(i,m,k){var j=this.editor,l=this.settings,n=d.get(j.id+"_tbl"),o=d.get(j.id+"_ifr");i=Math.max(l.theme_advanced_resizing_min_width||100,i);m=Math.max(l.theme_advanced_resizing_min_height||100,m);i=Math.min(l.theme_advanced_resizing_max_width||65535,i);m=Math.min(l.theme_advanced_resizing_max_height||65535,m);d.setStyle(n,"height","");d.setStyle(o,"height",m);if(l.theme_advanced_resize_horizontal){d.setStyle(n,"width","");d.setStyle(o,"width",i);if(i"))}q.push(d.createHTML("a",{href:"#",accesskey:"q",title:r.getLang("advanced.toolbar_focus")},""));for(p=1;(y=A["theme_advanced_buttons"+p]);p++){m=j.createToolbar("toolbar"+p,{"class":"mceToolbarRow"+p});if(A["theme_advanced_buttons"+p+"_add"]){y+=","+A["theme_advanced_buttons"+p+"_add"]}if(A["theme_advanced_buttons"+p+"_add_before"]){y=A["theme_advanced_buttons"+p+"_add_before"]+","+y}z._addControls(y,m);q.push(m.renderHTML());k.deltaHeight-=A.theme_advanced_row_height}q.push(d.createHTML("a",{href:"#",accesskey:"z",title:r.getLang("advanced.toolbar_focus"),onfocus:"tinyMCE.getInstanceById('"+r.id+"').focus();"},""));d.setHTML(l,q.join(""))},_addStatusBar:function(m,j){var k,v=this,p=v.editor,w=v.settings,i,q,u,l;k=d.add(m,"tr");k=l=d.add(k,"td",{"class":"mceStatusbar"});k=d.add(k,"div",{id:p.id+"_path_row"},w.theme_advanced_path?p.translate("advanced.path")+": ":" ");d.add(k,"a",{href:"#",accesskey:"x"});if(w.theme_advanced_resizing){d.add(l,"a",{id:p.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize"});if(w.theme_advanced_resizing_use_cookie){p.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+p.id+"_size"),r=d.get(p.id+"_tbl");if(!n){return}v.resizeTo(n.cw,n.ch)})}p.onPostRender.add(function(){b.add(p.id+"_resize","click",function(n){n.preventDefault()});b.add(p.id+"_resize","mousedown",function(D){var t,r,s,o,C,z,A,F,n,E,x;function y(G){G.preventDefault();n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E)}function B(G){b.remove(d.doc,"mousemove",t);b.remove(p.getDoc(),"mousemove",r);b.remove(d.doc,"mouseup",s);b.remove(p.getDoc(),"mouseup",o);n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E,true)}D.preventDefault();C=D.screenX;z=D.screenY;x=d.get(v.editor.id+"_ifr");A=n=x.clientWidth;F=E=x.clientHeight;t=b.add(d.doc,"mousemove",y);r=b.add(p.getDoc(),"mousemove",y);s=b.add(d.doc,"mouseup",B);o=b.add(p.getDoc(),"mouseup",B)})})}j.deltaHeight-=21;k=m=null},_nodeChanged:function(r,z,l,x,j){var C=this,i,y=0,B,u,D=C.settings,A,k,w,m,q;e.each(C.stateControls,function(n){z.setActive(n,r.queryCommandState(C.controls[n][1]))});function o(p){var s,n=j.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s= 1 && v <= 7) { k = v + ' (' + t.sizes[v - 1] + 'pt)'; - - if (ed.settings.convert_fonts_to_spans) { - cl = s.font_size_classes[v - 1]; - v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt'); - } + cl = s.font_size_classes[v - 1]; + v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt'); } - if (/\s*\./.test(v)) + if (/^\s*\./.test(v)) cl = v.replace(/\./g, ''); o[k] = cl ? {'class' : cl} : {fontSize : v}; @@ -121,10 +121,11 @@ // Init editor ed.onInit.add(function() { - ed.onNodeChange.add(t._nodeChanged, t); + if (!ed.settings.readonly) + ed.onNodeChange.add(t._nodeChanged, t); if (ed.settings.content_css !== false) - ed.dom.loadCSS(ed.baseURI.toAbsolute("themes/advanced/skins/" + ed.settings.skin + "/content.css")); + ed.dom.loadCSS(ed.baseURI.toAbsolute(url + "/skins/" + ed.settings.skin + "/content.css")); }); ed.onSetProgressState.add(function(ed, b, ti) { @@ -194,36 +195,93 @@ }, _importClasses : function(e) { - var ed = this.editor, c = ed.controlManager.get('styleselect'); + var ed = this.editor, ctrl = ed.controlManager.get('styleselect'); + + if (ctrl.getLength() == 0) { + each(ed.dom.getClasses(), function(o, idx) { + var name = 'style_' + idx; - if (c.getLength() == 0) { - each(ed.dom.getClasses(), function(o) { - c.add(o['class'], o['class']); + ed.formatter.register(name, { + inline : 'span', + attributes : {'class' : o['class']}, + selector : '*' + }); + + ctrl.add(o['class'], name); }); } }, _createStyleSelect : function(n) { - var t = this, ed = t.editor, cf = ed.controlManager, c = cf.createListBox('styleselect', { + var t = this, ed = t.editor, ctrlMan = ed.controlManager, ctrl; + + // Setup style select box + ctrl = ctrlMan.createListBox('styleselect', { title : 'advanced.style_select', - onselect : function(v) { - if (c.selectedValue === v) { - ed.execCommand('mceSetStyleInfo', 0, {command : 'removeformat'}); - c.select(); - return false; - } else - ed.execCommand('mceSetCSSClass', 0, v); + onselect : function(name) { + var matches, formatNames = []; + + each(ctrl.items, function(item) { + formatNames.push(item.value); + }); + + ed.focus(); + ed.undoManager.add(); + + // Toggle off the current format + matches = ed.formatter.matchAll(formatNames); + if (!name || matches[0] == name) + ed.formatter.remove(matches[0]); + else + ed.formatter.apply(name); + + ed.undoManager.add(); + ed.nodeChanged(); + + return false; // No auto select } }); - if (c) { - each(ed.getParam('theme_advanced_styles', '', 'hash'), function(v, k) { - if (v) - c.add(t.editor.translate(k), v); - }); + // Handle specified format + ed.onInit.add(function() { + var counter = 0, formats = ed.getParam('style_formats'); + + if (formats) { + each(formats, function(fmt) { + var name, keys = 0; + + each(fmt, function() {keys++;}); + + if (keys > 1) { + name = fmt.name = fmt.name || 'style_' + (counter++); + ed.formatter.register(name, fmt); + ctrl.add(fmt.title, name); + } else + ctrl.add(fmt.title); + }); + } else { + each(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) { + var name; + + if (val) { + name = 'style_' + (counter++); + + ed.formatter.register(name, { + inline : 'span', + classes : val, + selector : '*' + }); + + ctrl.add(t.editor.translate(key), name); + } + }); + } + }); - c.onPostRender.add(function(ed, n) { - if (!c.NativeListBox) { + // Auto import classes if the ctrl box is empty + if (ctrl.getLength() == 0) { + ctrl.onPostRender.add(function(ed, n) { + if (!ctrl.NativeListBox) { Event.add(n.id + '_text', 'focus', t._importClasses, t); Event.add(n.id + '_text', 'mousedown', t._importClasses, t); Event.add(n.id + '_open', 'focus', t._importClasses, t); @@ -233,13 +291,33 @@ }); } - return c; + return ctrl; }, _createFontSelect : function() { var c, t = this, ed = t.editor; - c = ed.controlManager.createListBox('fontselect', {title : 'advanced.fontdefault', cmd : 'FontName'}); + c = ed.controlManager.createListBox('fontselect', { + title : 'advanced.fontdefault', + onselect : function(v) { + var cur = c.items[c.selectedIndex]; + + if (!v && cur) { + ed.execCommand('FontName', false, cur.value); + return; + } + + ed.execCommand('FontName', false, v); + + // Fake selection, execCommand will fire a nodeChange and update the selection + c.select(function(sv) { + return v == sv; + }); + + return false; // No auto select + } + }); + if (c) { each(ed.getParam('theme_advanced_fonts', t.settings.theme_advanced_fonts, 'hash'), function(v, k) { c.add(ed.translate(k), v, {style : v.indexOf('dings') == -1 ? 'font-family:' + v : ''}); @@ -253,16 +331,37 @@ var t = this, ed = t.editor, c, i = 0, cl = []; c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) { - if (v.fontSize) - ed.execCommand('FontSize', false, v.fontSize); - else { - each(t.settings.theme_advanced_font_sizes, function(v, k) { - if (v['class']) - cl.push(v['class']); - }); + var cur = c.items[c.selectedIndex]; + + if (!v && cur) { + cur = cur.value; - ed.editorCommands._applyInlineStyle('span', {'class' : v['class']}, {check_classes : cl}); + if (cur['class']) { + ed.formatter.toggle('fontsize_class', {value : cur['class']}); + ed.undoManager.add(); + ed.nodeChanged(); + } else { + ed.execCommand('FontSize', false, cur.fontSize); + } + + return; } + + if (v['class']) { + ed.focus(); + ed.undoManager.add(); + ed.formatter.toggle('fontsize_class', {value : v['class']}); + ed.undoManager.add(); + ed.nodeChanged(); + } else + ed.execCommand('FontSize', false, v.fontSize); + + // Fake selection, execCommand will fire a nodeChange and update the selection + c.select(function(sv) { + return v == sv; + }); + + return false; // No auto select }}); if (c) { @@ -440,7 +539,7 @@ } */ - if (!ed.getParam('accessibility_focus') || ed.getParam('tab_focus')) + if (!ed.getParam('accessibility_focus')) Event.add(DOM.add(p, 'a', {href : '#'}, ''), 'focus', function() {tinyMCE.get(ed.id).focus();}); if (s.theme_advanced_toolbar_location == 'external') @@ -472,8 +571,8 @@ this.resizeTo(e.clientWidth + dw, e.clientHeight + dh); }, - resizeTo : function(w, h) { - var ed = this.editor, s = ed.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr'), dh; + resizeTo : function(w, h, store) { + var ed = this.editor, s = this.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr'); // Boundery fix box w = Math.max(s.theme_advanced_resizing_min_width || 100, w); @@ -481,12 +580,28 @@ w = Math.min(s.theme_advanced_resizing_max_width || 0xFFFF, w); h = Math.min(s.theme_advanced_resizing_max_height || 0xFFFF, h); - // Calc difference between iframe and container - dh = e.clientHeight - ifr.clientHeight; - // Resize iframe and container - DOM.setStyle(ifr, 'height', h - dh); - DOM.setStyles(e, {width : w, height : h}); + DOM.setStyle(e, 'height', ''); + DOM.setStyle(ifr, 'height', h); + + if (s.theme_advanced_resize_horizontal) { + DOM.setStyle(e, 'width', ''); + DOM.setStyle(ifr, 'width', w); + + // Make sure that the size is never smaller than the over all ui + if (w < e.clientWidth) { + w = e.clientWidth; + DOM.setStyle(ifr, 'width', e.clientWidth); + } + } + + // Store away the size + if (store && s.theme_advanced_resizing_use_cookie) { + Cookie.setHash("TinyMCE_" + ed.id + "_size", { + cw : w, + ch : h + }); + } }, destroy : function() { @@ -655,7 +770,7 @@ n = DOM.add(DOM.add(c, 'tr'), 'td', {'class' : 'mceToolbar ' + a}); - if (!ed.getParam('accessibility_focus') || ed.getParam('tab_focus')) + if (!ed.getParam('accessibility_focus')) h.push(DOM.createHTML('a', {href : '#', onfocus : 'tinyMCE.get(\'' + ed.id + '\').focus();'}, '')); h.push(DOM.createHTML('a', {href : '#', accesskey : 'q', title : ed.getLang("advanced.toolbar_focus")}, '')); @@ -687,10 +802,10 @@ n = DOM.add(tb, 'tr'); n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'}); - n = DOM.add(n, 'div', {id : ed.id + '_path_row'}, s.theme_advanced_path ? ed.translate('advanced.path') + ': ' : ' '); + n = DOM.add(n, 'div', {id : ed.id + '_path_row'}, s.theme_advanced_path ? ed.translate('advanced.path') + ': ' : ' '); DOM.add(n, 'a', {href : '#', accesskey : 'x'}); - if (s.theme_advanced_resizing && !tinymce.isOldWebKit) { + if (s.theme_advanced_resizing) { DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize'}); if (s.theme_advanced_resizing_use_cookie) { @@ -700,99 +815,55 @@ if (!o) return; - if (s.theme_advanced_resize_horizontal) - c.style.width = Math.max(10, o.cw) + 'px'; - - c.style.height = Math.max(10, o.ch) + 'px'; - DOM.get(ed.id + '_ifr').style.height = Math.max(10, parseInt(o.ch) + t.deltaHeight) + 'px'; + t.resizeTo(o.cw, o.ch); }); } ed.onPostRender.add(function() { - Event.add(ed.id + '_resize', 'mousedown', function(e) { - var c, p, w, h, n, pa; - - // Measure container - c = DOM.get(ed.id + '_tbl'); - w = c.clientWidth; - h = c.clientHeight; - - miw = s.theme_advanced_resizing_min_width || 100; - mih = s.theme_advanced_resizing_min_height || 100; - maw = s.theme_advanced_resizing_max_width || 0xFFFF; - mah = s.theme_advanced_resizing_max_height || 0xFFFF; - - // Setup placeholder - p = DOM.add(DOM.get(ed.id + '_parent'), 'div', {'class' : 'mcePlaceHolder'}); - DOM.setStyles(p, {width : w, height : h}); - - // Replace with placeholder - DOM.hide(c); - DOM.show(p); - - // Create internal resize obj - r = { - x : e.screenX, - y : e.screenY, - w : w, - h : h, - dx : null, - dy : null - }; - - // Start listening - mf = Event.add(DOM.doc, 'mousemove', function(e) { - var w, h; - - // Calc delta values - r.dx = e.screenX - r.x; - r.dy = e.screenY - r.y; - - // Boundery fix box - w = Math.max(miw, r.w + r.dx); - h = Math.max(mih, r.h + r.dy); - w = Math.min(maw, w); - h = Math.min(mah, h); + Event.add(ed.id + '_resize', 'click', function(e) { + e.preventDefault(); + }); - // Resize placeholder - if (s.theme_advanced_resize_horizontal) - p.style.width = w + 'px'; + Event.add(ed.id + '_resize', 'mousedown', function(e) { + var mouseMoveHandler1, mouseMoveHandler2, + mouseUpHandler1, mouseUpHandler2, + startX, startY, startWidth, startHeight, width, height, ifrElm; - p.style.height = h + 'px'; + function resizeOnMove(e) { + e.preventDefault(); - return Event.cancel(e); - }); + width = startWidth + (e.screenX - startX); + height = startHeight + (e.screenY - startY); - me = Event.add(DOM.doc, 'mouseup', function(e) { - var ifr; + t.resizeTo(width, height); + }; + function endResize(e) { // Stop listening - Event.remove(DOM.doc, 'mousemove', mf); - Event.remove(DOM.doc, 'mouseup', me); - - c.style.display = ''; - DOM.remove(p); - - if (r.dx === null) - return; - - ifr = DOM.get(ed.id + '_ifr'); - - if (s.theme_advanced_resize_horizontal) - c.style.width = Math.max(10, r.w + r.dx) + 'px'; + Event.remove(DOM.doc, 'mousemove', mouseMoveHandler1); + Event.remove(ed.getDoc(), 'mousemove', mouseMoveHandler2); + Event.remove(DOM.doc, 'mouseup', mouseUpHandler1); + Event.remove(ed.getDoc(), 'mouseup', mouseUpHandler2); + + width = startWidth + (e.screenX - startX); + height = startHeight + (e.screenY - startY); + t.resizeTo(width, height, true); + }; - c.style.height = Math.max(10, r.h + r.dy) + 'px'; - ifr.style.height = Math.max(10, ifr.clientHeight + r.dy) + 'px'; + e.preventDefault(); - if (s.theme_advanced_resizing_use_cookie) { - Cookie.setHash("TinyMCE_" + ed.id + "_size", { - cw : r.w + r.dx, - ch : r.h + r.dy - }); - } - }); + // Get the current rect size + startX = e.screenX; + startY = e.screenY; + ifrElm = DOM.get(t.editor.id + '_ifr'); + startWidth = width = ifrElm.clientWidth; + startHeight = height = ifrElm.clientHeight; - return Event.cancel(e); + // Register envent handlers + mouseMoveHandler1 = Event.add(DOM.doc, 'mousemove', resizeOnMove); + mouseMoveHandler2 = Event.add(ed.getDoc(), 'mousemove', resizeOnMove); + mouseUpHandler1 = Event.add(DOM.doc, 'mouseup', endResize); + mouseUpHandler2 = Event.add(ed.getDoc(), 'mouseup', endResize); }); }); } @@ -801,22 +872,34 @@ n = tb = null; }, - _nodeChanged : function(ed, cm, n, co) { - var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn; - - if (s.readonly) - return; + _nodeChanged : function(ed, cm, n, co, ob) { + var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, formatNames, matches; tinymce.each(t.stateControls, function(c) { cm.setActive(c, ed.queryCommandState(t.controls[c][1])); }); + function getParent(name) { + var i, parents = ob.parents, func = name; + + if (typeof(name) == 'string') { + func = function(node) { + return node.nodeName == name; + }; + } + + for (i = 0; i < parents.length; i++) { + if (func(parents[i])) + return parents[i]; + } + }; + cm.setActive('visualaid', ed.hasVisual); cm.setDisabled('undo', !ed.undoManager.hasUndo() && !ed.typing); cm.setDisabled('redo', !ed.undoManager.hasRedo()); cm.setDisabled('outdent', !ed.queryCommandState('Outdent')); - p = DOM.getParent(n, 'A'); + p = getParent('A'); if (c = cm.get('link')) { if (!p || !p.name) { c.setDisabled(!p && co); @@ -831,82 +914,78 @@ if (c = cm.get('anchor')) { c.setActive(!!p && p.name); - - if (tinymce.isWebKit) { - p = DOM.getParent(n, 'IMG'); - c.setActive(!!p && DOM.getAttrib(p, 'mce_name') == 'a'); - } } - p = DOM.getParent(n, 'IMG'); + p = getParent('IMG'); if (c = cm.get('image')) c.setActive(!!p && n.className.indexOf('mceItem') == -1); if (c = cm.get('styleselect')) { - if (n.className) { - t._importClasses(); - c.select(n.className); - } else - c.select(); + t._importClasses(); + + formatNames = []; + each(c.items, function(item) { + formatNames.push(item.value); + }); + + matches = ed.formatter.matchAll(formatNames); + c.select(matches[0]); } if (c = cm.get('formatselect')) { - p = DOM.getParent(n, DOM.isBlock); + p = getParent(DOM.isBlock); if (p) c.select(p.nodeName.toLowerCase()); } - if (ed.settings.convert_fonts_to_spans) { - ed.dom.getParent(n, function(n) { - if (n.nodeName === 'SPAN') { - if (!cl && n.className) - cl = n.className; + // Find out current fontSize, fontFamily and fontClass + getParent(function(n) { + if (n.nodeName === 'SPAN') { + if (!cl && n.className) + cl = n.className; - if (!fz && n.style.fontSize) - fz = n.style.fontSize; + if (!fz && n.style.fontSize) + fz = n.style.fontSize; - if (!fn && n.style.fontFamily) - fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase(); - } + if (!fn && n.style.fontFamily) + fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase(); + } - return false; + return false; + }); + + if (c = cm.get('fontselect')) { + c.select(function(v) { + return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn; }); + } - if (c = cm.get('fontselect')) { - c.select(function(v) { - return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn; - }); - } + // Select font size + if (c = cm.get('fontsizeselect')) { + // Use computed style + if (s.theme_advanced_runtime_fontsize && !fz && !cl) + fz = ed.dom.getStyle(n, 'fontSize', true); - if (c = cm.get('fontsizeselect')) { - c.select(function(v) { - if (v.fontSize && v.fontSize === fz) - return true; + c.select(function(v) { + if (v.fontSize && v.fontSize === fz) + return true; - if (v['class'] && v['class'] === cl) - return true; - }); - } - } else { - if (c = cm.get('fontselect')) - c.select(ed.queryCommandValue('FontName')); - - if (c = cm.get('fontsizeselect')) { - v = ed.queryCommandValue('FontSize'); - c.select(function(iv) { - return iv.fontSize == v; - }); - } + if (v['class'] && v['class'] === cl) + return true; + }); } if (s.theme_advanced_path && s.theme_advanced_statusbar_location) { p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'}); DOM.setHTML(p, ''); - ed.dom.getParent(n, function(n) { + getParent(function(n) { var na = n.nodeName.toLowerCase(), u, pi, ti = ''; + /*if (n.getAttribute('_mce_bogus')) + return; +*/ // Ignore non element and hidden elements if (n.nodeType != 1 || n.nodeName === 'BR' || (DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved'))) return; @@ -950,9 +1029,6 @@ break; case 'font': - if (s.convert_fonts_to_spans) - na = 'span'; - if (v = DOM.getAttrib(n, 'face')) ti += 'font: ' + v + ' '; @@ -975,9 +1051,9 @@ ti += 'id: ' + v + ' '; if (v = n.className) { - v = v.replace(/(webkit-[\w\-]+|Apple-[\w\-]+|mceItem\w+|mceVisualAid)/g, ''); + v = v.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, '') - if (v && v.indexOf('mceItem') == -1) { + if (v) { ti += 'class: ' + v + ' '; if (DOM.isBlock(n) || na == 'img' || na == 'span') @@ -1013,7 +1089,7 @@ var ed = this.editor; ed.windowManager.open({ - url : tinymce.baseURL + '/themes/advanced/anchor.htm', + url : this.url + '/anchor.htm', width : 320 + parseInt(ed.getLang('advanced.anchor_delta_width', 0)), height : 90 + parseInt(ed.getLang('advanced.anchor_delta_height', 0)), inline : true @@ -1026,7 +1102,7 @@ var ed = this.editor; ed.windowManager.open({ - url : tinymce.baseURL + '/themes/advanced/charmap.htm', + url : this.url + '/charmap.htm', width : 550 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)), height : 250 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)), inline : true @@ -1039,7 +1115,7 @@ var ed = this.editor; ed.windowManager.open({ - url : tinymce.baseURL + '/themes/advanced/about.htm', + url : this.url + '/about.htm', width : 480, height : 380, inline : true @@ -1054,7 +1130,7 @@ v = v || {}; ed.windowManager.open({ - url : tinymce.baseURL + '/themes/advanced/color_picker.htm', + url : this.url + '/color_picker.htm', width : 375 + parseInt(ed.getLang('advanced.colorpicker_delta_width', 0)), height : 250 + parseInt(ed.getLang('advanced.colorpicker_delta_height', 0)), close_previous : false, @@ -1070,7 +1146,7 @@ var ed = this.editor; ed.windowManager.open({ - url : tinymce.baseURL + '/themes/advanced/source_editor.htm', + url : this.url + '/source_editor.htm', width : parseInt(ed.getParam("theme_advanced_source_editor_width", 720)), height : parseInt(ed.getParam("theme_advanced_source_editor_height", 580)), inline : true, @@ -1089,7 +1165,7 @@ return; ed.windowManager.open({ - url : tinymce.baseURL + '/themes/advanced/image.htm', + url : this.url + '/image.htm', width : 355 + parseInt(ed.getLang('advanced.image_delta_width', 0)), height : 275 + parseInt(ed.getLang('advanced.image_delta_height', 0)), inline : true @@ -1102,7 +1178,7 @@ var ed = this.editor; ed.windowManager.open({ - url : tinymce.baseURL + '/themes/advanced/link.htm', + url : this.url + '/link.htm', width : 310 + parseInt(ed.getLang('advanced.link_delta_width', 0)), height : 200 + parseInt(ed.getLang('advanced.link_delta_height', 0)), inline : true @@ -1150,4 +1226,4 @@ }); tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme); -}()); \ No newline at end of file +}(tinymce)); \ No newline at end of file diff --git a/webcit/tiny_mce/themes/advanced/image.htm b/webcit/tiny_mce/themes/advanced/image.htm index 6c366469c..f30d67064 100644 --- a/webcit/tiny_mce/themes/advanced/image.htm +++ b/webcit/tiny_mce/themes/advanced/image.htm @@ -6,7 +6,6 @@ - @@ -20,7 +19,7 @@
- +
@@ -33,11 +32,11 @@ - + - + - + - + - + - +
x
@@ -73,13 +72,8 @@
-
- -
- -
- -
+ +
diff --git a/webcit/tiny_mce/themes/advanced/img/icons.gif b/webcit/tiny_mce/themes/advanced/img/icons.gif index ccac36f54d983cc33a0a6e45134e3dabf1820367..e46de5333082869b9bdab2576a554a2f9d01a966 100644 GIT binary patch delta 556 zcmV+{0@MBRS(03^@+*J4nMj91K!6CCg;~%|ckg$9|95~7c!3}ITCag#i1+#^_l8J< zMz{hi-~mn`f&WkNUxKfAi@$h`&v=cmcm(hTgr^UBX9yQ4ge$;@S9v2sc!Q7Jc$RN@ zmw$PfkNI8?cZ4VRnMi^w;DBhrhc`+RN=Se=h;o@9dZI6Sqd$Lor0*6Nojs;s`lY}5 zD*y%?AcQ30fmnctx}x}`-+Hd^dawU_qECWAD1>z20BE=b8{mXb!1_C|f>=NVu#bDW zpL@Em`(u{{S@;LM$9uis`@ZLUzCVa0SOOTmgjL`H5`YKAhX)~m2gb8|$d7!eJ7C-QRuh-Zy%KS7+c?_=Av3*=JNnJy~rK`rcoD=5K!I_jd%qhmU`NkWb!Nz)#vo z{#n5N=kI>+|9GLPhphAZdEo$^A(xgh4GHvPh&Zm*sx;9k}YfYEZVec*RpNv_AT7Fa_7>mYxgeRym~JN1OPj2L>nUj delta 265 zcmV+k0rviqT=7}3@+*HkcdvJQzju7kcYWXYVXuK+i1+#^cYYsuf-iW3KX`;s`0DTl zfTs_7S9pkzc+QERc#5z1V-I(LCwGhAc#iLQkN#4PkEJJd6sW^ zmw$Pfk9nD&d1sdeS@;K=w|Sh;`JLB!ou_%A4|<^=dZI6Sqd$Loq)&RKPxg{;dXt~M zrH^{4pL(i?d4E@DtQYvI-+Hd^daoaN1i*)ee}ISodb2-!v`>3%$M|^Hc(s3fxQ~0e zA9i?eczh`PxzBsO-+R74bblXvt?zrmAAG_u{BA)2hHrShH+;r#e8+!$$d7! -
@@ -22,7 +21,7 @@ - +
@@ -39,7 +38,7 @@ - + @@ -51,13 +50,8 @@
-
- -
- -
- -
+ +
diff --git a/webcit/tiny_mce/themes/advanced/skins/default/content.css b/webcit/tiny_mce/themes/advanced/skins/default/content.css index 19da1943b..9fba0431d 100644 --- a/webcit/tiny_mce/themes/advanced/skins/default/content.css +++ b/webcit/tiny_mce/themes/advanced/skins/default/content.css @@ -8,8 +8,9 @@ h4 {font-size: 1em} h5 {font-size: .83em} h6 {font-size: .75em} .mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} -a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(img/items.gif) no-repeat bottom left;} -img.mceItemAnchor {width:12px; height:12px; background:url(img/items.gif) no-repeat;} +a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat 0 0;} +span.mceItemNbsp {background: #DDD} +td.mceSelected, th.mceSelected {background-color:#3399ff !important} img {border:0;} table {cursor:default} table td, table th {cursor:text} @@ -17,7 +18,7 @@ ins {border-bottom:1px solid green; text-decoration: none; color:green} del {color:red; text-decoration:line-through} cite {border-bottom:1px dashed blue} acronym {border-bottom:1px dotted #CCC; cursor:help} -abbr, html\:abbr {border-bottom:1px dashed #CCC; cursor:help} +abbr {border-bottom:1px dashed #CCC; cursor:help} /* IE */ * html body { @@ -30,3 +31,6 @@ scrollbar-highlight-color:#F0F0EE; scrollbar-shadow-color:#F0F0EE; scrollbar-track-color:#F5F5F5; } + +img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px} +font[face=mceinline] {font-family:inherit !important} diff --git a/webcit/tiny_mce/themes/advanced/skins/default/dialog.css b/webcit/tiny_mce/themes/advanced/skins/default/dialog.css index 2c341aae1..f01222650 100644 --- a/webcit/tiny_mce/themes/advanced/skins/default/dialog.css +++ b/webcit/tiny_mce/themes/advanced/skins/default/dialog.css @@ -19,6 +19,7 @@ td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} textarea {resize:none;outline:none;} a:link, a:visited {color:black;} a:hover {color:#2B6FB6;} +.nowrap {white-space: nowrap} /* Forms */ fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} @@ -41,12 +42,14 @@ width:94px; height:26px; background:url(img/buttons.png) 0 -26px; cursor:pointer; padding-bottom:2px; +float:left; } -#insert {background:url(img/buttons.png) 0 -52px;} -#cancel {background:url(img/buttons.png) 0 0;} +#insert {background:url(img/buttons.png) 0 -52px} +#cancel {background:url(img/buttons.png) 0 0; float:right} /* Browse */ +a.pickcolor, a.browse {text-decoration:none} a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} .mceOldBoxModel a.browse span {width:22px; height:20px;} a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} @@ -111,4 +114,4 @@ h3 {font-size:14px;} #colorpicker #namedcolors {width:150px;} #colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;} #colorpicker #colornamecontainer {margin-top:5px;} -#colorpicker #picker_panel fieldset {margin:auto;width:325px;} \ No newline at end of file +#colorpicker #picker_panel fieldset {margin:auto;width:325px;} diff --git a/webcit/tiny_mce/themes/advanced/skins/default/ui.css b/webcit/tiny_mce/themes/advanced/skins/default/ui.css index 230a2ee28..0049c7b3d 100644 --- a/webcit/tiny_mce/themes/advanced/skins/default/ui.css +++ b/webcit/tiny_mce/themes/advanced/skins/default/ui.css @@ -4,7 +4,7 @@ .defaultSkin table td {vertical-align:middle} /* Containers */ -.defaultSkin table {background:#F0F0EE} +.defaultSkin table {direction:ltr; background:#F0F0EE} .defaultSkin iframe {display:block; background:#FFF} .defaultSkin .mceToolbar {height:26px} .defaultSkin .mceLeft {text-align:left} @@ -24,7 +24,7 @@ .defaultSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC} .defaultSkin .mceStatusbar {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px} .defaultSkin .mceStatusbar div {float:left; margin:2px} -.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize} +.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0} .defaultSkin .mceStatusbar a:hover {text-decoration:underline} .defaultSkin table.mceToolbar {margin-left:3px} .defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px} @@ -47,7 +47,6 @@ .defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px} /* ListBox */ -.defaultSkin .mceListBox {direction:ltr} .defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block} .defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden} .defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;} @@ -63,7 +62,7 @@ .defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr} .defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block} .defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;} -.defaultSkin .mceSplitButton span.mceAction {width:20px; background:url(../../img/icons.gif) 20px 20px;} +.defaultSkin .mceSplitButton span.mceAction {width:20px; background-image:url(../../img/icons.gif);} .defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;} .defaultSkin .mceSplitButton span.mceOpen {display:none} .defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0} @@ -108,7 +107,6 @@ /* Progress,Resize */ .defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF} .defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} -.defaultSkin .mcePlaceHolder {border:1px dotted gray} /* Formats */ .defaultSkin .mce_formatPreview a {font-size:10px} @@ -211,4 +209,5 @@ .defaultSkin span.mce_del {background-position:-940px -20px} .defaultSkin span.mce_ins {background-position:-960px -20px} .defaultSkin span.mce_pagebreak {background-position:0 -40px} -.defaultSkin .mce_spellchecker span.mceAction {background-position:-540px -20px} +.defaultSkin span.mce_restoredraft {background-position:-20px -40px} +.defaultSkin span.mce_spellchecker {background-position:-540px -20px} diff --git a/webcit/tiny_mce/themes/advanced/skins/o2k7/content.css b/webcit/tiny_mce/themes/advanced/skins/o2k7/content.css index b8431d169..3b833d945 100644 --- a/webcit/tiny_mce/themes/advanced/skins/o2k7/content.css +++ b/webcit/tiny_mce/themes/advanced/skins/o2k7/content.css @@ -8,8 +8,9 @@ h4 {font-size: 1em} h5 {font-size: .83em} h6 {font-size: .75em} .mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;} -a.mceItemAnchor {width:12px; line-height:6px; overflow:hidden; padding-left:12px; background:url(../default/img/items.gif) no-repeat bottom left;} -img.mceItemAnchor {width:12px; height:12px; background:url(../default/img/items.gif) no-repeat;} +a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;} +span.mceItemNbsp {background: #DDD} +td.mceSelected, th.mceSelected {background-color:#3399ff !important} img {border:0;} table {cursor:default} table td, table th {cursor:text} @@ -17,7 +18,7 @@ ins {border-bottom:1px solid green; text-decoration: none; color:green} del {color:red; text-decoration:line-through} cite {border-bottom:1px dashed blue} acronym {border-bottom:1px dotted #CCC; cursor:help} -abbr, html\:abbr {border-bottom:1px dashed #CCC; cursor:help} +abbr {border-bottom:1px dashed #CCC; cursor:help} /* IE */ * html body { @@ -30,3 +31,6 @@ scrollbar-highlight-color:#F0F0EE; scrollbar-shadow-color:#F0F0EE; scrollbar-track-color:#F5F5F5; } + +img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px} +font[face=mceinline] {font-family:inherit !important} diff --git a/webcit/tiny_mce/themes/advanced/skins/o2k7/dialog.css b/webcit/tiny_mce/themes/advanced/skins/o2k7/dialog.css index 8d288e348..e3af1396e 100644 --- a/webcit/tiny_mce/themes/advanced/skins/o2k7/dialog.css +++ b/webcit/tiny_mce/themes/advanced/skins/o2k7/dialog.css @@ -19,6 +19,7 @@ td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;} textarea {resize:none;outline:none;} a:link, a:visited {color:black;} a:hover {color:#2B6FB6;} +.nowrap {white-space: nowrap} /* Forms */ fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;} @@ -41,12 +42,14 @@ width:94px; height:26px; background:url(../default/img/buttons.png) 0 -26px; cursor:pointer; padding-bottom:2px; +float:left; } -#insert {background:url(../default/img/buttons.png) 0 -52px;} -#cancel {background:url(../default/img/buttons.png) 0 0;} +#insert {background:url(../default/img/buttons.png) 0 -52px} +#cancel {background:url(../default/img/buttons.png) 0 0; float:right} /* Browse */ +a.pickcolor, a.browse {text-decoration:none} a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;} .mceOldBoxModel a.browse span {width:22px; height:20px;} a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;} diff --git a/webcit/tiny_mce/themes/advanced/skins/o2k7/ui.css b/webcit/tiny_mce/themes/advanced/skins/o2k7/ui.css index c10a3f016..a6253976a 100644 --- a/webcit/tiny_mce/themes/advanced/skins/o2k7/ui.css +++ b/webcit/tiny_mce/themes/advanced/skins/o2k7/ui.css @@ -21,7 +21,7 @@ .o2k7Skin .mceIframeContainer {border-top:1px solid #ABC6DD; border-bottom:1px solid #ABC6DD} .o2k7Skin .mceStatusbar {display:block; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; height:20px} .o2k7Skin .mceStatusbar div {float:left; padding:2px} -.o2k7Skin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize} +.o2k7Skin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0} .o2k7Skin .mceStatusbar a:hover {text-decoration:underline} .o2k7Skin table.mceToolbar {margin-left:3px} .o2k7Skin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; margin-left:3px;} @@ -65,7 +65,7 @@ .o2k7Skin .mceSplitButton, .o2k7Skin .mceSplitButton a, .o2k7Skin .mceSplitButton span {display:block; height:22px} .o2k7Skin .mceSplitButton {background:url(img/button_bg.png)} .o2k7Skin .mceSplitButton a.mceAction {width:22px} -.o2k7Skin .mceSplitButton span.mceAction {width:22px; background:url(../../img/icons.gif) 20px 20px} +.o2k7Skin .mceSplitButton span.mceAction {width:22px; background-image:url(../../img/icons.gif)} .o2k7Skin .mceSplitButton a.mceOpen {width:10px; background:url(img/button_bg.png) -44px 0} .o2k7Skin .mceSplitButton span.mceOpen {display:none} .o2k7Skin table.mceSplitButtonEnabled:hover a.mceAction, .o2k7Skin .mceSplitButtonHover a.mceAction, .o2k7Skin .mceSplitButtonSelected {background:url(img/button_bg.png) 0 -22px} @@ -109,7 +109,6 @@ /* Progress,Resize */ .o2k7Skin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF} .o2k7Skin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px} -.o2k7Skin .mcePlaceHolder {border:1px dotted gray} /* Formats */ .o2k7Skin .mce_formatPreview a {font-size:10px} @@ -212,4 +211,5 @@ .o2k7Skin span.mce_del {background-position:-940px -20px} .o2k7Skin span.mce_ins {background-position:-960px -20px} .o2k7Skin span.mce_pagebreak {background-position:0 -40px} -.o2k7Skin .mce_spellchecker span.mceAction {background-position:-540px -20px} +.o2k7Skin span.mce_restoredraft {background-position:-20px -40px} +.o2k7Skin span.mce_spellchecker {background-position:-540px -20px} diff --git a/webcit/tiny_mce/themes/advanced/source_editor.htm b/webcit/tiny_mce/themes/advanced/source_editor.htm index 119a913c9..5957bbd17 100644 --- a/webcit/tiny_mce/themes/advanced/source_editor.htm +++ b/webcit/tiny_mce/themes/advanced/source_editor.htm @@ -1,10 +1,8 @@ - {#advanced_dlg.code_title} - @@ -19,13 +17,8 @@
-
- -
- -
- -
+ +
diff --git a/webcit/tiny_mce/themes/simple/editor_template.js b/webcit/tiny_mce/themes/simple/editor_template.js index d19fb53f7..ed89abc06 100644 --- a/webcit/tiny_mce/themes/simple/editor_template.js +++ b/webcit/tiny_mce/themes/simple/editor_template.js @@ -1 +1 @@ -(function(){var DOM=tinymce.DOM;tinymce.ThemeManager.requireLangPack('simple');tinymce.create('tinymce.themes.SimpleTheme',{init:function(ed,url){var t=this,states=['Bold','Italic','Underline','Strikethrough','InsertUnorderedList','InsertOrderedList'],s=ed.settings;t.editor=ed;ed.onInit.add(function(){ed.onNodeChange.add(function(ed,cm){tinymce.each(states,function(c){cm.get(c.toLowerCase()).setActive(ed.queryCommandState(c));});});ed.dom.loadCSS(url+"/skins/"+s.skin+"/content.css");});DOM.loadCSS((s.editor_css?ed.documentBaseURI.toAbsolute(s.editor_css):'')||url+"/skins/"+s.skin+"/ui.css");},renderUI:function(o){var t=this,n=o.targetNode,ic,tb,ed=t.editor,cf=ed.controlManager,sc;n=DOM.insertAfter(DOM.create('span',{id:ed.id+'_container','class':'mceEditor '+ed.settings.skin+'SimpleSkin'}),n);n=sc=DOM.add(n,'table',{cellPadding:0,cellSpacing:0,'class':'mceLayout'});n=tb=DOM.add(n,'tbody');n=DOM.add(tb,'tr');n=ic=DOM.add(DOM.add(n,'td'),'div',{'class':'mceIframeContainer'});n=DOM.add(DOM.add(tb,'tr',{'class':'last'}),'td',{'class':'mceToolbar mceLast',align:'center'});tb=t.toolbar=cf.createToolbar("tools1");tb.add(cf.createButton('bold',{title:'simple.bold_desc',cmd:'Bold'}));tb.add(cf.createButton('italic',{title:'simple.italic_desc',cmd:'Italic'}));tb.add(cf.createButton('underline',{title:'simple.underline_desc',cmd:'Underline'}));tb.add(cf.createButton('strikethrough',{title:'simple.striketrough_desc',cmd:'Strikethrough'}));tb.add(cf.createSeparator());tb.add(cf.createButton('undo',{title:'simple.undo_desc',cmd:'Undo'}));tb.add(cf.createButton('redo',{title:'simple.redo_desc',cmd:'Redo'}));tb.add(cf.createSeparator());tb.add(cf.createButton('cleanup',{title:'simple.cleanup_desc',cmd:'mceCleanup'}));tb.add(cf.createSeparator());tb.add(cf.createButton('insertunorderedlist',{title:'simple.bullist_desc',cmd:'InsertUnorderedList'}));tb.add(cf.createButton('insertorderedlist',{title:'simple.numlist_desc',cmd:'InsertOrderedList'}));tb.renderTo(n);return{iframeContainer:ic,editorContainer:ed.id+'_container',sizeContainer:sc,deltaHeight:-20};},getInfo:function(){return{longname:'Simple theme',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.ThemeManager.add('simple',tinymce.themes.SimpleTheme);})(); \ No newline at end of file +(function(){var a=tinymce.DOM;tinymce.ThemeManager.requireLangPack("simple");tinymce.create("tinymce.themes.SimpleTheme",{init:function(c,d){var e=this,b=["Bold","Italic","Underline","Strikethrough","InsertUnorderedList","InsertOrderedList"],f=c.settings;e.editor=c;c.onInit.add(function(){c.onNodeChange.add(function(h,g){tinymce.each(b,function(i){g.get(i.toLowerCase()).setActive(h.queryCommandState(i))})});c.dom.loadCSS(d+"/skins/"+f.skin+"/content.css")});a.loadCSS((f.editor_css?c.documentBaseURI.toAbsolute(f.editor_css):"")||d+"/skins/"+f.skin+"/ui.css")},renderUI:function(h){var e=this,i=h.targetNode,b,c,d=e.editor,f=d.controlManager,g;i=a.insertAfter(a.create("span",{id:d.id+"_container","class":"mceEditor "+d.settings.skin+"SimpleSkin"}),i);i=g=a.add(i,"table",{cellPadding:0,cellSpacing:0,"class":"mceLayout"});i=c=a.add(i,"tbody");i=a.add(c,"tr");i=b=a.add(a.add(i,"td"),"div",{"class":"mceIframeContainer"});i=a.add(a.add(c,"tr",{"class":"last"}),"td",{"class":"mceToolbar mceLast",align:"center"});c=e.toolbar=f.createToolbar("tools1");c.add(f.createButton("bold",{title:"simple.bold_desc",cmd:"Bold"}));c.add(f.createButton("italic",{title:"simple.italic_desc",cmd:"Italic"}));c.add(f.createButton("underline",{title:"simple.underline_desc",cmd:"Underline"}));c.add(f.createButton("strikethrough",{title:"simple.striketrough_desc",cmd:"Strikethrough"}));c.add(f.createSeparator());c.add(f.createButton("undo",{title:"simple.undo_desc",cmd:"Undo"}));c.add(f.createButton("redo",{title:"simple.redo_desc",cmd:"Redo"}));c.add(f.createSeparator());c.add(f.createButton("cleanup",{title:"simple.cleanup_desc",cmd:"mceCleanup"}));c.add(f.createSeparator());c.add(f.createButton("insertunorderedlist",{title:"simple.bullist_desc",cmd:"InsertUnorderedList"}));c.add(f.createButton("insertorderedlist",{title:"simple.numlist_desc",cmd:"InsertOrderedList"}));c.renderTo(i);return{iframeContainer:b,editorContainer:d.id+"_container",sizeContainer:g,deltaHeight:-20}},getInfo:function(){return{longname:"Simple theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.ThemeManager.add("simple",tinymce.themes.SimpleTheme)})(); \ No newline at end of file diff --git a/webcit/tiny_mce/themes/simple/editor_template_src.js b/webcit/tiny_mce/themes/simple/editor_template_src.js index fb0bd7893..4b862d49d 100644 --- a/webcit/tiny_mce/themes/simple/editor_template_src.js +++ b/webcit/tiny_mce/themes/simple/editor_template_src.js @@ -1,11 +1,11 @@ /** - * $Id: editor_template_src.js 920 2008-09-09 14:05:33Z spocke $ + * editor_template_src.js * - * This file is meant to showcase how to create a simple theme. The advanced - * theme is more suitable for production use. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { diff --git a/webcit/tiny_mce/themes/simple/langs/de.js b/webcit/tiny_mce/themes/simple/langs/de.js index f0375e94f..6db49e84c 100644 --- a/webcit/tiny_mce/themes/simple/langs/de.js +++ b/webcit/tiny_mce/themes/simple/langs/de.js @@ -3,9 +3,9 @@ bold_desc:"Fett (Strg+B)", italic_desc:"Kursiv (Strg+I)", underline_desc:"Unterstrichen (Strg+U)", striketrough_desc:"Durchgestrichen", -bullist_desc:"Unsortierte Liste", -numlist_desc:"Sortierte Liste", +bullist_desc:"Aufz\u00E4hlung", +numlist_desc:"Nummerierung", undo_desc:"R\u00FCckg\u00E4ngig (Strg+Z)", redo_desc:"Wiederholen (Strg+Y)", -cleanup_desc:"Quellcode s\u00E4ubern" +cleanup_desc:"Quellcode aufr\u00E4umen" }); \ No newline at end of file diff --git a/webcit/tiny_mce/themes/simple/langs/et.js b/webcit/tiny_mce/themes/simple/langs/et.js new file mode 100644 index 000000000..ce3ef22f0 --- /dev/null +++ b/webcit/tiny_mce/themes/simple/langs/et.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('et.simple',{ +bold_desc:"Rasvane (Ctrl+B)", +italic_desc:"Kursiiv (Ctrl+I)", +underline_desc:"Allajoonitud (Ctrl+U)", +striketrough_desc:"L\u00E4bijoonitud", +bullist_desc:"Ebakorrap\u00E4rane loetelu", +numlist_desc:"Korrap\u00E4rane loetelu", +undo_desc:"V\u00F5ta tagasi (Ctrl+Z)", +redo_desc:"Tee uuesti (Ctrl+Y)", +cleanup_desc:"Puhasta segane kood" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/themes/simple/langs/fr.js b/webcit/tiny_mce/themes/simple/langs/fr.js new file mode 100644 index 000000000..ab68859cd --- /dev/null +++ b/webcit/tiny_mce/themes/simple/langs/fr.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('fr.simple',{ +bold_desc:"Gras (Ctrl+B)", +italic_desc:"Italique (Ctrl+I)", +underline_desc:"Soulign\u00E9 (Ctrl+U)", +striketrough_desc:"Barr\u00E9", +bullist_desc:"Liste \u00E0 puces", +numlist_desc:"Liste num\u00E9rot\u00E9e", +undo_desc:"Annuler (Ctrl+Z)", +redo_desc:"R\u00E9tablir (Ctrl+Y)", +cleanup_desc:"Nettoyer le code" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/themes/simple/langs/hu.js b/webcit/tiny_mce/themes/simple/langs/hu.js new file mode 100644 index 000000000..b2cf35ece --- /dev/null +++ b/webcit/tiny_mce/themes/simple/langs/hu.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('hu.simple',{ +bold_desc:"F\u00E9lk\u00F6v\u00E9r (Ctrl+B)", +italic_desc:"D\u0151lt (Ctrl+I)", +underline_desc:"Al\u00E1h\u00FAzott (Ctrl+U)", +striketrough_desc:"\u00C1th\u00FAzott", +bullist_desc:"Felsorol\u00E1sos lista", +numlist_desc:"Sorrendezett lista", +undo_desc:"Visszavon\u00E1s (Ctrl+Z)", +redo_desc:"M\u00E9gis v\u00E9grehajt (Ctrl+Y)", +cleanup_desc:"Rendetlen k\u00F3d tiszt\u00EDt\u00E1sa" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/themes/simple/langs/pt.js b/webcit/tiny_mce/themes/simple/langs/pt.js index f5a462c51..1952f1ab3 100644 --- a/webcit/tiny_mce/themes/simple/langs/pt.js +++ b/webcit/tiny_mce/themes/simple/langs/pt.js @@ -1,11 +1,11 @@ tinyMCE.addI18n('pt.simple',{ bold_desc:"Negrito (Ctrl+B)", -italic_desc:"It\u00C3\u00A1lico (Ctrl+I)", +italic_desc:"It\u00E1lico (Ctrl+I)", underline_desc:"Sublinhado (Ctrl+U)", striketrough_desc:"Riscado", -bullist_desc:"Lista n\u00C3\u00A3o-ordenada", +bullist_desc:"Lista n\u00E3o-ordenada", numlist_desc:"Lista ordenada", undo_desc:"Desfazer (Ctrl+Z)", redo_desc:"Refazer (Ctrl+Y)", -cleanup_desc:"Limpar c\u00C3\u00B3digo incorreto" +cleanup_desc:"Limpar c\u00F3digo incorreto" }); \ No newline at end of file diff --git a/webcit/tiny_mce/themes/simple/langs/ru.js b/webcit/tiny_mce/themes/simple/langs/ru.js new file mode 100644 index 000000000..fd7d23a7d --- /dev/null +++ b/webcit/tiny_mce/themes/simple/langs/ru.js @@ -0,0 +1,11 @@ +tinyMCE.addI18n('ru.simple',{ +bold_desc:"\u041F\u043E\u043B\u0443\u0436\u0438\u0440\u043D\u044B\u0439 (Ctrl+B)", +italic_desc:"\u041A\u0443\u0440\u0441\u0438\u0432 (Ctrl+I)", +underline_desc:"\u041F\u043E\u0434\u0447\u0435\u0440\u043A\u043D\u0443\u0442\u044B\u0439 (Ctrl+U)", +striketrough_desc:"\u0417\u0430\u0447\u0435\u0440\u043A\u043D\u0443\u0442\u044B\u0439", +bullist_desc:"\u041C\u0430\u0440\u043A\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439 \u0441\u043F\u0438\u0441\u043E\u043A", +numlist_desc:"\u041D\u0443\u043C\u0435\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439 \u0441\u043F\u0438\u0441\u043E\u043A", +undo_desc:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C (Ctrl+Z)", +redo_desc:"\u0412\u0435\u0440\u043D\u0443\u0442\u044C (Ctrl+Y)", +cleanup_desc:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u043B\u0438\u0448\u043D\u0438\u0439 \u043A\u043E\u0434" +}); \ No newline at end of file diff --git a/webcit/tiny_mce/tiny_mce.js b/webcit/tiny_mce/tiny_mce.js index 55aba6e3b..e321b7a07 100644 --- a/webcit/tiny_mce/tiny_mce.js +++ b/webcit/tiny_mce/tiny_mce.js @@ -1 +1 @@ -var tinymce={majorVersion:'3',minorVersion:'2.1.1',releaseDate:'2008-11-27',_init:function(){var t=this,d=document,w=window,na=navigator,ua=na.userAgent,i,nl,n,base,p,v;t.isOpera=w.opera&&opera.buildNumber;t.isWebKit=/WebKit/.test(ua);t.isOldWebKit=t.isWebKit&&!w.getSelection().getRangeAt;t.isIE=!t.isWebKit&&!t.isOpera&&(/MSIE/gi).test(ua)&&(/Explorer/gi).test(na.appName);t.isIE6=t.isIE&&/MSIE [56]/.test(ua);t.isGecko=!t.isWebKit&&/Gecko/.test(ua);t.isMac=ua.indexOf('Mac')!=-1;t.isAir=/adobeair/i.test(ua);if(w.tinyMCEPreInit){t.suffix=tinyMCEPreInit.suffix;t.baseURL=tinyMCEPreInit.base;t.query=tinyMCEPreInit.query;return;}t.suffix='';nl=d.getElementsByTagName('base');for(i=0;i=items.length){for(i=0,l=base.length;i=items.length||base[i]!=items[i]){bp=i+1;break;}}}if(base.length=base.length||base[i]!=items[i]){bp=i+1;break;}}}if(bp==1)return path;for(i=0,l=base.length-(bp-1);i=0;i--){if(path[i].length==0||path[i]==".")continue;if(path[i]=='..'){nb++;continue;}if(nb>0){nb--;continue;}o.push(path[i]);}i=base.length-nb;if(i<=0)return'/'+o.reverse().join('/');return'/'+base.slice(0,i).join('/')+'/'+o.reverse().join('/');},getURI:function(nh){var s,t=this;if(!t.source||nh){s='';if(!nh){if(t.protocol)s+=t.protocol+'://';if(t.userInfo)s+=t.userInfo+'@';if(t.host)s+=t.host;if(t.port)s+=':'+t.port;}if(t.path)s+=t.path;if(t.query)s+='?'+t.query;if(t.anchor)s+='#'+t.anchor;t.source=s;}return t.source;}});})();(function(){var each=tinymce.each;tinymce.create('static tinymce.util.Cookie',{getHash:function(n){var v=this.get(n),h;if(v){each(v.split('&'),function(v){v=v.split('=');h=h||{};h[unescape(v[0])]=unescape(v[1]);});}return h;},setHash:function(n,v,e,p,d,s){var o='';each(v,function(v,k){o+=(!o?'':'&')+escape(k)+'='+escape(v);});this.set(n,o,e,p,d,s);},get:function(n){var c=document.cookie,e,p=n+"=",b;if(!c)return;b=c.indexOf("; "+p);if(b==-1){b=c.indexOf(p);if(b!=0)return null;}else b+=2;e=c.indexOf(";",b);if(e==-1)e=c.length;return unescape(c.substring(b+p.length,e));},set:function(n,v,e,p,d,s){document.cookie=n+"="+escape(v)+((e)?"; expires="+e.toGMTString():"")+((p)?"; path="+escape(p):"")+((d)?"; domain="+d:"")+((s)?"; secure":"");},remove:function(n,p){var d=new Date();d.setTime(d.getTime()-1000);this.set(n,'',d,p,d);}});})();tinymce.create('static tinymce.util.JSON',{serialize:function(o){var i,v,s=tinymce.util.JSON.serialize,t;if(o==null)return'null';t=typeof o;if(t=='string'){v='\bb\tt\nn\ff\rr\""\'\'\\\\';return'"'+o.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(a,b){i=v.indexOf(b);if(i+1)return'\\'+v.charAt(i+1);a=b.charCodeAt().toString(16);return'\\u'+'0000'.substring(a.length)+a;})+'"';}if(t=='object'){if(o instanceof Array){for(i=0,v='[';i0?',':'')+s(o[i]);return v+']';}v='{';for(i in o)v+=typeof o[i]!='function'?(v.length>1?',"':'"')+i+'":'+s(o[i]):'';return v+'}';}return''+o;},parse:function(s){try{return eval('('+s+')');}catch(ex){}}});tinymce.create('static tinymce.util.XHR',{send:function(o){var x,t,w=window,c=0;o.scope=o.scope||this;o.success_scope=o.success_scope||o.scope;o.error_scope=o.error_scope||o.scope;o.async=o.async===false?false:true;o.data=o.data||'';function get(s){x=0;try{x=new ActiveXObject(s);}catch(ex){}return x;};x=w.XMLHttpRequest?new XMLHttpRequest():get('Microsoft.XMLHTTP')||get('Msxml2.XMLHTTP');if(x){if(x.overrideMimeType)x.overrideMimeType(o.content_type);x.open(o.type||(o.data?'POST':'GET'),o.url,o.async);if(o.content_type)x.setRequestHeader('Content-Type',o.content_type);x.send(o.data);function ready(){if(!o.async||x.readyState==4||c++>10000){if(o.success&&c<10000&&x.status==200)o.success.call(o.success_scope,''+x.responseText,x,o);else if(o.error)o.error.call(o.error_scope,c>10000?'TIMED_OUT':'GENERAL',x,o);x=null;}else w.setTimeout(ready,10);};if(!o.async)return ready();t=w.setTimeout(ready,10);}}});(function(){var extend=tinymce.extend,JSON=tinymce.util.JSON,XHR=tinymce.util.XHR;tinymce.create('tinymce.util.JSONRequest',{JSONRequest:function(s){this.settings=extend({},s);this.count=0;},send:function(o){var ecb=o.error,scb=o.success;o=extend(this.settings,o);o.success=function(c,x){c=JSON.parse(c);if(typeof(c)=='undefined'){c={error:'JSON Parse error.'};}if(c.error)ecb.call(o.error_scope||o.scope,c.error,x);else scb.call(o.success_scope||o.scope,c.result);};o.error=function(ty,x){ecb.call(o.error_scope||o.scope,ty,x);};o.data=JSON.serialize({id:o.id||'c'+(this.count++),method:o.method,params:o.params});o.content_type='application/json';XHR.send(o);},'static':{sendRPC:function(o){return new tinymce.util.JSONRequest().send(o);}}});}());(function(){var each=tinymce.each,is=tinymce.is;var isWebKit=tinymce.isWebKit,isIE=tinymce.isIE;tinymce.create('tinymce.dom.DOMUtils',{doc:null,root:null,files:null,listeners:{},pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,cache:{},idPattern:/^#[\w]+$/,elmPattern:/^[\w_*]+$/,elmClassPattern:/^([\w_]*)\.([\w_]+)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(d,s){var t=this;t.doc=d;t.win=window;t.files={};t.cssFlicker=false;t.counter=0;t.boxModel=!tinymce.isIE||d.compatMode=="CSS1Compat";t.stdMode=d.documentMode===8;this.settings=s=tinymce.extend({keep_values:false,hex_colors:1,process_html:1},s);if(tinymce.isIE6){try{d.execCommand('BackgroundImageCache',false,true);}catch(e){t.cssFlicker=true;}}tinymce.addUnload(t.destroy,t);},getRoot:function(){var t=this,s=t.settings;return(s&&t.get(s.root_element))||t.doc.body;},getViewPort:function(w){var d,b;w=!w?this.win:w;d=w.document;b=this.boxModel?d.documentElement:d.body;return{x:w.pageXOffset||b.scrollLeft,y:w.pageYOffset||b.scrollTop,w:w.innerWidth||b.clientWidth,h:w.innerHeight||b.clientHeight};},getRect:function(e){var p,t=this,sr;e=t.get(e);p=t.getPos(e);sr=t.getSize(e);return{x:p.x,y:p.y,w:sr.w,h:sr.h};},getSize:function(e){var t=this,w,h;e=t.get(e);w=t.getStyle(e,'width');h=t.getStyle(e,'height');if(w.indexOf('px')===-1)w=0;if(h.indexOf('px')===-1)h=0;return{w:parseInt(w)||e.offsetWidth||e.clientWidth,h:parseInt(h)||e.offsetHeight||e.clientHeight};},getParent:function(n,f,r){var na,se=this.settings;n=this.get(n);if(se.strict_root)r=r||this.getRoot();if(is(f,'string')){na=f.toUpperCase();f=function(n){var s=false;if(n.nodeType==1&&na==='*'){s=true;return false;}each(na.split(','),function(v){if(n.nodeType==1&&((se.strict&&n.nodeName.toUpperCase()==v)||n.nodeName.toUpperCase()==v)){s=true;return false;}});return s;};}while(n){if(n==r)return null;if(f(n))return n;n=n.parentNode;}return null;},get:function(e){var n;if(e&&this.doc&&typeof(e)=='string'){n=e;e=this.doc.getElementById(e);if(e&&e.id!==n)return this.doc.getElementsByName(n)[1];}return e;},select:function(pa,s){var t=this,cs,c,pl,o=[],x,i,l,n,xp;s=t.get(s)||t.doc;if(s.querySelectorAll){if(s!=t.doc){i=s.id;s.id='_mc_tmp';pa='#_mc_tmp '+pa;}l=tinymce.grep(s.querySelectorAll(pa));s.id=i;return l;}if(!t.selectorRe)t.selectorRe=/^([\w\\*]+)?(?:#([\w\\]+))?(?:\.([\w\\\.]+))?(?:\[\@([\w\\]+)([\^\$\*!]?=)([\w\\]+)\])?(?:\:([\w\\]+))?/i;;if(tinymce.isAir){each(tinymce.explode(pa),function(v){if(!(xp=t.cache[v])){xp='';each(v.split(' '),function(v){v=t.selectorRe.exec(v);xp+=v[1]?'//'+v[1]:'//*';if(v[2])xp+="[@id='"+v[2]+"']";if(v[3]){each(v[3].split('.'),function(n){xp+="[@class = '"+n+"' or contains(concat(' ', @class, ' '), ' "+n+" ')]";});}});t.cache[v]=xp;}xp=t.doc.evaluate(xp,s,null,4,null);while(n=xp.iterateNext())o.push(n);});return o;}if(t.settings.strict){function get(s,n){return s.getElementsByTagName(n.toLowerCase());};}else{function get(s,n){return s.getElementsByTagName(n);};}if(t.elmPattern.test(pa)){x=get(s,pa);for(i=0,l=x.length;i=0;i--)cs+='}, '+(i?'n':'s')+');';cs+='})';t.cache[pa]=cs=eval(cs);}cs(isIE?collectIE:collect,s);});each(o,function(n){if(isIE)n.removeAttribute('mce_save');else delete n.mce_save;});return o;},add:function(p,n,a,h,c){var t=this;return this.run(p,function(p){var e,k;e=is(n,'string')?t.doc.createElement(n):n;t.setAttribs(e,a);if(h){if(h.nodeType)e.appendChild(h);else t.setHTML(e,h);}return!c?p.appendChild(e):e;});},create:function(n,a,h){return this.add(this.doc.createElement(n),n,a,h,1);},createHTML:function(n,a,h){var o='',t=this,k;o+='<'+n;for(k in a){if(a.hasOwnProperty(k))o+=' '+k+'="'+t.encode(a[k])+'"';}if(tinymce.is(h))return o+'>'+h+'';return o+' />';},remove:function(n,k){return this.run(n,function(n){var p,g;p=n.parentNode;if(!p)return null;if(k){each(n.childNodes,function(c){p.insertBefore(c.cloneNode(true),n);});}return p.removeChild(n);});},setStyle:function(n,na,v){var t=this;return t.run(n,function(e){var s,i;s=e.style;na=na.replace(/-(\D)/g,function(a,b){return b.toUpperCase();});if(t.pixelStyles.test(na)&&(tinymce.is(v,'number')||/^[\-0-9\.]+$/.test(v)))v+='px';switch(na){case'opacity':if(isIE){s.filter=v===''?'':"alpha(opacity="+(v*100)+")";if(!n.currentStyle||!n.currentStyle.hasLayout)s.display='inline-block';}s[na]=s['-moz-opacity']=s['-khtml-opacity']=v||'';break;case'float':isIE?s.styleFloat=v:s.cssFloat=v;break;default:s[na]=v||'';}if(t.settings.update_styles)t.setAttrib(e,'mce_style');});},getStyle:function(n,na,c){n=this.get(n);if(!n)return false;if(this.doc.defaultView&&c){na=na.replace(/[A-Z]/g,function(a){return'-'+a;});try{return this.doc.defaultView.getComputedStyle(n,null).getPropertyValue(na);}catch(ex){return null;}}na=na.replace(/-(\D)/g,function(a,b){return b.toUpperCase();});if(na=='float')na=isIE?'styleFloat':'cssFloat';if(n.currentStyle&&c)return n.currentStyle[na];return n.style[na];},setStyles:function(e,o){var t=this,s=t.settings,ol;ol=s.update_styles;s.update_styles=0;each(o,function(v,n){t.setStyle(e,n,v);});s.update_styles=ol;if(s.update_styles)t.setAttrib(e,s.cssText);},setAttrib:function(e,n,v){var t=this;if(!e||!n)return;if(t.settings.strict)n=n.toLowerCase();return this.run(e,function(e){var s=t.settings;switch(n){case"style":if(!is(v,'string')){each(v,function(v,n){t.setStyle(e,n,v);});return;}if(s.keep_values){if(v&&!t._isRes(v))e.setAttribute('mce_style',v,2);else e.removeAttribute('mce_style',2);}e.style.cssText=v;break;case"class":e.className=v||'';break;case"src":case"href":if(s.keep_values){if(s.url_converter)v=s.url_converter.call(s.url_converter_scope||t,v,n,e);t.setAttrib(e,'mce_'+n,v,2);}break;case"shape":e.setAttribute('mce_style',v);break;}if(is(v)&&v!==null&&v.length!==0)e.setAttribute(n,''+v,2);else e.removeAttribute(n,2);});},setAttribs:function(e,o){var t=this;return this.run(e,function(e){each(o,function(v,n){t.setAttrib(e,n,v);});});},getAttrib:function(e,n,dv){var v,t=this;e=t.get(e);if(!e||e.nodeType!==1)return false;if(!is(dv))dv='';if(/^(src|href|style|coords|shape)$/.test(n)){v=e.getAttribute("mce_"+n);if(v)return v;}if(isIE&&t.props[n]){v=e[t.props[n]];v=v&&v.nodeValue?v.nodeValue:v;}if(!v)v=e.getAttribute(n,2);if(n==='style'){v=v||e.style.cssText;if(v){v=t.serializeStyle(t.parseStyle(v));if(t.settings.keep_values&&!t._isRes(v))e.setAttribute('mce_style',v);}}if(isWebKit&&n==="class"&&v)v=v.replace(/(apple|webkit)\-[a-z\-]+/gi,'');if(isIE){switch(n){case'rowspan':case'colspan':if(v===1)v='';break;case'size':if(v==='+0'||v===20)v='';break;case'width':case'height':case'vspace':case'checked':case'disabled':case'readonly':if(v===0)v='';break;case'hspace':if(v===-1)v='';break;case'maxlength':case'tabindex':if(v===32768||v===2147483647||v==='32768')v='';break;case'compact':case'noshade':case'nowrap':if(v===65535)return n;return dv;case'shape':v=v.toLowerCase();break;default:if(n.indexOf('on')===0&&v)v=(''+v).replace(/^function\s+anonymous\(\)\s+\{\s+(.*)\s+\}$/,'$1');}}return(v!==undefined&&v!==null&&v!=='')?''+v:dv;},getPos:function(n){var t=this,x=0,y=0,e,d=t.doc,r;n=t.get(n);if(n&&isIE){n=n.getBoundingClientRect();e=t.boxModel?d.documentElement:d.body;x=t.getStyle(t.select('html')[0],'borderWidth');x=(x=='medium'||t.boxModel&&!t.isIE6)&&2||x;n.top+=t.win.self!=t.win.top?2:0;return{x:n.left+e.scrollLeft-x,y:n.top+e.scrollTop-x};}r=n;while(r){x+=r.offsetLeft||0;y+=r.offsetTop||0;r=r.offsetParent;}r=n;while(r){if(!/^table-row|inline.*/i.test(t.getStyle(r,"display",1))){x-=r.scrollLeft||0;y-=r.scrollTop||0;}r=r.parentNode;if(r==d.body)break;}return{x:x,y:y};},parseStyle:function(st){var t=this,s=t.settings,o={};if(!st)return o;function compress(p,s,ot){var t,r,b,l;t=o[p+'-top'+s];if(!t)return;r=o[p+'-right'+s];if(t!=r)return;b=o[p+'-bottom'+s];if(r!=b)return;l=o[p+'-left'+s];if(b!=l)return;o[ot]=l;delete o[p+'-top'+s];delete o[p+'-right'+s];delete o[p+'-bottom'+s];delete o[p+'-left'+s];};function compress2(ta,a,b,c){var t;t=o[a];if(!t)return;t=o[b];if(!t)return;t=o[c];if(!t)return;o[ta]=o[a]+' '+o[b]+' '+o[c];delete o[a];delete o[b];delete o[c];};st=st.replace(/&(#?[a-z0-9]+);/g,'&$1_MCE_SEMI_');each(st.split(';'),function(v){var sv,ur=[];if(v){v=v.replace(/_MCE_SEMI_/g,';');v=v.replace(/url\([^\)]+\)/g,function(v){ur.push(v);return'url('+ur.length+')';});v=v.split(':');sv=tinymce.trim(v[1]);sv=sv.replace(/url\(([^\)]+)\)/g,function(a,b){return ur[parseInt(b)-1];});sv=sv.replace(/rgb\([^\)]+\)/g,function(v){return t.toHex(v);});if(s.url_converter){sv=sv.replace(/url\([\'\"]?([^\)\'\"]+)[\'\"]?\)/g,function(x,c){return'url('+s.url_converter.call(s.url_converter_scope||t,t.decode(c),'style',null)+')';});}o[tinymce.trim(v[0]).toLowerCase()]=sv;}});compress("border","","border");compress("border","-width","border-width");compress("border","-color","border-color");compress("border","-style","border-style");compress("padding","","padding");compress("margin","","margin");compress2('border','border-width','border-style','border-color');if(isIE){if(o.border=='medium none')o.border='';}return o;},serializeStyle:function(o){var s='';each(o,function(v,k){if(k&&v){if(tinymce.isGecko&&k.indexOf('-moz-')===0)return;switch(k){case'color':case'background-color':v=v.toLowerCase();break;}s+=(s?' ':'')+k+': '+v+';';}});return s;},loadCSS:function(u){var t=this,d=t.doc;if(!u)u='';each(u.split(','),function(u){if(t.files[u])return;t.files[u]=true;t.add(t.select('head')[0],'link',{rel:'stylesheet',href:tinymce._addVer(u)});});},addClass:function(e,c){return this.run(e,function(e){var o;if(!c)return 0;if(this.hasClass(e,c))return e.className;o=this.removeClass(e,c);return e.className=(o!=''?(o+' '):'')+c;});},removeClass:function(e,c){var t=this,re;return t.run(e,function(e){var v;if(t.hasClass(e,c)){if(!re)re=new RegExp("(^|\\s+)"+c+"(\\s+|$)","g");v=e.className.replace(re,' ');return e.className=tinymce.trim(v!=' '?v:'');}return e.className;});},hasClass:function(n,c){n=this.get(n);if(!n||!c)return false;return(' '+n.className+' ').indexOf(' '+c+' ')!==-1;},show:function(e){return this.setStyle(e,'display','block');},hide:function(e){return this.setStyle(e,'display','none');},isHidden:function(e){e=this.get(e);return!e||e.style.display=='none'||this.getStyle(e,'display')=='none';},uniqueId:function(p){return(!p?'mce_':p)+(this.counter++);},setHTML:function(e,h){var t=this;return this.run(e,function(e){var x,i,nl,n,p,x;h=t.processHTML(h);if(isIE){function set(){try{e.innerHTML='
'+h;e.removeChild(e.firstChild);}catch(ex){while(e.firstChild)e.firstChild.removeNode();x=t.create('div');x.innerHTML='
'+h;each(x.childNodes,function(n,i){if(i)e.appendChild(n);});}};if(t.settings.fix_ie_paragraphs)h=h.replace(/

<\/p>|]+)><\/p>|/gi,' 

');set();if(t.settings.fix_ie_paragraphs){nl=e.getElementsByTagName("p");for(i=nl.length-1,x=0;i>=0;i--){n=nl[i];if(!n.hasChildNodes()){if(!n.mce_keep){x=1;break;}n.removeAttribute('mce_keep');}}}if(x){h=h.replace(/

]+)>|

/g,'

');h=h.replace(/<\/p>/g,'
');set();if(t.settings.fix_ie_paragraphs){nl=e.getElementsByTagName("DIV");for(i=nl.length-1;i>=0;i--){n=nl[i];if(n.mce_tmp){p=t.doc.createElement('p');n.cloneNode(false).outerHTML.replace(/([a-z0-9\-_]+)=/gi,function(a,b){var v;if(b!=='mce_tmp'){v=n.getAttribute(b);if(!v&&b==='class')v=n.className;p.setAttribute(b,v);}});for(x=0;x|]+)>/gi,'<$1b$2>');h=h.replace(/<(\/?)em>|]+)>/gi,'<$1i$2>');}else if(isIE){h=h.replace(/'/g,''');h=h.replace(/\s+(disabled|checked|readonly|selected)\s*=\s*[\"\']?(false|0)[\"\']?/gi,'');}h=h.replace(/]+)\/>|/gi,'');if(s.keep_values){if(/)/g,'\n');s=s.replace(/^[\r\n]*|[\r\n]*$/g,'');s=s.replace(/^\s*(\/\/\s*|\]\]>|-->|\]\]-->)\s*$/g,'');return s;};h=h.replace(/]+|)>([\s\S]*?)<\/script>/g,function(v,a,b){b=trim(b);if(!a)a=' type="text/javascript"';if(b)b='';return''+b+'';});h=h.replace(/]+|)>([\s\S]*?)<\/style>/g,function(v,a,b){b=trim(b);return''+b+'';});}h=h.replace(//g,'');h=h.replace(/<([\w:]+) [^>]*(src|href|style|shape|coords)[^>]*>/gi,function(a,n){function handle(m,b,c){var u=c;if(a.indexOf('mce_'+b)!=-1)return m;if(b=='style'){if(t._isRes(c))return m;if(s.hex_colors){u=u.replace(/rgb\([^\)]+\)/g,function(v){return t.toHex(v);});}if(s.url_converter){u=u.replace(/url\([\'\"]?([^\)\'\"]+)\)/g,function(x,c){return'url('+t.encode(s.url_converter.call(s.url_converter_scope||t,t.decode(c),b,n))+')';});}}else if(b!='coords'&&b!='shape'){if(s.url_converter)u=t.encode(s.url_converter.call(s.url_converter_scope||t,t.decode(c),b,n));}return' '+b+'="'+c+'" mce_'+b+'="'+u+'"';};a=a.replace(/ (src|href|style|coords|shape)=[\"]([^\"]+)[\"]/gi,handle);a=a.replace(/ (src|href|style|coords|shape)=[\']([^\']+)[\']/gi,handle);return a.replace(/ (src|href|style|coords|shape)=([^\s\"\'>]+)/gi,handle);});}return h;},getOuterHTML:function(e){var d;e=this.get(e);if(!e)return null;if(isIE)return e.outerHTML;d=(e.ownerDocument||this.doc).createElement("body");d.appendChild(e.cloneNode(true));return d.innerHTML;},setOuterHTML:function(e,h,d){var t=this;return this.run(e,function(e){var n,tp;e=t.get(e);d=d||e.ownerDocument||t.doc;if(isIE&&e.nodeType==1)e.outerHTML=h;else{tp=d.createElement("body");tp.innerHTML=h;n=tp.lastChild;while(n){t.insertAfter(n.cloneNode(true),e);n=n.previousSibling;}t.remove(e);}});},decode:function(s){var e,n,v;if(/&[^;]+;/.test(s)){e=this.doc.createElement("div");e.innerHTML=s;n=e.firstChild;v='';if(n){do{v+=n.nodeValue;}while(n.nextSibling);}return v||s;}return s;},encode:function(s){return s?(''+s).replace(/[<>&\"]/g,function(c,b){switch(c){case'&':return'&';case'"':return'"';case'<':return'<';case'>':return'>';}return c;}):s;},insertAfter:function(n,r){var t=this;r=t.get(r);return this.run(n,function(n){var p,ns;p=r.parentNode;ns=r.nextSibling;if(ns)p.insertBefore(n,ns);else p.appendChild(n);return n;});},isBlock:function(n){if(n.nodeType&&n.nodeType!==1)return false;n=n.nodeName||n;return/^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|LI|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(n);},replace:function(n,o,k){if(is(o,'array'))n=n.cloneNode(true);return this.run(o,function(o){if(k){each(o.childNodes,function(c){n.appendChild(c.cloneNode(true));});}return o.parentNode.replaceChild(n,o);});},toHex:function(s){var c=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(s);function hex(s){s=parseInt(s).toString(16);return s.length>1?s:'0'+s;};if(c){s='#'+hex(c[1])+hex(c[2])+hex(c[3]);return s;}return s;},getClasses:function(){var t=this,cl=[],i,lo={},f=t.settings.class_filter,ov;if(t.classes)return t.classes;function addClasses(s){each(s.imports,function(r){addClasses(r);});each(s.cssRules||s.rules,function(r){switch(r.type||1){case 1:if(r.selectorText){each(r.selectorText.split(','),function(v){v=v.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(v)||!/\.[\w\-]+$/.test(v))return;ov=v;v=v.replace(/.*\.([a-z0-9_\-]+).*/i,'$1');if(f&&!(v=f(v,ov)))return;if(!lo[v]){cl.push({'class':v});lo[v]=1;}});}break;case 3:addClasses(r.styleSheet);break;}});};try{each(t.doc.styleSheets,addClasses);}catch(ex){}if(cl.length>0)t.classes=cl;return cl;},run:function(e,f,s){var t=this,o;if(t.doc&&typeof(e)==='string')e=t.get(e);if(!e)return false;s=s||this;if(!e.nodeType&&(e.length||e.length===0)){o=[];each(e,function(e,i){if(e){if(typeof(e)=='string')e=t.doc.getElementById(e);o.push(f.call(s,e,i));}});return o;}return f.call(s,e);},getAttribs:function(n){var o;n=this.get(n);if(!n)return[];if(isIE){o=[];if(n.nodeName=='OBJECT')return n.attributes;n.cloneNode(false).outerHTML.replace(/([a-z0-9\:\-_]+)=/gi,function(a,b){o.push({specified:1,nodeName:b});});return o;}return n.attributes;},destroy:function(s){var t=this;t.win=t.doc=t.root=null;if(!s)tinymce.removeUnload(t.destroy);},_isRes:function(c){return/^(top|left|bottom|right|width|height)/i.test(c)||/;\s*(top|left|bottom|right|width|height)/i.test(c);}});tinymce.DOM=new tinymce.dom.DOMUtils(document,{process_html:0});})();(function(){var each=tinymce.each,DOM=tinymce.DOM,isIE=tinymce.isIE,isWebKit=tinymce.isWebKit,Event;tinymce.create('static tinymce.dom.Event',{inits:[],events:[],add:function(o,n,f,s){var cb,t=this,el=t.events,r;if(o&&o instanceof Array){r=[];each(o,function(o){o=DOM.get(o);r.push(t.add(o,n,f,s));});return r;}o=DOM.get(o);if(!o)return;cb=function(e){e=e||window.event;if(e&&!e.target&&isIE)e.target=e.srcElement;if(!s)return f(e);return f.call(s,e);};if(n=='unload'){tinymce.unloads.unshift({func:cb});return cb;}if(n=='init'){if(t.domLoaded)cb();else t.inits.push(cb);return cb;}el.push({obj:o,name:n,func:f,cfunc:cb,scope:s});t._add(o,n,cb);return f;},remove:function(o,n,f){var t=this,a=t.events,s=false,r;if(o&&o instanceof Array){r=[];each(o,function(o){o=DOM.get(o);r.push(t.remove(o,n,f));});return r;}o=DOM.get(o);each(a,function(e,i){if(e.obj==o&&e.name==n&&(!f||(e.func==f||e.cfunc==f))){a.splice(i,1);t._remove(o,n,e.cfunc);s=true;return false;}});return s;},clear:function(o){var t=this,a=t.events,i,e;if(o){o=DOM.get(o);for(i=a.length-1;i>=0;i--){e=a[i];if(e.obj===o){t._remove(e.obj,e.name,e.cfunc);e.obj=e.cfunc=null;a.splice(i,1);}}}},cancel:function(e){if(!e)return false;this.stop(e);return this.prevent(e);},stop:function(e){if(e.stopPropagation)e.stopPropagation();else e.cancelBubble=true;return false;},prevent:function(e){if(e.preventDefault)e.preventDefault();else e.returnValue=false;return false;},_unload:function(){var t=Event;each(t.events,function(e,i){t._remove(e.obj,e.name,e.cfunc);e.obj=e.cfunc=null;});t.events=[];t=null;},_add:function(o,n,f){if(o.attachEvent)o.attachEvent('on'+n,f);else if(o.addEventListener)o.addEventListener(n,f,false);else o['on'+n]=f;},_remove:function(o,n,f){if(o){try{if(o.detachEvent)o.detachEvent('on'+n,f);else if(o.removeEventListener)o.removeEventListener(n,f,false);else o['on'+n]=null;}catch(ex){}}},_pageInit:function(){var e=Event;if(e.domLoaded)return;e._remove(window,'DOMContentLoaded',e._pageInit);e.domLoaded=true;each(e.inits,function(c){c();});e.inits=[];},_wait:function(){var t;if(window.tinyMCE_GZ&&tinyMCE_GZ.loaded){Event.domLoaded=1;return;}if(isIE&&document.location.protocol!='https:'){document.write('';bi=s.body_id||'tinymce';if(bi.indexOf('=')!=-1){bi=t.getParam('body_id','','hash');bi=bi[t.id]||bi;}bc=s.body_class||'';if(bc.indexOf('=')!=-1){bc=t.getParam('body_class','','hash');bc=bc[t.id]||'';}t.iframeHTML+='';if(tinymce.relaxedDomain){if(isIE||(tinymce.isOpera&&parseFloat(opera.version())>=9.5))u='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()';else if(tinymce.isOpera)u='javascript:(function(){document.open();document.domain="'+document.domain+'";document.close();ed.setupIframe();})()';}n=DOM.add(o.iframeContainer,'iframe',{id:t.id+"_ifr",src:u||'javascript:""',frameBorder:'0',style:{width:'100%',height:h}});t.contentAreaContainer=o.iframeContainer;DOM.get(o.editorContainer).style.display=t.orgDisplay;DOM.get(t.id).style.display='none';if(tinymce.isOldWebKit){Event.add(n,'load',t.setupIframe,t);n.src=tinymce.baseURL+'/plugins/safari/blank.htm';}else{if(!isIE||!tinymce.relaxedDomain)t.setupIframe();e=n=o=null;}},setupIframe:function(){var t=this,s=t.settings,e=DOM.get(t.id),d=t.getDoc(),h,b;if(!isIE||!tinymce.relaxedDomain){d.open();d.write(t.iframeHTML);d.close();}if(!isIE){try{if(!s.readonly)d.designMode='On';}catch(ex){}}if(isIE){b=t.getBody();DOM.hide(b);if(!s.readonly)b.contentEditable=true;DOM.show(b);}t.dom=new tinymce.DOM.DOMUtils(t.getDoc(),{keep_values:true,url_converter:t.convertURL,url_converter_scope:t,hex_colors:s.force_hex_style_colors,class_filter:s.class_filter,update_styles:1,fix_ie_paragraphs:1});t.serializer=new tinymce.dom.Serializer({entity_encoding:s.entity_encoding,entities:s.entities,valid_elements:s.verify_html===false?'*[*]':s.valid_elements,extended_valid_elements:s.extended_valid_elements,valid_child_elements:s.valid_child_elements,invalid_elements:s.invalid_elements,fix_table_elements:s.fix_table_elements,fix_list_elements:s.fix_list_elements,fix_content_duplication:s.fix_content_duplication,convert_fonts_to_spans:s.convert_fonts_to_spans,font_size_classes:s.font_size_classes,font_size_style_values:s.font_size_style_values,apply_source_formatting:s.apply_source_formatting,remove_linebreaks:s.remove_linebreaks,element_format:s.element_format,dom:t.dom});t.selection=new tinymce.dom.Selection(t.dom,t.getWin(),t.serializer);t.forceBlocks=new tinymce.ForceBlocks(t,{forced_root_block:s.forced_root_block});t.editorCommands=new tinymce.EditorCommands(t);t.serializer.onPreProcess.add(function(se,o){return t.onPreProcess.dispatch(t,o,se);});t.serializer.onPostProcess.add(function(se,o){return t.onPostProcess.dispatch(t,o,se);});t.onPreInit.dispatch(t);if(!s.gecko_spellcheck)t.getBody().spellcheck=0;if(!s.readonly)t._addEvents();t.controlManager.onPostRender.dispatch(t,t.controlManager);t.onPostRender.dispatch(t);if(s.directionality)t.getBody().dir=s.directionality;if(s.nowrap)t.getBody().style.whiteSpace="nowrap";if(s.auto_resize)t.onNodeChange.add(t.resizeToContent,t);if(s.custom_elements){function handleCustom(ed,o){each(explode(s.custom_elements),function(v){var n;if(v.indexOf('~')===0){v=v.substring(1);n='span';}else n='div';o.content=o.content.replace(new RegExp('<('+v+')([^>]*)>','g'),'<'+n+' mce_name="$1"$2>');o.content=o.content.replace(new RegExp('','g'),'');});};t.onBeforeSetContent.add(handleCustom);t.onPostProcess.add(function(ed,o){if(o.set)handleCustom(ed,o)});}if(s.handle_node_change_callback){t.onNodeChange.add(function(ed,cm,n){t.execCallback('handle_node_change_callback',t.id,n,-1,-1,true,t.selection.isCollapsed());});}if(s.save_callback){t.onSaveContent.add(function(ed,o){var h=t.execCallback('save_callback',t.id,o.content,t.getBody());if(h)o.content=h;});}if(s.onchange_callback){t.onChange.add(function(ed,l){t.execCallback('onchange_callback',t,l);});}if(s.convert_newlines_to_brs){t.onBeforeSetContent.add(function(ed,o){if(o.initial)o.content=o.content.replace(/\r?\n/g,'
');});}if(s.fix_nesting&&isIE){t.onBeforeSetContent.add(function(ed,o){o.content=t._fixNesting(o.content);});}if(s.preformatted){t.onPostProcess.add(function(ed,o){o.content=o.content.replace(/^\s*/,'');o.content=o.content.replace(/<\/pre>\s*$/,'');if(o.set)o.content='
'+o.content+'
';});}if(s.verify_css_classes){t.serializer.attribValueFilter=function(n,v){var s,cl;if(n=='class'){if(!t.classesRE){cl=t.dom.getClasses();if(cl.length>0){s='';each(cl,function(o){s+=(s?'|':'')+o['class'];});t.classesRE=new RegExp('('+s+')','gi');}}return!t.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(v)||t.classesRE.test(v)?v:'';}return v;};}if(s.convert_fonts_to_spans)t._convertFonts();if(s.inline_styles)t._convertInlineElements();if(s.cleanup_callback){t.onBeforeSetContent.add(function(ed,o){o.content=t.execCallback('cleanup_callback','insert_to_editor',o.content,o);});t.onPreProcess.add(function(ed,o){if(o.set)t.execCallback('cleanup_callback','insert_to_editor_dom',o.node,o);if(o.get)t.execCallback('cleanup_callback','get_from_editor_dom',o.node,o);});t.onPostProcess.add(function(ed,o){if(o.set)o.content=t.execCallback('cleanup_callback','insert_to_editor',o.content,o);if(o.get)o.content=t.execCallback('cleanup_callback','get_from_editor',o.content,o);});}if(s.save_callback){t.onGetContent.add(function(ed,o){if(o.save)o.content=t.execCallback('save_callback',t.id,o.content,t.getBody());});}if(s.handle_event_callback){t.onEvent.add(function(ed,e,o){if(t.execCallback('handle_event_callback',e,ed,o)===false)Event.cancel(e);});}t.onSetContent.add(function(){t.addVisual(t.getBody());});if(s.padd_empty_editor){t.onPostProcess.add(function(ed,o){o.content=o.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
[\r\n]*)$/,'');});}if(isGecko&&!s.readonly){try{d.designMode='Off';d.designMode='On';}catch(ex){}}setTimeout(function(){if(t.removed)return;t.load({initial:true,format:(s.cleanup_on_startup?'html':'raw')});t.startContent=t.getContent({format:'raw'});t.undoManager.add({initial:true});t.initialized=true;t.onInit.dispatch(t);t.execCallback('setupcontent_callback',t.id,t.getBody(),t.getDoc());t.execCallback('init_instance_callback',t);t.focus(true);t.nodeChanged({initial:1});if(s.content_css){tinymce.each(explode(s.content_css),function(u){t.dom.loadCSS(t.documentBaseURI.toAbsolute(u));});}if(s.auto_focus){setTimeout(function(){var ed=EditorManager.get(s.auto_focus);ed.selection.select(ed.getBody(),1);ed.selection.collapse(1);ed.getWin().focus();},100);}},1);e=null;},focus:function(sf){var oed,t=this,ce=t.settings.content_editable;if(!sf){if(!ce&&(!isIE||t.selection.getNode().ownerDocument!=t.getDoc()))t.getWin().focus();}if(EditorManager.activeEditor!=t){if((oed=EditorManager.activeEditor)!=null)oed.onDeactivate.dispatch(oed,t);t.onActivate.dispatch(t,oed);}EditorManager._setActive(t);},execCallback:function(n){var t=this,f=t.settings[n],s;if(!f)return;if(t.callbackLookup&&(s=t.callbackLookup[n])){f=s.func;s=s.scope;}if(is(f,'string')){s=f.replace(/\.\w+$/,'');s=s?tinymce.resolve(s):0;f=tinymce.resolve(f);t.callbackLookup=t.callbackLookup||{};t.callbackLookup[n]={func:f,scope:s};}return f.apply(s||t,Array.prototype.slice.call(arguments,1));},translate:function(s){var c=this.settings.language||'en',i18n=EditorManager.i18n;if(!s)return'';return i18n[c+'.'+s]||s.replace(/{\#([^}]+)\}/g,function(a,b){return i18n[c+'.'+b]||'{#'+b+'}';});},getLang:function(n,dv){return EditorManager.i18n[(this.settings.language||'en')+'.'+n]||(is(dv)?dv:'{#'+n+'}');},getParam:function(n,dv,ty){var tr=tinymce.trim,v=is(this.settings[n])?this.settings[n]:dv,o;if(ty==='hash'){o={};if(is(v,'string')){each(v.indexOf('=')>0?v.split(/[;,](?![^=;,]*(?:[;,]|$))/):v.split(','),function(v){v=v.split('=');if(v.length>1)o[tr(v[0])]=tr(v[1]);else o[tr(v[0])]=tr(v);});}else o=v;return o;}return v;},nodeChanged:function(o){var t=this,s=t.selection,n=s.getNode()||t.getBody();if(t.initialized){t.onNodeChange.dispatch(t,o?o.controlManager||t.controlManager:t.controlManager,isIE&&n.ownerDocument!=t.getDoc()?t.getBody():n,s.isCollapsed(),o);}},addButton:function(n,s){var t=this;t.buttons=t.buttons||{};t.buttons[n]=s;},addCommand:function(n,f,s){this.execCommands[n]={func:f,scope:s||this};},addQueryStateHandler:function(n,f,s){this.queryStateCommands[n]={func:f,scope:s||this};},addQueryValueHandler:function(n,f,s){this.queryValueCommands[n]={func:f,scope:s||this};},addShortcut:function(pa,desc,cmd_func,sc){var t=this,c;if(!t.settings.custom_shortcuts)return false;t.shortcuts=t.shortcuts||{};if(is(cmd_func,'string')){c=cmd_func;cmd_func=function(){t.execCommand(c,false,null);};}if(is(cmd_func,'object')){c=cmd_func;cmd_func=function(){t.execCommand(c[0],c[1],c[2]);};}each(explode(pa),function(pa){var o={func:cmd_func,scope:sc||this,desc:desc,alt:false,ctrl:false,shift:false};each(explode(pa,'+'),function(v){switch(v){case'alt':case'ctrl':case'shift':o[v]=true;break;default:o.charCode=v.charCodeAt(0);o.keyCode=v.toUpperCase().charCodeAt(0);}});t.shortcuts[(o.ctrl?'ctrl':'')+','+(o.alt?'alt':'')+','+(o.shift?'shift':'')+','+o.keyCode]=o;});return true;},execCommand:function(cmd,ui,val,a){var t=this,s=0,o,st;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(cmd)&&(!a||!a.skip_focus))t.focus();o={};t.onBeforeExecCommand.dispatch(t,cmd,ui,val,o);if(o.terminate)return false;if(t.execCallback('execcommand_callback',t.id,t.selection.getNode(),cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);return true;}if(o=t.execCommands[cmd]){st=o.func.call(o.scope,ui,val);if(st!==true){t.onExecCommand.dispatch(t,cmd,ui,val,a);return st;}}each(t.plugins,function(p){if(p.execCommand&&p.execCommand(cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);s=1;return false;}});if(s)return true;if(t.theme.execCommand&&t.theme.execCommand(cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);return true;}if(t.editorCommands.execCommand(cmd,ui,val)){t.onExecCommand.dispatch(t,cmd,ui,val,a);return true;}t.getDoc().execCommand(cmd,ui,val);t.onExecCommand.dispatch(t,cmd,ui,val,a);},queryCommandState:function(c){var t=this,o,s;if(t._isHidden())return;if(o=t.queryStateCommands[c]){s=o.func.call(o.scope);if(s!==true)return s;}o=t.editorCommands.queryCommandState(c);if(o!==-1)return o;try{return this.getDoc().queryCommandState(c);}catch(ex){}},queryCommandValue:function(c){var t=this,o,s;if(t._isHidden())return;if(o=t.queryValueCommands[c]){s=o.func.call(o.scope);if(s!==true)return s;}o=t.editorCommands.queryCommandValue(c);if(is(o))return o;try{return this.getDoc().queryCommandValue(c);}catch(ex){}},show:function(){var t=this;DOM.show(t.getContainer());DOM.hide(t.id);t.load();},hide:function(){var t=this,d=t.getDoc();if(isIE&&d)d.execCommand('SelectAll');t.save();DOM.hide(t.getContainer());DOM.setStyle(t.id,'display',t.orgDisplay);},isHidden:function(){return!DOM.isHidden(this.id);},setProgressState:function(b,ti,o){this.onSetProgressState.dispatch(this,b,ti,o);return b;},resizeToContent:function(){var t=this;DOM.setStyle(t.id+"_ifr",'height',t.getBody().scrollHeight);},load:function(o){var t=this,e=t.getElement(),h;if(e){o=o||{};o.load=true;h=t.setContent(is(e.value)?e.value:e.innerHTML,o);o.element=e;if(!o.no_events)t.onLoadContent.dispatch(t,o);o.element=e=null;return h;}},save:function(o){var t=this,e=t.getElement(),h,f;if(!e||!t.initialized)return;o=o||{};o.save=true;if(!o.no_events){t.undoManager.typing=0;t.undoManager.add();}o.element=e;h=o.content=t.getContent(o);if(!o.no_events)t.onSaveContent.dispatch(t,o);h=o.content;if(!/TEXTAREA|INPUT/i.test(e.nodeName)){e.innerHTML=h;if(f=DOM.getParent(t.id,'form')){each(f.elements,function(e){if(e.name==t.id){e.value=h;return false;}});}}else e.value=h;o.element=e=null;return h;},setContent:function(h,o){var t=this;o=o||{};o.format=o.format||'html';o.set=true;o.content=h;if(!o.no_events)t.onBeforeSetContent.dispatch(t,o);if(!tinymce.isIE&&(h.length===0||/^\s+$/.test(h))){o.content=t.dom.setHTML(t.getBody(),'
');o.format='raw';}o.content=t.dom.setHTML(t.getBody(),tinymce.trim(o.content));if(o.format!='raw'&&t.settings.cleanup){o.getInner=true;o.content=t.dom.setHTML(t.getBody(),t.serializer.serialize(t.getBody(),o));}if(!o.no_events)t.onSetContent.dispatch(t,o);return o.content;},getContent:function(o){var t=this,h;o=o||{};o.format=o.format||'html';o.get=true;if(!o.no_events)t.onBeforeGetContent.dispatch(t,o);if(o.format!='raw'&&t.settings.cleanup){o.getInner=true;h=t.serializer.serialize(t.getBody(),o);}else h=t.getBody().innerHTML;h=h.replace(/^\s*|\s*$/g,'');o.content=h;if(!o.no_events)t.onGetContent.dispatch(t,o);return o.content;},isDirty:function(){var t=this;return tinymce.trim(t.startContent)!=tinymce.trim(t.getContent({format:'raw',no_events:1}))&&!t.isNotDirty;},getContainer:function(){var t=this;if(!t.container)t.container=DOM.get(t.editorContainer||t.id+'_parent');return t.container;},getContentAreaContainer:function(){return this.contentAreaContainer;},getElement:function(){return DOM.get(this.settings.content_element||this.id);},getWin:function(){var t=this,e;if(!t.contentWindow){e=DOM.get(t.id+"_ifr");if(e)t.contentWindow=e.contentWindow;}return t.contentWindow;},getDoc:function(){var t=this,w;if(!t.contentDocument){w=t.getWin();if(w)t.contentDocument=w.document;}return t.contentDocument;},getBody:function(){return this.bodyElement||this.getDoc().body;},convertURL:function(u,n,e){var t=this,s=t.settings;if(s.urlconverter_callback)return t.execCallback('urlconverter_callback',u,e,true,n);if(!s.convert_urls||(e&&e.nodeName=='LINK')||u.indexOf('file:')===0)return u;if(s.relative_urls)return t.documentBaseURI.toRelative(u);u=t.documentBaseURI.toAbsolute(u,s.remove_script_host);return u;},addVisual:function(e){var t=this,s=t.settings;e=e||t.getBody();if(!is(t.hasVisual))t.hasVisual=s.visual;each(t.dom.select('table,a',e),function(e){var v;switch(e.nodeName){case'TABLE':v=t.dom.getAttrib(e,'border');if(!v||v=='0'){if(t.hasVisual)t.dom.addClass(e,s.visual_table_class);else t.dom.removeClass(e,s.visual_table_class);}return;case'A':v=t.dom.getAttrib(e,'name');if(v){if(t.hasVisual)t.dom.addClass(e,'mceItemAnchor');else t.dom.removeClass(e,'mceItemAnchor');}return;}});t.onVisualAid.dispatch(t,e,t.hasVisual);},remove:function(){var t=this,e=t.getContainer();t.removed=1;t.hide();t.execCallback('remove_instance_callback',t);t.onRemove.dispatch(t);t.onExecCommand.listeners=[];EditorManager.remove(t);DOM.remove(e);},destroy:function(s){var t=this;if(t.destroyed)return;if(!s){tinymce.removeUnload(t.destroy);tinyMCE.onBeforeUnload.remove(t._beforeUnload);if(t.theme.destroy)t.theme.destroy();t.controlManager.destroy();t.selection.destroy();t.dom.destroy();if(!t.settings.content_editable){Event.clear(t.getWin());Event.clear(t.getDoc());}Event.clear(t.getBody());Event.clear(t.formElement);}if(t.formElement){t.formElement.submit=t.formElement._mceOldSubmit;t.formElement._mceOldSubmit=null;}t.contentAreaContainer=t.formElement=t.container=t.settings.content_element=t.bodyElement=t.contentDocument=t.contentWindow=null;if(t.selection)t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null;t.destroyed=1;},_addEvents:function(){var t=this,i,s=t.settings,lo={mouseup:'onMouseUp',mousedown:'onMouseDown',click:'onClick',keyup:'onKeyUp',keydown:'onKeyDown',keypress:'onKeyPress',submit:'onSubmit',reset:'onReset',contextmenu:'onContextMenu',dblclick:'onDblClick',paste:'onPaste'};function eventHandler(e,o){var ty=e.type;if(t.removed)return;if(t.onEvent.dispatch(t,e,o)!==false){t[lo[e.fakeType||e.type]].dispatch(t,e,o);}};each(lo,function(v,k){switch(k){case'contextmenu':if(tinymce.isOpera){Event.add(t.getBody(),'mousedown',function(e){if(e.ctrlKey){e.fakeType='contextmenu';eventHandler(e);}});}else Event.add(t.getBody(),k,eventHandler);break;case'paste':Event.add(t.getBody(),k,function(e){var tx,h,el,r;if(e.clipboardData)tx=e.clipboardData.getData('text/plain');else if(tinymce.isIE)tx=t.getWin().clipboardData.getData('Text');eventHandler(e,{text:tx,html:h});});break;case'submit':case'reset':Event.add(t.getElement().form||DOM.getParent(t.id,'form'),k,eventHandler);break;default:Event.add(s.content_editable?t.getBody():t.getDoc(),k,eventHandler);}});Event.add(s.content_editable?t.getBody():(isGecko?t.getDoc():t.getWin()),'focus',function(e){t.focus(true);});if(tinymce.isGecko){Event.add(t.getDoc(),'DOMNodeInserted',function(e){var v;e=e.target;if(e.nodeType===1&&e.nodeName==='IMG'&&(v=e.getAttribute('mce_src')))e.src=t.documentBaseURI.toAbsolute(v);});}if(isGecko){function setOpts(){var t=this,d=t.getDoc(),s=t.settings;if(isGecko&&!s.readonly){if(t._isHidden()){try{if(!s.content_editable)d.designMode='On';}catch(ex){}}try{d.execCommand("styleWithCSS",0,false);}catch(ex){if(!t._isHidden())try{d.execCommand("useCSS",0,true);}catch(ex){}}if(!s.table_inline_editing)try{d.execCommand('enableInlineTableEditing',false,false);}catch(ex){}if(!s.object_resizing)try{d.execCommand('enableObjectResizing',false,false);}catch(ex){}}};t.onBeforeExecCommand.add(setOpts);t.onMouseDown.add(setOpts);}t.onMouseUp.add(t.nodeChanged);t.onClick.add(t.nodeChanged);t.onKeyUp.add(function(ed,e){var c=e.keyCode;if((c>=33&&c<=36)||(c>=37&&c<=40)||c==13||c==45||c==46||c==8||(tinymce.isMac&&(c==91||c==93))||e.ctrlKey)t.nodeChanged();});t.onReset.add(function(){t.setContent(t.startContent,{format:'raw'});});if(t.getParam('tab_focus')){function tabCancel(ed,e){if(e.keyCode===9)return Event.cancel(e);};function tabHandler(ed,e){var x,i,f,el,v;function find(d){f=DOM.getParent(ed.id,'form');el=f.elements;if(f){each(el,function(e,i){if(e.id==ed.id){x=i;return false;}});if(d>0){for(i=x+1;i=0;i--){if(el[i].type!='hidden')return el[i];}}}return null;};if(e.keyCode===9){v=explode(ed.getParam('tab_focus'));if(v.length==1){v[1]=v[0];v[0]=':prev';}if(e.shiftKey){if(v[0]==':prev')el=find(-1);else el=DOM.get(v[0]);}else{if(v[1]==':next')el=find(1);else el=DOM.get(v[1]);}if(el){if(ed=EditorManager.get(el.id||el.name))ed.focus();else window.setTimeout(function(){window.focus();el.focus();},10);return Event.cancel(e);}}};t.onKeyUp.add(tabCancel);if(isGecko){t.onKeyPress.add(tabHandler);t.onKeyDown.add(tabCancel);}else t.onKeyDown.add(tabHandler);}if(s.custom_shortcuts){if(s.custom_undo_redo_keyboard_shortcuts){t.addShortcut('ctrl+z',t.getLang('undo_desc'),'Undo');t.addShortcut('ctrl+y',t.getLang('redo_desc'),'Redo');}if(isGecko){t.addShortcut('ctrl+b',t.getLang('bold_desc'),'Bold');t.addShortcut('ctrl+i',t.getLang('italic_desc'),'Italic');t.addShortcut('ctrl+u',t.getLang('underline_desc'),'Underline');}for(i=1;i<=6;i++)t.addShortcut('ctrl+'+i,'',['FormatBlock',false,'']);t.addShortcut('ctrl+7','',['FormatBlock',false,'

']);t.addShortcut('ctrl+8','',['FormatBlock',false,'

']);t.addShortcut('ctrl+9','',['FormatBlock',false,'
']);function find(e){var v=null;if(!e.altKey&&!e.ctrlKey&&!e.metaKey)return v;each(t.shortcuts,function(o){if(tinymce.isMac&&o.ctrl!=e.metaKey)return;else if(!tinymce.isMac&&o.ctrl!=e.ctrlKey)return;if(o.alt!=e.altKey)return;if(o.shift!=e.shiftKey)return;if(e.keyCode==o.keyCode||(e.charCode&&e.charCode==o.charCode)){v=o;return false;}});return v;};t.onKeyUp.add(function(ed,e){var o=find(e);if(o)return Event.cancel(e);});t.onKeyPress.add(function(ed,e){var o=find(e);if(o)return Event.cancel(e);});t.onKeyDown.add(function(ed,e){var o=find(e);if(o){o.func.call(o.scope);return Event.cancel(e);}});}if(tinymce.isIE){Event.add(t.getDoc(),'controlselect',function(e){var re=t.resizeInfo,cb;e=e.target;if(e.nodeName!=='IMG')return;if(re)Event.remove(re.node,re.ev,re.cb);if(!t.dom.hasClass(e,'mceItemNoResize')){ev='resizeend';cb=Event.add(e,ev,function(e){var v;e=e.target;if(v=t.dom.getStyle(e,'width')){t.dom.setAttrib(e,'width',v.replace(/[^0-9%]+/g,''));t.dom.setStyle(e,'width','');}if(v=t.dom.getStyle(e,'height')){t.dom.setAttrib(e,'height',v.replace(/[^0-9%]+/g,''));t.dom.setStyle(e,'height','');}});}else{ev='resizestart';cb=Event.add(e,'resizestart',Event.cancel,Event);}re=t.resizeInfo={node:e,ev:ev,cb:cb};});t.onKeyDown.add(function(ed,e){switch(e.keyCode){case 8:if(t.selection.getRng().item){t.selection.getRng().item(0).removeNode();return Event.cancel(e);}}});}if(tinymce.isOpera){t.onClick.add(function(ed,e){Event.prevent(e);});}if(s.custom_undo_redo){function addUndo(){t.undoManager.typing=0;t.undoManager.add();};if(tinymce.isIE){Event.add(t.getWin(),'blur',function(e){var n;if(t.selection){n=t.selection.getNode();if(!t.removed&&n.ownerDocument&&n.ownerDocument!=t.getDoc())addUndo();}});}else{Event.add(t.getDoc(),'blur',function(){if(t.selection&&!t.removed)addUndo();});}t.onMouseDown.add(addUndo);t.onKeyUp.add(function(ed,e){if((e.keyCode>=33&&e.keyCode<=36)||(e.keyCode>=37&&e.keyCode<=40)||e.keyCode==13||e.keyCode==45||e.ctrlKey){t.undoManager.typing=0;t.undoManager.add();}});t.onKeyDown.add(function(ed,e){if((e.keyCode>=33&&e.keyCode<=36)||(e.keyCode>=37&&e.keyCode<=40)||e.keyCode==13||e.keyCode==45){if(t.undoManager.typing){t.undoManager.add();t.undoManager.typing=0;}return;}if(!t.undoManager.typing){t.undoManager.add();t.undoManager.typing=1;}});}},_convertInlineElements:function(){var t=this,s=t.settings,dom=t.dom,v,e,na,st,sp;function convert(ed,o){if(!s.inline_styles)return;if(o.get){each(t.dom.select('table,u,strike',o.node),function(n){switch(n.nodeName){case'TABLE':if(v=dom.getAttrib(n,'height')){dom.setStyle(n,'height',v);dom.setAttrib(n,'height','');}break;case'U':case'STRIKE':n.style.textDecoration=n.nodeName=='U'?'underline':'line-through';dom.setAttrib(n,'mce_style','');dom.setAttrib(n,'mce_name','span');break;}});}else if(o.set){each(t.dom.select('table,span',o.node).reverse(),function(n){if(n.nodeName=='TABLE'){if(v=dom.getStyle(n,'height'))dom.setAttrib(n,'height',v.replace(/[^0-9%]+/g,''));}else{if(n.style.textDecoration=='underline')na='u';else if(n.style.textDecoration=='line-through')na='strike';else na='';if(na){n.style.textDecoration='';dom.setAttrib(n,'mce_style','');e=dom.create(na,{style:dom.getAttrib(n,'style')});dom.replace(e,n,1);}}});}};t.onPreProcess.add(convert);if(!s.cleanup_on_startup){t.onSetContent.add(function(ed,o){if(o.initial)convert(t,{node:t.getBody(),set:1});});}},_convertFonts:function(){var t=this,s=t.settings,dom=t.dom,fz,fzn,sl,cl;if(!s.inline_styles)return;fz=[8,10,12,14,18,24,36];fzn=['xx-small','x-small','small','medium','large','x-large','xx-large'];if(sl=s.font_size_style_values)sl=explode(sl);if(cl=s.font_size_classes)cl=explode(cl);function process(no){var n,sp,nl,x;if(!s.inline_styles)return;nl=t.dom.select('font',no);for(x=nl.length-1;x>=0;x--){n=nl[x];sp=dom.create('span',{style:dom.getAttrib(n,'style'),'class':dom.getAttrib(n,'class')});dom.setStyles(sp,{fontFamily:dom.getAttrib(n,'face'),color:dom.getAttrib(n,'color'),backgroundColor:n.style.backgroundColor});if(n.size){if(sl)dom.setStyle(sp,'fontSize',sl[parseInt(n.size)-1]);else dom.setAttrib(sp,'class',cl[parseInt(n.size)-1]);}dom.setAttrib(sp,'mce_style','');dom.replace(sp,n,1);}};t.onPreProcess.add(function(ed,o){if(o.get)process(o.node);});t.onSetContent.add(function(ed,o){if(o.initial)process(o.node);});},_isHidden:function(){var s;if(!isGecko)return 0;s=this.selection.getSel();return(!s||!s.rangeCount||s.rangeCount==0);},_fixNesting:function(s){var d=[],i;s=s.replace(/<(\/)?([^\s>]+)[^>]*?>/g,function(a,b,c){var e;if(b==='/'){if(!d.length)return'';if(c!==d[d.length-1].tag){for(i=d.length-1;i>=0;i--){if(d[i].tag===c){d[i].close=1;break;}}return'';}else{d.pop();if(d.length&&d[d.length-1].close){a=a+'';d.pop();}}}else{if(/^(br|hr|input|meta|img|link|param)$/i.test(c))return a;if(/\/>$/.test(a))return a;d.push({tag:c});}return a;});for(i=d.length-1;i>=0;i--)s+='';return s;}});})();(function(){var each=tinymce.each,isIE=tinymce.isIE,isGecko=tinymce.isGecko,isOpera=tinymce.isOpera,isWebKit=tinymce.isWebKit;function isBlock(n){return/^(H[1-6]|HR|P|DIV|ADDRESS|PRE|FORM|TABLE|OL|UL|TD|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|NOFRAMES|MENU|ISINDEX|SAMP)$/.test(n.nodeName);};tinymce.create('tinymce.EditorCommands',{EditorCommands:function(ed){this.editor=ed;},execCommand:function(cmd,ui,val){var t=this,ed=t.editor,f;switch(cmd){case'Cut':case'Copy':case'Paste':try{ed.getDoc().execCommand(cmd,ui,val);}catch(ex){if(isGecko){ed.windowManager.confirm(ed.getLang('clipboard_msg'),function(s){if(s)window.open('http://www.mozilla.org/editor/midasdemo/securityprefs.html','mceExternal');});}else ed.windowManager.alert(ed.getLang('clipboard_no_support'));}return true;case'mceResetDesignMode':case'mceBeginUndoLevel':return true;case'unlink':t.UnLink();return true;case'JustifyLeft':case'JustifyCenter':case'JustifyRight':case'JustifyFull':t.mceJustify(cmd,cmd.substring(7).toLowerCase());return true;case'mceEndUndoLevel':case'mceAddUndoLevel':ed.undoManager.add();return true;default:f=this[cmd];if(f){f.call(this,ui,val);return true;}}return false;},Indent:function(){var ed=this.editor,d=ed.dom,s=ed.selection,e,iv,iu;iv=ed.settings.indentation;iu=/[a-z%]+$/i.exec(iv);iv=parseInt(iv);if(ed.settings.inline_styles&&(!this.queryStateInsertUnorderedList()&&!this.queryStateInsertOrderedList())){each(this._getSelectedBlocks(),function(e){d.setStyle(e,'paddingLeft',(parseInt(e.style.paddingLeft||0)+iv)+iu);});return;}ed.getDoc().execCommand('Indent',false,null);if(isIE){d.getParent(s.getNode(),function(n){if(n.nodeName=='BLOCKQUOTE'){n.dir=n.style.cssText='';}});}},Outdent:function(){var ed=this.editor,d=ed.dom,s=ed.selection,e,v,iv,iu;iv=ed.settings.indentation;iu=/[a-z%]+$/i.exec(iv);iv=parseInt(iv);if(ed.settings.inline_styles&&(!this.queryStateInsertUnorderedList()&&!this.queryStateInsertOrderedList())){each(this._getSelectedBlocks(),function(e){v=Math.max(0,parseInt(e.style.paddingLeft||0)-iv);d.setStyle(e,'paddingLeft',v?v+iu:'');});return;}ed.getDoc().execCommand('Outdent',false,null);},mceSetAttribute:function(u,v){var ed=this.editor,d=ed.dom,e;if(e=d.getParent(ed.selection.getNode(),d.isBlock))d.setAttrib(e,v.name,v.value);},mceSetContent:function(u,v){this.editor.setContent(v);},mceToggleVisualAid:function(){var ed=this.editor;ed.hasVisual=!ed.hasVisual;ed.addVisual();},mceReplaceContent:function(u,v){var s=this.editor.selection;s.setContent(v.replace(/\{\$selection\}/g,s.getContent({format:'text'})));},mceInsertLink:function(u,v){var ed=this.editor,s=ed.selection,e=ed.dom.getParent(s.getNode(),'A');if(tinymce.is(v,'string'))v={href:v};function set(e){each(v,function(v,k){ed.dom.setAttrib(e,k,v);});};if(!e){ed.execCommand('CreateLink',false,'javascript:mctmp(0);');each(ed.dom.select('a'),function(e){if(e.href=='javascript:mctmp(0);')set(e);});}else{if(v.href)set(e);else ed.dom.remove(e,1);}},UnLink:function(){var ed=this.editor,s=ed.selection;if(s.isCollapsed())s.select(s.getNode());ed.getDoc().execCommand('unlink',false,null);s.collapse(0);},FontName:function(u,v){var t=this,ed=t.editor,s=ed.selection,e;if(!v){if(s.isCollapsed())s.select(s.getNode());t.RemoveFormat();}else{if(ed.settings.convert_fonts_to_spans)t._applyInlineStyle('span',{style:{fontFamily:v}});else ed.getDoc().execCommand('FontName',false,v);}},FontSize:function(u,v){var ed=this.editor,s=ed.settings,fc,fs;if(s.convert_fonts_to_spans&&v>=1&&v<=7){fs=tinymce.explode(s.font_size_style_values);fc=tinymce.explode(s.font_size_classes);if(fc)v=fc[v-1]||v;else v=fs[v-1]||v;}if(v>=1&&v<=7)ed.getDoc().execCommand('FontSize',false,v);else this._applyInlineStyle('span',{style:{fontSize:v}});},queryCommandValue:function(c){var f=this['queryValue'+c];if(f)return f.call(this,c);return false;},queryCommandState:function(cmd){var f;switch(cmd){case'JustifyLeft':case'JustifyCenter':case'JustifyRight':case'JustifyFull':return this.queryStateJustify(cmd,cmd.substring(7).toLowerCase());default:if(f=this['queryState'+cmd])return f.call(this,cmd);}return-1;},_queryState:function(c){try{return this.editor.getDoc().queryCommandState(c);}catch(ex){}},_queryVal:function(c){try{return this.editor.getDoc().queryCommandValue(c);}catch(ex){}},queryValueFontSize:function(){var ed=this.editor,v=0,p;if(p=ed.dom.getParent(ed.selection.getNode(),'SPAN'))v=p.style.fontSize;if(!v&&(isOpera||isWebKit)){if(p=ed.dom.getParent(ed.selection.getNode(),'FONT'))v=p.size;return v;}return v||this._queryVal('FontSize');},queryValueFontName:function(){var ed=this.editor,v=0,p;if(p=ed.dom.getParent(ed.selection.getNode(),'FONT'))v=p.face;if(p=ed.dom.getParent(ed.selection.getNode(),'SPAN'))v=p.style.fontFamily.replace(/, /g,',').replace(/[\'\"]/g,'').toLowerCase();if(!v)v=this._queryVal('FontName');return v;},mceJustify:function(c,v){var ed=this.editor,se=ed.selection,n=se.getNode(),nn=n.nodeName,bl,nb,dom=ed.dom,rm;if(ed.settings.inline_styles&&this.queryStateJustify(c,v))rm=1;bl=dom.getParent(n,ed.dom.isBlock);if(nn=='IMG'){if(v=='full')return;if(rm){if(v=='center')dom.setStyle(bl||n.parentNode,'textAlign','');dom.setStyle(n,'float','');this.mceRepaint();return;}if(v=='center'){if(bl&&/^(TD|TH)$/.test(bl.nodeName))bl=0;if(!bl||bl.childNodes.length>1){nb=dom.create('p');nb.appendChild(n.cloneNode(false));if(bl)dom.insertAfter(nb,bl);else dom.insertAfter(nb,n);dom.remove(n);n=nb.firstChild;bl=nb;}dom.setStyle(bl,'textAlign',v);dom.setStyle(n,'float','');}else{dom.setStyle(n,'float',v);dom.setStyle(bl||n.parentNode,'textAlign','');}this.mceRepaint();return;}if(ed.settings.inline_styles&&ed.settings.forced_root_block){if(rm)v='';each(this._getSelectedBlocks(dom.getParent(se.getStart(),dom.isBlock),dom.getParent(se.getEnd(),dom.isBlock)),function(e){dom.setAttrib(e,'align','');dom.setStyle(e,'textAlign',v=='full'?'justify':v);});return;}else if(!rm)ed.getDoc().execCommand(c,false,null);if(ed.settings.inline_styles){if(rm){dom.getParent(ed.selection.getNode(),function(n){if(n.style&&n.style.textAlign)dom.setStyle(n,'textAlign','');});return;}each(dom.select('*'),function(n){var v=n.align;if(v){if(v=='full')v='justify';dom.setStyle(n,'textAlign',v);dom.setAttrib(n,'align','');}});}},mceSetCSSClass:function(u,v){this.mceSetStyleInfo(0,{command:'setattrib',name:'class',value:v});},getSelectedElement:function(){var t=this,ed=t.editor,dom=ed.dom,se=ed.selection,r=se.getRng(),r1,r2,sc,ec,so,eo,e,sp,ep,re;if(se.isCollapsed()||r.item)return se.getNode();re=ed.settings.merge_styles_invalid_parents;if(tinymce.is(re,'string'))re=new RegExp(re,'i');if(isIE){r1=r.duplicate();r1.collapse(true);sc=r1.parentElement();r2=r.duplicate();r2.collapse(false);ec=r2.parentElement();if(sc!=ec){r1.move('character',1);sc=r1.parentElement();}if(sc==ec){r1=r.duplicate();r1.moveToElementText(sc);if(r1.compareEndPoints('StartToStart',r)==0&&r1.compareEndPoints('EndToEnd',r)==0)return re&&re.test(sc.nodeName)?null:sc;}}else{function getParent(n){return dom.getParent(n,function(n){return n.nodeType==1;});};sc=r.startContainer;ec=r.endContainer;so=r.startOffset;eo=r.endOffset;if(!r.collapsed){if(sc==ec){if(so-eo<2){if(sc.hasChildNodes()){sp=sc.childNodes[so];return re&&re.test(sp.nodeName)?null:sp;}}}}if(sc.nodeType!=3||ec.nodeType!=3)return null;if(so==0){sp=getParent(sc);if(sp&&sp.firstChild!=sc)sp=null;}if(so==sc.nodeValue.length){e=sc.nextSibling;if(e&&e.nodeType==1)sp=sc.nextSibling;}if(eo==0){e=ec.previousSibling;if(e&&e.nodeType==1)ep=e;}if(eo==ec.nodeValue.length){ep=getParent(ec);if(ep&&ep.lastChild!=ec)ep=null;}if(sp==ep)return re&&sp&&re.test(sp.nodeName)?null:sp;}return null;},InsertHorizontalRule:function(){if(isGecko||isIE)this.editor.selection.setContent('
');else this.editor.getDoc().execCommand('InsertHorizontalRule',false,'');},RemoveFormat:function(){var t=this,ed=t.editor,s=ed.selection,b;if(isWebKit)s.setContent(s.getContent({format:'raw'}).replace(/(<(span|b|i|strong|em|strike) [^>]+>|<(span|b|i|strong|em|strike)>|<\/(span|b|i|strong|em|strike)>|)/g,''),{format:'raw'});else ed.getDoc().execCommand('RemoveFormat',false,null);t.mceSetStyleInfo(0,{command:'removeformat'});ed.addVisual();},mceSetStyleInfo:function(u,v){var t=this,ed=t.editor,d=ed.getDoc(),dom=ed.dom,e,b,s=ed.selection,nn=v.wrapper||'span',b=s.getBookmark(),re;function set(n,e){if(n.nodeType==1){switch(v.command){case'setattrib':return dom.setAttrib(n,v.name,v.value);case'setstyle':return dom.setStyle(n,v.name,v.value);case'removeformat':return dom.setAttrib(n,'class','');}}};re=ed.settings.merge_styles_invalid_parents;if(tinymce.is(re,'string'))re=new RegExp(re,'i');if((e=t.getSelectedElement())&&!ed.settings.force_span_wrappers)set(e,1);else{d.execCommand('FontName',false,'__');each(isWebKit?dom.select('span'):dom.select('font'),function(n){var sp,e;if(dom.getAttrib(n,'face')=='__'||n.style.fontFamily==='__'){sp=dom.create(nn,{mce_new:'1'});set(sp);each(n.childNodes,function(n){sp.appendChild(n.cloneNode(true));});dom.replace(sp,n);}});}each(dom.select(nn).reverse(),function(n){var p=n.parentNode;if(!dom.getAttrib(n,'mce_new')){p=dom.getParent(n,function(n){return n.nodeType==1&&dom.getAttrib(n,'mce_new');});if(p)dom.remove(n,1);}});each(dom.select(nn).reverse(),function(n){var p=n.parentNode;if(!p||!dom.getAttrib(n,'mce_new'))return;if(ed.settings.force_span_wrappers&&p.nodeName!='SPAN')return;if(p.nodeName==nn.toUpperCase()&&p.childNodes.length==1)return dom.remove(p,1);if(n.nodeType==1&&(!re||!re.test(p.nodeName))&&p.childNodes.length==1){set(p);dom.setAttrib(n,'class','');}});each(dom.select(nn).reverse(),function(n){if(dom.getAttrib(n,'mce_new')||(dom.getAttribs(n).length<=1&&n.className==='')){if(!dom.getAttrib(n,'class')&&!dom.getAttrib(n,'style'))return dom.remove(n,1);dom.setAttrib(n,'mce_new','');}});s.moveToBookmark(b);},queryStateJustify:function(c,v){var ed=this.editor,n=ed.selection.getNode(),dom=ed.dom;if(n&&n.nodeName=='IMG'){if(dom.getStyle(n,'float')==v)return 1;return n.parentNode.style.textAlign==v;}n=dom.getParent(ed.selection.getStart(),function(n){return n.nodeType==1&&n.style.textAlign;});if(v=='full')v='justify';if(ed.settings.inline_styles)return(n&&n.style.textAlign==v);return this._queryState(c);},ForeColor:function(ui,v){var ed=this.editor;if(ed.settings.convert_fonts_to_spans){this._applyInlineStyle('span',{style:{color:v}});return;}else ed.getDoc().execCommand('ForeColor',false,v);},HiliteColor:function(ui,val){var t=this,ed=t.editor,d=ed.getDoc();if(ed.settings.convert_fonts_to_spans){this._applyInlineStyle('span',{style:{backgroundColor:val}});return;}function set(s){if(!isGecko)return;try{d.execCommand("styleWithCSS",0,s);}catch(ex){d.execCommand("useCSS",0,!s);}};if(isGecko||isOpera){set(true);d.execCommand('hilitecolor',false,val);set(false);}else d.execCommand('BackColor',false,val);},Undo:function(){var ed=this.editor;if(ed.settings.custom_undo_redo){ed.undoManager.undo();ed.nodeChanged();}else ed.getDoc().execCommand('Undo',false,null);},Redo:function(){var ed=this.editor;if(ed.settings.custom_undo_redo){ed.undoManager.redo();ed.nodeChanged();}else ed.getDoc().execCommand('Redo',false,null);},FormatBlock:function(ui,val){var t=this,ed=t.editor,s=ed.selection,dom=ed.dom,bl,nb,b;function isBlock(n){return/^(P|DIV|H[1-6]|ADDRESS|BLOCKQUOTE|PRE)$/.test(n.nodeName);};bl=dom.getParent(s.getNode(),function(n){return isBlock(n);});if(bl){if((isIE&&isBlock(bl.parentNode))||bl.nodeName=='DIV'){nb=ed.dom.create(val);each(dom.getAttribs(bl),function(v){dom.setAttrib(nb,v.nodeName,dom.getAttrib(bl,v.nodeName));});b=s.getBookmark();dom.replace(nb,bl,1);s.moveToBookmark(b);ed.nodeChanged();return;}}val=ed.settings.forced_root_block?(val||'

'):val;if(val.indexOf('<')==-1)val='<'+val+'>';if(tinymce.isGecko)val=val.replace(/<(div|blockquote|code|dt|dd|dl|samp)>/gi,'$1');ed.getDoc().execCommand('FormatBlock',false,val);},mceCleanup:function(){var ed=this.editor,s=ed.selection,b=s.getBookmark();ed.setContent(ed.getContent());s.moveToBookmark(b);},mceRemoveNode:function(ui,val){var ed=this.editor,s=ed.selection,b,n=val||s.getNode();if(n==ed.getBody())return;b=s.getBookmark();ed.dom.remove(n,1);s.moveToBookmark(b);ed.nodeChanged();},mceSelectNodeDepth:function(ui,val){var ed=this.editor,s=ed.selection,c=0;ed.dom.getParent(s.getNode(),function(n){if(n.nodeType==1&&c++==val){s.select(n);ed.nodeChanged();return false;}},ed.getBody());},mceSelectNode:function(u,v){this.editor.selection.select(v);},mceInsertContent:function(ui,val){this.editor.selection.setContent(val);},mceInsertRawHTML:function(ui,val){var ed=this.editor;ed.selection.setContent('tiny_mce_marker');ed.setContent(ed.getContent().replace(/tiny_mce_marker/g,val));},mceRepaint:function(){var s,b,e=this.editor;if(tinymce.isGecko){try{s=e.selection;b=s.getBookmark(true);if(s.getSel())s.getSel().selectAllChildren(e.getBody());s.collapse(true);s.moveToBookmark(b);}catch(ex){}}},queryStateUnderline:function(){var ed=this.editor,n=ed.selection.getNode();if(n&&n.nodeName=='A')return false;return this._queryState('Underline');},queryStateOutdent:function(){var ed=this.editor,n;if(ed.settings.inline_styles){if((n=ed.dom.getParent(ed.selection.getStart(),ed.dom.isBlock))&&parseInt(n.style.paddingLeft)>0)return true;if((n=ed.dom.getParent(ed.selection.getEnd(),ed.dom.isBlock))&&parseInt(n.style.paddingLeft)>0)return true;}return this.queryStateInsertUnorderedList()||this.queryStateInsertOrderedList()||(!ed.settings.inline_styles&&!!ed.dom.getParent(ed.selection.getNode(),'BLOCKQUOTE'));},queryStateInsertUnorderedList:function(){return this.editor.dom.getParent(this.editor.selection.getNode(),'UL');},queryStateInsertOrderedList:function(){return this.editor.dom.getParent(this.editor.selection.getNode(),'OL');},queryStatemceBlockQuote:function(){return!!this.editor.dom.getParent(this.editor.selection.getStart(),function(n){return n.nodeName==='BLOCKQUOTE';});},mceBlockQuote:function(){var t=this,ed=t.editor,s=ed.selection,dom=ed.dom,sb,eb,n,bm,bq,r,bq2,i,nl;function getBQ(e){return dom.getParent(e,function(n){return n.nodeName==='BLOCKQUOTE';});};sb=dom.getParent(s.getStart(),isBlock);eb=dom.getParent(s.getEnd(),isBlock);if(bq=getBQ(sb)){if(sb!=eb||sb.childNodes.length>1||(sb.childNodes.length==1&&sb.firstChild.nodeName!='BR'))bm=s.getBookmark();if(getBQ(eb)){bq2=bq.cloneNode(false);while(n=eb.nextSibling)bq2.appendChild(n.parentNode.removeChild(n));}if(bq2)dom.insertAfter(bq2,bq);nl=t._getSelectedBlocks(sb,eb);for(i=nl.length-1;i>=0;i--){dom.insertAfter(nl[i],bq);}if(/^\s*$/.test(bq.innerHTML))dom.remove(bq,1);if(bq2&&/^\s*$/.test(bq2.innerHTML))dom.remove(bq2,1);if(!bm){if(!isIE){r=ed.getDoc().createRange();r.setStart(sb,0);r.setEnd(sb,0);s.setRng(r);}else{s.select(sb);s.collapse(0);if(dom.getParent(s.getStart(),isBlock)!=sb){r=s.getRng();r.move('character',-1);r.select();}}}else t.editor.selection.moveToBookmark(bm);return;}if(isIE&&!sb&&!eb){t.editor.getDoc().execCommand('Indent');n=getBQ(s.getNode());n.style.margin=n.dir='';return;}if(!sb||!eb)return;if(sb!=eb||sb.childNodes.length>1||(sb.childNodes.length==1&&sb.firstChild.nodeName!='BR'))bm=s.getBookmark();each(t._getSelectedBlocks(getBQ(s.getStart()),getBQ(s.getEnd())),function(e){if(e.nodeName=='BLOCKQUOTE'&&!bq){bq=e;return;}if(!bq){bq=dom.create('blockquote');e.parentNode.insertBefore(bq,e);}if(e.nodeName=='BLOCKQUOTE'&&bq){n=e.firstChild;while(n){bq.appendChild(n.cloneNode(true));n=n.nextSibling;}dom.remove(e);return;}bq.appendChild(dom.remove(e));});if(!bm){if(!isIE){r=ed.getDoc().createRange();r.setStart(sb,0);r.setEnd(sb,0);s.setRng(r);}else{s.select(sb);s.collapse(1);}}else s.moveToBookmark(bm);},_applyInlineStyle:function(na,at,op){var t=this,ed=t.editor,dom=ed.dom,bm,lo={},kh;na=na.toUpperCase();if(op&&op.check_classes&&at['class'])op.check_classes.push(at['class']);function replaceFonts(){var bm;each(dom.select(tinymce.isWebKit&&!tinymce.isAir?'span':'font'),function(n){if(n.style.fontFamily=='mceinline'||n.face=='mceinline'){if(!bm)bm=ed.selection.getBookmark();at._mce_new='1';dom.replace(dom.create(na,at),n,1);}});each(dom.select(na),function(n){if(n.getAttribute('_mce_new')){function removeStyle(n){if(n.nodeType==1){each(at.style,function(v,k){dom.setStyle(n,k,'');});if(at['class']&&n.className&&op){each(op.check_classes,function(c){if(dom.hasClass(n,c))dom.removeClass(n,c);});}}};each(dom.select(na,n),removeStyle);if(n.parentNode&&n.parentNode.nodeType==1&&n.parentNode.childNodes.length==1)removeStyle(n.parentNode);dom.getParent(n.parentNode,function(pn){if(pn.nodeType==1){if(at.style){each(at.style,function(v,k){var sv;if(!lo[k]&&(sv=dom.getStyle(pn,k))){if(sv===v)dom.setStyle(n,k,'');lo[k]=1;}});}if(at['class']&&pn.className&&op){each(op.check_classes,function(c){if(dom.hasClass(pn,c))dom.removeClass(n,c);});}}return false;});n.removeAttribute('_mce_new');}});each(dom.select(na).reverse(),function(n){var c=0;each(dom.getAttribs(n),function(an){if(an.nodeName.substring(0,1)!='_'&&dom.getAttrib(n,an.nodeName)!=''){c++;}});if(c==0)dom.remove(n,1);});ed.selection.moveToBookmark(bm);return!!bm;};ed.focus();ed.getDoc().execCommand('FontName',false,'mceinline');replaceFonts();if(kh=t._applyInlineStyle.keyhandler){ed.onKeyUp.remove(kh);ed.onKeyPress.remove(kh);ed.onKeyDown.remove(kh);ed.onSetContent.remove(t._applyInlineStyle.chandler);}if(ed.selection.isCollapsed()){t._pendingStyles=tinymce.extend(t._pendingStyles||{},at.style);t._applyInlineStyle.chandler=ed.onSetContent.add(function(){delete t._pendingStyles;});t._applyInlineStyle.keyhandler=kh=function(e){if(t._pendingStyles){at.style=t._pendingStyles;delete t._pendingStyles;}if(replaceFonts()){ed.onKeyDown.remove(t._applyInlineStyle.keyhandler);ed.onKeyPress.remove(t._applyInlineStyle.keyhandler);}if(e.type=='keyup')ed.onKeyUp.remove(t._applyInlineStyle.keyhandler);};ed.onKeyDown.add(kh);ed.onKeyPress.add(kh);ed.onKeyUp.add(kh);}else t._pendingStyles=0;},_getSelectedBlocks:function(st,en){var ed=this.editor,dom=ed.dom,s=ed.selection,sb,eb,n,bl=[];sb=dom.getParent(st||s.getStart(),isBlock);eb=dom.getParent(en||s.getEnd(),isBlock);if(sb)bl.push(sb);if(sb&&eb&&sb!=eb){n=sb;while((n=n.nextSibling)&&n!=eb){if(isBlock(n))bl.push(n);}}if(eb&&sb!=eb)bl.push(eb);return bl;}});})();tinymce.create('tinymce.UndoManager',{index:0,data:null,typing:0,UndoManager:function(ed){var t=this,Dispatcher=tinymce.util.Dispatcher;t.editor=ed;t.data=[];t.onAdd=new Dispatcher(this);t.onUndo=new Dispatcher(this);t.onRedo=new Dispatcher(this);},add:function(l){var t=this,i,ed=t.editor,b,s=ed.settings,la;l=l||{};l.content=l.content||ed.getContent({format:'raw',no_events:1});l.content=l.content.replace(/^\s*|\s*$/g,'');la=t.data[t.index>0&&(t.index==0||t.index==t.data.length)?t.index-1:t.index];if(!l.initial&&la&&l.content==la.content)return null;if(s.custom_undo_redo_levels){if(t.data.length>s.custom_undo_redo_levels){for(i=0;i0){if(t.index==t.data.length&&t.index>1){i=t.index;t.typing=0;if(!t.add())t.index=i;--t.index;}l=t.data[--t.index];ed.setContent(l.content,{format:'raw'});ed.selection.moveToBookmark(l.bookmark);t.onUndo.dispatch(t,l);}return l;},redo:function(){var t=this,ed=t.editor,l=null;if(t.index','gi');t.rePadd=new RegExp(']+)><\\\/p>|]+)\\\/>|]+)>\\s+<\\\/p>|

<\\\/p>||

\\s+<\\\/p>'.replace(/p/g,elm),'gi');t.reNbsp2BR1=new RegExp(']+)>[\\s\\u00a0]+<\\\/p>|

[\\s\\u00a0]+<\\\/p>'.replace(/p/g,elm),'gi');t.reNbsp2BR2=new RegExp(']+)>( | )<\\\/p>|

( | )<\\\/p>'.replace(/p/g,elm),'gi');t.reBR2Nbsp=new RegExp(']+)>\\s*
\\s*<\\\/p>|

\\s*
\\s*<\\\/p>'.replace(/p/g,elm),'gi');t.reTrailBr=new RegExp('\\s*
\\s*<\\\/p>'.replace(/p/g,elm),'gi');function padd(ed,o){if(isOpera)o.content=o.content.replace(t.reOpera,'');o.content=o.content.replace(t.rePadd,'<'+elm+'$1$2$3$4$5$6>\u00a0');if(!isIE&&!isOpera&&o.set){o.content=o.content.replace(t.reNbsp2BR1,'<'+elm+'$1$2>
');o.content=o.content.replace(t.reNbsp2BR2,'<'+elm+'$1$2>
');}else{o.content=o.content.replace(t.reBR2Nbsp,'<'+elm+'$1$2>\u00a0');o.content=o.content.replace(t.reTrailBr,'');}};ed.onBeforeSetContent.add(padd);ed.onPostProcess.add(padd);if(s.forced_root_block){ed.onInit.add(t.forceRoots,t);ed.onSetContent.add(t.forceRoots,t);ed.onBeforeGetContent.add(t.forceRoots,t);}},setup:function(){var t=this,ed=t.editor,s=ed.settings;if(s.forced_root_block){ed.onKeyUp.add(t.forceRoots,t);ed.onPreProcess.add(t.forceRoots,t);}if(s.force_br_newlines){if(isIE){ed.onKeyPress.add(function(ed,e){var n,s=ed.selection;if(e.keyCode==13&&s.getNode().nodeName!='LI'){s.setContent('
',{format:'raw'});n=ed.dom.get('__');n.removeAttribute('id');s.select(n);s.collapse();return Event.cancel(e);}});}return;}if(!isIE&&s.force_p_newlines){ed.onKeyPress.add(function(ed,e){if(e.keyCode==13&&!e.shiftKey){if(!t.insertPara(e))Event.cancel(e);}});if(isGecko){ed.onKeyDown.add(function(ed,e){if((e.keyCode==8||e.keyCode==46)&&!e.shiftKey)t.backspaceDelete(e,e.keyCode==8);});}}function ren(rn,na){var ne=ed.dom.create(na);each(rn.attributes,function(a){if(a.specified&&a.nodeValue)ne.setAttribute(a.nodeName.toLowerCase(),a.nodeValue);});each(rn.childNodes,function(n){ne.appendChild(n.cloneNode(true));});rn.parentNode.replaceChild(ne,rn);return ne;};if(isIE&&s.element!='P'){ed.onKeyPress.add(function(ed,e){t.lastElm=ed.selection.getNode().nodeName;});ed.onKeyUp.add(function(ed,e){var bl,sel=ed.selection,n=sel.getNode(),b=ed.getBody();if(b.childNodes.length===1&&n.nodeName=='P'){n=ren(n,s.element);sel.select(n);sel.collapse();ed.nodeChanged();}else if(e.keyCode==13&&!e.shiftKey&&t.lastElm!='P'){bl=ed.dom.getParent(n,'P');if(bl){ren(bl,s.element);ed.nodeChanged();}}});}},find:function(n,t,s){var ed=this.editor,w=ed.getDoc().createTreeWalker(n,4,null,false),c=-1;while(n=w.nextNode()){c++;if(t==0&&n==s)return c;if(t==1&&c==s)return n;}return-1;},forceRoots:function(ed,e){var t=this,ed=t.editor,b=ed.getBody(),d=ed.getDoc(),se=ed.selection,s=se.getSel(),r=se.getRng(),si=-2,ei,so,eo,tr,c=-0xFFFFFF;var nx,bl,bp,sp,le,nl=b.childNodes,i,n,eid;for(i=nl.length-1;i>=0;i--){nx=nl[i];if(nx.nodeType==3||(!t.dom.isBlock(nx)&&nx.nodeType!=8)){if(!bl){if(nx.nodeType!=3||/[^\s]/g.test(nx.nodeValue)){if(si==-2&&r){if(!isIE){if(r.startContainer.nodeType==1&&(n=r.startContainer.childNodes[r.startOffset])&&n.nodeType==1){eid=n.getAttribute("id");n.setAttribute("id","__mce");}else{if(ed.dom.getParent(r.startContainer,function(e){return e===b;})){so=r.startOffset;eo=r.endOffset;si=t.find(b,0,r.startContainer);ei=t.find(b,0,r.endContainer);}}}else{tr=d.body.createTextRange();tr.moveToElementText(b);tr.collapse(1);bp=tr.move('character',c)*-1;tr=r.duplicate();tr.collapse(1);sp=tr.move('character',c)*-1;tr=r.duplicate();tr.collapse(0);le=(tr.move('character',c)*-1)-sp;si=sp-bp;ei=le;}}bl=ed.dom.create(ed.settings.forced_root_block);bl.appendChild(nx.cloneNode(1));nx.parentNode.replaceChild(bl,nx);}}else{if(bl.hasChildNodes())bl.insertBefore(nx,bl.firstChild);else bl.appendChild(nx);}}else bl=null;}if(si!=-2){if(!isIE){bl=b.getElementsByTagName(ed.settings.element)[0];r=d.createRange();if(si!=-1)r.setStart(t.find(b,1,si),so);else r.setStart(bl,0);if(ei!=-1)r.setEnd(t.find(b,1,ei),eo);else r.setEnd(bl,0);if(s){s.removeAllRanges();s.addRange(r);}}else{try{r=s.createRange();r.moveToElementText(b);r.collapse(1);r.moveStart('character',si);r.moveEnd('character',ei);r.select();}catch(ex){}}}else if(!isIE&&(n=ed.dom.get('__mce'))){if(eid)n.setAttribute('id',eid);else n.removeAttribute('id');r=d.createRange();r.setStartBefore(n);r.setEndBefore(n);se.setRng(r);}},getParentBlock:function(n){var d=this.dom;return d.getParent(n,d.isBlock);},insertPara:function(e){var t=this,ed=t.editor,dom=ed.dom,d=ed.getDoc(),se=ed.settings,s=ed.selection.getSel(),r=s.getRangeAt(0),b=d.body;var rb,ra,dir,sn,so,en,eo,sb,eb,bn,bef,aft,sc,ec,n,vp=dom.getViewPort(ed.getWin()),y,ch,car;function isEmpty(n){n=n.innerHTML;n=n.replace(/<(img|hr|table)/gi,'-');n=n.replace(/<[^>]+>/g,'');return n.replace(/[ \t\r\n]+/g,'')=='';};rb=d.createRange();rb.setStart(s.anchorNode,s.anchorOffset);rb.collapse(true);ra=d.createRange();ra.setStart(s.focusNode,s.focusOffset);ra.collapse(true);dir=rb.compareBoundaryPoints(rb.START_TO_END,ra)<0;sn=dir?s.anchorNode:s.focusNode;so=dir?s.anchorOffset:s.focusOffset;en=dir?s.focusNode:s.anchorNode;eo=dir?s.focusOffset:s.anchorOffset;if(sn===en&&/^(TD|TH)$/.test(sn.nodeName)){dom.remove(sn.firstChild);ed.dom.add(sn,se.element,null,'
');aft=ed.dom.add(sn,se.element,null,'
');r=d.createRange();r.selectNodeContents(aft);r.collapse(1);ed.selection.setRng(r);return false;}if(sn==b&&en==b&&b.firstChild&&ed.dom.isBlock(b.firstChild)){sn=en=sn.firstChild;so=eo=0;rb=d.createRange();rb.setStart(sn,0);ra=d.createRange();ra.setStart(en,0);}sn=sn.nodeName=="HTML"?d.body:sn;sn=sn.nodeName=="BODY"?sn.firstChild:sn;en=en.nodeName=="HTML"?d.body:en;en=en.nodeName=="BODY"?en.firstChild:en;sb=t.getParentBlock(sn);eb=t.getParentBlock(en);bn=sb?sb.nodeName:se.element;if(t.dom.getParent(sb,function(n){return/OL|UL|PRE/.test(n.nodeName);}))return true;if(sb&&(sb.nodeName=='CAPTION'||/absolute|relative|static/gi.test(sb.style.position))){bn=se.element;sb=null;}if(eb&&(eb.nodeName=='CAPTION'||/absolute|relative|static/gi.test(eb.style.position))){bn=se.element;eb=null;}if(/(TD|TABLE|TH|CAPTION)/.test(bn)||(sb&&bn=="DIV"&&/left|right/gi.test(sb.style.cssFloat))){bn=se.element;sb=eb=null;}bef=(sb&&sb.nodeName==bn)?sb.cloneNode(0):ed.dom.create(bn);aft=(eb&&eb.nodeName==bn)?eb.cloneNode(0):ed.dom.create(bn);aft.removeAttribute('id');if(/^(H[1-6])$/.test(bn)&&sn.nodeValue&&so==sn.nodeValue.length)aft=ed.dom.create(se.element);n=sc=sn;do{if(n==b||n.nodeType==9||t.dom.isBlock(n)||/(TD|TABLE|TH|CAPTION)/.test(n.nodeName))break;sc=n;}while((n=n.previousSibling?n.previousSibling:n.parentNode));n=ec=en;do{if(n==b||n.nodeType==9||t.dom.isBlock(n)||/(TD|TABLE|TH|CAPTION)/.test(n.nodeName))break;ec=n;}while((n=n.nextSibling?n.nextSibling:n.parentNode));if(sc.nodeName==bn)rb.setStart(sc,0);else rb.setStartBefore(sc);rb.setEnd(sn,so);bef.appendChild(rb.cloneContents()||d.createTextNode(''));try{ra.setEndAfter(ec);}catch(ex){}ra.setStart(en,eo);aft.appendChild(ra.cloneContents()||d.createTextNode(''));r=d.createRange();if(!sc.previousSibling&&sc.parentNode.nodeName==bn){r.setStartBefore(sc.parentNode);}else{if(rb.startContainer.nodeName==bn&&rb.startOffset==0)r.setStartBefore(rb.startContainer);else r.setStart(rb.startContainer,rb.startOffset);}if(!ec.nextSibling&&ec.parentNode.nodeName==bn)r.setEndAfter(ec.parentNode);else r.setEnd(ra.endContainer,ra.endOffset);r.deleteContents();if(isOpera)ed.getWin().scrollTo(0,vp.y);if(bef.firstChild&&bef.firstChild.nodeName==bn)bef.innerHTML=bef.firstChild.innerHTML;if(aft.firstChild&&aft.firstChild.nodeName==bn)aft.innerHTML=aft.firstChild.innerHTML;if(isEmpty(bef))bef.innerHTML='
';function appendStyles(e,en){var nl=[],nn,n,i;e.innerHTML='';if(se.keep_styles){n=en;do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(n.nodeName)){nn=n.cloneNode(false);dom.setAttrib(nn,'id','');nl.push(nn);}}while(n=n.parentNode);}if(nl.length>0){for(i=nl.length-1,nn=e;i>=0;i--)nn=nn.appendChild(nl[i]);nl[0].innerHTML=isOpera?' ':'
';return nl[0];}else e.innerHTML=isOpera?' ':'
';};if(isEmpty(aft))car=appendStyles(aft,en);if(isOpera&&parseFloat(opera.version())<9.5){r.insertNode(bef);r.insertNode(aft);}else{r.insertNode(aft);r.insertNode(bef);}aft.normalize();bef.normalize();function first(n){return d.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,false).nextNode()||n;};r=d.createRange();r.selectNodeContents(isGecko?first(car||aft):car||aft);r.collapse(1);s.removeAllRanges();s.addRange(r);y=ed.dom.getPos(aft).y;ch=aft.clientHeight;if(yvp.y+vp.h){ed.getWin().scrollTo(0,y=c.length){for(e=0,b=g.length;e=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length=g.length||g[e]!=c[e]){f=e+1;break}}}if(f==1){return h}for(e=0,b=g.length-(f-1);e=0;c--){if(f[c].length==0||f[c]=="."){continue}if(f[c]==".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!=0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(e,b){var c=new Date();c.setTime(c.getTime()-1000);this.set(e,"",c,b,c)}})})();tinymce.create("static tinymce.util.JSON",{serialize:function(e){var c,a,d=tinymce.util.JSON.serialize,b;if(e==null){return"null"}b=typeof e;if(b=="string"){a="\bb\tt\nn\ff\rr\"\"''\\\\";return'"'+e.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(g,f){c=a.indexOf(f);if(c+1){return"\\"+a.charAt(c+1)}g=f.charCodeAt().toString(16);return"\\u"+"0000".substring(g.length)+g})+'"'}if(b=="object"){if(e.hasOwnProperty&&e instanceof Array){for(c=0,a="[";c0?",":"")+d(e[c])}return a+"]"}a="{";for(c in e){a+=typeof e[c]!="function"?(a.length>1?',"':'"')+c+'":'+d(e[c]):""}return a+"}"}return""+e},parse:function(s){try{return eval("("+s+")")}catch(ex){}}});tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){e.call(f.error_scope||f.scope,h,g)};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(m){var k=m.each,j=m.is,i=m.isWebKit,d=m.isIE,a=/^(H[1-6R]|P|DIV|ADDRESS|PRE|FORM|T(ABLE|BODY|HEAD|FOOT|H|R|D)|LI|OL|UL|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|MENU|ISINDEX|SAMP)$/,e=g("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),f=g("src,href,style,coords,shape"),c={"&":"&",'"':""","<":"<",">":">"},n=/[<>&\"]/g,b=/^([a-z0-9],?)+$/i,h=/<(\w+)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)(\s*\/?)>/g,l=/(\w+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;function g(q){var p={},o;q=q.split(",");for(o=q.length;o>=0;o--){p[q[o]]=1}return p}m.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(u,q){var p=this,o;p.doc=u;p.win=window;p.files={};p.cssFlicker=false;p.counter=0;p.stdMode=u.documentMode>=8;p.boxModel=!m.isIE||u.compatMode=="CSS1Compat"||p.stdMode;p.settings=q=m.extend({keep_values:false,hex_colors:1,process_html:1},q);if(m.isIE6){try{u.execCommand("BackgroundImageCache",false,true)}catch(r){p.cssFlicker=true}}if(q.valid_styles){p._styles={};k(q.valid_styles,function(t,s){p._styles[s]=m.explode(t)})}m.addUnload(p.destroy,p)},getRoot:function(){var o=this,p=o.settings;return(p&&o.get(p.root_element))||o.doc.body},getViewPort:function(p){var q,o;p=!p?this.win:p;q=p.document;o=this.boxModel?q.documentElement:q.body;return{x:p.pageXOffset||o.scrollLeft,y:p.pageYOffset||o.scrollTop,w:p.innerWidth||o.clientWidth,h:p.innerHeight||o.clientHeight}},getRect:function(s){var r,o=this,q;s=o.get(s);r=o.getPos(s);q=o.getSize(s);return{x:r.x,y:r.y,w:q.w,h:q.h}},getSize:function(r){var p=this,o,q;r=p.get(r);o=p.getStyle(r,"width");q=p.getStyle(r,"height");if(o.indexOf("px")===-1){o=0}if(q.indexOf("px")===-1){q=0}return{w:parseInt(o)||r.offsetWidth||r.clientWidth,h:parseInt(q)||r.offsetHeight||r.clientHeight}},getParent:function(q,p,o){return this.getParents(q,p,o,false)},getParents:function(z,v,s,y){var q=this,p,u=q.settings,x=[];z=q.get(z);y=y===undefined;if(u.strict_root){s=s||q.getRoot()}if(j(v,"string")){p=v;if(v==="*"){v=function(o){return o.nodeType==1}}else{v=function(o){return q.is(o,p)}}}while(z){if(z==s||!z.nodeType||z.nodeType===9){break}if(!v||v(z)){if(y){x.push(z)}else{return z}}z=z.parentNode}return y?x:null},get:function(o){var p;if(o&&this.doc&&typeof(o)=="string"){p=o;o=this.doc.getElementById(o);if(o&&o.id!==p){return this.doc.getElementsByName(p)[1]}}return o},getNext:function(p,o){return this._findSib(p,o,"nextSibling")},getPrev:function(p,o){return this._findSib(p,o,"previousSibling")},select:function(q,p){var o=this;return m.dom.Sizzle(q,o.get(p)||o.get(o.settings.root_element)||o.doc,[])},is:function(q,o){var p;if(q.length===undefined){if(o==="*"){return q.nodeType==1}if(b.test(o)){o=o.toLowerCase().split(/,/);q=q.nodeName.toLowerCase();for(p=o.length-1;p>=0;p--){if(o[p]==q){return true}}return false}}return m.dom.Sizzle.matches(o,q.nodeType?[q]:q).length>0},add:function(s,v,o,r,u){var q=this;return this.run(s,function(y){var x,t;x=j(v,"string")?q.doc.createElement(v):v;q.setAttribs(x,o);if(r){if(r.nodeType){x.appendChild(r)}else{q.setHTML(x,r)}}return !u?y.appendChild(x):x})},create:function(q,o,p){return this.add(this.doc.createElement(q),q,o,p,1)},createHTML:function(v,p,s){var u="",r=this,q;u+="<"+v;for(q in p){if(p.hasOwnProperty(q)){u+=" "+q+'="'+r.encode(p[q])+'"'}}if(typeof(s)!="undefined"){return u+">"+s+""}return u+" />"},remove:function(o,p){return this.run(o,function(r){var q,s;q=r.parentNode;if(!q){return null}if(p){while(s=r.firstChild){if(!m.isIE||s.nodeType!==3||s.nodeValue){q.insertBefore(s,r)}else{r.removeChild(s)}}}return q.removeChild(r)})},setStyle:function(r,o,p){var q=this;return q.run(r,function(v){var u,t;u=v.style;o=o.replace(/-(\D)/g,function(x,s){return s.toUpperCase()});if(q.pixelStyles.test(o)&&(m.is(p,"number")||/^[\-0-9\.]+$/.test(p))){p+="px"}switch(o){case"opacity":if(d){u.filter=p===""?"":"alpha(opacity="+(p*100)+")";if(!r.currentStyle||!r.currentStyle.hasLayout){u.display="inline-block"}}u[o]=u["-moz-opacity"]=u["-khtml-opacity"]=p||"";break;case"float":d?u.styleFloat=p:u.cssFloat=p;break;default:u[o]=p||""}if(q.settings.update_styles){q.setAttrib(v,"_mce_style")}})},getStyle:function(r,o,q){r=this.get(r);if(!r){return false}if(this.doc.defaultView&&q){o=o.replace(/[A-Z]/g,function(s){return"-"+s});try{return this.doc.defaultView.getComputedStyle(r,null).getPropertyValue(o)}catch(p){return null}}o=o.replace(/-(\D)/g,function(t,s){return s.toUpperCase()});if(o=="float"){o=d?"styleFloat":"cssFloat"}if(r.currentStyle&&q){return r.currentStyle[o]}return r.style[o]},setStyles:function(u,v){var q=this,r=q.settings,p;p=r.update_styles;r.update_styles=0;k(v,function(o,s){q.setStyle(u,s,o)});r.update_styles=p;if(r.update_styles){q.setAttrib(u,r.cssText)}},setAttrib:function(q,r,o){var p=this;if(!q||!r){return}if(p.settings.strict){r=r.toLowerCase()}return this.run(q,function(u){var t=p.settings;switch(r){case"style":if(!j(o,"string")){k(o,function(s,x){p.setStyle(u,x,s)});return}if(t.keep_values){if(o&&!p._isRes(o)){u.setAttribute("_mce_style",o,2)}else{u.removeAttribute("_mce_style",2)}}u.style.cssText=o;break;case"class":u.className=o||"";break;case"src":case"href":if(t.keep_values){if(t.url_converter){o=t.url_converter.call(t.url_converter_scope||p,o,r,u)}p.setAttrib(u,"_mce_"+r,o,2)}break;case"shape":u.setAttribute("_mce_style",o);break}if(j(o)&&o!==null&&o.length!==0){u.setAttribute(r,""+o,2)}else{u.removeAttribute(r,2)}})},setAttribs:function(q,r){var p=this;return this.run(q,function(o){k(r,function(s,t){p.setAttrib(o,t,s)})})},getAttrib:function(r,s,q){var o,p=this;r=p.get(r);if(!r||r.nodeType!==1){return false}if(!j(q)){q=""}if(/^(src|href|style|coords|shape)$/.test(s)){o=r.getAttribute("_mce_"+s);if(o){return o}}if(d&&p.props[s]){o=r[p.props[s]];o=o&&o.nodeValue?o.nodeValue:o}if(!o){o=r.getAttribute(s,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(s)){if(r[p.props[s]]===true&&o===""){return s}return o?s:""}if(r.nodeName==="FORM"&&r.getAttributeNode(s)){return r.getAttributeNode(s).nodeValue}if(s==="style"){o=o||r.style.cssText;if(o){o=p.serializeStyle(p.parseStyle(o),r.nodeName);if(p.settings.keep_values&&!p._isRes(o)){r.setAttribute("_mce_style",o)}}}if(i&&s==="class"&&o){o=o.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(d){switch(s){case"rowspan":case"colspan":if(o===1){o=""}break;case"size":if(o==="+0"||o===20||o===0){o=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(o===0){o=""}break;case"hspace":if(o===-1){o=""}break;case"maxlength":case"tabindex":if(o===32768||o===2147483647||o==="32768"){o=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(o===65535){return s}return q;case"shape":o=o.toLowerCase();break;default:if(s.indexOf("on")===0&&o){o=m._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+o)}}}return(o!==undefined&&o!==null&&o!=="")?""+o:q},getPos:function(A,s){var p=this,o=0,z=0,u,v=p.doc,q;A=p.get(A);s=s||v.body;if(A){if(d&&!p.stdMode){A=A.getBoundingClientRect();u=p.boxModel?v.documentElement:v.body;o=p.getStyle(p.select("html")[0],"borderWidth");o=(o=="medium"||p.boxModel&&!p.isIE6)&&2||o;return{x:A.left+u.scrollLeft-o,y:A.top+u.scrollTop-o}}q=A;while(q&&q!=s&&q.nodeType){o+=q.offsetLeft||0;z+=q.offsetTop||0;q=q.offsetParent}q=A.parentNode;while(q&&q!=s&&q.nodeType){o-=q.scrollLeft||0;z-=q.scrollTop||0;q=q.parentNode}}return{x:o,y:z}},parseStyle:function(r){var u=this,v=u.settings,x={};if(!r){return x}function p(D,A,C){var z,B,o,y;z=x[D+"-top"+A];if(!z){return}B=x[D+"-right"+A];if(z!=B){return}o=x[D+"-bottom"+A];if(B!=o){return}y=x[D+"-left"+A];if(o!=y){return}x[C]=y;delete x[D+"-top"+A];delete x[D+"-right"+A];delete x[D+"-bottom"+A];delete x[D+"-left"+A]}function q(y,s,o,A){var z;z=x[s];if(!z){return}z=x[o];if(!z){return}z=x[A];if(!z){return}x[y]=x[s]+" "+x[o]+" "+x[A];delete x[s];delete x[o];delete x[A]}r=r.replace(/&(#?[a-z0-9]+);/g,"&$1_MCE_SEMI_");k(r.split(";"),function(s){var o,t=[];if(s){s=s.replace(/_MCE_SEMI_/g,";");s=s.replace(/url\([^\)]+\)/g,function(y){t.push(y);return"url("+t.length+")"});s=s.split(":");o=m.trim(s[1]);o=o.replace(/url\(([^\)]+)\)/g,function(z,y){return t[parseInt(y)-1]});o=o.replace(/rgb\([^\)]+\)/g,function(y){return u.toHex(y)});if(v.url_converter){o=o.replace(/url\([\'\"]?([^\)\'\"]+)[\'\"]?\)/g,function(y,z){return"url("+v.url_converter.call(v.url_converter_scope||u,u.decode(z),"style",null)+")"})}x[m.trim(s[0]).toLowerCase()]=o}});p("border","","border");p("border","-width","border-width");p("border","-color","border-color");p("border","-style","border-style");p("padding","","padding");p("margin","","margin");q("border","border-width","border-style","border-color");if(d){if(x.border=="medium none"){x.border=""}}return x},serializeStyle:function(v,p){var q=this,r="";function u(s,o){if(o&&s){if(o.indexOf("-")===0){return}switch(o){case"font-weight":if(s==700){s="bold"}break;case"color":case"background-color":s=s.toLowerCase();break}r+=(r?" ":"")+o+": "+s+";"}}if(p&&q._styles){k(q._styles["*"],function(o){u(v[o],o)});k(q._styles[p.toLowerCase()],function(o){u(v[o],o)})}else{k(v,u)}return r},loadCSS:function(o){var q=this,r=q.doc,p;if(!o){o=""}p=q.select("head")[0];k(o.split(","),function(s){var t;if(q.files[s]){return}q.files[s]=true;t=q.create("link",{rel:"stylesheet",href:m._addVer(s)});if(d&&r.documentMode&&r.recalc){t.onload=function(){r.recalc();t.onload=null}}p.appendChild(t)})},addClass:function(o,p){return this.run(o,function(q){var r;if(!p){return 0}if(this.hasClass(q,p)){return q.className}r=this.removeClass(q,p);return q.className=(r!=""?(r+" "):"")+p})},removeClass:function(q,r){var o=this,p;return o.run(q,function(t){var s;if(o.hasClass(t,r)){if(!p){p=new RegExp("(^|\\s+)"+r+"(\\s+|$)","g")}s=t.className.replace(p," ");s=m.trim(s!=" "?s:"");t.className=s;if(!s){t.removeAttribute("class");t.removeAttribute("className")}return s}return t.className})},hasClass:function(p,o){p=this.get(p);if(!p||!o){return false}return(" "+p.className+" ").indexOf(" "+o+" ")!==-1},show:function(o){return this.setStyle(o,"display","block")},hide:function(o){return this.setStyle(o,"display","none")},isHidden:function(o){o=this.get(o);return !o||o.style.display=="none"||this.getStyle(o,"display")=="none"},uniqueId:function(o){return(!o?"mce_":o)+(this.counter++)},setHTML:function(q,p){var o=this;return this.run(q,function(v){var r,t,s,z,u,r;p=o.processHTML(p);if(d){function y(){while(v.firstChild){v.firstChild.removeNode()}try{v.innerHTML="
"+p;v.removeChild(v.firstChild)}catch(x){r=o.create("div");r.innerHTML="
"+p;k(r.childNodes,function(B,A){if(A){v.appendChild(B)}})}}if(o.settings.fix_ie_paragraphs){p=p.replace(/

<\/p>|]+)><\/p>|/gi,' 

')}y();if(o.settings.fix_ie_paragraphs){s=v.getElementsByTagName("p");for(t=s.length-1,r=0;t>=0;t--){z=s[t];if(!z.hasChildNodes()){if(!z._mce_keep){r=1;break}z.removeAttribute("_mce_keep")}}}if(r){p=p.replace(/

]+)>|

/ig,'

');p=p.replace(/<\/p>/gi,"
");y();if(o.settings.fix_ie_paragraphs){s=v.getElementsByTagName("DIV");for(t=s.length-1;t>=0;t--){z=s[t];if(z._mce_tmp){u=o.doc.createElement("p");z.cloneNode(false).outerHTML.replace(/([a-z0-9\-_]+)=/gi,function(A,x){var B;if(x!=="_mce_tmp"){B=z.getAttribute(x);if(!B&&x==="class"){B=z.className}u.setAttribute(x,B)}});for(r=0;r]+)\/>|/gi,"",r);if(q.keep_values){if(/)/g,"\n");t=t.replace(/^[\r\n]*|[\r\n]*$/g,"");t=t.replace(/^\s*(\/\/\s*|\]\]>|-->|\]\]-->)\s*$/g,"");return t}r=r.replace(/]+|)>([\s\S]*?)<\/script>/gi,function(s,x,t){if(!x){x=' type="text/javascript"'}x=x.replace(/src=\"([^\"]+)\"?/i,function(y,z){if(q.url_converter){z=p.encode(q.url_converter.call(q.url_converter_scope||p,p.decode(z),"src","script"))}return'_mce_src="'+z+'"'});if(m.trim(t)){v.push(o(t));t=""}return""+t+""});r=r.replace(/]+|)>([\s\S]*?)<\/style>/gi,function(s,x,t){if(t){v.push(o(t));t=""}return""+t+""});r=r.replace(/]+|)>([\s\S]*?)<\/noscript>/g,function(s,x,t){return""})}r=m._replace(//g,"",r);function u(s){return s.replace(h,function(y,z,x,t){return"<"+z+x.replace(l,function(B,A,E,D,C){var F;A=A.toLowerCase();E=E||D||C||"";if(e[A]){if(E==="false"||E==="0"){return}return A+'="'+A+'"'}if(f[A]&&x.indexOf("_mce_"+A)==-1){F=p.decode(E);if(q.url_converter&&(A=="src"||A=="href")){F=q.url_converter.call(q.url_converter_scope||p,F,A,z)}if(A=="style"){F=p.serializeStyle(p.parseStyle(F),A)}return A+'="'+E+'" _mce_'+A+'="'+p.encode(F)+'"'}return B})+t+">"})}r=u(r);r=r.replace(/MCE_SCRIPT:([0-9]+)/g,function(t,s){return v[s]})}return r},getOuterHTML:function(o){var p;o=this.get(o);if(!o){return null}if(o.outerHTML!==undefined){return o.outerHTML}p=(o.ownerDocument||this.doc).createElement("body");p.appendChild(o.cloneNode(true));return p.innerHTML},setOuterHTML:function(r,p,s){var o=this;function q(u,t,x){var y,v;v=x.createElement("body");v.innerHTML=t;y=v.lastChild;while(y){o.insertAfter(y.cloneNode(true),u);y=y.previousSibling}o.remove(u)}return this.run(r,function(u){u=o.get(u);if(u.nodeType==1){s=s||u.ownerDocument||o.doc;if(d){try{if(d&&u.nodeType==1){u.outerHTML=p}else{q(u,p,s)}}catch(t){q(u,p,s)}}else{q(u,p,s)}}})},decode:function(p){var q,r,o;if(/&[\w#]+;/.test(p)){q=this.doc.createElement("div");q.innerHTML=p;r=q.firstChild;o="";if(r){do{o+=r.nodeValue}while(r=r.nextSibling)}return o||p}return p},encode:function(o){return(""+o).replace(n,function(p){return c[p]})},insertAfter:function(o,p){p=this.get(p);return this.run(o,function(r){var q,s;q=p.parentNode;s=p.nextSibling;if(s){q.insertBefore(r,s)}else{q.appendChild(r)}return r})},isBlock:function(o){if(o.nodeType&&o.nodeType!==1){return false}o=o.nodeName||o;return a.test(o)},replace:function(s,r,p){var q=this;if(j(r,"array")){s=s.cloneNode(true)}return q.run(r,function(t){if(p){k(m.grep(t.childNodes),function(o){s.appendChild(o)})}return t.parentNode.replaceChild(s,t)})},rename:function(r,o){var q=this,p;if(r.nodeName!=o.toUpperCase()){p=q.create(o);k(q.getAttribs(r),function(s){q.setAttrib(p,s.nodeName,q.getAttrib(r,s.nodeName))});q.replace(p,r,1)}return p||r},findCommonAncestor:function(q,o){var r=q,p;while(r){p=o;while(p&&r!=p){p=p.parentNode}if(r==p){break}r=r.parentNode}if(!r&&q.ownerDocument){return q.ownerDocument.documentElement}return r},toHex:function(o){var q=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(o);function p(r){r=parseInt(r).toString(16);return r.length>1?r:"0"+r}if(q){o="#"+p(q[1])+p(q[2])+p(q[3]);return o}return o},getClasses:function(){var s=this,o=[],r,u={},v=s.settings.class_filter,q;if(s.classes){return s.classes}function x(t){k(t.imports,function(y){x(y)});k(t.cssRules||t.rules,function(y){switch(y.type||1){case 1:if(y.selectorText){k(y.selectorText.split(","),function(z){z=z.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(z)||!/\.[\w\-]+$/.test(z)){return}q=z;z=m._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",z);if(v&&!(z=v(z,q))){return}if(!u[z]){o.push({"class":z});u[z]=1}})}break;case 3:x(y.styleSheet);break}})}try{k(s.doc.styleSheets,x)}catch(p){}if(o.length>0){s.classes=o}return o},run:function(u,r,q){var p=this,v;if(p.doc&&typeof(u)==="string"){u=p.get(u)}if(!u){return false}q=q||this;if(!u.nodeType&&(u.length||u.length===0)){v=[];k(u,function(s,o){if(s){if(typeof(s)=="string"){s=p.doc.getElementById(s)}v.push(r.call(q,s,o))}});return v}return r.call(q,u)},getAttribs:function(q){var p;q=this.get(q);if(!q){return[]}if(d){p=[];if(q.nodeName=="OBJECT"){return q.attributes}if(q.nodeName==="OPTION"&&this.getAttrib(q,"selected")){p.push({specified:1,nodeName:"selected"})}q.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(o){p.push({specified:1,nodeName:o})});return p}return q.attributes},destroy:function(p){var o=this;if(o.events){o.events.destroy()}o.win=o.doc=o.root=o.events=null;if(!p){m.removeUnload(o.destroy)}},createRng:function(){var o=this.doc;return o.createRange?o.createRange():new m.dom.Range(this)},nodeIndex:function(s,t){var o=0,q,r,p;if(s){for(q=s.nodeType,s=s.previousSibling,r=s;s;s=s.previousSibling){p=s.nodeType;if(t&&p==3){if(p==q||!s.nodeValue.length){continue}}o++;q=p}}return o},split:function(u,s,y){var z=this,o=z.createRng(),v,q,x;function p(A){var t,r=A.childNodes;if(A.nodeType==1&&A.getAttribute("_mce_type")=="bookmark"){return}for(t=r.length-1;t>=0;t--){p(r[t])}if(A.nodeType!=9){if(A.nodeType==3&&A.nodeValue.length>0){if(!z.isBlock(A.parentNode)||m.trim(A.nodeValue).length>0){return}}if(A.nodeType==1){r=A.childNodes;if(r.length==1&&r[0]&&r[0].nodeType==1&&r[0].getAttribute("_mce_type")=="bookmark"){A.parentNode.insertBefore(r[0],A)}if(r.length||/^(br|hr|input|img)$/i.test(A.nodeName)){return}}z.remove(A)}return A}if(u&&s){o.setStart(u.parentNode,z.nodeIndex(u));o.setEnd(s.parentNode,z.nodeIndex(s));v=o.extractContents();o=z.createRng();o.setStart(s.parentNode,z.nodeIndex(s)+1);o.setEnd(u.parentNode,z.nodeIndex(u)+1);q=o.extractContents();x=u.parentNode;x.insertBefore(p(v),u);if(y){x.replaceChild(y,s)}else{x.insertBefore(s,u)}x.insertBefore(p(q),u);z.remove(u);return y||s}},bind:function(s,o,r,q){var p=this;if(!p.events){p.events=new m.dom.EventUtils()}return p.events.add(s,o,r,q||this)},unbind:function(r,o,q){var p=this;if(!p.events){p.events=new m.dom.EventUtils()}return p.events.remove(r,o,q)},_findSib:function(r,o,p){var q=this,s=o;if(r){if(j(s,"string")){s=function(t){return q.is(t,o)}}for(r=r[p];r;r=r[p]){if(s(r)){return r}}}return null},_isRes:function(o){return/^(top|left|bottom|right|width|height)/i.test(o)||/;\s*(top|left|bottom|right|width|height)/i.test(o)}});m.DOM=new m.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var N=this,e=c.doc,S=0,E=1,j=2,D=true,R=false,U="startOffset",h="startContainer",P="endContainer",z="endOffset",k=tinymce.extend,n=c.nodeIndex;k(N,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:D,commonAncestorContainer:e,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:q,setEnd:s,setStartBefore:g,setStartAfter:I,setEndBefore:J,setEndAfter:u,collapse:A,selectNode:x,selectNodeContents:F,compareBoundaryPoints:v,deleteContents:p,extractContents:H,cloneContents:d,insertNode:C,surroundContents:M,cloneRange:K});function q(V,t){B(D,V,t)}function s(V,t){B(R,V,t)}function g(t){q(t.parentNode,n(t))}function I(t){q(t.parentNode,n(t)+1)}function J(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function A(t){if(t){N[P]=N[h];N[z]=N[U]}else{N[h]=N[P];N[U]=N[z]}N.collapsed=D}function x(t){g(t);u(t)}function F(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(W,X){var Z=N[h],Y=N[U],V=N[P],t=N[z];if(W===0){return G(Z,Y,Z,Y)}if(W===1){return G(Z,Y,V,t)}if(W===2){return G(V,t,V,t)}if(W===3){return G(V,t,Z,Y)}}function p(){m(j)}function H(){return m(S)}function d(){return m(E)}function C(Y){var V=this[h],t=this[U],X,W;if((V.nodeType===3||V.nodeType===4)&&V.nodeValue){if(!t){V.parentNode.insertBefore(Y,V)}else{if(t>=V.nodeValue.length){c.insertAfter(Y,V)}else{X=V.splitText(t);V.parentNode.insertBefore(Y,X)}}}else{if(V.childNodes.length>0){W=V.childNodes[t]}if(W){V.insertBefore(Y,W)}else{V.appendChild(Y)}}}function M(V){var t=N.extractContents();N.insertNode(V);V.appendChild(t);N.selectNode(V)}function K(){return k(new b(c),{startContainer:N[h],startOffset:N[U],endContainer:N[P],endOffset:N[z],collapsed:N.collapsed,commonAncestorContainer:N.commonAncestorContainer})}function O(t,V){var W;if(t.nodeType==3){return t}if(V<0){return t}W=t.firstChild;while(W&&V>0){--V;W=W.nextSibling}if(W){return W}return t}function l(){return(N[h]==N[P]&&N[U]==N[z])}function G(X,Z,V,Y){var aa,W,t,ab,ad,ac;if(X==V){if(Z==Y){return 0}if(Z0){N.collapse(V)}}else{N.collapse(V)}N.collapsed=l();N.commonAncestorContainer=c.findCommonAncestor(N[h],N[P])}function m(ab){var aa,X=0,ad=0,V,Z,W,Y,t,ac;if(N[h]==N[P]){return f(ab)}for(aa=N[P],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[h]){return r(aa,ab)}++X}for(aa=N[h],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[P]){return T(aa,ab)}++ad}Z=ad-X;W=N[h];while(Z>0){W=W.parentNode;Z--}Y=N[P];while(Z<0){Y=Y.parentNode;Z++}for(t=W.parentNode,ac=Y.parentNode;t!=ac;t=t.parentNode,ac=ac.parentNode){W=t;Y=ac}return o(W,Y,ab)}function f(Z){var ab,Y,X,aa,t,W,V;if(Z!=j){ab=e.createDocumentFragment()}if(N[U]==N[z]){return ab}if(N[h].nodeType==3){Y=N[h].nodeValue;X=Y.substring(N[U],N[z]);if(Z!=E){N[h].deleteData(N[U],N[z]-N[U]);N.collapse(D)}if(Z==j){return}ab.appendChild(e.createTextNode(X));return ab}aa=O(N[h],N[U]);t=N[z]-N[U];while(t>0){W=aa.nextSibling;V=y(aa,Z);if(ab){ab.appendChild(V)}--t;aa=W}if(Z!=E){N.collapse(D)}return ab}function r(ab,Y){var aa,Z,V,t,X,W;if(Y!=j){aa=e.createDocumentFragment()}Z=i(ab,Y);if(aa){aa.appendChild(Z)}V=n(ab);t=V-N[U];if(t<=0){if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}Z=ab.previousSibling;while(t>0){X=Z.previousSibling;W=y(Z,Y);if(aa){aa.insertBefore(W,aa.firstChild)}--t;Z=X}if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}function T(Z,Y){var ab,V,aa,t,X,W;if(Y!=j){ab=e.createDocumentFragment()}aa=Q(Z,Y);if(ab){ab.appendChild(aa)}V=n(Z);++V;t=N[z]-V;aa=Z.nextSibling;while(t>0){X=aa.nextSibling;W=y(aa,Y);if(ab){ab.appendChild(W)}--t;aa=X}if(Y!=E){N.setStartAfter(Z);N.collapse(D)}return ab}function o(Z,t,ac){var W,ae,Y,aa,ab,V,ad,X;if(ac!=j){ae=e.createDocumentFragment()}W=Q(Z,ac);if(ae){ae.appendChild(W)}Y=Z.parentNode;aa=n(Z);ab=n(t);++aa;V=ab-aa;ad=Z.nextSibling;while(V>0){X=ad.nextSibling;W=y(ad,ac);if(ae){ae.appendChild(W)}ad=X;--V}W=i(t,ac);if(ae){ae.appendChild(W)}if(ac!=E){N.setStartAfter(Z);N.collapse(D)}return ae}function i(aa,ab){var W=O(N[P],N[z]-1),ac,Z,Y,t,V,X=W!=N[P];if(W==aa){return L(W,X,R,ab)}ac=W.parentNode;Z=L(ac,R,R,ab);while(ac){while(W){Y=W.previousSibling;t=L(W,X,R,ab);if(ab!=j){Z.insertBefore(t,Z.firstChild)}X=D;W=Y}if(ac==aa){return Z}W=ac.previousSibling;ac=ac.parentNode;V=L(ac,R,R,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function Q(aa,ab){var X=O(N[h],N[U]),Y=X!=N[h],ac,Z,W,t,V;if(X==aa){return L(X,Y,D,ab)}ac=X.parentNode;Z=L(ac,R,D,ab);while(ac){while(X){W=X.nextSibling;t=L(X,Y,D,ab);if(ab!=j){Z.appendChild(t)}Y=D;X=W}if(ac==aa){return Z}X=ac.nextSibling;ac=ac.parentNode;V=L(ac,R,D,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function L(t,Y,ab,ac){var X,W,Z,V,aa;if(Y){return y(t,ac)}if(t.nodeType==3){X=t.nodeValue;if(ab){V=N[U];W=X.substring(V);Z=X.substring(0,V)}else{V=N[z];W=X.substring(0,V);Z=X.substring(V)}if(ac!=E){t.nodeValue=Z}if(ac==j){return}aa=t.cloneNode(R);aa.nodeValue=W;return aa}if(ac==j){return}return t.cloneNode(R)}function y(V,t){if(t!=j){return t==E?V.cloneNode(D):V}V.parentNode.removeChild(V)}}a.Range=b})(tinymce.dom);(function(){function a(g){var i=this,j="\uFEFF",e,h,d=g.dom,c=true,f=false;function b(){var n=g.getRng(),k=d.createRng(),m,o;m=n.item?n.item(0):n.parentElement();if(m.ownerDocument!=d.doc){return k}if(n.item||!m.hasChildNodes()){k.setStart(m.parentNode,d.nodeIndex(m));k.setEnd(k.startContainer,k.startOffset+1);return k}o=g.isCollapsed();function l(s){var u,q,t,p,A=0,x,y,z,r,v;r=n.duplicate();r.collapse(s);u=d.create("a");z=r.parentElement();if(!z.hasChildNodes()){k[s?"setStart":"setEnd"](z,0);return}z.appendChild(u);r.moveToElementText(u);v=n.compareEndPoints(s?"StartToStart":"EndToEnd",r);if(v>0){k[s?"setStartAfter":"setEndAfter"](z);d.remove(u);return}p=tinymce.grep(z.childNodes);x=p.length-1;while(A<=x){y=Math.floor((A+x)/2);z.insertBefore(u,p[y]);r.moveToElementText(u);v=n.compareEndPoints(s?"StartToStart":"EndToEnd",r);if(v>0){A=y+1}else{if(v<0){x=y-1}else{found=true;break}}}q=v>0||y==0?u.nextSibling:u.previousSibling;if(q.nodeType==1){d.remove(u);t=d.nodeIndex(q);q=q.parentNode;if(!s||y>0){t++}}else{if(v>0||y==0){r.setEndPoint(s?"StartToStart":"EndToEnd",n);t=r.text.length}else{r.setEndPoint(s?"StartToStart":"EndToEnd",n);t=q.nodeValue.length-r.text.length}d.remove(u)}k[s?"setStart":"setEnd"](q,t)}l(true);if(!o){l()}return k}this.addRange=function(k){var p,n,m,r,u,s,t=g.dom.doc,o=t.body;function l(B){var x,A,v,z,y;v=d.create("a");x=B?m:u;A=B?r:s;z=p.duplicate();if(x==t){x=o;A=0}if(x.nodeType==3){x.parentNode.insertBefore(v,x);z.moveToElementText(v);z.moveStart("character",A);d.remove(v);p.setEndPoint(B?"StartToStart":"EndToEnd",z)}else{y=x.childNodes;if(y.length){if(A>=y.length){d.insertAfter(v,y[y.length-1])}else{x.insertBefore(v,y[A])}z.moveToElementText(v)}else{v=t.createTextNode(j);x.appendChild(v);z.moveToElementText(v.parentNode);z.collapse(c)}p.setEndPoint(B?"StartToStart":"EndToEnd",z);d.remove(v)}}this.destroy();m=k.startContainer;r=k.startOffset;u=k.endContainer;s=k.endOffset;p=o.createTextRange();if(m==u&&m.nodeType==1&&r==s-1){if(r==s-1){try{n=o.createControlRange();n.addElement(m.childNodes[r]);n.select();n.scrollIntoView();return}catch(q){}}}l(true);l();p.select();p.scrollIntoView()};this.getRangeAt=function(){if(!e||!tinymce.dom.RangeUtils.compareRanges(h,g.getRng())){e=b();h=g.getRng()}try{e.startContainer.nextSibling}catch(k){e=b();h=null}return e};this.destroy=function(){h=e=null}}tinymce.dom.TridentSelection=a})();(function(){var p=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,j=0,d=Object.prototype.toString,o=false,i=true;[0,0].sort(function(){i=false;return 0});var b=function(v,e,z,A){z=z||[];e=e||document;var C=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!v||typeof v!=="string"){return z}var x=[],s,E,H,r,u=true,t=b.isXML(e),B=v,D,G,F,y;do{p.exec("");s=p.exec(B);if(s){B=s[3];x.push(s[1]);if(s[2]){r=s[3];break}}}while(s);if(x.length>1&&k.exec(v)){if(x.length===2&&f.relative[x[0]]){E=h(x[0]+x[1],e)}else{E=f.relative[x[0]]?[e]:b(x.shift(),e);while(x.length){v=x.shift();if(f.relative[v]){v+=x.shift()}E=h(v,E)}}}else{if(!A&&x.length>1&&e.nodeType===9&&!t&&f.match.ID.test(x[0])&&!f.match.ID.test(x[x.length-1])){D=b.find(x.shift(),e,t);e=D.expr?b.filter(D.expr,D.set)[0]:D.set[0]}if(e){D=A?{expr:x.pop(),set:a(A)}:b.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&e.parentNode?e.parentNode:e,t);E=D.expr?b.filter(D.expr,D.set):D.set;if(x.length>0){H=a(E)}else{u=false}while(x.length){G=x.pop();F=G;if(!f.relative[G]){G=""}else{F=x.pop()}if(F==null){F=e}f.relative[G](H,F,t)}}else{H=x=[]}}if(!H){H=E}if(!H){b.error(G||v)}if(d.call(H)==="[object Array]"){if(!u){z.push.apply(z,H)}else{if(e&&e.nodeType===1){for(y=0;H[y]!=null;y++){if(H[y]&&(H[y]===true||H[y].nodeType===1&&b.contains(e,H[y]))){z.push(E[y])}}}else{for(y=0;H[y]!=null;y++){if(H[y]&&H[y].nodeType===1){z.push(E[y])}}}}}else{a(H,z)}if(r){b(r,C,z,A);b.uniqueSort(z)}return z};b.uniqueSort=function(r){if(c){o=i;r.sort(c);if(o){for(var e=1;e":function(x,r){var u=typeof r==="string",v,s=0,e=x.length;if(u&&!/\W/.test(r)){r=r.toLowerCase();for(;s=0)){if(!s){e.push(v)}}else{if(s){r[u]=false}}}}return false},ID:function(e){return e[1].replace(/\\/g,"")},TAG:function(r,e){return r[1].toLowerCase()},CHILD:function(e){if(e[1]==="nth"){var r=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(r[1]+(r[2]||1))-0;e[3]=r[3]-0}e[0]=j++;return e},ATTR:function(u,r,s,e,v,x){var t=u[1].replace(/\\/g,"");if(!x&&f.attrMap[t]){u[1]=f.attrMap[t]}if(u[2]==="~="){u[4]=" "+u[4]+" "}return u},PSEUDO:function(u,r,s,e,v){if(u[1]==="not"){if((p.exec(u[3])||"").length>1||/^\w/.test(u[3])){u[3]=b(u[3],null,null,r)}else{var t=b.filter(u[3],r,s,true^v);if(!s){e.push.apply(e,t)}return false}}else{if(f.match.POS.test(u[0])||f.match.CHILD.test(u[0])){return true}}return u},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){e.parentNode.selectedIndex;return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(s,r,e){return !!b(e[3],s).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(e){return"text"===e.type},radio:function(e){return"radio"===e.type},checkbox:function(e){return"checkbox"===e.type},file:function(e){return"file"===e.type},password:function(e){return"password"===e.type},submit:function(e){return"submit"===e.type},image:function(e){return"image"===e.type},reset:function(e){return"reset"===e.type},button:function(e){return"button"===e.type||e.nodeName.toLowerCase()==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)}},setFilters:{first:function(r,e){return e===0},last:function(s,r,e,t){return r===t.length-1},even:function(r,e){return e%2===0},odd:function(r,e){return e%2===1},lt:function(s,r,e){return re[3]-0},nth:function(s,r,e){return e[3]-0===r},eq:function(s,r,e){return e[3]-0===r}},filter:{PSEUDO:function(s,y,x,z){var e=y[1],r=f.filters[e];if(r){return r(s,x,y,z)}else{if(e==="contains"){return(s.textContent||s.innerText||b.getText([s])||"").indexOf(y[3])>=0}else{if(e==="not"){var t=y[3];for(var v=0,u=t.length;v=0)}}},ID:function(r,e){return r.nodeType===1&&r.getAttribute("id")===e},TAG:function(r,e){return(e==="*"&&r.nodeType===1)||r.nodeName.toLowerCase()===e},CLASS:function(r,e){return(" "+(r.className||r.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(v,t){var s=t[1],e=f.attrHandle[s]?f.attrHandle[s](v):v[s]!=null?v[s]:v.getAttribute(s),x=e+"",u=t[2],r=t[4];return e==null?u==="!=":u==="="?x===r:u==="*="?x.indexOf(r)>=0:u==="~="?(" "+x+" ").indexOf(r)>=0:!r?x&&e!==false:u==="!="?x!==r:u==="^="?x.indexOf(r)===0:u==="$="?x.substr(x.length-r.length)===r:u==="|="?x===r||x.substr(0,r.length+1)===r+"-":false},POS:function(u,r,s,v){var e=r[2],t=f.setFilters[e];if(t){return t(u,s,r,v)}}}};var k=f.match.POS,g=function(r,e){return"\\"+(e-0+1)};for(var m in f.match){f.match[m]=new RegExp(f.match[m].source+(/(?![^\[]*\])(?![^\(]*\))/.source));f.leftMatch[m]=new RegExp(/(^(?:.|\r|\n)*?)/.source+f.match[m].source.replace(/\\(\d+)/g,g))}var a=function(r,e){r=Array.prototype.slice.call(r,0);if(e){e.push.apply(e,r);return e}return r};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(l){a=function(u,t){var r=t||[],s=0;if(d.call(u)==="[object Array]"){Array.prototype.push.apply(r,u)}else{if(typeof u.length==="number"){for(var e=u.length;s";var e=document.documentElement;e.insertBefore(r,e.firstChild);if(document.getElementById(s)){f.find.ID=function(u,v,x){if(typeof v.getElementById!=="undefined"&&!x){var t=v.getElementById(u[1]);return t?t.id===u[1]||typeof t.getAttributeNode!=="undefined"&&t.getAttributeNode("id").nodeValue===u[1]?[t]:undefined:[]}};f.filter.ID=function(v,t){var u=typeof v.getAttributeNode!=="undefined"&&v.getAttributeNode("id");return v.nodeType===1&&u&&u.nodeValue===t}}e.removeChild(r);e=r=null})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){f.find.TAG=function(r,v){var u=v.getElementsByTagName(r[1]);if(r[1]==="*"){var t=[];for(var s=0;u[s];s++){if(u[s].nodeType===1){t.push(u[s])}}u=t}return u}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){f.attrHandle.href=function(r){return r.getAttribute("href",2)}}e=null})();if(document.querySelectorAll){(function(){var e=b,s=document.createElement("div");s.innerHTML="

";if(s.querySelectorAll&&s.querySelectorAll(".TEST").length===0){return}b=function(x,v,t,u){v=v||document;if(!u&&v.nodeType===9&&!b.isXML(v)){try{return a(v.querySelectorAll(x),t)}catch(y){}}return e(x,v,t,u)};for(var r in e){b[r]=e[r]}s=null})()}(function(){var e=document.createElement("div");e.innerHTML="
";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}f.order.splice(1,0,"CLASS");f.find.CLASS=function(r,s,t){if(typeof s.getElementsByClassName!=="undefined"&&!t){return s.getElementsByClassName(r[1])}};e=null})();function n(r,x,v,A,y,z){for(var t=0,s=A.length;t0){u=e;break}}}e=e[r]}A[t]=u}}}b.contains=document.compareDocumentPosition?function(r,e){return !!(r.compareDocumentPosition(e)&16)}:function(r,e){return r!==e&&(r.contains?r.contains(e):true)};b.isXML=function(e){var r=(e?e.ownerDocument||e:0).documentElement;return r?r.nodeName!=="HTML":false};var h=function(e,y){var t=[],u="",v,s=y.nodeType?[y]:y;while((v=f.match.PSEUDO.exec(e))){u+=v[0];e=e.replace(f.match.PSEUDO,"")}e=f.relative[e]?e+"*":e;for(var x=0,r=s.length;x=0;h--){k=g[h];if(k.obj===l){j._remove(k.obj,k.name,k.cfunc);k.obj=k.cfunc=null;g.splice(h,1)}}}},cancel:function(g){if(!g){return false}this.stop(g);return this.prevent(g)},stop:function(g){if(g.stopPropagation){g.stopPropagation()}else{g.cancelBubble=true}return false},prevent:function(g){if(g.preventDefault){g.preventDefault()}else{g.returnValue=false}return false},destroy:function(){var g=this;f(g.events,function(j,h){g._remove(j.obj,j.name,j.cfunc);j.obj=j.cfunc=null});g.events=[];g=null},_add:function(h,i,g){if(h.attachEvent){h.attachEvent("on"+i,g)}else{if(h.addEventListener){h.addEventListener(i,g,false)}else{h["on"+i]=g}}},_remove:function(i,j,h){if(i){try{if(i.detachEvent){i.detachEvent("on"+j,h)}else{if(i.removeEventListener){i.removeEventListener(j,h,false)}else{i["on"+j]=null}}}catch(g){}}},_pageInit:function(h){var g=this;if(g.domLoaded){return}g.domLoaded=true;f(g.inits,function(i){i()});g.inits=[]},_wait:function(i){var g=this,h=i.document;if(i.tinyMCE_GZ&&tinyMCE_GZ.loaded){g.domLoaded=1;return}if(h.attachEvent){h.attachEvent("onreadystatechange",function(){if(h.readyState==="complete"){h.detachEvent("onreadystatechange",arguments.callee);g._pageInit(i)}});if(h.documentElement.doScroll&&i==i.top){(function(){if(g.domLoaded){return}try{h.documentElement.doScroll("left")}catch(j){setTimeout(arguments.callee,0);return}g._pageInit(i)})()}}else{if(h.addEventListener){g._add(i,"DOMContentLoaded",function(){g._pageInit(i)})}}g._add(i,"load",function(){g._pageInit(i)})},_stoppers:{preventDefault:function(){this.returnValue=false},stopPropagation:function(){this.cancelBubble=true}}});a=d.dom.Event=new d.dom.EventUtils();a._wait(window);d.addUnload(function(){a.destroy()})})(tinymce);(function(a){a.dom.Element=function(f,d){var b=this,e,c;b.settings=d=d||{};b.id=f;b.dom=e=d.dom||a.DOM;if(!a.isIE){c=e.get(b.id)}a.each(("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get").split(/,/),function(g){b[g]=function(){var h=[f],j;for(j=0;j_';if(k.startContainer==l&&k.endContainer==l){l.body.innerHTML=j}else{k.deleteContents();if(l.body.childNodes.length==0){l.body.innerHTML=j}else{if(k.createContextualFragment){k.insertNode(k.createContextualFragment(j))}else{var m=l.createDocumentFragment(),f=l.createElement("div");m.appendChild(f);f.outerHTML=j;k.insertNode(m)}}}n=g.dom.get("__caret");k=l.createRange();k.setStartBefore(n);k.setEndBefore(n);g.setRng(k);g.dom.remove("__caret")}else{if(k.item){l.execCommand("Delete",false,null);k=g.getRng()}k.pasteHTML(j)}g.onSetContent.dispatch(g,i)},getStart:function(){var g=this.getRng(),h,f,j,i;if(g.duplicate||g.item){if(g.item){return g.item(0)}j=g.duplicate();j.collapse(1);h=j.parentElement();f=i=g.parentElement();while(i=i.parentNode){if(i==h){h=f;break}}if(h&&h.nodeName=="BODY"){return h.firstChild||h}return h}else{h=g.startContainer;if(h.nodeType==1&&h.hasChildNodes()){h=h.childNodes[Math.min(h.childNodes.length-1,g.startOffset)]}if(h&&h.nodeType==3){return h.parentNode}return h}},getEnd:function(){var g=this,h=g.getRng(),i,f;if(h.duplicate||h.item){if(h.item){return h.item(0)}h=h.duplicate();h.collapse(0);i=h.parentElement();if(i&&i.nodeName=="BODY"){return i.lastChild||i}return i}else{i=h.endContainer;f=h.endOffset;if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[f>0?f-1:f]}if(i&&i.nodeType==3){return i.parentNode}return i}},getBookmark:function(q,r){var u=this,m=u.dom,g,j,i,n,h,o,p,l="\uFEFF",s;function f(v,x){var t=0;d(m.select(v),function(z,y){if(z==x){t=y}});return t}if(q==2){function k(){var v=u.getRng(true),t=m.getRoot(),x={};function y(B,G){var A=B[G?"startContainer":"endContainer"],F=B[G?"startOffset":"endOffset"],z=[],C,E,D=0;if(A.nodeType==3){if(r){for(C=A.previousSibling;C&&C.nodeType==3;C=C.previousSibling){F+=C.nodeValue.length}}z.push(F)}else{E=A.childNodes;if(F>=E.length&&E.length){D=1;F=Math.max(0,E.length-1)}z.push(u.dom.nodeIndex(E[F],r)+D)}for(;A&&A!=t;A=A.parentNode){z.push(u.dom.nodeIndex(A,r))}return z}x.start=y(v,true);if(!u.isCollapsed()){x.end=y(v)}return x}return k()}if(q){return{rng:u.getRng()}}g=u.getRng();i=m.uniqueId();n=tinyMCE.activeEditor.selection.isCollapsed();s="overflow:hidden;line-height:0px";if(g.duplicate||g.item){if(!g.item){j=g.duplicate();g.collapse();g.pasteHTML(''+l+"");if(!n){j.collapse(false);j.pasteHTML(''+l+"")}}else{o=g.item(0);h=o.nodeName;return{name:h,index:f(h,o)}}}else{o=u.getNode();h=o.nodeName;if(h=="IMG"){return{name:h,index:f(h,o)}}j=g.cloneRange();if(!n){j.collapse(false);j.insertNode(m.create("span",{_mce_type:"bookmark",id:i+"_end",style:s},l))}g.collapse(true);g.insertNode(m.create("span",{_mce_type:"bookmark",id:i+"_start",style:s},l))}u.moveToBookmark({id:i,keep:1});return{id:i}},moveToBookmark:function(n){var r=this,l=r.dom,i,h,f,q,j,s,o,p;if(r.tridentSel){r.tridentSel.destroy()}if(n){if(n.start){f=l.createRng();q=l.getRoot();function g(z){var t=n[z?"start":"end"],v,x,y,u;if(t){for(x=q,v=t.length-1;v>=1;v--){u=x.childNodes;if(u.length){x=u[t[v]]}}if(z){f.setStart(x,t[0])}else{f.setEnd(x,t[0])}}}g(true);g();r.setRng(f)}else{if(n.id){function k(A){var u=l.get(n.id+"_"+A),z,t,x,y,v=n.keep;if(u){z=u.parentNode;if(A=="start"){if(!v){t=l.nodeIndex(u)}else{z=u.firstChild;t=1}j=s=z;o=p=t}else{if(!v){t=l.nodeIndex(u)}else{z=u.firstChild;t=1}s=z;p=t}if(!v){y=u.previousSibling;x=u.nextSibling;d(c.grep(u.childNodes),function(B){if(B.nodeType==3){B.nodeValue=B.nodeValue.replace(/\uFEFF/g,"")}});while(u=l.get(n.id+"_"+A)){l.remove(u,1)}if(y&&x&&y.nodeType==x.nodeType&&y.nodeType==3&&!c.isOpera){t=y.nodeValue.length;y.appendData(x.nodeValue);l.remove(x);if(A=="start"){j=s=y;o=p=t}else{s=y;p=t}}}}}function m(t){if(!a&&l.isBlock(t)&&!t.innerHTML){t.innerHTML='
'}return t}k("start");k("end");if(j){f=l.createRng();f.setStart(m(j),o);f.setEnd(m(s),p);r.setRng(f)}}else{if(n.name){r.select(l.select(n.name)[n.index])}else{if(n.rng){r.setRng(n.rng)}}}}}},select:function(k,j){var i=this,l=i.dom,g=l.createRng(),f;f=l.nodeIndex(k);g.setStart(k.parentNode,f);g.setEnd(k.parentNode,f+1);if(j){function h(m,o){var n=new c.dom.TreeWalker(m,m);do{if(m.nodeType==3&&c.trim(m.nodeValue).length!=0){if(o){g.setStart(m,0)}else{g.setEnd(m,m.nodeValue.length)}return}if(m.nodeName=="BR"){if(o){g.setStartBefore(m)}else{g.setEndBefore(m)}return}}while(m=(o?n.next():n.prev()))}h(k,1);h(k)}i.setRng(g);return k},isCollapsed:function(){var f=this,h=f.getRng(),g=f.getSel();if(!h||h.item){return false}if(h.compareEndPoints){return h.compareEndPoints("StartToEnd",h)===0}return !g||h.collapsed},collapse:function(f){var g=this,h=g.getRng(),i;if(h.item){i=h.item(0);h=this.win.document.body.createTextRange();h.moveToElementText(i)}h.collapse(!!f);g.setRng(h)},getSel:function(){var g=this,f=this.win;return f.getSelection?f.getSelection():f.document.selection},getRng:function(l){var g=this,h,i,k,j=g.win.document;if(l&&g.tridentSel){return g.tridentSel.getRangeAt(0)}try{if(h=g.getSel()){i=h.rangeCount>0?h.getRangeAt(0):(h.createRange?h.createRange():j.createRange())}}catch(f){}if(c.isIE&&i.setStart&&j.selection.createRange().item){k=j.selection.createRange().item(0);i=j.createRange();i.setStartBefore(k);i.setEndAfter(k)}if(!i){i=j.createRange?j.createRange():j.body.createTextRange()}if(g.selectedRange&&g.explicitRange){if(i.compareBoundaryPoints(i.START_TO_START,g.selectedRange)===0&&i.compareBoundaryPoints(i.END_TO_END,g.selectedRange)===0){i=g.explicitRange}else{g.selectedRange=null;g.explicitRange=null}}return i},setRng:function(i){var h,g=this;if(!g.tridentSel){h=g.getSel();if(h){g.explicitRange=i;h.removeAllRanges();h.addRange(i);g.selectedRange=h.getRangeAt(0)}}else{if(i.cloneRange){g.tridentSel.addRange(i);return}try{i.select()}catch(f){}}},setNode:function(g){var f=this;f.setContent(f.dom.getOuterHTML(g));return g},getNode:function(){var g=this,f=g.getRng(),h=g.getSel(),i;if(f.setStart){if(!f){return g.dom.getRoot()}i=f.commonAncestorContainer;if(!f.collapsed){if(f.startContainer==f.endContainer){if(f.startOffset-f.endOffset<2){if(f.startContainer.hasChildNodes()){i=f.startContainer.childNodes[f.startOffset]}}}if(c.isWebKit&&h.anchorNode&&h.anchorNode.nodeType==1){return h.anchorNode.childNodes[h.anchorOffset]}}if(i&&i.nodeType==3){return i.parentNode}return i}return f.item?f.item(0):f.parentElement()},getSelectedBlocks:function(g,f){var i=this,j=i.dom,m,h,l,k=[];m=j.getParent(g||i.getStart(),j.isBlock);h=j.getParent(f||i.getEnd(),j.isBlock);if(m){k.push(m)}if(m&&h&&m!=h){l=m;while((l=l.nextSibling)&&l!=h){if(j.isBlock(l)){k.push(l)}}}if(h&&m!=h){k.push(h)}return k},destroy:function(g){var f=this;f.win=null;if(f.tridentSel){f.tridentSel.destroy()}if(!g){c.removeUnload(f.destroy)}},_fixIESelection:function(){var m=this.dom,l=m.doc,g=l.body,i,j;l.documentElement.unselectable=true;function k(n,q){var o=g.createTextRange();try{o.moveToPoint(n,q)}catch(p){o=null}return o}function h(o){var n;if(o.button){n=k(o.x,o.y);if(n){if(n.compareEndPoints("StartToStart",j)>0){n.setEndPoint("StartToStart",j)}else{n.setEndPoint("EndToEnd",j)}n.select()}}else{f()}}function f(){m.unbind(l,"mouseup",f);m.unbind(l,"mousemove",h);i=0}m.bind(l,"mousedown",function(n){if(n.target.nodeName==="HTML"){if(i){f()}i=1;j=k(n.x,n.y);if(j){m.bind(l,"mouseup",f);m.bind(l,"mousemove",h);m.win.focus();j.select()}}})}})})(tinymce);(function(a){a.create("tinymce.dom.XMLWriter",{node:null,XMLWriter:function(c){function b(){var e=document.implementation;if(!e||!e.createDocument){try{return new ActiveXObject("MSXML2.DOMDocument")}catch(d){}try{return new ActiveXObject("Microsoft.XmlDom")}catch(d){}}else{return e.createDocument("","",null)}}this.doc=b();this.valid=a.isOpera||a.isWebKit;this.reset()},reset:function(){var b=this,c=b.doc;if(c.firstChild){c.removeChild(c.firstChild)}b.node=c.appendChild(c.createElement("html"))},writeStartElement:function(c){var b=this;b.node=b.node.appendChild(b.doc.createElement(c))},writeAttribute:function(c,b){if(this.valid){b=b.replace(/>/g,"%MCGT%")}this.node.setAttribute(c,b)},writeEndElement:function(){this.node=this.node.parentNode},writeFullEndElement:function(){var b=this,c=b.node;c.appendChild(b.doc.createTextNode(""));b.node=c.parentNode},writeText:function(b){if(this.valid){b=b.replace(/>/g,"%MCGT%")}this.node.appendChild(this.doc.createTextNode(b))},writeCDATA:function(b){this.node.appendChild(this.doc.createCDATASection(b))},writeComment:function(b){if(a.isIE){b=b.replace(/^\-|\-$/g," ")}this.node.appendChild(this.doc.createComment(b.replace(/\-\-/g," ")))},getContent:function(){var b;b=this.doc.xml||new XMLSerializer().serializeToString(this.doc);b=b.replace(/<\?[^?]+\?>|]*>|<\/html>||]+>/g,"");b=b.replace(/ ?\/>/g," />");if(this.valid){b=b.replace(/\%MCGT%/g,">")}return b}})})(tinymce);(function(c){var d=/[&\"<>]/g,b=/[<>&]/g,a={"&":"&",'"':""","<":"<",">":">"};c.create("tinymce.dom.StringWriter",{str:null,tags:null,count:0,settings:null,indent:null,StringWriter:function(e){this.settings=c.extend({indent_char:" ",indentation:0},e);this.reset()},reset:function(){this.indent="";this.str="";this.tags=[];this.count=0},writeStartElement:function(e){this._writeAttributesEnd();this.writeRaw("<"+e);this.tags.push(e);this.inAttr=true;this.count++;this.elementCount=this.count;this.attrs={}},writeAttribute:function(g,e){var f=this;if(!f.attrs[g]){f.writeRaw(" "+f.encode(g,true)+'="'+f.encode(e,true)+'"');f.attrs[g]=e}},writeEndElement:function(){var e;if(this.tags.length>0){e=this.tags.pop();if(this._writeAttributesEnd(1)){this.writeRaw("")}if(this.settings.indentation>0){this.writeRaw("\n")}}},writeFullEndElement:function(){if(this.tags.length>0){this._writeAttributesEnd();this.writeRaw("");if(this.settings.indentation>0){this.writeRaw("\n")}}},writeText:function(e){this._writeAttributesEnd();this.writeRaw(this.encode(e));this.count++},writeCDATA:function(e){this._writeAttributesEnd();this.writeRaw("");this.count++},writeComment:function(e){this._writeAttributesEnd();this.writeRaw("");this.count++},writeRaw:function(e){this.str+=e},encode:function(f,e){return f.replace(e?d:b,function(g){return a[g]})},getContent:function(){return this.str},_writeAttributesEnd:function(e){if(!this.inAttr){return}this.inAttr=false;if(e&&this.elementCount==this.count){this.writeRaw(" />");return false}this.writeRaw(">");return true}})})(tinymce);(function(e){var g=e.extend,f=e.each,b=e.util.Dispatcher,d=e.isIE,a=e.isGecko;function c(h){return h.replace(/([?+*])/g,".$1")}e.create("tinymce.dom.Serializer",{Serializer:function(j){var i=this;i.key=0;i.onPreProcess=new b(i);i.onPostProcess=new b(i);try{i.writer=new e.dom.XMLWriter()}catch(h){i.writer=new e.dom.StringWriter()}if(e.isIE&&document.documentMode>8){i.writer=new e.dom.StringWriter()}i.settings=j=g({dom:e.DOM,valid_nodes:0,node_filter:0,attr_filter:0,invalid_attrs:/^(_mce_|_moz_|sizset|sizcache)/,closed:/^(br|hr|input|meta|img|link|param|area)$/,entity_encoding:"named",entities:"160,nbsp,161,iexcl,162,cent,163,pound,164,curren,165,yen,166,brvbar,167,sect,168,uml,169,copy,170,ordf,171,laquo,172,not,173,shy,174,reg,175,macr,176,deg,177,plusmn,178,sup2,179,sup3,180,acute,181,micro,182,para,183,middot,184,cedil,185,sup1,186,ordm,187,raquo,188,frac14,189,frac12,190,frac34,191,iquest,192,Agrave,193,Aacute,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,201,Eacute,202,Ecirc,203,Euml,204,Igrave,205,Iacute,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,211,Oacute,212,Ocirc,213,Otilde,214,Ouml,215,times,216,Oslash,217,Ugrave,218,Uacute,219,Ucirc,220,Uuml,221,Yacute,222,THORN,223,szlig,224,agrave,225,aacute,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,233,eacute,234,ecirc,235,euml,236,igrave,237,iacute,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,243,oacute,244,ocirc,245,otilde,246,ouml,247,divide,248,oslash,249,ugrave,250,uacute,251,ucirc,252,uuml,253,yacute,254,thorn,255,yuml,402,fnof,913,Alpha,914,Beta,915,Gamma,916,Delta,917,Epsilon,918,Zeta,919,Eta,920,Theta,921,Iota,922,Kappa,923,Lambda,924,Mu,925,Nu,926,Xi,927,Omicron,928,Pi,929,Rho,931,Sigma,932,Tau,933,Upsilon,934,Phi,935,Chi,936,Psi,937,Omega,945,alpha,946,beta,947,gamma,948,delta,949,epsilon,950,zeta,951,eta,952,theta,953,iota,954,kappa,955,lambda,956,mu,957,nu,958,xi,959,omicron,960,pi,961,rho,962,sigmaf,963,sigma,964,tau,965,upsilon,966,phi,967,chi,968,psi,969,omega,977,thetasym,978,upsih,982,piv,8226,bull,8230,hellip,8242,prime,8243,Prime,8254,oline,8260,frasl,8472,weierp,8465,image,8476,real,8482,trade,8501,alefsym,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8704,forall,8706,part,8707,exist,8709,empty,8711,nabla,8712,isin,8713,notin,8715,ni,8719,prod,8721,sum,8722,minus,8727,lowast,8730,radic,8733,prop,8734,infin,8736,ang,8743,and,8744,or,8745,cap,8746,cup,8747,int,8756,there4,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8804,le,8805,ge,8834,sub,8835,sup,8836,nsub,8838,sube,8839,supe,8853,oplus,8855,otimes,8869,perp,8901,sdot,8968,lceil,8969,rceil,8970,lfloor,8971,rfloor,9001,lang,9002,rang,9674,loz,9824,spades,9827,clubs,9829,hearts,9830,diams,338,OElig,339,oelig,352,Scaron,353,scaron,376,Yuml,710,circ,732,tilde,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,8211,ndash,8212,mdash,8216,lsquo,8217,rsquo,8218,sbquo,8220,ldquo,8221,rdquo,8222,bdquo,8224,dagger,8225,Dagger,8240,permil,8249,lsaquo,8250,rsaquo,8364,euro",valid_elements:"*[*]",extended_valid_elements:0,invalid_elements:0,fix_table_elements:1,fix_list_elements:true,fix_content_duplication:true,convert_fonts_to_spans:false,font_size_classes:0,apply_source_formatting:0,indent_mode:"simple",indent_char:"\t",indent_levels:1,remove_linebreaks:1,remove_redundant_brs:1,element_format:"xhtml"},j);i.dom=j.dom;i.schema=j.schema;if(j.entity_encoding=="named"&&!j.entities){j.entity_encoding="raw"}if(j.remove_redundant_brs){i.onPostProcess.add(function(k,l){l.content=l.content.replace(/(
\s*)+<\/(p|h[1-6]|div|li)>/gi,function(n,m,o){if(/^
\s*<\//.test(n)){return""}return n})})}if(j.element_format=="html"){i.onPostProcess.add(function(k,l){l.content=l.content.replace(/<([^>]+) \/>/g,"<$1>")})}if(j.fix_list_elements){i.onPreProcess.add(function(v,s){var l,z,y=["ol","ul"],u,t,q,k=/^(OL|UL)$/,A;function m(r,x){var o=x.split(","),p;while((r=r.previousSibling)!=null){for(p=0;p=1767){f(i.dom.select("p table",l.node).reverse(),function(p){var o=i.dom.getParent(p.parentNode,"table,p");if(o.nodeName!="TABLE"){try{i.dom.split(o,p)}catch(m){}}})}})}},setEntities:function(o){var n=this,j,m,h={},k;if(n.entityLookup){return}j=o.split(",");for(m=0;m1){f(q[1].split("|"),function(u){var p={},t;k=k||[];u=u.replace(/::/g,"~");u=/^([!\-])?([\w*.?~_\-]+|)([=:<])?(.+)?$/.exec(u);u[2]=u[2].replace(/~/g,":");if(u[1]=="!"){r=r||[];r.push(u[2])}if(u[1]=="-"){for(t=0;t=1767)){p=j.createHTMLDocument("");f(r.nodeName=="BODY"?r.childNodes:[r],function(h){p.body.appendChild(p.importNode(h,true))});if(r.nodeName!="BODY"){r=p.body.firstChild}else{r=p.body}i=k.dom.doc;k.dom.doc=p}k.key=""+(parseInt(k.key)+1);if(!q.no_events){q.node=r;k.onPreProcess.dispatch(k,q)}k.writer.reset();k._info=q;k._serializeNode(r,q.getInner);q.content=k.writer.getContent();if(i){k.dom.doc=i}if(!q.no_events){k.onPostProcess.dispatch(k,q)}k._postProcess(q);q.node=null;return e.trim(q.content)},_postProcess:function(n){var i=this,k=i.settings,j=n.content,m=[],l;if(n.format=="html"){l=i._protect({content:j,patterns:[{pattern:/(]*>)(.*?)(<\/script>)/g},{pattern:/(]*>)(.*?)(<\/noscript>)/g},{pattern:/(]*>)(.*?)(<\/style>)/g},{pattern:/(]*>)(.*?)(<\/pre>)/g,encode:1},{pattern:/()/g}]});j=l.content;if(k.entity_encoding!=="raw"){j=i._encode(j)}if(!n.set){j=e._replace(/

\s+<\/p>|]+)>\s+<\/p>/g,k.entity_encoding=="numeric"?" 

":" 

",j);if(k.remove_linebreaks){j=j.replace(/\r?\n|\r/g," ");j=e._replace(/(<[^>]+>)\s+/g,"$1 ",j);j=e._replace(/\s+(<\/[^>]+>)/g," $1",j);j=e._replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object) ([^>]+)>\s+/g,"<$1 $2>",j);j=e._replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>\s+/g,"<$1>",j);j=e._replace(/\s+<\/(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>/g,"",j)}if(k.apply_source_formatting&&k.indent_mode=="simple"){j=e._replace(/<(\/?)(ul|hr|table|meta|link|tbody|tr|object|body|head|html|map)(|[^>]+)>\s*/g,"\n<$1$2$3>\n",j);j=e._replace(/\s*<(p|h[1-6]|blockquote|div|title|style|pre|script|td|li|area)(|[^>]+)>/g,"\n<$1$2>",j);j=e._replace(/<\/(p|h[1-6]|blockquote|div|title|style|pre|script|td|li)>\s*/g,"\n",j);j=j.replace(/\n\n/g,"\n")}}j=i._unprotect(j,l);j=e._replace(//g,"",j);if(k.entity_encoding=="raw"){j=e._replace(/

 <\/p>|]+)> <\/p>/g,"\u00a0

",j)}j=j.replace(/]+|)>([\s\S]*?)<\/noscript>/g,function(h,p,o){return""+i.dom.decode(o.replace(//g,""))+""})}n.content=j},_serializeNode:function(E,J){var A=this,B=A.settings,y=A.writer,q,j,u,G,F,I,C,h,z,k,r,D,p,m,H,o,x;if(!B.node_filter||B.node_filter(E)){switch(E.nodeType){case 1:if(E.hasAttribute?E.hasAttribute("_mce_bogus"):E.getAttribute("_mce_bogus")){return}p=H=false;q=E.hasChildNodes();k=E.getAttribute("_mce_name")||E.nodeName.toLowerCase();o=E.getAttribute("_mce_type");if(o){if(!A._info.cleanup){p=true;return}else{H=1}}if(d){x=E.scopeName;if(x&&x!=="HTML"&&x!=="html"){k=x+":"+k}}if(k.indexOf("mce:")===0){k=k.substring(4)}if(!H){if(!A.validElementsRE||!A.validElementsRE.test(k)||(A.invalidElementsRE&&A.invalidElementsRE.test(k))||J){p=true;break}}if(d){if(B.fix_content_duplication){if(E._mce_serialized==A.key){return}E._mce_serialized=A.key}if(k.charAt(0)=="/"){k=k.substring(1)}}else{if(a){if(E.nodeName==="BR"&&E.getAttribute("type")=="_moz"){return}}}if(B.validate_children){if(A.elementName&&!A.schema.isValid(A.elementName,k)){p=true;break}A.elementName=k}r=A.findRule(k);if(!r){p=true;break}k=r.name||k;m=B.closed.test(k);if((!q&&r.noEmpty)||(d&&!k)){p=true;break}if(r.requiredAttribs){I=r.requiredAttribs;for(G=I.length-1;G>=0;G--){if(this.dom.getAttrib(E,I[G])!==""){break}}if(G==-1){p=true;break}}y.writeStartElement(k);if(r.attribs){for(G=0,C=r.attribs,F=C.length;G-1;G--){h=C[G];if(h.specified){I=h.nodeName.toLowerCase();if(B.invalid_attrs.test(I)||!r.validAttribsRE.test(I)){continue}D=A.findAttribRule(r,I);z=A._getAttrib(E,D,I);if(z!==null){y.writeAttribute(I,z)}}}}if(o&&H){y.writeAttribute("_mce_type",o)}if(k==="script"&&e.trim(E.innerHTML)){y.writeText("// ");y.writeCDATA(E.innerHTML.replace(/|<\[CDATA\[|\]\]>/g,""));q=false;break}if(r.padd){if(q&&(u=E.firstChild)&&u.nodeType===1&&E.childNodes.length===1){if(u.hasAttribute?u.hasAttribute("_mce_bogus"):u.getAttribute("_mce_bogus")){y.writeText("\u00a0")}}else{if(!q){y.writeText("\u00a0")}}}break;case 3:if(B.validate_children&&A.elementName&&!A.schema.isValid(A.elementName,"#text")){return}return y.writeText(E.nodeValue);case 4:return y.writeCDATA(E.nodeValue);case 8:return y.writeComment(E.nodeValue)}}else{if(E.nodeType==1){q=E.hasChildNodes()}}if(q&&!m){u=E.firstChild;while(u){A._serializeNode(u);A.elementName=k;u=u.nextSibling}}if(!p){if(!m){y.writeFullEndElement()}else{y.writeEndElement()}}},_protect:function(j){var i=this;j.items=j.items||[];function h(l){return l.replace(/[\r\n\\]/g,function(m){if(m==="\n"){return"\\n"}else{if(m==="\\"){return"\\\\"}}return"\\r"})}function k(l){return l.replace(/\\[\\rn]/g,function(m){if(m==="\\n"){return"\n"}else{if(m==="\\\\"){return"\\"}}return"\r"})}f(j.patterns,function(l){j.content=k(h(j.content).replace(l.pattern,function(n,o,m,p){m=k(m);if(l.encode){m=i._encode(m)}j.items.push(m);return o+""+p}))});return j},_unprotect:function(i,j){i=i.replace(/\"))}if(a&&j.ListBox){if(a.Button||a.SplitButton){e+=b.createHTML("td",{"class":"mceToolbarEnd"},b.createHTML("span",null,""))}}if(b.stdMode){e+='
"}else{e+=""}if(f&&j.ListBox){if(f.Button||f.SplitButton){e+=b.createHTML("td",{"class":"mceToolbarStart"},b.createHTML("span",null,""))}}}g="mceToolbarEnd";if(j.Button){g+=" mceToolbarEndButton"}else{if(j.SplitButton){g+=" mceToolbarEndSplitButton"}else{if(j.ListBox){g+=" mceToolbarEndListBox"}}}e+=b.createHTML("td",{"class":g},b.createHTML("span",null,""));return b.createHTML("table",{id:l.id,"class":"mceToolbar"+(m["class"]?" "+m["class"]:""),cellpadding:"0",cellspacing:"0",align:l.settings.align||""},""+e+"")}});(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{AddOnManager:function(){var d=this;d.items=[];d.urls={};d.lookup={};d.onAdd=new a(d)},get:function(d){return this.lookup[d]},requireLangPack:function(e){var d=b.settings;if(d&&d.language){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(e,d){this.items.push(d);this.lookup[e]=d;this.onAdd.dispatch(this,e,d);return d},load:function(h,e,d,g){var f=this;if(f.urls[h]){return}if(e.indexOf("/")!=0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}f.urls[h]=e.substring(0,e.lastIndexOf("/"));if(!f.lookup[h]){b.ScriptLoader.add(e,d,g)}}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(q){var n=this,p,l=j.ScriptLoader,u,o=[],m;function r(x,y,t){var v=x[y];if(!v){return}if(j.is(v,"string")){t=v.replace(/\.\w+$/,"");t=t?j.resolve(t):0;v=j.resolve(v)}return v.apply(t||this,Array.prototype.slice.call(arguments,2))}q=d({theme:"simple",language:"en"},q);n.settings=q;i.add(document,"init",function(){var s,v;r(q,"onpageload");switch(q.mode){case"exact":s=q.elements||"";if(s.length>0){g(e(s),function(x){if(k.get(x)){m=new j.Editor(x,q);o.push(m);m.render(1)}else{g(document.forms,function(y){g(y.elements,function(z){if(z.name===x){x="mce_editor_"+c++;k.setAttrib(z,"id",x);m=new j.Editor(x,q);o.push(m);m.render(1)}})})}})}break;case"textareas":case"specific_textareas":function t(y,x){return x.constructor===RegExp?x.test(y.className):k.hasClass(y,x)}g(k.select("textarea"),function(x){if(q.editor_deselector&&t(x,q.editor_deselector)){return}if(!q.editor_selector||t(x,q.editor_selector)){u=k.get(x.name);if(!x.id&&!u){x.id=x.name}if(!x.id||n.get(x.id)){x.id=k.uniqueId()}m=new j.Editor(x.id,q);o.push(m);m.render(1)}});break}if(q.oninit){s=v=0;g(o,function(x){v++;if(!x.initialized){x.onInit.add(function(){s++;if(s==v){r(q,"oninit")}})}else{s++}if(s==v){r(q,"oninit")}})}})},get:function(l){if(l===a){return this.editors}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l':"",visual_table_class:"mceItemTable",visual:1,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",apply_source_formatting:1,directionality:"ltr",forced_root_block:"p",valid_elements:"@[id|class|style|title|dir';if(F.document_base_url!=m.documentBaseURL){E.iframeHTML+=''}E.iframeHTML+='';if(m.relaxedDomain){E.iframeHTML+=''); - tinymce.ScriptLoader.markDone(u); - } - } - }, - - pickColor : function(e, element_id) { - this.execCommand('mceColorPicker', true, { - color : document.getElementById(element_id).value, - func : function(c) { - document.getElementById(element_id).value = c; - - try { - document.getElementById(element_id).onchange(); - } catch (ex) { - // Try fire event, ignore errors - } - } - }); - }, - - openBrowser : function(element_id, type, option) { - tinyMCEPopup.restoreSelection(); - this.editor.execCallback('file_browser_callback', element_id, document.getElementById(element_id).value, type, window); - }, - - confirm : function(t, cb, s) { - this.editor.windowManager.confirm(t, cb, s, window); - }, - - alert : function(tx, cb, s) { - this.editor.windowManager.alert(tx, cb, s, window); - }, - - close : function() { - var t = this; - - // To avoid domain relaxing issue in Opera - function close() { - t.editor.windowManager.close(window); - tinymce = tinyMCE = t.editor = t.params = t.dom = t.dom.doc = null; // Cleanup - }; - - if (tinymce.isOpera) - t.getWin().setTimeout(close, 0); - else - close(); - }, - - // Internal functions - - _restoreSelection : function() { - var e = window.event.srcElement; - - if (e.nodeName == 'INPUT' && (e.type == 'submit' || e.type == 'button')) - tinyMCEPopup.restoreSelection(); - }, - -/* _restoreSelection : function() { - var e = window.event.srcElement; - - // If user focus a non text input or textarea - if ((e.nodeName != 'INPUT' && e.nodeName != 'TEXTAREA') || e.type != 'text') - tinyMCEPopup.restoreSelection(); - },*/ - - _onDOMLoaded : function() { - var t = this, ti = document.title, bm, h, nv; - - // Translate page - if (t.features.translate_i18n !== false) { - h = document.body.innerHTML; - - // Replace a=x with a="x" in IE - if (tinymce.isIE) - h = h.replace(/ (value|title|alt)=([^"][^\s>]+)/gi, ' $1="$2"') - - document.dir = t.editor.getParam('directionality',''); - - if ((nv = t.editor.translate(h)) && nv != h) - document.body.innerHTML = nv; - - if ((nv = t.editor.translate(ti)) && nv != ti) - document.title = ti = nv; - } - - document.body.style.display = ''; - - // Restore selection in IE when focus is placed on a non textarea or input element of the type text - if (tinymce.isIE) - document.attachEvent('onmouseup', tinyMCEPopup._restoreSelection); - - t.restoreSelection(); - t.resizeToInnerSize(); - - // Set inline title - if (!t.isWindow) - t.editor.windowManager.setTitle(window, ti); - else - window.focus(); - - if (!tinymce.isIE && !t.isWindow) { - tinymce.dom.Event._add(document, 'focus', function() { - t.editor.windowManager.focus(t.id) - }); - } - - // Patch for accessibility - tinymce.each(t.dom.select('select'), function(e) { - e.onkeydown = tinyMCEPopup._accessHandler; - }); - - // Call onInit - // Init must be called before focus so the selection won't get lost by the focus call - tinymce.each(t.listeners, function(o) { - o.func.call(o.scope, t.editor); - }); - - // Move focus to window - if (t.getWindowArg('mce_auto_focus', true)) { - window.focus(); - - // Focus element with mceFocus class - tinymce.each(document.forms, function(f) { - tinymce.each(f.elements, function(e) { - if (t.dom.hasClass(e, 'mceFocus') && !e.disabled) { - e.focus(); - return false; // Break loop - } - }); - }); - } - - document.onkeyup = tinyMCEPopup._closeWinKeyHandler; - }, - - _accessHandler : function(e) { - e = e || window.event; - - if (e.keyCode == 13 || e.keyCode == 32) { - e = e.target || e.srcElement; - - if (e.onchange) - e.onchange(); - - return tinymce.dom.Event.cancel(e); - } - }, - - _closeWinKeyHandler : function(e) { - e = e || window.event; - - if (e.keyCode == 27) - tinyMCEPopup.close(); - }, - - _wait : function() { - var t = this, ti; - - if (tinymce.isIE && document.location.protocol != 'https:') { - // Fake DOMContentLoaded on IE - document.write(''); - }; + this.current = function() { + return node; + }; - if (!tinymce.is(u, 'string')) { - each(u, function(u) { - loadScript(u); - }); + this.next = function(shallow) { + return (node = findSibling(node, 'firstChild', 'nextSibling', shallow)); + }; - if (cb) - cb.call(s || t); - } else { - loadScript(u); + this.prev = function(shallow) { + return (node = findSibling(node, 'lastChild', 'lastSibling', shallow)); + }; +}; - if (cb) - cb.call(s || t); - } - }, +(function() { + var transitional = {}; - loadQueue : function(cb, s) { - var t = this; + function unpack(lookup, data) { + var key; - if (!t.queueLoading) { - t.queueLoading = 1; - t.queueCallbacks = []; + function replace(value) { + return value.replace(/[A-Z]+/g, function(key) { + return replace(lookup[key]); + }); + }; - t.loadScripts(t.queue, function() { - t.queueLoading = 0; + // Unpack lookup + for (key in lookup) { + if (lookup.hasOwnProperty(key)) + lookup[key] = replace(lookup[key]); + } - if (cb) - cb.call(s || t); + // Unpack and parse data into object map + replace(data).replace(/#/g, '#text').replace(/(\w+)\[([^\]]+)\]/g, function(str, name, children) { + var i, map = {}; - each(t.queueCallbacks, function(o) { - o.func.call(o.scope); - }); - }); - } else if (cb) - t.queueCallbacks.push({func : cb, scope : s || t}); - }, + children = children.split(/\|/); - eval : function(co) { - var w = window; + for (i = children.length - 1; i >= 0; i--) + map[children[i]] = 1; - // Evaluate script - if (!w.execScript) { - try { - eval.call(w, co); - } catch (ex) { - eval(co, w); // Firefox 3.0a8 - } - } else - w.execScript(co); // IE - }, + transitional[name] = map; + }); + }; - loadScripts : function(sc, cb, s) { - var t = this, lo = t.lookup; + // This is the XHTML 1.0 transitional elements with it's children packed to reduce it's size + // we will later include the attributes here and use it as a default for valid elements but it + // requires us to rewrite the serializer engine + unpack({ + Z : '#|H|K|N|O|P', + Y : '#|X|form|R|Q', + X : 'p|T|div|U|W|isindex|fieldset|table', + W : 'pre|hr|blockquote|address|center|noframes', + U : 'ul|ol|dl|menu|dir', + ZC : '#|p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q', + T : 'h1|h2|h3|h4|h5|h6', + ZB : '#|X|S|Q', + S : 'R|P', + ZA : '#|a|G|J|M|O|P', + R : '#|a|H|K|N|O', + Q : 'noscript|P', + P : 'ins|del|script', + O : 'input|select|textarea|label|button', + N : 'M|L', + M : 'em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym', + L : 'sub|sup', + K : 'J|I', + J : 'tt|i|b|u|s|strike', + I : 'big|small|font|basefont', + H : 'G|F', + G : 'br|span|bdo', + F : 'object|applet|img|map|iframe' + }, 'script[]' + + 'style[]' + + 'object[#|param|X|form|a|H|K|N|O|Q]' + + 'param[]' + + 'p[S]' + + 'a[Z]' + + 'br[]' + + 'span[S]' + + 'bdo[S]' + + 'applet[#|param|X|form|a|H|K|N|O|Q]' + + 'h1[S]' + + 'img[]' + + 'map[X|form|Q|area]' + + 'h2[S]' + + 'iframe[#|X|form|a|H|K|N|O|Q]' + + 'h3[S]' + + 'tt[S]' + + 'i[S]' + + 'b[S]' + + 'u[S]' + + 's[S]' + + 'strike[S]' + + 'big[S]' + + 'small[S]' + + 'font[S]' + + 'basefont[]' + + 'em[S]' + + 'strong[S]' + + 'dfn[S]' + + 'code[S]' + + 'q[S]' + + 'samp[S]' + + 'kbd[S]' + + 'var[S]' + + 'cite[S]' + + 'abbr[S]' + + 'acronym[S]' + + 'sub[S]' + + 'sup[S]' + + 'input[]' + + 'select[optgroup|option]' + + 'optgroup[option]' + + 'option[]' + + 'textarea[]' + + 'label[S]' + + 'button[#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]' + + 'h4[S]' + + 'ins[#|X|form|a|H|K|N|O|Q]' + + 'h5[S]' + + 'del[#|X|form|a|H|K|N|O|Q]' + + 'h6[S]' + + 'div[#|X|form|a|H|K|N|O|Q]' + + 'ul[li]' + + 'li[#|X|form|a|H|K|N|O|Q]' + + 'ol[li]' + + 'dl[dt|dd]' + + 'dt[S]' + + 'dd[#|X|form|a|H|K|N|O|Q]' + + 'menu[li]' + + 'dir[li]' + + 'pre[ZA]' + + 'hr[]' + + 'blockquote[#|X|form|a|H|K|N|O|Q]' + + 'address[S|p]' + + 'center[#|X|form|a|H|K|N|O|Q]' + + 'noframes[#|X|form|a|H|K|N|O|Q]' + + 'isindex[]' + + 'fieldset[#|legend|X|form|a|H|K|N|O|Q]' + + 'legend[S]' + + 'table[caption|col|colgroup|thead|tfoot|tbody|tr]' + + 'caption[S]' + + 'col[]' + + 'colgroup[col]' + + 'thead[tr]' + + 'tr[th|td]' + + 'th[#|X|form|a|H|K|N|O|Q]' + + 'form[#|X|a|H|K|N|O|Q]' + + 'noscript[#|X|form|a|H|K|N|O|Q]' + + 'td[#|X|form|a|H|K|N|O|Q]' + + 'tfoot[tr]' + + 'tbody[tr]' + + 'area[]' + + 'base[]' + + 'body[#|X|form|a|H|K|N|O|Q]' + ); + + tinymce.dom.Schema = function() { + var t = this, elements = transitional; + + t.isValid = function(name, child_name) { + var element = elements[name]; + + return !!(element && (!child_name || element[child_name])); + }; + }; +})(); +(function(tinymce) { + tinymce.dom.RangeUtils = function(dom) { + var INVISIBLE_CHAR = '\uFEFF'; + + this.walk = function(rng, callback) { + var startContainer = rng.startContainer, + startOffset = rng.startOffset, + endContainer = rng.endContainer, + endOffset = rng.endOffset, + ancestor, startPoint, + endPoint, node, parent, siblings, nodes; + + // Handle table cell selection the table plugin enables + // you to fake select table cells and perform formatting actions on them + nodes = dom.select('td.mceSelected,th.mceSelected'); + if (nodes.length > 0) { + tinymce.each(nodes, function(node) { + callback([node]); + }); - function done(o) { - o.state = 2; // Has been loaded + return; + } - // Run callback - if (o.func) - o.func.call(o.scope || t); - }; + function collectSiblings(node, name, end_node) { + var siblings = []; - function allDone() { - var l; + for (; node && node != end_node; node = node[name]) + siblings.push(node); - // Check if all files are loaded - l = sc.length; - each(sc, function(o) { - o = lo[o.url]; + return siblings; + }; - if (o.state === 2) {// It has finished loading - done(o); - l--; - } else - load(o); - }); + function findEndPoint(node, root) { + do { + if (node.parentNode == root) + return node; - // They are all loaded - if (l === 0 && cb) { - cb.call(s || t); - cb = 0; - } + node = node.parentNode; + } while(node); }; - function load(o) { - if (o.state > 0) - return; + function walkBoundary(start_node, end_node, next) { + var siblingName = next ? 'nextSibling' : 'previousSibling'; - o.state = 1; // Is loading + for (node = start_node, parent = node.parentNode; node && node != end_node; node = parent) { + parent = node.parentNode; + siblings = collectSiblings(node == start_node ? node : node[siblingName], siblingName); - tinymce.dom.ScriptLoader.loadScript(o.url, function() { - done(o); - allDone(); - }); + if (siblings.length) { + if (!next) + siblings.reverse(); - /* - tinymce.util.XHR.send({ - url : o.url, - error : t.settings.error, - success : function(co) { - t.eval(co); - done(o); - allDone(); + callback(siblings); } - }); - */ + } }; - each(sc, function(o) { - var u = o.url; + // If index based start position then resolve it + if (startContainer.nodeType == 1 && startContainer.hasChildNodes()) + startContainer = startContainer.childNodes[startOffset]; - // Add to queue if needed - if (!lo[u]) { - lo[u] = o; - t.queue.push(o); - } else - o = lo[u]; + // If index based end position then resolve it + if (endContainer.nodeType == 1 && endContainer.hasChildNodes()) + endContainer = endContainer.childNodes[Math.min(startOffset == endOffset ? endOffset : endOffset - 1, endContainer.childNodes.length - 1)]; - // Is already loading or has been loaded - if (o.state > 0) - return; + // Find common ancestor and end points + ancestor = dom.findCommonAncestor(startContainer, endContainer); - if (!Event.domLoaded && !t.settings.strict_mode) { - var ix, ol = ''; + // Same container + if (startContainer == endContainer) + return callback([startContainer]); - // Add onload events - if (cb || o.func) { - o.state = 1; // Is loading + // Process left side + for (node = startContainer; node; node = node.parentNode) { + if (node == endContainer) + return walkBoundary(startContainer, ancestor, true); - ix = tinymce.dom.ScriptLoader._addOnLoad(function() { - done(o); - allDone(); - }); + if (node == ancestor) + break; + } - if (tinymce.isIE) - ol = ' onreadystatechange="'; - else - ol = ' onload="'; + // Process right side + for (node = endContainer; node; node = node.parentNode) { + if (node == startContainer) + return walkBoundary(endContainer, ancestor); - ol += 'tinymce.dom.ScriptLoader._onLoad(this,\'' + u + '\',' + ix + ');"'; - } + if (node == ancestor) + break; + } - document.write(''); + // Find start/end point + startPoint = findEndPoint(startContainer, ancestor) || startContainer; + endPoint = findEndPoint(endContainer, ancestor) || endContainer; - if (!o.func) - done(o); - } else - load(o); - }); + // Walk left leaf + walkBoundary(startContainer, startPoint, true); - allDone(); - }, + // Walk the middle from start to end point + siblings = collectSiblings( + startPoint == startContainer ? startPoint : startPoint.nextSibling, + 'nextSibling', + endPoint == endContainer ? endPoint.nextSibling : endPoint + ); - // Static methods - 'static' : { - _addOnLoad : function(f) { - var t = this; + if (siblings.length) + callback(siblings); - t._funcs = t._funcs || []; - t._funcs.push(f); + // Walk right leaf + walkBoundary(endContainer, endPoint); + }; - return t._funcs.length - 1; - }, + /* this.split = function(rng) { + var startContainer = rng.startContainer, + startOffset = rng.startOffset, + endContainer = rng.endContainer, + endOffset = rng.endOffset; - _onLoad : function(e, u, ix) { - if (!tinymce.isIE || e.readyState == 'complete') - this._funcs[ix].call(this); - }, + function splitText(node, offset) { + if (offset == node.nodeValue.length) + node.appendData(INVISIBLE_CHAR); - loadScript : function(u, cb) { - var id = tinymce.DOM.uniqueId(), e; + node = node.splitText(offset); - function done() { - Event.clear(id); - tinymce.DOM.remove(id); + if (node.nodeValue === INVISIBLE_CHAR) + node.nodeValue = ''; - if (cb) { - cb.call(document, u); - cb = 0; - } - }; + return node; + }; - if (tinymce.isIE) { -/* Event.add(e, 'readystatechange', function(e) { - if (e.target && e.target.readyState == 'complete') - done(); - });*/ + // Handle single text node + if (startContainer == endContainer) { + if (startContainer.nodeType == 3) { + if (startOffset != 0) + startContainer = endContainer = splitText(startContainer, startOffset); - tinymce.util.XHR.send({ - url : tinymce._addVer(u), - async : false, - success : function(co) { - window.execScript(co); - done(); - } - }); - } else { - e = tinymce.DOM.create('script', {id : id, type : 'text/javascript', src : tinymce._addVer(u)}); - Event.add(e, 'load', done); + if (endOffset - startOffset != startContainer.nodeValue.length) + splitText(startContainer, endOffset - startOffset); + } + } else { + // Split startContainer text node if needed + if (startContainer.nodeType == 3 && startOffset != 0) { + startContainer = splitText(startContainer, startOffset); + startOffset = 0; + } - // Check for head or body - (document.getElementsByTagName('head')[0] || document.body).appendChild(e); + // Split endContainer text node if needed + if (endContainer.nodeType == 3 && endOffset != endContainer.nodeValue.length) { + endContainer = splitText(endContainer, endOffset).previousSibling; + endOffset = endContainer.nodeValue.length; } } - } - }); + return { + startContainer : startContainer, + startOffset : startOffset, + endContainer : endContainer, + endOffset : endOffset + }; + }; +*/ + }; - // Global script loader - tinymce.ScriptLoader = new tinymce.dom.ScriptLoader(); -})(); + tinymce.dom.RangeUtils.compareRanges = function(rng1, rng2) { + if (rng1 && rng2) { + // Compare native IE ranges + if (rng1.item || rng1.duplicate) { + // Both are control ranges and the selected element matches + if (rng1.item && rng2.item && rng1.item(0) === rng2.item(0)) + return true; -/* file:jscripts/tiny_mce/classes/ui/Control.js */ + // Both are text ranges and the range matches + if (rng1.isEqual && rng2.isEqual && rng2.isEqual(rng1)) + return true; + } else { + // Compare w3c ranges + return rng1.startContainer == rng2.startContainer && rng1.startOffset == rng2.startOffset; + } + } -(function() { + return false; + }; +})(tinymce); + +(function(tinymce) { // Shorten class names var DOM = tinymce.DOM, is = tinymce.is; @@ -4980,15 +7470,14 @@ tinymce.create('static tinymce.util.XHR', { destroy : function() { tinymce.dom.Event.clear(this.id); } - - }); -})(); -/* file:jscripts/tiny_mce/classes/ui/Container.js */ - + }); +})(tinymce); tinymce.create('tinymce.ui.Container:tinymce.ui.Control', { Container : function(id, s) { this.parent(id, s); + this.controls = []; + this.lookup = {}; }, @@ -5002,11 +7491,8 @@ tinymce.create('tinymce.ui.Container:tinymce.ui.Control', { get : function(n) { return this.lookup[n]; } +}); - }); - - -/* file:jscripts/tiny_mce/classes/ui/Separator.js */ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { Separator : function(id, s) { @@ -5017,12 +7503,9 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { renderHTML : function() { return tinymce.DOM.createHTML('span', {'class' : this.classPrefix}); } +}); - }); - -/* file:jscripts/tiny_mce/classes/ui/MenuItem.js */ - -(function() { +(function(tinymce) { var is = tinymce.is, DOM = tinymce.DOM, each = tinymce.each, walk = tinymce.walk; tinymce.create('tinymce.ui.MenuItem:tinymce.ui.Control', { @@ -5049,13 +7532,10 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { if (is(t.selected)) t.setSelected(t.selected); } + }); +})(tinymce); - }); -})(); - -/* file:jscripts/tiny_mce/classes/ui/Menu.js */ - -(function() { +(function(tinymce) { var is = tinymce.is, DOM = tinymce.DOM, each = tinymce.each, walk = tinymce.walk; tinymce.create('tinymce.ui.Menu:tinymce.ui.MenuItem', { @@ -5151,12 +7631,9 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { return m; } - - }); -})(); -/* file:jscripts/tiny_mce/classes/ui/DropMenu.js */ - -(function() { + }); +})(tinymce); +(function(tinymce) { var is = tinymce.is, DOM = tinymce.DOM, each = tinymce.each, Event = tinymce.dom.Event, Element = tinymce.dom.Element; tinymce.create('tinymce.ui.DropMenu:tinymce.ui.Menu', { @@ -5269,7 +7746,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { e = e.target; - if (e && (e = DOM.getParent(e, 'TR')) && !DOM.hasClass(e, cp + 'ItemSub')) { + if (e && (e = DOM.getParent(e, 'tr')) && !DOM.hasClass(e, cp + 'ItemSub')) { m = t.items[e.id]; if (m.isDisabled()) @@ -5296,7 +7773,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { var m, r, mi; e = e.target; - if (e && (e = DOM.getParent(e, 'TR'))) { + if (e && (e = DOM.getParent(e, 'tr'))) { m = t.items[e.id]; if (t.lastMenu) @@ -5482,12 +7959,9 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { DOM.addClass(ro, 'mceLast'); } - - }); -})(); -/* file:jscripts/tiny_mce/classes/ui/Button.js */ - -(function() { + }); +})(tinymce); +(function(tinymce) { var DOM = tinymce.DOM; tinymce.create('tinymce.ui.Button:tinymce.ui.Control', { @@ -5518,13 +7992,10 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { return s.onclick.call(s.scope, e); }); } + }); +})(tinymce); - }); -})(); - -/* file:jscripts/tiny_mce/classes/ui/ListBox.js */ - -(function() { +(function(tinymce) { var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, Dispatcher = tinymce.util.Dispatcher; tinymce.create('tinymce.ui.ListBox:tinymce.ui.Control', { @@ -5532,11 +8003,17 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { var t = this; t.parent(id, s); + t.items = []; + t.onChange = new Dispatcher(t); + t.onPostRender = new Dispatcher(t); + t.onAdd = new Dispatcher(t); + t.onRenderMenu = new tinymce.util.Dispatcher(this); + t.classPrefix = 'mceListBox'; }, @@ -5590,8 +8067,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { } e = 0; - } else - t.selectedValue = t.selectedIndex = null; + } }, add : function(n, v, o) { @@ -5666,16 +8142,16 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { hideMenu : function(e) { var t = this; - // Prevent double toogles by canceling the mouse click event to the button - if (e && e.type == "mousedown" && (e.target.id == t.id + '_text' || e.target.id == t.id + '_open')) - return; - - if (!e || !DOM.getParent(e.target, function(n) {return DOM.hasClass(n, 'mceMenu');})) { - DOM.removeClass(t.id, t.classPrefix + 'Selected'); - Event.remove(DOM.doc, 'mousedown', t.hideMenu, t); + if (t.menu && t.menu.isMenuVisible) { + // Prevent double toogles by canceling the mouse click event to the button + if (e && e.type == "mousedown" && (e.target.id == t.id + '_text' || e.target.id == t.id + '_open')) + return; - if (t.menu) + if (!e || !DOM.getParent(e.target, '.mceMenu')) { + DOM.removeClass(t.id, t.classPrefix + 'Selected'); + Event.remove(DOM.doc, 'mousedown', t.hideMenu, t); t.menu.hideMenu(); + } } }, @@ -5701,13 +8177,25 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { }); each(t.items, function(o) { - o.id = DOM.uniqueId(); - o.onclick = function() { - if (t.settings.onselect(o.value) !== false) - t.select(o.value); // Must be runned after - }; + // No value then treat it as a title + if (o.value === undefined) { + m.add({ + title : o.title, + 'class' : 'mceMenuItemTitle', + onclick : function() { + if (t.settings.onselect('') !== false) + t.select(''); // Must be runned after + } + }); + } else { + o.id = DOM.uniqueId(); + o.onclick = function() { + if (t.settings.onselect(o.value) !== false) + t.select(o.value); // Must be runned after + }; - m.add(o); + m.add(o); + } }); t.onRenderMenu.dispatch(t, m); @@ -5718,7 +8206,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { var t = this, cp = t.classPrefix; Event.add(t.id, 'click', t.showMenu, t); - Event.add(t.id + '_text', 'focus', function(e) { + Event.add(t.id + '_text', 'focus', function() { if (!t._focused) { t.keyDownHandler = Event.add(t.id + '_text', 'keydown', function(e) { var idx = -1, v, kc = e.keyCode; @@ -5773,13 +8261,11 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { this.parent(); Event.clear(this.id + '_text'); + Event.clear(this.id + '_open'); } - - }); -})(); -/* file:jscripts/tiny_mce/classes/ui/NativeListBox.js */ - -(function() { + }); +})(tinymce); +(function(tinymce) { var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, Dispatcher = tinymce.util.Dispatcher; tinymce.create('tinymce.ui.NativeListBox:tinymce.ui.ListBox', { @@ -5852,7 +8338,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { }, getLength : function() { - return DOM.get(this.id).options.length - 1; + return this.items.length; }, renderHTML : function() { @@ -5906,18 +8392,17 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { t.onPostRender.dispatch(t, DOM.get(t.id)); } - - }); -})(); -/* file:jscripts/tiny_mce/classes/ui/MenuButton.js */ - -(function() { + }); +})(tinymce); +(function(tinymce) { var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each; tinymce.create('tinymce.ui.MenuButton:tinymce.ui.Button', { MenuButton : function(id, s) { this.parent(id, s); + this.onRenderMenu = new tinymce.util.Dispatcher(this); + s.menu_container = s.menu_container || DOM.doc.body; }, @@ -5974,7 +8459,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { if (e && e.type == "mousedown" && DOM.getParent(e.target, function(e) {return e.id === t.id || e.id === t.id + '_open';})) return; - if (!e || !DOM.getParent(e.target, function(n) {return DOM.hasClass(n, 'mceMenu');})) { + if (!e || !DOM.getParent(e.target, '.mceMenu')) { t.setState('Selected', 0); Event.remove(DOM.doc, 'mousedown', t.hideMenu, t); if (t.menu) @@ -5996,13 +8481,10 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { } }); } + }); +})(tinymce); - }); -})(); - -/* file:jscripts/tiny_mce/classes/ui/SplitButton.js */ - -(function() { +(function(tinymce) { var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each; tinymce.create('tinymce.ui.SplitButton:tinymce.ui.MenuButton', { @@ -6065,13 +8547,10 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { Event.clear(this.id + '_action'); Event.clear(this.id + '_open'); } + }); +})(tinymce); - }); -})(); - -/* file:jscripts/tiny_mce/classes/ui/ColorSplitButton.js */ - -(function() { +(function(tinymce) { var DOM = tinymce.DOM, Event = tinymce.dom.Event, is = tinymce.is, each = tinymce.each; tinymce.create('tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton', { @@ -6087,6 +8566,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { }, t.settings); t.onShowMenu = new tinymce.util.Dispatcher(t); + t.onHideMenu = new tinymce.util.Dispatcher(t); t.value = s.default_color; @@ -6118,6 +8598,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { e = 0; Event.add(DOM.doc, 'mousedown', t.hideMenu, t); + t.onShowMenu.dispatch(t); if (t._focused) { t._keyHandler = Event.add(t.id + '_menu', 'keydown', function(e) { @@ -6128,8 +8609,6 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { DOM.select('a', t.id + '_menu')[0].focus(); // Select first link } - t.onShowMenu.dispatch(t); - t.isMenuVisible = 1; }, @@ -6140,7 +8619,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { if (e && e.type == "mousedown" && DOM.getParent(e.target, function(e) {return e.id === t.id + '_open';})) return; - if (!e || !DOM.getParent(e.target, function(n) {return DOM.hasClass(n, 'mceSplitButtonMenu');})) { + if (!e || !DOM.getParent(e.target, '.mceSplitButtonMenu')) { DOM.removeClass(t.id, 'mceSplitButtonSelected'); Event.remove(DOM.doc, 'mousedown', t.hideMenu, t); Event.remove(t.id + '_menu', 'keydown', t._keyHandler); @@ -6179,7 +8658,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { style : { backgroundColor : '#' + c }, - mce_color : '#' + c + _mce_color : '#' + c }); }); @@ -6201,7 +8680,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { e = e.target; - if (e.nodeName == 'A' && (c = e.getAttribute('mce_color'))) + if (e.nodeName == 'A' && (c = e.getAttribute('_mce_color'))) t.setColor(c); return Event.cancel(e); // Prevent IE auto save warning @@ -6235,11 +8714,8 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', { Event.clear(this.id + '_more'); DOM.remove(this.id + '_menu'); } - - }); -})(); - -/* file:jscripts/tiny_mce/classes/ui/Toolbar.js */ + }); +})(tinymce); tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { renderHTML : function() { @@ -6302,35 +8778,30 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { return dom.createHTML('table', {id : t.id, 'class' : 'mceToolbar' + (s['class'] ? ' ' + s['class'] : ''), cellpadding : '0', cellspacing : '0', align : t.settings.align || ''}, '' + h + ''); } +}); - }); - -/* file:jscripts/tiny_mce/classes/AddOnManager.js */ - -(function() { +(function(tinymce) { var Dispatcher = tinymce.util.Dispatcher, each = tinymce.each; tinymce.create('tinymce.AddOnManager', { - items : [], - urls : {}, - lookup : {}, - onAdd : new Dispatcher(this), + AddOnManager : function() { + var self = this; + + self.items = []; + self.urls = {}; + self.lookup = {}; + self.onAdd = new Dispatcher(self); + }, get : function(n) { return this.lookup[n]; }, requireLangPack : function(n) { - var u, s = tinymce.EditorManager.settings; - - if (s && s.language) { - u = this.urls[n] + '/langs/' + s.language + '.js'; + var s = tinymce.settings; - if (!tinymce.dom.Event.domLoaded && !s.strict_mode) - tinymce.ScriptLoader.load(u); - else - tinymce.ScriptLoader.add(u); - } + if (s && s.language) + tinymce.ScriptLoader.add(this.urls[n] + '/langs/' + s.language + '.js'); }, add : function(id, o) { @@ -6351,58 +8822,57 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { u = tinymce.baseURL + '/' + u; t.urls[n] = u.substring(0, u.lastIndexOf('/')); - tinymce.ScriptLoader.add(u, cb, s); - } - }); + if (!t.lookup[n]) + tinymce.ScriptLoader.add(u, cb, s); + } + }); // Create plugin and theme managers tinymce.PluginManager = new tinymce.AddOnManager(); tinymce.ThemeManager = new tinymce.AddOnManager(); -}()); -/* file:jscripts/tiny_mce/classes/EditorManager.js */ +}(tinymce)); -(function() { +(function(tinymce) { // Shorten names - var each = tinymce.each, extend = tinymce.extend, DOM = tinymce.DOM, Event = tinymce.dom.Event, ThemeManager = tinymce.ThemeManager, PluginManager = tinymce.PluginManager, explode = tinymce.explode; + var each = tinymce.each, extend = tinymce.extend, + DOM = tinymce.DOM, Event = tinymce.dom.Event, + ThemeManager = tinymce.ThemeManager, PluginManager = tinymce.PluginManager, + explode = tinymce.explode, + Dispatcher = tinymce.util.Dispatcher, undefined, instanceCounter = 0; - tinymce.create('static tinymce.EditorManager', { - editors : {}, - i18n : {}, - activeEditor : null, + // Setup some URLs where the editor API is located and where the document is + tinymce.documentBaseURL = window.location.href.replace(/[\?#].*$/, '').replace(/[\/\\][^\/]+$/, ''); + if (!/[\/\\]$/.test(tinymce.documentBaseURL)) + tinymce.documentBaseURL += '/'; + + tinymce.baseURL = new tinymce.util.URI(tinymce.documentBaseURL).toAbsolute(tinymce.baseURL); + + tinymce.baseURI = new tinymce.util.URI(tinymce.baseURL); - preInit : function() { - var t = this, lo = window.location; + // Add before unload listener + // This was required since IE was leaking memory if you added and removed beforeunload listeners + // with attachEvent/detatchEvent so this only adds one listener and instances can the attach to the onBeforeUnload event + tinymce.onBeforeUnload = new Dispatcher(tinymce); - // Setup some URLs where the editor API is located and where the document is - tinymce.documentBaseURL = lo.href.replace(/[\?#].*$/, '').replace(/[\/\\][^\/]+$/, ''); - if (!/[\/\\]$/.test(tinymce.documentBaseURL)) - tinymce.documentBaseURL += '/'; + // Must be on window or IE will leak if the editor is placed in frame or iframe + Event.add(window, 'beforeunload', function(e) { + tinymce.onBeforeUnload.dispatch(tinymce, e); + }); - tinymce.baseURL = new tinymce.util.URI(tinymce.documentBaseURL).toAbsolute(tinymce.baseURL); - tinymce.EditorManager.baseURI = new tinymce.util.URI(tinymce.baseURL); + tinymce.onAddEditor = new Dispatcher(tinymce); - // User already specified a document.domain value - if (document.domain && lo.hostname != document.domain) - tinymce.relaxedDomain = document.domain; + tinymce.onRemoveEditor = new Dispatcher(tinymce); - // Setup document domain if tinymce is loaded from other domain - if (!tinymce.relaxedDomain && tinymce.EditorManager.baseURI.host != lo.hostname && lo.hostname) - document.domain = tinymce.relaxedDomain = lo.hostname.replace(/.*\.(.+\..+)$/, '$1'); + tinymce.EditorManager = extend(tinymce, { + editors : [], - // Add before unload listener - // This was required since IE was leaking memory if you added and removed beforeunload listeners - // with attachEvent/detatchEvent so this only adds one listener and instances can the attach to the onBeforeUnload event - t.onBeforeUnload = new tinymce.util.Dispatcher(t); + i18n : {}, - // Must be on window or IE will leak if the editor is placed in frame or iframe - Event.add(window, 'beforeunload', function(e) { - t.onBeforeUnload.dispatch(t, e); - }); - }, + activeEditor : null, init : function(s) { - var t = this, pl, sl = tinymce.ScriptLoader, c, e, el = [], ed; + var t = this, pl, sl = tinymce.ScriptLoader, e, el = [], ed; function execCallback(se, n, s) { var f = se[n]; @@ -6421,87 +8891,17 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { s = extend({ theme : "simple", - language : "en", - strict_loading_mode : document.contentType == 'application/xhtml+xml' + language : "en" }, s); t.settings = s; - // If page not loaded and strict mode isn't enabled then load them - if (!Event.domLoaded && !s.strict_loading_mode) { - // Load language - if (s.language) - sl.add(tinymce.baseURL + '/langs/' + s.language + '.js'); - - // Load theme - if (s.theme && s.theme.charAt(0) != '-' && !ThemeManager.urls[s.theme]) - ThemeManager.load(s.theme, 'themes/' + s.theme + '/editor_template' + tinymce.suffix + '.js'); - - // Load plugins - if (s.plugins) { - pl = explode(s.plugins); - - // Load compat2x first - if (tinymce.inArray(pl, 'compat2x') != -1) - PluginManager.load('compat2x', 'plugins/compat2x/editor_plugin' + tinymce.suffix + '.js'); - - // Load rest if plugins - each(pl, function(v) { - if (v && v.charAt(0) != '-' && !PluginManager.urls[v]) { - // Skip safari plugin for other browsers - if (!tinymce.isWebKit && v == 'safari') - return; - - PluginManager.load(v, 'plugins/' + v + '/editor_plugin' + tinymce.suffix + '.js'); - } - }); - } - - sl.loadQueue(); - } - // Legacy call Event.add(document, 'init', function() { var l, co; execCallback(s, 'onpageload'); - // Verify that it's a valid browser - if (s.browsers) { - l = false; - - each(explode(s.browsers), function(v) { - switch (v) { - case 'ie': - case 'msie': - if (tinymce.isIE) - l = true; - break; - - case 'gecko': - if (tinymce.isGecko) - l = true; - break; - - case 'safari': - case 'webkit': - if (tinymce.isWebKit) - l = true; - break; - - case 'opera': - if (tinymce.isOpera) - l = true; - - break; - } - }); - - // Not a valid one - if (!l) - return; - } - switch (s.mode) { case "exact": l = s.elements || ''; @@ -6513,12 +8913,10 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { el.push(ed); ed.render(1); } else { - c = 0; - each(document.forms, function(f) { each(f.elements, function(e) { if (e.name === v) { - v = 'mce_editor_' + c; + v = 'mce_editor_' + instanceCounter++; DOM.setAttrib(e, 'id', v); ed = new tinymce.Editor(v, s); @@ -6564,7 +8962,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { if (s.oninit) { l = co = 0; - each (el, function(ed) { + each(el, function(ed) { co++; if (!ed.initialized) { @@ -6588,6 +8986,9 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { }, get : function(id) { + if (id === undefined) + return this.editors; + return this.editors[id]; }, @@ -6595,33 +8996,44 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { return this.get(id); }, - add : function(e) { - this.editors[e.id] = e; - this._setActive(e); + add : function(editor) { + var self = this, editors = self.editors; - return e; + // Add named and index editor instance + editors[editor.id] = editor; + editors.push(editor); + + self._setActive(editor); + self.onAddEditor.dispatch(self, editor); + + + return editor; }, - remove : function(e) { - var t = this; + remove : function(editor) { + var t = this, i, editors = t.editors; // Not in the collection - if (!t.editors[e.id]) + if (!editors[editor.id]) return null; - delete t.editors[e.id]; + delete editors[editor.id]; - // Select another editor since the active one was removed - if (t.activeEditor == e) { - each(t.editors, function(e) { - t._setActive(e); - return false; // Break - }); + for (i = 0; i < editors.length; i++) { + if (editors[i] == editor) { + editors.splice(i, 1); + break; + } } - e.destroy(); + // Select another editor since the active one was removed + if (t.activeEditor == editor) + t._setActive(editors[0]); - return e; + editor.destroy(); + t.onRemoveEditor.dispatch(t, editor); + + return editor; }, execCommand : function(c, u, v) { @@ -6734,78 +9146,109 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', { // Private methods - _setActive : function(e) { - this.selectedInstance = this.activeEditor = e; + _setActive : function(editor) { + this.selectedInstance = this.activeEditor = editor; } + }); +})(tinymce); - }); - - tinymce.EditorManager.preInit(); -})(); - -// Short for editor manager window.tinyMCE is needed when TinyMCE gets loaded though a XHR call -var tinyMCE = window.tinyMCE = tinymce.EditorManager; - -/* file:jscripts/tiny_mce/classes/Editor.js */ - -(function() { - var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, Dispatcher = tinymce.util.Dispatcher; - var each = tinymce.each, isGecko = tinymce.isGecko, isIE = tinymce.isIE, isWebKit = tinymce.isWebKit; - var is = tinymce.is, ThemeManager = tinymce.ThemeManager, PluginManager = tinymce.PluginManager, EditorManager = tinymce.EditorManager; - var inArray = tinymce.inArray, grep = tinymce.grep, explode = tinymce.explode; +(function(tinymce) { + // Shorten these names + var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, + Dispatcher = tinymce.util.Dispatcher, each = tinymce.each, isGecko = tinymce.isGecko, + isIE = tinymce.isIE, isWebKit = tinymce.isWebKit, is = tinymce.is, + ThemeManager = tinymce.ThemeManager, PluginManager = tinymce.PluginManager, + inArray = tinymce.inArray, grep = tinymce.grep, explode = tinymce.explode; tinymce.create('tinymce.Editor', { Editor : function(id, s) { var t = this; t.id = t.editorId = id; + t.execCommands = {}; t.queryStateCommands = {}; t.queryValueCommands = {}; + + t.isNotDirty = false; + t.plugins = {}; // Add events to the editor each([ 'onPreInit', + 'onBeforeRenderUI', + 'onPostRender', + 'onInit', + 'onRemove', + 'onActivate', + 'onDeactivate', + 'onClick', + 'onEvent', + 'onMouseUp', + 'onMouseDown', + 'onDblClick', + 'onKeyDown', + 'onKeyUp', + 'onKeyPress', + 'onContextMenu', + 'onSubmit', + 'onReset', + 'onPaste', + 'onPreProcess', + 'onPostProcess', + 'onBeforeSetContent', + 'onBeforeGetContent', + 'onSetContent', + 'onGetContent', + 'onLoadContent', + 'onSaveContent', + 'onNodeChange', + 'onChange', + 'onBeforeExecCommand', + 'onExecCommand', + 'onUndo', + 'onRedo', + 'onVisualAid', + 'onSetProgressState' ], function(e) { t[e] = new Dispatcher(t); }); - // Default editor config t.settings = s = extend({ id : id, language : 'en', @@ -6831,30 +9274,31 @@ var tinyMCE = window.tinyMCE = tinymce.EditorManager; custom_undo_redo_keyboard_shortcuts : 1, custom_undo_redo_restore_selection : 1, custom_undo_redo : 1, - doctype : '', + doctype : tinymce.isIE6 ? '' : '', // Use old doctype on IE 6 to avoid horizontal scroll visual_table_class : 'mceItemTable', visual : 1, - inline_styles : true, - convert_fonts_to_spans : true, font_size_style_values : 'xx-small,x-small,small,medium,large,x-large,xx-large', apply_source_formatting : 1, directionality : 'ltr', forced_root_block : 'p', - valid_elements : '@[id|class|style|title|dir
'+j.renderHTML()+""+j.renderHTML()+"