summaryrefslogtreecommitdiff
path: root/program/js/tiny_mce/themes
diff options
context:
space:
mode:
Diffstat (limited to 'program/js/tiny_mce/themes')
-rw-r--r--program/js/tiny_mce/themes/advanced/about.htm34
-rw-r--r--program/js/tiny_mce/themes/advanced/anchor.htm23
-rw-r--r--program/js/tiny_mce/themes/advanced/charmap.htm21
-rw-r--r--program/js/tiny_mce/themes/advanced/color_picker.htm34
-rw-r--r--program/js/tiny_mce/themes/advanced/css/editor_content.css58
-rw-r--r--program/js/tiny_mce/themes/advanced/css/editor_popup.css331
-rw-r--r--program/js/tiny_mce/themes/advanced/docs/en/about.htm31
-rw-r--r--program/js/tiny_mce/themes/advanced/docs/en/common_buttons.htm162
-rw-r--r--program/js/tiny_mce/themes/advanced/docs/en/create_accessible_content.htm45
-rw-r--r--program/js/tiny_mce/themes/advanced/docs/en/images/insert_anchor_window.gifbin5189 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/docs/en/images/insert_image_window.gifbin7195 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/docs/en/images/insert_link_window.gifbin5658 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/docs/en/images/insert_table_window.gifbin7094 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/docs/en/index.htm27
-rw-r--r--program/js/tiny_mce/themes/advanced/docs/en/insert_anchor_button.htm32
-rw-r--r--program/js/tiny_mce/themes/advanced/docs/en/insert_image_button.htm65
-rw-r--r--program/js/tiny_mce/themes/advanced/docs/en/insert_link_button.htm33
-rw-r--r--program/js/tiny_mce/themes/advanced/docs/en/insert_table_button.htm71
-rw-r--r--program/js/tiny_mce/themes/advanced/docs/en/style.css28
-rw-r--r--program/js/tiny_mce/themes/advanced/editor_template.js2
-rw-r--r--program/js/tiny_mce/themes/advanced/editor_template_src.js2564
-rw-r--r--program/js/tiny_mce/themes/advanced/image.htm186
-rw-r--r--program/js/tiny_mce/themes/advanced/images/anchor.gifbin171 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/backcolor.gifbin359 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/bold.gifbin76 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/bold_de_se.gifbin73 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/bold_es.gifbin80 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/bold_fr.gifbin78 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/bold_ru.gifbin77 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/bold_tw.gifbin207 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/browse.gifbin113 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/bullist.gifbin108 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/button_menu.gifbin57 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/buttons.gifbin5662 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/cancel_button_bg.gifbin677 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/charmap.gifbin245 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/cleanup.gifbin256 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/close.gifbin102 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/code.gifbin110 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/color.gifbin125 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/copy.gifbin263 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/custom_1.gifbin76 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/cut.gifbin187 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/forecolor.gifbin342 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/help.gifbin295 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/hr.gifbin63 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/image.gifbin194 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/indent.gifbin112 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/insert_button_bg.gifbin703 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/italic.gifbin79 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/italic_de_se.gifbin75 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/italic_es.gifbin74 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/italic_ru.gifbin78 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/italic_tw.gifbin274 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/justifycenter.gifbin70 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/justifyfull.gifbin71 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/justifyleft.gifbin71 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/justifyright.gifbin70 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/link.gifbin175 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/menu_check.gifbin51 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/newdocument.gifbin170 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/numlist.gifbin111 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/opacity.pngbin147 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/outdent.gifbin110 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/paste.gifbin286 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/redo.gifbin169 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/removeformat.gifbin168 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/separator.gifbin57 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/spacer.gifbin43 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/statusbar_resize.gifbin79 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/strikethrough.gifbin83 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/sub.gifbin148 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/sup.gifbin147 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/underline.gifbin88 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/underline_es.gifbin79 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/underline_fr.gifbin79 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/underline_ru.gifbin77 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/underline_tw.gifbin245 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/undo.gifbin175 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/unlink.gifbin190 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/visualaid.gifbin206 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/xp/tab_bg.gifbin694 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/xp/tab_end.gifbin169 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/xp/tab_sel_bg.gifbin428 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/xp/tab_sel_end.gifbin101 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/images/xp/tabs_bg.gifbin48 -> 0 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/img/colorpicker.jpg (renamed from program/js/tiny_mce/themes/advanced/images/colors.jpg)bin3189 -> 3189 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/img/icons.gifbin0 -> 11505 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/js/about.js72
-rw-r--r--program/js/tiny_mce/themes/advanced/js/anchor.js37
-rw-r--r--program/js/tiny_mce/themes/advanced/js/charmap.js (renamed from program/js/tiny_mce/themes/advanced/jscripts/charmap.js)33
-rw-r--r--program/js/tiny_mce/themes/advanced/js/color_picker.js (renamed from program/js/tiny_mce/themes/advanced/jscripts/color_picker.js)33
-rw-r--r--program/js/tiny_mce/themes/advanced/js/image.js245
-rw-r--r--program/js/tiny_mce/themes/advanced/js/link.js126
-rw-r--r--program/js/tiny_mce/themes/advanced/js/source_editor.js (renamed from program/js/tiny_mce/themes/advanced/jscripts/source_editor.js)33
-rw-r--r--program/js/tiny_mce/themes/advanced/jscripts/about.js75
-rw-r--r--program/js/tiny_mce/themes/advanced/jscripts/anchor.js74
-rw-r--r--program/js/tiny_mce/themes/advanced/jscripts/image.js81
-rw-r--r--program/js/tiny_mce/themes/advanced/jscripts/link.js74
-rw-r--r--program/js/tiny_mce/themes/advanced/langs/en.js155
-rw-r--r--program/js/tiny_mce/themes/advanced/langs/en_dlg.js51
-rw-r--r--program/js/tiny_mce/themes/advanced/link.htm93
-rw-r--r--program/js/tiny_mce/themes/advanced/skins/default/content.css25
-rw-r--r--program/js/tiny_mce/themes/advanced/skins/default/dialog.css114
-rw-r--r--program/js/tiny_mce/themes/advanced/skins/default/img/buttons.pngbin0 -> 3274 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/skins/default/img/items.gif (renamed from program/js/tiny_mce/themes/advanced/images/anchor_symbol.gif)bin70 -> 70 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gifbin0 -> 68 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/skins/default/img/menu_check.gifbin0 -> 70 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/skins/default/img/progress.gifbin0 -> 1787 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/skins/default/img/tabs.gifbin0 -> 1326 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/skins/default/ui.css211
-rw-r--r--program/js/tiny_mce/themes/advanced/skins/o2k7/content.css25
-rw-r--r--program/js/tiny_mce/themes/advanced/skins/o2k7/dialog.css113
-rw-r--r--program/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.pngbin0 -> 5859 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.pngbin0 -> 3736 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.pngbin0 -> 5358 bytes
-rw-r--r--program/js/tiny_mce/themes/advanced/skins/o2k7/ui.css211
-rw-r--r--program/js/tiny_mce/themes/advanced/skins/o2k7/ui_black.css8
-rw-r--r--program/js/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css5
-rw-r--r--program/js/tiny_mce/themes/advanced/source_editor.htm20
-rw-r--r--program/js/tiny_mce/themes/simple/editor_template.js1
-rw-r--r--program/js/tiny_mce/themes/simple/editor_template_src.js85
-rw-r--r--program/js/tiny_mce/themes/simple/img/icons.gifbin0 -> 1440 bytes
-rw-r--r--program/js/tiny_mce/themes/simple/langs/en.js11
-rw-r--r--program/js/tiny_mce/themes/simple/skins/default/content.css25
-rw-r--r--program/js/tiny_mce/themes/simple/skins/default/ui.css32
-rw-r--r--program/js/tiny_mce/themes/simple/skins/o2k7/content.css17
-rw-r--r--program/js/tiny_mce/themes/simple/skins/o2k7/img/button_bg.pngbin0 -> 5102 bytes
-rw-r--r--program/js/tiny_mce/themes/simple/skins/o2k7/ui.css35
129 files changed, 2796 insertions, 3071 deletions
diff --git a/program/js/tiny_mce/themes/advanced/about.htm b/program/js/tiny_mce/themes/advanced/about.htm
index 6918488a2..4ef2a29c5 100644
--- a/program/js/tiny_mce/themes/advanced/about.htm
+++ b/program/js/tiny_mce/themes/advanced/about.htm
@@ -1,35 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title>{$lang_about_title}</title>
- <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
- <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
- <script language="javascript" type="text/javascript" src="jscripts/about.js"></script>
- <base target="_self" />
+ <title>{#advanced_dlg.about_title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="js/about.js"></script>
</head>
-<body id="about" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
+<body id="about" style="display: none">
<div class="tabs">
<ul>
- <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_about}</a></span></li>
- <li id="help_tab"><span><a href="javascript:mcTabs.displayTab('help_tab','help_panel');" onmousedown="return false;">{$lang_help}</a></span></li>
- <li id="plugins_tab"><span><a href="javascript:mcTabs.displayTab('plugins_tab','plugins_panel');" onmousedown="return false;">{$lang_plugins}</a></span></li>
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.about_general}</a></span></li>
+ <li id="help_tab" style="display:none"><span><a href="javascript:mcTabs.displayTab('help_tab','help_panel');" onmousedown="return false;">{#advanced_dlg.about_help}</a></span></li>
+ <li id="plugins_tab"><span><a href="javascript:mcTabs.displayTab('plugins_tab','plugins_panel');" onmousedown="return false;">{#advanced_dlg.about_plugins}</a></span></li>
</ul>
</div>
<div class="panel_wrapper">
<div id="general_panel" class="panel current">
- <h3>{$lang_about_title}</h3>
- <p>Version: {$tinymce_version} ({$tinymce_releasedate})</p>
+ <h3>{#advanced_dlg.about_title}</h3>
+ <p>Version: <span id="version"></span> (<span id="date"></span>)</p>
<p>TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under <a href="../../license.txt" target="_blank">LGPL</a>
by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.</p>
- <p>Copyright &copy; 2003-2007, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p>
+ <p>Copyright &copy; 2003-2008, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p>
<p>For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.</p>
- <div id="buttoncontainer"></div>
+ <div id="buttoncontainer">
+ <a href="http://www.moxiecode.com" target="_blank"><img src="http://tinymce.moxiecode.com/images/gotmoxie.png" alt="Got Moxie?" border="0" /></a>
+ <a href="http://sourceforge.net/projects/tinymce/" target="_blank"><img src="http://sourceforge.net/sflogo.php?group_id=103281" alt="Hosted By Sourceforge" border="0" /></a>
+ <a href="http://www.freshmeat.net/projects/tinymce" target="_blank"><img src="http://tinymce.moxiecode.com/images/fm.gif" alt="Also on freshmeat" border="0" /></a>
+ </div>
</div>
<div id="plugins_panel" class="panel">
<div id="pluginscontainer">
- <h3>{$lang_loaded_plugins}</h3>
+ <h3>{#advanced_dlg.about_loaded}</h3>
<div id="plugintablecontainer">
</div>
@@ -45,7 +49,7 @@
<div class="mceActionPanel">
<div style="float: right">
- <input type="button" id="cancel" name="cancel" value="{$lang_close}" onclick="tinyMCEPopup.close();" />
+ <input type="button" id="cancel" name="cancel" value="{#close}" onclick="tinyMCEPopup.close();" />
</div>
</div>
</body>
diff --git a/program/js/tiny_mce/themes/advanced/anchor.htm b/program/js/tiny_mce/themes/advanced/anchor.htm
index 53d7969f0..9e4c0b91a 100644
--- a/program/js/tiny_mce/themes/advanced/anchor.htm
+++ b/program/js/tiny_mce/themes/advanced/anchor.htm
@@ -1,33 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title>{$lang_insert_anchor_title}</title>
- <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
- <script language="javascript" type="text/javascript" src="jscripts/anchor.js"></script>
+ <title>{#advanced_dlg.anchor_title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="js/anchor.js"></script>
<base target="_self" />
</head>
-<body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
-<form onsubmit="insertAnchor();return false;" action="#">
-
+<body style="display: none">
+<form onsubmit="AnchorDialog.update();return false;" action="#">
<table border="0" cellpadding="4" cellspacing="0">
<tr>
- <td colspan="2" class="title">{$lang_insert_anchor_title}</td>
+ <td colspan="2" class="title">{#advanced_dlg.anchor_title}</td>
</tr>
<tr>
- <td nowrap="nowrap">{$lang_insert_anchor_name}:</td>
- <td><input name="anchorName" type="text" id="anchorName" value="" style="width: 200px" /></td>
+ <td nowrap="nowrap">{#advanced_dlg.anchor_name}:</td>
+ <td><input name="anchorName" type="text" class="mceFocus" id="anchorName" value="" style="width: 200px" /></td>
</tr>
</table>
<div class="mceActionPanel">
<div style="float: left">
- <input type="button" id="insert" name="insert" value="{$lang_update}" onclick="insertAnchor();" />
+ <input type="submit" id="insert" name="insert" value="{#update}" />
</div>
<div style="float: right">
- <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</div>
-
</form>
</body>
</html>
diff --git a/program/js/tiny_mce/themes/advanced/charmap.htm b/program/js/tiny_mce/themes/advanced/charmap.htm
index 9aed1d4b5..e4c734484 100644
--- a/program/js/tiny_mce/themes/advanced/charmap.htm
+++ b/program/js/tiny_mce/themes/advanced/charmap.htm
@@ -1,27 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title>{$lang_theme_charmap_title}</title>
+ <title>{#advanced_dlg.charmap_title}</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
- <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
- <script language="javascript" type="text/javascript" src="jscripts/charmap.js"></script>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="js/charmap.js"></script>
<base target="_self" />
</head>
-<body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
+<body id="charmap" style="display:none">
<table align="center" border="0" cellspacing="0" cellpadding="2">
<tr>
- <td colspan="2" class="title">{$lang_theme_charmap_title}</td>
+ <td colspan="2" class="title">{#advanced_dlg.charmap_title}</td>
</tr>
<tr>
- <td rowspan="2" align="left" valign="top">
- <script language="javascript" type="text/javascript">renderCharMapHTML();</script>
+ <td id="charmapView" rowspan="2" align="left" valign="top">
+ <!-- Chars will be rendered here -->
</td>
<td width="100" align="center" valign="top">
- <table border="0" cellpadding="0" cellspacing="0" width="100" style="height: 100px">
+ <table border="0" cellpadding="0" cellspacing="0" width="100" style="height:100px">
<tr>
- <td class="charmapOver" style="font-size: 40px; height:80px;" id="codeV">&nbsp;</td>
+ <td id="codeV">&nbsp;</td>
</tr>
<tr>
- <td style="font-size: 10px; font-family: Arial, Helvetica, sans-serif; text-align:center;" id="codeN">&nbsp;</td>
+ <td id="codeN">&nbsp;</td>
</tr>
</table>
</td>
diff --git a/program/js/tiny_mce/themes/advanced/color_picker.htm b/program/js/tiny_mce/themes/advanced/color_picker.htm
index 668d744a3..a8f297c60 100644
--- a/program/js/tiny_mce/themes/advanced/color_picker.htm
+++ b/program/js/tiny_mce/themes/advanced/color_picker.htm
@@ -1,27 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title>{$lang_theme_colorpicker_title}</title>
- <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
- <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
- <script language="javascript" type="text/javascript" src="jscripts/color_picker.js"></script>
- <link href="css/colorpicker.css" rel="stylesheet" type="text/css" />
+ <title>{#advanced_dlg.colorpicker_title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="js/color_picker.js"></script>
<base target="_self" />
</head>
-<body onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
+<body id="colorpicker" style="display: none">
+<form onsubmit="insertAction();return false" action="#">
<div class="tabs">
<ul>
- <li id="picker_tab" class="current"><span><a href="javascript:mcTabs.displayTab('picker_tab','picker_panel');" onmousedown="return false;">{$lang_color_picker_tab}</a></span></li>
- <li id="rgb_tab"><span><a href="#" onclick="generateWebColors();mcTabs.displayTab('rgb_tab','rgb_panel');" onmousedown="return false;">{$lang_web_colors_tab}</a></span></li>
- <li id="named_tab"><span><a href="#" onclick="generateNamedColors();javascript:mcTabs.displayTab('named_tab','named_panel');" onmousedown="return false;">{$lang_named_colors_tab}</a></span></li>
+ <li id="picker_tab" class="current"><span><a href="javascript:mcTabs.displayTab('picker_tab','picker_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_picker_tab}</a></span></li>
+ <li id="rgb_tab"><span><a href="javascript:;" onclick="generateWebColors();mcTabs.displayTab('rgb_tab','rgb_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_palette_tab}</a></span></li>
+ <li id="named_tab"><span><a href="javascript:;" onclick="generateNamedColors();javascript:mcTabs.displayTab('named_tab','named_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_named_tab}</a></span></li>
</ul>
</div>
<div class="panel_wrapper">
<div id="picker_panel" class="panel current">
<fieldset>
- <legend>{$lang_color_picker}</legend>
+ <legend>{#advanced_dlg.colorpicker_picker_title}</legend>
<div id="picker">
- <img id="colorpicker" src="images/colors.jpg" onclick="computeColor(event)" onmousedown="isMouseDown = true;return false;" onmouseup="isMouseDown = false;" onmousemove="if (isMouseDown && isMouseOver) computeColor(event); return false;" onmouseover="isMouseOver=true;" onmouseout="isMouseOver=false;" />
+ <img id="colors" src="img/colorpicker.jpg" onclick="computeColor(event)" onmousedown="isMouseDown = true;return false;" onmouseup="isMouseDown = false;" onmousemove="if (isMouseDown && isMouseOver) computeColor(event); return false;" onmouseover="isMouseOver=true;" onmouseout="isMouseOver=false;" />
<div id="light">
<!-- Will be filled with divs -->
@@ -34,7 +35,7 @@
<div id="rgb_panel" class="panel">
<fieldset>
- <legend>{$lang_web_colors}</legend>
+ <legend>{#advanced_dlg.colorpicker_palette_title}</legend>
<div id="webcolors">
<!-- Gets filled with web safe colors-->
</div>
@@ -45,7 +46,7 @@
<div id="named_panel" class="panel">
<fieldset>
- <legend>{$lang_named_colors}</legend>
+ <legend>{#advanced_dlg.colorpicker_named_title}</legend>
<div id="namedcolors">
<!-- Gets filled with named colors-->
</div>
@@ -53,7 +54,7 @@
<br style="clear: both" />
<div id="colornamecontainer">
- {$lang_color_name} <span id="colorname"></span>
+ {#advanced_dlg.colorpicker_name} <span id="colorname"></span>
</div>
</fieldset>
</div>
@@ -61,14 +62,15 @@
<div class="mceActionPanel">
<div style="float: left">
- <input type="button" id="insert" name="insert" value="{$lang_theme_colorpicker_apply}" onclick="insertAction();" />
+ <input type="submit" id="insert" name="insert" value="{#apply}" />
</div>
<div id="preview"></div>
<div id="previewblock">
- <label for="color">{$lang_color}</label> <input id="color" type="text" size="8" maxlength="8" class="text" />
+ <label for="color">{#advanced_dlg.colorpicker_color}</label> <input id="color" type="text" size="8" maxlength="8" class="text mceFocus" />
</div>
</div>
+</form>
</body>
</html>
diff --git a/program/js/tiny_mce/themes/advanced/css/editor_content.css b/program/js/tiny_mce/themes/advanced/css/editor_content.css
deleted file mode 100644
index 182e79121..000000000
--- a/program/js/tiny_mce/themes/advanced/css/editor_content.css
+++ /dev/null
@@ -1,58 +0,0 @@
-/* This file contains the CSS data for the editable area(iframe) of TinyMCE */
-/* You can extend this CSS by adding your own CSS file with the the content_css option */
-
-body, td, pre {
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 10px;
-}
-
-body {
- background-color: #FFFFFF;
-}
-
-.mceVisualAid {
- border: 1px dashed #BBBBBB !important;
-}
-
-div.mceVisualAid {
- background-image:url('../images/spacer.gif');
- visibility: visible !important;
-}
-
-.mceItemAnchor {
- width: 12px;
- line-height: 6px;
- overflow: hidden;
- padding-left: 12px;
- background-image: url('../images/anchor_symbol.gif');
- background-position: bottom;
- background-repeat: no-repeat;
-}
-
-/* Important is needed in Gecko browsers inorder to style links */
-/*
-a {
- color: green !important;
-}
-*/
-
-/* Style selection range colors in Gecko browsers */
-/*
-::-moz-selection {
- background-color: red;
- color: green;
-}
-*/
-
-/* MSIE specific */
-
-* html body {
- 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/program/js/tiny_mce/themes/advanced/css/editor_popup.css b/program/js/tiny_mce/themes/advanced/css/editor_popup.css
deleted file mode 100644
index f8d3550ce..000000000
--- a/program/js/tiny_mce/themes/advanced/css/editor_popup.css
+++ /dev/null
@@ -1,331 +0,0 @@
-/* This file contains the CSS data for all popups in TinyMCE */
-
-body {
- background-color: #F0F0EE;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 11px;
- 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;
- margin: 8px;
-}
-
-td {
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 11px;
-}
-
-input {
- background: #FFFFFF;
- border: 1px solid #cccccc;
-}
-
-td, input, select, textarea {
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 10px;
-}
-
-input, select, textarea {
- border: 1px solid #808080;
-}
-
-.input_noborder {
- border: 0;
-}
-
-#insert, .updateButton {
- font-weight: bold;
- width: 90px;
- height: 21px;
- border: 0;
- background-image: url('../images/insert_button_bg.gif');
- cursor: pointer;
-}
-
-#cancel {
- font-weight: bold;
- width: 90px;
- height: 21px;
- border: 0;
- background-image: url('../images/cancel_button_bg.gif');
- cursor: pointer;
-}
-
-/* Mozilla only style */
-html>body #insert, html>body #cancel {
- padding-bottom: 2px;
-}
-
-.title {
- font-size: 12px;
- font-weight: bold;
- color: #2B6FB6;
-}
-
-table.charmap {
- border-style: solid;
- border-width: 1px;
- border-color: #AAAAAA;
-}
-
-td.charmap, td.charmapOver {
- color: #000000;
- border-color: #AAAAAA;
- border-style: solid;
- border-width: 1px;
- text-align: center;
- font-size: 12px;
-}
-
-td.charmapOver {
- background-color: #CCCCCC;
- cursor: default;
-}
-
-a.charmap {
- color: #000000;
- text-decoration: none
-}
-
-.wordWrapCode {
- vertical-align: middle;
- border: 1px none #000000;
- background-color: transparent;
-}
-
-input.radio {
- border: 1px none #000000;
- background-color: transparent;
- vertical-align: middle;
-}
-
-input.checkbox {
- border: 1px none #000000;
- background-color: transparent;
- vertical-align: middle;
-}
-
-.mceButtonNormal, .mceButtonOver, .mceButtonDown, .mceSeparator, .mceButtonDisabled, .mceButtonSelected {
- margin-left: 1px;
-}
-
-.mceButtonNormal {
- border-top: 1px solid;
- border-left: 1px solid;
- border-bottom: 1px solid;
- border-right: 1px solid;
- border-color: #F0F0EE;
- cursor: default;
-}
-
-.mceButtonOver {
- border: 1px solid #0A246A;
- cursor: default;
- background-color: #B6BDD2;
-}
-
-.mceButtonDown {
- cursor: default;
- border: 1px solid #0A246A;
- background-color: #8592B5;
-}
-
-.mceButtonDisabled {
- filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
- -moz-opacity:0.3;
- opacity: 0.3;
- border-top: 1px solid;
- border-left: 1px solid;
- border-bottom: 1px solid;
- border-right: 1px solid;
- border-color: #F0F0EE;
- cursor: default;
-}
-
-.mceActionPanel {
- margin-top: 5px;
-}
-
-/* Tabs classes */
-
-.tabs {
- float: left;
- width: 100%;
- line-height: normal;
- background-image: url("../images/xp/tabs_bg.gif");
-}
-
-.tabs ul {
- margin: 0;
- padding: 0 0 0;
- list-style: none;
-}
-
-.tabs li {
- float: left;
- background: url("../images/xp/tab_bg.gif") no-repeat left top;
- margin: 0;
- margin-left: 0;
- margin-right: 2px;
- padding: 0 0 0 10px;
- line-height: 18px;
-}
-
-.tabs li.current {
- background: url("../images/xp/tab_sel_bg.gif") no-repeat left top;
- margin-right: 2px;
-}
-
-.tabs span {
- float: left;
- display: block;
- background: url("../images/xp/tab_end.gif") no-repeat right top;
- padding: 0px 10px 0 0;
-}
-
-.tabs .current span {
- background: url("../images/xp/tab_sel_end.gif") no-repeat right top;
-}
-
-.tabs a {
- text-decoration: none;
- font-family: Verdana, Arial;
- font-size: 10px;
-}
-
-.tabs a:link, .tabs a:visited, .tabs a:hover {
- color: black;
-}
-
-.tabs a:hover {
-}
-
-.tabs .current {
-}
-
-.tabs .current a, .tabs .current a:link, .tabs .current a:visited {
-}
-
-.panel_wrapper div.panel {
- display: none;
-}
-
-.panel_wrapper div.current {
- display: block;
- width: 100%;
- height: 300px;
- overflow: visible; /* Should be auto but that breaks Safari */
-}
-
-.panel_wrapper {
- border: 1px solid #919B9C;
- border-top: 0px;
- padding: 10px;
- padding-top: 5px;
- clear: both;
- background-color: white;
-}
-
-fieldset {
- border: 1px solid #919B9C;
- font-family: Verdana, Arial;
- font-size: 10px;
- padding: 0;
- margin: 0;
- padding: 4px;
-}
-
-legend {
- color: #2B6FB6;
- font-weight: bold;
-}
-
-.properties {
- width: 100%;
-}
-
-.properties .column1 {
-}
-
-.properties .column2 {
- text-align: left;
-}
-
-a:link, a:visited {
- color: black;
-}
-
-a:hover {
- color: #2B6FB6;
-}
-
-#plugintable thead {
- font-weight: bold;
- background-color: #DDDDDD;
-}
-
-#plugintable, #about #plugintable td {
- border: 1px solid #919B9C;
-}
-
-#plugintable {
- width: 99%;
- margin-top: 10px;
-}
-
-#pluginscontainer {
- height: 290px;
- overflow: auto;
-}
-
-/* MSIE Specific styles */
-
-* html .panel_wrapper {
- width: 100%;
-}
-
-.column {
- float: left;
-}
-
-h1, h2, h3, h4 {
- color: #2B6FB6;
- margin: 0;
- padding: 0;
- padding-top: 5px;
-}
-
-h3 {
- font-size: 14px;
-}
-
-#link .panel_wrapper, #link div.current {
- height: 125px;
-}
-
-#image .panel_wrapper, #image div.current {
- height: 190px;
-}
-
-label.msg { display: none; }
-label.invalid { color: #EE0000; display: inline; }
-input.invalid { border: 1px solid #EE0000; }
-
-/* Disables the advanced tab in the table plugin. */
-/*
-#table #advanced_tab {
- display: none;
-}
-*/
-
-/* Disables the border input field and label in the table plugin. */
-/*
-#table #border, #table #borderlabel {
- display: none;
-}
-*/
diff --git a/program/js/tiny_mce/themes/advanced/docs/en/about.htm b/program/js/tiny_mce/themes/advanced/docs/en/about.htm
deleted file mode 100644
index a6957a651..000000000
--- a/program/js/tiny_mce/themes/advanced/docs/en/about.htm
+++ /dev/null
@@ -1,31 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<HEAD>
-<TITLE>About TinyMCE</TITLE>
-<link href="style.css" rel="stylesheet" type="text/css">
-</HEAD>
-
-<BODY>
-
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
- <tr>
- <td><span class="title">About TinyMCE</span></td>
- <td align="right"><a href="index.htm"><acronym title="Table of contents">TOC</acronym></a></td>
- </tr>
-</table>
-<hr noshade>
-<br>
-TinyMCE is a small WYSIWYG editor control for web browsers such as MSIE or Mozilla
-that enables you to edit HTML contents in a more user friendly way. It has common
-features that are found in most word processors and should not be difficult to
-use.<br>
-<br>
-<hr noshade>
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
- <tr>
- <td>Go to: <a href="index.htm">Table of contents</a></td>
- <td align="right"><a href="#">Top</a></td>
- </tr>
-</table>
-<br>
-</BODY>
-</HTML>
diff --git a/program/js/tiny_mce/themes/advanced/docs/en/common_buttons.htm b/program/js/tiny_mce/themes/advanced/docs/en/common_buttons.htm
deleted file mode 100644
index 518b28551..000000000
--- a/program/js/tiny_mce/themes/advanced/docs/en/common_buttons.htm
+++ /dev/null
@@ -1,162 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<HEAD>
-<TITLE>Common buttons</TITLE>
-<link href="style.css" rel="stylesheet" type="text/css">
-</HEAD>
-
-<BODY>
-
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
- <tr>
- <td><span class="title">Common buttons</span></td>
- <td align="right"><a href="index.htm"><acronym title="Table of contents">TOC</acronym></a></td>
- </tr>
-</table>
-<hr noshade>
-<br>
-Below is a short description about each button.
-<br>
-<br>
-<table border="1" cellpadding="3" cellspacing="0">
- <tr>
- <td><img src="../../images/bold.gif" width="20" height="20" alt="Bold text icon" /></td>
- <td>Bold text style (Ctrl+B).</td>
- </tr>
- <tr>
- <td><img src="../../images/italic.gif" width="20" height="20" alt="Italic text icon" /></td>
- <td>Italic text style (Ctrl+I).</td>
- </tr>
- <tr>
- <td><img src="../../images/underline.gif" width="20" height="20" alt="Underline text icon." /></td>
- <td>Underline text style (Ctrl+U).</td>
- </tr>
- <tr>
- <td><img src="../../images/strikethrough.gif" width="20" height="20" alt="Strikethrough text icon." /></td>
- <td>Strikethrough text style.</td>
- </tr>
- <tr>
- <td><img src="../../images/justifyleft.gif" width="20" height="20" alt="Align left icon." /></td>
- <td>Align left.</td>
- </tr>
- <tr>
- <td><img src="../../images/justifycenter.gif" width="20" height="20" alt="Align center icon." /></td>
- <td>Align center.</td>
- </tr>
- <tr>
- <td><img src="../../images/justifyright.gif" width="20" height="20" alt="Align right icon." /></td>
- <td>Align right.</td>
- </tr>
- <tr>
- <td><img src="../../images/justifyfull.gif" width="20" height="20" alt="Align full icon." /></td>
- <td>Align full.</td>
- </tr>
- <tr>
- <td><img src="../../images/bullist.gif" width="20" height="20" alt="Unordered list/bullet list icon." /></td>
- <td>Unordered list/bullet list.</td>
- </tr>
- <tr>
- <td><img src="../../images/numlist.gif" width="20" height="20" alt="Ordered list/numbered list icon." /></td>
- <td>Ordered list/numbered list</td>
- </tr>
- <tr>
- <td><img src="../../images/outdent.gif" width="20" height="20" alt="Outdent/decrease indentation icon." /></td>
- <td>Outdent/decrease indentation.</td>
- </tr>
- <tr>
- <td><img src="../../images/indent.gif" width="20" height="20" alt="Indent/increase indentation icon." /></td>
- <td>Indent/increase indentation.</td>
- </tr>
- <tr>
- <td><img src="../../images/undo.gif" width="20" height="20" alt="Undo the last operation." /></td>
- <td>Undo the last operation (Ctrl+Z).</td>
- </tr>
- <tr>
- <td><img src="../../images/redo.gif" width="20" height="20" alt="Redo the last operation icon." /></td>
- <td>Redo the last operation (Ctrl+Y).</td>
- </tr>
- <tr>
- <td><img src="../../images/link.gif" width="20" height="20" alt="Insert a new link icon." /></td>
- <td>Insert a new link, read more about this function in the <a href="insert_link_button.htm">Insert
- link section</a>.</td>
- </tr>
- <tr>
- <td><img src="../../images/unlink.gif" width="20" height="20" alt="Unlinks the current selection icon." /></td>
- <td>Unlinks the current selection/removes all selected links.</td>
- </tr>
- <tr>
- <td><img src="../../images/anchor.gif" width="20" height="20" alt="Insert a new anchor icon." /></td>
- <td>Insert a new anchor, read more about this function in the <a href="insert_anchor_button.htm">Insert anchor section.</a></td>
- </tr>
- <tr>
- <td><img src="../../images/image.gif" width="20" height="20" alt="Insert a new image icon." /></td>
- <td>Insert a new image, read more about this function in the <a href="insert_image_button.htm">Insert
- image section</a>.</td>
- </tr>
- <tr>
- <td><img src="../../images/cleanup.gif" width="20" height="20" alt="Cleanup code icon." /></td>
- <td>Cleanup code/Removes unwanted formating. This function is useful when
- you copy contents from for example a office product.</td>
- </tr>
- <tr>
- <td><img src="../../images/help.gif" width="20" height="20" alt="Show help icon." /></td>
- <td>Shows this help window.</td>
- </tr>
- <tr>
- <td><img src="../../images/code.gif" width="20" height="20" alt="Source code editor icon." /></td>
- <td>Opens HTML source code editor. </td>
- </tr>
- <tr>
- <td><img src="../../../../plugins/table/images/table.gif" width="20" height="20" alt="Insert table icon." /></td>
- <td>Inserts a new table at the current location. </td>
- </tr>
- <tr>
- <td><img src="../../../../plugins/table/images/table_insert_row_before.gif" width="20" height="20" alt="Adds a row above icon." /></td>
- <td>Adds a row above the current one. </td>
- </tr>
- <tr>
- <td><img src="../../../../plugins/table/images/table_insert_row_after.gif" width="20" height="20" alt="Adds a row under icon." /></td>
- <td>Adds a row under the current one. </td>
- </tr>
- <tr>
- <td><img src="../../../../plugins/table/images/table_delete_row.gif" width="20" height="20" alt="Remove row icon." /></td>
- <td>Removes the row. </td>
- </tr>
- <tr>
- <td><img src="../../../../plugins/table/images/table_insert_col_before.gif" width="20" height="20" alt="Add column before icon." /></td>
- <td>Adds a column before the current one.</td>
- </tr>
- <tr>
- <td><img src="../../../../plugins/table/images/table_insert_col_after.gif" width="20" height="20" alt="Add column after icon." /></td>
- <td>Adds a column after the current one.</td>
- </tr>
- <tr>
- <td><img src="../../../../plugins/table/images/table_delete_col.gif" width="20" height="20" alt="Remove column icon." /></td>
- <td>Removes the current column.</td>
- </tr>
- <tr>
- <td><img src="../../images/hr.gif" width="20" height="20" alt="Insert horizontal ruler icon." /></td>
- <td>Inserts a new horizontal ruler </td>
- </tr>
- <tr>
- <td><img src="../../images/removeformat.gif" width="20" height="20" alt="Remove formatting icon." /></td>
- <td>Removes formatting from the selection. </td>
- </tr>
- <tr>
- <td><img src="../../images/sub.gif" width="20" height="20" alt="Subscript icon." /></td>
- <td>Makes the selection to be subscript. </td>
- </tr>
- <tr>
- <td><img src="../../images/sup.gif" width="20" height="20" alt="Superscript icon." /></td>
- <td>Makes the selection to be superscripted. </td>
- </tr>
-</table>
-<br>
-<hr noshade="noshade" />
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
- <tr>
- <td>Go to: <a href="index.htm">Table of contents</a></td>
- <td align="right"><a href="#">Top</a></td>
- </tr>
-</table>
-</BODY>
-</HTML>
diff --git a/program/js/tiny_mce/themes/advanced/docs/en/create_accessible_content.htm b/program/js/tiny_mce/themes/advanced/docs/en/create_accessible_content.htm
deleted file mode 100644
index f4070a31d..000000000
--- a/program/js/tiny_mce/themes/advanced/docs/en/create_accessible_content.htm
+++ /dev/null
@@ -1,45 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<HEAD>
-<TITLE>Insert table button</TITLE>
-<link href="style.css" rel="stylesheet" type="text/css">
-</HEAD>
-
-<BODY>
-
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
- <tr>
- <td><span class="title">Create accessible content</span></td>
- <td align="right"><a href="index.htm"><acronym title="Table of contents">TOC</acronym></a></td>
- </tr>
-</table>
-<hr noshade>
-<p>TinyMCE can create HTML content that will be accessible to all users, including those with disabilities using assistive technologies, as well as those using text-based browsers, or those browsing the Web with images turned off. </p>
-
-<p><strong>Things you can do to make your content accessible:</strong></p>
-<ol>
-<li><strong>Include an Image Description:</strong> Blind users, or others who are unable to view images, will rely on the Image Description (or Alt text) to take the place of the image. If an image contains no meaning, such as a decoration or a spacer image, leave the Image Description empty. TinyMCE will then insert an empty Alt text attribute that will force assistive technologies to ignore the image. <br /><br /></li>
-
-<li> <strong>Add Scope to data table header cells:</strong> In the table cell editor dialog window, choose a Scope when creating Header cells so the column or row label in that cell becomes explicitely associated with its data cells. Table cell headers will then be announced with each data cell, making it easier for blind users using a screen reader to understand what the content of each cell represents. <br /><br /></li>
-
-<li><strong> Structure content with properly nested headings:</strong> In the format selection menu choose Heading 1 to Heading 6 to represent headings in your content, rather than using other font formating options. Blind users using a screen reader can then extract the headings from the page to generate a summary of the content it contains, and use those headings to navigate quickly to subsections within the page.<br /><br /></li>
-
-<li><strong> Include alternate content:</strong> Create an alternate page for non-HTML content such as Flash, Java applets, or embedded movies. This might be a static image, with a description of the image, and a description of the content that would have appeared in its place. An alternate HTML page could also be created, and a link to it included next to the non-HTML object. This will ensure that the content will be accessible to users of assistive technologies that can not view or play the content, and ensure the content will be available to those who do not have the appropriate plugin or helper application installed.<br /><br /></li>
-
-<li><strong> Check accessbility: </strong> When the AChecker plugin is installed with TinyMCE, click on the Check Accessibility button to generate a report of potential accessibility problems.<br /><br /></li>
-
-</ol>
-
-<p>See the <a href="http://checker.atrc.utoronto.ca" target="_new">AChecker Web Site</a> for further details about creating content that will be accessible to all users.<br />
-</p>
-
-<hr noshade>
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
- <tr>
- <td>Go to: <a href="index.htm">Table of contents</a></td>
- <td align="right"><a href="#">Top</a></td>
- </tr>
-</table>
-
-<br>
-</BODY>
-</HTML>
diff --git a/program/js/tiny_mce/themes/advanced/docs/en/images/insert_anchor_window.gif b/program/js/tiny_mce/themes/advanced/docs/en/images/insert_anchor_window.gif
deleted file mode 100644
index 5b5f528dd..000000000
--- a/program/js/tiny_mce/themes/advanced/docs/en/images/insert_anchor_window.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/docs/en/images/insert_image_window.gif b/program/js/tiny_mce/themes/advanced/docs/en/images/insert_image_window.gif
deleted file mode 100644
index cdc617eab..000000000
--- a/program/js/tiny_mce/themes/advanced/docs/en/images/insert_image_window.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/docs/en/images/insert_link_window.gif b/program/js/tiny_mce/themes/advanced/docs/en/images/insert_link_window.gif
deleted file mode 100644
index 7bad7583a..000000000
--- a/program/js/tiny_mce/themes/advanced/docs/en/images/insert_link_window.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/docs/en/images/insert_table_window.gif b/program/js/tiny_mce/themes/advanced/docs/en/images/insert_table_window.gif
deleted file mode 100644
index 6a032c5ae..000000000
--- a/program/js/tiny_mce/themes/advanced/docs/en/images/insert_table_window.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/docs/en/index.htm b/program/js/tiny_mce/themes/advanced/docs/en/index.htm
deleted file mode 100644
index 9810a93b0..000000000
--- a/program/js/tiny_mce/themes/advanced/docs/en/index.htm
+++ /dev/null
@@ -1,27 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<HEAD>
-<TITLE>Help Index</TITLE>
-<link href="style.css" rel="stylesheet" type="text/css">
-</HEAD>
-<BODY onload="window.focus();">
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
- <tr>
- <td><span class="title">Table of contents</span></td>
- <td align="right">&nbsp;</td>
- </tr>
-</table>
-<hr noshade>
-<br>
-Click the links below to go to the different help sections.
-<ul class="toc_ul">
- <li class="toc_li"><a href="about.htm">About TinyMCE</a></li>
- <li class="toc_li"><a href="common_buttons.htm">Common buttons</a></li>
- <li class="toc_li"><a href="insert_image_button.htm">Insert image button</a></li>
- <li class="toc_li"><a href="insert_link_button.htm">Insert link button</a></li>
- <li class="toc_li"><a href="insert_anchor_button.htm">Insert anchor button</a></li>
- <li class="toc_li"><a href="insert_table_button.htm">Insert table button</a></li>
- <li class="toc_li"><a href="create_accessible_content.htm">Create accessible content</a></li>
-</ul>
-<hr noshade>
-</BODY>
-</HTML>
diff --git a/program/js/tiny_mce/themes/advanced/docs/en/insert_anchor_button.htm b/program/js/tiny_mce/themes/advanced/docs/en/insert_anchor_button.htm
deleted file mode 100644
index 332cbc687..000000000
--- a/program/js/tiny_mce/themes/advanced/docs/en/insert_anchor_button.htm
+++ /dev/null
@@ -1,32 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<HEAD>
-<TITLE>Insert anchor button</TITLE>
-<link href="style.css" rel="stylesheet" type="text/css">
-</HEAD>
-
-<BODY>
-
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
- <tr>
- <td><span class="title">Insert anchor button</span></td>
- <td align="right"><a href="index.htm"><acronym title="Table of contents">TOC</acronym></a></td>
- </tr>
-</table>
-<hr noshade>
-<br>
-This button opens a new window with the insert/edit anchor function.<br>
-<br>
-<img src="images/insert_anchor_window.gif" width="330" height="139" alt="Anchor dialog/window" /><br>
-<br>
-There are one field in this window, this is where you enter the name of you anchor point. Remember the anchor name needs to be unique. <br>
-<br>
-<hr noshade>
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
- <tr>
- <td>Go to: <a href="index.htm">Table of contents</a></td>
- <td align="right"><a href="#">Top</a></td>
- </tr>
-</table>
-<br>
-</BODY>
-</HTML>
diff --git a/program/js/tiny_mce/themes/advanced/docs/en/insert_image_button.htm b/program/js/tiny_mce/themes/advanced/docs/en/insert_image_button.htm
deleted file mode 100644
index 1529648d5..000000000
--- a/program/js/tiny_mce/themes/advanced/docs/en/insert_image_button.htm
+++ /dev/null
@@ -1,65 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<HEAD>
-<TITLE>Insert image button</TITLE>
-<link href="style.css" rel="stylesheet" type="text/css">
-</HEAD>
-
-<BODY>
-
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
- <tr>
- <td><span class="title">Insert image button</span></td>
- <td align="right"><a href="index.htm"><acronym title="Table of contents">TOC</acronym></a></td>
- </tr>
-</table>
-<hr noshade>
-<br>
-The insert image button opens the window shown below.<br>
-<br>
-<img src="images/insert_image_window.gif" alt="Insert image dialog/window" /><br>
-<br>
-You simply enter a URL to the image you want to link to and enter a image description,
-this is then displayed as an alternative text descripton of the image on the page.<br>
-<br>
-<strong>Field descriptions:</strong><br>
-<table border="1" cellspacing="0">
- <tr>
- <td width="150"><strong>Image URL </strong></td>
- <td>URL/path to the image.</td>
- </tr>
- <tr>
- <td width="150"><strong>Image description </strong></td>
- <td>Alternative description of image contents.</td>
- </tr>
- <tr>
- <td><strong>Dimentions</strong></td>
- <td>Image width/height. </td>
- </tr>
- <tr>
- <td><strong>Alignment</strong></td>
- <td>Image alignment, useful when wrapping text around images.</td>
- </tr>
- <tr>
- <td><strong>Border</strong></td>
- <td>Border thickness. </td>
- </tr>
- <tr>
- <td><strong>VSpace</strong></td>
- <td>Vertical space, useful when wrapping text around images.</td>
- </tr>
- <tr>
- <td><strong>HSpace</strong></td>
- <td>Horizontal space, useful when wrapping text around images.</td>
- </tr>
-</table>
-<br>
-<hr noshade>
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
- <tr>
- <td>Go to: <a href="index.htm">Table of contents</a></td>
- <td align="right"><a href="#">Top</a></td>
- </tr>
-</table>
-<br>
-</BODY>
-</HTML>
diff --git a/program/js/tiny_mce/themes/advanced/docs/en/insert_link_button.htm b/program/js/tiny_mce/themes/advanced/docs/en/insert_link_button.htm
deleted file mode 100644
index 4f6445076..000000000
--- a/program/js/tiny_mce/themes/advanced/docs/en/insert_link_button.htm
+++ /dev/null
@@ -1,33 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<HEAD>
-<TITLE>Insert link button</TITLE>
-<link href="style.css" rel="stylesheet" type="text/css">
-</HEAD>
-
-<BODY>
-
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
- <tr>
- <td><span class="title">Insert link button</span></td>
- <td align="right"><a href="index.htm"><acronym title="Table of contents">TOC</acronym></a></td>
- </tr>
-</table>
-<hr noshade>
-<br>
-This button opens a new window with the insert/edit link function.<br>
-<br>
-<img src="images/insert_link_window.gif" width="330" height="159" alt="Insert link dialog/window" /><br>
-<br>
-There are two fields in this window the first one &quot;Link URL&quot; is the
-URL of the link. The target enables you to select how the link is to be opened.<br>
-<br>
-<hr noshade>
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
- <tr>
- <td>Go to: <a href="index.htm">Table of contents</a></td>
- <td align="right"><a href="#">Top</a></td>
- </tr>
-</table>
-<br>
-</BODY>
-</HTML>
diff --git a/program/js/tiny_mce/themes/advanced/docs/en/insert_table_button.htm b/program/js/tiny_mce/themes/advanced/docs/en/insert_table_button.htm
deleted file mode 100644
index f352a0516..000000000
--- a/program/js/tiny_mce/themes/advanced/docs/en/insert_table_button.htm
+++ /dev/null
@@ -1,71 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<HEAD>
-<TITLE>Insert table button</TITLE>
-<link href="style.css" rel="stylesheet" type="text/css">
-</HEAD>
-
-<BODY>
-
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pageheader">
- <tr>
- <td><span class="title">Insert table button</span></td>
- <td align="right"><a href="index.htm"><acronym title="Table of contents">TOC</acronym></a></td>
- </tr>
-</table>
-<hr noshade>
-<br>
-The insert table button opens the window shown below. This action enables you to create tables. <br>
-<br>
-<img src="images/insert_table_window.gif" width="340" height="229" alt="Image of table window" /><br>
-<br>
-<strong>Field descriptions:</strong><br>
-<table border="1" cellspacing="0">
- <tr>
- <td width="150"><strong>Columns</strong></td>
- <td>Number of columns in the table. </td>
- </tr>
- <tr>
- <td width="150"><strong>Rows</strong></td>
- <td>Number of rows in the new table.</td>
- </tr>
- <tr>
- <td><strong>Cellpadding</strong></td>
- <td>Cellpadding of the table . </td>
- </tr>
- <tr>
- <td><strong>Cellspacing</strong></td>
- <td>Cellspacing of the table .</td>
- </tr>
- <tr>
- <td><strong>Alignment</strong></td>
- <td>Table alignment . </td>
- </tr>
- <tr>
- <td><strong>Border</strong></td>
- <td>Border thinkness of table.</td>
- </tr>
- <tr>
- <td><strong>Width</strong></td>
- <td>Width in pixels of table .</td>
- </tr>
- <tr>
- <td><strong>Height</strong></td>
- <td>Height in pixels of table.</td>
- </tr>
- <tr>
- <td><strong>Class</strong></td>
- <td>Style or CSS class of table.</td>
- </tr>
-</table>
-<br>
-<br>
-<hr noshade>
-<table width="100%" border="0" cellpadding="1" cellspacing="3" class="pagefooter">
- <tr>
- <td>Go to: <a href="index.htm">Table of contents</a></td>
- <td align="right"><a href="#">Top</a></td>
- </tr>
-</table>
-<br>
-</BODY>
-</HTML>
diff --git a/program/js/tiny_mce/themes/advanced/docs/en/style.css b/program/js/tiny_mce/themes/advanced/docs/en/style.css
deleted file mode 100644
index ebc05380e..000000000
--- a/program/js/tiny_mce/themes/advanced/docs/en/style.css
+++ /dev/null
@@ -1,28 +0,0 @@
-body { background-color: #FFFFFF; }
-body, td, .content { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 12px; }
-.title { font-family: Verdana, Arial, helvetica, sans-serif; font-size: 16px; font-weight: bold; }
-.subtitle { font-size: 12px; font-weight: bold; }
-
-.toc_ul, .toc_li { margin-left: 8px; line-height: 16px; }
-.step_ol, .step_li { margin-left: 11px; line-height: 16px; }
-img { border: #000000 solid 1px; }
-
-a:visited { color: #666666; text-decoration: underline; }
-a:active { color: #666666; text-decoration: underline; }
-a:hover { color: #666666; text-decoration: underline; }
-a { color: #666666; text-decoration: underline; }
-
-.pageheader { border: #E0E0E0 solid 1px; }
-.pagefooter { border: #E0E0E0 solid 1px; }
-.sample { background-color: #FFFFFF; border: #000000 solid 1px; }
-.samplecontent { font-size: 10px; }
-
-.code { background-color: #FFFFFF; border: #000000 solid 1px; }
-.codecontent { font-size: 10px; }
-.codecontent a:visited { color: #666666; text-decoration: none; font-weight: bold }
-.codecontent a:active { color: #666666; text-decoration: none; font-weight: bold }
-.codecontent a:hover { color: #666666; text-decoration: none; font-weight: bold }
-.codecontent a { color: #666666; text-decoration: none; font-weight: bold }
-
-hr { height: 1px; }
-
diff --git a/program/js/tiny_mce/themes/advanced/editor_template.js b/program/js/tiny_mce/themes/advanced/editor_template.js
index 7697f1945..ccc2a549b 100644
--- a/program/js/tiny_mce/themes/advanced/editor_template.js
+++ b/program/js/tiny_mce/themes/advanced/editor_template.js
@@ -1 +1 @@
-tinyMCE.importThemeLanguagePack('advanced');var TinyMCE_AdvancedTheme={_defColors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",_autoImportCSSClasses:true,_resizer:{},_buttons:[['bold','{$lang_bold_img}','lang_bold_desc','Bold'],['italic','{$lang_italic_img}','lang_italic_desc','Italic'],['underline','{$lang_underline_img}','lang_underline_desc','Underline'],['strikethrough','strikethrough.gif','lang_striketrough_desc','Strikethrough'],['justifyleft','justifyleft.gif','lang_justifyleft_desc','JustifyLeft'],['justifycenter','justifycenter.gif','lang_justifycenter_desc','JustifyCenter'],['justifyright','justifyright.gif','lang_justifyright_desc','JustifyRight'],['justifyfull','justifyfull.gif','lang_justifyfull_desc','JustifyFull'],['bullist','bullist.gif','lang_bullist_desc','InsertUnorderedList'],['numlist','numlist.gif','lang_numlist_desc','InsertOrderedList'],['outdent','outdent.gif','lang_outdent_desc','Outdent'],['indent','indent.gif','lang_indent_desc','Indent'],['cut','cut.gif','lang_cut_desc','Cut'],['copy','copy.gif','lang_copy_desc','Copy'],['paste','paste.gif','lang_paste_desc','Paste'],['undo','undo.gif','lang_undo_desc','Undo'],['redo','redo.gif','lang_redo_desc','Redo'],['link','link.gif','lang_link_desc','mceLink',true],['unlink','unlink.gif','lang_unlink_desc','unlink'],['image','image.gif','lang_image_desc','mceImage',true],['cleanup','cleanup.gif','lang_cleanup_desc','mceCleanup'],['help','help.gif','lang_help_desc','mceHelp'],['code','code.gif','lang_theme_code_desc','mceCodeEditor'],['hr','hr.gif','lang_theme_hr_desc','inserthorizontalrule'],['removeformat','removeformat.gif','lang_theme_removeformat_desc','removeformat'],['sub','sub.gif','lang_theme_sub_desc','subscript'],['sup','sup.gif','lang_theme_sup_desc','superscript'],['forecolor','forecolor.gif','lang_theme_forecolor_desc','forecolor',true],['forecolorpicker','forecolor.gif','lang_theme_forecolor_desc','forecolorpicker',true],['backcolor','backcolor.gif','lang_theme_backcolor_desc','HiliteColor',true],['backcolorpicker','backcolor.gif','lang_theme_backcolor_desc','backcolorpicker',true],['charmap','charmap.gif','lang_theme_charmap_desc','mceCharMap'],['visualaid','visualaid.gif','lang_theme_visualaid_desc','mceToggleVisualAid'],['anchor','anchor.gif','lang_theme_anchor_desc','mceInsertAnchor'],['newdocument','newdocument.gif','lang_newdocument_desc','mceNewDocument']],_buttonMap:'anchor,backcolor,bold,bullist,charmap,cleanup,code,copy,cut,forecolor,help,hr,image,indent,italic,justifycenter,justifyfull,justifyleft,justifyright,link,newdocument,numlist,outdent,paste,redo,removeformat,strikethrough,sub,sup,underline,undo,unlink,visualaid,advhr,ltr,rtl,emotions,flash,fullpage,fullscreen,iespell,insertdate,inserttime,pastetext,pasteword,selectall,preview,print,save,replace,search,table,cell_props,delete_col,delete_row,col_after,col_before,row_after,row_before,merge_cells,row_props,split_cells,delete_table',getControlHTML:function(button_name){var i,x,but;for(i=0;i<TinyMCE_AdvancedTheme._buttons.length;i++){but=TinyMCE_AdvancedTheme._buttons[i];if(but[0]==button_name&&(button_name=="forecolor"||button_name=="backcolor"))return tinyMCE.getMenuButtonHTML(but[0],but[2],'{$themeurl}/images/'+but[1],but[3]+"Menu",but[3],(but.length>4?but[4]:false),(but.length>5?but[5]:null));if(but[0]==button_name)return tinyMCE.getButtonHTML(but[0],but[2],'{$themeurl}/images/'+but[1],but[3],(but.length>4?but[4]:false),(but.length>5?but[5]:null))}switch(button_name){case"formatselect":var html='<select id="{$editor_id}_formatSelect" name="{$editor_id}_formatSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FormatBlock\',false,this.options[this.selectedIndex].value);" class="mceSelectList">';var formats=tinyMCE.getParam("theme_advanced_blockformats","p,address,pre,h1,h2,h3,h4,h5,h6",true).split(',');var lookup=[['p','{$lang_theme_paragraph}'],['address','{$lang_theme_address}'],['pre','{$lang_theme_pre}'],['h1','{$lang_theme_h1}'],['h2','{$lang_theme_h2}'],['h3','{$lang_theme_h3}'],['h4','{$lang_theme_h4}'],['h5','{$lang_theme_h5}'],['h6','{$lang_theme_h6}'],['div','{$lang_theme_div}'],['blockquote','{$lang_theme_blockquote}'],['code','{$lang_theme_code}'],['dt','{$lang_theme_dt}'],['dd','{$lang_theme_dd}'],['samp','{$lang_theme_samp}']];html+='<option value="">{$lang_theme_block}</option>';for(var i=0;i<formats.length;i++){for(var x=0;x<lookup.length;x++){if(formats[i]==lookup[x][0])html+='<option value="&lt;'+lookup[x][0]+'&gt;">'+lookup[x][1]+'</option>'}}html+='</select>';return html;case"styleselect":return'<select id="{$editor_id}_styleSelect" onmousedown="tinyMCE.themes.advanced._setupCSSClasses(\'{$editor_id}\');" name="{$editor_id}_styleSelect" onfocus="tinyMCE.addSelectAccessibility(event,this,window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSetCSSClass\',false,this.options[this.selectedIndex].value);" class="mceSelectList">{$style_select_options}</select>';case"fontselect":var fontHTML='<select id="{$editor_id}_fontNameSelect" name="{$editor_id}_fontNameSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontName\',false,this.options[this.selectedIndex].value);" class="mceSelectList"><option value="">{$lang_theme_fontdefault}</option>';var iFonts='Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings';var nFonts='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';var fonts=tinyMCE.getParam("theme_advanced_fonts",nFonts).split(';');for(i=0;i<fonts.length;i++){if(fonts[i]!=''){var parts=fonts[i].split('=');fontHTML+='<option value="'+parts[1]+'">'+parts[0]+'</option>'}}fontHTML+='</select>';return fontHTML;case"fontsizeselect":return'<select id="{$editor_id}_fontSizeSelect" name="{$editor_id}_fontSizeSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontSize\',false,this.options[this.selectedIndex].value);" class="mceSelectList">'+'<option value="0">{$lang_theme_font_size}</option>'+'<option value="1">1 (8 pt)</option>'+'<option value="2">2 (10 pt)</option>'+'<option value="3">3 (12 pt)</option>'+'<option value="4">4 (14 pt)</option>'+'<option value="5">5 (18 pt)</option>'+'<option value="6">6 (24 pt)</option>'+'<option value="7">7 (36 pt)</option>'+'</select>';case"|":case"separator":return'<img src="{$themeurl}/images/separator.gif" width="2" height="20" class="mceSeparatorLine" alt="" />';case"spacer":return'<img src="{$themeurl}/images/separator.gif" width="2" height="15" border="0" class="mceSeparatorLine" style="vertical-align: middle" alt="" />';case"rowseparator":return'<br />'}return""},execCommand:function(editor_id,element,command,user_interface,value){switch(command){case'mceHelp':tinyMCE.openWindow({file:'about.htm',width:480,height:380},{tinymce_version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion,tinymce_releasedate:tinyMCE.releaseDate,inline:"yes"});return true;case"mceLink":var inst=tinyMCE.getInstanceById(editor_id);var doc=inst.getDoc();var selectedText="";if(tinyMCE.isMSIE){var rng=doc.selection.createRange();selectedText=rng.text}else selectedText=inst.getSel().toString();if(!tinyMCE.linkElement){if((tinyMCE.selectedElement.nodeName.toLowerCase()!="img")&&(selectedText.length<=0))return true}var href="",target="",title="",onclick="",action="insert",style_class="";if(tinyMCE.selectedElement.nodeName.toLowerCase()=="a")tinyMCE.linkElement=tinyMCE.selectedElement;if(tinyMCE.linkElement!=null&&tinyMCE.getAttrib(tinyMCE.linkElement,'href')=="")tinyMCE.linkElement=null;if(tinyMCE.linkElement){href=tinyMCE.getAttrib(tinyMCE.linkElement,'href');target=tinyMCE.getAttrib(tinyMCE.linkElement,'target');title=tinyMCE.getAttrib(tinyMCE.linkElement,'title');onclick=tinyMCE.getAttrib(tinyMCE.linkElement,'onclick');style_class=tinyMCE.getAttrib(tinyMCE.linkElement,'class');if(onclick=="")onclick=tinyMCE.getAttrib(tinyMCE.linkElement,'onclick');onclick=tinyMCE.cleanupEventStr(onclick);href=eval(tinyMCE.settings['urlconverter_callback']+"(href, tinyMCE.linkElement, true);");mceRealHref=tinyMCE.getAttrib(tinyMCE.linkElement,'mce_href');if(mceRealHref!=""){href=mceRealHref;if(tinyMCE.getParam('convert_urls'))href=eval(tinyMCE.settings['urlconverter_callback']+"(href, tinyMCE.linkElement, true);")}action="update"}var template=new Array();template['file']='link.htm';template['width']=310;template['height']=200;template['width']+=tinyMCE.getLang('lang_insert_link_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_link_delta_height',0);if(inst.settings['insertlink_callback']){var returnVal=eval(inst.settings['insertlink_callback']+"(href, target, title, onclick, action, style_class);");if(returnVal&&returnVal['href'])TinyMCE_AdvancedTheme._insertLink(returnVal['href'],returnVal['target'],returnVal['title'],returnVal['onclick'],returnVal['style_class'])}else{tinyMCE.openWindow(template,{href:href,target:target,title:title,onclick:onclick,action:action,className:style_class,inline:"yes"})}return true;case"mceImage":var src="",alt="",border="",hspace="",vspace="",width="",height="",align="";var title="",onmouseover="",onmouseout="",action="insert";var img=tinyMCE.imgElement;var inst=tinyMCE.getInstanceById(editor_id);if(tinyMCE.selectedElement!=null&&tinyMCE.selectedElement.nodeName.toLowerCase()=="img"){img=tinyMCE.selectedElement;tinyMCE.imgElement=img}if(img){if(tinyMCE.getAttrib(img,'name').indexOf('mce_')==0)return true;src=tinyMCE.getAttrib(img,'src');alt=tinyMCE.getAttrib(img,'alt');if(alt=="")alt=tinyMCE.getAttrib(img,'title');if(tinyMCE.isGecko){var w=img.style.width;if(w!=null&&w!="")img.setAttribute("width",w);var h=img.style.height;if(h!=null&&h!="")img.setAttribute("height",h)}border=tinyMCE.getAttrib(img,'border');hspace=tinyMCE.getAttrib(img,'hspace');vspace=tinyMCE.getAttrib(img,'vspace');width=tinyMCE.getAttrib(img,'width');height=tinyMCE.getAttrib(img,'height');align=tinyMCE.getAttrib(img,'align');onmouseover=tinyMCE.getAttrib(img,'onmouseover');onmouseout=tinyMCE.getAttrib(img,'onmouseout');title=tinyMCE.getAttrib(img,'title');if(tinyMCE.isMSIE){width=img.attributes['width'].specified?width:"";height=img.attributes['height'].specified?height:""}src=eval(tinyMCE.settings['urlconverter_callback']+"(src, img, true);");mceRealSrc=tinyMCE.getAttrib(img,'mce_src');if(mceRealSrc!=""){src=mceRealSrc;if(tinyMCE.getParam('convert_urls'))src=eval(tinyMCE.settings['urlconverter_callback']+"(src, img, true);")}action="update"}var template=new Array();template['file']='image.htm?src={$src}';template['width']=355;template['height']=265+(tinyMCE.isMSIE?25:0);template['width']+=tinyMCE.getLang('lang_insert_image_delta_width',0);template['height']+=tinyMCE.getLang('lang_insert_image_delta_height',0);if(inst.settings['insertimage_callback']){var returnVal=eval(inst.settings['insertimage_callback']+"(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout, action);");if(returnVal&&returnVal['src'])TinyMCE_AdvancedTheme._insertImage(returnVal['src'],returnVal['alt'],returnVal['border'],returnVal['hspace'],returnVal['vspace'],returnVal['width'],returnVal['height'],returnVal['align'],returnVal['title'],returnVal['onmouseover'],returnVal['onmouseout'])}else tinyMCE.openWindow(template,{src:src,alt:alt,border:border,hspace:hspace,vspace:vspace,width:width,height:height,align:align,title:title,onmouseover:onmouseover,onmouseout:onmouseout,action:action,inline:"yes"});return true;case"forecolor":var fcp=new TinyMCE_Layer(editor_id+'_fcPreview',false),p,img,elm;TinyMCE_AdvancedTheme._hideMenus(editor_id);if(!fcp.exists()){fcp.create('div','mceColorPreview',document.getElementById(editor_id+'_toolbar'));elm=fcp.getElement();elm._editor_id=editor_id;elm._command="forecolor";elm._switchId=editor_id+"_forecolor";tinyMCE.addEvent(elm,'click',TinyMCE_AdvancedTheme._handleMenuEvent);tinyMCE.addEvent(elm,'mouseover',TinyMCE_AdvancedTheme._handleMenuEvent);tinyMCE.addEvent(elm,'mouseout',TinyMCE_AdvancedTheme._handleMenuEvent)}img=tinyMCE.selectNodes(document.getElementById(editor_id+"_forecolor"),function(n){return n.nodeName=="IMG"})[0];p=tinyMCE.getAbsPosition(img,document.getElementById(editor_id+'_toolbar'));fcp.moveTo(p.absLeft,p.absTop);fcp.getElement().style.backgroundColor=value!=null?value:tinyMCE.getInstanceById(editor_id).foreColor;fcp.show();return false;case"forecolorpicker":this._pickColor(editor_id,'forecolor');return true;case"forecolorMenu":TinyMCE_AdvancedTheme._hideMenus(editor_id);var ml=new TinyMCE_Layer(editor_id+'_fcMenu');if(!ml.exists())ml.create('div','mceMenu',document.body,TinyMCE_AdvancedTheme._getColorHTML(editor_id,'theme_advanced_text_colors','forecolor'));tinyMCE.switchClass(editor_id+'_forecolor','mceMenuButtonFocus');ml.moveRelativeTo(document.getElementById(editor_id+"_forecolor"),'bl');ml.moveBy(tinyMCE.isMSIE&&!tinyMCE.isOpera?-1:1,-1);if(tinyMCE.isOpera)ml.moveBy(0,-2);ml.show();return true;case"HiliteColor":var bcp=new TinyMCE_Layer(editor_id+'_bcPreview',false),p,img;TinyMCE_AdvancedTheme._hideMenus(editor_id);if(!bcp.exists()){bcp.create('div','mceColorPreview',document.getElementById(editor_id+'_toolbar'));elm=bcp.getElement();elm._editor_id=editor_id;elm._command="HiliteColor";elm._switchId=editor_id+"_backcolor";tinyMCE.addEvent(elm,'click',TinyMCE_AdvancedTheme._handleMenuEvent);tinyMCE.addEvent(elm,'mouseover',TinyMCE_AdvancedTheme._handleMenuEvent);tinyMCE.addEvent(elm,'mouseout',TinyMCE_AdvancedTheme._handleMenuEvent)}img=tinyMCE.selectNodes(document.getElementById(editor_id+"_backcolor"),function(n){return n.nodeName=="IMG"})[0];p=tinyMCE.getAbsPosition(img,document.getElementById(editor_id+'_toolbar'));bcp.moveTo(p.absLeft,p.absTop);bcp.getElement().style.backgroundColor=value!=null?value:tinyMCE.getInstanceById(editor_id).backColor;bcp.show();return false;case"HiliteColorMenu":TinyMCE_AdvancedTheme._hideMenus(editor_id);var ml=new TinyMCE_Layer(editor_id+'_bcMenu');if(!ml.exists())ml.create('div','mceMenu',document.body,TinyMCE_AdvancedTheme._getColorHTML(editor_id,'theme_advanced_background_colors','HiliteColor'));tinyMCE.switchClass(editor_id+'_backcolor','mceMenuButtonFocus');ml.moveRelativeTo(document.getElementById(editor_id+"_backcolor"),'bl');ml.moveBy(tinyMCE.isMSIE&&!tinyMCE.isOpera?-1:1,-1);if(tinyMCE.isOpera)ml.moveBy(0,-2);ml.show();return true;case"backcolorpicker":this._pickColor(editor_id,'HiliteColor');return true;case"mceColorPicker":if(user_interface){var template=[];if(!value['callback']&&!value['color'])value['color']=value['document'].getElementById(value['element_id']).value;template['file']='color_picker.htm';template['width']=380;template['height']=250;template['close_previous']="no";template['width']+=tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_height',0);if(typeof(value['store_selection'])=="undefined")value['store_selection']=true;tinyMCE.lastColorPickerValue=value;tinyMCE.openWindow(template,{editor_id:editor_id,mce_store_selection:value['store_selection'],inline:"yes",command:"mceColorPicker",input_color:value['color']})}else{var savedVal=tinyMCE.lastColorPickerValue,elm;if(savedVal['callback']){savedVal['callback'](value);return true}elm=savedVal['document'].getElementById(savedVal['element_id']);elm.value=value;if(elm.onchange!=null&&elm.onchange!='')eval('elm.onchange();')}return true;case"mceCodeEditor":var template=new Array();template['file']='source_editor.htm';template['width']=parseInt(tinyMCE.getParam("theme_advanced_source_editor_width",720));template['height']=parseInt(tinyMCE.getParam("theme_advanced_source_editor_height",580));tinyMCE.openWindow(template,{editor_id:editor_id,resizable:"yes",scrollbars:"no",inline:"yes"});return true;case"mceCharMap":var template=new Array();template['file']='charmap.htm';template['width']=550+(tinyMCE.isOpera?40:0);template['height']=250;template['width']+=tinyMCE.getLang('lang_theme_advanced_charmap_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_charmap_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case"mceInsertAnchor":var template=new Array();template['file']='anchor.htm';template['width']=320;template['height']=90+(tinyMCE.isNS7?30:0);template['width']+=tinyMCE.getLang('lang_theme_advanced_anchor_delta_width',0);template['height']+=tinyMCE.getLang('lang_theme_advanced_anchor_delta_height',0);tinyMCE.openWindow(template,{editor_id:editor_id,inline:"yes"});return true;case"mceNewDocument":if(confirm(tinyMCE.entityDecode(tinyMCE.getLang('lang_newdocument'))))tinyMCE.execInstanceCommand(editor_id,'mceSetContent',false,' ');return true}return false},getEditorTemplate:function(settings,editorId){function removeFromArray(in_array,remove_array){var outArray=new Array(),skip;for(var i=0;i<in_array.length;i++){skip=false;for(var j=0;j<remove_array.length;j++){if(in_array[i]==remove_array[j]){skip=true}}if(!skip){outArray[outArray.length]=in_array[i]}}return outArray}function addToArray(in_array,add_array){for(var i=0;i<add_array.length;i++){in_array[in_array.length]=add_array[i]}return in_array}var template=new Array();var deltaHeight=0;var resizing=tinyMCE.getParam("theme_advanced_resizing",false);var path=tinyMCE.getParam("theme_advanced_path",true);var statusbarHTML='<div id="{$editor_id}_path" class="mceStatusbarPathText" style="display: '+(path?"block":"none")+'">&#160;</div><div id="{$editor_id}_resize" class="mceStatusbarResize" style="display: '+(resizing?"block":"none")+'" onmousedown="tinyMCE.themes.advanced._setResizing(event,\'{$editor_id}\',true);"></div><br style="clear: both" />';var layoutManager=tinyMCE.getParam("theme_advanced_layout_manager","SimpleLayout");var styleSelectHTML='<option value="">{$lang_theme_style_select}</option>';if(settings['theme_advanced_styles']){var stylesAr=settings['theme_advanced_styles'].split(';');for(var i=0;i<stylesAr.length;i++){var key,value;key=stylesAr[i].split('=')[0];value=stylesAr[i].split('=')[1];styleSelectHTML+='<option value="'+value+'">'+key+'</option>'}TinyMCE_AdvancedTheme._autoImportCSSClasses=false}switch(layoutManager){case"SimpleLayout":var toolbarHTML="";var toolbarLocation=tinyMCE.getParam("theme_advanced_toolbar_location","bottom");var toolbarAlign=tinyMCE.getParam("theme_advanced_toolbar_align","center");var pathLocation=tinyMCE.getParam("theme_advanced_path_location","none");var statusbarLocation=tinyMCE.getParam("theme_advanced_statusbar_location",pathLocation);var defVals={theme_advanced_buttons1:"bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,separator,sub,sup,separator,charmap"};toolbarHTML+='<a href="#" accesskey="q" title="'+tinyMCE.getLang("lang_toolbar_focus")+'"';if(!tinyMCE.getParam("accessibility_focus"))toolbarHTML+=' onfocus="tinyMCE.getInstanceById(\''+editorId+'\').getWin().focus();"';toolbarHTML+='></a>';for(var i=1;i<100;i++){var def=defVals["theme_advanced_buttons"+i];var buttons=tinyMCE.getParam("theme_advanced_buttons"+i,def==null?'':def,true,',');if(buttons.length==0)break;buttons=removeFromArray(buttons,tinyMCE.getParam("theme_advanced_disable","",true,','));buttons=addToArray(buttons,tinyMCE.getParam("theme_advanced_buttons"+i+"_add","",true,','));buttons=addToArray(tinyMCE.getParam("theme_advanced_buttons"+i+"_add_before","",true,','),buttons);for(var b=0;b<buttons.length;b++)toolbarHTML+=tinyMCE.getControlHTML(buttons[b]);if(buttons.length>0){toolbarHTML+="<br />";deltaHeight-=23}}toolbarHTML+='<a href="#" accesskey="z" onfocus="tinyMCE.getInstanceById(\''+editorId+'\').getWin().focus();"></a>';template['html']='<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width_style};height:{$height_style}"><tbody>';if(toolbarLocation=="top")template['html']+='<tr><td dir="ltr" class="mceToolbarTop" align="'+toolbarAlign+'" height="1" nowrap="nowrap"><span id="'+editorId+'_toolbar" class="mceToolbarContainer">'+toolbarHTML+'</span></td></tr>';if(statusbarLocation=="top"){template['html']+='<tr><td class="mceStatusbarTop" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=23}template['html']+='<tr><td align="center"><span id="{$editor_id}"></span></td></tr>';if(toolbarLocation=="bottom")template['html']+='<tr><td dir="ltr" class="mceToolbarBottom" align="'+toolbarAlign+'" height="1"><span id="'+editorId+'_toolbar" class="mceToolbarContainer">'+toolbarHTML+'</span></td></tr>';if(toolbarLocation=="external"){var bod=document.body;var elm=document.createElement("div");toolbarHTML=tinyMCE.replaceVar(toolbarHTML,'style_select_options',styleSelectHTML);toolbarHTML=tinyMCE.applyTemplate(toolbarHTML,{editor_id:editorId});elm.className="mceToolbarExternal";elm.id=editorId+"_toolbar";elm.innerHTML='<table width="100%" border="0" align="center"><tr><td align="center">'+toolbarHTML+'</td></tr></table>';bod.appendChild(elm);deltaHeight=0;tinyMCE.getInstanceById(editorId).toolbarElement=elm;}else{tinyMCE.getInstanceById(editorId).toolbarElement=null}if(statusbarLocation=="bottom"){template['html']+='<tr><td class="mceStatusbarBottom" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=23}template['html']+='</tbody></table>';break;case"RowLayout":template['html']='<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width}px;height:{$height}px"><tbody>';var containers=tinyMCE.getParam("theme_advanced_containers","",true,",");var defaultContainerCSS=tinyMCE.getParam("theme_advanced_containers_default_class","container");var defaultContainerAlign=tinyMCE.getParam("theme_advanced_containers_default_align","center");for(var i=0;i<containers.length;i++){if(containers[i]=="mceEditor")template['html']+='<tr><td align="center" class="mceEditor_border"><span id="{$editor_id}"></span></td></tr>';else if(containers[i]=="mceElementpath"||containers[i]=="mceStatusbar"){var pathClass="mceStatusbar";if(i==containers.length-1){pathClass="mceStatusbarBottom"}else if(i==0){pathClass="mceStatusbar"}else{deltaHeight-=2}template['html']+='<tr><td class="'+pathClass+'" height="1">'+statusbarHTML+'</td></tr>';deltaHeight-=22}else{var curContainer=tinyMCE.getParam("theme_advanced_container_"+containers[i],"",true,',');var curContainerHTML="";var curAlign=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align",defaultContainerAlign);var curCSS=tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class",defaultContainerCSS);curContainer=removeFromArray(curContainer,tinyMCE.getParam("theme_advanced_disable","",true,','));for(var j=0;j<curContainer.length;j++)curContainerHTML+=tinyMCE.getControlHTML(curContainer[j]);if(curContainer.length>0){curContainerHTML+="<br />";deltaHeight-=23}template['html']+='<tr><td class="'+curCSS+'" align="'+curAlign+'" height="1">'+curContainerHTML+'</td></tr>'}}template['html']+='</tbody></table>';break;case"CustomLayout":var customLayout=tinyMCE.getParam("theme_advanced_custom_layout","");if(customLayout!=""&&eval("typeof("+customLayout+")")!="undefined"){template=eval(customLayout+"(template);")}break}if(resizing)template['html']+='<span id="{$editor_id}_resize_box" class="mceResizeBox"></span>';template['html']=tinyMCE.replaceVar(template['html'],'style_select_options',styleSelectHTML);if(!template['delta_width'])template['delta_width']=0;if(!template['delta_height'])template['delta_height']=deltaHeight;return template},initInstance:function(inst){if(tinyMCE.getParam("theme_advanced_resizing",false)){if(tinyMCE.getParam("theme_advanced_resizing_use_cookie",true)){var w=TinyMCE_AdvancedTheme._getCookie("TinyMCE_"+inst.editorId+"_width");var h=TinyMCE_AdvancedTheme._getCookie("TinyMCE_"+inst.editorId+"_height");TinyMCE_AdvancedTheme._resizeTo(inst,w,h,tinyMCE.getParam("theme_advanced_resize_horizontal",true))}}inst.addShortcut('ctrl','k','lang_link_desc','mceLink')},removeInstance:function(inst){new TinyMCE_Layer(inst.editorId+'_fcMenu').remove();new TinyMCE_Layer(inst.editorId+'_bcMenu').remove()},hideInstance:function(inst){TinyMCE_AdvancedTheme._hideMenus(inst.editorId)},_handleMenuEvent:function(e){var te=tinyMCE.isMSIE?window.event.srcElement:e.target;tinyMCE._menuButtonEvent(e.type=="mouseover"?"over":"out",document.getElementById(te._switchId));if(e.type=="click")tinyMCE.execInstanceCommand(te._editor_id,te._command)},_hideMenus:function(id){var fcml=new TinyMCE_Layer(id+'_fcMenu'),bcml=new TinyMCE_Layer(id+'_bcMenu');if(fcml.exists()&&fcml.isVisible()){tinyMCE.switchClass(id+'_forecolor','mceMenuButton');fcml.hide()}if(bcml.exists()&&bcml.isVisible()){tinyMCE.switchClass(id+'_backcolor','mceMenuButton');bcml.hide()}},handleNodeChange:function(editor_id,node,undo_index,undo_levels,visual_aid,any_selection,setup_content){var alignNode,breakOut,classNode;function selectByValue(select_elm,value,first_index){first_index=typeof(first_index)=="undefined"?false:true;if(select_elm){for(var i=0;i<select_elm.options.length;i++){var ov=""+select_elm.options[i].value;if(first_index&&ov.toLowerCase().indexOf(value.toLowerCase())==0){select_elm.selectedIndex=i;return true}if(ov==value){select_elm.selectedIndex=i;return true}}}return false};if(node==null)return;var pathElm=document.getElementById(editor_id+"_path");var inst=tinyMCE.getInstanceById(editor_id);var doc=inst.getDoc();TinyMCE_AdvancedTheme._hideMenus(editor_id);if(pathElm){var parentNode=node;var path=new Array();while(parentNode!=null){if(parentNode.nodeName.toUpperCase()=="BODY"){break}if(parentNode.nodeType==1&&tinyMCE.getAttrib(parentNode,"class").indexOf('mceItemHidden')==-1){path[path.length]=parentNode}parentNode=parentNode.parentNode}var html="";for(var i=path.length-1;i>=0;i--){var nodeName=path[i].nodeName.toLowerCase();var nodeData="";if(nodeName.indexOf("html:")==0)nodeName=nodeName.substring(5);if(nodeName=="b"){nodeName="strong"}if(nodeName=="i"){nodeName="em"}if(nodeName=="span"){var cn=tinyMCE.getAttrib(path[i],"class");if(cn!=""&&cn.indexOf('mceItem')==-1)nodeData+="class: "+cn+" ";var st=tinyMCE.getAttrib(path[i],"style");if(st!=""){st=tinyMCE.serializeStyle(tinyMCE.parseStyle(st));nodeData+="style: "+tinyMCE.xmlEncode(st)+" "}}if(nodeName=="font"){if(tinyMCE.getParam("convert_fonts_to_spans"))nodeName="span";var face=tinyMCE.getAttrib(path[i],"face");if(face!="")nodeData+="font: "+tinyMCE.xmlEncode(face)+" ";var size=tinyMCE.getAttrib(path[i],"size");if(size!="")nodeData+="size: "+tinyMCE.xmlEncode(size)+" ";var color=tinyMCE.getAttrib(path[i],"color");if(color!="")nodeData+="color: "+tinyMCE.xmlEncode(color)+" "}if(tinyMCE.getAttrib(path[i],'id')!=""){nodeData+="id: "+path[i].getAttribute('id')+" "}var className=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i],"class"),false);if(className!=""&&className.indexOf('mceItem')==-1)nodeData+="class: "+className+" ";if(tinyMCE.getAttrib(path[i],'src')!=""){var src=tinyMCE.getAttrib(path[i],"mce_src");if(src=="")src=tinyMCE.getAttrib(path[i],"src");nodeData+="src: "+tinyMCE.xmlEncode(src)+" "}if(path[i].nodeName=='A'&&tinyMCE.getAttrib(path[i],'href')!=""){var href=tinyMCE.getAttrib(path[i],"mce_href");if(href=="")href=tinyMCE.getAttrib(path[i],"href");nodeData+="href: "+tinyMCE.xmlEncode(href)+" "}className=tinyMCE.getAttrib(path[i],"class");if((nodeName=="img"||nodeName=="span")&&className.indexOf('mceItem')!=-1){nodeName=className.replace(/mceItem([a-z]+)/gi,'$1').toLowerCase();nodeData=path[i].getAttribute('title')}if(nodeName=="a"&&(anchor=tinyMCE.getAttrib(path[i],"name"))!=""){nodeName="a";nodeName+="#"+tinyMCE.xmlEncode(anchor);nodeData=""}if(tinyMCE.getAttrib(path[i],'name').indexOf("mce_")!=0){var className=tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i],"class"),false);if(className!=""&&className.indexOf('mceItem')==-1){nodeName+="."+className}}var cmd='tinyMCE.execInstanceCommand(\''+editor_id+'\',\'mceSelectNodeDepth\',false,\''+i+'\');';html+='<a title="'+nodeData+'" href="javascript:'+cmd+'" onclick="'+cmd+'return false;" onmousedown="return false;" target="_self" class="mcePathItem">'+nodeName+'</a>';if(i>0){html+=" &raquo; "}}pathElm.innerHTML='<a href="#" accesskey="x"></a>'+tinyMCE.getLang('lang_theme_path')+": "+html+'&#160;'}tinyMCE.switchClass(editor_id+'_justifyleft','mceButtonNormal');tinyMCE.switchClass(editor_id+'_justifyright','mceButtonNormal');tinyMCE.switchClass(editor_id+'_justifycenter','mceButtonNormal');tinyMCE.switchClass(editor_id+'_justifyfull','mceButtonNormal');tinyMCE.switchClass(editor_id+'_bold','mceButtonNormal');tinyMCE.switchClass(editor_id+'_italic','mceButtonNormal');tinyMCE.switchClass(editor_id+'_underline','mceButtonNormal');tinyMCE.switchClass(editor_id+'_strikethrough','mceButtonNormal');tinyMCE.switchClass(editor_id+'_bullist','mceButtonNormal');tinyMCE.switchClass(editor_id+'_numlist','mceButtonNormal');tinyMCE.switchClass(editor_id+'_sub','mceButtonNormal');tinyMCE.switchClass(editor_id+'_sup','mceButtonNormal');tinyMCE.switchClass(editor_id+'_anchor','mceButtonNormal');tinyMCE.switchClass(editor_id+'_link','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_unlink','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_outdent','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_image','mceButtonNormal');tinyMCE.switchClass(editor_id+'_hr','mceButtonNormal');if(node.nodeName=="A"&&tinyMCE.getAttrib(node,"class").indexOf('mceItemAnchor')!=-1)tinyMCE.switchClass(editor_id+'_anchor','mceButtonSelected');var anchorLink=tinyMCE.getParentElement(node,"a","href");if(anchorLink||any_selection){tinyMCE.switchClass(editor_id+'_link',anchorLink?'mceButtonSelected':'mceButtonNormal');tinyMCE.switchClass(editor_id+'_unlink',anchorLink?'mceButtonSelected':'mceButtonNormal')}tinyMCE.switchClass(editor_id+'_visualaid',visual_aid?'mceButtonSelected':'mceButtonNormal');if(undo_levels!=-1){tinyMCE.switchClass(editor_id+'_undo','mceButtonDisabled');tinyMCE.switchClass(editor_id+'_redo','mceButtonDisabled')}if(tinyMCE.getParentElement(node,"li,blockquote"))tinyMCE.switchClass(editor_id+'_outdent','mceButtonNormal');if(undo_index!=-1&&(undo_index<undo_levels-1&&undo_levels>0))tinyMCE.switchClass(editor_id+'_redo','mceButtonNormal');if(undo_index!=-1&&(undo_index>0&&undo_levels>0))tinyMCE.switchClass(editor_id+'_undo','mceButtonNormal');var selectElm=document.getElementById(editor_id+"_styleSelect");if(selectElm){TinyMCE_AdvancedTheme._setupCSSClasses(editor_id);classNode=node;breakOut=false;var index=0;do{if(classNode&&classNode.className){for(var i=0;i<selectElm.options.length;i++){if(selectElm.options[i].value==classNode.className){index=i;breakOut=true;break}}}}while(!breakOut&&classNode!=null&&(classNode=classNode.parentNode)!=null);selectElm.selectedIndex=index}var selectElm=document.getElementById(editor_id+"_formatSelect");if(selectElm){var elm=tinyMCE.getParentElement(node,"p,div,h1,h2,h3,h4,h5,h6,pre,address");if(elm)selectByValue(selectElm,"<"+elm.nodeName.toLowerCase()+">");else selectByValue(selectElm,"")}var selectElm=document.getElementById(editor_id+"_fontNameSelect");if(selectElm){if(!tinyMCE.isSafari&&!(tinyMCE.isMSIE&&!tinyMCE.isOpera)){var face=inst.queryCommandValue('FontName');face=face==null||face==""?"":face;selectByValue(selectElm,face,face!="")}else{var elm=tinyMCE.getParentElement(node,"font","face");if(elm){var family=tinyMCE.getAttrib(elm,"face");if(family=='')family=''+elm.style.fontFamily;if(!selectByValue(selectElm,family,family!=""))selectByValue(selectElm,"")}else selectByValue(selectElm,"")}}var selectElm=document.getElementById(editor_id+"_fontSizeSelect");if(selectElm){if(!tinyMCE.isSafari&&!tinyMCE.isOpera){var size=inst.queryCommandValue('FontSize');selectByValue(selectElm,size==null||size==""?"0":size)}else{var elm=tinyMCE.getParentElement(node,"font","size");if(elm){var size=tinyMCE.getAttrib(elm,"size");if(size==''){var sizes=new Array('','8px','10px','12px','14px','18px','24px','36px');size=''+elm.style.fontSize;for(var i=0;i<sizes.length;i++){if((''+sizes[i])==size){size=i;break}}}if(!selectByValue(selectElm,size))selectByValue(selectElm,"")}else selectByValue(selectElm,"0")}}alignNode=node;breakOut=false;do{if(!alignNode.getAttribute||!alignNode.getAttribute('align'))continue;switch(alignNode.getAttribute('align').toLowerCase()){case"left":tinyMCE.switchClass(editor_id+'_justifyleft','mceButtonSelected');breakOut=true;break;case"right":tinyMCE.switchClass(editor_id+'_justifyright','mceButtonSelected');breakOut=true;break;case"middle":case"center":tinyMCE.switchClass(editor_id+'_justifycenter','mceButtonSelected');breakOut=true;break;case"justify":tinyMCE.switchClass(editor_id+'_justifyfull','mceButtonSelected');breakOut=true;break}}while(!breakOut&&(alignNode=alignNode.parentNode)!=null);var div=tinyMCE.getParentElement(node,"div");if(div&&div.style.textAlign=="center")tinyMCE.switchClass(editor_id+'_justifycenter','mceButtonSelected');if(!setup_content){var ar=new Array("Bold","_bold","Italic","_italic","Strikethrough","_strikethrough","superscript","_sup","subscript","_sub");for(var i=0;i<ar.length;i+=2){if(inst.queryCommandState(ar[i]))tinyMCE.switchClass(editor_id+ar[i+1],'mceButtonSelected')}if(inst.queryCommandState("Underline")&&(node.parentNode==null||node.parentNode.nodeName!="A"))tinyMCE.switchClass(editor_id+'_underline','mceButtonSelected')}do{switch(node.nodeName){case"UL":tinyMCE.switchClass(editor_id+'_bullist','mceButtonSelected');break;case"OL":tinyMCE.switchClass(editor_id+'_numlist','mceButtonSelected');break;case"HR":tinyMCE.switchClass(editor_id+'_hr','mceButtonSelected');break;case"IMG":if(tinyMCE.getAttrib(node,'name').indexOf('mce_')!=0&&tinyMCE.getAttrib(node,'class').indexOf('mceItem')==-1){tinyMCE.switchClass(editor_id+'_image','mceButtonSelected')}break}}while((node=node.parentNode)!=null)},_setupCSSClasses:function(editor_id){var i,selectElm;if(!TinyMCE_AdvancedTheme._autoImportCSSClasses)return;selectElm=document.getElementById(editor_id+'_styleSelect');if(selectElm&&selectElm.getAttribute('cssImported')!='true'){var csses=tinyMCE.getCSSClasses(editor_id);if(csses&&selectElm){for(i=0;i<csses.length;i++)selectElm.options[selectElm.options.length]=new Option(csses[i],csses[i])}if(csses!=null&&csses.length>0)selectElm.setAttribute('cssImported','true')}},_setCookie:function(name,value,expires,path,domain,secure){var curCookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+escape(path):"")+((domain)?"; domain="+domain:"")+((secure)?"; secure":"");document.cookie=curCookie},_getCookie:function(name){var dc=document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!=0)return null}else begin+=2;var end=document.cookie.indexOf(";",begin);if(end==-1)end=dc.length;return unescape(dc.substring(begin+prefix.length,end))},_resizeTo:function(inst,w,h,set_w){var editorContainer=document.getElementById(inst.editorId+'_parent');var tableElm=editorContainer.firstChild;var iframe=inst.iframeElement;if(w==null||w=="null"){set_w=false;w=0}if(h==null||h=="null")return;w=parseInt(w);h=parseInt(h);if(tinyMCE.isGecko){w+=2;h+=2}var dx=w-tableElm.clientWidth;var dy=h-tableElm.clientHeight;w=w<1?30:w;h=h<1?30:h;if(set_w)tableElm.style.width=w+"px";tableElm.style.height=h+"px";iw=iframe.clientWidth+dx;ih=iframe.clientHeight+dy;iw=iw<1?30:iw;ih=ih<1?30:ih;if(tinyMCE.isGecko){iw-=2;ih-=2}if(set_w)iframe.style.width=iw+"px";iframe.style.height=ih+"px";if(set_w){var tableBodyElm=tableElm.firstChild;var minIframeWidth=tableBodyElm.scrollWidth;if(inst.iframeElement.clientWidth<minIframeWidth){dx=minIframeWidth-inst.iframeElement.clientWidth;inst.iframeElement.style.width=(iw+dx)+"px"}}inst.useCSS=false},_resizeEventHandler:function(e){var resizer=TinyMCE_AdvancedTheme._resizer;if(!resizer.resizing)return;e=typeof(e)=="undefined"?window.event:e;var dx=e.screenX-resizer.downX;var dy=e.screenY-resizer.downY;var resizeBox=resizer.resizeBox;var editorId=resizer.editorId;switch(e.type){case"mousemove":var w,h;w=resizer.width+dx;h=resizer.height+dy;w=w<1?1:w;h=h<1?1:h;if(resizer.horizontal)resizeBox.style.width=w+"px";resizeBox.style.height=h+"px";break;case"mouseup":TinyMCE_AdvancedTheme._setResizing(e,editorId,false);TinyMCE_AdvancedTheme._resizeTo(tinyMCE.getInstanceById(editorId),resizer.width+dx,resizer.height+dy,resizer.horizontal);if(tinyMCE.getParam("theme_advanced_resizing_use_cookie",true)){var expires=new Date();expires.setTime(expires.getTime()+3600000*24*30);TinyMCE_AdvancedTheme._setCookie("TinyMCE_"+editorId+"_width",""+(resizer.horizontal?resizer.width+dx:""),expires);TinyMCE_AdvancedTheme._setCookie("TinyMCE_"+editorId+"_height",""+(resizer.height+dy),expires)}break}},_setResizing:function(e,editor_id,state){e=typeof(e)=="undefined"?window.event:e;var resizer=TinyMCE_AdvancedTheme._resizer;var editorContainer=document.getElementById(editor_id+'_parent');var editorArea=document.getElementById(editor_id+'_parent').firstChild;var resizeBox=document.getElementById(editor_id+'_resize_box');var inst=tinyMCE.getInstanceById(editor_id);if(state){var width=editorArea.clientWidth;var height=editorArea.clientHeight;resizeBox.style.width=width+"px";resizeBox.style.height=height+"px";resizer.iframeWidth=inst.iframeElement.clientWidth;resizer.iframeHeight=inst.iframeElement.clientHeight;editorArea.style.display="none";resizeBox.style.display="block";if(!resizer.eventHandlers){if(tinyMCE.isMSIE)tinyMCE.addEvent(document,"mousemove",TinyMCE_AdvancedTheme._resizeEventHandler);else tinyMCE.addEvent(window,"mousemove",TinyMCE_AdvancedTheme._resizeEventHandler);tinyMCE.addEvent(document,"mouseup",TinyMCE_AdvancedTheme._resizeEventHandler);resizer.eventHandlers=true}resizer.resizing=true;resizer.downX=e.screenX;resizer.downY=e.screenY;resizer.width=parseInt(resizeBox.style.width);resizer.height=parseInt(resizeBox.style.height);resizer.editorId=editor_id;resizer.resizeBox=resizeBox;resizer.horizontal=tinyMCE.getParam("theme_advanced_resize_horizontal",true)}else{resizer.resizing=false;resizeBox.style.display="none";editorArea.style.display=tinyMCE.isMSIE&&!tinyMCE.isOpera?"block":"table";tinyMCE.execCommand('mceResetDesignMode')}},_getColorHTML:function(id,n,cm){var i,h,cl;h='<span class="mceMenuLine"></span>';cl=tinyMCE.getParam(n,TinyMCE_AdvancedTheme._defColors).split(',');h+='<table class="mceColors"><tr>';for(i=0;i<cl.length;i++){c='tinyMCE.execInstanceCommand(\''+id+'\', \''+cm+'\', false, \'#'+cl[i]+'\');';h+='<td><a href="javascript:'+c+'" style="background-color: #'+cl[i]+'" onclick="'+c+';return false;"></a></td>';if((i+1)%8==0)h+='</tr><tr>'}h+='</tr></table>';if(tinyMCE.getParam("theme_advanced_more_colors",true))h+='<a href="javascript:void(0);" onclick="TinyMCE_AdvancedTheme._pickColor(\''+id+'\',\''+cm+'\');" class="mceMoreColors">'+tinyMCE.getLang('lang_more_colors')+'</a>';return h},_pickColor:function(id,cm){var inputColor,inst=tinyMCE.selectedInstance;if(cm=='forecolor'&&inst)inputColor=inst.foreColor;if((cm=='backcolor'||cm=='HiliteColor')&&inst)inputColor=inst.backColor;tinyMCE.execCommand('mceColorPicker',true,{color:inputColor,callback:function(c){tinyMCE.execInstanceCommand(id,cm,false,c)}})},_insertImage:function(src,alt,border,hspace,vspace,width,height,align,title,onmouseover,onmouseout){tinyMCE.execCommand("mceInsertContent",false,tinyMCE.createTagHTML('img',{src:tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'],src),mce_src:src,alt:alt,border:border,hspace:hspace,vspace:vspace,width:width,height:height,align:align,title:title,onmouseover:onmouseover,onmouseout:onmouseout}))},_insertLink:function(href,target,title,onclick,style_class){tinyMCE.execCommand('mceBeginUndoLevel');if(tinyMCE.selectedInstance&&tinyMCE.selectedElement&&tinyMCE.selectedElement.nodeName.toLowerCase()=="img"){var doc=tinyMCE.selectedInstance.getDoc();var linkElement=tinyMCE.getParentElement(tinyMCE.selectedElement,"a");var newLink=false;if(!linkElement){linkElement=doc.createElement("a");newLink=true}var mhref=href;var thref=eval(tinyMCE.settings['urlconverter_callback']+"(href, linkElement);");mhref=tinyMCE.getParam('convert_urls')?href:mhref;tinyMCE.setAttrib(linkElement,'href',thref);tinyMCE.setAttrib(linkElement,'mce_href',mhref);tinyMCE.setAttrib(linkElement,'target',target);tinyMCE.setAttrib(linkElement,'title',title);tinyMCE.setAttrib(linkElement,'onclick',onclick);tinyMCE.setAttrib(linkElement,'class',style_class);if(newLink){linkElement.appendChild(tinyMCE.selectedElement.cloneNode(true));tinyMCE.selectedElement.parentNode.replaceChild(linkElement,tinyMCE.selectedElement)}return}if(!tinyMCE.linkElement&&tinyMCE.selectedInstance){if(tinyMCE.isSafari){tinyMCE.execCommand("mceInsertContent",false,'<a href="'+tinyMCE.uniqueURL+'">'+tinyMCE.selectedInstance.selection.getSelectedHTML()+'</a>')}else tinyMCE.selectedInstance.contentDocument.execCommand("createlink",false,tinyMCE.uniqueURL);tinyMCE.linkElement=tinyMCE.getElementByAttributeValue(tinyMCE.selectedInstance.contentDocument.body,"a","href",tinyMCE.uniqueURL);var elementArray=tinyMCE.getElementsByAttributeValue(tinyMCE.selectedInstance.contentDocument.body,"a","href",tinyMCE.uniqueURL);for(var i=0;i<elementArray.length;i++){var mhref=href;var thref=eval(tinyMCE.settings['urlconverter_callback']+"(href, elementArray[i]);");mhref=tinyMCE.getParam('convert_urls')?href:mhref;tinyMCE.setAttrib(elementArray[i],'href',thref);tinyMCE.setAttrib(elementArray[i],'mce_href',mhref);tinyMCE.setAttrib(elementArray[i],'target',target);tinyMCE.setAttrib(elementArray[i],'title',title);tinyMCE.setAttrib(elementArray[i],'onclick',onclick);tinyMCE.setAttrib(elementArray[i],'class',style_class)}tinyMCE.linkElement=elementArray[0]}if(tinyMCE.linkElement){var mhref=href;href=eval(tinyMCE.settings['urlconverter_callback']+"(href, tinyMCE.linkElement);");mhref=tinyMCE.getParam('convert_urls')?href:mhref;tinyMCE.setAttrib(tinyMCE.linkElement,'href',href);tinyMCE.setAttrib(tinyMCE.linkElement,'mce_href',mhref);tinyMCE.setAttrib(tinyMCE.linkElement,'target',target);tinyMCE.setAttrib(tinyMCE.linkElement,'title',title);tinyMCE.setAttrib(tinyMCE.linkElement,'onclick',onclick);tinyMCE.setAttrib(tinyMCE.linkElement,'class',style_class)}tinyMCE.execCommand('mceEndUndoLevel')}};tinyMCE.addTheme("advanced",TinyMCE_AdvancedTheme);tinyMCE.addButtonMap(TinyMCE_AdvancedTheme._buttonMap); \ No newline at end of file
+(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',{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;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_font_sizes:"1,2,3,4,5,6,7",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1},ed.settings);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(ed.baseURI.toAbsolute(s.editor_css||"themes/advanced/skins/"+ed.settings.skin+"/ui.css"));if(s.skin_variant)DOM.loadCSS(ed.baseURI.toAbsolute(s.editor_css||"themes/advanced/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(){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){Event.add(n,'focus',t._importClasses,t);Event.add(n,'mousedown',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 c,t=this,lo=["1 (8 pt)","2 (10 pt)","3 (12 pt)","4 (14 pt)","5 (18 pt)","6 (24 pt)","7 (36 pt)"],fz=[8,10,12,14,18,24,36];c=t.editor.controlManager.createListBox('fontsizeselect',{title:'advanced.font_size',cmd:'FontSize'});if(c){each(explode(t.settings.theme_advanced_font_sizes),function(v){c.add(lo[parseInt(v)-1],v,{'style':'font-size:'+fz[v-1]+'pt','class':'mceFontSize'+v});});}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;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;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:'#'},'<!-- IE -->'),'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(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(c.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'].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();'},'<!-- IE -->'));h.push(DOM.createHTML('a',{href:'#',accesskey:'q',title:ed.getLang("advanced.toolbar_focus")},'<!-- IE -->'));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();'},'<!-- IE -->'));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')+': ':'&nbsp;');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;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(c=cm.get('fontselect'))c.select(ed.queryCommandValue('FontName'));if(c=cm.get('fontsizeselect'))c.select(ed.queryCommandValue('FontSize'));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||(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,{func:function(co){t.editor.execCommand('ForeColor',false,co);}});},_mceBackColor:function(){var t=this;this._mceColorPicker(0,{func:function(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
diff --git a/program/js/tiny_mce/themes/advanced/editor_template_src.js b/program/js/tiny_mce/themes/advanced/editor_template_src.js
index 06544d749..381ba6ba7 100644
--- a/program/js/tiny_mce/themes/advanced/editor_template_src.js
+++ b/program/js/tiny_mce/themes/advanced/editor_template_src.js
@@ -1,1516 +1,1048 @@
-/**
- * $Id: editor_template_src.js 296 2007-08-21 10:36:35Z spocke $
- *
- * @author Moxiecode
- * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
- */
-
-/* Import theme specific language pack */
-tinyMCE.importThemeLanguagePack('advanced');
-
-var TinyMCE_AdvancedTheme = {
- // Private theme fields
- _defColors : "000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",
- _autoImportCSSClasses : true,
- _resizer : {},
- _buttons : [
- // Control id, button img, button title, command, user_interface, value
- ['bold', '{$lang_bold_img}', 'lang_bold_desc', 'Bold'],
- ['italic', '{$lang_italic_img}', 'lang_italic_desc', 'Italic'],
- ['underline', '{$lang_underline_img}', 'lang_underline_desc', 'Underline'],
- ['strikethrough', 'strikethrough.gif', 'lang_striketrough_desc', 'Strikethrough'],
- ['justifyleft', 'justifyleft.gif', 'lang_justifyleft_desc', 'JustifyLeft'],
- ['justifycenter', 'justifycenter.gif', 'lang_justifycenter_desc', 'JustifyCenter'],
- ['justifyright', 'justifyright.gif', 'lang_justifyright_desc', 'JustifyRight'],
- ['justifyfull', 'justifyfull.gif', 'lang_justifyfull_desc', 'JustifyFull'],
- ['bullist', 'bullist.gif', 'lang_bullist_desc', 'InsertUnorderedList'],
- ['numlist', 'numlist.gif', 'lang_numlist_desc', 'InsertOrderedList'],
- ['outdent', 'outdent.gif', 'lang_outdent_desc', 'Outdent'],
- ['indent', 'indent.gif', 'lang_indent_desc', 'Indent'],
- ['cut', 'cut.gif', 'lang_cut_desc', 'Cut'],
- ['copy', 'copy.gif', 'lang_copy_desc', 'Copy'],
- ['paste', 'paste.gif', 'lang_paste_desc', 'Paste'],
- ['undo', 'undo.gif', 'lang_undo_desc', 'Undo'],
- ['redo', 'redo.gif', 'lang_redo_desc', 'Redo'],
- ['link', 'link.gif', 'lang_link_desc', 'mceLink', true],
- ['unlink', 'unlink.gif', 'lang_unlink_desc', 'unlink'],
- ['image', 'image.gif', 'lang_image_desc', 'mceImage', true],
- ['cleanup', 'cleanup.gif', 'lang_cleanup_desc', 'mceCleanup'],
- ['help', 'help.gif', 'lang_help_desc', 'mceHelp'],
- ['code', 'code.gif', 'lang_theme_code_desc', 'mceCodeEditor'],
- ['hr', 'hr.gif', 'lang_theme_hr_desc', 'inserthorizontalrule'],
- ['removeformat', 'removeformat.gif', 'lang_theme_removeformat_desc', 'removeformat'],
- ['sub', 'sub.gif', 'lang_theme_sub_desc', 'subscript'],
- ['sup', 'sup.gif', 'lang_theme_sup_desc', 'superscript'],
- ['forecolor', 'forecolor.gif', 'lang_theme_forecolor_desc', 'forecolor', true],
- ['forecolorpicker', 'forecolor.gif', 'lang_theme_forecolor_desc', 'forecolorpicker', true],
- ['backcolor', 'backcolor.gif', 'lang_theme_backcolor_desc', 'HiliteColor', true],
- ['backcolorpicker', 'backcolor.gif', 'lang_theme_backcolor_desc', 'backcolorpicker', true],
- ['charmap', 'charmap.gif', 'lang_theme_charmap_desc', 'mceCharMap'],
- ['visualaid', 'visualaid.gif', 'lang_theme_visualaid_desc', 'mceToggleVisualAid'],
- ['anchor', 'anchor.gif', 'lang_theme_anchor_desc', 'mceInsertAnchor'],
- ['newdocument', 'newdocument.gif', 'lang_newdocument_desc', 'mceNewDocument']
- ],
-
- _buttonMap : 'anchor,backcolor,bold,bullist,charmap,cleanup,code,copy,cut,forecolor,help,hr,image,indent,italic,justifycenter,justifyfull,justifyleft,justifyright,link,newdocument,numlist,outdent,paste,redo,removeformat,strikethrough,sub,sup,underline,undo,unlink,visualaid,advhr,ltr,rtl,emotions,flash,fullpage,fullscreen,iespell,insertdate,inserttime,pastetext,pasteword,selectall,preview,print,save,replace,search,table,cell_props,delete_col,delete_row,col_after,col_before,row_after,row_before,merge_cells,row_props,split_cells,delete_table',
-
- /**
- * Returns HTML code for the specificed control.
- */
- getControlHTML : function(button_name) {
- var i, x, but;
-
- // Lookup button in button list
- for (i=0; i<TinyMCE_AdvancedTheme._buttons.length; i++) {
- but = TinyMCE_AdvancedTheme._buttons[i];
-
- if (but[0] == button_name && (button_name == "forecolor" || button_name == "backcolor"))
- return tinyMCE.getMenuButtonHTML(but[0], but[2], '{$themeurl}/images/' + but[1], but[3] + "Menu", but[3], (but.length > 4 ? but[4] : false), (but.length > 5 ? but[5] : null));
-
- if (but[0] == button_name)
- return tinyMCE.getButtonHTML(but[0], but[2], '{$themeurl}/images/' + but[1], but[3], (but.length > 4 ? but[4] : false), (but.length > 5 ? but[5] : null));
- }
-
- // Custom controlls other than buttons
- switch (button_name) {
- case "formatselect":
- var html = '<select id="{$editor_id}_formatSelect" name="{$editor_id}_formatSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FormatBlock\',false,this.options[this.selectedIndex].value);" class="mceSelectList">';
- var formats = tinyMCE.getParam("theme_advanced_blockformats", "p,address,pre,h1,h2,h3,h4,h5,h6", true).split(',');
- var lookup = [
- ['p', '{$lang_theme_paragraph}'],
- ['address', '{$lang_theme_address}'],
- ['pre', '{$lang_theme_pre}'],
- ['h1', '{$lang_theme_h1}'],
- ['h2', '{$lang_theme_h2}'],
- ['h3', '{$lang_theme_h3}'],
- ['h4', '{$lang_theme_h4}'],
- ['h5', '{$lang_theme_h5}'],
- ['h6', '{$lang_theme_h6}'],
- ['div', '{$lang_theme_div}'],
- ['blockquote', '{$lang_theme_blockquote}'],
- ['code', '{$lang_theme_code}'],
- ['dt', '{$lang_theme_dt}'],
- ['dd', '{$lang_theme_dd}'],
- ['samp', '{$lang_theme_samp}']
- ];
-
- html += '<option value="">{$lang_theme_block}</option>';
-
- // Build format select
- for (var i=0; i<formats.length; i++) {
- for (var x=0; x<lookup.length; x++) {
- if (formats[i] == lookup[x][0])
- html += '<option value="&lt;' + lookup[x][0] + '&gt;">' + lookup[x][1] + '</option>';
- }
- }
-
- html += '</select>';
-
- return html;
-
- case "styleselect":
- return '<select id="{$editor_id}_styleSelect" onmousedown="tinyMCE.themes.advanced._setupCSSClasses(\'{$editor_id}\');" name="{$editor_id}_styleSelect" onfocus="tinyMCE.addSelectAccessibility(event,this,window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceSetCSSClass\',false,this.options[this.selectedIndex].value);" class="mceSelectList">{$style_select_options}</select>';
-
- case "fontselect":
- var fontHTML = '<select id="{$editor_id}_fontNameSelect" name="{$editor_id}_fontNameSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontName\',false,this.options[this.selectedIndex].value);" class="mceSelectList"><option value="">{$lang_theme_fontdefault}</option>';
- var iFonts = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings';
- var nFonts = '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';
- var fonts = tinyMCE.getParam("theme_advanced_fonts", nFonts).split(';');
- for (i=0; i<fonts.length; i++) {
- if (fonts[i] != '') {
- var parts = fonts[i].split('=');
- fontHTML += '<option value="' + parts[1] + '">' + parts[0] + '</option>';
- }
- }
-
- fontHTML += '</select>';
- return fontHTML;
-
- case "fontsizeselect":
- return '<select id="{$editor_id}_fontSizeSelect" name="{$editor_id}_fontSizeSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'FontSize\',false,this.options[this.selectedIndex].value);" class="mceSelectList">'+
- '<option value="0">{$lang_theme_font_size}</option>'+
- '<option value="1">1 (8 pt)</option>'+
- '<option value="2">2 (10 pt)</option>'+
- '<option value="3">3 (12 pt)</option>'+
- '<option value="4">4 (14 pt)</option>'+
- '<option value="5">5 (18 pt)</option>'+
- '<option value="6">6 (24 pt)</option>'+
- '<option value="7">7 (36 pt)</option>'+
- '</select>';
-
- case "|":
- case "separator":
- return '<img src="{$themeurl}/images/separator.gif" width="2" height="20" class="mceSeparatorLine" alt="" />';
-
- case "spacer":
- return '<img src="{$themeurl}/images/separator.gif" width="2" height="15" border="0" class="mceSeparatorLine" style="vertical-align: middle" alt="" />';
-
- case "rowseparator":
- return '<br />';
- }
-
- return "";
- },
-
- /**
- * Theme specific execcommand handling.
- */
- execCommand : function(editor_id, element, command, user_interface, value) {
- switch (command) {
- case 'mceHelp':
- tinyMCE.openWindow({
- file : 'about.htm',
- width : 480,
- height : 380
- }, {
- tinymce_version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion,
- tinymce_releasedate : tinyMCE.releaseDate,
- inline : "yes"
- });
- return true;
-
- case "mceLink":
- var inst = tinyMCE.getInstanceById(editor_id);
- var doc = inst.getDoc();
- var selectedText = "";
-
- if (tinyMCE.isMSIE) {
- var rng = doc.selection.createRange();
- selectedText = rng.text;
- } else
- selectedText = inst.getSel().toString();
-
- if (!tinyMCE.linkElement) {
- if ((tinyMCE.selectedElement.nodeName.toLowerCase() != "img") && (selectedText.length <= 0))
- return true;
- }
-
- var href = "", target = "", title = "", onclick = "", action = "insert", style_class = "";
-
- if (tinyMCE.selectedElement.nodeName.toLowerCase() == "a")
- tinyMCE.linkElement = tinyMCE.selectedElement;
-
- // Is anchor not a link
- if (tinyMCE.linkElement != null && tinyMCE.getAttrib(tinyMCE.linkElement, 'href') == "")
- tinyMCE.linkElement = null;
-
- if (tinyMCE.linkElement) {
- href = tinyMCE.getAttrib(tinyMCE.linkElement, 'href');
- target = tinyMCE.getAttrib(tinyMCE.linkElement, 'target');
- title = tinyMCE.getAttrib(tinyMCE.linkElement, 'title');
- onclick = tinyMCE.getAttrib(tinyMCE.linkElement, 'onclick');
- style_class = tinyMCE.getAttrib(tinyMCE.linkElement, 'class');
-
- // Try old onclick to if copy/pasted content
- if (onclick == "")
- onclick = tinyMCE.getAttrib(tinyMCE.linkElement, 'onclick');
-
- onclick = tinyMCE.cleanupEventStr(onclick);
-
- href = eval(tinyMCE.settings['urlconverter_callback'] + "(href, tinyMCE.linkElement, true);");
-
- // Use mce_href if defined
- mceRealHref = tinyMCE.getAttrib(tinyMCE.linkElement, 'mce_href');
- if (mceRealHref != "") {
- href = mceRealHref;
-
- if (tinyMCE.getParam('convert_urls'))
- href = eval(tinyMCE.settings['urlconverter_callback'] + "(href, tinyMCE.linkElement, true);");
- }
-
- action = "update";
- }
-
- var template = new Array();
-
- template['file'] = 'link.htm';
- template['width'] = 310;
- template['height'] = 200;
-
- // Language specific width and height addons
- template['width'] += tinyMCE.getLang('lang_insert_link_delta_width', 0);
- template['height'] += tinyMCE.getLang('lang_insert_link_delta_height', 0);
-
- if (inst.settings['insertlink_callback']) {
- var returnVal = eval(inst.settings['insertlink_callback'] + "(href, target, title, onclick, action, style_class);");
- if (returnVal && returnVal['href'])
- TinyMCE_AdvancedTheme._insertLink(returnVal['href'], returnVal['target'], returnVal['title'], returnVal['onclick'], returnVal['style_class']);
- } else {
- tinyMCE.openWindow(template, {href : href, target : target, title : title, onclick : onclick, action : action, className : style_class, inline : "yes"});
- }
-
- return true;
-
- case "mceImage":
- var src = "", alt = "", border = "", hspace = "", vspace = "", width = "", height = "", align = "";
- var title = "", onmouseover = "", onmouseout = "", action = "insert";
- var img = tinyMCE.imgElement;
- var inst = tinyMCE.getInstanceById(editor_id);
-
- if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "img") {
- img = tinyMCE.selectedElement;
- tinyMCE.imgElement = img;
- }
-
- if (img) {
- // Is it a internal MCE visual aid image, then skip this one.
- if (tinyMCE.getAttrib(img, 'name').indexOf('mce_') == 0)
- return true;
-
- src = tinyMCE.getAttrib(img, 'src');
- alt = tinyMCE.getAttrib(img, 'alt');
-
- // Try polling out the title
- if (alt == "")
- alt = tinyMCE.getAttrib(img, 'title');
-
- // Fix width/height attributes if the styles is specified
- if (tinyMCE.isGecko) {
- var w = img.style.width;
- if (w != null && w != "")
- img.setAttribute("width", w);
-
- var h = img.style.height;
- if (h != null && h != "")
- img.setAttribute("height", h);
- }
-
- border = tinyMCE.getAttrib(img, 'border');
- hspace = tinyMCE.getAttrib(img, 'hspace');
- vspace = tinyMCE.getAttrib(img, 'vspace');
- width = tinyMCE.getAttrib(img, 'width');
- height = tinyMCE.getAttrib(img, 'height');
- align = tinyMCE.getAttrib(img, 'align');
- onmouseover = tinyMCE.getAttrib(img, 'onmouseover');
- onmouseout = tinyMCE.getAttrib(img, 'onmouseout');
- title = tinyMCE.getAttrib(img, 'title');
-
- // Is realy specified?
- if (tinyMCE.isMSIE) {
- width = img.attributes['width'].specified ? width : "";
- height = img.attributes['height'].specified ? height : "";
- }
-
- //onmouseover = tinyMCE.getImageSrc(tinyMCE.cleanupEventStr(onmouseover));
- //onmouseout = tinyMCE.getImageSrc(tinyMCE.cleanupEventStr(onmouseout));
-
- src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, img, true);");
-
- // Use mce_src if defined
- mceRealSrc = tinyMCE.getAttrib(img, 'mce_src');
- if (mceRealSrc != "") {
- src = mceRealSrc;
-
- if (tinyMCE.getParam('convert_urls'))
- src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, img, true);");
- }
-
- //if (onmouseover != "")
- // onmouseover = eval(tinyMCE.settings['urlconverter_callback'] + "(onmouseover, img, true);");
-
- //if (onmouseout != "")
- // onmouseout = eval(tinyMCE.settings['urlconverter_callback'] + "(onmouseout, img, true);");
-
- action = "update";
- }
-
- var template = new Array();
-
- template['file'] = 'image.htm?src={$src}';
- template['width'] = 355;
- template['height'] = 265 + (tinyMCE.isMSIE ? 25 : 0);
-
- // Language specific width and height addons
- template['width'] += tinyMCE.getLang('lang_insert_image_delta_width', 0);
- template['height'] += tinyMCE.getLang('lang_insert_image_delta_height', 0);
-
- if (inst.settings['insertimage_callback']) {
- var returnVal = eval(inst.settings['insertimage_callback'] + "(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout, action);");
- if (returnVal && returnVal['src'])
- TinyMCE_AdvancedTheme._insertImage(returnVal['src'], returnVal['alt'], returnVal['border'], returnVal['hspace'], returnVal['vspace'], returnVal['width'], returnVal['height'], returnVal['align'], returnVal['title'], returnVal['onmouseover'], returnVal['onmouseout']);
- } else
- tinyMCE.openWindow(template, {src : src, alt : alt, border : border, hspace : hspace, vspace : vspace, width : width, height : height, align : align, title : title, onmouseover : onmouseover, onmouseout : onmouseout, action : action, inline : "yes"});
-
- return true;
-
- case "forecolor":
- var fcp = new TinyMCE_Layer(editor_id + '_fcPreview', false), p, img, elm;
-
- TinyMCE_AdvancedTheme._hideMenus(editor_id);
-
- if (!fcp.exists()) {
- fcp.create('div', 'mceColorPreview', document.getElementById(editor_id + '_toolbar'));
- elm = fcp.getElement();
- elm._editor_id = editor_id;
- elm._command = "forecolor";
- elm._switchId = editor_id + "_forecolor";
- tinyMCE.addEvent(elm, 'click', TinyMCE_AdvancedTheme._handleMenuEvent);
- tinyMCE.addEvent(elm, 'mouseover', TinyMCE_AdvancedTheme._handleMenuEvent);
- tinyMCE.addEvent(elm, 'mouseout', TinyMCE_AdvancedTheme._handleMenuEvent);
- }
-
- img = tinyMCE.selectNodes(document.getElementById(editor_id + "_forecolor"), function(n) {return n.nodeName == "IMG";})[0];
- p = tinyMCE.getAbsPosition(img, document.getElementById(editor_id + '_toolbar'));
-
- fcp.moveTo(p.absLeft, p.absTop);
- fcp.getElement().style.backgroundColor = value != null ? value : tinyMCE.getInstanceById(editor_id).foreColor;
- fcp.show();
-
- return false;
-
- case "forecolorpicker":
- this._pickColor(editor_id, 'forecolor');
- return true;
-
- case "forecolorMenu":
- TinyMCE_AdvancedTheme._hideMenus(editor_id);
-
- // Create color layer
- var ml = new TinyMCE_Layer(editor_id + '_fcMenu');
-
- if (!ml.exists())
- ml.create('div', 'mceMenu', document.body, TinyMCE_AdvancedTheme._getColorHTML(editor_id, 'theme_advanced_text_colors', 'forecolor'));
-
- tinyMCE.switchClass(editor_id + '_forecolor', 'mceMenuButtonFocus');
- ml.moveRelativeTo(document.getElementById(editor_id + "_forecolor"), 'bl');
-
- ml.moveBy(tinyMCE.isMSIE && !tinyMCE.isOpera ? -1 : 1, -1);
-
- if (tinyMCE.isOpera)
- ml.moveBy(0, -2);
-
- ml.show();
- return true;
-
- case "HiliteColor":
- var bcp = new TinyMCE_Layer(editor_id + '_bcPreview', false), p, img;
-
- TinyMCE_AdvancedTheme._hideMenus(editor_id);
-
- if (!bcp.exists()) {
- bcp.create('div', 'mceColorPreview', document.getElementById(editor_id + '_toolbar'));
- elm = bcp.getElement();
- elm._editor_id = editor_id;
- elm._command = "HiliteColor";
- elm._switchId = editor_id + "_backcolor";
- tinyMCE.addEvent(elm, 'click', TinyMCE_AdvancedTheme._handleMenuEvent);
- tinyMCE.addEvent(elm, 'mouseover', TinyMCE_AdvancedTheme._handleMenuEvent);
- tinyMCE.addEvent(elm, 'mouseout', TinyMCE_AdvancedTheme._handleMenuEvent);
- }
-
- img = tinyMCE.selectNodes(document.getElementById(editor_id + "_backcolor"), function(n) {return n.nodeName == "IMG";})[0];
- p = tinyMCE.getAbsPosition(img, document.getElementById(editor_id + '_toolbar'));
-
- bcp.moveTo(p.absLeft, p.absTop);
- bcp.getElement().style.backgroundColor = value != null ? value : tinyMCE.getInstanceById(editor_id).backColor;
- bcp.show();
-
- return false;
-
- case "HiliteColorMenu":
- TinyMCE_AdvancedTheme._hideMenus(editor_id);
-
- // Create color layer
- var ml = new TinyMCE_Layer(editor_id + '_bcMenu');
-
- if (!ml.exists())
- ml.create('div', 'mceMenu', document.body, TinyMCE_AdvancedTheme._getColorHTML(editor_id, 'theme_advanced_background_colors', 'HiliteColor'));
-
- tinyMCE.switchClass(editor_id + '_backcolor', 'mceMenuButtonFocus');
- ml.moveRelativeTo(document.getElementById(editor_id + "_backcolor"), 'bl');
-
- ml.moveBy(tinyMCE.isMSIE && !tinyMCE.isOpera ? -1 : 1, -1);
-
- if (tinyMCE.isOpera)
- ml.moveBy(0, -2);
-
- ml.show();
- return true;
-
- case "backcolorpicker":
- this._pickColor(editor_id, 'HiliteColor');
- return true;
-
- case "mceColorPicker":
- if (user_interface) {
- var template = [];
-
- if (!value['callback'] && !value['color'])
- value['color'] = value['document'].getElementById(value['element_id']).value;
-
- template['file'] = 'color_picker.htm';
- template['width'] = 380;
- template['height'] = 250;
- template['close_previous'] = "no";
-
- template['width'] += tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_width', 0);
- template['height'] += tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_height', 0);
-
- if (typeof(value['store_selection']) == "undefined")
- value['store_selection'] = true;
-
- tinyMCE.lastColorPickerValue = value;
- tinyMCE.openWindow(template, {editor_id : editor_id, mce_store_selection : value['store_selection'], inline : "yes", command : "mceColorPicker", input_color : value['color']});
- } else {
- var savedVal = tinyMCE.lastColorPickerValue, elm;
-
- if (savedVal['callback']) {
- savedVal['callback'](value);
- return true;
- }
-
- elm = savedVal['document'].getElementById(savedVal['element_id']);
- elm.value = value;
-
- if (elm.onchange != null && elm.onchange != '')
- eval('elm.onchange();');
- }
- return true;
-
- case "mceCodeEditor":
- var template = new Array();
-
- template['file'] = 'source_editor.htm';
- template['width'] = parseInt(tinyMCE.getParam("theme_advanced_source_editor_width", 720));
- template['height'] = parseInt(tinyMCE.getParam("theme_advanced_source_editor_height", 580));
-
- tinyMCE.openWindow(template, {editor_id : editor_id, resizable : "yes", scrollbars : "no", inline : "yes"});
- return true;
-
- case "mceCharMap":
- var template = new Array();
-
- template['file'] = 'charmap.htm';
- template['width'] = 550 + (tinyMCE.isOpera ? 40 : 0);
- template['height'] = 250;
-
- template['width'] += tinyMCE.getLang('lang_theme_advanced_charmap_delta_width', 0);
- template['height'] += tinyMCE.getLang('lang_theme_advanced_charmap_delta_height', 0);
-
- tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
- return true;
-
- case "mceInsertAnchor":
- var template = new Array();
-
- template['file'] = 'anchor.htm';
- template['width'] = 320;
- template['height'] = 90 + (tinyMCE.isNS7 ? 30 : 0);
-
- template['width'] += tinyMCE.getLang('lang_theme_advanced_anchor_delta_width', 0);
- template['height'] += tinyMCE.getLang('lang_theme_advanced_anchor_delta_height', 0);
-
- tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});
- return true;
-
- case "mceNewDocument":
- if (confirm(tinyMCE.entityDecode(tinyMCE.getLang('lang_newdocument'))))
- tinyMCE.execInstanceCommand(editor_id, 'mceSetContent', false, ' ');
-
- return true;
- }
-
- return false;
- },
-
- /**
- * Editor instance template function.
- */
- getEditorTemplate : function(settings, editorId) {
- function removeFromArray(in_array, remove_array) {
- var outArray = new Array(), skip;
-
- for (var i=0; i<in_array.length; i++) {
- skip = false;
-
- for (var j=0; j<remove_array.length; j++) {
- if (in_array[i] == remove_array[j]) {
- skip = true;
- }
- }
-
- if (!skip) {
- outArray[outArray.length] = in_array[i];
- }
- }
-
- return outArray;
- }
-
- function addToArray(in_array, add_array) {
- for (var i=0; i<add_array.length; i++) {
- in_array[in_array.length] = add_array[i];
- }
-
- return in_array;
- }
-
- var template = new Array();
- var deltaHeight = 0;
- var resizing = tinyMCE.getParam("theme_advanced_resizing", false);
- var path = tinyMCE.getParam("theme_advanced_path", true);
- var statusbarHTML = '<div id="{$editor_id}_path" class="mceStatusbarPathText" style="display: ' + (path ? "block" : "none") + '">&#160;</div><div id="{$editor_id}_resize" class="mceStatusbarResize" style="display: ' + (resizing ? "block" : "none") + '" onmousedown="tinyMCE.themes.advanced._setResizing(event,\'{$editor_id}\',true);"></div><br style="clear: both" />';
- var layoutManager = tinyMCE.getParam("theme_advanced_layout_manager", "SimpleLayout");
-
- // Setup style select options -- MOVED UP FOR EXTERNAL TOOLBAR COMPATABILITY!
- var styleSelectHTML = '<option value="">{$lang_theme_style_select}</option>';
- if (settings['theme_advanced_styles']) {
- var stylesAr = settings['theme_advanced_styles'].split(';');
-
- for (var i=0; i<stylesAr.length; i++) {
- var key, value;
-
- key = stylesAr[i].split('=')[0];
- value = stylesAr[i].split('=')[1];
-
- styleSelectHTML += '<option value="' + value + '">' + key + '</option>';
- }
-
- TinyMCE_AdvancedTheme._autoImportCSSClasses = false;
- }
-
- switch(layoutManager) {
- case "SimpleLayout" : //the default TinyMCE Layout (for backwards compatibility)...
- var toolbarHTML = "";
- var toolbarLocation = tinyMCE.getParam("theme_advanced_toolbar_location", "bottom");
- var toolbarAlign = tinyMCE.getParam("theme_advanced_toolbar_align", "center");
- var pathLocation = tinyMCE.getParam("theme_advanced_path_location", "none"); // Compatiblity
- var statusbarLocation = tinyMCE.getParam("theme_advanced_statusbar_location", pathLocation);
- var defVals = {
- theme_advanced_buttons1 : "bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect",
- theme_advanced_buttons2 : "bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code",
- theme_advanced_buttons3 : "hr,removeformat,visualaid,separator,sub,sup,separator,charmap"
- };
-
- // Add accessibility control
- toolbarHTML += '<a href="#" accesskey="q" title="' + tinyMCE.getLang("lang_toolbar_focus") + '"';
-
- if (!tinyMCE.getParam("accessibility_focus"))
- toolbarHTML += ' onfocus="tinyMCE.getInstanceById(\'' + editorId + '\').getWin().focus();"';
-
- toolbarHTML += '></a>';
-
- // Render rows
- for (var i=1; i<100; i++) {
- var def = defVals["theme_advanced_buttons" + i];
-
- var buttons = tinyMCE.getParam("theme_advanced_buttons" + i, def == null ? '' : def, true, ',');
- if (buttons.length == 0)
- break;
-
- buttons = removeFromArray(buttons, tinyMCE.getParam("theme_advanced_disable", "", true, ','));
- buttons = addToArray(buttons, tinyMCE.getParam("theme_advanced_buttons" + i + "_add", "", true, ','));
- buttons = addToArray(tinyMCE.getParam("theme_advanced_buttons" + i + "_add_before", "", true, ','), buttons);
-
- for (var b=0; b<buttons.length; b++)
- toolbarHTML += tinyMCE.getControlHTML(buttons[b]);
-
- if (buttons.length > 0) {
- toolbarHTML += "<br />";
- deltaHeight -= 23;
- }
- }
-
- // Add accessibility control
- toolbarHTML += '<a href="#" accesskey="z" onfocus="tinyMCE.getInstanceById(\'' + editorId + '\').getWin().focus();"></a>';
-
- // Setup template html
- template['html'] = '<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width_style};height:{$height_style}"><tbody>';
-
- if (toolbarLocation == "top")
- template['html'] += '<tr><td dir="ltr" class="mceToolbarTop" align="' + toolbarAlign + '" height="1" nowrap="nowrap"><span id="' + editorId + '_toolbar" class="mceToolbarContainer">' + toolbarHTML + '</span></td></tr>';
-
- if (statusbarLocation == "top") {
- template['html'] += '<tr><td class="mceStatusbarTop" height="1">' + statusbarHTML + '</td></tr>';
- deltaHeight -= 23;
- }
-
- template['html'] += '<tr><td align="center"><span id="{$editor_id}"></span></td></tr>';
-
- if (toolbarLocation == "bottom")
- template['html'] += '<tr><td dir="ltr" class="mceToolbarBottom" align="' + toolbarAlign + '" height="1"><span id="' + editorId + '_toolbar" class="mceToolbarContainer">' + toolbarHTML + '</span></td></tr>';
-
- // External toolbar changes
- if (toolbarLocation == "external") {
- var bod = document.body;
- var elm = document.createElement ("div");
-
- toolbarHTML = tinyMCE.replaceVar(toolbarHTML, 'style_select_options', styleSelectHTML);
- toolbarHTML = tinyMCE.applyTemplate(toolbarHTML, {editor_id : editorId});
-
- elm.className = "mceToolbarExternal";
- elm.id = editorId+"_toolbar";
- elm.innerHTML = '<table width="100%" border="0" align="center"><tr><td align="center">'+toolbarHTML+'</td></tr></table>';
- bod.appendChild (elm);
- // bod.style.marginTop = elm.offsetHeight + "px";
-
- deltaHeight = 0;
- tinyMCE.getInstanceById(editorId).toolbarElement = elm;
-
- //template['html'] = '<div id="mceExternalToolbar" align="center" class="mceToolbarExternal"><table width="100%" border="0" align="center"><tr><td align="center">'+toolbarHTML+'</td></tr></table></div>' + template["html"];
- } else {
- tinyMCE.getInstanceById(editorId).toolbarElement = null;
- }
-
- if (statusbarLocation == "bottom") {
- template['html'] += '<tr><td class="mceStatusbarBottom" height="1">' + statusbarHTML + '</td></tr>';
- deltaHeight -= 23;
- }
-
- template['html'] += '</tbody></table>';
- //"SimpleLayout"
- break;
-
- case "RowLayout" : //Container Layout - containers defined in "theme_advanced_containers" are rendered from top to bottom.
- template['html'] = '<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width}px;height:{$height}px"><tbody>';
-
- var containers = tinyMCE.getParam("theme_advanced_containers", "", true, ",");
- var defaultContainerCSS = tinyMCE.getParam("theme_advanced_containers_default_class", "container");
- var defaultContainerAlign = tinyMCE.getParam("theme_advanced_containers_default_align", "center");
-
- //Render Containers:
- for (var i = 0; i < containers.length; i++)
- {
- if (containers[i] == "mceEditor") //Exceptions for mceEditor and ...
- template['html'] += '<tr><td align="center" class="mceEditor_border"><span id="{$editor_id}"></span></td></tr>';
- else if (containers[i] == "mceElementpath" || containers[i] == "mceStatusbar") // ... mceElementpath:
- {
- var pathClass = "mceStatusbar";
-
- if (i == containers.length-1)
- {
- pathClass = "mceStatusbarBottom";
- }
- else if (i == 0)
- {
- pathClass = "mceStatusbar";
- }
- else
- {
- deltaHeight-=2;
- }
-
- template['html'] += '<tr><td class="' + pathClass + '" height="1">' + statusbarHTML + '</td></tr>';
- deltaHeight -= 22;
- } else { // Render normal Container
- var curContainer = tinyMCE.getParam("theme_advanced_container_"+containers[i], "", true, ',');
- var curContainerHTML = "";
- var curAlign = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align", defaultContainerAlign);
- var curCSS = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class", defaultContainerCSS);
-
- curContainer = removeFromArray(curContainer, tinyMCE.getParam("theme_advanced_disable", "", true, ','));
-
- for (var j=0; j<curContainer.length; j++)
- curContainerHTML += tinyMCE.getControlHTML(curContainer[j]);
-
- if (curContainer.length > 0) {
- curContainerHTML += "<br />";
- deltaHeight -= 23;
- }
-
- template['html'] += '<tr><td class="' + curCSS + '" align="' + curAlign + '" height="1">' + curContainerHTML + '</td></tr>';
- }
- }
-
- template['html'] += '</tbody></table>';
- //RowLayout
- break;
-
- case "CustomLayout" : //User defined layout callback...
- var customLayout = tinyMCE.getParam("theme_advanced_custom_layout","");
-
- if (customLayout != "" && eval("typeof(" + customLayout + ")") != "undefined") {
- template = eval(customLayout + "(template);");
- }
- break;
- }
-
- if (resizing)
- template['html'] += '<span id="{$editor_id}_resize_box" class="mceResizeBox"></span>';
-
- template['html'] = tinyMCE.replaceVar(template['html'], 'style_select_options', styleSelectHTML);
-
- // Set to default values
- if (!template['delta_width'])
- template['delta_width'] = 0;
-
- if (!template['delta_height'])
- template['delta_height'] = deltaHeight;
-
- return template;
- },
-
- initInstance : function(inst) {
- if (tinyMCE.getParam("theme_advanced_resizing", false)) {
- if (tinyMCE.getParam("theme_advanced_resizing_use_cookie", true)) {
- var w = TinyMCE_AdvancedTheme._getCookie("TinyMCE_" + inst.editorId + "_width");
- var h = TinyMCE_AdvancedTheme._getCookie("TinyMCE_" + inst.editorId + "_height");
-
- TinyMCE_AdvancedTheme._resizeTo(inst, w, h, tinyMCE.getParam("theme_advanced_resize_horizontal", true));
- }
- }
-
- inst.addShortcut('ctrl', 'k', 'lang_link_desc', 'mceLink');
- },
-
- removeInstance : function(inst) {
- new TinyMCE_Layer(inst.editorId + '_fcMenu').remove();
- new TinyMCE_Layer(inst.editorId + '_bcMenu').remove();
- },
-
- hideInstance : function(inst) {
- TinyMCE_AdvancedTheme._hideMenus(inst.editorId);
- },
-
- _handleMenuEvent : function(e) {
- var te = tinyMCE.isMSIE ? window.event.srcElement : e.target;
- tinyMCE._menuButtonEvent(e.type == "mouseover" ? "over" : "out", document.getElementById(te._switchId));
-
- if (e.type == "click")
- tinyMCE.execInstanceCommand(te._editor_id, te._command);
- },
-
- _hideMenus : function(id) {
- var fcml = new TinyMCE_Layer(id + '_fcMenu'), bcml = new TinyMCE_Layer(id + '_bcMenu');
-
- if (fcml.exists() && fcml.isVisible()) {
- tinyMCE.switchClass(id + '_forecolor', 'mceMenuButton');
- fcml.hide();
- }
-
- if (bcml.exists() && bcml.isVisible()) {
- tinyMCE.switchClass(id + '_backcolor', 'mceMenuButton');
- bcml.hide();
- }
- },
-
- /**
- * Node change handler.
- */
- handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection, setup_content) {
- var alignNode, breakOut, classNode;
-
- function selectByValue(select_elm, value, first_index) {
- first_index = typeof(first_index) == "undefined" ? false : true;
-
- if (select_elm) {
- for (var i=0; i<select_elm.options.length; i++) {
- var ov = "" + select_elm.options[i].value;
-
- if (first_index && ov.toLowerCase().indexOf(value.toLowerCase()) == 0) {
- select_elm.selectedIndex = i;
- return true;
- }
-
- if (ov == value) {
- select_elm.selectedIndex = i;
- return true;
- }
- }
- }
-
- return false;
- };
-
- // No node provided
- if (node == null)
- return;
-
- // Update path
- var pathElm = document.getElementById(editor_id + "_path");
- var inst = tinyMCE.getInstanceById(editor_id);
- var doc = inst.getDoc();
- TinyMCE_AdvancedTheme._hideMenus(editor_id);
-
- if (pathElm) {
- // Get node path
- var parentNode = node;
- var path = new Array();
-
- while (parentNode != null) {
- if (parentNode.nodeName.toUpperCase() == "BODY") {
- break;
- }
-
- // Only append element nodes to path
- if (parentNode.nodeType == 1 && tinyMCE.getAttrib(parentNode, "class").indexOf('mceItemHidden') == -1) {
- path[path.length] = parentNode;
- }
-
- parentNode = parentNode.parentNode;
- }
-
- // Setup HTML
- var html = "";
- for (var i=path.length-1; i>=0; i--) {
- var nodeName = path[i].nodeName.toLowerCase();
- var nodeData = "";
-
- if (nodeName.indexOf("html:") == 0)
- nodeName = nodeName.substring(5);
-
- if (nodeName == "b") {
- nodeName = "strong";
- }
-
- if (nodeName == "i") {
- nodeName = "em";
- }
-
- if (nodeName == "span") {
- var cn = tinyMCE.getAttrib(path[i], "class");
- if (cn != "" && cn.indexOf('mceItem') == -1)
- nodeData += "class: " + cn + " ";
-
- var st = tinyMCE.getAttrib(path[i], "style");
- if (st != "") {
- st = tinyMCE.serializeStyle(tinyMCE.parseStyle(st));
- nodeData += "style: " + tinyMCE.xmlEncode(st) + " ";
- }
- }
-
- if (nodeName == "font") {
- if (tinyMCE.getParam("convert_fonts_to_spans"))
- nodeName = "span";
-
- var face = tinyMCE.getAttrib(path[i], "face");
- if (face != "")
- nodeData += "font: " + tinyMCE.xmlEncode(face) + " ";
-
- var size = tinyMCE.getAttrib(path[i], "size");
- if (size != "")
- nodeData += "size: " + tinyMCE.xmlEncode(size) + " ";
-
- var color = tinyMCE.getAttrib(path[i], "color");
- if (color != "")
- nodeData += "color: " + tinyMCE.xmlEncode(color) + " ";
- }
-
- if (tinyMCE.getAttrib(path[i], 'id') != "") {
- nodeData += "id: " + path[i].getAttribute('id') + " ";
- }
-
- var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i], "class"), false);
- if (className != "" && className.indexOf('mceItem') == -1)
- nodeData += "class: " + className + " ";
-
- if (tinyMCE.getAttrib(path[i], 'src') != "") {
- var src = tinyMCE.getAttrib(path[i], "mce_src");
-
- if (src == "")
- src = tinyMCE.getAttrib(path[i], "src");
-
- nodeData += "src: " + tinyMCE.xmlEncode(src) + " ";
- }
-
- if (path[i].nodeName == 'A' && tinyMCE.getAttrib(path[i], 'href') != "") {
- var href = tinyMCE.getAttrib(path[i], "mce_href");
-
- if (href == "")
- href = tinyMCE.getAttrib(path[i], "href");
-
- nodeData += "href: " + tinyMCE.xmlEncode(href) + " ";
- }
-
- className = tinyMCE.getAttrib(path[i], "class");
- if ((nodeName == "img" || nodeName == "span") && className.indexOf('mceItem') != -1) {
- nodeName = className.replace(/mceItem([a-z]+)/gi, '$1').toLowerCase();
- nodeData = path[i].getAttribute('title');
- }
-
- if (nodeName == "a" && (anchor = tinyMCE.getAttrib(path[i], "name")) != "") {
- nodeName = "a";
- nodeName += "#" + tinyMCE.xmlEncode(anchor);
- nodeData = "";
- }
-
- if (tinyMCE.getAttrib(path[i], 'name').indexOf("mce_") != 0) {
- var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i], "class"), false);
- if (className != "" && className.indexOf('mceItem') == -1) {
- nodeName += "." + className;
- }
- }
-
- var cmd = 'tinyMCE.execInstanceCommand(\'' + editor_id + '\',\'mceSelectNodeDepth\',false,\'' + i + '\');';
- html += '<a title="' + nodeData + '" href="javascript:' + cmd + '" onclick="' + cmd + 'return false;" onmousedown="return false;" target="_self" class="mcePathItem">' + nodeName + '</a>';
-
- if (i > 0) {
- html += " &raquo; ";
- }
- }
-
- pathElm.innerHTML = '<a href="#" accesskey="x"></a>' + tinyMCE.getLang('lang_theme_path') + ": " + html + '&#160;';
- }
-
- // Reset old states
- tinyMCE.switchClass(editor_id + '_justifyleft', 'mceButtonNormal');
- tinyMCE.switchClass(editor_id + '_justifyright', 'mceButtonNormal');
- tinyMCE.switchClass(editor_id + '_justifycenter', 'mceButtonNormal');
- tinyMCE.switchClass(editor_id + '_justifyfull', 'mceButtonNormal');
- tinyMCE.switchClass(editor_id + '_bold', 'mceButtonNormal');
- tinyMCE.switchClass(editor_id + '_italic', 'mceButtonNormal');
- tinyMCE.switchClass(editor_id + '_underline', 'mceButtonNormal');
- tinyMCE.switchClass(editor_id + '_strikethrough', 'mceButtonNormal');
- tinyMCE.switchClass(editor_id + '_bullist', 'mceButtonNormal');
- tinyMCE.switchClass(editor_id + '_numlist', 'mceButtonNormal');
- tinyMCE.switchClass(editor_id + '_sub', 'mceButtonNormal');
- tinyMCE.switchClass(editor_id + '_sup', 'mceButtonNormal');
- tinyMCE.switchClass(editor_id + '_anchor', 'mceButtonNormal');
- tinyMCE.switchClass(editor_id + '_link', 'mceButtonDisabled');
- tinyMCE.switchClass(editor_id + '_unlink', 'mceButtonDisabled');
- tinyMCE.switchClass(editor_id + '_outdent', 'mceButtonDisabled');
- tinyMCE.switchClass(editor_id + '_image', 'mceButtonNormal');
- tinyMCE.switchClass(editor_id + '_hr', 'mceButtonNormal');
-
- if (node.nodeName == "A" && tinyMCE.getAttrib(node, "class").indexOf('mceItemAnchor') != -1)
- tinyMCE.switchClass(editor_id + '_anchor', 'mceButtonSelected');
-
- // Get link
- var anchorLink = tinyMCE.getParentElement(node, "a", "href");
-
- if (anchorLink || any_selection) {
- tinyMCE.switchClass(editor_id + '_link', anchorLink ? 'mceButtonSelected' : 'mceButtonNormal');
- tinyMCE.switchClass(editor_id + '_unlink', anchorLink ? 'mceButtonSelected' : 'mceButtonNormal');
- }
-
- // Handle visual aid
- tinyMCE.switchClass(editor_id + '_visualaid', visual_aid ? 'mceButtonSelected' : 'mceButtonNormal');
-
- if (undo_levels != -1) {
- tinyMCE.switchClass(editor_id + '_undo', 'mceButtonDisabled');
- tinyMCE.switchClass(editor_id + '_redo', 'mceButtonDisabled');
- }
-
- // Within li, blockquote
- if (tinyMCE.getParentElement(node, "li,blockquote"))
- tinyMCE.switchClass(editor_id + '_outdent', 'mceButtonNormal');
-
- // Has redo levels
- if (undo_index != -1 && (undo_index < undo_levels-1 && undo_levels > 0))
- tinyMCE.switchClass(editor_id + '_redo', 'mceButtonNormal');
-
- // Has undo levels
- if (undo_index != -1 && (undo_index > 0 && undo_levels > 0))
- tinyMCE.switchClass(editor_id + '_undo', 'mceButtonNormal');
-
- // Select class in select box
- var selectElm = document.getElementById(editor_id + "_styleSelect");
-
- if (selectElm) {
- TinyMCE_AdvancedTheme._setupCSSClasses(editor_id);
-
- classNode = node;
- breakOut = false;
- var index = 0;
-
- do {
- if (classNode && classNode.className) {
- for (var i=0; i<selectElm.options.length; i++) {
- if (selectElm.options[i].value == classNode.className) {
- index = i;
- breakOut = true;
- break;
- }
- }
- }
- } while (!breakOut && classNode != null && (classNode = classNode.parentNode) != null);
-
- selectElm.selectedIndex = index;
- }
-
- // Select formatblock
- var selectElm = document.getElementById(editor_id + "_formatSelect");
- if (selectElm) {
- var elm = tinyMCE.getParentElement(node, "p,div,h1,h2,h3,h4,h5,h6,pre,address");
-
- if (elm)
- selectByValue(selectElm, "<" + elm.nodeName.toLowerCase() + ">");
- else
- selectByValue(selectElm, "");
- }
-
- // Select fontselect
- var selectElm = document.getElementById(editor_id + "_fontNameSelect");
- if (selectElm) {
- if (!tinyMCE.isSafari && !(tinyMCE.isMSIE && !tinyMCE.isOpera)) {
- var face = inst.queryCommandValue('FontName');
-
- face = face == null || face == "" ? "" : face;
-
- selectByValue(selectElm, face, face != "");
- } else {
- var elm = tinyMCE.getParentElement(node, "font", "face");
-
- if (elm) {
- var family = tinyMCE.getAttrib(elm, "face");
-
- if (family == '')
- family = '' + elm.style.fontFamily;
-
- if (!selectByValue(selectElm, family, family != ""))
- selectByValue(selectElm, "");
- } else
- selectByValue(selectElm, "");
- }
- }
-
- // Select fontsize
- var selectElm = document.getElementById(editor_id + "_fontSizeSelect");
- if (selectElm) {
- if (!tinyMCE.isSafari && !tinyMCE.isOpera) {
- var size = inst.queryCommandValue('FontSize');
- selectByValue(selectElm, size == null || size == "" ? "0" : size);
- } else {
- var elm = tinyMCE.getParentElement(node, "font", "size");
- if (elm) {
- var size = tinyMCE.getAttrib(elm, "size");
-
- if (size == '') {
- var sizes = new Array('', '8px', '10px', '12px', '14px', '18px', '24px', '36px');
-
- size = '' + elm.style.fontSize;
-
- for (var i=0; i<sizes.length; i++) {
- if (('' + sizes[i]) == size) {
- size = i;
- break;
- }
- }
- }
-
- if (!selectByValue(selectElm, size))
- selectByValue(selectElm, "");
- } else
- selectByValue(selectElm, "0");
- }
- }
-
- // Handle align attributes
- alignNode = node;
- breakOut = false;
- do {
- if (!alignNode.getAttribute || !alignNode.getAttribute('align'))
- continue;
-
- switch (alignNode.getAttribute('align').toLowerCase()) {
- case "left":
- tinyMCE.switchClass(editor_id + '_justifyleft', 'mceButtonSelected');
- breakOut = true;
- break;
-
- case "right":
- tinyMCE.switchClass(editor_id + '_justifyright', 'mceButtonSelected');
- breakOut = true;
- break;
-
- case "middle":
- case "center":
- tinyMCE.switchClass(editor_id + '_justifycenter', 'mceButtonSelected');
- breakOut = true;
- break;
-
- case "justify":
- tinyMCE.switchClass(editor_id + '_justifyfull', 'mceButtonSelected');
- breakOut = true;
- break;
- }
- } while (!breakOut && (alignNode = alignNode.parentNode) != null);
-
- // Div justification
- var div = tinyMCE.getParentElement(node, "div");
- if (div && div.style.textAlign == "center")
- tinyMCE.switchClass(editor_id + '_justifycenter', 'mceButtonSelected');
-
- // Do special text
- if (!setup_content) {
- // , "JustifyLeft", "_justifyleft", "JustifyCenter", "justifycenter", "JustifyRight", "justifyright", "JustifyFull", "justifyfull", "InsertUnorderedList", "bullist", "InsertOrderedList", "numlist", "InsertUnorderedList", "bullist", "Outdent", "outdent", "Indent", "indent", "subscript", "sub"
- var ar = new Array("Bold", "_bold", "Italic", "_italic", "Strikethrough", "_strikethrough", "superscript", "_sup", "subscript", "_sub");
- for (var i=0; i<ar.length; i+=2) {
- if (inst.queryCommandState(ar[i]))
- tinyMCE.switchClass(editor_id + ar[i+1], 'mceButtonSelected');
- }
-
- if (inst.queryCommandState("Underline") && (node.parentNode == null || node.parentNode.nodeName != "A"))
- tinyMCE.switchClass(editor_id + '_underline', 'mceButtonSelected');
- }
-
- // Handle elements
- do {
- switch (node.nodeName) {
- case "UL":
- tinyMCE.switchClass(editor_id + '_bullist', 'mceButtonSelected');
- break;
-
- case "OL":
- tinyMCE.switchClass(editor_id + '_numlist', 'mceButtonSelected');
- break;
-
- case "HR":
- tinyMCE.switchClass(editor_id + '_hr', 'mceButtonSelected');
- break;
-
- case "IMG":
- if (tinyMCE.getAttrib(node, 'name').indexOf('mce_') != 0 && tinyMCE.getAttrib(node, 'class').indexOf('mceItem') == -1) {
- tinyMCE.switchClass(editor_id + '_image', 'mceButtonSelected');
- }
- break;
- }
- } while ((node = node.parentNode) != null);
- },
-
- // Private theme internal functions
-
- // This function auto imports CSS classes into the class selection droplist
- _setupCSSClasses : function(editor_id) {
- var i, selectElm;
-
- if (!TinyMCE_AdvancedTheme._autoImportCSSClasses)
- return;
-
- selectElm = document.getElementById(editor_id + '_styleSelect');
-
- if (selectElm && selectElm.getAttribute('cssImported') != 'true') {
- var csses = tinyMCE.getCSSClasses(editor_id);
- if (csses && selectElm) {
- for (i=0; i<csses.length; i++)
- selectElm.options[selectElm.options.length] = new Option(csses[i], csses[i]);
- }
-
- // Only do this once
- if (csses != null && csses.length > 0)
- selectElm.setAttribute('cssImported', 'true');
- }
- },
-
- _setCookie : function(name, value, expires, path, domain, secure) {
- var curCookie = name + "=" + escape(value) +
- ((expires) ? "; expires=" + expires.toGMTString() : "") +
- ((path) ? "; path=" + escape(path) : "") +
- ((domain) ? "; domain=" + domain : "") +
- ((secure) ? "; secure" : "");
-
- document.cookie = curCookie;
- },
-
- _getCookie : function(name) {
- var dc = document.cookie;
- var prefix = name + "=";
- var begin = dc.indexOf("; " + prefix);
-
- if (begin == -1) {
- begin = dc.indexOf(prefix);
-
- if (begin != 0)
- return null;
- } else
- begin += 2;
-
- var end = document.cookie.indexOf(";", begin);
-
- if (end == -1)
- end = dc.length;
-
- return unescape(dc.substring(begin + prefix.length, end));
- },
-
- _resizeTo : function(inst, w, h, set_w) {
- var editorContainer = document.getElementById(inst.editorId + '_parent');
- var tableElm = editorContainer.firstChild;
- var iframe = inst.iframeElement;
-
- if (w == null || w == "null") {
- set_w = false;
- w = 0;
- }
-
- if (h == null || h == "null")
- return;
-
- w = parseInt(w);
- h = parseInt(h);
-
- if (tinyMCE.isGecko) {
- w += 2;
- h += 2;
- }
-
- var dx = w - tableElm.clientWidth;
- var dy = h - tableElm.clientHeight;
-
- w = w < 1 ? 30 : w;
- h = h < 1 ? 30 : h;
-
- if (set_w)
- tableElm.style.width = w + "px";
-
- tableElm.style.height = h + "px";
-
- iw = iframe.clientWidth + dx;
- ih = iframe.clientHeight + dy;
-
- iw = iw < 1 ? 30 : iw;
- ih = ih < 1 ? 30 : ih;
-
- if (tinyMCE.isGecko) {
- iw -= 2;
- ih -= 2;
- }
-
- if (set_w)
- iframe.style.width = iw + "px";
-
- iframe.style.height = ih + "px";
-
- // Is it to small, make it bigger again
- if (set_w) {
- var tableBodyElm = tableElm.firstChild;
- var minIframeWidth = tableBodyElm.scrollWidth;
- if (inst.iframeElement.clientWidth < minIframeWidth) {
- dx = minIframeWidth - inst.iframeElement.clientWidth;
-
- inst.iframeElement.style.width = (iw + dx) + "px";
- }
- }
-
- // Remove pesky table controls
- inst.useCSS = false;
- },
-
- /**
- * Handles resizing events.
- */
- _resizeEventHandler : function(e) {
- var resizer = TinyMCE_AdvancedTheme._resizer;
-
- // Do nothing
- if (!resizer.resizing)
- return;
-
- e = typeof(e) == "undefined" ? window.event : e;
-
- var dx = e.screenX - resizer.downX;
- var dy = e.screenY - resizer.downY;
- var resizeBox = resizer.resizeBox;
- var editorId = resizer.editorId;
-
- switch (e.type) {
- case "mousemove":
- var w, h;
-
- w = resizer.width + dx;
- h = resizer.height + dy;
-
- w = w < 1 ? 1 : w;
- h = h < 1 ? 1 : h;
-
- if (resizer.horizontal)
- resizeBox.style.width = w + "px";
-
- resizeBox.style.height = h + "px";
- break;
-
- case "mouseup":
- TinyMCE_AdvancedTheme._setResizing(e, editorId, false);
- TinyMCE_AdvancedTheme._resizeTo(tinyMCE.getInstanceById(editorId), resizer.width + dx, resizer.height + dy, resizer.horizontal);
-
- // Expire in a month
- if (tinyMCE.getParam("theme_advanced_resizing_use_cookie", true)) {
- var expires = new Date();
- expires.setTime(expires.getTime() + 3600000 * 24 * 30);
-
- // Set the cookies
- TinyMCE_AdvancedTheme._setCookie("TinyMCE_" + editorId + "_width", "" + (resizer.horizontal ? resizer.width + dx : ""), expires);
- TinyMCE_AdvancedTheme._setCookie("TinyMCE_" + editorId + "_height", "" + (resizer.height + dy), expires);
- }
- break;
- }
- },
-
- /**
- * Starts/stops the editor resizing.
- */
- _setResizing : function(e, editor_id, state) {
- e = typeof(e) == "undefined" ? window.event : e;
-
- var resizer = TinyMCE_AdvancedTheme._resizer;
- var editorContainer = document.getElementById(editor_id + '_parent');
- var editorArea = document.getElementById(editor_id + '_parent').firstChild;
- var resizeBox = document.getElementById(editor_id + '_resize_box');
- var inst = tinyMCE.getInstanceById(editor_id);
-
- if (state) {
- // Place box over editor area
- var width = editorArea.clientWidth;
- var height = editorArea.clientHeight;
-
- resizeBox.style.width = width + "px";
- resizeBox.style.height = height + "px";
-
- resizer.iframeWidth = inst.iframeElement.clientWidth;
- resizer.iframeHeight = inst.iframeElement.clientHeight;
-
- // Hide editor and show resize box
- editorArea.style.display = "none";
- resizeBox.style.display = "block";
-
- // Add event handlers, only once
- if (!resizer.eventHandlers) {
- if (tinyMCE.isMSIE)
- tinyMCE.addEvent(document, "mousemove", TinyMCE_AdvancedTheme._resizeEventHandler);
- else
- tinyMCE.addEvent(window, "mousemove", TinyMCE_AdvancedTheme._resizeEventHandler);
-
- tinyMCE.addEvent(document, "mouseup", TinyMCE_AdvancedTheme._resizeEventHandler);
-
- resizer.eventHandlers = true;
- }
-
- resizer.resizing = true;
- resizer.downX = e.screenX;
- resizer.downY = e.screenY;
- resizer.width = parseInt(resizeBox.style.width);
- resizer.height = parseInt(resizeBox.style.height);
- resizer.editorId = editor_id;
- resizer.resizeBox = resizeBox;
- resizer.horizontal = tinyMCE.getParam("theme_advanced_resize_horizontal", true);
- } else {
- resizer.resizing = false;
- resizeBox.style.display = "none";
- editorArea.style.display = tinyMCE.isMSIE && !tinyMCE.isOpera ? "block" : "table";
- tinyMCE.execCommand('mceResetDesignMode');
- }
- },
-
- _getColorHTML : function(id, n, cm) {
- var i, h, cl;
-
- h = '<span class="mceMenuLine"></span>';
- cl = tinyMCE.getParam(n, TinyMCE_AdvancedTheme._defColors).split(',');
-
- h += '<table class="mceColors"><tr>';
- for (i=0; i<cl.length; i++) {
- c = 'tinyMCE.execInstanceCommand(\'' + id + '\', \'' + cm + '\', false, \'#' + cl[i] + '\');';
- h += '<td><a href="javascript:' + c + '" style="background-color: #' + cl[i] + '" onclick="' + c + ';return false;"></a></td>';
-
- if ((i+1) % 8 == 0)
- h += '</tr><tr>';
- }
-
- h += '</tr></table>';
-
- if (tinyMCE.getParam("theme_advanced_more_colors", true))
- h += '<a href="javascript:void(0);" onclick="TinyMCE_AdvancedTheme._pickColor(\'' + id + '\',\'' + cm + '\');" class="mceMoreColors">' + tinyMCE.getLang('lang_more_colors') + '</a>';
-
- return h;
- },
-
- _pickColor : function(id, cm) {
- var inputColor, inst = tinyMCE.selectedInstance;
-
- if (cm == 'forecolor' && inst)
- inputColor = inst.foreColor;
-
- if ((cm == 'backcolor' || cm == 'HiliteColor') && inst)
- inputColor = inst.backColor;
-
- tinyMCE.execCommand('mceColorPicker', true, {color : inputColor, callback : function(c) {
- tinyMCE.execInstanceCommand(id, cm, false, c);
- }});
- },
-
- _insertImage : function(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout) {
- tinyMCE.execCommand("mceInsertContent", false, tinyMCE.createTagHTML('img', {
- src : tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings.base_href, src), // Force absolute
- mce_src : src,
- alt : alt,
- border : border,
- hspace : hspace,
- vspace : vspace,
- width : width,
- height : height,
- align : align,
- title : title,
- onmouseover : onmouseover,
- onmouseout : onmouseout
- }));
- },
-
- _insertLink : function(href, target, title, onclick, style_class) {
- tinyMCE.execCommand('mceBeginUndoLevel');
-
- if (tinyMCE.selectedInstance && tinyMCE.selectedElement && tinyMCE.selectedElement.nodeName.toLowerCase() == "img") {
- var doc = tinyMCE.selectedInstance.getDoc();
- var linkElement = tinyMCE.getParentElement(tinyMCE.selectedElement, "a");
- var newLink = false;
-
- if (!linkElement) {
- linkElement = doc.createElement("a");
- newLink = true;
- }
-
- var mhref = href;
- var thref = eval(tinyMCE.settings['urlconverter_callback'] + "(href, linkElement);");
- mhref = tinyMCE.getParam('convert_urls') ? href : mhref;
-
- tinyMCE.setAttrib(linkElement, 'href', thref);
- tinyMCE.setAttrib(linkElement, 'mce_href', mhref);
- tinyMCE.setAttrib(linkElement, 'target', target);
- tinyMCE.setAttrib(linkElement, 'title', title);
- tinyMCE.setAttrib(linkElement, 'onclick', onclick);
- tinyMCE.setAttrib(linkElement, 'class', style_class);
-
- if (newLink) {
- linkElement.appendChild(tinyMCE.selectedElement.cloneNode(true));
- tinyMCE.selectedElement.parentNode.replaceChild(linkElement, tinyMCE.selectedElement);
- }
-
- return;
- }
-
- if (!tinyMCE.linkElement && tinyMCE.selectedInstance) {
- if (tinyMCE.isSafari) {
- tinyMCE.execCommand("mceInsertContent", false, '<a href="' + tinyMCE.uniqueURL + '">' + tinyMCE.selectedInstance.selection.getSelectedHTML() + '</a>');
- } else
- tinyMCE.selectedInstance.contentDocument.execCommand("createlink", false, tinyMCE.uniqueURL);
-
- tinyMCE.linkElement = tinyMCE.getElementByAttributeValue(tinyMCE.selectedInstance.contentDocument.body, "a", "href", tinyMCE.uniqueURL);
-
- var elementArray = tinyMCE.getElementsByAttributeValue(tinyMCE.selectedInstance.contentDocument.body, "a", "href", tinyMCE.uniqueURL);
-
- for (var i=0; i<elementArray.length; i++) {
- var mhref = href;
- var thref = eval(tinyMCE.settings['urlconverter_callback'] + "(href, elementArray[i]);");
- mhref = tinyMCE.getParam('convert_urls') ? href : mhref;
-
- tinyMCE.setAttrib(elementArray[i], 'href', thref);
- tinyMCE.setAttrib(elementArray[i], 'mce_href', mhref);
- tinyMCE.setAttrib(elementArray[i], 'target', target);
- tinyMCE.setAttrib(elementArray[i], 'title', title);
- tinyMCE.setAttrib(elementArray[i], 'onclick', onclick);
- tinyMCE.setAttrib(elementArray[i], 'class', style_class);
- }
-
- tinyMCE.linkElement = elementArray[0];
- }
-
- if (tinyMCE.linkElement) {
- var mhref = href;
- href = eval(tinyMCE.settings['urlconverter_callback'] + "(href, tinyMCE.linkElement);");
- mhref = tinyMCE.getParam('convert_urls') ? href : mhref;
-
- tinyMCE.setAttrib(tinyMCE.linkElement, 'href', href);
- tinyMCE.setAttrib(tinyMCE.linkElement, 'mce_href', mhref);
- tinyMCE.setAttrib(tinyMCE.linkElement, 'target', target);
- tinyMCE.setAttrib(tinyMCE.linkElement, 'title', title);
- tinyMCE.setAttrib(tinyMCE.linkElement, 'onclick', onclick);
- tinyMCE.setAttrib(tinyMCE.linkElement, 'class', style_class);
- }
-
- tinyMCE.execCommand('mceEndUndoLevel');
- }
-};
-
-tinyMCE.addTheme("advanced", TinyMCE_AdvancedTheme);
-
-// Add default buttons maps for advanced theme and all internal plugins
-tinyMCE.addButtonMap(TinyMCE_AdvancedTheme._buttonMap);
+/**
+ * $Id: editor_template_src.js 766 2008-04-03 20:37:06Z spocke $
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
+ */
+
+(function() {
+ var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode;
+
+ // Tell it to load theme specific language pack(s)
+ tinymce.ThemeManager.requireLangPack('advanced');
+
+ tinymce.create('tinymce.themes.AdvancedTheme', {
+ // Control name lookup, format: title, command
+ 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;
+
+ t.editor = ed;
+ t.url = url;
+ t.onResolveName = new tinymce.util.Dispatcher(this);
+
+ // Default settings
+ 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_font_sizes : "1,2,3,4,5,6,7",
+ theme_advanced_more_colors : 1,
+ theme_advanced_row_height : 23,
+ theme_advanced_resize_horizontal : 1,
+ theme_advanced_resizing_use_cookie : 1
+ }, ed.settings);
+
+ 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;
+
+ // Init editor
+ 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(ed.baseURI.toAbsolute(s.editor_css || "themes/advanced/skins/" + ed.settings.skin + "/ui.css"));
+
+ if (s.skin_variant)
+ DOM.loadCSS(ed.baseURI.toAbsolute(s.editor_css || "themes/advanced/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() {
+ 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) {
+ Event.add(n, 'focus', t._importClasses, t);
+ Event.add(n, 'mousedown', 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 c, t = this, lo = [
+ "1 (8 pt)",
+ "2 (10 pt)",
+ "3 (12 pt)",
+ "4 (14 pt)",
+ "5 (18 pt)",
+ "6 (24 pt)",
+ "7 (36 pt)"
+ ], fz = [8, 10, 12, 14, 18, 24, 36];
+
+ c = t.editor.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', cmd : 'FontSize'});
+ if (c) {
+ each(explode(t.settings.theme_advanced_font_sizes), function(v) {
+ c.add(lo[parseInt(v) - 1], v, {'style' : 'font-size:' + fz[v - 1] + 'pt', 'class' : 'mceFontSize' + v});
+ });
+ }
+
+ 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;
+
+ 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;
+
+ 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;
+
+ // Add classes to first and last TRs
+ nl = DOM.stdMode ? sc.getElementsByTagName('tr') : sc.rows; // Quick fix for IE 8
+ DOM.addClass(nl[0], 'mceFirst');
+ DOM.addClass(nl[nl.length - 1], 'mceLast');
+
+ // Add classes to first and last TDs
+ 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 (DOM.get(ed.id + '_path_row')) {
+ Event.add(ed.id + '_tbl', 'mouseover', function(e) {
+ var re;
+
+ e = e.target;
+
+ if (e.nodeName == 'SPAN' && DOM.hasClass(e.parentNode, 'mceButton')) {
+ re = DOM.get(ed.id + '_path_row');
+ t.lastPath = re.innerHTML;
+ DOM.setHTML(re, e.parentNode.title);
+ }
+ });
+
+ Event.add(ed.id + '_tbl', 'mouseout', function(e) {
+ if (t.lastPath) {
+ DOM.setHTML(ed.id + '_path_row', t.lastPath);
+ t.lastPath = 0;
+ }
+ });
+ }
+*/
+
+ if (!ed.getParam('accessibility_focus') || ed.getParam('tab_focus'))
+ Event.add(DOM.add(p, 'a', {href : '#'}, '<!-- IE -->'), '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;
+
+ // Boundery fix box
+ 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);
+
+ // 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});
+ },
+
+ destroy : function() {
+ var id = this.editor.id;
+
+ Event.clear(id + '_resize');
+ Event.clear(id + '_path_row');
+ Event.clear(id + '_external_close');
+ },
+
+ // Internal functions
+
+ _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;
+
+ // Create toolbar container at top
+ if (lo == 'top')
+ t._addToolbars(tb, o);
+
+ // Create external toolbar
+ 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);
+
+ // Fixes IE rendering bug
+ DOM.hide(e);
+ DOM.show(e);
+ e.style.filter = '';
+
+ lastExtID = ed.id + '_external';
+
+ e = null;
+ });
+ }
+
+ if (sl == 'top')
+ t._addStatusBar(tb, o);
+
+ // Create iframe container
+ if (!s.theme_advanced_toolbar_container) {
+ n = DOM.add(tb, 'tr');
+ n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
+ }
+
+ // Create toolbar container at bottom
+ 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 (c.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'].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;
+
+ // Compatiblity with 2.x
+ 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();'}, '<!-- IE -->'));
+
+ h.push(DOM.createHTML('a', {href : '#', accesskey : 'q', title : ed.getLang("advanced.toolbar_focus")}, '<!-- IE -->'));
+
+ // Create toolbar and add the controls
+ 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);
+
+ //n.appendChild(n = tb.render());
+ 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();'}, '<!-- IE -->'));
+ 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') + ': ' : '&nbsp;');
+ 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;
+
+ // 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);
+
+ // Resize placeholder
+ 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;
+
+ // 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';
+
+ 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;
+
+ 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 (c = cm.get('fontselect'))
+ c.select(ed.queryCommandValue('FontName'));
+
+ if (c = cm.get('fontsizeselect'))
+ c.select(ed.queryCommandValue('FontSize'));
+
+ 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 = '';
+
+ // Ignore non element and hidden elements
+ if (n.nodeType != 1 || (DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved')))
+ return;
+
+ // Fake name
+ if (v = DOM.getAttrib(n, 'mce_name'))
+ na = v;
+
+ // Handle prefix
+ if (tinymce.isIE && n.scopeName !== 'HTML')
+ na = n.scopeName + ':' + na;
+
+ // Remove internal prefix
+ na = na.replace(/mce\:/g, '');
+
+ // Handle node name
+ 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;
+
+ //u = "javascript:tinymce.EditorManager.get('" + ed.id + "').theme._sel('" + (de++) + "');";
+ 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());
+ }
+ },
+
+ // Commands gets called by execCommand
+
+ _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;
+
+ // Internal image object like a flash placeholder
+ 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, {
+ func : function(co) {
+ t.editor.execCommand('ForeColor', false, co);
+ }
+ });
+ },
+
+ _mceBackColor : function() {
+ var t = this;
+
+ this._mceColorPicker(0, {
+ func : function(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
diff --git a/program/js/tiny_mce/themes/advanced/image.htm b/program/js/tiny_mce/themes/advanced/image.htm
index cceea955e..6c366469c 100644
--- a/program/js/tiny_mce/themes/advanced/image.htm
+++ b/program/js/tiny_mce/themes/advanced/image.htm
@@ -1,100 +1,86 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>{$lang_insert_image_title}</title>
- <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
- <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
- <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
- <script language="javascript" type="text/javascript" src="jscripts/image.js"></script>
- <base target="_self" />
-</head>
-<body id="image" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
-<form onsubmit="insertImage();return false;" action="#">
- <div class="tabs">
- <ul>
- <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_insert_image_title}</a></span></li>
- </ul>
- </div>
-
- <div class="panel_wrapper">
- <div id="general_panel" class="panel current">
- <table border="0" cellpadding="4" cellspacing="0">
- <tr>
- <td nowrap="nowrap"><label for="src">{$lang_insert_image_src}</label></td>
- <td><table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input id="src" name="src" type="text" value="" style="width: 200px" onchange="getImageData();" /></td>
- <td id="srcbrowsercontainer">&nbsp;</td>
- </tr>
- </table></td>
- </tr>
- <!-- Image list -->
- <script language="javascript">
- if (typeof(tinyMCEImageList) != "undefined" && tinyMCEImageList.length > 0) {
- var html = "";
-
- html += '<tr><td><label for="image_list">{$lang_image_list}</label></td>';
- html += '<td><select id="image_list" name="image_list" style="width: 200px" onchange="this.form.src.value=this.options[this.selectedIndex].value;resetImageData();getImageData();">';
- html += '<option value="">---</option>';
-
- for (var i=0; i<tinyMCEImageList.length; i++)
- html += '<option value="' + tinyMCEImageList[i][1] + '">' + tinyMCEImageList[i][0] + '</option>';
-
- html += '</select></td></tr>';
-
- document.write(html);
- }
- </script>
- <!-- /Image list -->
- <tr>
- <td nowrap="nowrap"><label for="alt">{$lang_insert_image_alt}</label></td>
- <td><input id="alt" name="alt" type="text" value="" style="width: 200px" /></td>
- </tr>
- <tr>
- <td nowrap="nowrap"><label for="align">{$lang_insert_image_align}</label></td>
- <td><select id="align" name="align">
- <option value="">{$lang_insert_image_align_default}</option>
- <option value="baseline">{$lang_insert_image_align_baseline}</option>
- <option value="top">{$lang_insert_image_align_top}</option>
- <option value="middle">{$lang_insert_image_align_middle}</option>
- <option value="bottom">{$lang_insert_image_align_bottom}</option>
- <option value="texttop">{$lang_insert_image_align_texttop}</option>
- <option value="absmiddle">{$lang_insert_image_align_absmiddle}</option>
- <option value="absbottom">{$lang_insert_image_align_absbottom}</option>
- <option value="left">{$lang_insert_image_align_left}</option>
- <option value="right">{$lang_insert_image_align_right}</option>
- </select></td>
- </tr>
- <tr>
- <td nowrap="nowrap"><label for="width">{$lang_insert_image_dimensions}</label></td>
- <td><input id="width" name="width" type="text" value="" size="3" maxlength="5" />
- x
- <input id="height" name="height" type="text" value="" size="3" maxlength="5" /></td>
- </tr>
- <tr>
- <td nowrap="nowrap"><label for="border">{$lang_insert_image_border}</label></td>
- <td><input id="border" name="border" type="text" value="" size="3" maxlength="3" /></td>
- </tr>
- <tr>
- <td nowrap="nowrap"><label for="vspace">{$lang_insert_image_vspace}</label></td>
- <td><input id="vspace" name="vspace" type="text" value="" size="3" maxlength="3" /></td>
- </tr>
- <tr>
- <td nowrap="nowrap"><label for="hspace">{$lang_insert_image_hspace}</label></td>
- <td><input id="hspace" name="hspace" type="text" value="" size="3" maxlength="3" /></td>
- </tr>
- </table>
- </div>
- </div>
-
- <div class="mceActionPanel">
- <div style="float: left">
- <input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertImage();" />
- </div>
-
- <div style="float: right">
- <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
- </div>
- </div>
-</form>
-</body>
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#advanced_dlg.image_title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="js/image.js"></script>
+ <base target="_self" />
+</head>
+<body id="image" style="display: none">
+<form onsubmit="ImageDialog.update();return false;" action="#">
+ <div class="tabs">
+ <ul>
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.image_title}</a></span></li>
+ </ul>
+ </div>
+
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel current">
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td nowrap="nowrap"><label for="src">{#advanced_dlg.image_src}</label></td>
+ <td><table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input id="src" name="src" type="text" class="mceFocus" value="" style="width: 200px" onchange="ImageDialog.getImageData();" /></td>
+ <td id="srcbrowsercontainer">&nbsp;</td>
+ </tr>
+ </table></td>
+ </tr>
+ <tr>
+ <td><label for="image_list">{#advanced_dlg.image_list}</label></td>
+ <td><select id="image_list" name="image_list" onchange="document.getElementById('src').value=this.options[this.selectedIndex].value;document.getElementById('alt').value=this.options[this.selectedIndex].text;"></select></td>
+ </tr>
+ <tr>
+ <td nowrap="nowrap"><label for="alt">{#advanced_dlg.image_alt}</label></td>
+ <td><input id="alt" name="alt" type="text" value="" style="width: 200px" /></td>
+ </tr>
+ <tr>
+ <td nowrap="nowrap"><label for="align">{#advanced_dlg.image_align}</label></td>
+ <td><select id="align" name="align" onchange="ImageDialog.updateStyle();">
+ <option value="">{#not_set}</option>
+ <option value="baseline">{#advanced_dlg.image_align_baseline}</option>
+ <option value="top">{#advanced_dlg.image_align_top}</option>
+ <option value="middle">{#advanced_dlg.image_align_middle}</option>
+ <option value="bottom">{#advanced_dlg.image_align_bottom}</option>
+ <option value="text-top">{#advanced_dlg.image_align_texttop}</option>
+ <option value="text-bottom">{#advanced_dlg.image_align_textbottom}</option>
+ <option value="left">{#advanced_dlg.image_align_left}</option>
+ <option value="right">{#advanced_dlg.image_align_right}</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td nowrap="nowrap"><label for="width">{#advanced_dlg.image_dimensions}</label></td>
+ <td><input id="width" name="width" type="text" value="" size="3" maxlength="5" />
+ x
+ <input id="height" name="height" type="text" value="" size="3" maxlength="5" /></td>
+ </tr>
+ <tr>
+ <td nowrap="nowrap"><label for="border">{#advanced_dlg.image_border}</label></td>
+ <td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
+ </tr>
+ <tr>
+ <td nowrap="nowrap"><label for="vspace">{#advanced_dlg.image_vspace}</label></td>
+ <td><input id="vspace" name="vspace" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
+ </tr>
+ <tr>
+ <td nowrap="nowrap"><label for="hspace">{#advanced_dlg.image_hspace}</label></td>
+ <td><input id="hspace" name="hspace" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" /></td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+ <div class="mceActionPanel">
+ <div style="float: left">
+ <input type="submit" id="insert" name="insert" value="{#insert}" />
+ </div>
+
+ <div style="float: right">
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
+ </div>
+ </div>
+</form>
+</body>
+</html>
diff --git a/program/js/tiny_mce/themes/advanced/images/anchor.gif b/program/js/tiny_mce/themes/advanced/images/anchor.gif
deleted file mode 100644
index 34ab71534..000000000
--- a/program/js/tiny_mce/themes/advanced/images/anchor.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/backcolor.gif b/program/js/tiny_mce/themes/advanced/images/backcolor.gif
deleted file mode 100644
index d03e206a3..000000000
--- a/program/js/tiny_mce/themes/advanced/images/backcolor.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/bold.gif b/program/js/tiny_mce/themes/advanced/images/bold.gif
deleted file mode 100644
index d6a9cc2cd..000000000
--- a/program/js/tiny_mce/themes/advanced/images/bold.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/bold_de_se.gif b/program/js/tiny_mce/themes/advanced/images/bold_de_se.gif
deleted file mode 100644
index 9b129de25..000000000
--- a/program/js/tiny_mce/themes/advanced/images/bold_de_se.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/bold_es.gif b/program/js/tiny_mce/themes/advanced/images/bold_es.gif
deleted file mode 100644
index ea341e608..000000000
--- a/program/js/tiny_mce/themes/advanced/images/bold_es.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/bold_fr.gif b/program/js/tiny_mce/themes/advanced/images/bold_fr.gif
deleted file mode 100644
index 281645451..000000000
--- a/program/js/tiny_mce/themes/advanced/images/bold_fr.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/bold_ru.gif b/program/js/tiny_mce/themes/advanced/images/bold_ru.gif
deleted file mode 100644
index e000d461c..000000000
--- a/program/js/tiny_mce/themes/advanced/images/bold_ru.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/bold_tw.gif b/program/js/tiny_mce/themes/advanced/images/bold_tw.gif
deleted file mode 100644
index 82085432c..000000000
--- a/program/js/tiny_mce/themes/advanced/images/bold_tw.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/browse.gif b/program/js/tiny_mce/themes/advanced/images/browse.gif
deleted file mode 100644
index c786d0b20..000000000
--- a/program/js/tiny_mce/themes/advanced/images/browse.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/bullist.gif b/program/js/tiny_mce/themes/advanced/images/bullist.gif
deleted file mode 100644
index 6e19467c7..000000000
--- a/program/js/tiny_mce/themes/advanced/images/bullist.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/button_menu.gif b/program/js/tiny_mce/themes/advanced/images/button_menu.gif
deleted file mode 100644
index c3d8fa231..000000000
--- a/program/js/tiny_mce/themes/advanced/images/button_menu.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/buttons.gif b/program/js/tiny_mce/themes/advanced/images/buttons.gif
deleted file mode 100644
index 5ad99a7c4..000000000
--- a/program/js/tiny_mce/themes/advanced/images/buttons.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/cancel_button_bg.gif b/program/js/tiny_mce/themes/advanced/images/cancel_button_bg.gif
deleted file mode 100644
index 4b4aeefcb..000000000
--- a/program/js/tiny_mce/themes/advanced/images/cancel_button_bg.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/charmap.gif b/program/js/tiny_mce/themes/advanced/images/charmap.gif
deleted file mode 100644
index 3cdc4ac91..000000000
--- a/program/js/tiny_mce/themes/advanced/images/charmap.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/cleanup.gif b/program/js/tiny_mce/themes/advanced/images/cleanup.gif
deleted file mode 100644
index 16491f6cf..000000000
--- a/program/js/tiny_mce/themes/advanced/images/cleanup.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/close.gif b/program/js/tiny_mce/themes/advanced/images/close.gif
deleted file mode 100644
index 679ca2aa4..000000000
--- a/program/js/tiny_mce/themes/advanced/images/close.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/code.gif b/program/js/tiny_mce/themes/advanced/images/code.gif
deleted file mode 100644
index c5d5a6727..000000000
--- a/program/js/tiny_mce/themes/advanced/images/code.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/color.gif b/program/js/tiny_mce/themes/advanced/images/color.gif
deleted file mode 100644
index 1ecd5743b..000000000
--- a/program/js/tiny_mce/themes/advanced/images/color.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/copy.gif b/program/js/tiny_mce/themes/advanced/images/copy.gif
deleted file mode 100644
index dc146865c..000000000
--- a/program/js/tiny_mce/themes/advanced/images/copy.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/custom_1.gif b/program/js/tiny_mce/themes/advanced/images/custom_1.gif
deleted file mode 100644
index 4cbccdadf..000000000
--- a/program/js/tiny_mce/themes/advanced/images/custom_1.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/cut.gif b/program/js/tiny_mce/themes/advanced/images/cut.gif
deleted file mode 100644
index 4e9a70b6e..000000000
--- a/program/js/tiny_mce/themes/advanced/images/cut.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/forecolor.gif b/program/js/tiny_mce/themes/advanced/images/forecolor.gif
deleted file mode 100644
index 8b7036160..000000000
--- a/program/js/tiny_mce/themes/advanced/images/forecolor.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/help.gif b/program/js/tiny_mce/themes/advanced/images/help.gif
deleted file mode 100644
index 51a1ee420..000000000
--- a/program/js/tiny_mce/themes/advanced/images/help.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/hr.gif b/program/js/tiny_mce/themes/advanced/images/hr.gif
deleted file mode 100644
index 1a1ba2a01..000000000
--- a/program/js/tiny_mce/themes/advanced/images/hr.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/image.gif b/program/js/tiny_mce/themes/advanced/images/image.gif
deleted file mode 100644
index 4b88eddc2..000000000
--- a/program/js/tiny_mce/themes/advanced/images/image.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/indent.gif b/program/js/tiny_mce/themes/advanced/images/indent.gif
deleted file mode 100644
index acd315bb1..000000000
--- a/program/js/tiny_mce/themes/advanced/images/indent.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/insert_button_bg.gif b/program/js/tiny_mce/themes/advanced/images/insert_button_bg.gif
deleted file mode 100644
index 69c131ce2..000000000
--- a/program/js/tiny_mce/themes/advanced/images/insert_button_bg.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/italic.gif b/program/js/tiny_mce/themes/advanced/images/italic.gif
deleted file mode 100644
index 8bb330bd0..000000000
--- a/program/js/tiny_mce/themes/advanced/images/italic.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/italic_de_se.gif b/program/js/tiny_mce/themes/advanced/images/italic_de_se.gif
deleted file mode 100644
index feb0309e7..000000000
--- a/program/js/tiny_mce/themes/advanced/images/italic_de_se.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/italic_es.gif b/program/js/tiny_mce/themes/advanced/images/italic_es.gif
deleted file mode 100644
index 4572cdb1d..000000000
--- a/program/js/tiny_mce/themes/advanced/images/italic_es.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/italic_ru.gif b/program/js/tiny_mce/themes/advanced/images/italic_ru.gif
deleted file mode 100644
index a2bb69a72..000000000
--- a/program/js/tiny_mce/themes/advanced/images/italic_ru.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/italic_tw.gif b/program/js/tiny_mce/themes/advanced/images/italic_tw.gif
deleted file mode 100644
index 4f6eeaa2b..000000000
--- a/program/js/tiny_mce/themes/advanced/images/italic_tw.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/justifycenter.gif b/program/js/tiny_mce/themes/advanced/images/justifycenter.gif
deleted file mode 100644
index 42d609a99..000000000
--- a/program/js/tiny_mce/themes/advanced/images/justifycenter.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/justifyfull.gif b/program/js/tiny_mce/themes/advanced/images/justifyfull.gif
deleted file mode 100644
index c8504f626..000000000
--- a/program/js/tiny_mce/themes/advanced/images/justifyfull.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/justifyleft.gif b/program/js/tiny_mce/themes/advanced/images/justifyleft.gif
deleted file mode 100644
index e8f7e4276..000000000
--- a/program/js/tiny_mce/themes/advanced/images/justifyleft.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/justifyright.gif b/program/js/tiny_mce/themes/advanced/images/justifyright.gif
deleted file mode 100644
index e4cea9714..000000000
--- a/program/js/tiny_mce/themes/advanced/images/justifyright.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/link.gif b/program/js/tiny_mce/themes/advanced/images/link.gif
deleted file mode 100644
index 1accf4262..000000000
--- a/program/js/tiny_mce/themes/advanced/images/link.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/menu_check.gif b/program/js/tiny_mce/themes/advanced/images/menu_check.gif
deleted file mode 100644
index 50d6afd50..000000000
--- a/program/js/tiny_mce/themes/advanced/images/menu_check.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/newdocument.gif b/program/js/tiny_mce/themes/advanced/images/newdocument.gif
deleted file mode 100644
index a9d293842..000000000
--- a/program/js/tiny_mce/themes/advanced/images/newdocument.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/numlist.gif b/program/js/tiny_mce/themes/advanced/images/numlist.gif
deleted file mode 100644
index a2683522f..000000000
--- a/program/js/tiny_mce/themes/advanced/images/numlist.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/opacity.png b/program/js/tiny_mce/themes/advanced/images/opacity.png
deleted file mode 100644
index b4217cb21..000000000
--- a/program/js/tiny_mce/themes/advanced/images/opacity.png
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/outdent.gif b/program/js/tiny_mce/themes/advanced/images/outdent.gif
deleted file mode 100644
index 23f6aa408..000000000
--- a/program/js/tiny_mce/themes/advanced/images/outdent.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/paste.gif b/program/js/tiny_mce/themes/advanced/images/paste.gif
deleted file mode 100644
index 1b45000a0..000000000
--- a/program/js/tiny_mce/themes/advanced/images/paste.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/redo.gif b/program/js/tiny_mce/themes/advanced/images/redo.gif
deleted file mode 100644
index 3af90697f..000000000
--- a/program/js/tiny_mce/themes/advanced/images/redo.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/removeformat.gif b/program/js/tiny_mce/themes/advanced/images/removeformat.gif
deleted file mode 100644
index 0fa3cb797..000000000
--- a/program/js/tiny_mce/themes/advanced/images/removeformat.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/separator.gif b/program/js/tiny_mce/themes/advanced/images/separator.gif
deleted file mode 100644
index 4f39b809e..000000000
--- a/program/js/tiny_mce/themes/advanced/images/separator.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/spacer.gif b/program/js/tiny_mce/themes/advanced/images/spacer.gif
deleted file mode 100644
index 388486517..000000000
--- a/program/js/tiny_mce/themes/advanced/images/spacer.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/statusbar_resize.gif b/program/js/tiny_mce/themes/advanced/images/statusbar_resize.gif
deleted file mode 100644
index af89d803f..000000000
--- a/program/js/tiny_mce/themes/advanced/images/statusbar_resize.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/strikethrough.gif b/program/js/tiny_mce/themes/advanced/images/strikethrough.gif
deleted file mode 100644
index 326463591..000000000
--- a/program/js/tiny_mce/themes/advanced/images/strikethrough.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/sub.gif b/program/js/tiny_mce/themes/advanced/images/sub.gif
deleted file mode 100644
index 4d7ce30ff..000000000
--- a/program/js/tiny_mce/themes/advanced/images/sub.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/sup.gif b/program/js/tiny_mce/themes/advanced/images/sup.gif
deleted file mode 100644
index a7145e019..000000000
--- a/program/js/tiny_mce/themes/advanced/images/sup.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/underline.gif b/program/js/tiny_mce/themes/advanced/images/underline.gif
deleted file mode 100644
index 1dfeb5f6d..000000000
--- a/program/js/tiny_mce/themes/advanced/images/underline.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/underline_es.gif b/program/js/tiny_mce/themes/advanced/images/underline_es.gif
deleted file mode 100644
index 551d9148d..000000000
--- a/program/js/tiny_mce/themes/advanced/images/underline_es.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/underline_fr.gif b/program/js/tiny_mce/themes/advanced/images/underline_fr.gif
deleted file mode 100644
index 551d9148d..000000000
--- a/program/js/tiny_mce/themes/advanced/images/underline_fr.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/underline_ru.gif b/program/js/tiny_mce/themes/advanced/images/underline_ru.gif
deleted file mode 100644
index b78e2a498..000000000
--- a/program/js/tiny_mce/themes/advanced/images/underline_ru.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/underline_tw.gif b/program/js/tiny_mce/themes/advanced/images/underline_tw.gif
deleted file mode 100644
index b71539048..000000000
--- a/program/js/tiny_mce/themes/advanced/images/underline_tw.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/undo.gif b/program/js/tiny_mce/themes/advanced/images/undo.gif
deleted file mode 100644
index 520796d69..000000000
--- a/program/js/tiny_mce/themes/advanced/images/undo.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/unlink.gif b/program/js/tiny_mce/themes/advanced/images/unlink.gif
deleted file mode 100644
index 5c8a33db8..000000000
--- a/program/js/tiny_mce/themes/advanced/images/unlink.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/visualaid.gif b/program/js/tiny_mce/themes/advanced/images/visualaid.gif
deleted file mode 100644
index 63caf1807..000000000
--- a/program/js/tiny_mce/themes/advanced/images/visualaid.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/xp/tab_bg.gif b/program/js/tiny_mce/themes/advanced/images/xp/tab_bg.gif
deleted file mode 100644
index 897a01f2b..000000000
--- a/program/js/tiny_mce/themes/advanced/images/xp/tab_bg.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/xp/tab_end.gif b/program/js/tiny_mce/themes/advanced/images/xp/tab_end.gif
deleted file mode 100644
index aee442beb..000000000
--- a/program/js/tiny_mce/themes/advanced/images/xp/tab_end.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/xp/tab_sel_bg.gif b/program/js/tiny_mce/themes/advanced/images/xp/tab_sel_bg.gif
deleted file mode 100644
index 9dc8abe1a..000000000
--- a/program/js/tiny_mce/themes/advanced/images/xp/tab_sel_bg.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/xp/tab_sel_end.gif b/program/js/tiny_mce/themes/advanced/images/xp/tab_sel_end.gif
deleted file mode 100644
index 616a889d1..000000000
--- a/program/js/tiny_mce/themes/advanced/images/xp/tab_sel_end.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/xp/tabs_bg.gif b/program/js/tiny_mce/themes/advanced/images/xp/tabs_bg.gif
deleted file mode 100644
index c303f66dd..000000000
--- a/program/js/tiny_mce/themes/advanced/images/xp/tabs_bg.gif
+++ /dev/null
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/colors.jpg b/program/js/tiny_mce/themes/advanced/img/colorpicker.jpg
index b4c542d10..b4c542d10 100644
--- a/program/js/tiny_mce/themes/advanced/images/colors.jpg
+++ b/program/js/tiny_mce/themes/advanced/img/colorpicker.jpg
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/img/icons.gif b/program/js/tiny_mce/themes/advanced/img/icons.gif
new file mode 100644
index 000000000..ccac36f54
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/img/icons.gif
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/js/about.js b/program/js/tiny_mce/themes/advanced/js/about.js
new file mode 100644
index 000000000..9081e1ddc
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/js/about.js
@@ -0,0 +1,72 @@
+tinyMCEPopup.requireLangPack();
+
+function init() {
+ var ed, tcont;
+
+ tinyMCEPopup.resizeToInnerSize();
+ ed = tinyMCEPopup.editor;
+
+ // Give FF some time
+ window.setTimeout('insertHelpIFrame();', 10);
+
+ tcont = document.getElementById('plugintablecontainer');
+ document.getElementById('plugins_tab').style.display = 'none';
+
+ var html = "";
+ html += '<table id="plugintable">';
+ html += '<thead>';
+ html += '<tr>';
+ html += '<td>' + ed.getLang('advanced_dlg.about_plugin') + '</td>';
+ html += '<td>' + ed.getLang('advanced_dlg.about_author') + '</td>';
+ html += '<td>' + ed.getLang('advanced_dlg.about_version') + '</td>';
+ html += '</tr>';
+ html += '</thead>';
+ html += '<tbody>';
+
+ tinymce.each(ed.plugins, function(p, n) {
+ var info;
+
+ if (!p.getInfo)
+ return;
+
+ html += '<tr>';
+
+ info = p.getInfo();
+
+ if (info.infourl != null && info.infourl != '')
+ html += '<td width="50%" title="' + n + '"><a href="' + info.infourl + '" target="_blank">' + info.longname + '</a></td>';
+ else
+ html += '<td width="50%" title="' + n + '">' + info.longname + '</td>';
+
+ if (info.authorurl != null && info.authorurl != '')
+ html += '<td width="35%"><a href="' + info.authorurl + '" target="_blank">' + info.author + '</a></td>';
+ else
+ html += '<td width="35%">' + info.author + '</td>';
+
+ html += '<td width="15%">' + info.version + '</td>';
+ html += '</tr>';
+
+ document.getElementById('plugins_tab').style.display = '';
+
+ });
+
+ html += '</tbody>';
+ html += '</table>';
+
+ tcont.innerHTML = html;
+
+ tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion;
+ tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate;
+}
+
+function insertHelpIFrame() {
+ var html;
+
+ if (tinyMCEPopup.getParam('docs_url')) {
+ html = '<iframe width="100%" height="300" src="' + tinyMCEPopup.editor.baseURI.toAbsolute(tinyMCEPopup.getParam('docs_url')) + '"></iframe>';
+ document.getElementById('iframecontainer').innerHTML = html;
+ document.getElementById('help_tab').style.display = 'block';
+ }
+}
+
+tinyMCEPopup.onInit.add(init);
diff --git a/program/js/tiny_mce/themes/advanced/js/anchor.js b/program/js/tiny_mce/themes/advanced/js/anchor.js
new file mode 100644
index 000000000..b5efd1ec9
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/js/anchor.js
@@ -0,0 +1,37 @@
+tinyMCEPopup.requireLangPack();
+
+var AnchorDialog = {
+ init : function(ed) {
+ var action, elm, f = document.forms[0];
+
+ this.editor = ed;
+ elm = ed.dom.getParent(ed.selection.getNode(), 'A,IMG');
+ v = ed.dom.getAttrib(elm, 'name');
+
+ if (v) {
+ this.action = 'update';
+ f.anchorName.value = v;
+ }
+
+ f.insert.value = ed.getLang(elm ? 'update' : 'insert');
+ },
+
+ update : function() {
+ var ed = this.editor;
+
+ tinyMCEPopup.restoreSelection();
+
+ if (this.action != 'update')
+ ed.selection.collapse(1);
+
+ // Webkit acts weird if empty inline element is inserted so we need to use a image instead
+ if (tinymce.isWebKit)
+ ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('img', {mce_name : 'a', name : document.forms[0].anchorName.value, 'class' : 'mceItemAnchor'}));
+ else
+ ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : document.forms[0].anchorName.value, 'class' : 'mceItemAnchor'}, ''));
+
+ tinyMCEPopup.close();
+ }
+};
+
+tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog);
diff --git a/program/js/tiny_mce/themes/advanced/jscripts/charmap.js b/program/js/tiny_mce/themes/advanced/js/charmap.js
index eaa6a94b6..8467ef603 100644
--- a/program/js/tiny_mce/themes/advanced/jscripts/charmap.js
+++ b/program/js/tiny_mce/themes/advanced/js/charmap.js
@@ -1,13 +1,6 @@
-function init() {
- tinyMCEPopup.resizeToInnerSize();
-}
-
-var charmap = new Array();
+tinyMCEPopup.requireLangPack();
-// for mor details please see w3c.org
-// now here is the complete list ;)
-
-charmap = [
+var charmap = [
['&nbsp;', '&#160;', true, 'no-break space'],
['&amp;', '&#38;', true, 'ampersand'],
['&quot;', '&#34;', true, 'quotation mark'],
@@ -270,32 +263,37 @@ charmap = [
['&shy;', '&#173;', false,'soft hyphen']
];
+tinyMCEPopup.onInit.add(function() {
+ tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML());
+});
+
function renderCharMapHTML() {
- var charsPerRow = 20, tdWidth=20, tdHeight=20;
+ var charsPerRow = 20, tdWidth=20, tdHeight=20, i;
var html = '<table border="0" cellspacing="1" cellpadding="0" width="' + (tdWidth*charsPerRow) + '"><tr height="' + tdHeight + '">';
var cols=-1;
- for (var i=0; i<charmap.length; i++) {
+
+ for (i=0; i<charmap.length; i++) {
if (charmap[i][2]==true) {
cols++;
html += ''
- + '<td width="' + tdWidth + '" height="' + tdHeight + '" class="charmap"'
- + ' onmouseover="this.className=\'charmapOver\';'
- + 'previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');"'
- + ' onmouseout="this.className=\'charmap\';"'
- + ' nowrap="nowrap" onclick="insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');"><a style="text-decoration: none;" onfocus="previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');" href="javascript:insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');" onclick="return false;" onmousedown="return false;" title="' + charmap[i][3] + '">'
+ + '<td class="charmap">'
+ + '<a onmouseover="previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');" onfocus="previewChar(\'' + charmap[i][1].substring(1,charmap[i][1].length) + '\',\'' + charmap[i][0].substring(1,charmap[i][0].length) + '\',\'' + charmap[i][3] + '\');" href="javascript:void(0)" onclick="insertChar(\'' + charmap[i][1].substring(2,charmap[i][1].length-1) + '\');" onclick="return false;" onmousedown="return false;" title="' + charmap[i][3] + '">'
+ charmap[i][1]
+ '</a></td>';
if ((cols+1) % charsPerRow == 0)
html += '</tr><tr height="' + tdHeight + '">';
}
}
+
if (cols % charsPerRow > 0) {
var padd = charsPerRow - (cols % charsPerRow);
for (var i=0; i<padd-1; i++)
html += '<td width="' + tdWidth + '" height="' + tdHeight + '" class="charmap">&nbsp;</td>';
}
+
html += '</tr></table>';
- document.write(html);
+
+ return html;
}
function insertChar(chr) {
@@ -305,6 +303,7 @@ function insertChar(chr) {
if (tinyMCEPopup.isWindow)
window.focus();
+ tinyMCEPopup.editor.focus();
tinyMCEPopup.close();
}
diff --git a/program/js/tiny_mce/themes/advanced/jscripts/color_picker.js b/program/js/tiny_mce/themes/advanced/js/color_picker.js
index 00fc823de..da833dc94 100644
--- a/program/js/tiny_mce/themes/advanced/jscripts/color_picker.js
+++ b/program/js/tiny_mce/themes/advanced/js/color_picker.js
@@ -1,6 +1,8 @@
+tinyMCEPopup.requireLangPack();
+
var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false;
-var colors = new Array(
+var colors = [
"#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033",
"#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099",
"#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff",
@@ -28,7 +30,7 @@ var colors = new Array(
"#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33",
"#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99",
"#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"
-);
+];
var named = {
'#F0F8FF':'AliceBlue','#FAEBD7':'AntiqueWhite','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige',
@@ -57,10 +59,9 @@ var named = {
};
function init() {
- var inputColor = convertRGBToHex(tinyMCE.getWindowArg('input_color'));
+ var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color'));
- if (tinyMCE.isMSIE)
- tinyMCEPopup.resizeToInnerSize();
+ tinyMCEPopup.resizeToInnerSize();
generatePicker();
@@ -75,9 +76,13 @@ function init() {
}
function insertAction() {
- var color = document.getElementById("color").value;
+ var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func');
+
+ tinyMCEPopup.restoreSelection();
+
+ if (f)
+ f(color);
- tinyMCEPopup.execCommand(tinyMCE.getWindowArg('command'), false, color);
tinyMCEPopup.close();
}
@@ -86,7 +91,7 @@ function showColor(color, name) {
document.getElementById("colorname").innerHTML = name;
document.getElementById("preview").style.backgroundColor = color;
- document.getElementById("color").value = color;
+ document.getElementById("color").value = color.toLowerCase();
}
function convertRGBToHex(col) {
@@ -152,9 +157,9 @@ function generateWebColors() {
+ '<tr>';
for (i=0; i<colors.length; i++) {
- h += '<td bgcolor="' + colors[i] + '">'
- + '<a href="javascript:insertAction();" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');">'
- + '<img border="0" src="images/spacer.gif" width="10" height="10" title="' + colors[i] + '" alt="' + colors[i] + '" /></a></td>';
+ h += '<td bgcolor="' + colors[i] + '" width="10" height="10">'
+ + '<a href="javascript:insertAction();" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');" style="display:block;width:10px;height:10px;overflow:hidden;">'
+ + '</a></td>';
if ((i+1) % 18 == 0)
h += '</tr><tr>';
}
@@ -190,9 +195,9 @@ function computeColor(e) {
x = e.offsetX ? e.offsetX : (e.target ? e.clientX - e.target.x : 0);
y = e.offsetY ? e.offsetY : (e.target ? e.clientY - e.target.y : 0);
- partWidth = document.getElementById('colorpicker').width / 6;
+ partWidth = document.getElementById('colors').width / 6;
partDetail = detail / 2;
- imHeight = document.getElementById('colorpicker').height;
+ imHeight = document.getElementById('colors').height;
r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255;
g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth);
@@ -237,4 +242,4 @@ function changeFinalColor(color) {
document.getElementById('color').value = color;
}
-window.focus(); \ No newline at end of file
+tinyMCEPopup.onInit.add(init);
diff --git a/program/js/tiny_mce/themes/advanced/js/image.js b/program/js/tiny_mce/themes/advanced/js/image.js
new file mode 100644
index 000000000..038ace79f
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/js/image.js
@@ -0,0 +1,245 @@
+var ImageDialog = {
+ preInit : function() {
+ var url;
+
+ tinyMCEPopup.requireLangPack();
+
+ if (url = tinyMCEPopup.getParam("external_image_list_url"))
+ document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
+ },
+
+ init : function() {
+ var f = document.forms[0], ed = tinyMCEPopup.editor;
+
+ // Setup browse button
+ document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');
+ if (isVisible('srcbrowser'))
+ document.getElementById('src').style.width = '180px';
+
+ e = ed.selection.getNode();
+
+ this.fillFileList('image_list', 'tinyMCEImageList');
+
+ if (e.nodeName == 'IMG') {
+ f.src.value = ed.dom.getAttrib(e, 'src');
+ f.alt.value = ed.dom.getAttrib(e, 'alt');
+ f.border.value = this.getAttrib(e, 'border');
+ f.vspace.value = this.getAttrib(e, 'vspace');
+ f.hspace.value = this.getAttrib(e, 'hspace');
+ f.width.value = ed.dom.getAttrib(e, 'width');
+ f.height.value = ed.dom.getAttrib(e, 'height');
+ f.insert.value = ed.getLang('update');
+ this.styleVal = ed.dom.getAttrib(e, 'style');
+ selectByValue(f, 'image_list', f.src.value);
+ selectByValue(f, 'align', this.getAttrib(e, 'align'));
+ this.updateStyle();
+ }
+ },
+
+ fillFileList : function(id, l) {
+ var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
+
+ l = window[l];
+
+ if (l && l.length > 0) {
+ lst.options[lst.options.length] = new Option('', '');
+
+ tinymce.each(l, function(o) {
+ lst.options[lst.options.length] = new Option(o[0], o[1]);
+ });
+ } else
+ dom.remove(dom.getParent(id, 'tr'));
+ },
+
+ update : function() {
+ var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el;
+
+ tinyMCEPopup.restoreSelection();
+
+ if (f.src.value === '') {
+ if (ed.selection.getNode().nodeName == 'IMG') {
+ ed.dom.remove(ed.selection.getNode());
+ ed.execCommand('mceRepaint');
+ }
+
+ tinyMCEPopup.close();
+ return;
+ }
+
+ if (!ed.settings.inline_styles) {
+ args = tinymce.extend(args, {
+ vspace : nl.vspace.value,
+ hspace : nl.hspace.value,
+ border : nl.border.value,
+ align : getSelectValue(f, 'align')
+ });
+ } else
+ args.style = this.styleVal;
+
+ tinymce.extend(args, {
+ src : f.src.value,
+ alt : f.alt.value,
+ width : f.width.value,
+ height : f.height.value
+ });
+
+ el = ed.selection.getNode();
+
+ if (el && el.nodeName == 'IMG') {
+ ed.dom.setAttribs(el, args);
+ } else {
+ ed.execCommand('mceInsertContent', false, '<img id="__mce_tmp" src="javascript:;" />', {skip_undo : 1});
+ ed.dom.setAttribs('__mce_tmp', args);
+ ed.dom.setAttrib('__mce_tmp', 'id', '');
+ ed.undoManager.add();
+ }
+
+ tinyMCEPopup.close();
+ },
+
+ updateStyle : function() {
+ var dom = tinyMCEPopup.dom, st, v, f = document.forms[0];
+
+ if (tinyMCEPopup.editor.settings.inline_styles) {
+ st = tinyMCEPopup.dom.parseStyle(this.styleVal);
+
+ // Handle align
+ v = getSelectValue(f, 'align');
+ if (v) {
+ if (v == 'left' || v == 'right') {
+ st['float'] = v;
+ delete st['vertical-align'];
+ } else {
+ st['vertical-align'] = v;
+ delete st['float'];
+ }
+ } else {
+ delete st['float'];
+ delete st['vertical-align'];
+ }
+
+ // Handle border
+ v = f.border.value;
+ if (v || v == '0') {
+ if (v == '0')
+ st['border'] = '0';
+ else
+ st['border'] = v + 'px solid black';
+ } else
+ delete st['border'];
+
+ // Handle hspace
+ v = f.hspace.value;
+ if (v) {
+ delete st['margin'];
+ st['margin-left'] = v + 'px';
+ st['margin-right'] = v + 'px';
+ } else {
+ delete st['margin-left'];
+ delete st['margin-right'];
+ }
+
+ // Handle vspace
+ v = f.vspace.value;
+ if (v) {
+ delete st['margin'];
+ st['margin-top'] = v + 'px';
+ st['margin-bottom'] = v + 'px';
+ } else {
+ delete st['margin-top'];
+ delete st['margin-bottom'];
+ }
+
+ // Merge
+ st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st));
+ this.styleVal = dom.serializeStyle(st);
+ }
+ },
+
+ getAttrib : function(e, at) {
+ var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
+
+ if (ed.settings.inline_styles) {
+ switch (at) {
+ case 'align':
+ if (v = dom.getStyle(e, 'float'))
+ return v;
+
+ if (v = dom.getStyle(e, 'vertical-align'))
+ return v;
+
+ break;
+
+ case 'hspace':
+ v = dom.getStyle(e, 'margin-left')
+ v2 = dom.getStyle(e, 'margin-right');
+ if (v && v == v2)
+ return parseInt(v.replace(/[^0-9]/g, ''));
+
+ break;
+
+ case 'vspace':
+ v = dom.getStyle(e, 'margin-top')
+ v2 = dom.getStyle(e, 'margin-bottom');
+ if (v && v == v2)
+ return parseInt(v.replace(/[^0-9]/g, ''));
+
+ break;
+
+ case 'border':
+ v = 0;
+
+ tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) {
+ sv = dom.getStyle(e, 'border-' + sv + '-width');
+
+ // False or not the same as prev
+ if (!sv || (sv != v && v !== 0)) {
+ v = 0;
+ return false;
+ }
+
+ if (sv)
+ v = sv;
+ });
+
+ if (v)
+ return parseInt(v.replace(/[^0-9]/g, ''));
+
+ break;
+ }
+ }
+
+ if (v = dom.getAttrib(e, at))
+ return v;
+
+ return '';
+ },
+
+ resetImageData : function() {
+ var f = document.forms[0];
+
+ f.width.value = f.height.value = "";
+ },
+
+ updateImageData : function() {
+ var f = document.forms[0], t = ImageDialog;
+
+ if (f.width.value == "")
+ f.width.value = t.preloadImg.width;
+
+ if (f.height.value == "")
+ f.height.value = t.preloadImg.height;
+ },
+
+ getImageData : function() {
+ var f = document.forms[0];
+
+ this.preloadImg = new Image();
+ this.preloadImg.onload = this.updateImageData;
+ this.preloadImg.onerror = this.resetImageData;
+ this.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.src.value);
+ }
+};
+
+ImageDialog.preInit();
+tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog);
diff --git a/program/js/tiny_mce/themes/advanced/js/link.js b/program/js/tiny_mce/themes/advanced/js/link.js
new file mode 100644
index 000000000..ab434da3d
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/js/link.js
@@ -0,0 +1,126 @@
+tinyMCEPopup.requireLangPack();
+
+var LinkDialog = {
+ preInit : function() {
+ var url;
+
+ if (url = tinyMCEPopup.getParam("external_link_list_url"))
+ document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
+ },
+
+ init : function() {
+ var f = document.forms[0], ed = tinyMCEPopup.editor;
+
+ // Setup browse button
+ document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser', 'href', 'file', 'theme_advanced_link');
+ if (isVisible('hrefbrowser'))
+ document.getElementById('href').style.width = '180px';
+
+ this.fillClassList('class_list');
+ this.fillFileList('link_list', 'tinyMCELinkList');
+ this.fillTargetList('target_list');
+
+ if (e = ed.dom.getParent(ed.selection.getNode(), 'A')) {
+ f.href.value = ed.dom.getAttrib(e, 'href');
+ f.linktitle.value = ed.dom.getAttrib(e, 'title');
+ f.insert.value = ed.getLang('update');
+ selectByValue(f, 'link_list', f.href.value);
+ selectByValue(f, 'target_list', ed.dom.getAttrib(e, 'target'));
+ selectByValue(f, 'class_list', ed.dom.getAttrib(e, 'class'));
+ }
+ },
+
+ update : function() {
+ var f = document.forms[0], ed = tinyMCEPopup.editor, e, b;
+
+ tinyMCEPopup.restoreSelection();
+
+ // Remove element if there is no href
+ if (!f.href.value) {
+ e = ed.dom.getParent(ed.selection.getNode(), 'A');
+ if (e) {
+ tinyMCEPopup.execCommand("mceBeginUndoLevel");
+ b = ed.selection.getBookmark();
+ ed.dom.remove(e, 1);
+ ed.selection.moveToBookmark(b);
+ tinyMCEPopup.execCommand("mceEndUndoLevel");
+ tinyMCEPopup.close();
+ return;
+ }
+ }
+
+ ed.execCommand('mceInsertLink', false, {
+ href : f.href.value,
+ title : f.linktitle.value,
+ target : f.target_list ? f.target_list.options[f.target_list.selectedIndex].value : null,
+ 'class' : f.class_list ? f.class_list.options[f.class_list.selectedIndex].value : null
+ });
+
+ tinyMCEPopup.close();
+ },
+
+ checkPrefix : function(n) {
+ if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email')))
+ n.value = 'mailto:' + n.value;
+
+ if (/^\s*www./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external')))
+ n.value = 'http://' + n.value;
+ },
+
+ fillFileList : function(id, l) {
+ var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
+
+ l = window[l];
+
+ if (l && l.length > 0) {
+ lst.options[lst.options.length] = new Option('', '');
+
+ tinymce.each(l, function(o) {
+ lst.options[lst.options.length] = new Option(o[0], o[1]);
+ });
+ } else
+ dom.remove(dom.getParent(id, 'tr'));
+ },
+
+ fillClassList : function(id) {
+ var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
+
+ if (v = tinyMCEPopup.getParam('theme_advanced_styles')) {
+ cl = [];
+
+ tinymce.each(v.split(';'), function(v) {
+ var p = v.split('=');
+
+ cl.push({'title' : p[0], 'class' : p[1]});
+ });
+ } else
+ cl = tinyMCEPopup.editor.dom.getClasses();
+
+ if (cl.length > 0) {
+ lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
+
+ tinymce.each(cl, function(o) {
+ lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']);
+ });
+ } else
+ dom.remove(dom.getParent(id, 'tr'));
+ },
+
+ fillTargetList : function(id) {
+ var dom = tinyMCEPopup.dom, lst = dom.get(id), v;
+
+ lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
+ lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_same'), '_self');
+ lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_blank'), '_blank');
+
+ if (v = tinyMCEPopup.getParam('theme_advanced_link_targets')) {
+ tinymce.each(v.split(','), function(v) {
+ v = v.split('=');
+ lst.options[lst.options.length] = new Option(v[0], v[1]);
+ });
+ }
+ }
+};
+
+LinkDialog.preInit();
+tinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog);
diff --git a/program/js/tiny_mce/themes/advanced/jscripts/source_editor.js b/program/js/tiny_mce/themes/advanced/js/source_editor.js
index d0d517d45..af2231cad 100644
--- a/program/js/tiny_mce/themes/advanced/jscripts/source_editor.js
+++ b/program/js/tiny_mce/themes/advanced/js/source_editor.js
@@ -1,33 +1,36 @@
+tinyMCEPopup.requireLangPack();
+tinyMCEPopup.onInit.add(onLoadInit);
+
function saveContent() {
- tinyMCE.setContent(document.getElementById('htmlSource').value);
- tinyMCE.closeWindow(window);
+ tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value);
+ tinyMCEPopup.close();
}
function onLoadInit() {
tinyMCEPopup.resizeToInnerSize();
// Remove Gecko spellchecking
- if (tinyMCE.isGecko)
- document.body.spellcheck = tinyMCE.getParam("gecko_spellcheck");
-
- document.getElementById('htmlSource').value = tinyMCE.getContent(tinyMCE.getWindowArg('editor_id'));
+ if (tinymce.isGecko)
+ document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck");
- resizeInputs();
+ document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent();
- if (tinyMCE.getParam("theme_advanced_source_editor_wrap", true)) {
+ if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) {
setWrap('soft');
document.getElementById('wraped').checked = true;
}
+
+ resizeInputs();
}
function setWrap(val) {
- var s = document.getElementById('htmlSource');
+ var v, n, s = document.getElementById('htmlSource');
s.wrap = val;
- if (tinyMCE.isGecko || tinyMCE.isOpera) {
- var v = s.value;
- var n = s.cloneNode(false);
+ if (!tinymce.isIE) {
+ v = s.value;
+ n = s.cloneNode(false);
n.setAttribute("wrap", val);
s.parentNode.replaceChild(n, s);
n.value = v;
@@ -46,11 +49,11 @@ var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
function resizeInputs() {
var el = document.getElementById('htmlSource');
- if (!tinyMCE.isMSIE) {
- wHeight = self.innerHeight - 60;
+ if (!tinymce.isIE) {
+ wHeight = self.innerHeight - 65;
wWidth = self.innerWidth - 16;
} else {
- wHeight = document.body.clientHeight - 60;
+ wHeight = document.body.clientHeight - 70;
wWidth = document.body.clientWidth - 16;
}
diff --git a/program/js/tiny_mce/themes/advanced/jscripts/about.js b/program/js/tiny_mce/themes/advanced/jscripts/about.js
deleted file mode 100644
index 4e53c285b..000000000
--- a/program/js/tiny_mce/themes/advanced/jscripts/about.js
+++ /dev/null
@@ -1,75 +0,0 @@
-function init() {
- var inst;
-
- tinyMCEPopup.resizeToInnerSize();
- inst = tinyMCE.selectedInstance;
-
- // Give FF some time
- window.setTimeout('insertHelpIFrame();', 10);
-
- var tcont = document.getElementById('plugintablecontainer');
- var plugins = tinyMCE.getParam('plugins', '', true, ',');
- if (plugins.length == 0)
- document.getElementById('plugins_tab').style.display = 'none';
-
- var html = "";
- html += '<table id="plugintable">';
- html += '<thead>';
- html += '<tr>';
- html += '<td>' + tinyMCE.getLang('lang_plugin') + '</td>';
- html += '<td>' + tinyMCE.getLang('lang_author') + '</td>';
- html += '<td>' + tinyMCE.getLang('lang_version') + '</td>';
- html += '</tr>';
- html += '</thead>';
- html += '<tbody>';
-
- for (var i=0; i<inst.plugins.length; i++) {
- var info = getPluginInfo(inst.plugins[i]);
-
- html += '<tr>';
-
- if (info.infourl != null && info.infourl != '')
- html += '<td width="50%" title="' + plugins[i] + '"><a href="' + info.infourl + '" target="mceplugin">' + info.longname + '</a></td>';
- else
- html += '<td width="50%" title="' + plugins[i] + '">' + info.longname + '</td>';
-
- if (info.authorurl != null && info.authorurl != '')
- html += '<td width="35%"><a href="' + info.authorurl + '" target="mceplugin">' + info.author + '</a></td>';
- else
- html += '<td width="35%">' + info.author + '</td>';
-
- html += '<td width="15%">' + info.version + '</td>';
- html += '</tr>';
- }
-
- html += '</tbody>';
- html += '</table>';
-
- tcont.innerHTML = html;
-}
-
-function getPluginInfo(name) {
- if (tinyMCE.plugins[name].getInfo)
- return tinyMCE.plugins[name].getInfo();
-
- return {
- longname : name,
- authorurl : '',
- infourl : '',
- author : '--',
- version : '--'
- };
-}
-
-function insertHelpIFrame() {
- var html = '<iframe width="100%" height="300" src="' + tinyMCE.themeURL + "/docs/" + tinyMCE.settings['docs_language'] + "/index.htm" + '"></iframe>';
-
- document.getElementById('iframecontainer').innerHTML = html;
-
- html = '';
- html += '<a href="http://www.moxiecode.com" target="_blank"><img src="http://tinymce.moxiecode.com/images/gotmoxie.png" alt="Got Moxie?" border="0" /></a> ';
- html += '<a href="http://sourceforge.net/projects/tinymce/" target="_blank"><img src="http://sourceforge.net/sflogo.php?group_id=103281" alt="Hosted By Sourceforge" border="0" /></a> ';
- html += '<a href="http://www.freshmeat.net/projects/tinymce" target="_blank"><img src="http://tinymce.moxiecode.com/images/fm.gif" alt="Also on freshmeat" border="0" /></a> ';
-
- document.getElementById('buttoncontainer').innerHTML = html;
-}
diff --git a/program/js/tiny_mce/themes/advanced/jscripts/anchor.js b/program/js/tiny_mce/themes/advanced/jscripts/anchor.js
deleted file mode 100644
index e7c1c62c5..000000000
--- a/program/js/tiny_mce/themes/advanced/jscripts/anchor.js
+++ /dev/null
@@ -1,74 +0,0 @@
-var action, element;
-
-function init() {
- tinyMCEPopup.resizeToInnerSize();
-
- var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
- var anchor = tinyMCE.getParentElement(inst.getFocusElement(), "a", "name");
- var img = inst.getFocusElement();
- action = 'insert';
-
- if (anchor != null) {
- element = anchor;
- action = "update";
- }
-
- if (tinyMCE.getAttrib(img, "class") == "mceItemAnchor") {
- element = img;
- action = "update";
- }
-
- if (action == "update")
- document.forms[0].anchorName.value = element.nodeName == "IMG" ? element.getAttribute("title") : element.getAttribute("name");
-
- document.forms[0].insert.value = tinyMCE.getLang('lang_' + action, 'Insert', true);
-}
-
-function insertAnchor() {
- var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));
- var name = document.forms[0].anchorName.value, e;
-
- tinyMCEPopup.execCommand("mceBeginUndoLevel");
-
- if (action == "update") {
- if (element.nodeName == "IMG")
- element.setAttribute("title", name);
- else
- element.setAttribute("name", name);
- } else {
- var rng = inst.getRng();
-
- if (rng.collapse)
- rng.collapse(false);
-
- name = name.replace(/&/g, '&amp;');
- name = name.replace(/\"/g, '&quot;');
- name = name.replace(/</g, '&lt;');
- name = name.replace(/>/g, '&gt;');
-
- // Fix for bug #1447335
- if (tinyMCE.isGecko)
- html = '<a id="mceNewAnchor" name="' + name + '"></a>';
- else
- html = '<a name="' + name + '"></a>';
-
- tinyMCEPopup.execCommand("mceInsertContent", false, html);
-
- // Fix for bug #1447335 force cursor after the anchor element
- if (tinyMCE.isGecko) {
- e = inst.getDoc().getElementById('mceNewAnchor');
-
- if (e) {
- inst.selection.selectNode(e, true, false, false);
- e.removeAttribute('id');
- }
- }
-
- tinyMCE.handleVisualAid(inst.getBody(), true, inst.visualAid, inst);
- }
-
- tinyMCEPopup.execCommand("mceEndUndoLevel");
-
- tinyMCE.triggerNodeChange();
- tinyMCEPopup.close();
-}
diff --git a/program/js/tiny_mce/themes/advanced/jscripts/image.js b/program/js/tiny_mce/themes/advanced/jscripts/image.js
deleted file mode 100644
index a52bfad6a..000000000
--- a/program/js/tiny_mce/themes/advanced/jscripts/image.js
+++ /dev/null
@@ -1,81 +0,0 @@
-var url = tinyMCE.getParam("external_image_list_url");
-if (url != null) {
- // Fix relative
- if (url.charAt(0) != '/' && url.indexOf('://') == -1)
- url = tinyMCE.documentBasePath + "/" + url;
-
- document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>');
-}
-
-function insertImage() {
- var src = document.forms[0].src.value;
- var alt = document.forms[0].alt.value;
- var border = document.forms[0].border.value;
- var vspace = document.forms[0].vspace.value;
- var hspace = document.forms[0].hspace.value;
- var width = document.forms[0].width.value;
- var height = document.forms[0].height.value;
- var align = document.forms[0].align.options[document.forms[0].align.selectedIndex].value;
-
- tinyMCEPopup.restoreSelection();
- tinyMCE.themes['advanced']._insertImage(src, alt, border, hspace, vspace, width, height, align);
- tinyMCEPopup.close();
-}
-
-function init() {
- tinyMCEPopup.resizeToInnerSize();
-
- document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');
-
- var formObj = document.forms[0];
-
- for (var i=0; i<document.forms[0].align.options.length; i++) {
- if (document.forms[0].align.options[i].value == tinyMCE.getWindowArg('align'))
- document.forms[0].align.options.selectedIndex = i;
- }
-
- formObj.src.value = tinyMCE.getWindowArg('src');
- formObj.alt.value = tinyMCE.getWindowArg('alt');
- formObj.border.value = tinyMCE.getWindowArg('border');
- formObj.vspace.value = tinyMCE.getWindowArg('vspace');
- formObj.hspace.value = tinyMCE.getWindowArg('hspace');
- formObj.width.value = tinyMCE.getWindowArg('width');
- formObj.height.value = tinyMCE.getWindowArg('height');
- formObj.insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true);
-
- // Handle file browser
- if (isVisible('srcbrowser'))
- document.getElementById('src').style.width = '180px';
-
- // Auto select image in list
- if (typeof(tinyMCEImageList) != "undefined" && tinyMCEImageList.length > 0) {
- for (var i=0; i<formObj.image_list.length; i++) {
- if (formObj.image_list.options[i].value == tinyMCE.getWindowArg('src'))
- formObj.image_list.options[i].selected = true;
- }
- }
-}
-
-var preloadImg = new Image();
-
-function resetImageData() {
- var formObj = document.forms[0];
- formObj.width.value = formObj.height.value = "";
-}
-
-function updateImageData() {
- var formObj = document.forms[0];
-
- if (formObj.width.value == "")
- formObj.width.value = preloadImg.width;
-
- if (formObj.height.value == "")
- formObj.height.value = preloadImg.height;
-}
-
-function getImageData() {
- preloadImg = new Image();
- tinyMCE.addEvent(preloadImg, "load", updateImageData);
- tinyMCE.addEvent(preloadImg, "error", function () {var formObj = document.forms[0];formObj.width.value = formObj.height.value = "";});
- preloadImg.src = tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings['base_href'], document.forms[0].src.value);
-}
diff --git a/program/js/tiny_mce/themes/advanced/jscripts/link.js b/program/js/tiny_mce/themes/advanced/jscripts/link.js
deleted file mode 100644
index e195497e1..000000000
--- a/program/js/tiny_mce/themes/advanced/jscripts/link.js
+++ /dev/null
@@ -1,74 +0,0 @@
-var url = tinyMCE.getParam("external_link_list_url");
-if (url != null) {
- // Fix relative
- if (url.charAt(0) != '/' && url.indexOf('://') == -1)
- url = tinyMCE.documentBasePath + "/" + url;
-
- document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '"></sc'+'ript>');
-}
-
-function init() {
- tinyMCEPopup.resizeToInnerSize();
-
- document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','theme_advanced_link');
-
- // Handle file browser
- if (isVisible('hrefbrowser'))
- document.getElementById('href').style.width = '180px';
-
- var formObj = document.forms[0];
-
- for (var i=0; i<document.forms[0].target.options.length; i++) {
- var option = document.forms[0].target.options[i];
-
- if (option.value == tinyMCE.getWindowArg('target'))
- option.selected = true;
- }
-
- document.forms[0].href.value = tinyMCE.getWindowArg('href');
- document.forms[0].linktitle.value = tinyMCE.getWindowArg('title');
- document.forms[0].insert.value = tinyMCE.getLang('lang_' + tinyMCE.getWindowArg('action'), 'Insert', true);
-
- addClassesToList('styleSelect', 'theme_advanced_link_styles');
- selectByValue(formObj, 'styleSelect', tinyMCE.getWindowArg('className'), true);
-
- // Hide css select row if no CSS classes
- if (formObj.styleSelect && formObj.styleSelect.options.length <= 1) {
- var sr = document.getElementById('styleSelectRow');
- sr.style.display = 'none';
- sr.parentNode.removeChild(sr);
- }
-
- // Auto select link in list
- if (typeof(tinyMCELinkList) != "undefined" && tinyMCELinkList.length > 0) {
- var formObj = document.forms[0];
-
- for (var i=0; i<formObj.link_list.length; i++) {
- if (formObj.link_list.options[i].value == tinyMCE.getWindowArg('href'))
- formObj.link_list.options[i].selected = true;
- }
- }
-}
-
-function checkPrefix(n) {
- if (Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCE.getLang('lang_is_email')))
- n.value = 'mailto:' + n.value;
-
- if (/^\s*www./i.test(n.value) && confirm(tinyMCE.getLang('lang_is_external')))
- n.value = 'http://' + n.value;
-}
-
-function insertLink() {
- var href = document.forms[0].href.value;
- var target = document.forms[0].target.options[document.forms[0].target.selectedIndex].value;
- var title = document.forms[0].linktitle.value;
- var style_class = document.forms[0].styleSelect ? document.forms[0].styleSelect.value : "";
- var dummy;
-
- if (target == '_self')
- target = '';
-
- tinyMCEPopup.restoreSelection();
- tinyMCE.themes['advanced']._insertLink(href, target, title, dummy, style_class);
- tinyMCEPopup.close();
-}
diff --git a/program/js/tiny_mce/themes/advanced/langs/en.js b/program/js/tiny_mce/themes/advanced/langs/en.js
index 8409e582b..69694b1f9 100644
--- a/program/js/tiny_mce/themes/advanced/langs/en.js
+++ b/program/js/tiny_mce/themes/advanced/langs/en.js
@@ -1,93 +1,62 @@
-// UK lang variables
-
-tinyMCE.addToLang('',{
-theme_style_select : '-- Styles --',
-theme_code_desc : 'Edit HTML Source',
-theme_code_title : 'HTML Source Editor',
-theme_code_wordwrap : 'Word wrap',
-theme_sub_desc : 'Subscript',
-theme_sup_desc : 'Superscript',
-theme_hr_desc : 'Insert horizontal ruler',
-theme_removeformat_desc : 'Remove formatting',
-theme_custom1_desc : 'Your custom description here',
-insert_image_border : 'Border',
-insert_image_dimensions : 'Dimensions',
-insert_image_vspace : 'Vertical space',
-insert_image_hspace : 'Horizontal space',
-insert_image_align : 'Alignment',
-insert_image_align_default : '-- Not set --',
-insert_image_align_baseline : 'Baseline',
-insert_image_align_top : 'Top',
-insert_image_align_middle : 'Middle',
-insert_image_align_bottom : 'Bottom',
-insert_image_align_texttop : 'TextTop',
-insert_image_align_absmiddle : 'Absolute Middle',
-insert_image_align_absbottom : 'Absolute Bottom',
-insert_image_align_left : 'Left',
-insert_image_align_right : 'Right',
-theme_font_size : '-- Font size --',
-theme_fontdefault : '-- Font family --',
-theme_block : '-- Format --',
-theme_paragraph : 'Paragraph',
-theme_div : 'Div',
-theme_address : 'Address',
-theme_pre : 'Preformatted',
-theme_h1 : 'Heading 1',
-theme_h2 : 'Heading 2',
-theme_h3 : 'Heading 3',
-theme_h4 : 'Heading 4',
-theme_h5 : 'Heading 5',
-theme_h6 : 'Heading 6',
-theme_blockquote : 'Blockquote',
-theme_code : 'Code',
-theme_samp : 'Code sample',
-theme_dt : 'Definition term ',
-theme_dd : 'Definition description',
-theme_colorpicker_title : 'Select a color',
-theme_colorpicker_apply : 'Apply',
-theme_forecolor_desc : 'Select text color',
-theme_backcolor_desc : 'Select background color',
-theme_charmap_title : 'Select custom character',
-theme_charmap_desc : 'Insert custom character',
-theme_visualaid_desc : 'Toggle guidelines/invisible elements',
-insert_anchor_title : 'Insert/edit anchor',
-insert_anchor_name : 'Anchor name',
-theme_anchor_desc : 'Insert/edit anchor',
-theme_insert_link_titlefield : 'Title',
-theme_clipboard_msg : 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?',
-theme_path : 'Path',
-cut_desc : 'Cut',
-copy_desc : 'Copy',
-paste_desc : 'Paste',
-link_list : 'Link list',
-image_list : 'Image list',
-browse : 'Browse',
-image_props_desc : 'Image properties',
-newdocument_desc : 'New document',
-class_name : 'Class',
-newdocument : 'Are you sure you want clear all contents?',
-about_title : 'About TinyMCE',
-about : 'About',
-license : 'License',
-plugins : 'Plugins',
-plugin : 'Plugin',
-author : 'Author',
-version : 'Version',
-loaded_plugins : 'Loaded plugins',
-help : 'Help',
-not_set : '-- Not set --',
-close : 'Close',
-toolbar_focus : 'Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X',
-invalid_data : 'Error: Invalid values entered, these are marked in red.',
-more_colors : 'More colors',
-color_picker_tab : 'Picker',
-color_picker : 'Color picker',
-web_colors_tab : 'Palette',
-web_colors : 'Palette colors',
-named_colors_tab : 'Named',
-named_colors : 'Named colors',
-color : 'Color:',
-color_name : 'Name:',
-is_email : 'The URL you entered seems to be an email address, do you want to add the required mailto: prefix?',
-is_external : 'The URL you entered seems to external link, do you want to add the required http:// prefix?'
-});
+tinyMCE.addI18n('en.advanced',{
+style_select:"Styles",
+font_size:"Font size",
+fontdefault:"Font family",
+block:"Format",
+paragraph:"Paragraph",
+div:"Div",
+address:"Address",
+pre:"Preformatted",
+h1:"Heading 1",
+h2:"Heading 2",
+h3:"Heading 3",
+h4:"Heading 4",
+h5:"Heading 5",
+h6:"Heading 6",
+blockquote:"Blockquote",
+code:"Code",
+samp:"Code sample",
+dt:"Definition term ",
+dd:"Definition description",
+bold_desc:"Bold (Ctrl+B)",
+italic_desc:"Italic (Ctrl+I)",
+underline_desc:"Underline (Ctrl+U)",
+striketrough_desc:"Strikethrough",
+justifyleft_desc:"Align left",
+justifycenter_desc:"Align center",
+justifyright_desc:"Align right",
+justifyfull_desc:"Align full",
+bullist_desc:"Unordered list",
+numlist_desc:"Ordered list",
+outdent_desc:"Outdent",
+indent_desc:"Indent",
+undo_desc:"Undo (Ctrl+Z)",
+redo_desc:"Redo (Ctrl+Y)",
+link_desc:"Insert/edit link",
+unlink_desc:"Unlink",
+image_desc:"Insert/edit image",
+cleanup_desc:"Cleanup messy code",
+code_desc:"Edit HTML Source",
+sub_desc:"Subscript",
+sup_desc:"Superscript",
+hr_desc:"Insert horizontal ruler",
+removeformat_desc:"Remove formatting",
+custom1_desc:"Your custom description here",
+forecolor_desc:"Select text color",
+backcolor_desc:"Select background color",
+charmap_desc:"Insert custom character",
+visualaid_desc:"Toggle guidelines/invisible elements",
+anchor_desc:"Insert/edit anchor",
+cut_desc:"Cut",
+copy_desc:"Copy",
+paste_desc:"Paste",
+image_props_desc:"Image properties",
+newdocument_desc:"New document",
+help_desc:"Help",
+blockquote_desc:"Blockquote",
+clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\r\nDo you want more information about this issue?",
+path:"Path",
+newdocument:"Are you sure you want clear all contents?",
+toolbar_focus:"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",
+more_colors:"More colors"
+}); \ No newline at end of file
diff --git a/program/js/tiny_mce/themes/advanced/langs/en_dlg.js b/program/js/tiny_mce/themes/advanced/langs/en_dlg.js
new file mode 100644
index 000000000..9d124d7db
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/langs/en_dlg.js
@@ -0,0 +1,51 @@
+tinyMCE.addI18n('en.advanced_dlg',{
+about_title:"About TinyMCE",
+about_general:"About",
+about_help:"Help",
+about_license:"License",
+about_plugins:"Plugins",
+about_plugin:"Plugin",
+about_author:"Author",
+about_version:"Version",
+about_loaded:"Loaded plugins",
+anchor_title:"Insert/edit anchor",
+anchor_name:"Anchor name",
+code_title:"HTML Source Editor",
+code_wordwrap:"Word wrap",
+colorpicker_title:"Select a color",
+colorpicker_picker_tab:"Picker",
+colorpicker_picker_title:"Color picker",
+colorpicker_palette_tab:"Palette",
+colorpicker_palette_title:"Palette colors",
+colorpicker_named_tab:"Named",
+colorpicker_named_title:"Named colors",
+colorpicker_color:"Color:",
+colorpicker_name:"Name:",
+charmap_title:"Select custom character",
+image_title:"Insert/edit image",
+image_src:"Image URL",
+image_alt:"Image description",
+image_list:"Image list",
+image_border:"Border",
+image_dimensions:"Dimensions",
+image_vspace:"Vertical space",
+image_hspace:"Horizontal space",
+image_align:"Alignment",
+image_align_baseline:"Baseline",
+image_align_top:"Top",
+image_align_middle:"Middle",
+image_align_bottom:"Bottom",
+image_align_texttop:"Text top",
+image_align_textbottom:"Text bottom",
+image_align_left:"Left",
+image_align_right:"Right",
+link_title:"Insert/edit link",
+link_url:"Link URL",
+link_target:"Target",
+link_target_same:"Open link in the same window",
+link_target_blank:"Open link in a new window",
+link_titlefield:"Title",
+link_is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?",
+link_is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?",
+link_list:"Link list"
+}); \ No newline at end of file
diff --git a/program/js/tiny_mce/themes/advanced/link.htm b/program/js/tiny_mce/themes/advanced/link.htm
index b27af9b6c..286cc9247 100644
--- a/program/js/tiny_mce/themes/advanced/link.htm
+++ b/program/js/tiny_mce/themes/advanced/link.htm
@@ -1,18 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title>{$lang_insert_link_title}</title>
- <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
- <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
- <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
- <script language="javascript" type="text/javascript" src="../../utils/validate.js"></script>
- <script language="javascript" type="text/javascript" src="jscripts/link.js"></script>
+ <title>{#advanced_dlg.link_title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="../../utils/validate.js"></script>
+ <script type="text/javascript" src="js/link.js"></script>
<base target="_self" />
</head>
-<body id="link" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
-<form onsubmit="insertLink();return false;" action="#">
+<body id="link" style="display: none">
+<form onsubmit="LinkDialog.update();return false;" action="#">
<div class="tabs">
<ul>
- <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{$lang_insert_link_title}</a></span></li>
+ <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.link_title}</a></span></li>
</ul>
</div>
@@ -21,79 +22,41 @@
<table border="0" cellpadding="4" cellspacing="0">
<tr>
- <td nowrap="nowrap"><label for="href">{$lang_insert_link_url}</label></td>
+ <td nowrap="nowrap"><label for="href">{#advanced_dlg.link_url}</label></td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
- <td><input id="href" name="href" type="text" value="" style="width: 200px" onchange="checkPrefix(this);" /></td>
+ <td><input id="href" name="href" type="text" class="mceFocus" value="" style="width: 200px" onchange="LinkDialog.checkPrefix(this);" /></td>
<td id="hrefbrowsercontainer">&nbsp;</td>
</tr>
</table></td>
</tr>
- <!-- Link list -->
- <script language="javascript">
- if (typeof(tinyMCELinkList) != "undefined" && tinyMCELinkList.length > 0) {
- var html = "";
-
- html += '<tr><td><label for="link_list">{$lang_link_list}</label></td>';
- html += '<td><select id="link_list" name="link_list" style="width: 200px" onchange="this.form.href.value=this.options[this.selectedIndex].value;">';
- html += '<option value="">---</option>';
-
- for (var i=0; i<tinyMCELinkList.length; i++)
- html += '<option value="' + tinyMCELinkList[i][1] + '">' + tinyMCELinkList[i][0] + '</option>';
-
- html += '</select></td></tr>';
-
- document.write(html);
- }
- </script>
- <!-- /Link list -->
- <tr>
- <td nowrap="nowrap"><label for="target">{$lang_insert_link_target}</label></td>
- <td><select id="target" name="target" style="width: 200px">
- <option value="_self">{$lang_insert_link_target_same}</option>
- <option value="_blank">{$lang_insert_link_target_blank}</option>
- <script language="javascript">
- var html = "";
- var targets = tinyMCE.getParam('theme_advanced_link_targets', '').split(';');
-
- for (var i=0; i<targets.length; i++) {
- var key, value;
-
- if (targets[i] == "")
- continue;
-
- key = targets[i].split('=')[0];
- value = targets[i].split('=')[1];
-
- html += '<option value="' + value + '">' + key + '</option>';
- }
-
- document.write(html);
- </script>
- </select></td>
- </tr>
+ <tr>
+ <td><label for="link_list">{#advanced_dlg.link_list}</label></td>
+ <td><select id="link_list" name="link_list" onchange="document.getElementById('href').value=this.options[this.selectedIndex].value;"></select></td>
+ </tr>
+ <tr>
+ <td><label id="targetlistlabel" for="targetlist">{#advanced_dlg.link_target}</label></td>
+ <td><select id="target_list" name="target_list"></select></td>
+ </tr>
<tr>
- <td nowrap="nowrap"><label for="linktitle">{$lang_theme_insert_link_titlefield}</label></td>
- <td><input id="linktitle" name="linktitle" type="text" value="" style="width: 200px"></td>
- </tr>
- <tr id="styleSelectRow">
- <td><label for="styleSelect">{$lang_class_name}</label></td>
- <td>
- <select id="styleSelect" name="styleSelect">
- <option value="" selected>{$lang_theme_style_select}</option>
- </select></td>
+ <td nowrap="nowrap"><label for="linktitle">{#advanced_dlg.link_titlefield}</label></td>
+ <td><input id="linktitle" name="linktitle" type="text" value="" style="width: 200px" /></td>
</tr>
+ <tr>
+ <td><label for="class_list">{#class_name}</label></td>
+ <td><select id="class_list" name="class_list"></select></td>
+ </tr>
</table>
</div>
</div>
<div class="mceActionPanel">
<div style="float: left">
- <input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertLink();" />
+ <input type="submit" id="insert" name="insert" value="{#insert}" />
</div>
<div style="float: right">
- <input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
</div>
</div>
</form>
diff --git a/program/js/tiny_mce/themes/advanced/skins/default/content.css b/program/js/tiny_mce/themes/advanced/skins/default/content.css
new file mode 100644
index 000000000..4bbbfdee7
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/skins/default/content.css
@@ -0,0 +1,25 @@
+body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
+body {background:#FFF;}
+body.mceForceColors {background:#FFF; color:#000;}
+h1 {font-size: 2em}
+h2 {font-size: 1.5em}
+h3 {font-size: 1.17em}
+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;}
+img {border:0;}
+
+/* IE */
+* html body {
+scrollbar-3dlight-color:#F0F0EE;
+scrollbar-arrow-color:#676662;
+scrollbar-base-color:#F0F0EE;
+scrollbar-darkshadow-color:#DDD;
+scrollbar-face-color:#E0E0DD;
+scrollbar-highlight-color:#F0F0EE;
+scrollbar-shadow-color:#F0F0EE;
+scrollbar-track-color:#F5F5F5;
+}
diff --git a/program/js/tiny_mce/themes/advanced/skins/default/dialog.css b/program/js/tiny_mce/themes/advanced/skins/default/dialog.css
new file mode 100644
index 000000000..c944a60ba
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/skins/default/dialog.css
@@ -0,0 +1,114 @@
+/* Generic */
+body {
+font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
+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;
+background:#F0F0EE;
+padding:0;
+margin:8px 8px 0 8px;
+}
+
+html {background:#F0F0EE;}
+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;}
+
+/* Forms */
+fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
+legend {color:#2B6FB6; font-weight:bold;}
+label.msg {display:none;}
+label.invalid {color:#EE0000; display:inline;}
+input.invalid {border:1px solid #EE0000;}
+input {background:#FFF; border:1px solid #CCC;}
+input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
+input, select, textarea {border:1px solid #808080;}
+input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
+input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
+.input_noborder {border:0;}
+
+/* Buttons */
+#insert, #cancel, input.button, .updateButton {
+border:0; margin:0; padding:0;
+font-weight:bold;
+width:94px; height:26px;
+background:url(img/buttons.png) 0 -26px;
+cursor:pointer;
+padding-bottom:2px;
+}
+
+#insert {background:url(img/buttons.png) 0 -52px;}
+#cancel {background:url(img/buttons.png) 0 0;}
+
+/* Browse */
+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;}
+a.browse span.disabled {border:1px solid white; -moz-opacity:0.3; opacity:0.3; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);}
+a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
+a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
+.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
+a.pickcolor:hover span {background-color:#B2BBD0;}
+a.pickcolor:hover span.disabled {}
+
+/* Charmap */
+table.charmap {border:1px solid #AAA; text-align:center}
+td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
+#charmap a {display:block; color:#000; text-decoration:none; border:0}
+#charmap a:hover {background:#CCC;color:#2B6FB6}
+#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
+#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
+
+/* Source */
+.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
+.mceActionPanel {margin-top:5px;}
+
+/* Tabs classes */
+.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;}
+.tabs ul {margin:0; padding:0; list-style:none;}
+.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
+.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
+.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
+.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;}
+.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
+.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
+
+/* Panels */
+.panel_wrapper div.panel {display:none;}
+.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
+.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
+
+/* Columns */
+.column {float:left;}
+.properties {width:100%;}
+.properties .column1 {}
+.properties .column2 {text-align:left;}
+
+/* Titles */
+h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
+h3 {font-size:14px;}
+.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
+
+/* Dialog specific */
+#link .panel_wrapper, #link div.current {height:125px;}
+#image .panel_wrapper, #image div.current {height:200px;}
+#plugintable thead {font-weight:bold; background:#DDD;}
+#plugintable, #about #plugintable td {border:1px solid #919B9C;}
+#plugintable {width:96%; margin-top:10px;}
+#pluginscontainer {height:290px; overflow:auto;}
+#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;}
+#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
+#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
+#colorpicker #light div {overflow:hidden;}
+#colorpicker #previewblock {float:right; padding-left:10px; height:20px;}
+#colorpicker .panel_wrapper div.current {height:175px;}
+#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
diff --git a/program/js/tiny_mce/themes/advanced/skins/default/img/buttons.png b/program/js/tiny_mce/themes/advanced/skins/default/img/buttons.png
new file mode 100644
index 000000000..7dd58418b
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/skins/default/img/buttons.png
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/images/anchor_symbol.gif b/program/js/tiny_mce/themes/advanced/skins/default/img/items.gif
index 2eafd7954..2eafd7954 100644
--- a/program/js/tiny_mce/themes/advanced/images/anchor_symbol.gif
+++ b/program/js/tiny_mce/themes/advanced/skins/default/img/items.gif
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif b/program/js/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif
new file mode 100644
index 000000000..85e31dfb2
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/skins/default/img/menu_check.gif b/program/js/tiny_mce/themes/advanced/skins/default/img/menu_check.gif
new file mode 100644
index 000000000..adfdddccd
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/skins/default/img/menu_check.gif
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/skins/default/img/progress.gif b/program/js/tiny_mce/themes/advanced/skins/default/img/progress.gif
new file mode 100644
index 000000000..5bb90fd6a
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/skins/default/img/progress.gif
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/skins/default/img/tabs.gif b/program/js/tiny_mce/themes/advanced/skins/default/img/tabs.gif
new file mode 100644
index 000000000..ce4be6355
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/skins/default/img/tabs.gif
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/skins/default/ui.css b/program/js/tiny_mce/themes/advanced/skins/default/ui.css
new file mode 100644
index 000000000..953a7fb17
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/skins/default/ui.css
@@ -0,0 +1,211 @@
+/* Reset */
+.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left}
+.defaultSkin a:hover, .defaultSkin a:link, .defaultSkin a:visited, .defaultSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000}
+.defaultSkin table td {vertical-align:middle}
+
+/* Containers */
+.defaultSkin table {background:#F0F0EE}
+.defaultSkin iframe {display:block; background:#FFF}
+.defaultSkin .mceToolbar {height:26px}
+.defaultSkin .mceLeft {text-align:left}
+.defaultSkin .mceRight {text-align:right}
+
+/* External */
+.defaultSkin .mceExternalToolbar {position:absolute; border:1px solid #CCC; border-bottom:0; display:none;}
+.defaultSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
+.defaultSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
+
+/* Layout */
+.defaultSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC}
+.defaultSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC}
+.defaultSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC}
+.defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;}
+.defaultSkin td.mceToolbar {padding-top:1px; vertical-align:top}
+.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:hover {text-decoration:underline}
+.defaultSkin table.mceToolbar {margin-left:3px}
+.defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px}
+.defaultSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
+.defaultSkin td.mceCenter {text-align:center;}
+.defaultSkin td.mceCenter table {margin:0 auto; text-align:left;}
+.defaultSkin td.mceRight table {margin:0 0 0 auto;}
+
+/* Button */
+.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px;}
+.defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0}
+.defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0}
+.defaultSkin .mceButtonDisabled .mceIcon {opacity:0.3; filter:alpha(opacity=30)}
+
+/* Separator */
+.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;}
+.defaultSkin table.mceListBoxEnabled:hover .mceText, .defaultSkin .mceListBoxHover .mceText, .defaultSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF}
+.defaultSkin table.mceListBoxEnabled:hover .mceOpen, .defaultSkin .mceListBoxHover .mceOpen, .defaultSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0}
+.defaultSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;}
+.defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden}
+.defaultSkin .mceOldBoxModel .mceListBox .mceText {height:22px}
+.defaultSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;}
+.defaultSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;}
+
+/* SplitButton */
+.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 a.mceOpen {width:9px; border:1px solid #F0F0EE;}
+.defaultSkin .mceSplitButton span.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0;}
+.defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0}
+.defaultSkin table.mceSplitButtonEnabled:hover a.mceOpen, .defaultSkin .mceSplitButtonHover a.mceOpen, .defaultSkin .mceSplitButtonSelected a.mceOpen {border:1px solid #0A246A;}
+.defaultSkin table.mceSplitButtonEnabled:hover span.mceOpen, .defaultSkin .mceSplitButtonHover span.mceOpen, .defaultSkin .mceSplitButtonSelected span.mceOpen {background-color:#B2BBD0}
+.defaultSkin .mceSplitButtonDisabled .mceAction, .defaultSkin .mceSplitButtonDisabled span.mceOpen {opacity:0.3; filter:alpha(opacity=30)}
+.defaultSkin .mceSplitButtonActive a.mceAction {border:1px solid #0A246A; background-color:#C2CBE0}
+.defaultSkin .mceSplitButtonActive a.mceOpen {border-left:0;}
+
+/* ColorSplitButton */
+.defaultSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
+.defaultSkin .mceColorSplitMenu td {padding:2px}
+.defaultSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
+.defaultSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
+.defaultSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
+.defaultSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
+.defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A}
+.defaultSkin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a}
+.defaultSkin .mce_forecolor span.mceAction, .defaultSkin .mce_backcolor span.mceAction {overflow:hidden; height:16px}
+
+/* Menu */
+.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8}
+.defaultSkin .mceNoIcons span.mceIcon {width:0;}
+.defaultSkin .mceNoIcons a .mceText {padding-left:10px}
+.defaultSkin .mceMenu table {background:#FFF}
+.defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block}
+.defaultSkin .mceMenu td {height:20px}
+.defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0}
+.defaultSkin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block}
+.defaultSkin .mceMenu span.mceText, .defaultSkin .mceMenu .mcePreview {font-size:11px}
+.defaultSkin .mceMenu pre.mceText {font-family:Monospace}
+.defaultSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
+.defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
+.defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px}
+.defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD}
+.defaultSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px}
+.defaultSkin .mceMenuItemDisabled .mceText {color:#888}
+.defaultSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)}
+.defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center}
+.defaultSkin .mceMenu span.mceMenuLine {display:none}
+.defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;}
+
+/* Progress,Resize */
+.defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; 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}
+.defaultSkin .mce_p span.mceText {}
+.defaultSkin .mce_address span.mceText {font-style:italic}
+.defaultSkin .mce_pre span.mceText {font-family:monospace}
+.defaultSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
+.defaultSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
+.defaultSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
+.defaultSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
+.defaultSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
+.defaultSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
+
+/* Theme */
+.defaultSkin span.mce_bold {background-position:0 0}
+.defaultSkin span.mce_italic {background-position:-60px 0}
+.defaultSkin span.mce_underline {background-position:-140px 0}
+.defaultSkin span.mce_strikethrough {background-position:-120px 0}
+.defaultSkin span.mce_undo {background-position:-160px 0}
+.defaultSkin span.mce_redo {background-position:-100px 0}
+.defaultSkin span.mce_cleanup {background-position:-40px 0}
+.defaultSkin span.mce_bullist {background-position:-20px 0}
+.defaultSkin span.mce_numlist {background-position:-80px 0}
+.defaultSkin span.mce_justifyleft {background-position:-460px 0}
+.defaultSkin span.mce_justifyright {background-position:-480px 0}
+.defaultSkin span.mce_justifycenter {background-position:-420px 0}
+.defaultSkin span.mce_justifyfull {background-position:-440px 0}
+.defaultSkin span.mce_anchor {background-position:-200px 0}
+.defaultSkin span.mce_indent {background-position:-400px 0}
+.defaultSkin span.mce_outdent {background-position:-540px 0}
+.defaultSkin span.mce_link {background-position:-500px 0}
+.defaultSkin span.mce_unlink {background-position:-640px 0}
+.defaultSkin span.mce_sub {background-position:-600px 0}
+.defaultSkin span.mce_sup {background-position:-620px 0}
+.defaultSkin span.mce_removeformat {background-position:-580px 0}
+.defaultSkin span.mce_newdocument {background-position:-520px 0}
+.defaultSkin span.mce_image {background-position:-380px 0}
+.defaultSkin span.mce_help {background-position:-340px 0}
+.defaultSkin span.mce_code {background-position:-260px 0}
+.defaultSkin span.mce_hr {background-position:-360px 0}
+.defaultSkin span.mce_visualaid {background-position:-660px 0}
+.defaultSkin span.mce_charmap {background-position:-240px 0}
+.defaultSkin span.mce_paste {background-position:-560px 0}
+.defaultSkin span.mce_copy {background-position:-700px 0}
+.defaultSkin span.mce_cut {background-position:-680px 0}
+.defaultSkin span.mce_blockquote {background-position:-220px 0}
+.defaultSkin .mce_forecolor span.mceAction {background-position:-720px 0}
+.defaultSkin .mce_backcolor span.mceAction {background-position:-760px 0}
+.defaultSkin .mce_forecolorpicker {background-position:-720px 0}
+.defaultSkin .mce_backcolorpicker {background-position:-760px 0}
+
+/* Plugins */
+.defaultSkin span.mce_advhr {background-position:-0px -20px}
+.defaultSkin span.mce_ltr {background-position:-20px -20px}
+.defaultSkin span.mce_rtl {background-position:-40px -20px}
+.defaultSkin span.mce_emotions {background-position:-60px -20px}
+.defaultSkin span.mce_fullpage {background-position:-80px -20px}
+.defaultSkin span.mce_fullscreen {background-position:-100px -20px}
+.defaultSkin span.mce_iespell {background-position:-120px -20px}
+.defaultSkin span.mce_insertdate {background-position:-140px -20px}
+.defaultSkin span.mce_inserttime {background-position:-160px -20px}
+.defaultSkin span.mce_absolute {background-position:-180px -20px}
+.defaultSkin span.mce_backward {background-position:-200px -20px}
+.defaultSkin span.mce_forward {background-position:-220px -20px}
+.defaultSkin span.mce_insert_layer {background-position:-240px -20px}
+.defaultSkin span.mce_insertlayer {background-position:-260px -20px}
+.defaultSkin span.mce_movebackward {background-position:-280px -20px}
+.defaultSkin span.mce_moveforward {background-position:-300px -20px}
+.defaultSkin span.mce_media {background-position:-320px -20px}
+.defaultSkin span.mce_nonbreaking {background-position:-340px -20px}
+.defaultSkin span.mce_pastetext {background-position:-360px -20px}
+.defaultSkin span.mce_pasteword {background-position:-380px -20px}
+.defaultSkin span.mce_selectall {background-position:-400px -20px}
+.defaultSkin span.mce_preview {background-position:-420px -20px}
+.defaultSkin span.mce_print {background-position:-440px -20px}
+.defaultSkin span.mce_cancel {background-position:-460px -20px}
+.defaultSkin span.mce_save {background-position:-480px -20px}
+.defaultSkin span.mce_replace {background-position:-500px -20px}
+.defaultSkin span.mce_search {background-position:-520px -20px}
+.defaultSkin span.mce_styleprops {background-position:-560px -20px}
+.defaultSkin span.mce_table {background-position:-580px -20px}
+.defaultSkin span.mce_cell_props {background-position:-600px -20px}
+.defaultSkin span.mce_delete_table {background-position:-620px -20px}
+.defaultSkin span.mce_delete_col {background-position:-640px -20px}
+.defaultSkin span.mce_delete_row {background-position:-660px -20px}
+.defaultSkin span.mce_col_after {background-position:-680px -20px}
+.defaultSkin span.mce_col_before {background-position:-700px -20px}
+.defaultSkin span.mce_row_after {background-position:-720px -20px}
+.defaultSkin span.mce_row_before {background-position:-740px -20px}
+.defaultSkin span.mce_merge_cells {background-position:-760px -20px}
+.defaultSkin span.mce_table_props {background-position:-980px -20px}
+.defaultSkin span.mce_row_props {background-position:-780px -20px}
+.defaultSkin span.mce_split_cells {background-position:-800px -20px}
+.defaultSkin span.mce_template {background-position:-820px -20px}
+.defaultSkin span.mce_visualchars {background-position:-840px -20px}
+.defaultSkin span.mce_abbr {background-position:-860px -20px}
+.defaultSkin span.mce_acronym {background-position:-880px -20px}
+.defaultSkin span.mce_attribs {background-position:-900px -20px}
+.defaultSkin span.mce_cite {background-position:-920px -20px}
+.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}
diff --git a/program/js/tiny_mce/themes/advanced/skins/o2k7/content.css b/program/js/tiny_mce/themes/advanced/skins/o2k7/content.css
new file mode 100644
index 000000000..296dd69e9
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/skins/o2k7/content.css
@@ -0,0 +1,25 @@
+body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
+body {background:#FFF;}
+body.mceForceColors {background:#FFF; color:#000;}
+h1 {font-size: 2em}
+h2 {font-size: 1.5em}
+h3 {font-size: 1.17em}
+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;}
+img {border:0;}
+
+/* IE */
+* html body {
+scrollbar-3dlight-color:#F0F0EE;
+scrollbar-arrow-color:#676662;
+scrollbar-base-color:#F0F0EE;
+scrollbar-darkshadow-color:#DDD;
+scrollbar-face-color:#E0E0DD;
+scrollbar-highlight-color:#F0F0EE;
+scrollbar-shadow-color:#F0F0EE;
+scrollbar-track-color:#F5F5F5;
+}
diff --git a/program/js/tiny_mce/themes/advanced/skins/o2k7/dialog.css b/program/js/tiny_mce/themes/advanced/skins/o2k7/dialog.css
new file mode 100644
index 000000000..e36042e64
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/skins/o2k7/dialog.css
@@ -0,0 +1,113 @@
+/* Generic */
+body {
+font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
+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;
+background:#F0F0EE;
+padding:0;
+margin:8px 8px 0 8px;
+}
+
+html {background:#F0F0EE;}
+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;}
+
+/* Forms */
+fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
+legend {color:#2B6FB6; font-weight:bold;}
+label.msg {display:none;}
+label.invalid {color:#EE0000; display:inline;}
+input.invalid {border:1px solid #EE0000;}
+input {background:#FFF; border:1px solid #CCC;}
+input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
+input, select, textarea {border:1px solid #808080;}
+input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
+input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
+.input_noborder {border:0;}
+
+/* Buttons */
+#insert, #cancel, input.button, .updateButton {
+border:0; margin:0; padding:0;
+font-weight:bold;
+width:94px; height:26px;
+background:url(../default/img/buttons.png) 0 -26px;
+cursor:pointer;
+padding-bottom:2px;
+}
+
+#insert {background:url(../default/img/buttons.png) 0 -52px;}
+#cancel {background:url(../default/img/buttons.png) 0 0;}
+
+/* Browse */
+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;}
+a.browse span.disabled {border:1px solid white; -moz-opacity:0.3; opacity:0.3; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);}
+a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
+a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
+.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
+a.pickcolor:hover span {background-color:#B2BBD0;}
+a.pickcolor:hover span.disabled {}
+
+/* Charmap */
+table.charmap {border:1px solid #AAA; text-align:center}
+td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
+#charmap a {display:block; color:#000; text-decoration:none; border:0}
+#charmap a:hover {background:#CCC;color:#2B6FB6}
+#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
+#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
+
+/* Source */
+.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
+.mceActionPanel {margin-top:5px;}
+
+/* Tabs classes */
+.tabs {width:100%; height:18px; line-height:normal; background:url(../default/img/tabs.gif) repeat-x 0 -72px;}
+.tabs ul {margin:0; padding:0; list-style:none;}
+.tabs li {float:left; background:url(../default/img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
+.tabs li.current {background:url(../default/img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
+.tabs span {float:left; display:block; background:url(../default/img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
+.tabs .current span {background:url(../default/img/tabs.gif) no-repeat right -54px;}
+.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
+.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
+
+/* Panels */
+.panel_wrapper div.panel {display:none;}
+.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
+.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
+
+/* Columns */
+.column {float:left;}
+.properties {width:100%;}
+.properties .column1 {}
+.properties .column2 {text-align:left;}
+
+/* Titles */
+h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
+h3 {font-size:14px;}
+.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
+
+/* Dialog specific */
+#link .panel_wrapper, #link div.current {height:125px;}
+#image .panel_wrapper, #image div.current {height:200px;}
+#plugintable thead {font-weight:bold; background:#DDD;}
+#plugintable, #about #plugintable td {border:1px solid #919B9C;}
+#plugintable {width:96%; margin-top:10px;}
+#pluginscontainer {height:290px; overflow:auto;}
+#colorpicker #preview {float:right; width:50px; height:14px;line-height:1px; border:1px solid black; margin-left:5px;}
+#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
+#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
+#colorpicker #light div {overflow:hidden;}
+#colorpicker #previewblock {float:right; padding-left:10px; height:20px;}
+#colorpicker .panel_wrapper div.current {height:175px;}
+#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;}
diff --git a/program/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png b/program/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png
new file mode 100644
index 000000000..12cfb419b
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png b/program/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png
new file mode 100644
index 000000000..8996c7493
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png b/program/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png
new file mode 100644
index 000000000..bd5d2550c
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png
Binary files differ
diff --git a/program/js/tiny_mce/themes/advanced/skins/o2k7/ui.css b/program/js/tiny_mce/themes/advanced/skins/o2k7/ui.css
new file mode 100644
index 000000000..f5d450b0e
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/skins/o2k7/ui.css
@@ -0,0 +1,211 @@
+/* Reset */
+.o2k7Skin table, .o2k7Skin tbody, .o2k7Skin a, .o2k7Skin img, .o2k7Skin tr, .o2k7Skin div, .o2k7Skin td, .o2k7Skin iframe, .o2k7Skin span, .o2k7Skin *, .o2k7Skin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left}
+.o2k7Skin a:hover, .o2k7Skin a:link, .o2k7Skin a:visited, .o2k7Skin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000}
+.o2k7Skin table td {vertical-align:middle}
+
+/* Containers */
+.o2k7Skin table {background:#E5EFFD}
+.o2k7Skin iframe {display:block; background:#FFF}
+.o2k7Skin .mceToolbar {height:26px}
+
+/* External */
+.o2k7Skin .mceExternalToolbar {position:absolute; border:1px solid #ABC6DD; border-bottom:0; display:none}
+.o2k7Skin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
+.o2k7Skin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
+
+/* Layout */
+.o2k7Skin table.mceLayout {border:0; border-left:1px solid #ABC6DD; border-right:1px solid #ABC6DD}
+.o2k7Skin table.mceLayout tr.mceFirst td {border-top:1px solid #ABC6DD}
+.o2k7Skin table.mceLayout tr.mceLast td {border-bottom:1px solid #ABC6DD}
+.o2k7Skin table.mceToolbar, .o2k7Skin tr.mceFirst .mceToolbar tr td, .o2k7Skin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0}
+.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: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;}
+.o2k7Skin .mceToolbar td.mceFirst span {margin:0}
+.o2k7Skin .mceToolbar .mceToolbarEnd span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px}
+.o2k7Skin .mceToolbar .mceToolbarEndListBox span, .o2k7Skin .mceToolbar .mceToolbarStartListBox span {display:none}
+.o2k7Skin span.mceIcon, .o2k7Skin img.mceIcon {display:block; width:20px; height:20px}
+.o2k7Skin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
+.o2k7Skin td.mceCenter {text-align:center;}
+.o2k7Skin td.mceCenter table {margin:0 auto; text-align:left;}
+.o2k7Skin td.mceRight table {margin:0 0 0 auto;}
+
+/* Button */
+.o2k7Skin .mceButton {display:block; background:url(img/button_bg.png); width:22px; height:22px}
+.o2k7Skin a.mceButton span, .o2k7Skin a.mceButton img {margin-left:1px}
+.o2k7Skin .mceOldBoxModel a.mceButton span, .o2k7Skin .mceOldBoxModel a.mceButton img {margin:0 0 0 1px}
+.o2k7Skin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px}
+.o2k7Skin a.mceButtonActive, .o2k7Skin a.mceButtonSelected {background-position:0 -44px}
+.o2k7Skin .mceButtonDisabled .mceIcon {opacity:0.3; filter:alpha(opacity=30)}
+
+/* Separator */
+.o2k7Skin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px}
+
+/* ListBox */
+.o2k7Skin .mceListBox {margin-left:3px}
+.o2k7Skin .mceListBox, .o2k7Skin .mceListBox a {display:block}
+.o2k7Skin .mceListBox .mceText {padding-left:4px; text-align:left; width:70px; border:1px solid #b3c7e1; border-right:0; background:#eaf2fb; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
+.o2k7Skin .mceListBox .mceOpen {width:14px; height:22px; background:url(img/button_bg.png) -66px 0}
+.o2k7Skin table.mceListBoxEnabled:hover .mceText, .o2k7Skin .mceListBoxHover .mceText, .o2k7Skin .mceListBoxSelected .mceText {background:#FFF}
+.o2k7Skin table.mceListBoxEnabled:hover .mceOpen, .o2k7Skin .mceListBoxHover .mceOpen, .o2k7Skin .mceListBoxSelected .mceOpen {background-position:-66px -22px}
+.o2k7Skin .mceListBoxDisabled .mceText {color:gray}
+.o2k7Skin .mceListBoxMenu {overflow:auto; overflow-x:hidden}
+.o2k7Skin .mceOldBoxModel .mceListBox .mceText {height:22px}
+.o2k7Skin select.mceListBox {font-family:Tahoma,Verdana,Arial,Helvetica; font-size:12px; border:1px solid #b3c7e1; background:#FFF;}
+
+/* SplitButton */
+.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 a.mceOpen {width:10px}
+.o2k7Skin .mceSplitButton span.mceOpen {width:10px; background:url(img/button_bg.png) -44px 0}
+.o2k7Skin table.mceSplitButtonEnabled:hover a.mceAction, .o2k7Skin .mceSplitButtonHover a.mceAction, .o2k7Skin .mceSplitButtonSelected {background:url(img/button_bg.png) 0 -22px}
+.o2k7Skin table.mceSplitButtonEnabled:hover span.mceOpen, .o2k7Skin .mceSplitButtonHover span.mceOpen, .o2k7Skin .mceSplitButtonSelected span.mceOpen {background-position:-44px -44px}
+.o2k7Skin .mceSplitButtonDisabled .mceAction {opacity:0.3; filter:alpha(opacity=30)}
+.o2k7Skin .mceSplitButtonActive {background-position:0 -44px}
+
+/* ColorSplitButton */
+.o2k7Skin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
+.o2k7Skin .mceColorSplitMenu td {padding:2px}
+.o2k7Skin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
+.o2k7Skin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
+.o2k7Skin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
+.o2k7Skin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
+.o2k7Skin a.mceMoreColors:hover {border:1px solid #0A246A}
+.o2k7Skin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a}
+.o2k7Skin .mce_forecolor span.mceAction, .o2k7Skin .mce_backcolor span.mceAction {height:15px}
+
+/* Menu */
+.o2k7Skin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #ABC6DD}
+.o2k7Skin .mceNoIcons span.mceIcon {width:0;}
+.o2k7Skin .mceNoIcons a .mceText {padding-left:10px}
+.o2k7Skin .mceMenu table {background:#FFF}
+.o2k7Skin .mceMenu a, .o2k7Skin .mceMenu span, .o2k7Skin .mceMenu {display:block}
+.o2k7Skin .mceMenu td {height:20px}
+.o2k7Skin .mceMenu a {position:relative;padding:3px 0 4px 0}
+.o2k7Skin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block}
+.o2k7Skin .mceMenu span.mceText, .o2k7Skin .mceMenu .mcePreview {font-size:11px}
+.o2k7Skin .mceMenu pre.mceText {font-family:Monospace}
+.o2k7Skin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
+.o2k7Skin .mceMenu .mceMenuItemEnabled a:hover, .o2k7Skin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
+.o2k7Skin td.mceMenuItemSeparator {background:#DDD; height:1px}
+.o2k7Skin .mceMenuItemTitle a {border:0; background:#E5EFFD; border-bottom:1px solid #ABC6DD}
+.o2k7Skin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px}
+.o2k7Skin .mceMenuItemDisabled .mceText {color:#888}
+.o2k7Skin .mceMenuItemSelected .mceIcon {background:url(../default/img/menu_check.gif)}
+.o2k7Skin .mceNoIcons .mceMenuItemSelected a {background:url(../default/img/menu_arrow.gif) no-repeat -6px center}
+.o2k7Skin .mceMenu span.mceMenuLine {display:none}
+.o2k7Skin .mceMenuItemSub a {background:url(../default/img/menu_arrow.gif) no-repeat top right;}
+
+/* Progress,Resize */
+.o2k7Skin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; 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}
+.o2k7Skin .mce_p span.mceText {}
+.o2k7Skin .mce_address span.mceText {font-style:italic}
+.o2k7Skin .mce_pre span.mceText {font-family:monospace}
+.o2k7Skin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
+.o2k7Skin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
+.o2k7Skin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
+.o2k7Skin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
+.o2k7Skin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
+.o2k7Skin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
+
+/* Theme */
+.o2k7Skin span.mce_bold {background-position:0 0}
+.o2k7Skin span.mce_italic {background-position:-60px 0}
+.o2k7Skin span.mce_underline {background-position:-140px 0}
+.o2k7Skin span.mce_strikethrough {background-position:-120px 0}
+.o2k7Skin span.mce_undo {background-position:-160px 0}
+.o2k7Skin span.mce_redo {background-position:-100px 0}
+.o2k7Skin span.mce_cleanup {background-position:-40px 0}
+.o2k7Skin span.mce_bullist {background-position:-20px 0}
+.o2k7Skin span.mce_numlist {background-position:-80px 0}
+.o2k7Skin span.mce_justifyleft {background-position:-460px 0}
+.o2k7Skin span.mce_justifyright {background-position:-480px 0}
+.o2k7Skin span.mce_justifycenter {background-position:-420px 0}
+.o2k7Skin span.mce_justifyfull {background-position:-440px 0}
+.o2k7Skin span.mce_anchor {background-position:-200px 0}
+.o2k7Skin span.mce_indent {background-position:-400px 0}
+.o2k7Skin span.mce_outdent {background-position:-540px 0}
+.o2k7Skin span.mce_link {background-position:-500px 0}
+.o2k7Skin span.mce_unlink {background-position:-640px 0}
+.o2k7Skin span.mce_sub {background-position:-600px 0}
+.o2k7Skin span.mce_sup {background-position:-620px 0}
+.o2k7Skin span.mce_removeformat {background-position:-580px 0}
+.o2k7Skin span.mce_newdocument {background-position:-520px 0}
+.o2k7Skin span.mce_image {background-position:-380px 0}
+.o2k7Skin span.mce_help {background-position:-340px 0}
+.o2k7Skin span.mce_code {background-position:-260px 0}
+.o2k7Skin span.mce_hr {background-position:-360px 0}
+.o2k7Skin span.mce_visualaid {background-position:-660px 0}
+.o2k7Skin span.mce_charmap {background-position:-240px 0}
+.o2k7Skin span.mce_paste {background-position:-560px 0}
+.o2k7Skin span.mce_copy {background-position:-700px 0}
+.o2k7Skin span.mce_cut {background-position:-680px 0}
+.o2k7Skin span.mce_blockquote {background-position:-220px 0}
+.o2k7Skin .mce_forecolor span.mceAction {background-position:-720px 0}
+.o2k7Skin .mce_backcolor span.mceAction {background-position:-760px 0}
+.o2k7Skin .mce_forecolorpicker {background-position:-720px 0}
+.o2k7Skin .mce_backcolorpicker {background-position:-760px 0}
+
+/* Plugins */
+.o2k7Skin span.mce_advhr {background-position:-0px -20px}
+.o2k7Skin span.mce_ltr {background-position:-20px -20px}
+.o2k7Skin span.mce_rtl {background-position:-40px -20px}
+.o2k7Skin span.mce_emotions {background-position:-60px -20px}
+.o2k7Skin span.mce_fullpage {background-position:-80px -20px}
+.o2k7Skin span.mce_fullscreen {background-position:-100px -20px}
+.o2k7Skin span.mce_iespell {background-position:-120px -20px}
+.o2k7Skin span.mce_insertdate {background-position:-140px -20px}
+.o2k7Skin span.mce_inserttime {background-position:-160px -20px}
+.o2k7Skin span.mce_absolute {background-position:-180px -20px}
+.o2k7Skin span.mce_backward {background-position:-200px -20px}
+.o2k7Skin span.mce_forward {background-position:-220px -20px}
+.o2k7Skin span.mce_insert_layer {background-position:-240px -20px}
+.o2k7Skin span.mce_insertlayer {background-position:-260px -20px}
+.o2k7Skin span.mce_movebackward {background-position:-280px -20px}
+.o2k7Skin span.mce_moveforward {background-position:-300px -20px}
+.o2k7Skin span.mce_media {background-position:-320px -20px}
+.o2k7Skin span.mce_nonbreaking {background-position:-340px -20px}
+.o2k7Skin span.mce_pastetext {background-position:-360px -20px}
+.o2k7Skin span.mce_pasteword {background-position:-380px -20px}
+.o2k7Skin span.mce_selectall {background-position:-400px -20px}
+.o2k7Skin span.mce_preview {background-position:-420px -20px}
+.o2k7Skin span.mce_print {background-position:-440px -20px}
+.o2k7Skin span.mce_cancel {background-position:-460px -20px}
+.o2k7Skin span.mce_save {background-position:-480px -20px}
+.o2k7Skin span.mce_replace {background-position:-500px -20px}
+.o2k7Skin span.mce_search {background-position:-520px -20px}
+.o2k7Skin span.mce_styleprops {background-position:-560px -20px}
+.o2k7Skin span.mce_table {background-position:-580px -20px}
+.o2k7Skin span.mce_cell_props {background-position:-600px -20px}
+.o2k7Skin span.mce_delete_table {background-position:-620px -20px}
+.o2k7Skin span.mce_delete_col {background-position:-640px -20px}
+.o2k7Skin span.mce_delete_row {background-position:-660px -20px}
+.o2k7Skin span.mce_col_after {background-position:-680px -20px}
+.o2k7Skin span.mce_col_before {background-position:-700px -20px}
+.o2k7Skin span.mce_row_after {background-position:-720px -20px}
+.o2k7Skin span.mce_row_before {background-position:-740px -20px}
+.o2k7Skin span.mce_merge_cells {background-position:-760px -20px}
+.o2k7Skin span.mce_table_props {background-position:-980px -20px}
+.o2k7Skin span.mce_row_props {background-position:-780px -20px}
+.o2k7Skin span.mce_split_cells {background-position:-800px -20px}
+.o2k7Skin span.mce_template {background-position:-820px -20px}
+.o2k7Skin span.mce_visualchars {background-position:-840px -20px}
+.o2k7Skin span.mce_abbr {background-position:-860px -20px}
+.o2k7Skin span.mce_acronym {background-position:-880px -20px}
+.o2k7Skin span.mce_attribs {background-position:-900px -20px}
+.o2k7Skin span.mce_cite {background-position:-920px -20px}
+.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}
diff --git a/program/js/tiny_mce/themes/advanced/skins/o2k7/ui_black.css b/program/js/tiny_mce/themes/advanced/skins/o2k7/ui_black.css
new file mode 100644
index 000000000..a42a727ab
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/skins/o2k7/ui_black.css
@@ -0,0 +1,8 @@
+/* Black */
+.o2k7SkinBlack .mceToolbar .mceToolbarStart span, .o2k7SkinBlack .mceToolbar .mceToolbarEnd span, .o2k7SkinBlack .mceButton, .o2k7SkinBlack .mceSplitButton, .o2k7SkinBlack .mceSeparator, .o2k7SkinBlack .mceSplitButton span.mceOpen, .o2k7SkinBlack .mceListBox .mceOpen {background-image:url(img/button_bg_black.png)}
+.o2k7SkinBlack table, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack .mceMenuItemTitle span.mceText, .o2k7SkinBlack .mceStatusbar div, .o2k7SkinBlack .mceStatusbar span, .o2k7SkinBlack .mceStatusbar a {background:#535353; color:#FFF}
+.o2k7SkinBlack table.mceListBoxEnabled .mceText, o2k7SkinBlack .mceListBox .mceText {background:#FFF; border:1px solid #CBCFD4; border-bottom-color:#989FA9; border-right:0}
+.o2k7SkinBlack table.mceListBoxEnabled:hover .mceText, .o2k7Skin .mceListBoxHover .mceText, .o2k7Skin .mceListBoxSelected .mceText {background:#FFF; border:1px solid #FFBD69; border-right:0}
+.o2k7SkinBlack .mceExternalToolbar, .o2k7SkinBlack .mceListBox .mceText, .o2k7SkinBlack div.mceMenu, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceFirst td, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceLast td, .o2k7SkinBlack .mceIframeContainer {border-color: #535353;}
+.o2k7SkinBlack table.mceSplitButtonEnabled:hover a.mceAction, .o2k7Skin .mceSplitButtonHover a.mceAction, .o2k7Skin .mceSplitButtonSelected {background-image:url(img/button_bg_black.png)}
+.o2k7SkinBlack .mceMenu .mceMenuItemEnabled a:hover, .o2k7Skin .mceMenu .mceMenuItemActive {background-color:#FFE7A1} \ No newline at end of file
diff --git a/program/js/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css b/program/js/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css
new file mode 100644
index 000000000..548b1b852
--- /dev/null
+++ b/program/js/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css
@@ -0,0 +1,5 @@
+/* Silver */
+.o2k7SkinSilver .mceToolbar .mceToolbarStart span, .o2k7SkinSilver .mceButton, .o2k7SkinSilver .mceSplitButton, .o2k7SkinSilver .mceSeparator, .o2k7SkinSilver .mceSplitButton span.mceOpen, .o2k7SkinSilver .mceListBox .mceOpen {background-image:url(img/button_bg_silver.png)}
+.o2k7SkinSilver table, .o2k7SkinSilver .mceMenuItemTitle a {background:#eee}
+.o2k7SkinSilver .mceListBox .mceText {background:#FFF}
+.o2k7SkinSilver .mceExternalToolbar, .o2k7SkinSilver .mceListBox .mceText, .o2k7SkinSilver div.mceMenu, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceFirst td, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceLast td, .o2k7SkinSilver .mceIframeContainer {border-color: #bbb}
diff --git a/program/js/tiny_mce/themes/advanced/source_editor.htm b/program/js/tiny_mce/themes/advanced/source_editor.htm
index c3f80c4f7..119a913c9 100644
--- a/program/js/tiny_mce/themes/advanced/source_editor.htm
+++ b/program/js/tiny_mce/themes/advanced/source_editor.htm
@@ -1,30 +1,30 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <title>{$lang_theme_code_title}</title>
- <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
- <script language="javascript" type="text/javascript" src="jscripts/source_editor.js"></script>
+ <title>{#advanced_dlg.code_title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="js/source_editor.js"></script>
<base target="_self" />
</head>
-<body onload="tinyMCEPopup.executeOnLoad('onLoadInit();');" onresize="resizeInputs();" style="display: none">
- <form name="source" onsubmit="saveContent();" action="#">
- <div style="float: left" class="title">{$lang_theme_code_title}</div>
+<body onresize="resizeInputs();" style="display:none; overflow:hidden;">
+ <form name="source" onsubmit="saveContent();return false;" action="#">
+ <div style="float: left" class="title">{#advanced_dlg.code_title}</div>
<div id="wrapline" style="float: right">
- <input type="checkbox" name="wraped" id="wraped" onclick="toggleWordWrap(this);" class="wordWrapCode" /><label for="wraped">{$lang_theme_code_wordwrap}</label>
+ <input type="checkbox" name="wraped" id="wraped" onclick="toggleWordWrap(this);" class="wordWrapCode" /><label for="wraped">{#advanced_dlg.code_wordwrap}</label>
</div>
<br style="clear: both" />
- <textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,monospace; font-size: 12px" dir="ltr" wrap="off"></textarea>
+ <textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,monospace; font-size: 12px;" dir="ltr" wrap="off" class="mceFocus"></textarea>
<div class="mceActionPanel">
<div style="float: left">
- <input type="button" name="insert" value="{$lang_update}" onclick="saveContent();" id="insert" />
+ <input type="submit" name="insert" value="{#update}" id="insert" />
</div>
<div style="float: right">
- <input type="button" name="cancel" value="{$lang_cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
+ <input type="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
</div>
</div>
</form>
diff --git a/program/js/tiny_mce/themes/simple/editor_template.js b/program/js/tiny_mce/themes/simple/editor_template.js
new file mode 100644
index 000000000..3a25c04d6
--- /dev/null
+++ b/program/js/tiny_mce/themes/simple/editor_template.js
@@ -0,0 +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.baseURI.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
diff --git a/program/js/tiny_mce/themes/simple/editor_template_src.js b/program/js/tiny_mce/themes/simple/editor_template_src.js
new file mode 100644
index 000000000..adc4492ab
--- /dev/null
+++ b/program/js/tiny_mce/themes/simple/editor_template_src.js
@@ -0,0 +1,85 @@
+/**
+ * $Id: editor_template_src.js 752 2008-03-27 21:51:25Z spocke $
+ *
+ * This file is meant to showcase how to create a simple theme. The advanced
+ * theme is more suitable for production use.
+ *
+ * @author Moxiecode
+ * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
+ */
+
+(function() {
+ var DOM = tinymce.DOM;
+
+ // Tell it to load theme specific language pack(s)
+ 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.baseURI.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');
+
+ // Create iframe container
+ n = DOM.add(tb, 'tr');
+ n = ic = DOM.add(DOM.add(n, 'td'), 'div', {'class' : 'mceIframeContainer'});
+
+ // Create toolbar container
+ n = DOM.add(DOM.add(tb, 'tr', {'class' : 'last'}), 'td', {'class' : 'mceToolbar mceLast', align : 'center'});
+
+ // Create toolbar
+ 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
diff --git a/program/js/tiny_mce/themes/simple/img/icons.gif b/program/js/tiny_mce/themes/simple/img/icons.gif
new file mode 100644
index 000000000..16af141ff
--- /dev/null
+++ b/program/js/tiny_mce/themes/simple/img/icons.gif
Binary files differ
diff --git a/program/js/tiny_mce/themes/simple/langs/en.js b/program/js/tiny_mce/themes/simple/langs/en.js
new file mode 100644
index 000000000..9f08f102f
--- /dev/null
+++ b/program/js/tiny_mce/themes/simple/langs/en.js
@@ -0,0 +1,11 @@
+tinyMCE.addI18n('en.simple',{
+bold_desc:"Bold (Ctrl+B)",
+italic_desc:"Italic (Ctrl+I)",
+underline_desc:"Underline (Ctrl+U)",
+striketrough_desc:"Strikethrough",
+bullist_desc:"Unordered list",
+numlist_desc:"Ordered list",
+undo_desc:"Undo (Ctrl+Z)",
+redo_desc:"Redo (Ctrl+Y)",
+cleanup_desc:"Cleanup messy code"
+}); \ No newline at end of file
diff --git a/program/js/tiny_mce/themes/simple/skins/default/content.css b/program/js/tiny_mce/themes/simple/skins/default/content.css
new file mode 100644
index 000000000..2506c807c
--- /dev/null
+++ b/program/js/tiny_mce/themes/simple/skins/default/content.css
@@ -0,0 +1,25 @@
+body, td, pre {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 10px;
+}
+
+body {
+ background-color: #FFFFFF;
+}
+
+.mceVisualAid {
+ border: 1px dashed #BBBBBB;
+}
+
+/* MSIE specific */
+
+* html body {
+ 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/program/js/tiny_mce/themes/simple/skins/default/ui.css b/program/js/tiny_mce/themes/simple/skins/default/ui.css
new file mode 100644
index 000000000..1cf64b8dc
--- /dev/null
+++ b/program/js/tiny_mce/themes/simple/skins/default/ui.css
@@ -0,0 +1,32 @@
+/* Reset */
+.defaultSimpleSkin table, .defaultSimpleSkin tbody, .defaultSimpleSkin a, .defaultSimpleSkin img, .defaultSimpleSkin tr, .defaultSimpleSkin div, .defaultSimpleSkin td, .defaultSimpleSkin iframe, .defaultSimpleSkin span, .defaultSimpleSkin * {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000}
+
+/* Containers */
+.defaultSimpleSkin {position:relative}
+.defaultSimpleSkin table.mceLayout {background:#F0F0EE; border:1px solid #CCC;}
+.defaultSimpleSkin iframe {display:block; background:#FFF; border-bottom:1px solid #CCC;}
+.defaultSimpleSkin .mceToolbar {height:24px;}
+
+/* Layout */
+.defaultSimpleSkin span.mceIcon, .defaultSimpleSkin img.mceIcon {display:block; width:20px; height:20px}
+.defaultSimpleSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
+
+/* Button */
+.defaultSimpleSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px}
+.defaultSimpleSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0}
+.defaultSimpleSkin a.mceButtonActive {border:1px solid #0A246A; background-color:#C2CBE0}
+.defaultSimpleSkin .mceButtonDisabled span {opacity:0.3; filter:alpha(opacity=30)}
+
+/* Separator */
+.defaultSimpleSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:0 2px 0 4px}
+
+/* Theme */
+.defaultSimpleSkin span.mce_bold {background-position:0 0}
+.defaultSimpleSkin span.mce_italic {background-position:-60px 0}
+.defaultSimpleSkin span.mce_underline {background-position:-140px 0}
+.defaultSimpleSkin span.mce_strikethrough {background-position:-120px 0}
+.defaultSimpleSkin span.mce_undo {background-position:-160px 0}
+.defaultSimpleSkin span.mce_redo {background-position:-100px 0}
+.defaultSimpleSkin span.mce_cleanup {background-position:-40px 0}
+.defaultSimpleSkin span.mce_insertunorderedlist {background-position:-20px 0}
+.defaultSimpleSkin span.mce_insertorderedlist {background-position:-80px 0}
diff --git a/program/js/tiny_mce/themes/simple/skins/o2k7/content.css b/program/js/tiny_mce/themes/simple/skins/o2k7/content.css
new file mode 100644
index 000000000..595809fa6
--- /dev/null
+++ b/program/js/tiny_mce/themes/simple/skins/o2k7/content.css
@@ -0,0 +1,17 @@
+body, td, pre {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
+
+body {background: #FFF;}
+.mceVisualAid {border: 1px dashed #BBB;}
+
+/* IE */
+
+* html body {
+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/program/js/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png b/program/js/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png
new file mode 100644
index 000000000..527e3495a
--- /dev/null
+++ b/program/js/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png
Binary files differ
diff --git a/program/js/tiny_mce/themes/simple/skins/o2k7/ui.css b/program/js/tiny_mce/themes/simple/skins/o2k7/ui.css
new file mode 100644
index 000000000..bfae96e2d
--- /dev/null
+++ b/program/js/tiny_mce/themes/simple/skins/o2k7/ui.css
@@ -0,0 +1,35 @@
+/* Reset */
+.o2k7SimpleSkin table, .o2k7SimpleSkin tbody, .o2k7SimpleSkin a, .o2k7SimpleSkin img, .o2k7SimpleSkin tr, .o2k7SimpleSkin div, .o2k7SimpleSkin td, .o2k7SimpleSkin iframe, .o2k7SimpleSkin span, .o2k7SimpleSkin * {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000}
+
+/* Containers */
+.o2k7SimpleSkin {position:relative}
+.o2k7SimpleSkin table.mceLayout {background:#E5EFFD; border:1px solid #ABC6DD;}
+.o2k7SimpleSkin iframe {display:block; background:#FFF; border-bottom:1px solid #ABC6DD;}
+.o2k7SimpleSkin .mceToolbar {height:26px;}
+
+/* Layout */
+.o2k7SimpleSkin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; }
+.o2k7SimpleSkin .mceToolbar .mceToolbarEnd span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px}
+.o2k7SimpleSkin span.mceIcon, .o2k7SimpleSkin img.mceIcon {display:block; width:20px; height:20px}
+.o2k7SimpleSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
+
+/* Button */
+.o2k7SimpleSkin .mceButton {display:block; background:url(img/button_bg.png); width:22px; height:22px}
+.o2k7SimpleSkin a.mceButton span, .o2k7SimpleSkin a.mceButton img {margin:1px 0 0 1px}
+.o2k7SimpleSkin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px}
+.o2k7SimpleSkin a.mceButtonActive {background-position:0 -44px}
+.o2k7SimpleSkin .mceButtonDisabled span {opacity:0.3; filter:alpha(opacity=30)}
+
+/* Separator */
+.o2k7SimpleSkin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px}
+
+/* Theme */
+.o2k7SimpleSkin span.mce_bold {background-position:0 0}
+.o2k7SimpleSkin span.mce_italic {background-position:-60px 0}
+.o2k7SimpleSkin span.mce_underline {background-position:-140px 0}
+.o2k7SimpleSkin span.mce_strikethrough {background-position:-120px 0}
+.o2k7SimpleSkin span.mce_undo {background-position:-160px 0}
+.o2k7SimpleSkin span.mce_redo {background-position:-100px 0}
+.o2k7SimpleSkin span.mce_cleanup {background-position:-40px 0}
+.o2k7SimpleSkin span.mce_insertunorderedlist {background-position:-20px 0}
+.o2k7SimpleSkin span.mce_insertorderedlist {background-position:-80px 0}