diff options
Diffstat (limited to 'public/javascripts/tiny_mce/plugins')
187 files changed, 0 insertions, 16822 deletions
diff --git a/public/javascripts/tiny_mce/plugins/advhr/css/advhr.css b/public/javascripts/tiny_mce/plugins/advhr/css/advhr.css deleted file mode 100644 index 0e22834..0000000 --- a/public/javascripts/tiny_mce/plugins/advhr/css/advhr.css +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | input.radio {border:1px none #000; background:transparent; vertical-align:middle;} | ||
| 2 | .panel_wrapper div.current {height:80px;} | ||
| 3 | #width {width:50px; vertical-align:middle;} | ||
| 4 | #width2 {width:50px; vertical-align:middle;} | ||
| 5 | #size {width:100px;} | ||
diff --git a/public/javascripts/tiny_mce/plugins/advhr/editor_plugin.js b/public/javascripts/tiny_mce/plugins/advhr/editor_plugin.js deleted file mode 100644 index 4d3b062..0000000 --- a/public/javascripts/tiny_mce/plugins/advhr/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.AdvancedHRPlugin",{init:function(a,b){a.addCommand("mceAdvancedHr",function(){a.windowManager.open({file:b+"/rule.htm",width:250+parseInt(a.getLang("advhr.delta_width",0)),height:160+parseInt(a.getLang("advhr.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("advhr",{title:"advhr.advhr_desc",cmd:"mceAdvancedHr"});a.onNodeChange.add(function(d,c,e){c.setActive("advhr",e.nodeName=="HR")});a.onClick.add(function(c,d){d=d.target;if(d.nodeName==="HR"){c.selection.select(d)}})},getInfo:function(){return{longname:"Advanced HR",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advhr",tinymce.plugins.AdvancedHRPlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/advhr/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/advhr/editor_plugin_src.js deleted file mode 100644 index 8a84753..0000000 --- a/public/javascripts/tiny_mce/plugins/advhr/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,54 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.AdvancedHRPlugin', { | ||
| 10 | init : function(ed, url) { | ||
| 11 | // Register commands | ||
| 12 | ed.addCommand('mceAdvancedHr', function() { | ||
| 13 | ed.windowManager.open({ | ||
| 14 | file : url + '/rule.htm', | ||
| 15 | width : 250 + parseInt(ed.getLang('advhr.delta_width', 0)), | ||
| 16 | height : 160 + parseInt(ed.getLang('advhr.delta_height', 0)), | ||
| 17 | inline : 1 | ||
| 18 | }, { | ||
| 19 | plugin_url : url | ||
| 20 | }); | ||
| 21 | }); | ||
| 22 | |||
| 23 | // Register buttons | ||
| 24 | ed.addButton('advhr', { | ||
| 25 | title : 'advhr.advhr_desc', | ||
| 26 | cmd : 'mceAdvancedHr' | ||
| 27 | }); | ||
| 28 | |||
| 29 | ed.onNodeChange.add(function(ed, cm, n) { | ||
| 30 | cm.setActive('advhr', n.nodeName == 'HR'); | ||
| 31 | }); | ||
| 32 | |||
| 33 | ed.onClick.add(function(ed, e) { | ||
| 34 | e = e.target; | ||
| 35 | |||
| 36 | if (e.nodeName === 'HR') | ||
| 37 | ed.selection.select(e); | ||
| 38 | }); | ||
| 39 | }, | ||
| 40 | |||
| 41 | getInfo : function() { | ||
| 42 | return { | ||
| 43 | longname : 'Advanced HR', | ||
| 44 | author : 'Moxiecode Systems AB', | ||
| 45 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 46 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr', | ||
| 47 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 48 | }; | ||
| 49 | } | ||
| 50 | }); | ||
| 51 | |||
| 52 | // Register plugin | ||
| 53 | tinymce.PluginManager.add('advhr', tinymce.plugins.AdvancedHRPlugin); | ||
| 54 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/advhr/js/rule.js b/public/javascripts/tiny_mce/plugins/advhr/js/rule.js deleted file mode 100644 index b6cbd66..0000000 --- a/public/javascripts/tiny_mce/plugins/advhr/js/rule.js +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | var AdvHRDialog = { | ||
| 2 | init : function(ed) { | ||
| 3 | var dom = ed.dom, f = document.forms[0], n = ed.selection.getNode(), w; | ||
| 4 | |||
| 5 | w = dom.getAttrib(n, 'width'); | ||
| 6 | f.width.value = w ? parseInt(w) : (dom.getStyle('width') || ''); | ||
| 7 | f.size.value = dom.getAttrib(n, 'size') || parseInt(dom.getStyle('height')) || ''; | ||
| 8 | f.noshade.checked = !!dom.getAttrib(n, 'noshade') || !!dom.getStyle('border-width'); | ||
| 9 | selectByValue(f, 'width2', w.indexOf('%') != -1 ? '%' : 'px'); | ||
| 10 | }, | ||
| 11 | |||
| 12 | update : function() { | ||
| 13 | var ed = tinyMCEPopup.editor, h, f = document.forms[0], st = ''; | ||
| 14 | |||
| 15 | h = '<hr'; | ||
| 16 | |||
| 17 | if (f.size.value) { | ||
| 18 | h += ' size="' + f.size.value + '"'; | ||
| 19 | st += ' height:' + f.size.value + 'px;'; | ||
| 20 | } | ||
| 21 | |||
| 22 | if (f.width.value) { | ||
| 23 | h += ' width="' + f.width.value + (f.width2.value == '%' ? '%' : '') + '"'; | ||
| 24 | st += ' width:' + f.width.value + (f.width2.value == '%' ? '%' : 'px') + ';'; | ||
| 25 | } | ||
| 26 | |||
| 27 | if (f.noshade.checked) { | ||
| 28 | h += ' noshade="noshade"'; | ||
| 29 | st += ' border-width: 1px; border-style: solid; border-color: #CCCCCC; color: #ffffff;'; | ||
| 30 | } | ||
| 31 | |||
| 32 | if (ed.settings.inline_styles) | ||
| 33 | h += ' style="' + tinymce.trim(st) + '"'; | ||
| 34 | |||
| 35 | h += ' />'; | ||
| 36 | |||
| 37 | ed.execCommand("mceInsertContent", false, h); | ||
| 38 | tinyMCEPopup.close(); | ||
| 39 | } | ||
| 40 | }; | ||
| 41 | |||
| 42 | tinyMCEPopup.requireLangPack(); | ||
| 43 | tinyMCEPopup.onInit.add(AdvHRDialog.init, AdvHRDialog); | ||
diff --git a/public/javascripts/tiny_mce/plugins/advhr/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/advhr/langs/en_dlg.js deleted file mode 100644 index 873bfd8..0000000 --- a/public/javascripts/tiny_mce/plugins/advhr/langs/en_dlg.js +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | tinyMCE.addI18n('en.advhr_dlg',{ | ||
| 2 | width:"Width", | ||
| 3 | size:"Height", | ||
| 4 | noshade:"No shadow" | ||
| 5 | }); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/advhr/rule.htm b/public/javascripts/tiny_mce/plugins/advhr/rule.htm deleted file mode 100644 index 75ca339..0000000 --- a/public/javascripts/tiny_mce/plugins/advhr/rule.htm +++ /dev/null | |||
| @@ -1,62 +0,0 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title>{#advhr.advhr_desc}</title> | ||
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 6 | <script type="text/javascript" src="js/rule.js"></script> | ||
| 7 | <script type="text/javascript" src="../../utils/mctabs.js"></script> | ||
| 8 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | ||
| 9 | <link href="css/advhr.css" rel="stylesheet" type="text/css" /> | ||
| 10 | </head> | ||
| 11 | <body> | ||
| 12 | <form onsubmit="AdvHRDialog.update();return false;" action="#"> | ||
| 13 | <div class="tabs"> | ||
| 14 | <ul> | ||
| 15 | <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advhr.advhr_desc}</a></span></li> | ||
| 16 | </ul> | ||
| 17 | </div> | ||
| 18 | |||
| 19 | <div class="panel_wrapper"> | ||
| 20 | <div id="general_panel" class="panel current"> | ||
| 21 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 22 | <tr> | ||
| 23 | <td><label for="width">{#advhr_dlg.width}</label></td> | ||
| 24 | <td class="nowrap"> | ||
| 25 | <input id="width" name="width" type="text" value="" class="mceFocus" /> | ||
| 26 | <select name="width2" id="width2"> | ||
| 27 | <option value="">px</option> | ||
| 28 | <option value="%">%</option> | ||
| 29 | </select> | ||
| 30 | </td> | ||
| 31 | </tr> | ||
| 32 | <tr> | ||
| 33 | <td><label for="size">{#advhr_dlg.size}</label></td> | ||
| 34 | <td><select id="size" name="size"> | ||
| 35 | <option value="">Normal</option> | ||
| 36 | <option value="1">1</option> | ||
| 37 | <option value="2">2</option> | ||
| 38 | <option value="3">3</option> | ||
| 39 | <option value="4">4</option> | ||
| 40 | <option value="5">5</option> | ||
| 41 | </select></td> | ||
| 42 | </tr> | ||
| 43 | <tr> | ||
| 44 | <td><label for="noshade">{#advhr_dlg.noshade}</label></td> | ||
| 45 | <td><input type="checkbox" name="noshade" id="noshade" class="radio" /></td> | ||
| 46 | </tr> | ||
| 47 | </table> | ||
| 48 | </div> | ||
| 49 | </div> | ||
| 50 | |||
| 51 | <div class="mceActionPanel"> | ||
| 52 | <div style="float: left"> | ||
| 53 | <input type="submit" id="insert" name="insert" value="{#insert}" /> | ||
| 54 | </div> | ||
| 55 | |||
| 56 | <div style="float: right"> | ||
| 57 | <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" /> | ||
| 58 | </div> | ||
| 59 | </div> | ||
| 60 | </form> | ||
| 61 | </body> | ||
| 62 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/advimage/css/advimage.css b/public/javascripts/tiny_mce/plugins/advimage/css/advimage.css deleted file mode 100644 index 0a6251a..0000000 --- a/public/javascripts/tiny_mce/plugins/advimage/css/advimage.css +++ /dev/null | |||
| @@ -1,13 +0,0 @@ | |||
| 1 | #src_list, #over_list, #out_list {width:280px;} | ||
| 2 | .mceActionPanel {margin-top:7px;} | ||
| 3 | .alignPreview {border:1px solid #000; width:140px; height:140px; overflow:hidden; padding:5px;} | ||
| 4 | .checkbox {border:0;} | ||
| 5 | .panel_wrapper div.current {height:305px;} | ||
| 6 | #prev {margin:0; border:1px solid #000; width:428px; height:150px; overflow:auto;} | ||
| 7 | #align, #classlist {width:150px;} | ||
| 8 | #width, #height {vertical-align:middle; width:50px; text-align:center;} | ||
| 9 | #vspace, #hspace, #border {vertical-align:middle; width:30px; text-align:center;} | ||
| 10 | #class_list {width:180px;} | ||
| 11 | input {width: 280px;} | ||
| 12 | #constrain, #onmousemovecheck {width:auto;} | ||
| 13 | #id, #dir, #lang, #usemap, #longdesc {width:200px;} | ||
diff --git a/public/javascripts/tiny_mce/plugins/advimage/editor_plugin.js b/public/javascripts/tiny_mce/plugins/advimage/editor_plugin.js deleted file mode 100644 index 4c7a9c3..0000000 --- a/public/javascripts/tiny_mce/plugins/advimage/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.AdvancedImagePlugin",{init:function(a,b){a.addCommand("mceAdvImage",function(){if(a.dom.getAttrib(a.selection.getNode(),"class").indexOf("mceItem")!=-1){return}a.windowManager.open({file:b+"/image.htm",width:480+parseInt(a.getLang("advimage.delta_width",0)),height:385+parseInt(a.getLang("advimage.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("image",{title:"advimage.image_desc",cmd:"mceAdvImage"})},getInfo:function(){return{longname:"Advanced image",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advimage",tinymce.plugins.AdvancedImagePlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js deleted file mode 100644 index f526842..0000000 --- a/public/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,47 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 677 2008-03-07 13:52:41Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.AdvancedImagePlugin', { | ||
| 10 | init : function(ed, url) { | ||
| 11 | // Register commands | ||
| 12 | ed.addCommand('mceAdvImage', function() { | ||
| 13 | // Internal image object like a flash placeholder | ||
| 14 | if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1) | ||
| 15 | return; | ||
| 16 | |||
| 17 | ed.windowManager.open({ | ||
| 18 | file : url + '/image.htm', | ||
| 19 | width : 480 + parseInt(ed.getLang('advimage.delta_width', 0)), | ||
| 20 | height : 385 + parseInt(ed.getLang('advimage.delta_height', 0)), | ||
| 21 | inline : 1 | ||
| 22 | }, { | ||
| 23 | plugin_url : url | ||
| 24 | }); | ||
| 25 | }); | ||
| 26 | |||
| 27 | // Register buttons | ||
| 28 | ed.addButton('image', { | ||
| 29 | title : 'advimage.image_desc', | ||
| 30 | cmd : 'mceAdvImage' | ||
| 31 | }); | ||
| 32 | }, | ||
| 33 | |||
| 34 | getInfo : function() { | ||
| 35 | return { | ||
| 36 | longname : 'Advanced image', | ||
| 37 | author : 'Moxiecode Systems AB', | ||
| 38 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 39 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage', | ||
| 40 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 41 | }; | ||
| 42 | } | ||
| 43 | }); | ||
| 44 | |||
| 45 | // Register plugin | ||
| 46 | tinymce.PluginManager.add('advimage', tinymce.plugins.AdvancedImagePlugin); | ||
| 47 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/advimage/image.htm b/public/javascripts/tiny_mce/plugins/advimage/image.htm deleted file mode 100644 index 5d26150..0000000 --- a/public/javascripts/tiny_mce/plugins/advimage/image.htm +++ /dev/null | |||
| @@ -1,237 +0,0 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title>{#advimage_dlg.dialog_title}</title> | ||
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 6 | <script type="text/javascript" src="../../utils/mctabs.js"></script> | ||
| 7 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | ||
| 8 | <script type="text/javascript" src="../../utils/validate.js"></script> | ||
| 9 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> | ||
| 10 | <script type="text/javascript" src="js/image.js"></script> | ||
| 11 | <link href="css/advimage.css" rel="stylesheet" type="text/css" /> | ||
| 12 | </head> | ||
| 13 | <body id="advimage" style="display: none"> | ||
| 14 | <form onsubmit="ImageDialog.insert();return false;" action="#"> | ||
| 15 | <div class="tabs"> | ||
| 16 | <ul> | ||
| 17 | <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advimage_dlg.tab_general}</a></span></li> | ||
| 18 | <li id="appearance_tab"><span><a href="javascript:mcTabs.displayTab('appearance_tab','appearance_panel');" onmousedown="return false;">{#advimage_dlg.tab_appearance}</a></span></li> | ||
| 19 | <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advimage_dlg.tab_advanced}</a></span></li> | ||
| 20 | </ul> | ||
| 21 | </div> | ||
| 22 | |||
| 23 | <div class="panel_wrapper"> | ||
| 24 | <div id="general_panel" class="panel current"> | ||
| 25 | <fieldset> | ||
| 26 | <legend>{#advimage_dlg.general}</legend> | ||
| 27 | |||
| 28 | <table class="properties"> | ||
| 29 | <tr> | ||
| 30 | <td class="column1"><label id="srclabel" for="src">{#advimage_dlg.src}</label></td> | ||
| 31 | <td colspan="2"><table border="0" cellspacing="0" cellpadding="0"> | ||
| 32 | <tr> | ||
| 33 | <td><input name="src" type="text" id="src" value="" class="mceFocus" onchange="ImageDialog.showPreviewImage(this.value);" /></td> | ||
| 34 | <td id="srcbrowsercontainer"> </td> | ||
| 35 | </tr> | ||
| 36 | </table></td> | ||
| 37 | </tr> | ||
| 38 | <tr> | ||
| 39 | <td><label for="src_list">{#advimage_dlg.image_list}</label></td> | ||
| 40 | <td><select id="src_list" name="src_list" onchange="document.getElementById('src').value=this.options[this.selectedIndex].value;document.getElementById('alt').value=this.options[this.selectedIndex].text;document.getElementById('title').value=this.options[this.selectedIndex].text;ImageDialog.showPreviewImage(this.options[this.selectedIndex].value);"><option value=""></option></select></td> | ||
| 41 | </tr> | ||
| 42 | <tr> | ||
| 43 | <td class="column1"><label id="altlabel" for="alt">{#advimage_dlg.alt}</label></td> | ||
| 44 | <td colspan="2"><input id="alt" name="alt" type="text" value="" /></td> | ||
| 45 | </tr> | ||
| 46 | <tr> | ||
| 47 | <td class="column1"><label id="titlelabel" for="title">{#advimage_dlg.title}</label></td> | ||
| 48 | <td colspan="2"><input id="title" name="title" type="text" value="" /></td> | ||
| 49 | </tr> | ||
| 50 | </table> | ||
| 51 | </fieldset> | ||
| 52 | |||
| 53 | <fieldset> | ||
| 54 | <legend>{#advimage_dlg.preview}</legend> | ||
| 55 | <div id="prev"></div> | ||
| 56 | </fieldset> | ||
| 57 | </div> | ||
| 58 | |||
| 59 | <div id="appearance_panel" class="panel"> | ||
| 60 | <fieldset> | ||
| 61 | <legend>{#advimage_dlg.tab_appearance}</legend> | ||
| 62 | |||
| 63 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 64 | <tr> | ||
| 65 | <td class="column1"><label id="alignlabel" for="align">{#advimage_dlg.align}</label></td> | ||
| 66 | <td><select id="align" name="align" onchange="ImageDialog.updateStyle('align');ImageDialog.changeAppearance();"> | ||
| 67 | <option value="">{#not_set}</option> | ||
| 68 | <option value="baseline">{#advimage_dlg.align_baseline}</option> | ||
| 69 | <option value="top">{#advimage_dlg.align_top}</option> | ||
| 70 | <option value="middle">{#advimage_dlg.align_middle}</option> | ||
| 71 | <option value="bottom">{#advimage_dlg.align_bottom}</option> | ||
| 72 | <option value="text-top">{#advimage_dlg.align_texttop}</option> | ||
| 73 | <option value="text-bottom">{#advimage_dlg.align_textbottom}</option> | ||
| 74 | <option value="left">{#advimage_dlg.align_left}</option> | ||
| 75 | <option value="right">{#advimage_dlg.align_right}</option> | ||
| 76 | </select> | ||
| 77 | </td> | ||
| 78 | <td rowspan="6" valign="top"> | ||
| 79 | <div class="alignPreview"> | ||
| 80 | <img id="alignSampleImg" src="img/sample.gif" alt="{#advimage_dlg.example_img}" /> | ||
| 81 | Lorem ipsum, Dolor sit amet, consectetuer adipiscing loreum ipsum edipiscing elit, sed diam | ||
| 82 | nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.Loreum ipsum | ||
| 83 | edipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam | ||
| 84 | erat volutpat. | ||
| 85 | </div> | ||
| 86 | </td> | ||
| 87 | </tr> | ||
| 88 | |||
| 89 | <tr> | ||
| 90 | <td class="column1"><label id="widthlabel" for="width">{#advimage_dlg.dimensions}</label></td> | ||
| 91 | <td class="nowrap"> | ||
| 92 | <input name="width" type="text" id="width" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeHeight();" /> x | ||
| 93 | <input name="height" type="text" id="height" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeWidth();" /> px | ||
| 94 | </td> | ||
| 95 | </tr> | ||
| 96 | |||
| 97 | <tr> | ||
| 98 | <td> </td> | ||
| 99 | <td><table border="0" cellpadding="0" cellspacing="0"> | ||
| 100 | <tr> | ||
| 101 | <td><input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td> | ||
| 102 | <td><label id="constrainlabel" for="constrain">{#advimage_dlg.constrain_proportions}</label></td> | ||
| 103 | </tr> | ||
| 104 | </table></td> | ||
| 105 | </tr> | ||
| 106 | |||
| 107 | <tr> | ||
| 108 | <td class="column1"><label id="vspacelabel" for="vspace">{#advimage_dlg.vspace}</label></td> | ||
| 109 | <td><input name="vspace" type="text" id="vspace" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('vspace');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('vspace');ImageDialog.changeAppearance();" /> | ||
| 110 | </td> | ||
| 111 | </tr> | ||
| 112 | |||
| 113 | <tr> | ||
| 114 | <td class="column1"><label id="hspacelabel" for="hspace">{#advimage_dlg.hspace}</label></td> | ||
| 115 | <td><input name="hspace" type="text" id="hspace" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('hspace');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('hspace');ImageDialog.changeAppearance();" /></td> | ||
| 116 | </tr> | ||
| 117 | |||
| 118 | <tr> | ||
| 119 | <td class="column1"><label id="borderlabel" for="border">{#advimage_dlg.border}</label></td> | ||
| 120 | <td><input id="border" name="border" type="text" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('border');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('border');ImageDialog.changeAppearance();" /></td> | ||
| 121 | </tr> | ||
| 122 | |||
| 123 | <tr> | ||
| 124 | <td><label for="class_list">{#class_name}</label></td> | ||
| 125 | <td colspan="2"><select id="class_list" name="class_list" class="mceEditableSelect"><option value=""></option></select></td> | ||
| 126 | </tr> | ||
| 127 | |||
| 128 | <tr> | ||
| 129 | <td class="column1"><label id="stylelabel" for="style">{#advimage_dlg.style}</label></td> | ||
| 130 | <td colspan="2"><input id="style" name="style" type="text" value="" onchange="ImageDialog.changeAppearance();" /></td> | ||
| 131 | </tr> | ||
| 132 | |||
| 133 | <!-- <tr> | ||
| 134 | <td class="column1"><label id="classeslabel" for="classes">{#advimage_dlg.classes}</label></td> | ||
| 135 | <td colspan="2"><input id="classes" name="classes" type="text" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td> | ||
| 136 | </tr> --> | ||
| 137 | </table> | ||
| 138 | </fieldset> | ||
| 139 | </div> | ||
| 140 | |||
| 141 | <div id="advanced_panel" class="panel"> | ||
| 142 | <fieldset> | ||
| 143 | <legend>{#advimage_dlg.swap_image}</legend> | ||
| 144 | |||
| 145 | <input type="checkbox" id="onmousemovecheck" name="onmousemovecheck" class="checkbox" onclick="ImageDialog.setSwapImage(this.checked);" /> | ||
| 146 | <label id="onmousemovechecklabel" for="onmousemovecheck">{#advimage_dlg.alt_image}</label> | ||
| 147 | |||
| 148 | <table border="0" cellpadding="4" cellspacing="0" width="100%"> | ||
| 149 | <tr> | ||
| 150 | <td class="column1"><label id="onmouseoversrclabel" for="onmouseoversrc">{#advimage_dlg.mouseover}</label></td> | ||
| 151 | <td><table border="0" cellspacing="0" cellpadding="0"> | ||
| 152 | <tr> | ||
| 153 | <td><input id="onmouseoversrc" name="onmouseoversrc" type="text" value="" /></td> | ||
| 154 | <td id="onmouseoversrccontainer"> </td> | ||
| 155 | </tr> | ||
| 156 | </table></td> | ||
| 157 | </tr> | ||
| 158 | <tr> | ||
| 159 | <td><label for="over_list">{#advimage_dlg.image_list}</label></td> | ||
| 160 | <td><select id="over_list" name="over_list" onchange="document.getElementById('onmouseoversrc').value=this.options[this.selectedIndex].value;"><option value=""></option></select></td> | ||
| 161 | </tr> | ||
| 162 | <tr> | ||
| 163 | <td class="column1"><label id="onmouseoutsrclabel" for="onmouseoutsrc">{#advimage_dlg.mouseout}</label></td> | ||
| 164 | <td class="column2"><table border="0" cellspacing="0" cellpadding="0"> | ||
| 165 | <tr> | ||
| 166 | <td><input id="onmouseoutsrc" name="onmouseoutsrc" type="text" value="" /></td> | ||
| 167 | <td id="onmouseoutsrccontainer"> </td> | ||
| 168 | </tr> | ||
| 169 | </table></td> | ||
| 170 | </tr> | ||
| 171 | <tr> | ||
| 172 | <td><label for="out_list">{#advimage_dlg.image_list}</label></td> | ||
| 173 | <td><select id="out_list" name="out_list" onchange="document.getElementById('onmouseoutsrc').value=this.options[this.selectedIndex].value;"><option value=""></option></select></td> | ||
| 174 | </tr> | ||
| 175 | </table> | ||
| 176 | </fieldset> | ||
| 177 | |||
| 178 | <fieldset> | ||
| 179 | <legend>{#advimage_dlg.misc}</legend> | ||
| 180 | |||
| 181 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 182 | <tr> | ||
| 183 | <td class="column1"><label id="idlabel" for="id">{#advimage_dlg.id}</label></td> | ||
| 184 | <td><input id="id" name="id" type="text" value="" /></td> | ||
| 185 | </tr> | ||
| 186 | |||
| 187 | <tr> | ||
| 188 | <td class="column1"><label id="dirlabel" for="dir">{#advimage_dlg.langdir}</label></td> | ||
| 189 | <td> | ||
| 190 | <select id="dir" name="dir" onchange="ImageDialog.changeAppearance();"> | ||
| 191 | <option value="">{#not_set}</option> | ||
| 192 | <option value="ltr">{#advimage_dlg.ltr}</option> | ||
| 193 | <option value="rtl">{#advimage_dlg.rtl}</option> | ||
| 194 | </select> | ||
| 195 | </td> | ||
| 196 | </tr> | ||
| 197 | |||
| 198 | <tr> | ||
| 199 | <td class="column1"><label id="langlabel" for="lang">{#advimage_dlg.langcode}</label></td> | ||
| 200 | <td> | ||
| 201 | <input id="lang" name="lang" type="text" value="" /> | ||
| 202 | </td> | ||
| 203 | </tr> | ||
| 204 | |||
| 205 | <tr> | ||
| 206 | <td class="column1"><label id="usemaplabel" for="usemap">{#advimage_dlg.map}</label></td> | ||
| 207 | <td> | ||
| 208 | <input id="usemap" name="usemap" type="text" value="" /> | ||
| 209 | </td> | ||
| 210 | </tr> | ||
| 211 | |||
| 212 | <tr> | ||
| 213 | <td class="column1"><label id="longdesclabel" for="longdesc">{#advimage_dlg.long_desc}</label></td> | ||
| 214 | <td><table border="0" cellspacing="0" cellpadding="0"> | ||
| 215 | <tr> | ||
| 216 | <td><input id="longdesc" name="longdesc" type="text" value="" /></td> | ||
| 217 | <td id="longdesccontainer"> </td> | ||
| 218 | </tr> | ||
| 219 | </table></td> | ||
| 220 | </tr> | ||
| 221 | </table> | ||
| 222 | </fieldset> | ||
| 223 | </div> | ||
| 224 | </div> | ||
| 225 | |||
| 226 | <div class="mceActionPanel"> | ||
| 227 | <div style="float: left"> | ||
| 228 | <input type="submit" id="insert" name="insert" value="{#insert}" /> | ||
| 229 | </div> | ||
| 230 | |||
| 231 | <div style="float: right"> | ||
| 232 | <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" /> | ||
| 233 | </div> | ||
| 234 | </div> | ||
| 235 | </form> | ||
| 236 | </body> | ||
| 237 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/advimage/img/sample.gif b/public/javascripts/tiny_mce/plugins/advimage/img/sample.gif deleted file mode 100644 index 53bf689..0000000 --- a/public/javascripts/tiny_mce/plugins/advimage/img/sample.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/advimage/js/image.js b/public/javascripts/tiny_mce/plugins/advimage/js/image.js deleted file mode 100644 index 3477226..0000000 --- a/public/javascripts/tiny_mce/plugins/advimage/js/image.js +++ /dev/null | |||
| @@ -1,443 +0,0 @@ | |||
| 1 | var ImageDialog = { | ||
| 2 | preInit : function() { | ||
| 3 | var url; | ||
| 4 | |||
| 5 | tinyMCEPopup.requireLangPack(); | ||
| 6 | |||
| 7 | if (url = tinyMCEPopup.getParam("external_image_list_url")) | ||
| 8 | document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>'); | ||
| 9 | }, | ||
| 10 | |||
| 11 | init : function(ed) { | ||
| 12 | var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode(); | ||
| 13 | |||
| 14 | tinyMCEPopup.resizeToInnerSize(); | ||
| 15 | this.fillClassList('class_list'); | ||
| 16 | this.fillFileList('src_list', 'tinyMCEImageList'); | ||
| 17 | this.fillFileList('over_list', 'tinyMCEImageList'); | ||
| 18 | this.fillFileList('out_list', 'tinyMCEImageList'); | ||
| 19 | TinyMCE_EditableSelects.init(); | ||
| 20 | |||
| 21 | if (n.nodeName == 'IMG') { | ||
| 22 | nl.src.value = dom.getAttrib(n, 'src'); | ||
| 23 | nl.width.value = dom.getAttrib(n, 'width'); | ||
| 24 | nl.height.value = dom.getAttrib(n, 'height'); | ||
| 25 | nl.alt.value = dom.getAttrib(n, 'alt'); | ||
| 26 | nl.title.value = dom.getAttrib(n, 'title'); | ||
| 27 | nl.vspace.value = this.getAttrib(n, 'vspace'); | ||
| 28 | nl.hspace.value = this.getAttrib(n, 'hspace'); | ||
| 29 | nl.border.value = this.getAttrib(n, 'border'); | ||
| 30 | selectByValue(f, 'align', this.getAttrib(n, 'align')); | ||
| 31 | selectByValue(f, 'class_list', dom.getAttrib(n, 'class'), true, true); | ||
| 32 | nl.style.value = dom.getAttrib(n, 'style'); | ||
| 33 | nl.id.value = dom.getAttrib(n, 'id'); | ||
| 34 | nl.dir.value = dom.getAttrib(n, 'dir'); | ||
| 35 | nl.lang.value = dom.getAttrib(n, 'lang'); | ||
| 36 | nl.usemap.value = dom.getAttrib(n, 'usemap'); | ||
| 37 | nl.longdesc.value = dom.getAttrib(n, 'longdesc'); | ||
| 38 | nl.insert.value = ed.getLang('update'); | ||
| 39 | |||
| 40 | if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseover'))) | ||
| 41 | nl.onmouseoversrc.value = dom.getAttrib(n, 'onmouseover').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1'); | ||
| 42 | |||
| 43 | if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseout'))) | ||
| 44 | nl.onmouseoutsrc.value = dom.getAttrib(n, 'onmouseout').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1'); | ||
| 45 | |||
| 46 | if (ed.settings.inline_styles) { | ||
| 47 | // Move attribs to styles | ||
| 48 | if (dom.getAttrib(n, 'align')) | ||
| 49 | this.updateStyle('align'); | ||
| 50 | |||
| 51 | if (dom.getAttrib(n, 'hspace')) | ||
| 52 | this.updateStyle('hspace'); | ||
| 53 | |||
| 54 | if (dom.getAttrib(n, 'border')) | ||
| 55 | this.updateStyle('border'); | ||
| 56 | |||
| 57 | if (dom.getAttrib(n, 'vspace')) | ||
| 58 | this.updateStyle('vspace'); | ||
| 59 | } | ||
| 60 | } | ||
| 61 | |||
| 62 | // Setup browse button | ||
| 63 | document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image'); | ||
| 64 | if (isVisible('srcbrowser')) | ||
| 65 | document.getElementById('src').style.width = '260px'; | ||
| 66 | |||
| 67 | // Setup browse button | ||
| 68 | document.getElementById('onmouseoversrccontainer').innerHTML = getBrowserHTML('overbrowser','onmouseoversrc','image','theme_advanced_image'); | ||
| 69 | if (isVisible('overbrowser')) | ||
| 70 | document.getElementById('onmouseoversrc').style.width = '260px'; | ||
| 71 | |||
| 72 | // Setup browse button | ||
| 73 | document.getElementById('onmouseoutsrccontainer').innerHTML = getBrowserHTML('outbrowser','onmouseoutsrc','image','theme_advanced_image'); | ||
| 74 | if (isVisible('outbrowser')) | ||
| 75 | document.getElementById('onmouseoutsrc').style.width = '260px'; | ||
| 76 | |||
| 77 | // If option enabled default contrain proportions to checked | ||
| 78 | if (ed.getParam("advimage_constrain_proportions", true)) | ||
| 79 | f.constrain.checked = true; | ||
| 80 | |||
| 81 | // Check swap image if valid data | ||
| 82 | if (nl.onmouseoversrc.value || nl.onmouseoutsrc.value) | ||
| 83 | this.setSwapImage(true); | ||
| 84 | else | ||
| 85 | this.setSwapImage(false); | ||
| 86 | |||
| 87 | this.changeAppearance(); | ||
| 88 | this.showPreviewImage(nl.src.value, 1); | ||
| 89 | }, | ||
| 90 | |||
| 91 | insert : function(file, title) { | ||
| 92 | var ed = tinyMCEPopup.editor, t = this, f = document.forms[0]; | ||
| 93 | |||
| 94 | if (f.src.value === '') { | ||
| 95 | if (ed.selection.getNode().nodeName == 'IMG') { | ||
| 96 | ed.dom.remove(ed.selection.getNode()); | ||
| 97 | ed.execCommand('mceRepaint'); | ||
| 98 | } | ||
| 99 | |||
| 100 | tinyMCEPopup.close(); | ||
| 101 | return; | ||
| 102 | } | ||
| 103 | |||
| 104 | if (tinyMCEPopup.getParam("accessibility_warnings", 1)) { | ||
| 105 | if (!f.alt.value) { | ||
| 106 | tinyMCEPopup.confirm(tinyMCEPopup.getLang('advimage_dlg.missing_alt'), function(s) { | ||
| 107 | if (s) | ||
| 108 | t.insertAndClose(); | ||
| 109 | }); | ||
| 110 | |||
| 111 | return; | ||
| 112 | } | ||
| 113 | } | ||
| 114 | |||
| 115 | t.insertAndClose(); | ||
| 116 | }, | ||
| 117 | |||
| 118 | insertAndClose : function() { | ||
| 119 | var ed = tinyMCEPopup.editor, f = document.forms[0], nl = f.elements, v, args = {}, el; | ||
| 120 | |||
| 121 | tinyMCEPopup.restoreSelection(); | ||
| 122 | |||
| 123 | // Fixes crash in Safari | ||
| 124 | if (tinymce.isWebKit) | ||
| 125 | ed.getWin().focus(); | ||
| 126 | |||
| 127 | if (!ed.settings.inline_styles) { | ||
| 128 | args = { | ||
| 129 | vspace : nl.vspace.value, | ||
| 130 | hspace : nl.hspace.value, | ||
| 131 | border : nl.border.value, | ||
| 132 | align : getSelectValue(f, 'align') | ||
| 133 | }; | ||
| 134 | } else { | ||
| 135 | // Remove deprecated values | ||
| 136 | args = { | ||
| 137 | vspace : '', | ||
| 138 | hspace : '', | ||
| 139 | border : '', | ||
| 140 | align : '' | ||
| 141 | }; | ||
| 142 | } | ||
| 143 | |||
| 144 | tinymce.extend(args, { | ||
| 145 | src : nl.src.value, | ||
| 146 | width : nl.width.value, | ||
| 147 | height : nl.height.value, | ||
| 148 | alt : nl.alt.value, | ||
| 149 | title : nl.title.value, | ||
| 150 | 'class' : getSelectValue(f, 'class_list'), | ||
| 151 | style : nl.style.value, | ||
| 152 | id : nl.id.value, | ||
| 153 | dir : nl.dir.value, | ||
| 154 | lang : nl.lang.value, | ||
| 155 | usemap : nl.usemap.value, | ||
| 156 | longdesc : nl.longdesc.value | ||
| 157 | }); | ||
| 158 | |||
| 159 | args.onmouseover = args.onmouseout = ''; | ||
| 160 | |||
| 161 | if (f.onmousemovecheck.checked) { | ||
| 162 | if (nl.onmouseoversrc.value) | ||
| 163 | args.onmouseover = "this.src='" + nl.onmouseoversrc.value + "';"; | ||
| 164 | |||
| 165 | if (nl.onmouseoutsrc.value) | ||
| 166 | args.onmouseout = "this.src='" + nl.onmouseoutsrc.value + "';"; | ||
| 167 | } | ||
| 168 | |||
| 169 | el = ed.selection.getNode(); | ||
| 170 | |||
| 171 | if (el && el.nodeName == 'IMG') { | ||
| 172 | ed.dom.setAttribs(el, args); | ||
| 173 | } else { | ||
| 174 | ed.execCommand('mceInsertContent', false, '<img id="__mce_tmp" />', {skip_undo : 1}); | ||
| 175 | ed.dom.setAttribs('__mce_tmp', args); | ||
| 176 | ed.dom.setAttrib('__mce_tmp', 'id', ''); | ||
| 177 | ed.undoManager.add(); | ||
| 178 | } | ||
| 179 | |||
| 180 | tinyMCEPopup.close(); | ||
| 181 | }, | ||
| 182 | |||
| 183 | getAttrib : function(e, at) { | ||
| 184 | var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2; | ||
| 185 | |||
| 186 | if (ed.settings.inline_styles) { | ||
| 187 | switch (at) { | ||
| 188 | case 'align': | ||
| 189 | if (v = dom.getStyle(e, 'float')) | ||
| 190 | return v; | ||
| 191 | |||
| 192 | if (v = dom.getStyle(e, 'vertical-align')) | ||
| 193 | return v; | ||
| 194 | |||
| 195 | break; | ||
| 196 | |||
| 197 | case 'hspace': | ||
| 198 | v = dom.getStyle(e, 'margin-left') | ||
| 199 | v2 = dom.getStyle(e, 'margin-right'); | ||
| 200 | |||
| 201 | if (v && v == v2) | ||
| 202 | return parseInt(v.replace(/[^0-9]/g, '')); | ||
| 203 | |||
| 204 | break; | ||
| 205 | |||
| 206 | case 'vspace': | ||
| 207 | v = dom.getStyle(e, 'margin-top') | ||
| 208 | v2 = dom.getStyle(e, 'margin-bottom'); | ||
| 209 | if (v && v == v2) | ||
| 210 | return parseInt(v.replace(/[^0-9]/g, '')); | ||
| 211 | |||
| 212 | break; | ||
| 213 | |||
| 214 | case 'border': | ||
| 215 | v = 0; | ||
| 216 | |||
| 217 | tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) { | ||
| 218 | sv = dom.getStyle(e, 'border-' + sv + '-width'); | ||
| 219 | |||
| 220 | // False or not the same as prev | ||
| 221 | if (!sv || (sv != v && v !== 0)) { | ||
| 222 | v = 0; | ||
| 223 | return false; | ||
| 224 | } | ||
| 225 | |||
| 226 | if (sv) | ||
| 227 | v = sv; | ||
| 228 | }); | ||
| 229 | |||
| 230 | if (v) | ||
| 231 | return parseInt(v.replace(/[^0-9]/g, '')); | ||
| 232 | |||
| 233 | break; | ||
| 234 | } | ||
| 235 | } | ||
| 236 | |||
| 237 | if (v = dom.getAttrib(e, at)) | ||
| 238 | return v; | ||
| 239 | |||
| 240 | return ''; | ||
| 241 | }, | ||
| 242 | |||
| 243 | setSwapImage : function(st) { | ||
| 244 | var f = document.forms[0]; | ||
| 245 | |||
| 246 | f.onmousemovecheck.checked = st; | ||
| 247 | setBrowserDisabled('overbrowser', !st); | ||
| 248 | setBrowserDisabled('outbrowser', !st); | ||
| 249 | |||
| 250 | if (f.over_list) | ||
| 251 | f.over_list.disabled = !st; | ||
| 252 | |||
| 253 | if (f.out_list) | ||
| 254 | f.out_list.disabled = !st; | ||
| 255 | |||
| 256 | f.onmouseoversrc.disabled = !st; | ||
| 257 | f.onmouseoutsrc.disabled = !st; | ||
| 258 | }, | ||
| 259 | |||
| 260 | fillClassList : function(id) { | ||
| 261 | var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; | ||
| 262 | |||
| 263 | if (v = tinyMCEPopup.getParam('theme_advanced_styles')) { | ||
| 264 | cl = []; | ||
| 265 | |||
| 266 | tinymce.each(v.split(';'), function(v) { | ||
| 267 | var p = v.split('='); | ||
| 268 | |||
| 269 | cl.push({'title' : p[0], 'class' : p[1]}); | ||
| 270 | }); | ||
| 271 | } else | ||
| 272 | cl = tinyMCEPopup.editor.dom.getClasses(); | ||
| 273 | |||
| 274 | if (cl.length > 0) { | ||
| 275 | lst.options.length = 0; | ||
| 276 | lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); | ||
| 277 | |||
| 278 | tinymce.each(cl, function(o) { | ||
| 279 | lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']); | ||
| 280 | }); | ||
| 281 | } else | ||
| 282 | dom.remove(dom.getParent(id, 'tr')); | ||
| 283 | }, | ||
| 284 | |||
| 285 | fillFileList : function(id, l) { | ||
| 286 | var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; | ||
| 287 | |||
| 288 | l = window[l]; | ||
| 289 | lst.options.length = 0; | ||
| 290 | |||
| 291 | if (l && l.length > 0) { | ||
| 292 | lst.options[lst.options.length] = new Option('', ''); | ||
| 293 | |||
| 294 | tinymce.each(l, function(o) { | ||
| 295 | lst.options[lst.options.length] = new Option(o[0], o[1]); | ||
| 296 | }); | ||
| 297 | } else | ||
| 298 | dom.remove(dom.getParent(id, 'tr')); | ||
| 299 | }, | ||
| 300 | |||
| 301 | resetImageData : function() { | ||
| 302 | var f = document.forms[0]; | ||
| 303 | |||
| 304 | f.elements.width.value = f.elements.height.value = ''; | ||
| 305 | }, | ||
| 306 | |||
| 307 | updateImageData : function(img, st) { | ||
| 308 | var f = document.forms[0]; | ||
| 309 | |||
| 310 | if (!st) { | ||
| 311 | f.elements.width.value = img.width; | ||
| 312 | f.elements.height.value = img.height; | ||
| 313 | } | ||
| 314 | |||
| 315 | this.preloadImg = img; | ||
| 316 | }, | ||
| 317 | |||
| 318 | changeAppearance : function() { | ||
| 319 | var ed = tinyMCEPopup.editor, f = document.forms[0], img = document.getElementById('alignSampleImg'); | ||
| 320 | |||
| 321 | if (img) { | ||
| 322 | if (ed.getParam('inline_styles')) { | ||
| 323 | ed.dom.setAttrib(img, 'style', f.style.value); | ||
| 324 | } else { | ||
| 325 | img.align = f.align.value; | ||
| 326 | img.border = f.border.value; | ||
| 327 | img.hspace = f.hspace.value; | ||
| 328 | img.vspace = f.vspace.value; | ||
| 329 | } | ||
| 330 | } | ||
| 331 | }, | ||
| 332 | |||
| 333 | changeHeight : function() { | ||
| 334 | var f = document.forms[0], tp, t = this; | ||
| 335 | |||
| 336 | if (!f.constrain.checked || !t.preloadImg) { | ||
| 337 | return; | ||
| 338 | } | ||
| 339 | |||
| 340 | if (f.width.value == "" || f.height.value == "") | ||
| 341 | return; | ||
| 342 | |||
| 343 | tp = (parseInt(f.width.value) / parseInt(t.preloadImg.width)) * t.preloadImg.height; | ||
| 344 | f.height.value = tp.toFixed(0); | ||
| 345 | }, | ||
| 346 | |||
| 347 | changeWidth : function() { | ||
| 348 | var f = document.forms[0], tp, t = this; | ||
| 349 | |||
| 350 | if (!f.constrain.checked || !t.preloadImg) { | ||
| 351 | return; | ||
| 352 | } | ||
| 353 | |||
| 354 | if (f.width.value == "" || f.height.value == "") | ||
| 355 | return; | ||
| 356 | |||
| 357 | tp = (parseInt(f.height.value) / parseInt(t.preloadImg.height)) * t.preloadImg.width; | ||
| 358 | f.width.value = tp.toFixed(0); | ||
| 359 | }, | ||
| 360 | |||
| 361 | updateStyle : function(ty) { | ||
| 362 | var dom = tinyMCEPopup.dom, st, v, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value}); | ||
| 363 | |||
| 364 | if (tinyMCEPopup.editor.settings.inline_styles) { | ||
| 365 | // Handle align | ||
| 366 | if (ty == 'align') { | ||
| 367 | dom.setStyle(img, 'float', ''); | ||
| 368 | dom.setStyle(img, 'vertical-align', ''); | ||
| 369 | |||
| 370 | v = getSelectValue(f, 'align'); | ||
| 371 | if (v) { | ||
| 372 | if (v == 'left' || v == 'right') | ||
| 373 | dom.setStyle(img, 'float', v); | ||
| 374 | else | ||
| 375 | img.style.verticalAlign = v; | ||
| 376 | } | ||
| 377 | } | ||
| 378 | |||
| 379 | // Handle border | ||
| 380 | if (ty == 'border') { | ||
| 381 | dom.setStyle(img, 'border', ''); | ||
| 382 | |||
| 383 | v = f.border.value; | ||
| 384 | if (v || v == '0') { | ||
| 385 | if (v == '0') | ||
| 386 | img.style.border = '0'; | ||
| 387 | else | ||
| 388 | img.style.border = v + 'px solid black'; | ||
| 389 | } | ||
| 390 | } | ||
| 391 | |||
| 392 | // Handle hspace | ||
| 393 | if (ty == 'hspace') { | ||
| 394 | dom.setStyle(img, 'marginLeft', ''); | ||
| 395 | dom.setStyle(img, 'marginRight', ''); | ||
| 396 | |||
| 397 | v = f.hspace.value; | ||
| 398 | if (v) { | ||
| 399 | img.style.marginLeft = v + 'px'; | ||
| 400 | img.style.marginRight = v + 'px'; | ||
| 401 | } | ||
| 402 | } | ||
| 403 | |||
| 404 | // Handle vspace | ||
| 405 | if (ty == 'vspace') { | ||
| 406 | dom.setStyle(img, 'marginTop', ''); | ||
| 407 | dom.setStyle(img, 'marginBottom', ''); | ||
| 408 | |||
| 409 | v = f.vspace.value; | ||
| 410 | if (v) { | ||
| 411 | img.style.marginTop = v + 'px'; | ||
| 412 | img.style.marginBottom = v + 'px'; | ||
| 413 | } | ||
| 414 | } | ||
| 415 | |||
| 416 | // Merge | ||
| 417 | dom.get('style').value = dom.serializeStyle(dom.parseStyle(img.style.cssText)); | ||
| 418 | } | ||
| 419 | }, | ||
| 420 | |||
| 421 | changeMouseMove : function() { | ||
| 422 | }, | ||
| 423 | |||
| 424 | showPreviewImage : function(u, st) { | ||
| 425 | if (!u) { | ||
| 426 | tinyMCEPopup.dom.setHTML('prev', ''); | ||
| 427 | return; | ||
| 428 | } | ||
| 429 | |||
| 430 | if (!st && tinyMCEPopup.getParam("advimage_update_dimensions_onchange", true)) | ||
| 431 | this.resetImageData(); | ||
| 432 | |||
| 433 | u = tinyMCEPopup.editor.documentBaseURI.toAbsolute(u); | ||
| 434 | |||
| 435 | if (!st) | ||
| 436 | tinyMCEPopup.dom.setHTML('prev', '<img id="previewImg" src="' + u + '" border="0" onload="ImageDialog.updateImageData(this);" onerror="ImageDialog.resetImageData();" />'); | ||
| 437 | else | ||
| 438 | tinyMCEPopup.dom.setHTML('prev', '<img id="previewImg" src="' + u + '" border="0" onload="ImageDialog.updateImageData(this, 1);" />'); | ||
| 439 | } | ||
| 440 | }; | ||
| 441 | |||
| 442 | ImageDialog.preInit(); | ||
| 443 | tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog); | ||
diff --git a/public/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js deleted file mode 100644 index f493d19..0000000 --- a/public/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | tinyMCE.addI18n('en.advimage_dlg',{ | ||
| 2 | tab_general:"General", | ||
| 3 | tab_appearance:"Appearance", | ||
| 4 | tab_advanced:"Advanced", | ||
| 5 | general:"General", | ||
| 6 | title:"Title", | ||
| 7 | preview:"Preview", | ||
| 8 | constrain_proportions:"Constrain proportions", | ||
| 9 | langdir:"Language direction", | ||
| 10 | langcode:"Language code", | ||
| 11 | long_desc:"Long description link", | ||
| 12 | style:"Style", | ||
| 13 | classes:"Classes", | ||
| 14 | ltr:"Left to right", | ||
| 15 | rtl:"Right to left", | ||
| 16 | id:"Id", | ||
| 17 | map:"Image map", | ||
| 18 | swap_image:"Swap image", | ||
| 19 | alt_image:"Alternative image", | ||
| 20 | mouseover:"for mouse over", | ||
| 21 | mouseout:"for mouse out", | ||
| 22 | misc:"Miscellaneous", | ||
| 23 | example_img:"Appearance preview image", | ||
| 24 | missing_alt:"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.", | ||
| 25 | dialog_title:"Insert/edit image", | ||
| 26 | src:"Image URL", | ||
| 27 | alt:"Image description", | ||
| 28 | list:"Image list", | ||
| 29 | border:"Border", | ||
| 30 | dimensions:"Dimensions", | ||
| 31 | vspace:"Vertical space", | ||
| 32 | hspace:"Horizontal space", | ||
| 33 | align:"Alignment", | ||
| 34 | align_baseline:"Baseline", | ||
| 35 | align_top:"Top", | ||
| 36 | align_middle:"Middle", | ||
| 37 | align_bottom:"Bottom", | ||
| 38 | align_texttop:"Text top", | ||
| 39 | align_textbottom:"Text bottom", | ||
| 40 | align_left:"Left", | ||
| 41 | align_right:"Right", | ||
| 42 | image_list:"Image list" | ||
| 43 | }); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/advlink/css/advlink.css b/public/javascripts/tiny_mce/plugins/advlink/css/advlink.css deleted file mode 100644 index 1436431..0000000 --- a/public/javascripts/tiny_mce/plugins/advlink/css/advlink.css +++ /dev/null | |||
| @@ -1,8 +0,0 @@ | |||
| 1 | .mceLinkList, .mceAnchorList, #targetlist {width:280px;} | ||
| 2 | .mceActionPanel {margin-top:7px;} | ||
| 3 | .panel_wrapper div.current {height:320px;} | ||
| 4 | #classlist, #title, #href {width:280px;} | ||
| 5 | #popupurl, #popupname {width:200px;} | ||
| 6 | #popupwidth, #popupheight, #popupleft, #popuptop {width:30px;vertical-align:middle;text-align:center;} | ||
| 7 | #id, #style, #classes, #target, #dir, #hreflang, #lang, #charset, #type, #rel, #rev, #tabindex, #accesskey {width:200px;} | ||
| 8 | #events_panel input {width:200px;} | ||
diff --git a/public/javascripts/tiny_mce/plugins/advlink/editor_plugin.js b/public/javascripts/tiny_mce/plugins/advlink/editor_plugin.js deleted file mode 100644 index 983fe5a..0000000 --- a/public/javascripts/tiny_mce/plugins/advlink/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.AdvancedLinkPlugin",{init:function(a,b){this.editor=a;a.addCommand("mceAdvLink",function(){var c=a.selection;if(c.isCollapsed()&&!a.dom.getParent(c.getNode(),"A")){return}a.windowManager.open({file:b+"/link.htm",width:480+parseInt(a.getLang("advlink.delta_width",0)),height:400+parseInt(a.getLang("advlink.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("link",{title:"advlink.link_desc",cmd:"mceAdvLink"});a.addShortcut("ctrl+k","advlink.advlink_desc","mceAdvLink");a.onNodeChange.add(function(d,c,f,e){c.setDisabled("link",e&&f.nodeName!="A");c.setActive("link",f.nodeName=="A"&&!f.name)})},getInfo:function(){return{longname:"Advanced link",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlink",tinymce.plugins.AdvancedLinkPlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js deleted file mode 100644 index fc5325a..0000000 --- a/public/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,58 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 539 2008-01-14 19:08:58Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.AdvancedLinkPlugin', { | ||
| 10 | init : function(ed, url) { | ||
| 11 | this.editor = ed; | ||
| 12 | |||
| 13 | // Register commands | ||
| 14 | ed.addCommand('mceAdvLink', function() { | ||
| 15 | var se = ed.selection; | ||
| 16 | |||
| 17 | // No selection and not in link | ||
| 18 | if (se.isCollapsed() && !ed.dom.getParent(se.getNode(), 'A')) | ||
| 19 | return; | ||
| 20 | |||
| 21 | ed.windowManager.open({ | ||
| 22 | file : url + '/link.htm', | ||
| 23 | width : 480 + parseInt(ed.getLang('advlink.delta_width', 0)), | ||
| 24 | height : 400 + parseInt(ed.getLang('advlink.delta_height', 0)), | ||
| 25 | inline : 1 | ||
| 26 | }, { | ||
| 27 | plugin_url : url | ||
| 28 | }); | ||
| 29 | }); | ||
| 30 | |||
| 31 | // Register buttons | ||
| 32 | ed.addButton('link', { | ||
| 33 | title : 'advlink.link_desc', | ||
| 34 | cmd : 'mceAdvLink' | ||
| 35 | }); | ||
| 36 | |||
| 37 | ed.addShortcut('ctrl+k', 'advlink.advlink_desc', 'mceAdvLink'); | ||
| 38 | |||
| 39 | ed.onNodeChange.add(function(ed, cm, n, co) { | ||
| 40 | cm.setDisabled('link', co && n.nodeName != 'A'); | ||
| 41 | cm.setActive('link', n.nodeName == 'A' && !n.name); | ||
| 42 | }); | ||
| 43 | }, | ||
| 44 | |||
| 45 | getInfo : function() { | ||
| 46 | return { | ||
| 47 | longname : 'Advanced link', | ||
| 48 | author : 'Moxiecode Systems AB', | ||
| 49 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 50 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink', | ||
| 51 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 52 | }; | ||
| 53 | } | ||
| 54 | }); | ||
| 55 | |||
| 56 | // Register plugin | ||
| 57 | tinymce.PluginManager.add('advlink', tinymce.plugins.AdvancedLinkPlugin); | ||
| 58 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/advlink/js/advlink.js b/public/javascripts/tiny_mce/plugins/advlink/js/advlink.js deleted file mode 100644 index bb7922a..0000000 --- a/public/javascripts/tiny_mce/plugins/advlink/js/advlink.js +++ /dev/null | |||
| @@ -1,528 +0,0 @@ | |||
| 1 | /* Functions for the advlink plugin popup */ | ||
| 2 | |||
| 3 | tinyMCEPopup.requireLangPack(); | ||
| 4 | |||
| 5 | var templates = { | ||
| 6 | "window.open" : "window.open('${url}','${target}','${options}')" | ||
| 7 | }; | ||
| 8 | |||
| 9 | function preinit() { | ||
| 10 | var url; | ||
| 11 | |||
| 12 | if (url = tinyMCEPopup.getParam("external_link_list_url")) | ||
| 13 | document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>'); | ||
| 14 | } | ||
| 15 | |||
| 16 | function changeClass() { | ||
| 17 | var f = document.forms[0]; | ||
| 18 | |||
| 19 | f.classes.value = getSelectValue(f, 'classlist'); | ||
| 20 | } | ||
| 21 | |||
| 22 | function init() { | ||
| 23 | tinyMCEPopup.resizeToInnerSize(); | ||
| 24 | |||
| 25 | var formObj = document.forms[0]; | ||
| 26 | var inst = tinyMCEPopup.editor; | ||
| 27 | var elm = inst.selection.getNode(); | ||
| 28 | var action = "insert"; | ||
| 29 | var html; | ||
| 30 | |||
| 31 | document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink'); | ||
| 32 | document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink'); | ||
| 33 | document.getElementById('linklisthrefcontainer').innerHTML = getLinkListHTML('linklisthref','href'); | ||
| 34 | document.getElementById('anchorlistcontainer').innerHTML = getAnchorListHTML('anchorlist','href'); | ||
| 35 | document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target'); | ||
| 36 | |||
| 37 | // Link list | ||
| 38 | html = getLinkListHTML('linklisthref','href'); | ||
| 39 | if (html == "") | ||
| 40 | document.getElementById("linklisthrefrow").style.display = 'none'; | ||
| 41 | else | ||
| 42 | document.getElementById("linklisthrefcontainer").innerHTML = html; | ||
| 43 | |||
| 44 | // Resize some elements | ||
| 45 | if (isVisible('hrefbrowser')) | ||
| 46 | document.getElementById('href').style.width = '260px'; | ||
| 47 | |||
| 48 | if (isVisible('popupurlbrowser')) | ||
| 49 | document.getElementById('popupurl').style.width = '180px'; | ||
| 50 | |||
| 51 | elm = inst.dom.getParent(elm, "A"); | ||
| 52 | if (elm != null && elm.nodeName == "A") | ||
| 53 | action = "update"; | ||
| 54 | |||
| 55 | formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true); | ||
| 56 | |||
| 57 | setPopupControlsDisabled(true); | ||
| 58 | |||
| 59 | if (action == "update") { | ||
| 60 | var href = inst.dom.getAttrib(elm, 'href'); | ||
| 61 | var onclick = inst.dom.getAttrib(elm, 'onclick'); | ||
| 62 | |||
| 63 | // Setup form data | ||
| 64 | setFormValue('href', href); | ||
| 65 | setFormValue('title', inst.dom.getAttrib(elm, 'title')); | ||
| 66 | setFormValue('id', inst.dom.getAttrib(elm, 'id')); | ||
| 67 | setFormValue('style', inst.dom.getAttrib(elm, "style")); | ||
| 68 | setFormValue('rel', inst.dom.getAttrib(elm, 'rel')); | ||
| 69 | setFormValue('rev', inst.dom.getAttrib(elm, 'rev')); | ||
| 70 | setFormValue('charset', inst.dom.getAttrib(elm, 'charset')); | ||
| 71 | setFormValue('hreflang', inst.dom.getAttrib(elm, 'hreflang')); | ||
| 72 | setFormValue('dir', inst.dom.getAttrib(elm, 'dir')); | ||
| 73 | setFormValue('lang', inst.dom.getAttrib(elm, 'lang')); | ||
| 74 | setFormValue('tabindex', inst.dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : "")); | ||
| 75 | setFormValue('accesskey', inst.dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : "")); | ||
| 76 | setFormValue('type', inst.dom.getAttrib(elm, 'type')); | ||
| 77 | setFormValue('onfocus', inst.dom.getAttrib(elm, 'onfocus')); | ||
| 78 | setFormValue('onblur', inst.dom.getAttrib(elm, 'onblur')); | ||
| 79 | setFormValue('onclick', onclick); | ||
| 80 | setFormValue('ondblclick', inst.dom.getAttrib(elm, 'ondblclick')); | ||
| 81 | setFormValue('onmousedown', inst.dom.getAttrib(elm, 'onmousedown')); | ||
| 82 | setFormValue('onmouseup', inst.dom.getAttrib(elm, 'onmouseup')); | ||
| 83 | setFormValue('onmouseover', inst.dom.getAttrib(elm, 'onmouseover')); | ||
| 84 | setFormValue('onmousemove', inst.dom.getAttrib(elm, 'onmousemove')); | ||
| 85 | setFormValue('onmouseout', inst.dom.getAttrib(elm, 'onmouseout')); | ||
| 86 | setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress')); | ||
| 87 | setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown')); | ||
| 88 | setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup')); | ||
| 89 | setFormValue('target', inst.dom.getAttrib(elm, 'target')); | ||
| 90 | setFormValue('classes', inst.dom.getAttrib(elm, 'class')); | ||
| 91 | |||
| 92 | // Parse onclick data | ||
| 93 | if (onclick != null && onclick.indexOf('window.open') != -1) | ||
| 94 | parseWindowOpen(onclick); | ||
| 95 | else | ||
| 96 | parseFunction(onclick); | ||
| 97 | |||
| 98 | // Select by the values | ||
| 99 | selectByValue(formObj, 'dir', inst.dom.getAttrib(elm, 'dir')); | ||
| 100 | selectByValue(formObj, 'rel', inst.dom.getAttrib(elm, 'rel')); | ||
| 101 | selectByValue(formObj, 'rev', inst.dom.getAttrib(elm, 'rev')); | ||
| 102 | selectByValue(formObj, 'linklisthref', href); | ||
| 103 | |||
| 104 | if (href.charAt(0) == '#') | ||
| 105 | selectByValue(formObj, 'anchorlist', href); | ||
| 106 | |||
| 107 | addClassesToList('classlist', 'advlink_styles'); | ||
| 108 | |||
| 109 | selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true); | ||
| 110 | selectByValue(formObj, 'targetlist', inst.dom.getAttrib(elm, 'target'), true); | ||
| 111 | } else | ||
| 112 | addClassesToList('classlist', 'advlink_styles'); | ||
| 113 | } | ||
| 114 | |||
| 115 | function checkPrefix(n) { | ||
| 116 | if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email'))) | ||
| 117 | n.value = 'mailto:' + n.value; | ||
| 118 | |||
| 119 | if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external'))) | ||
| 120 | n.value = 'http://' + n.value; | ||
| 121 | } | ||
| 122 | |||
| 123 | function setFormValue(name, value) { | ||
| 124 | document.forms[0].elements[name].value = value; | ||
| 125 | } | ||
| 126 | |||
| 127 | function parseWindowOpen(onclick) { | ||
| 128 | var formObj = document.forms[0]; | ||
| 129 | |||
| 130 | // Preprocess center code | ||
| 131 | if (onclick.indexOf('return false;') != -1) { | ||
| 132 | formObj.popupreturn.checked = true; | ||
| 133 | onclick = onclick.replace('return false;', ''); | ||
| 134 | } else | ||
| 135 | formObj.popupreturn.checked = false; | ||
| 136 | |||
| 137 | var onClickData = parseLink(onclick); | ||
| 138 | |||
| 139 | if (onClickData != null) { | ||
| 140 | formObj.ispopup.checked = true; | ||
| 141 | setPopupControlsDisabled(false); | ||
| 142 | |||
| 143 | var onClickWindowOptions = parseOptions(onClickData['options']); | ||
| 144 | var url = onClickData['url']; | ||
| 145 | |||
| 146 | formObj.popupname.value = onClickData['target']; | ||
| 147 | formObj.popupurl.value = url; | ||
| 148 | formObj.popupwidth.value = getOption(onClickWindowOptions, 'width'); | ||
| 149 | formObj.popupheight.value = getOption(onClickWindowOptions, 'height'); | ||
| 150 | |||
| 151 | formObj.popupleft.value = getOption(onClickWindowOptions, 'left'); | ||
| 152 | formObj.popuptop.value = getOption(onClickWindowOptions, 'top'); | ||
| 153 | |||
| 154 | if (formObj.popupleft.value.indexOf('screen') != -1) | ||
| 155 | formObj.popupleft.value = "c"; | ||
| 156 | |||
| 157 | if (formObj.popuptop.value.indexOf('screen') != -1) | ||
| 158 | formObj.popuptop.value = "c"; | ||
| 159 | |||
| 160 | formObj.popuplocation.checked = getOption(onClickWindowOptions, 'location') == "yes"; | ||
| 161 | formObj.popupscrollbars.checked = getOption(onClickWindowOptions, 'scrollbars') == "yes"; | ||
| 162 | formObj.popupmenubar.checked = getOption(onClickWindowOptions, 'menubar') == "yes"; | ||
| 163 | formObj.popupresizable.checked = getOption(onClickWindowOptions, 'resizable') == "yes"; | ||
| 164 | formObj.popuptoolbar.checked = getOption(onClickWindowOptions, 'toolbar') == "yes"; | ||
| 165 | formObj.popupstatus.checked = getOption(onClickWindowOptions, 'status') == "yes"; | ||
| 166 | formObj.popupdependent.checked = getOption(onClickWindowOptions, 'dependent') == "yes"; | ||
| 167 | |||
| 168 | buildOnClick(); | ||
| 169 | } | ||
| 170 | } | ||
| 171 | |||
| 172 | function parseFunction(onclick) { | ||
| 173 | var formObj = document.forms[0]; | ||
| 174 | var onClickData = parseLink(onclick); | ||
| 175 | |||
| 176 | // TODO: Add stuff here | ||
| 177 | } | ||
| 178 | |||
| 179 | function getOption(opts, name) { | ||
| 180 | return typeof(opts[name]) == "undefined" ? "" : opts[name]; | ||
| 181 | } | ||
| 182 | |||
| 183 | function setPopupControlsDisabled(state) { | ||
| 184 | var formObj = document.forms[0]; | ||
| 185 | |||
| 186 | formObj.popupname.disabled = state; | ||
| 187 | formObj.popupurl.disabled = state; | ||
| 188 | formObj.popupwidth.disabled = state; | ||
| 189 | formObj.popupheight.disabled = state; | ||
| 190 | formObj.popupleft.disabled = state; | ||
| 191 | formObj.popuptop.disabled = state; | ||
| 192 | formObj.popuplocation.disabled = state; | ||
| 193 | formObj.popupscrollbars.disabled = state; | ||
| 194 | formObj.popupmenubar.disabled = state; | ||
| 195 | formObj.popupresizable.disabled = state; | ||
| 196 | formObj.popuptoolbar.disabled = state; | ||
| 197 | formObj.popupstatus.disabled = state; | ||
| 198 | formObj.popupreturn.disabled = state; | ||
| 199 | formObj.popupdependent.disabled = state; | ||
| 200 | |||
| 201 | setBrowserDisabled('popupurlbrowser', state); | ||
| 202 | } | ||
| 203 | |||
| 204 | function parseLink(link) { | ||
| 205 | link = link.replace(new RegExp(''', 'g'), "'"); | ||
| 206 | |||
| 207 | var fnName = link.replace(new RegExp("\\s*([A-Za-z0-9\.]*)\\s*\\(.*", "gi"), "$1"); | ||
| 208 | |||
| 209 | // Is function name a template function | ||
| 210 | var template = templates[fnName]; | ||
| 211 | if (template) { | ||
| 212 | // Build regexp | ||
| 213 | var variableNames = template.match(new RegExp("'?\\$\\{[A-Za-z0-9\.]*\\}'?", "gi")); | ||
| 214 | var regExp = "\\s*[A-Za-z0-9\.]*\\s*\\("; | ||
| 215 | var replaceStr = ""; | ||
| 216 | for (var i=0; i<variableNames.length; i++) { | ||
| 217 | // Is string value | ||
| 218 | if (variableNames[i].indexOf("'${") != -1) | ||
| 219 | regExp += "'(.*)'"; | ||
| 220 | else // Number value | ||
| 221 | regExp += "([0-9]*)"; | ||
| 222 | |||
| 223 | replaceStr += "$" + (i+1); | ||
| 224 | |||
| 225 | // Cleanup variable name | ||
| 226 | variableNames[i] = variableNames[i].replace(new RegExp("[^A-Za-z0-9]", "gi"), ""); | ||
| 227 | |||
| 228 | if (i != variableNames.length-1) { | ||
| 229 | regExp += "\\s*,\\s*"; | ||
| 230 | replaceStr += "<delim>"; | ||
| 231 | } else | ||
| 232 | regExp += ".*"; | ||
| 233 | } | ||
| 234 | |||
| 235 | regExp += "\\);?"; | ||
| 236 | |||
| 237 | // Build variable array | ||
| 238 | var variables = []; | ||
| 239 | variables["_function"] = fnName; | ||
| 240 | var variableValues = link.replace(new RegExp(regExp, "gi"), replaceStr).split('<delim>'); | ||
| 241 | for (var i=0; i<variableNames.length; i++) | ||
| 242 | variables[variableNames[i]] = variableValues[i]; | ||
| 243 | |||
| 244 | return variables; | ||
| 245 | } | ||
| 246 | |||
| 247 | return null; | ||
| 248 | } | ||
| 249 | |||
| 250 | function parseOptions(opts) { | ||
| 251 | if (opts == null || opts == "") | ||
| 252 | return []; | ||
| 253 | |||
| 254 | // Cleanup the options | ||
| 255 | opts = opts.toLowerCase(); | ||
| 256 | opts = opts.replace(/;/g, ","); | ||
| 257 | opts = opts.replace(/[^0-9a-z=,]/g, ""); | ||
| 258 | |||
| 259 | var optionChunks = opts.split(','); | ||
| 260 | var options = []; | ||
| 261 | |||
| 262 | for (var i=0; i<optionChunks.length; i++) { | ||
| 263 | var parts = optionChunks[i].split('='); | ||
| 264 | |||
| 265 | if (parts.length == 2) | ||
| 266 | options[parts[0]] = parts[1]; | ||
| 267 | } | ||
| 268 | |||
| 269 | return options; | ||
| 270 | } | ||
| 271 | |||
| 272 | function buildOnClick() { | ||
| 273 | var formObj = document.forms[0]; | ||
| 274 | |||
| 275 | if (!formObj.ispopup.checked) { | ||
| 276 | formObj.onclick.value = ""; | ||
| 277 | return; | ||
| 278 | } | ||
| 279 | |||
| 280 | var onclick = "window.open('"; | ||
| 281 | var url = formObj.popupurl.value; | ||
| 282 | |||
| 283 | onclick += url + "','"; | ||
| 284 | onclick += formObj.popupname.value + "','"; | ||
| 285 | |||
| 286 | if (formObj.popuplocation.checked) | ||
| 287 | onclick += "location=yes,"; | ||
| 288 | |||
| 289 | if (formObj.popupscrollbars.checked) | ||
| 290 | onclick += "scrollbars=yes,"; | ||
| 291 | |||
| 292 | if (formObj.popupmenubar.checked) | ||
| 293 | onclick += "menubar=yes,"; | ||
| 294 | |||
| 295 | if (formObj.popupresizable.checked) | ||
| 296 | onclick += "resizable=yes,"; | ||
| 297 | |||
| 298 | if (formObj.popuptoolbar.checked) | ||
| 299 | onclick += "toolbar=yes,"; | ||
| 300 | |||
| 301 | if (formObj.popupstatus.checked) | ||
| 302 | onclick += "status=yes,"; | ||
| 303 | |||
| 304 | if (formObj.popupdependent.checked) | ||
| 305 | onclick += "dependent=yes,"; | ||
| 306 | |||
| 307 | if (formObj.popupwidth.value != "") | ||
| 308 | onclick += "width=" + formObj.popupwidth.value + ","; | ||
| 309 | |||
| 310 | if (formObj.popupheight.value != "") | ||
| 311 | onclick += "height=" + formObj.popupheight.value + ","; | ||
| 312 | |||
| 313 | if (formObj.popupleft.value != "") { | ||
| 314 | if (formObj.popupleft.value != "c") | ||
| 315 | onclick += "left=" + formObj.popupleft.value + ","; | ||
| 316 | else | ||
| 317 | onclick += "left='+(screen.availWidth/2-" + (formObj.popupwidth.value/2) + ")+',"; | ||
| 318 | } | ||
| 319 | |||
| 320 | if (formObj.popuptop.value != "") { | ||
| 321 | if (formObj.popuptop.value != "c") | ||
| 322 | onclick += "top=" + formObj.popuptop.value + ","; | ||
| 323 | else | ||
| 324 | onclick += "top='+(screen.availHeight/2-" + (formObj.popupheight.value/2) + ")+',"; | ||
| 325 | } | ||
| 326 | |||
| 327 | if (onclick.charAt(onclick.length-1) == ',') | ||
| 328 | onclick = onclick.substring(0, onclick.length-1); | ||
| 329 | |||
| 330 | onclick += "');"; | ||
| 331 | |||
| 332 | if (formObj.popupreturn.checked) | ||
| 333 | onclick += "return false;"; | ||
| 334 | |||
| 335 | // tinyMCE.debug(onclick); | ||
| 336 | |||
| 337 | formObj.onclick.value = onclick; | ||
| 338 | |||
| 339 | if (formObj.href.value == "") | ||
| 340 | formObj.href.value = url; | ||
| 341 | } | ||
| 342 | |||
| 343 | function setAttrib(elm, attrib, value) { | ||
| 344 | var formObj = document.forms[0]; | ||
| 345 | var valueElm = formObj.elements[attrib.toLowerCase()]; | ||
| 346 | var dom = tinyMCEPopup.editor.dom; | ||
| 347 | |||
| 348 | if (typeof(value) == "undefined" || value == null) { | ||
| 349 | value = ""; | ||
| 350 | |||
| 351 | if (valueElm) | ||
| 352 | value = valueElm.value; | ||
| 353 | } | ||
| 354 | |||
| 355 | // Clean up the style | ||
| 356 | if (attrib == 'style') | ||
| 357 | value = dom.serializeStyle(dom.parseStyle(value)); | ||
| 358 | |||
| 359 | dom.setAttrib(elm, attrib, value); | ||
| 360 | } | ||
| 361 | |||
| 362 | function getAnchorListHTML(id, target) { | ||
| 363 | var inst = tinyMCEPopup.editor; | ||
| 364 | var nodes = inst.dom.select('a.mceItemAnchor,img.mceItemAnchor'), name, i; | ||
| 365 | var html = ""; | ||
| 366 | |||
| 367 | html += '<select id="' + id + '" name="' + id + '" class="mceAnchorList" o2nfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target + '.value='; | ||
| 368 | html += 'this.options[this.selectedIndex].value;">'; | ||
| 369 | html += '<option value="">---</option>'; | ||
| 370 | |||
| 371 | for (i=0; i<nodes.length; i++) { | ||
| 372 | if ((name = inst.dom.getAttrib(nodes[i], "name")) != "") | ||
| 373 | html += '<option value="#' + name + '">' + name + '</option>'; | ||
| 374 | } | ||
| 375 | |||
| 376 | html += '</select>'; | ||
| 377 | |||
| 378 | return html; | ||
| 379 | } | ||
| 380 | |||
| 381 | function insertAction() { | ||
| 382 | var inst = tinyMCEPopup.editor; | ||
| 383 | var elm, elementArray, i; | ||
| 384 | |||
| 385 | elm = inst.selection.getNode(); | ||
| 386 | checkPrefix(document.forms[0].href); | ||
| 387 | |||
| 388 | elm = inst.dom.getParent(elm, "A"); | ||
| 389 | |||
| 390 | // Remove element if there is no href | ||
| 391 | if (!document.forms[0].href.value) { | ||
| 392 | tinyMCEPopup.execCommand("mceBeginUndoLevel"); | ||
| 393 | i = inst.selection.getBookmark(); | ||
| 394 | inst.dom.remove(elm, 1); | ||
| 395 | inst.selection.moveToBookmark(i); | ||
| 396 | tinyMCEPopup.execCommand("mceEndUndoLevel"); | ||
| 397 | tinyMCEPopup.close(); | ||
| 398 | return; | ||
| 399 | } | ||
| 400 | |||
| 401 | tinyMCEPopup.execCommand("mceBeginUndoLevel"); | ||
| 402 | |||
| 403 | // Create new anchor elements | ||
| 404 | if (elm == null) { | ||
| 405 | inst.getDoc().execCommand("unlink", false, null); | ||
| 406 | tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); | ||
| 407 | |||
| 408 | elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';}); | ||
| 409 | for (i=0; i<elementArray.length; i++) | ||
| 410 | setAllAttribs(elm = elementArray[i]); | ||
| 411 | } else | ||
| 412 | setAllAttribs(elm); | ||
| 413 | |||
| 414 | // Don't move caret if selection was image | ||
| 415 | if (elm.childNodes.length != 1 || elm.firstChild.nodeName != 'IMG') { | ||
| 416 | inst.focus(); | ||
| 417 | inst.selection.select(elm); | ||
| 418 | inst.selection.collapse(0); | ||
| 419 | tinyMCEPopup.storeSelection(); | ||
| 420 | } | ||
| 421 | |||
| 422 | tinyMCEPopup.execCommand("mceEndUndoLevel"); | ||
| 423 | tinyMCEPopup.close(); | ||
| 424 | } | ||
| 425 | |||
| 426 | function setAllAttribs(elm) { | ||
| 427 | var formObj = document.forms[0]; | ||
| 428 | var href = formObj.href.value; | ||
| 429 | var target = getSelectValue(formObj, 'targetlist'); | ||
| 430 | |||
| 431 | setAttrib(elm, 'href', href); | ||
| 432 | setAttrib(elm, 'title'); | ||
| 433 | setAttrib(elm, 'target', target == '_self' ? '' : target); | ||
| 434 | setAttrib(elm, 'id'); | ||
| 435 | setAttrib(elm, 'style'); | ||
| 436 | setAttrib(elm, 'class', getSelectValue(formObj, 'classlist')); | ||
| 437 | setAttrib(elm, 'rel'); | ||
| 438 | setAttrib(elm, 'rev'); | ||
| 439 | setAttrib(elm, 'charset'); | ||
| 440 | setAttrib(elm, 'hreflang'); | ||
| 441 | setAttrib(elm, 'dir'); | ||
| 442 | setAttrib(elm, 'lang'); | ||
| 443 | setAttrib(elm, 'tabindex'); | ||
| 444 | setAttrib(elm, 'accesskey'); | ||
| 445 | setAttrib(elm, 'type'); | ||
| 446 | setAttrib(elm, 'onfocus'); | ||
| 447 | setAttrib(elm, 'onblur'); | ||
| 448 | setAttrib(elm, 'onclick'); | ||
| 449 | setAttrib(elm, 'ondblclick'); | ||
| 450 | setAttrib(elm, 'onmousedown'); | ||
| 451 | setAttrib(elm, 'onmouseup'); | ||
| 452 | setAttrib(elm, 'onmouseover'); | ||
| 453 | setAttrib(elm, 'onmousemove'); | ||
| 454 | setAttrib(elm, 'onmouseout'); | ||
| 455 | setAttrib(elm, 'onkeypress'); | ||
| 456 | setAttrib(elm, 'onkeydown'); | ||
| 457 | setAttrib(elm, 'onkeyup'); | ||
| 458 | |||
| 459 | // Refresh in old MSIE | ||
| 460 | if (tinyMCE.isMSIE5) | ||
| 461 | elm.outerHTML = elm.outerHTML; | ||
| 462 | } | ||
| 463 | |||
| 464 | function getSelectValue(form_obj, field_name) { | ||
| 465 | var elm = form_obj.elements[field_name]; | ||
| 466 | |||
| 467 | if (!elm || elm.options == null || elm.selectedIndex == -1) | ||
| 468 | return ""; | ||
| 469 | |||
| 470 | return elm.options[elm.selectedIndex].value; | ||
| 471 | } | ||
| 472 | |||
| 473 | function getLinkListHTML(elm_id, target_form_element, onchange_func) { | ||
| 474 | if (typeof(tinyMCELinkList) == "undefined" || tinyMCELinkList.length == 0) | ||
| 475 | return ""; | ||
| 476 | |||
| 477 | var html = ""; | ||
| 478 | |||
| 479 | html += '<select id="' + elm_id + '" name="' + elm_id + '"'; | ||
| 480 | html += ' class="mceLinkList" onfoc2us="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value='; | ||
| 481 | html += 'this.options[this.selectedIndex].value;'; | ||
| 482 | |||
| 483 | if (typeof(onchange_func) != "undefined") | ||
| 484 | html += onchange_func + '(\'' + target_form_element + '\',this.options[this.selectedIndex].text,this.options[this.selectedIndex].value);'; | ||
| 485 | |||
| 486 | html += '"><option value="">---</option>'; | ||
| 487 | |||
| 488 | for (var i=0; i<tinyMCELinkList.length; i++) | ||
| 489 | html += '<option value="' + tinyMCELinkList[i][1] + '">' + tinyMCELinkList[i][0] + '</option>'; | ||
| 490 | |||
| 491 | html += '</select>'; | ||
| 492 | |||
| 493 | return html; | ||
| 494 | |||
| 495 | // tinyMCE.debug('-- image list start --', html, '-- image list end --'); | ||
| 496 | } | ||
| 497 | |||
| 498 | function getTargetListHTML(elm_id, target_form_element) { | ||
| 499 | var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';'); | ||
| 500 | var html = ''; | ||
| 501 | |||
| 502 | html += '<select id="' + elm_id + '" name="' + elm_id + '" onf2ocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value='; | ||
| 503 | html += 'this.options[this.selectedIndex].value;">'; | ||
| 504 | html += '<option value="_self">' + tinyMCEPopup.getLang('advlink_dlg.target_same') + '</option>'; | ||
| 505 | html += '<option value="_blank">' + tinyMCEPopup.getLang('advlink_dlg.target_blank') + ' (_blank)</option>'; | ||
| 506 | html += '<option value="_parent">' + tinyMCEPopup.getLang('advlink_dlg.target_parent') + ' (_parent)</option>'; | ||
| 507 | html += '<option value="_top">' + tinyMCEPopup.getLang('advlink_dlg.target_top') + ' (_top)</option>'; | ||
| 508 | |||
| 509 | for (var i=0; i<targets.length; i++) { | ||
| 510 | var key, value; | ||
| 511 | |||
| 512 | if (targets[i] == "") | ||
| 513 | continue; | ||
| 514 | |||
| 515 | key = targets[i].split('=')[0]; | ||
| 516 | value = targets[i].split('=')[1]; | ||
| 517 | |||
| 518 | html += '<option value="' + key + '">' + value + ' (' + key + ')</option>'; | ||
| 519 | } | ||
| 520 | |||
| 521 | html += '</select>'; | ||
| 522 | |||
| 523 | return html; | ||
| 524 | } | ||
| 525 | |||
| 526 | // While loading | ||
| 527 | preinit(); | ||
| 528 | tinyMCEPopup.onInit.add(init); | ||
diff --git a/public/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js deleted file mode 100644 index c71ffbd..0000000 --- a/public/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js +++ /dev/null | |||
| @@ -1,52 +0,0 @@ | |||
| 1 | tinyMCE.addI18n('en.advlink_dlg',{ | ||
| 2 | title:"Insert/edit link", | ||
| 3 | url:"Link URL", | ||
| 4 | target:"Target", | ||
| 5 | titlefield:"Title", | ||
| 6 | is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?", | ||
| 7 | is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?", | ||
| 8 | list:"Link list", | ||
| 9 | general_tab:"General", | ||
| 10 | popup_tab:"Popup", | ||
| 11 | events_tab:"Events", | ||
| 12 | advanced_tab:"Advanced", | ||
| 13 | general_props:"General properties", | ||
| 14 | popup_props:"Popup properties", | ||
| 15 | event_props:"Events", | ||
| 16 | advanced_props:"Advanced properties", | ||
| 17 | popup_opts:"Options", | ||
| 18 | anchor_names:"Anchors", | ||
| 19 | target_same:"Open in this window / frame", | ||
| 20 | target_parent:"Open in parent window / frame", | ||
| 21 | target_top:"Open in top frame (replaces all frames)", | ||
| 22 | target_blank:"Open in new window", | ||
| 23 | popup:"Javascript popup", | ||
| 24 | popup_url:"Popup URL", | ||
| 25 | popup_name:"Window name", | ||
| 26 | popup_return:"Insert 'return false'", | ||
| 27 | popup_scrollbars:"Show scrollbars", | ||
| 28 | popup_statusbar:"Show status bar", | ||
| 29 | popup_toolbar:"Show toolbars", | ||
| 30 | popup_menubar:"Show menu bar", | ||
| 31 | popup_location:"Show location bar", | ||
| 32 | popup_resizable:"Make window resizable", | ||
| 33 | popup_dependent:"Dependent (Mozilla/Firefox only)", | ||
| 34 | popup_size:"Size", | ||
| 35 | popup_position:"Position (X/Y)", | ||
| 36 | id:"Id", | ||
| 37 | style:"Style", | ||
| 38 | classes:"Classes", | ||
| 39 | target_name:"Target name", | ||
| 40 | langdir:"Language direction", | ||
| 41 | target_langcode:"Target language", | ||
| 42 | langcode:"Language code", | ||
| 43 | encoding:"Target character encoding", | ||
| 44 | mime:"Target MIME type", | ||
| 45 | rel:"Relationship page to target", | ||
| 46 | rev:"Relationship target to page", | ||
| 47 | tabindex:"Tabindex", | ||
| 48 | accesskey:"Accesskey", | ||
| 49 | ltr:"Left to right", | ||
| 50 | rtl:"Right to left", | ||
| 51 | link_list:"Link list" | ||
| 52 | }); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/advlink/link.htm b/public/javascripts/tiny_mce/plugins/advlink/link.htm deleted file mode 100644 index cc8b0b8..0000000 --- a/public/javascripts/tiny_mce/plugins/advlink/link.htm +++ /dev/null | |||
| @@ -1,338 +0,0 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title>{#advlink_dlg.title}</title> | ||
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 6 | <script type="text/javascript" src="../../utils/mctabs.js"></script> | ||
| 7 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | ||
| 8 | <script type="text/javascript" src="../../utils/validate.js"></script> | ||
| 9 | <script type="text/javascript" src="js/advlink.js"></script> | ||
| 10 | <link href="css/advlink.css" rel="stylesheet" type="text/css" /> | ||
| 11 | </head> | ||
| 12 | <body id="advlink" style="display: none"> | ||
| 13 | <form onsubmit="insertAction();return false;" action="#"> | ||
| 14 | <div class="tabs"> | ||
| 15 | <ul> | ||
| 16 | <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advlink_dlg.general_tab}</a></span></li> | ||
| 17 | <li id="popup_tab"><span><a href="javascript:mcTabs.displayTab('popup_tab','popup_panel');" onmousedown="return false;">{#advlink_dlg.popup_tab}</a></span></li> | ||
| 18 | <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#advlink_dlg.events_tab}</a></span></li> | ||
| 19 | <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advlink_dlg.advanced_tab}</a></span></li> | ||
| 20 | </ul> | ||
| 21 | </div> | ||
| 22 | |||
| 23 | <div class="panel_wrapper"> | ||
| 24 | <div id="general_panel" class="panel current"> | ||
| 25 | <fieldset> | ||
| 26 | <legend>{#advlink_dlg.general_props}</legend> | ||
| 27 | |||
| 28 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 29 | <tr> | ||
| 30 | <td class="nowrap"><label id="hreflabel" for="href">{#advlink_dlg.url}</label></td> | ||
| 31 | <td><table border="0" cellspacing="0" cellpadding="0"> | ||
| 32 | <tr> | ||
| 33 | <td><input id="href" name="href" type="text" class="mceFocus" value="" onchange="selectByValue(this.form,'linklisthref',this.value);" /></td> | ||
| 34 | <td id="hrefbrowsercontainer"> </td> | ||
| 35 | </tr> | ||
| 36 | </table></td> | ||
| 37 | </tr> | ||
| 38 | <tr id="linklisthrefrow"> | ||
| 39 | <td class="column1"><label for="linklisthref">{#advlink_dlg.list}</label></td> | ||
| 40 | <td colspan="2" id="linklisthrefcontainer"><select id="linklisthref"><option value=""></option></select></td> | ||
| 41 | </tr> | ||
| 42 | <tr> | ||
| 43 | <td class="column1"><label for="anchorlist">{#advlink_dlg.anchor_names}</label></td> | ||
| 44 | <td colspan="2" id="anchorlistcontainer"><select id="anchorlist"><option value=""></option></select></td> | ||
| 45 | </tr> | ||
| 46 | <tr> | ||
| 47 | <td><label id="targetlistlabel" for="targetlist">{#advlink_dlg.target}</label></td> | ||
| 48 | <td id="targetlistcontainer"><select id="targetlist"><option value=""></option></select></td> | ||
| 49 | </tr> | ||
| 50 | <tr> | ||
| 51 | <td class="nowrap"><label id="titlelabel" for="title">{#advlink_dlg.titlefield}</label></td> | ||
| 52 | <td><input id="title" name="title" type="text" value="" /></td> | ||
| 53 | </tr> | ||
| 54 | <tr> | ||
| 55 | <td><label id="classlabel" for="classlist">{#class_name}</label></td> | ||
| 56 | <td> | ||
| 57 | <select id="classlist" name="classlist" onchange="changeClass();"> | ||
| 58 | <option value="" selected="selected">{#not_set}</option> | ||
| 59 | </select> | ||
| 60 | </td> | ||
| 61 | </tr> | ||
| 62 | </table> | ||
| 63 | </fieldset> | ||
| 64 | </div> | ||
| 65 | |||
| 66 | <div id="popup_panel" class="panel"> | ||
| 67 | <fieldset> | ||
| 68 | <legend>{#advlink_dlg.popup_props}</legend> | ||
| 69 | |||
| 70 | <input type="checkbox" id="ispopup" name="ispopup" class="radio" onclick="setPopupControlsDisabled(!this.checked);buildOnClick();" /> | ||
| 71 | <label id="ispopuplabel" for="ispopup">{#advlink_dlg.popup}</label> | ||
| 72 | |||
| 73 | <table border="0" cellpadding="0" cellspacing="4"> | ||
| 74 | <tr> | ||
| 75 | <td class="nowrap"><label for="popupurl">{#advlink_dlg.popup_url}</label> </td> | ||
| 76 | <td> | ||
| 77 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 78 | <tr> | ||
| 79 | <td><input type="text" name="popupurl" id="popupurl" value="" onchange="buildOnClick();" /></td> | ||
| 80 | <td id="popupurlbrowsercontainer"> </td> | ||
| 81 | </tr> | ||
| 82 | </table> | ||
| 83 | </td> | ||
| 84 | </tr> | ||
| 85 | <tr> | ||
| 86 | <td class="nowrap"><label for="popupname">{#advlink_dlg.popup_name}</label> </td> | ||
| 87 | <td><input type="text" name="popupname" id="popupname" value="" onchange="buildOnClick();" /></td> | ||
| 88 | </tr> | ||
| 89 | <tr> | ||
| 90 | <td class="nowrap"><label>{#advlink_dlg.popup_size}</label> </td> | ||
| 91 | <td class="nowrap"> | ||
| 92 | <input type="text" id="popupwidth" name="popupwidth" value="" onchange="buildOnClick();" /> x | ||
| 93 | <input type="text" id="popupheight" name="popupheight" value="" onchange="buildOnClick();" /> px | ||
| 94 | </td> | ||
| 95 | </tr> | ||
| 96 | <tr> | ||
| 97 | <td class="nowrap" id="labelleft"><label>{#advlink_dlg.popup_position}</label> </td> | ||
| 98 | <td class="nowrap"> | ||
| 99 | <input type="text" id="popupleft" name="popupleft" value="" onchange="buildOnClick();" /> / | ||
| 100 | <input type="text" id="popuptop" name="popuptop" value="" onchange="buildOnClick();" /> (c /c = center) | ||
| 101 | </td> | ||
| 102 | </tr> | ||
| 103 | </table> | ||
| 104 | |||
| 105 | <fieldset> | ||
| 106 | <legend>{#advlink_dlg.popup_opts}</legend> | ||
| 107 | |||
| 108 | <table border="0" cellpadding="0" cellspacing="4"> | ||
| 109 | <tr> | ||
| 110 | <td><input type="checkbox" id="popuplocation" name="popuplocation" class="checkbox" onchange="buildOnClick();" /></td> | ||
| 111 | <td class="nowrap"><label id="popuplocationlabel" for="popuplocation">{#advlink_dlg.popup_location}</label></td> | ||
| 112 | <td><input type="checkbox" id="popupscrollbars" name="popupscrollbars" class="checkbox" onchange="buildOnClick();" /></td> | ||
| 113 | <td class="nowrap"><label id="popupscrollbarslabel" for="popupscrollbars">{#advlink_dlg.popup_scrollbars}</label></td> | ||
| 114 | </tr> | ||
| 115 | <tr> | ||
| 116 | <td><input type="checkbox" id="popupmenubar" name="popupmenubar" class="checkbox" onchange="buildOnClick();" /></td> | ||
| 117 | <td class="nowrap"><label id="popupmenubarlabel" for="popupmenubar">{#advlink_dlg.popup_menubar}</label></td> | ||
| 118 | <td><input type="checkbox" id="popupresizable" name="popupresizable" class="checkbox" onchange="buildOnClick();" /></td> | ||
| 119 | <td class="nowrap"><label id="popupresizablelabel" for="popupresizable">{#advlink_dlg.popup_resizable}</label></td> | ||
| 120 | </tr> | ||
| 121 | <tr> | ||
| 122 | <td><input type="checkbox" id="popuptoolbar" name="popuptoolbar" class="checkbox" onchange="buildOnClick();" /></td> | ||
| 123 | <td class="nowrap"><label id="popuptoolbarlabel" for="popuptoolbar">{#advlink_dlg.popup_toolbar}</label></td> | ||
| 124 | <td><input type="checkbox" id="popupdependent" name="popupdependent" class="checkbox" onchange="buildOnClick();" /></td> | ||
| 125 | <td class="nowrap"><label id="popupdependentlabel" for="popupdependent">{#advlink_dlg.popup_dependent}</label></td> | ||
| 126 | </tr> | ||
| 127 | <tr> | ||
| 128 | <td><input type="checkbox" id="popupstatus" name="popupstatus" class="checkbox" onchange="buildOnClick();" /></td> | ||
| 129 | <td class="nowrap"><label id="popupstatuslabel" for="popupstatus">{#advlink_dlg.popup_statusbar}</label></td> | ||
| 130 | <td><input type="checkbox" id="popupreturn" name="popupreturn" class="checkbox" onchange="buildOnClick();" checked="checked" /></td> | ||
| 131 | <td class="nowrap"><label id="popupreturnlabel" for="popupreturn">{#advlink_dlg.popup_return}</label></td> | ||
| 132 | </tr> | ||
| 133 | </table> | ||
| 134 | </fieldset> | ||
| 135 | </fieldset> | ||
| 136 | </div> | ||
| 137 | |||
| 138 | <div id="advanced_panel" class="panel"> | ||
| 139 | <fieldset> | ||
| 140 | <legend>{#advlink_dlg.advanced_props}</legend> | ||
| 141 | |||
| 142 | <table border="0" cellpadding="0" cellspacing="4"> | ||
| 143 | <tr> | ||
| 144 | <td class="column1"><label id="idlabel" for="id">{#advlink_dlg.id}</label></td> | ||
| 145 | <td><input id="id" name="id" type="text" value="" /></td> | ||
| 146 | </tr> | ||
| 147 | |||
| 148 | <tr> | ||
| 149 | <td><label id="stylelabel" for="style">{#advlink_dlg.style}</label></td> | ||
| 150 | <td><input type="text" id="style" name="style" value="" /></td> | ||
| 151 | </tr> | ||
| 152 | |||
| 153 | <tr> | ||
| 154 | <td><label id="classeslabel" for="classes">{#advlink_dlg.classes}</label></td> | ||
| 155 | <td><input type="text" id="classes" name="classes" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td> | ||
| 156 | </tr> | ||
| 157 | |||
| 158 | <tr> | ||
| 159 | <td><label id="targetlabel" for="target">{#advlink_dlg.target_name}</label></td> | ||
| 160 | <td><input type="text" id="target" name="target" value="" onchange="selectByValue(this.form,'targetlist',this.value,true);" /></td> | ||
| 161 | </tr> | ||
| 162 | |||
| 163 | <tr> | ||
| 164 | <td class="column1"><label id="dirlabel" for="dir">{#advlink_dlg.langdir}</label></td> | ||
| 165 | <td> | ||
| 166 | <select id="dir" name="dir"> | ||
| 167 | <option value="">{#not_set}</option> | ||
| 168 | <option value="ltr">{#advlink_dlg.ltr}</option> | ||
| 169 | <option value="rtl">{#advlink_dlg.rtl}</option> | ||
| 170 | </select> | ||
| 171 | </td> | ||
| 172 | </tr> | ||
| 173 | |||
| 174 | <tr> | ||
| 175 | <td><label id="hreflanglabel" for="hreflang">{#advlink_dlg.target_langcode}</label></td> | ||
| 176 | <td><input type="text" id="hreflang" name="hreflang" value="" /></td> | ||
| 177 | </tr> | ||
| 178 | |||
| 179 | <tr> | ||
| 180 | <td class="column1"><label id="langlabel" for="lang">{#advlink_dlg.langcode}</label></td> | ||
| 181 | <td> | ||
| 182 | <input id="lang" name="lang" type="text" value="" /> | ||
| 183 | </td> | ||
| 184 | </tr> | ||
| 185 | |||
| 186 | <tr> | ||
| 187 | <td><label id="charsetlabel" for="charset">{#advlink_dlg.encoding}</label></td> | ||
| 188 | <td><input type="text" id="charset" name="charset" value="" /></td> | ||
| 189 | </tr> | ||
| 190 | |||
| 191 | <tr> | ||
| 192 | <td><label id="typelabel" for="type">{#advlink_dlg.mime}</label></td> | ||
| 193 | <td><input type="text" id="type" name="type" value="" /></td> | ||
| 194 | </tr> | ||
| 195 | |||
| 196 | <tr> | ||
| 197 | <td><label id="rellabel" for="rel">{#advlink_dlg.rel}</label></td> | ||
| 198 | <td><select id="rel" name="rel"> | ||
| 199 | <option value="">{#not_set}</option> | ||
| 200 | <option value="lightbox">Lightbox</option> | ||
| 201 | <option value="alternate">Alternate</option> | ||
| 202 | <option value="designates">Designates</option> | ||
| 203 | <option value="stylesheet">Stylesheet</option> | ||
| 204 | <option value="start">Start</option> | ||
| 205 | <option value="next">Next</option> | ||
| 206 | <option value="prev">Prev</option> | ||
| 207 | <option value="contents">Contents</option> | ||
| 208 | <option value="index">Index</option> | ||
| 209 | <option value="glossary">Glossary</option> | ||
| 210 | <option value="copyright">Copyright</option> | ||
| 211 | <option value="chapter">Chapter</option> | ||
| 212 | <option value="subsection">Subsection</option> | ||
| 213 | <option value="appendix">Appendix</option> | ||
| 214 | <option value="help">Help</option> | ||
| 215 | <option value="bookmark">Bookmark</option> | ||
| 216 | <option value="nofollow">No Follow</option> | ||
| 217 | <option value="tag">Tag</option> | ||
| 218 | </select> | ||
| 219 | </td> | ||
| 220 | </tr> | ||
| 221 | |||
| 222 | <tr> | ||
| 223 | <td><label id="revlabel" for="rev">{#advlink_dlg.rev}</label></td> | ||
| 224 | <td><select id="rev" name="rev"> | ||
| 225 | <option value="">{#not_set}</option> | ||
| 226 | <option value="alternate">Alternate</option> | ||
| 227 | <option value="designates">Designates</option> | ||
| 228 | <option value="stylesheet">Stylesheet</option> | ||
| 229 | <option value="start">Start</option> | ||
| 230 | <option value="next">Next</option> | ||
| 231 | <option value="prev">Prev</option> | ||
| 232 | <option value="contents">Contents</option> | ||
| 233 | <option value="index">Index</option> | ||
| 234 | <option value="glossary">Glossary</option> | ||
| 235 | <option value="copyright">Copyright</option> | ||
| 236 | <option value="chapter">Chapter</option> | ||
| 237 | <option value="subsection">Subsection</option> | ||
| 238 | <option value="appendix">Appendix</option> | ||
| 239 | <option value="help">Help</option> | ||
| 240 | <option value="bookmark">Bookmark</option> | ||
| 241 | </select> | ||
| 242 | </td> | ||
| 243 | </tr> | ||
| 244 | |||
| 245 | <tr> | ||
| 246 | <td><label id="tabindexlabel" for="tabindex">{#advlink_dlg.tabindex}</label></td> | ||
| 247 | <td><input type="text" id="tabindex" name="tabindex" value="" /></td> | ||
| 248 | </tr> | ||
| 249 | |||
| 250 | <tr> | ||
| 251 | <td><label id="accesskeylabel" for="accesskey">{#advlink_dlg.accesskey}</label></td> | ||
| 252 | <td><input type="text" id="accesskey" name="accesskey" value="" /></td> | ||
| 253 | </tr> | ||
| 254 | </table> | ||
| 255 | </fieldset> | ||
| 256 | </div> | ||
| 257 | |||
| 258 | <div id="events_panel" class="panel"> | ||
| 259 | <fieldset> | ||
| 260 | <legend>{#advlink_dlg.event_props}</legend> | ||
| 261 | |||
| 262 | <table border="0" cellpadding="0" cellspacing="4"> | ||
| 263 | <tr> | ||
| 264 | <td class="column1"><label for="onfocus">onfocus</label></td> | ||
| 265 | <td><input id="onfocus" name="onfocus" type="text" value="" /></td> | ||
| 266 | </tr> | ||
| 267 | |||
| 268 | <tr> | ||
| 269 | <td class="column1"><label for="onblur">onblur</label></td> | ||
| 270 | <td><input id="onblur" name="onblur" type="text" value="" /></td> | ||
| 271 | </tr> | ||
| 272 | |||
| 273 | <tr> | ||
| 274 | <td class="column1"><label for="onclick">onclick</label></td> | ||
| 275 | <td><input id="onclick" name="onclick" type="text" value="" /></td> | ||
| 276 | </tr> | ||
| 277 | |||
| 278 | <tr> | ||
| 279 | <td class="column1"><label for="ondblclick">ondblclick</label></td> | ||
| 280 | <td><input id="ondblclick" name="ondblclick" type="text" value="" /></td> | ||
| 281 | </tr> | ||
| 282 | |||
| 283 | <tr> | ||
| 284 | <td class="column1"><label for="onmousedown">onmousedown</label></td> | ||
| 285 | <td><input id="onmousedown" name="onmousedown" type="text" value="" /></td> | ||
| 286 | </tr> | ||
| 287 | |||
| 288 | <tr> | ||
| 289 | <td class="column1"><label for="onmouseup">onmouseup</label></td> | ||
| 290 | <td><input id="onmouseup" name="onmouseup" type="text" value="" /></td> | ||
| 291 | </tr> | ||
| 292 | |||
| 293 | <tr> | ||
| 294 | <td class="column1"><label for="onmouseover">onmouseover</label></td> | ||
| 295 | <td><input id="onmouseover" name="onmouseover" type="text" value="" /></td> | ||
| 296 | </tr> | ||
| 297 | |||
| 298 | <tr> | ||
| 299 | <td class="column1"><label for="onmousemove">onmousemove</label></td> | ||
| 300 | <td><input id="onmousemove" name="onmousemove" type="text" value="" /></td> | ||
| 301 | </tr> | ||
| 302 | |||
| 303 | <tr> | ||
| 304 | <td class="column1"><label for="onmouseout">onmouseout</label></td> | ||
| 305 | <td><input id="onmouseout" name="onmouseout" type="text" value="" /></td> | ||
| 306 | </tr> | ||
| 307 | |||
| 308 | <tr> | ||
| 309 | <td class="column1"><label for="onkeypress">onkeypress</label></td> | ||
| 310 | <td><input id="onkeypress" name="onkeypress" type="text" value="" /></td> | ||
| 311 | </tr> | ||
| 312 | |||
| 313 | <tr> | ||
| 314 | <td class="column1"><label for="onkeydown">onkeydown</label></td> | ||
| 315 | <td><input id="onkeydown" name="onkeydown" type="text" value="" /></td> | ||
| 316 | </tr> | ||
| 317 | |||
| 318 | <tr> | ||
| 319 | <td class="column1"><label for="onkeyup">onkeyup</label></td> | ||
| 320 | <td><input id="onkeyup" name="onkeyup" type="text" value="" /></td> | ||
| 321 | </tr> | ||
| 322 | </table> | ||
| 323 | </fieldset> | ||
| 324 | </div> | ||
| 325 | </div> | ||
| 326 | |||
| 327 | <div class="mceActionPanel"> | ||
| 328 | <div style="float: left"> | ||
| 329 | <input type="submit" id="insert" name="insert" value="{#insert}" /> | ||
| 330 | </div> | ||
| 331 | |||
| 332 | <div style="float: right"> | ||
| 333 | <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" /> | ||
| 334 | </div> | ||
| 335 | </div> | ||
| 336 | </form> | ||
| 337 | </body> | ||
| 338 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/autoresize/editor_plugin.js b/public/javascripts/tiny_mce/plugins/autoresize/editor_plugin.js deleted file mode 100644 index 220b84a..0000000 --- a/public/javascripts/tiny_mce/plugins/autoresize/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.AutoResizePlugin",{init:function(a,c){var d=this;if(a.getParam("fullscreen_is_enabled")){return}function b(){var h=a.getDoc(),e=h.body,j=h.documentElement,g=tinymce.DOM,i=d.autoresize_min_height,f;f=tinymce.isIE?e.scrollHeight:j.offsetHeight;if(f>d.autoresize_min_height){i=f}g.setStyle(g.get(a.id+"_ifr"),"height",i+"px");if(d.throbbing){a.setProgressState(false);a.setProgressState(true)}}d.editor=a;d.autoresize_min_height=a.getElement().offsetHeight;a.onInit.add(function(f,e){f.setProgressState(true);d.throbbing=true;f.getBody().style.overflowY="hidden"});a.onChange.add(b);a.onSetContent.add(b);a.onPaste.add(b);a.onKeyUp.add(b);a.onPostRender.add(b);a.onLoadContent.add(function(f,e){b();setTimeout(function(){b();f.setProgressState(false);d.throbbing=false},1250)});a.addCommand("mceAutoResize",b)},getInfo:function(){return{longname:"Auto Resize",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autoresize",tinymce.plugins.AutoResizePlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/autoresize/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/autoresize/editor_plugin_src.js deleted file mode 100644 index 8b2f374..0000000 --- a/public/javascripts/tiny_mce/plugins/autoresize/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,114 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 539 2008-01-14 19:08:58Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | /** | ||
| 10 | * Auto Resize | ||
| 11 | * | ||
| 12 | * This plugin automatically resizes the content area to fit its content height. | ||
| 13 | * It will retain a minimum height, which is the height of the content area when | ||
| 14 | * it's initialized. | ||
| 15 | */ | ||
| 16 | tinymce.create('tinymce.plugins.AutoResizePlugin', { | ||
| 17 | /** | ||
| 18 | * Initializes the plugin, this will be executed after the plugin has been created. | ||
| 19 | * This call is done before the editor instance has finished it's initialization so use the onInit event | ||
| 20 | * of the editor instance to intercept that event. | ||
| 21 | * | ||
| 22 | * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. | ||
| 23 | * @param {string} url Absolute URL to where the plugin is located. | ||
| 24 | */ | ||
| 25 | init : function(ed, url) { | ||
| 26 | var t = this; | ||
| 27 | |||
| 28 | if (ed.getParam('fullscreen_is_enabled')) | ||
| 29 | return; | ||
| 30 | |||
| 31 | /** | ||
| 32 | * This method gets executed each time the editor needs to resize. | ||
| 33 | */ | ||
| 34 | function resize() { | ||
| 35 | var d = ed.getDoc(), b = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight; | ||
| 36 | |||
| 37 | // Get height differently depending on the browser used | ||
| 38 | myHeight = tinymce.isIE ? b.scrollHeight : de.offsetHeight; | ||
| 39 | |||
| 40 | // Don't make it smaller than the minimum height | ||
| 41 | if (myHeight > t.autoresize_min_height) | ||
| 42 | resizeHeight = myHeight; | ||
| 43 | |||
| 44 | // Resize content element | ||
| 45 | DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px'); | ||
| 46 | |||
| 47 | // if we're throbbing, we'll re-throb to match the new size | ||
| 48 | if (t.throbbing) { | ||
| 49 | ed.setProgressState(false); | ||
| 50 | ed.setProgressState(true); | ||
| 51 | } | ||
| 52 | }; | ||
| 53 | |||
| 54 | t.editor = ed; | ||
| 55 | |||
| 56 | // Define minimum height | ||
| 57 | t.autoresize_min_height = ed.getElement().offsetHeight; | ||
| 58 | |||
| 59 | // Things to do when the editor is ready | ||
| 60 | ed.onInit.add(function(ed, l) { | ||
| 61 | // Show throbber until content area is resized properly | ||
| 62 | ed.setProgressState(true); | ||
| 63 | t.throbbing = true; | ||
| 64 | |||
| 65 | // Hide scrollbars | ||
| 66 | ed.getBody().style.overflowY = "hidden"; | ||
| 67 | }); | ||
| 68 | |||
| 69 | // Add appropriate listeners for resizing content area | ||
| 70 | ed.onChange.add(resize); | ||
| 71 | ed.onSetContent.add(resize); | ||
| 72 | ed.onPaste.add(resize); | ||
| 73 | ed.onKeyUp.add(resize); | ||
| 74 | ed.onPostRender.add(resize); | ||
| 75 | |||
| 76 | ed.onLoadContent.add(function(ed, l) { | ||
| 77 | resize(); | ||
| 78 | |||
| 79 | // Because the content area resizes when its content CSS loads, | ||
| 80 | // and we can't easily add a listener to its onload event, | ||
| 81 | // we'll just trigger a resize after a short loading period | ||
| 82 | setTimeout(function() { | ||
| 83 | resize(); | ||
| 84 | |||
| 85 | // Disable throbber | ||
| 86 | ed.setProgressState(false); | ||
| 87 | t.throbbing = false; | ||
| 88 | }, 1250); | ||
| 89 | }); | ||
| 90 | |||
| 91 | // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample'); | ||
| 92 | ed.addCommand('mceAutoResize', resize); | ||
| 93 | }, | ||
| 94 | |||
| 95 | /** | ||
| 96 | * Returns information about the plugin as a name/value array. | ||
| 97 | * The current keys are longname, author, authorurl, infourl and version. | ||
| 98 | * | ||
| 99 | * @return {Object} Name/value array containing information about the plugin. | ||
| 100 | */ | ||
| 101 | getInfo : function() { | ||
| 102 | return { | ||
| 103 | longname : 'Auto Resize', | ||
| 104 | author : 'Moxiecode Systems AB', | ||
| 105 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 106 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize', | ||
| 107 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 108 | }; | ||
| 109 | } | ||
| 110 | }); | ||
| 111 | |||
| 112 | // Register plugin | ||
| 113 | tinymce.PluginManager.add('autoresize', tinymce.plugins.AutoResizePlugin); | ||
| 114 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/autosave/editor_plugin.js b/public/javascripts/tiny_mce/plugins/autosave/editor_plugin.js deleted file mode 100644 index 091a063..0000000 --- a/public/javascripts/tiny_mce/plugins/autosave/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.AutoSavePlugin",{init:function(a,b){var c=this;c.editor=a;window.onbeforeunload=tinymce.plugins.AutoSavePlugin._beforeUnloadHandler},getInfo:function(){return{longname:"Auto save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave",version:tinymce.majorVersion+"."+tinymce.minorVersion}},"static":{_beforeUnloadHandler:function(){var a;tinymce.each(tinyMCE.editors,function(b){if(b.getParam("fullscreen_is_enabled")){return}if(b.isDirty()){a=b.getLang("autosave.unload_msg");return false}});return a}}});tinymce.PluginManager.add("autosave",tinymce.plugins.AutoSavePlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js deleted file mode 100644 index 3c4325a..0000000 --- a/public/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,51 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.AutoSavePlugin', { | ||
| 10 | init : function(ed, url) { | ||
| 11 | var t = this; | ||
| 12 | |||
| 13 | t.editor = ed; | ||
| 14 | |||
| 15 | window.onbeforeunload = tinymce.plugins.AutoSavePlugin._beforeUnloadHandler; | ||
| 16 | }, | ||
| 17 | |||
| 18 | getInfo : function() { | ||
| 19 | return { | ||
| 20 | longname : 'Auto save', | ||
| 21 | author : 'Moxiecode Systems AB', | ||
| 22 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 23 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave', | ||
| 24 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 25 | }; | ||
| 26 | }, | ||
| 27 | |||
| 28 | // Private plugin internal methods | ||
| 29 | |||
| 30 | 'static' : { | ||
| 31 | _beforeUnloadHandler : function() { | ||
| 32 | var msg; | ||
| 33 | |||
| 34 | tinymce.each(tinyMCE.editors, function(ed) { | ||
| 35 | if (ed.getParam("fullscreen_is_enabled")) | ||
| 36 | return; | ||
| 37 | |||
| 38 | if (ed.isDirty()) { | ||
| 39 | msg = ed.getLang("autosave.unload_msg"); | ||
| 40 | return false; | ||
| 41 | } | ||
| 42 | }); | ||
| 43 | |||
| 44 | return msg; | ||
| 45 | } | ||
| 46 | } | ||
| 47 | }); | ||
| 48 | |||
| 49 | // Register plugin | ||
| 50 | tinymce.PluginManager.add('autosave', tinymce.plugins.AutoSavePlugin); | ||
| 51 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/bbcode/editor_plugin.js b/public/javascripts/tiny_mce/plugins/bbcode/editor_plugin.js deleted file mode 100644 index 930fdff..0000000 --- a/public/javascripts/tiny_mce/plugins/bbcode/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a,b){var d=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.onBeforeSetContent.add(function(e,f){f.content=d["_"+c+"_bbcode2html"](f.content)});a.onPostProcess.add(function(e,f){if(f.set){f.content=d["_"+c+"_bbcode2html"](f.content)}if(f.get){f.content=d["_"+c+"_html2bbcode"](f.content)}})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_punbb_html2bbcode:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]");b(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]");b(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]");b(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");b(/<font>(.*?)<\/font>/gi,"$1");b(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");b(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]");b(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]");b(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");b(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");b(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");b(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");b(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");b(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");b(/<\/(strong|b)>/gi,"[/b]");b(/<(strong|b)>/gi,"[b]");b(/<\/(em|i)>/gi,"[/i]");b(/<(em|i)>/gi,"[i]");b(/<\/u>/gi,"[/u]");b(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]");b(/<u>/gi,"[u]");b(/<blockquote[^>]*>/gi,"[quote]");b(/<\/blockquote>/gi,"[/quote]");b(/<br \/>/gi,"\n");b(/<br\/>/gi,"\n");b(/<br>/gi,"\n");b(/<p>/gi,"");b(/<\/p>/gi,"\n");b(/ /gi," ");b(/"/gi,'"');b(/</gi,"<");b(/>/gi,">");b(/&/gi,"&");return a},_punbb_bbcode2html:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/\n/gi,"<br />");b(/\[b\]/gi,"<strong>");b(/\[\/b\]/gi,"</strong>");b(/\[i\]/gi,"<em>");b(/\[\/i\]/gi,"</em>");b(/\[u\]/gi,"<u>");b(/\[\/u\]/gi,"</u>");b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>');b(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>');b(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />');b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>');b(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span> ');b(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span> ');return a}});tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/bbcode/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/bbcode/editor_plugin_src.js deleted file mode 100644 index 1d7493e..0000000 --- a/public/javascripts/tiny_mce/plugins/bbcode/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,117 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.BBCodePlugin', { | ||
| 10 | init : function(ed, url) { | ||
| 11 | var t = this, dialect = ed.getParam('bbcode_dialect', 'punbb').toLowerCase(); | ||
| 12 | |||
| 13 | ed.onBeforeSetContent.add(function(ed, o) { | ||
| 14 | o.content = t['_' + dialect + '_bbcode2html'](o.content); | ||
| 15 | }); | ||
| 16 | |||
| 17 | ed.onPostProcess.add(function(ed, o) { | ||
| 18 | if (o.set) | ||
| 19 | o.content = t['_' + dialect + '_bbcode2html'](o.content); | ||
| 20 | |||
| 21 | if (o.get) | ||
| 22 | o.content = t['_' + dialect + '_html2bbcode'](o.content); | ||
| 23 | }); | ||
| 24 | }, | ||
| 25 | |||
| 26 | getInfo : function() { | ||
| 27 | return { | ||
| 28 | longname : 'BBCode Plugin', | ||
| 29 | author : 'Moxiecode Systems AB', | ||
| 30 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 31 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode', | ||
| 32 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 33 | }; | ||
| 34 | }, | ||
| 35 | |||
| 36 | // Private methods | ||
| 37 | |||
| 38 | // HTML -> BBCode in PunBB dialect | ||
| 39 | _punbb_html2bbcode : function(s) { | ||
| 40 | s = tinymce.trim(s); | ||
| 41 | |||
| 42 | function rep(re, str) { | ||
| 43 | s = s.replace(re, str); | ||
| 44 | }; | ||
| 45 | |||
| 46 | // example: <strong> to [b] | ||
| 47 | rep(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"); | ||
| 48 | rep(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"); | ||
| 49 | rep(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"); | ||
| 50 | rep(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"); | ||
| 51 | rep(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"); | ||
| 52 | rep(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"); | ||
| 53 | rep(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"); | ||
| 54 | rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"); | ||
| 55 | rep(/<font>(.*?)<\/font>/gi,"$1"); | ||
| 56 | rep(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"); | ||
| 57 | rep(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"); | ||
| 58 | rep(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"); | ||
| 59 | rep(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"); | ||
| 60 | rep(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"); | ||
| 61 | rep(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"); | ||
| 62 | rep(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"); | ||
| 63 | rep(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"); | ||
| 64 | rep(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"); | ||
| 65 | rep(/<\/(strong|b)>/gi,"[/b]"); | ||
| 66 | rep(/<(strong|b)>/gi,"[b]"); | ||
| 67 | rep(/<\/(em|i)>/gi,"[/i]"); | ||
| 68 | rep(/<(em|i)>/gi,"[i]"); | ||
| 69 | rep(/<\/u>/gi,"[/u]"); | ||
| 70 | rep(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"); | ||
| 71 | rep(/<u>/gi,"[u]"); | ||
| 72 | rep(/<blockquote[^>]*>/gi,"[quote]"); | ||
| 73 | rep(/<\/blockquote>/gi,"[/quote]"); | ||
| 74 | rep(/<br \/>/gi,"\n"); | ||
| 75 | rep(/<br\/>/gi,"\n"); | ||
| 76 | rep(/<br>/gi,"\n"); | ||
| 77 | rep(/<p>/gi,""); | ||
| 78 | rep(/<\/p>/gi,"\n"); | ||
| 79 | rep(/ /gi," "); | ||
| 80 | rep(/"/gi,"\""); | ||
| 81 | rep(/</gi,"<"); | ||
| 82 | rep(/>/gi,">"); | ||
| 83 | rep(/&/gi,"&"); | ||
| 84 | |||
| 85 | return s; | ||
| 86 | }, | ||
| 87 | |||
| 88 | // BBCode -> HTML from PunBB dialect | ||
| 89 | _punbb_bbcode2html : function(s) { | ||
| 90 | s = tinymce.trim(s); | ||
| 91 | |||
| 92 | function rep(re, str) { | ||
| 93 | s = s.replace(re, str); | ||
| 94 | }; | ||
| 95 | |||
| 96 | // example: [b] to <strong> | ||
| 97 | rep(/\n/gi,"<br />"); | ||
| 98 | rep(/\[b\]/gi,"<strong>"); | ||
| 99 | rep(/\[\/b\]/gi,"</strong>"); | ||
| 100 | rep(/\[i\]/gi,"<em>"); | ||
| 101 | rep(/\[\/i\]/gi,"</em>"); | ||
| 102 | rep(/\[u\]/gi,"<u>"); | ||
| 103 | rep(/\[\/u\]/gi,"</u>"); | ||
| 104 | rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"<a href=\"$1\">$2</a>"); | ||
| 105 | rep(/\[url\](.*?)\[\/url\]/gi,"<a href=\"$1\">$1</a>"); | ||
| 106 | rep(/\[img\](.*?)\[\/img\]/gi,"<img src=\"$1\" />"); | ||
| 107 | rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"<font color=\"$1\">$2</font>"); | ||
| 108 | rep(/\[code\](.*?)\[\/code\]/gi,"<span class=\"codeStyle\">$1</span> "); | ||
| 109 | rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"<span class=\"quoteStyle\">$1</span> "); | ||
| 110 | |||
| 111 | return s; | ||
| 112 | } | ||
| 113 | }); | ||
| 114 | |||
| 115 | // Register plugin | ||
| 116 | tinymce.PluginManager.add('bbcode', tinymce.plugins.BBCodePlugin); | ||
| 117 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js b/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js deleted file mode 100644 index 24ee2eb..0000000 --- a/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(d){var f=this;f.editor=d;f.onContextMenu=new tinymce.util.Dispatcher(this);d.onContextMenu.add(function(g,h){if(!h.ctrlKey){f._getMenu(g).showMenu(h.clientX,h.clientY);a.add(g.getDoc(),"click",e);a.cancel(h)}});function e(){if(f._menu){f._menu.removeAll();f._menu.destroy();a.remove(d.getDoc(),"click",e)}}d.onMouseDown.add(e);d.onKeyDown.add(e)},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(h){var l=this,f=l._menu,i=h.selection,e=i.isCollapsed(),d=i.getNode()||h.getBody(),g,k,j;if(f){f.removeAll();f.destroy()}k=b.getPos(h.getContentAreaContainer());j=b.getPos(h.getContainer());f=h.controlManager.createDropMenu("contextmenu",{offset_x:k.x+h.getParam("contextmenu_offset_x",0),offset_y:k.y+h.getParam("contextmenu_offset_y",0),constrain:1});l._menu=f;f.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(e);f.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(e);f.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});if((d.nodeName=="A"&&!h.dom.getAttrib(d,"name"))||!e){f.addSeparator();f.add({title:"advanced.link_desc",icon:"link",cmd:h.plugins.advlink?"mceAdvLink":"mceLink",ui:true});f.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})}f.addSeparator();f.add({title:"advanced.image_desc",icon:"image",cmd:h.plugins.advimage?"mceAdvImage":"mceImage",ui:true});f.addSeparator();g=f.addMenu({title:"contextmenu.align"});g.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});g.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});g.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});g.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});l.onContextMenu.dispatch(l,f,d,e);return f}});tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js deleted file mode 100644 index a2c1866..0000000 --- a/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,95 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 848 2008-05-15 11:54:40Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | var Event = tinymce.dom.Event, each = tinymce.each, DOM = tinymce.DOM; | ||
| 10 | |||
| 11 | tinymce.create('tinymce.plugins.ContextMenu', { | ||
| 12 | init : function(ed) { | ||
| 13 | var t = this; | ||
| 14 | |||
| 15 | t.editor = ed; | ||
| 16 | t.onContextMenu = new tinymce.util.Dispatcher(this); | ||
| 17 | |||
| 18 | ed.onContextMenu.add(function(ed, e) { | ||
| 19 | if (!e.ctrlKey) { | ||
| 20 | t._getMenu(ed).showMenu(e.clientX, e.clientY); | ||
| 21 | Event.add(ed.getDoc(), 'click', hide); | ||
| 22 | Event.cancel(e); | ||
| 23 | } | ||
| 24 | }); | ||
| 25 | |||
| 26 | function hide() { | ||
| 27 | if (t._menu) { | ||
| 28 | t._menu.removeAll(); | ||
| 29 | t._menu.destroy(); | ||
| 30 | Event.remove(ed.getDoc(), 'click', hide); | ||
| 31 | } | ||
| 32 | }; | ||
| 33 | |||
| 34 | ed.onMouseDown.add(hide); | ||
| 35 | ed.onKeyDown.add(hide); | ||
| 36 | }, | ||
| 37 | |||
| 38 | getInfo : function() { | ||
| 39 | return { | ||
| 40 | longname : 'Contextmenu', | ||
| 41 | author : 'Moxiecode Systems AB', | ||
| 42 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 43 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu', | ||
| 44 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 45 | }; | ||
| 46 | }, | ||
| 47 | |||
| 48 | _getMenu : function(ed) { | ||
| 49 | var t = this, m = t._menu, se = ed.selection, col = se.isCollapsed(), el = se.getNode() || ed.getBody(), am, p1, p2; | ||
| 50 | |||
| 51 | if (m) { | ||
| 52 | m.removeAll(); | ||
| 53 | m.destroy(); | ||
| 54 | } | ||
| 55 | |||
| 56 | p1 = DOM.getPos(ed.getContentAreaContainer()); | ||
| 57 | p2 = DOM.getPos(ed.getContainer()); | ||
| 58 | |||
| 59 | m = ed.controlManager.createDropMenu('contextmenu', { | ||
| 60 | offset_x : p1.x + ed.getParam('contextmenu_offset_x', 0), | ||
| 61 | offset_y : p1.y + ed.getParam('contextmenu_offset_y', 0), | ||
| 62 | constrain : 1 | ||
| 63 | }); | ||
| 64 | |||
| 65 | t._menu = m; | ||
| 66 | |||
| 67 | m.add({title : 'advanced.cut_desc', icon : 'cut', cmd : 'Cut'}).setDisabled(col); | ||
| 68 | m.add({title : 'advanced.copy_desc', icon : 'copy', cmd : 'Copy'}).setDisabled(col); | ||
| 69 | m.add({title : 'advanced.paste_desc', icon : 'paste', cmd : 'Paste'}); | ||
| 70 | |||
| 71 | if ((el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) || !col) { | ||
| 72 | m.addSeparator(); | ||
| 73 | m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true}); | ||
| 74 | m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'}); | ||
| 75 | } | ||
| 76 | |||
| 77 | m.addSeparator(); | ||
| 78 | m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true}); | ||
| 79 | |||
| 80 | m.addSeparator(); | ||
| 81 | am = m.addMenu({title : 'contextmenu.align'}); | ||
| 82 | am.add({title : 'contextmenu.left', icon : 'justifyleft', cmd : 'JustifyLeft'}); | ||
| 83 | am.add({title : 'contextmenu.center', icon : 'justifycenter', cmd : 'JustifyCenter'}); | ||
| 84 | am.add({title : 'contextmenu.right', icon : 'justifyright', cmd : 'JustifyRight'}); | ||
| 85 | am.add({title : 'contextmenu.full', icon : 'justifyfull', cmd : 'JustifyFull'}); | ||
| 86 | |||
| 87 | t.onContextMenu.dispatch(t, m, el, col); | ||
| 88 | |||
| 89 | return m; | ||
| 90 | } | ||
| 91 | }); | ||
| 92 | |||
| 93 | // Register plugin | ||
| 94 | tinymce.PluginManager.add('contextmenu', tinymce.plugins.ContextMenu); | ||
| 95 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/directionality/editor_plugin.js b/public/javascripts/tiny_mce/plugins/directionality/editor_plugin.js deleted file mode 100644 index bce8e73..0000000 --- a/public/javascripts/tiny_mce/plugins/directionality/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.Directionality",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceDirectionLTR",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="ltr"){a.dom.setAttrib(d,"dir","ltr")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addCommand("mceDirectionRTL",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="rtl"){a.dom.setAttrib(d,"dir","rtl")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addButton("ltr",{title:"directionality.ltr_desc",cmd:"mceDirectionLTR"});a.addButton("rtl",{title:"directionality.rtl_desc",cmd:"mceDirectionRTL"});a.onNodeChange.add(c._nodeChange,c)},getInfo:function(){return{longname:"Directionality",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var d=b.dom,c;e=d.getParent(e,d.isBlock);if(!e){a.setDisabled("ltr",1);a.setDisabled("rtl",1);return}c=d.getAttrib(e,"dir");a.setActive("ltr",c=="ltr");a.setDisabled("ltr",0);a.setActive("rtl",c=="rtl");a.setDisabled("rtl",0)}});tinymce.PluginManager.add("directionality",tinymce.plugins.Directionality)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/directionality/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/directionality/editor_plugin_src.js deleted file mode 100644 index 81818e3..0000000 --- a/public/javascripts/tiny_mce/plugins/directionality/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,79 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.Directionality', { | ||
| 10 | init : function(ed, url) { | ||
| 11 | var t = this; | ||
| 12 | |||
| 13 | t.editor = ed; | ||
| 14 | |||
| 15 | ed.addCommand('mceDirectionLTR', function() { | ||
| 16 | var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock); | ||
| 17 | |||
| 18 | if (e) { | ||
| 19 | if (ed.dom.getAttrib(e, "dir") != "ltr") | ||
| 20 | ed.dom.setAttrib(e, "dir", "ltr"); | ||
| 21 | else | ||
| 22 | ed.dom.setAttrib(e, "dir", ""); | ||
| 23 | } | ||
| 24 | |||
| 25 | ed.nodeChanged(); | ||
| 26 | }); | ||
| 27 | |||
| 28 | ed.addCommand('mceDirectionRTL', function() { | ||
| 29 | var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock); | ||
| 30 | |||
| 31 | if (e) { | ||
| 32 | if (ed.dom.getAttrib(e, "dir") != "rtl") | ||
| 33 | ed.dom.setAttrib(e, "dir", "rtl"); | ||
| 34 | else | ||
| 35 | ed.dom.setAttrib(e, "dir", ""); | ||
| 36 | } | ||
| 37 | |||
| 38 | ed.nodeChanged(); | ||
| 39 | }); | ||
| 40 | |||
| 41 | ed.addButton('ltr', {title : 'directionality.ltr_desc', cmd : 'mceDirectionLTR'}); | ||
| 42 | ed.addButton('rtl', {title : 'directionality.rtl_desc', cmd : 'mceDirectionRTL'}); | ||
| 43 | |||
| 44 | ed.onNodeChange.add(t._nodeChange, t); | ||
| 45 | }, | ||
| 46 | |||
| 47 | getInfo : function() { | ||
| 48 | return { | ||
| 49 | longname : 'Directionality', | ||
| 50 | author : 'Moxiecode Systems AB', | ||
| 51 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 52 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality', | ||
| 53 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 54 | }; | ||
| 55 | }, | ||
| 56 | |||
| 57 | // Private methods | ||
| 58 | |||
| 59 | _nodeChange : function(ed, cm, n) { | ||
| 60 | var dom = ed.dom, dir; | ||
| 61 | |||
| 62 | n = dom.getParent(n, dom.isBlock); | ||
| 63 | if (!n) { | ||
| 64 | cm.setDisabled('ltr', 1); | ||
| 65 | cm.setDisabled('rtl', 1); | ||
| 66 | return; | ||
| 67 | } | ||
| 68 | |||
| 69 | dir = dom.getAttrib(n, 'dir'); | ||
| 70 | cm.setActive('ltr', dir == "ltr"); | ||
| 71 | cm.setDisabled('ltr', 0); | ||
| 72 | cm.setActive('rtl', dir == "rtl"); | ||
| 73 | cm.setDisabled('rtl', 0); | ||
| 74 | } | ||
| 75 | }); | ||
| 76 | |||
| 77 | // Register plugin | ||
| 78 | tinymce.PluginManager.add('directionality', tinymce.plugins.Directionality); | ||
| 79 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/editor_plugin.js b/public/javascripts/tiny_mce/plugins/emotions/editor_plugin.js deleted file mode 100644 index 4783bc3..0000000 --- a/public/javascripts/tiny_mce/plugins/emotions/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.EmotionsPlugin",{init:function(a,b){a.addCommand("mceEmotion",function(){a.windowManager.open({file:b+"/emotions.htm",width:250+parseInt(a.getLang("emotions.delta_width",0)),height:160+parseInt(a.getLang("emotions.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("emotions",{title:"emotions.emotions_desc",cmd:"mceEmotion"})},getInfo:function(){return{longname:"Emotions",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("emotions",tinymce.plugins.EmotionsPlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/emotions/editor_plugin_src.js deleted file mode 100644 index df0d370..0000000 --- a/public/javascripts/tiny_mce/plugins/emotions/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.EmotionsPlugin', { | ||
| 10 | init : function(ed, url) { | ||
| 11 | // Register commands | ||
| 12 | ed.addCommand('mceEmotion', function() { | ||
| 13 | ed.windowManager.open({ | ||
| 14 | file : url + '/emotions.htm', | ||
| 15 | width : 250 + parseInt(ed.getLang('emotions.delta_width', 0)), | ||
| 16 | height : 160 + parseInt(ed.getLang('emotions.delta_height', 0)), | ||
| 17 | inline : 1 | ||
| 18 | }, { | ||
| 19 | plugin_url : url | ||
| 20 | }); | ||
| 21 | }); | ||
| 22 | |||
| 23 | // Register buttons | ||
| 24 | ed.addButton('emotions', {title : 'emotions.emotions_desc', cmd : 'mceEmotion'}); | ||
| 25 | }, | ||
| 26 | |||
| 27 | getInfo : function() { | ||
| 28 | return { | ||
| 29 | longname : 'Emotions', | ||
| 30 | author : 'Moxiecode Systems AB', | ||
| 31 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 32 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions', | ||
| 33 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 34 | }; | ||
| 35 | } | ||
| 36 | }); | ||
| 37 | |||
| 38 | // Register plugin | ||
| 39 | tinymce.PluginManager.add('emotions', tinymce.plugins.EmotionsPlugin); | ||
| 40 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/emotions.htm b/public/javascripts/tiny_mce/plugins/emotions/emotions.htm deleted file mode 100644 index 55a1d72..0000000 --- a/public/javascripts/tiny_mce/plugins/emotions/emotions.htm +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title>{#emotions_dlg.title}</title> | ||
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 6 | <script type="text/javascript" src="js/emotions.js"></script> | ||
| 7 | </head> | ||
| 8 | <body style="display: none"> | ||
| 9 | <div align="center"> | ||
| 10 | <div class="title">{#emotions_dlg.title}:<br /><br /></div> | ||
| 11 | |||
| 12 | <table border="0" cellspacing="0" cellpadding="4"> | ||
| 13 | <tr> | ||
| 14 | <td><a href="javascript:EmotionsDialog.insert('smiley-cool.gif','emotions_dlg.cool');"><img src="img/smiley-cool.gif" width="18" height="18" border="0" alt="{#emotions_dlg.cool}" title="{#emotions_dlg.cool}" /></a></td> | ||
| 15 | <td><a href="javascript:EmotionsDialog.insert('smiley-cry.gif','emotions_dlg.cry');"><img src="img/smiley-cry.gif" width="18" height="18" border="0" alt="{#emotions_dlg.cry}" title="{#emotions_dlg.cry}" /></a></td> | ||
| 16 | <td><a href="javascript:EmotionsDialog.insert('smiley-embarassed.gif','emotions_dlg.embarassed');"><img src="img/smiley-embarassed.gif" width="18" height="18" border="0" alt="{#emotions_dlg.embarassed}" title="{#emotions_dlg.embarassed}" /></a></td> | ||
| 17 | <td><a href="javascript:EmotionsDialog.insert('smiley-foot-in-mouth.gif','emotions_dlg.foot_in_mouth');"><img src="img/smiley-foot-in-mouth.gif" width="18" height="18" border="0" alt="{#emotions_dlg.foot_in_mouth}" title="{#emotions_dlg.foot_in_mouth}" /></a></td> | ||
| 18 | </tr> | ||
| 19 | <tr> | ||
| 20 | <td><a href="javascript:EmotionsDialog.insert('smiley-frown.gif','emotions_dlg.frown');"><img src="img/smiley-frown.gif" width="18" height="18" border="0" alt="{#emotions_dlg.frown}" title="{#emotions_dlg.frown}" /></a></td> | ||
| 21 | <td><a href="javascript:EmotionsDialog.insert('smiley-innocent.gif','emotions_dlg.innocent');"><img src="img/smiley-innocent.gif" width="18" height="18" border="0" alt="{#emotions_dlg.innocent}" title="{#emotions_dlg.innocent}" /></a></td> | ||
| 22 | <td><a href="javascript:EmotionsDialog.insert('smiley-kiss.gif','emotions_dlg.kiss');"><img src="img/smiley-kiss.gif" width="18" height="18" border="0" alt="{#emotions_dlg.kiss}" title="{#emotions_dlg.kiss}" /></a></td> | ||
| 23 | <td><a href="javascript:EmotionsDialog.insert('smiley-laughing.gif','emotions_dlg.laughing');"><img src="img/smiley-laughing.gif" width="18" height="18" border="0" alt="{#emotions_dlg.laughing}" title="{#emotions_dlg.laughing}" /></a></td> | ||
| 24 | </tr> | ||
| 25 | <tr> | ||
| 26 | <td><a href="javascript:EmotionsDialog.insert('smiley-money-mouth.gif','emotions_dlg.money_mouth');"><img src="img/smiley-money-mouth.gif" width="18" height="18" border="0" alt="{#emotions_dlg.money_mouth}" title="{#emotions_dlg.money_mouth}" /></a></td> | ||
| 27 | <td><a href="javascript:EmotionsDialog.insert('smiley-sealed.gif','emotions_dlg.sealed');"><img src="img/smiley-sealed.gif" width="18" height="18" border="0" alt="{#emotions_dlg.sealed}" title="{#emotions_dlg.sealed}" /></a></td> | ||
| 28 | <td><a href="javascript:EmotionsDialog.insert('smiley-smile.gif','emotions_dlg.smile');"><img src="img/smiley-smile.gif" width="18" height="18" border="0" alt="{#emotions_dlg.smile}" title="{#emotions_dlg.smile}" /></a></td> | ||
| 29 | <td><a href="javascript:EmotionsDialog.insert('smiley-surprised.gif','emotions_dlg.surprised');"><img src="img/smiley-surprised.gif" width="18" height="18" border="0" alt="{#emotions_dlg.surprised}" title="{#emotions_dlg.surprised}" /></a></td> | ||
| 30 | </tr> | ||
| 31 | <tr> | ||
| 32 | <td><a href="javascript:EmotionsDialog.insert('smiley-tongue-out.gif','emotions_dlg.tongue_out');"><img src="img/smiley-tongue-out.gif" width="18" height="18" border="0" alt="{#emotions_dlg.tongue-out}" title="{#emotions_dlg.tongue_out}" /></a></td> | ||
| 33 | <td><a href="javascript:EmotionsDialog.insert('smiley-undecided.gif','emotions_dlg.undecided');"><img src="img/smiley-undecided.gif" width="18" height="18" border="0" alt="{#emotions_dlg.undecided}" title="{#emotions_dlg.undecided}" /></a></td> | ||
| 34 | <td><a href="javascript:EmotionsDialog.insert('smiley-wink.gif','emotions_dlg.wink');"><img src="img/smiley-wink.gif" width="18" height="18" border="0" alt="{#emotions_dlg.wink}" title="{#emotions_dlg.wink}" /></a></td> | ||
| 35 | <td><a href="javascript:EmotionsDialog.insert('smiley-yell.gif','emotions_dlg.yell');"><img src="img/smiley-yell.gif" width="18" height="18" border="0" alt="{#emotions_dlg.yell}" title="{#emotions_dlg.yell}" /></a></td> | ||
| 36 | </tr> | ||
| 37 | </table> | ||
| 38 | </div> | ||
| 39 | </body> | ||
| 40 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif deleted file mode 100644 index ba90cc3..0000000 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cry.gif b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cry.gif deleted file mode 100644 index 74d897a..0000000 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cry.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif deleted file mode 100644 index 963a96b..0000000 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif deleted file mode 100644 index 16f68cc..0000000 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-frown.gif b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-frown.gif deleted file mode 100644 index 716f55e..0000000 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-frown.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif deleted file mode 100644 index 334d49e..0000000 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif deleted file mode 100644 index 4efd549..0000000 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif deleted file mode 100644 index 1606c11..0000000 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif deleted file mode 100644 index ca2451e..0000000 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif deleted file mode 100644 index b33d3cc..0000000 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-smile.gif b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-smile.gif deleted file mode 100644 index e6a9e60..0000000 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-smile.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif deleted file mode 100644 index cb99cdd..0000000 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif deleted file mode 100644 index 2075dc1..0000000 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif deleted file mode 100644 index bef7e25..0000000 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-wink.gif b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-wink.gif deleted file mode 100644 index 9faf1af..0000000 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-wink.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-yell.gif b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-yell.gif deleted file mode 100644 index 648e6e8..0000000 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-yell.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/js/emotions.js b/public/javascripts/tiny_mce/plugins/emotions/js/emotions.js deleted file mode 100644 index c549367..0000000 --- a/public/javascripts/tiny_mce/plugins/emotions/js/emotions.js +++ /dev/null | |||
| @@ -1,22 +0,0 @@ | |||
| 1 | tinyMCEPopup.requireLangPack(); | ||
| 2 | |||
| 3 | var EmotionsDialog = { | ||
| 4 | init : function(ed) { | ||
| 5 | tinyMCEPopup.resizeToInnerSize(); | ||
| 6 | }, | ||
| 7 | |||
| 8 | insert : function(file, title) { | ||
| 9 | var ed = tinyMCEPopup.editor, dom = ed.dom; | ||
| 10 | |||
| 11 | tinyMCEPopup.execCommand('mceInsertContent', false, dom.createHTML('img', { | ||
| 12 | src : tinyMCEPopup.getWindowArg('plugin_url') + '/img/' + file, | ||
| 13 | alt : ed.getLang(title), | ||
| 14 | title : ed.getLang(title), | ||
| 15 | border : 0 | ||
| 16 | })); | ||
| 17 | |||
| 18 | tinyMCEPopup.close(); | ||
| 19 | } | ||
| 20 | }; | ||
| 21 | |||
| 22 | tinyMCEPopup.onInit.add(EmotionsDialog.init, EmotionsDialog); | ||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js deleted file mode 100644 index 3b57ad9..0000000 --- a/public/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js +++ /dev/null | |||
| @@ -1,20 +0,0 @@ | |||
| 1 | tinyMCE.addI18n('en.emotions_dlg',{ | ||
| 2 | title:"Insert emotion", | ||
| 3 | desc:"Emotions", | ||
| 4 | cool:"Cool", | ||
| 5 | cry:"Cry", | ||
| 6 | embarassed:"Embarassed", | ||
| 7 | foot_in_mouth:"Foot in mouth", | ||
| 8 | frown:"Frown", | ||
| 9 | innocent:"Innocent", | ||
| 10 | kiss:"Kiss", | ||
| 11 | laughing:"Laughing", | ||
| 12 | money_mouth:"Money mouth", | ||
| 13 | sealed:"Sealed", | ||
| 14 | smile:"Smile", | ||
| 15 | surprised:"Surprised", | ||
| 16 | tongue_out:"Tongue out", | ||
| 17 | undecided:"Undecided", | ||
| 18 | wink:"Wink", | ||
| 19 | yell:"Yell" | ||
| 20 | }); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/example/dialog.htm b/public/javascripts/tiny_mce/plugins/example/dialog.htm deleted file mode 100644 index b4c6284..0000000 --- a/public/javascripts/tiny_mce/plugins/example/dialog.htm +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title>{#example_dlg.title}</title> | ||
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 6 | <script type="text/javascript" src="js/dialog.js"></script> | ||
| 7 | </head> | ||
| 8 | <body> | ||
| 9 | |||
| 10 | <form onsubmit="ExampleDialog.insert();return false;" action="#"> | ||
| 11 | <p>Here is a example dialog.</p> | ||
| 12 | <p>Selected text: <input id="someval" name="someval" type="text" class="text" /></p> | ||
| 13 | <p>Custom arg: <input id="somearg" name="somearg" type="text" class="text" /></p> | ||
| 14 | |||
| 15 | <div class="mceActionPanel"> | ||
| 16 | <div style="float: left"> | ||
| 17 | <input type="button" id="insert" name="insert" value="{#insert}" onclick="ExampleDialog.insert();" /> | ||
| 18 | </div> | ||
| 19 | |||
| 20 | <div style="float: right"> | ||
| 21 | <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" /> | ||
| 22 | </div> | ||
| 23 | </div> | ||
| 24 | </form> | ||
| 25 | |||
| 26 | </body> | ||
| 27 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/example/editor_plugin.js b/public/javascripts/tiny_mce/plugins/example/editor_plugin.js deleted file mode 100644 index ec1f81e..0000000 --- a/public/javascripts/tiny_mce/plugins/example/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.PluginManager.requireLangPack("example");tinymce.create("tinymce.plugins.ExamplePlugin",{init:function(a,b){a.addCommand("mceExample",function(){a.windowManager.open({file:b+"/dialog.htm",width:320+parseInt(a.getLang("example.delta_width",0)),height:120+parseInt(a.getLang("example.delta_height",0)),inline:1},{plugin_url:b,some_custom_arg:"custom arg"})});a.addButton("example",{title:"example.desc",cmd:"mceExample",image:b+"/img/example.gif"});a.onNodeChange.add(function(d,c,e){c.setActive("example",e.nodeName=="IMG")})},createControl:function(b,a){return null},getInfo:function(){return{longname:"Example plugin",author:"Some author",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example",version:"1.0"}}});tinymce.PluginManager.add("example",tinymce.plugins.ExamplePlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/example/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/example/editor_plugin_src.js deleted file mode 100644 index 5050550..0000000 --- a/public/javascripts/tiny_mce/plugins/example/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,81 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | // Load plugin specific language pack | ||
| 10 | tinymce.PluginManager.requireLangPack('example'); | ||
| 11 | |||
| 12 | tinymce.create('tinymce.plugins.ExamplePlugin', { | ||
| 13 | /** | ||
| 14 | * Initializes the plugin, this will be executed after the plugin has been created. | ||
| 15 | * This call is done before the editor instance has finished it's initialization so use the onInit event | ||
| 16 | * of the editor instance to intercept that event. | ||
| 17 | * | ||
| 18 | * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. | ||
| 19 | * @param {string} url Absolute URL to where the plugin is located. | ||
| 20 | */ | ||
| 21 | init : function(ed, url) { | ||
| 22 | // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample'); | ||
| 23 | ed.addCommand('mceExample', function() { | ||
| 24 | ed.windowManager.open({ | ||
| 25 | file : url + '/dialog.htm', | ||
| 26 | width : 320 + parseInt(ed.getLang('example.delta_width', 0)), | ||
| 27 | height : 120 + parseInt(ed.getLang('example.delta_height', 0)), | ||
| 28 | inline : 1 | ||
| 29 | }, { | ||
| 30 | plugin_url : url, // Plugin absolute URL | ||
| 31 | some_custom_arg : 'custom arg' // Custom argument | ||
| 32 | }); | ||
| 33 | }); | ||
| 34 | |||
| 35 | // Register example button | ||
| 36 | ed.addButton('example', { | ||
| 37 | title : 'example.desc', | ||
| 38 | cmd : 'mceExample', | ||
| 39 | image : url + '/img/example.gif' | ||
| 40 | }); | ||
| 41 | |||
| 42 | // Add a node change handler, selects the button in the UI when a image is selected | ||
| 43 | ed.onNodeChange.add(function(ed, cm, n) { | ||
| 44 | cm.setActive('example', n.nodeName == 'IMG'); | ||
| 45 | }); | ||
| 46 | }, | ||
| 47 | |||
| 48 | /** | ||
| 49 | * Creates control instances based in the incomming name. This method is normally not | ||
| 50 | * needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons | ||
| 51 | * but you sometimes need to create more complex controls like listboxes, split buttons etc then this | ||
| 52 | * method can be used to create those. | ||
| 53 | * | ||
| 54 | * @param {String} n Name of the control to create. | ||
| 55 | * @param {tinymce.ControlManager} cm Control manager to use inorder to create new control. | ||
| 56 | * @return {tinymce.ui.Control} New control instance or null if no control was created. | ||
| 57 | */ | ||
| 58 | createControl : function(n, cm) { | ||
| 59 | return null; | ||
| 60 | }, | ||
| 61 | |||
| 62 | /** | ||
| 63 | * Returns information about the plugin as a name/value array. | ||
| 64 | * The current keys are longname, author, authorurl, infourl and version. | ||
| 65 | * | ||
| 66 | * @return {Object} Name/value array containing information about the plugin. | ||
| 67 | */ | ||
| 68 | getInfo : function() { | ||
| 69 | return { | ||
| 70 | longname : 'Example plugin', | ||
| 71 | author : 'Some author', | ||
| 72 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 73 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example', | ||
| 74 | version : "1.0" | ||
| 75 | }; | ||
| 76 | } | ||
| 77 | }); | ||
| 78 | |||
| 79 | // Register plugin | ||
| 80 | tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin); | ||
| 81 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/example/img/example.gif b/public/javascripts/tiny_mce/plugins/example/img/example.gif deleted file mode 100644 index 1ab5da4..0000000 --- a/public/javascripts/tiny_mce/plugins/example/img/example.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/example/js/dialog.js b/public/javascripts/tiny_mce/plugins/example/js/dialog.js deleted file mode 100644 index fa83411..0000000 --- a/public/javascripts/tiny_mce/plugins/example/js/dialog.js +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | tinyMCEPopup.requireLangPack(); | ||
| 2 | |||
| 3 | var ExampleDialog = { | ||
| 4 | init : function() { | ||
| 5 | var f = document.forms[0]; | ||
| 6 | |||
| 7 | // Get the selected contents as text and place it in the input | ||
| 8 | f.someval.value = tinyMCEPopup.editor.selection.getContent({format : 'text'}); | ||
| 9 | f.somearg.value = tinyMCEPopup.getWindowArg('some_custom_arg'); | ||
| 10 | }, | ||
| 11 | |||
| 12 | insert : function() { | ||
| 13 | // Insert the contents from the input into the document | ||
| 14 | tinyMCEPopup.editor.execCommand('mceInsertContent', false, document.forms[0].someval.value); | ||
| 15 | tinyMCEPopup.close(); | ||
| 16 | } | ||
| 17 | }; | ||
| 18 | |||
| 19 | tinyMCEPopup.onInit.add(ExampleDialog.init, ExampleDialog); | ||
diff --git a/public/javascripts/tiny_mce/plugins/example/langs/en.js b/public/javascripts/tiny_mce/plugins/example/langs/en.js deleted file mode 100644 index e0784f8..0000000 --- a/public/javascripts/tiny_mce/plugins/example/langs/en.js +++ /dev/null | |||
| @@ -1,3 +0,0 @@ | |||
| 1 | tinyMCE.addI18n('en.example',{ | ||
| 2 | desc : 'This is just a template button' | ||
| 3 | }); | ||
diff --git a/public/javascripts/tiny_mce/plugins/example/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/example/langs/en_dlg.js deleted file mode 100644 index ebcf948..0000000 --- a/public/javascripts/tiny_mce/plugins/example/langs/en_dlg.js +++ /dev/null | |||
| @@ -1,3 +0,0 @@ | |||
| 1 | tinyMCE.addI18n('en.example_dlg',{ | ||
| 2 | title : 'This is just a example title' | ||
| 3 | }); | ||
diff --git a/public/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css b/public/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css deleted file mode 100644 index 7a3334f..0000000 --- a/public/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css +++ /dev/null | |||
| @@ -1,182 +0,0 @@ | |||
| 1 | /* Hide the advanced tab */ | ||
| 2 | #advanced_tab { | ||
| 3 | display: none; | ||
| 4 | } | ||
| 5 | |||
| 6 | #metatitle, #metakeywords, #metadescription, #metaauthor, #metacopyright { | ||
| 7 | width: 280px; | ||
| 8 | } | ||
| 9 | |||
| 10 | #doctype, #docencoding { | ||
| 11 | width: 200px; | ||
| 12 | } | ||
| 13 | |||
| 14 | #langcode { | ||
| 15 | width: 30px; | ||
| 16 | } | ||
| 17 | |||
| 18 | #bgimage { | ||
| 19 | width: 220px; | ||
| 20 | } | ||
| 21 | |||
| 22 | #fontface { | ||
| 23 | width: 240px; | ||
| 24 | } | ||
| 25 | |||
| 26 | #leftmargin, #rightmargin, #topmargin, #bottommargin { | ||
| 27 | width: 50px; | ||
| 28 | } | ||
| 29 | |||
| 30 | .panel_wrapper div.current { | ||
| 31 | height: 400px; | ||
| 32 | } | ||
| 33 | |||
| 34 | #stylesheet, #style { | ||
| 35 | width: 240px; | ||
| 36 | } | ||
| 37 | |||
| 38 | /* Head list classes */ | ||
| 39 | |||
| 40 | .headlistwrapper { | ||
| 41 | width: 100%; | ||
| 42 | } | ||
| 43 | |||
| 44 | .addbutton, .removebutton, .moveupbutton, .movedownbutton { | ||
| 45 | border-top: 1px solid; | ||
| 46 | border-left: 1px solid; | ||
| 47 | border-bottom: 1px solid; | ||
| 48 | border-right: 1px solid; | ||
| 49 | border-color: #F0F0EE; | ||
| 50 | cursor: default; | ||
| 51 | display: block; | ||
| 52 | width: 20px; | ||
| 53 | height: 20px; | ||
| 54 | } | ||
| 55 | |||
| 56 | #doctypes { | ||
| 57 | width: 200px; | ||
| 58 | } | ||
| 59 | |||
| 60 | .addbutton:hover, .removebutton:hover, .moveupbutton:hover, .movedownbutton:hover { | ||
| 61 | border: 1px solid #0A246A; | ||
| 62 | background-color: #B6BDD2; | ||
| 63 | } | ||
| 64 | |||
| 65 | .addbutton { | ||
| 66 | background-image: url('../images/add.gif'); | ||
| 67 | float: left; | ||
| 68 | margin-right: 3px; | ||
| 69 | } | ||
| 70 | |||
| 71 | .removebutton { | ||
| 72 | background-image: url('../images/remove.gif'); | ||
| 73 | float: left; | ||
| 74 | } | ||
| 75 | |||
| 76 | .moveupbutton { | ||
| 77 | background-image: url('../images/move_up.gif'); | ||
| 78 | float: left; | ||
| 79 | margin-right: 3px; | ||
| 80 | } | ||
| 81 | |||
| 82 | .movedownbutton { | ||
| 83 | background-image: url('../images/move_down.gif'); | ||
| 84 | float: left; | ||
| 85 | } | ||
| 86 | |||
| 87 | .selected { | ||
| 88 | border: 1px solid #0A246A; | ||
| 89 | background-color: #B6BDD2; | ||
| 90 | } | ||
| 91 | |||
| 92 | .toolbar { | ||
| 93 | width: 100%; | ||
| 94 | } | ||
| 95 | |||
| 96 | #headlist { | ||
| 97 | width: 100%; | ||
| 98 | margin-top: 3px; | ||
| 99 | font-size: 11px; | ||
| 100 | } | ||
| 101 | |||
| 102 | #info, #title_element, #meta_element, #script_element, #style_element, #base_element, #link_element, #comment_element, #unknown_element { | ||
| 103 | display: none; | ||
| 104 | } | ||
| 105 | |||
| 106 | #addmenu { | ||
| 107 | position: absolute; | ||
| 108 | border: 1px solid gray; | ||
| 109 | display: none; | ||
| 110 | z-index: 100; | ||
| 111 | background-color: white; | ||
| 112 | } | ||
| 113 | |||
| 114 | #addmenu a { | ||
| 115 | display: block; | ||
| 116 | width: 100%; | ||
| 117 | line-height: 20px; | ||
| 118 | text-decoration: none; | ||
| 119 | background-color: white; | ||
| 120 | } | ||
| 121 | |||
| 122 | #addmenu a:hover { | ||
| 123 | background-color: #B6BDD2; | ||
| 124 | color: black; | ||
| 125 | } | ||
| 126 | |||
| 127 | #addmenu span { | ||
| 128 | padding-left: 10px; | ||
| 129 | padding-right: 10px; | ||
| 130 | } | ||
| 131 | |||
| 132 | #updateElementPanel { | ||
| 133 | display: none; | ||
| 134 | } | ||
| 135 | |||
| 136 | #script_element .panel_wrapper div.current { | ||
| 137 | height: 108px; | ||
| 138 | } | ||
| 139 | |||
| 140 | #style_element .panel_wrapper div.current { | ||
| 141 | height: 108px; | ||
| 142 | } | ||
| 143 | |||
| 144 | #link_element .panel_wrapper div.current { | ||
| 145 | height: 140px; | ||
| 146 | } | ||
| 147 | |||
| 148 | #element_script_value { | ||
| 149 | width: 100%; | ||
| 150 | height: 100px; | ||
| 151 | } | ||
| 152 | |||
| 153 | #element_comment_value { | ||
| 154 | width: 100%; | ||
| 155 | height: 120px; | ||
| 156 | } | ||
| 157 | |||
| 158 | #element_style_value { | ||
| 159 | width: 100%; | ||
| 160 | height: 100px; | ||
| 161 | } | ||
| 162 | |||
| 163 | #element_title, #element_script_src, #element_meta_name, #element_meta_content, #element_base_href, #element_link_href, #element_link_title { | ||
| 164 | width: 250px; | ||
| 165 | } | ||
| 166 | |||
| 167 | .updateElementButton { | ||
| 168 | margin-top: 3px; | ||
| 169 | } | ||
| 170 | |||
| 171 | /* MSIE specific styles */ | ||
| 172 | |||
| 173 | * html .addbutton, * html .removebutton, * html .moveupbutton, * html .movedownbutton { | ||
| 174 | width: 22px; | ||
| 175 | height: 22px; | ||
| 176 | } | ||
| 177 | |||
| 178 | textarea { | ||
| 179 | height: 55px; | ||
| 180 | } | ||
| 181 | |||
| 182 | .panel_wrapper div.current {height:420px;} \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js b/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js deleted file mode 100644 index 8e11bfc..0000000 --- a/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.FullPagePlugin",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceFullPageProperties",function(){a.windowManager.open({file:b+"/fullpage.htm",width:430+parseInt(a.getLang("fullpage.delta_width",0)),height:495+parseInt(a.getLang("fullpage.delta_height",0)),inline:1},{plugin_url:b,head_html:c.head})});a.addButton("fullpage",{title:"fullpage.desc",cmd:"mceFullPageProperties"});a.onBeforeSetContent.add(c._setContent,c);a.onSetContent.add(c._setBodyAttribs,c);a.onGetContent.add(c._getContent,c)},getInfo:function(){return{longname:"Fullpage",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_setBodyAttribs:function(d,a){var l,c,e,g,b,h,j,f=this.head.match(/body(.*?)>/i);if(f&&f[1]){l=f[1].match(/\s*(\w+\s*=\s*".*?"|\w+\s*=\s*'.*?'|\w+\s*=\s*\w+|\w+)\s*/g);if(l){for(c=0,e=l.length;c<e;c++){g=l[c].split("=");b=g[0].replace(/\s/,"");h=g[1];if(h){h=h.replace(/^\s+/,"").replace(/\s+$/,"");j=h.match(/^["'](.*)["']$/);if(j){h=j[1]}}else{h=b}d.dom.setAttrib(d.getBody(),"style",h)}}}},_createSerializer:function(){return new tinymce.dom.Serializer({dom:this.editor.dom,apply_source_formatting:true})},_setContent:function(d,b){var h=this,a,j,f=b.content,g,i="";if(b.source_view&&d.getParam("fullpage_hide_in_source_view")){return}f=f.replace(/<(\/?)BODY/gi,"<$1body");a=f.indexOf("<body");if(a!=-1){a=f.indexOf(">",a);h.head=f.substring(0,a+1);j=f.indexOf("</body",a);if(j==-1){j=f.indexOf("</body",j)}b.content=f.substring(a+1,j);h.foot=f.substring(j);function e(c){return c.replace(/<\/?[A-Z]+/g,function(k){return k.toLowerCase()})}h.head=e(h.head);h.foot=e(h.foot)}else{h.head="";if(d.getParam("fullpage_default_xml_pi")){h.head+='<?xml version="1.0" encoding="'+d.getParam("fullpage_default_encoding","ISO-8859-1")+'" ?>\n'}h.head+=d.getParam("fullpage_default_doctype",'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');h.head+="\n<html>\n<head>\n<title>"+d.getParam("fullpage_default_title","Untitled document")+"</title>\n";if(g=d.getParam("fullpage_default_encoding")){h.head+='<meta http-equiv="Content-Type" content="'+g+'" />\n'}if(g=d.getParam("fullpage_default_font_family")){i+="font-family: "+g+";"}if(g=d.getParam("fullpage_default_font_size")){i+="font-size: "+g+";"}if(g=d.getParam("fullpage_default_text_color")){i+="color: "+g+";"}h.head+="</head>\n<body"+(i?' style="'+i+'"':"")+">\n";h.foot="\n</body>\n</html>"}},_getContent:function(a,c){var b=this;if(!c.source_view||!a.getParam("fullpage_hide_in_source_view")){c.content=tinymce.trim(b.head)+"\n"+tinymce.trim(c.content)+"\n"+tinymce.trim(b.foot)}}});tinymce.PluginManager.add("fullpage",tinymce.plugins.FullPagePlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js deleted file mode 100644 index c7d5aca..0000000 --- a/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,146 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 1029 2009-02-24 22:32:21Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.FullPagePlugin', { | ||
| 10 | init : function(ed, url) { | ||
| 11 | var t = this; | ||
| 12 | |||
| 13 | t.editor = ed; | ||
| 14 | |||
| 15 | // Register commands | ||
| 16 | ed.addCommand('mceFullPageProperties', function() { | ||
| 17 | ed.windowManager.open({ | ||
| 18 | file : url + '/fullpage.htm', | ||
| 19 | width : 430 + parseInt(ed.getLang('fullpage.delta_width', 0)), | ||
| 20 | height : 495 + parseInt(ed.getLang('fullpage.delta_height', 0)), | ||
| 21 | inline : 1 | ||
| 22 | }, { | ||
| 23 | plugin_url : url, | ||
| 24 | head_html : t.head | ||
| 25 | }); | ||
| 26 | }); | ||
| 27 | |||
| 28 | // Register buttons | ||
| 29 | ed.addButton('fullpage', {title : 'fullpage.desc', cmd : 'mceFullPageProperties'}); | ||
| 30 | |||
| 31 | ed.onBeforeSetContent.add(t._setContent, t); | ||
| 32 | ed.onSetContent.add(t._setBodyAttribs, t); | ||
| 33 | ed.onGetContent.add(t._getContent, t); | ||
| 34 | }, | ||
| 35 | |||
| 36 | getInfo : function() { | ||
| 37 | return { | ||
| 38 | longname : 'Fullpage', | ||
| 39 | author : 'Moxiecode Systems AB', | ||
| 40 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 41 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage', | ||
| 42 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 43 | }; | ||
| 44 | }, | ||
| 45 | |||
| 46 | // Private plugin internal methods | ||
| 47 | |||
| 48 | _setBodyAttribs : function(ed, o) { | ||
| 49 | var bdattr, i, len, kv, k, v, t, attr = this.head.match(/body(.*?)>/i); | ||
| 50 | |||
| 51 | if (attr && attr[1]) { | ||
| 52 | bdattr = attr[1].match(/\s*(\w+\s*=\s*".*?"|\w+\s*=\s*'.*?'|\w+\s*=\s*\w+|\w+)\s*/g); | ||
| 53 | |||
| 54 | if (bdattr) { | ||
| 55 | for(i = 0, len = bdattr.length; i < len; i++) { | ||
| 56 | kv = bdattr[i].split('='); | ||
| 57 | k = kv[0].replace(/\s/,''); | ||
| 58 | v = kv[1]; | ||
| 59 | |||
| 60 | if (v) { | ||
| 61 | v = v.replace(/^\s+/,'').replace(/\s+$/,''); | ||
| 62 | t = v.match(/^["'](.*)["']$/); | ||
| 63 | |||
| 64 | if (t) | ||
| 65 | v = t[1]; | ||
| 66 | } else | ||
| 67 | v = k; | ||
| 68 | |||
| 69 | ed.dom.setAttrib(ed.getBody(), 'style', v); | ||
| 70 | } | ||
| 71 | } | ||
| 72 | } | ||
| 73 | }, | ||
| 74 | |||
| 75 | _createSerializer : function() { | ||
| 76 | return new tinymce.dom.Serializer({ | ||
| 77 | dom : this.editor.dom, | ||
| 78 | apply_source_formatting : true | ||
| 79 | }); | ||
| 80 | }, | ||
| 81 | |||
| 82 | _setContent : function(ed, o) { | ||
| 83 | var t = this, sp, ep, c = o.content, v, st = ''; | ||
| 84 | |||
| 85 | if (o.source_view && ed.getParam('fullpage_hide_in_source_view')) | ||
| 86 | return; | ||
| 87 | |||
| 88 | // Parse out head, body and footer | ||
| 89 | c = c.replace(/<(\/?)BODY/gi, '<$1body'); | ||
| 90 | sp = c.indexOf('<body'); | ||
| 91 | |||
| 92 | if (sp != -1) { | ||
| 93 | sp = c.indexOf('>', sp); | ||
| 94 | t.head = c.substring(0, sp + 1); | ||
| 95 | |||
| 96 | ep = c.indexOf('</body', sp); | ||
| 97 | if (ep == -1) | ||
| 98 | ep = c.indexOf('</body', ep); | ||
| 99 | |||
| 100 | o.content = c.substring(sp + 1, ep); | ||
| 101 | t.foot = c.substring(ep); | ||
| 102 | |||
| 103 | function low(s) { | ||
| 104 | return s.replace(/<\/?[A-Z]+/g, function(a) { | ||
| 105 | return a.toLowerCase(); | ||
| 106 | }) | ||
| 107 | }; | ||
| 108 | |||
| 109 | t.head = low(t.head); | ||
| 110 | t.foot = low(t.foot); | ||
| 111 | } else { | ||
| 112 | t.head = ''; | ||
| 113 | if (ed.getParam('fullpage_default_xml_pi')) | ||
| 114 | t.head += '<?xml version="1.0" encoding="' + ed.getParam('fullpage_default_encoding', 'ISO-8859-1') + '" ?>\n'; | ||
| 115 | |||
| 116 | t.head += ed.getParam('fullpage_default_doctype', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'); | ||
| 117 | t.head += '\n<html>\n<head>\n<title>' + ed.getParam('fullpage_default_title', 'Untitled document') + '</title>\n'; | ||
| 118 | |||
| 119 | if (v = ed.getParam('fullpage_default_encoding')) | ||
| 120 | t.head += '<meta http-equiv="Content-Type" content="' + v + '" />\n'; | ||
| 121 | |||
| 122 | if (v = ed.getParam('fullpage_default_font_family')) | ||
| 123 | st += 'font-family: ' + v + ';'; | ||
| 124 | |||
| 125 | if (v = ed.getParam('fullpage_default_font_size')) | ||
| 126 | st += 'font-size: ' + v + ';'; | ||
| 127 | |||
| 128 | if (v = ed.getParam('fullpage_default_text_color')) | ||
| 129 | st += 'color: ' + v + ';'; | ||
| 130 | |||
| 131 | t.head += '</head>\n<body' + (st ? ' style="' + st + '"' : '') + '>\n'; | ||
| 132 | t.foot = '\n</body>\n</html>'; | ||
| 133 | } | ||
| 134 | }, | ||
| 135 | |||
| 136 | _getContent : function(ed, o) { | ||
| 137 | var t = this; | ||
| 138 | |||
| 139 | if (!o.source_view || !ed.getParam('fullpage_hide_in_source_view')) | ||
| 140 | o.content = tinymce.trim(t.head) + '\n' + tinymce.trim(o.content) + '\n' + tinymce.trim(t.foot); | ||
| 141 | } | ||
| 142 | }); | ||
| 143 | |||
| 144 | // Register plugin | ||
| 145 | tinymce.PluginManager.add('fullpage', tinymce.plugins.FullPagePlugin); | ||
| 146 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/fullpage/fullpage.htm b/public/javascripts/tiny_mce/plugins/fullpage/fullpage.htm deleted file mode 100644 index 3ea4081..0000000 --- a/public/javascripts/tiny_mce/plugins/fullpage/fullpage.htm +++ /dev/null | |||
| @@ -1,576 +0,0 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title>{#fullpage_dlg.title}</title> | ||
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 6 | <script type="text/javascript" src="../../utils/mctabs.js"></script> | ||
| 7 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | ||
| 8 | <script type="text/javascript" src="js/fullpage.js"></script> | ||
| 9 | <link href="css/fullpage.css" rel="stylesheet" type="text/css" /> | ||
| 10 | </head> | ||
| 11 | <body id="advlink" style="display: none"> | ||
| 12 | <form onsubmit="updateAction();return false;" name="fullpage" action="#"> | ||
| 13 | <div class="tabs"> | ||
| 14 | <ul> | ||
| 15 | <li id="meta_tab" class="current"><span><a href="javascript:mcTabs.displayTab('meta_tab','meta_panel');" onmousedown="return false;">{#fullpage_dlg.meta_tab}</a></span></li> | ||
| 16 | <li id="appearance_tab"><span><a href="javascript:mcTabs.displayTab('appearance_tab','appearance_panel');" onmousedown="return false;">{#fullpage_dlg.appearance_tab}</a></span></li> | ||
| 17 | <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#fullpage_dlg.advanced_tab}</a></span></li> | ||
| 18 | </ul> | ||
| 19 | </div> | ||
| 20 | |||
| 21 | <div class="panel_wrapper"> | ||
| 22 | <div id="meta_panel" class="panel current"> | ||
| 23 | <fieldset> | ||
| 24 | <legend>{#fullpage_dlg.meta_props}</legend> | ||
| 25 | |||
| 26 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 27 | <tr> | ||
| 28 | <td class="nowrap"><label for="metatitle">{#fullpage_dlg.meta_title}</label> </td> | ||
| 29 | <td><input type="text" id="metatitle" name="metatitle" value="" class="mceFocus" /></td> | ||
| 30 | </tr> | ||
| 31 | <tr> | ||
| 32 | <td class="nowrap"><label for="metakeywords">{#fullpage_dlg.meta_keywords}</label> </td> | ||
| 33 | <td><textarea id="metakeywords" name="metakeywords" rows="4"></textarea></td> | ||
| 34 | </tr> | ||
| 35 | <tr> | ||
| 36 | <td class="nowrap"><label for="metadescription">{#fullpage_dlg.meta_description}</label> </td> | ||
| 37 | <td><textarea id="metadescription" name="metadescription" rows="4"></textarea></td> | ||
| 38 | </tr> | ||
| 39 | <tr> | ||
| 40 | <td class="nowrap"><label for="metaauthor">{#fullpage_dlg.author}</label> </td> | ||
| 41 | <td><input type="text" id="metaauthor" name="metaauthor" value="" /></td> | ||
| 42 | </tr> | ||
| 43 | <tr> | ||
| 44 | <td class="nowrap"><label for="metacopyright">{#fullpage_dlg.copyright}</label> </td> | ||
| 45 | <td><input type="text" id="metacopyright" name="metacopyright" value="" /></td> | ||
| 46 | </tr> | ||
| 47 | <tr> | ||
| 48 | <td class="nowrap"><label for="metarobots">{#fullpage_dlg.meta_robots}</label> </td> | ||
| 49 | <td> | ||
| 50 | <select id="metarobots" name="metarobots"> | ||
| 51 | <option value="">{#not_set}</option> | ||
| 52 | <option value="index,follow">{#fullpage_dlg.meta_index_follow}</option> | ||
| 53 | <option value="index,nofollow">{#fullpage_dlg.meta_index_nofollow}</option> | ||
| 54 | <option value="noindex,follow">{#fullpage_dlg.meta_noindex_follow}</option> | ||
| 55 | <option value="noindex,nofollow">{#fullpage_dlg.meta_noindex_nofollow}</option> | ||
| 56 | </select> | ||
| 57 | </td> | ||
| 58 | </tr> | ||
| 59 | </table> | ||
| 60 | </fieldset> | ||
| 61 | |||
| 62 | <fieldset> | ||
| 63 | <legend>{#fullpage_dlg.langprops}</legend> | ||
| 64 | |||
| 65 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 66 | <tr> | ||
| 67 | <td class="column1"><label for="docencoding">{#fullpage_dlg.encoding}</label></td> | ||
| 68 | <td> | ||
| 69 | <select id="docencoding" name="docencoding"> | ||
| 70 | <option value="">{#not_set}</option> | ||
| 71 | </select> | ||
| 72 | </td> | ||
| 73 | </tr> | ||
| 74 | <tr> | ||
| 75 | <td class="nowrap"><label for="doctypes">{#fullpage_dlg.doctypes}</label> </td> | ||
| 76 | <td> | ||
| 77 | <select id="doctypes" name="doctypes"> | ||
| 78 | <option value="">{#not_set}</option> | ||
| 79 | </select> | ||
| 80 | </td> | ||
| 81 | </tr> | ||
| 82 | <tr> | ||
| 83 | <td class="nowrap"><label for="langcode">{#fullpage_dlg.langcode}</label> </td> | ||
| 84 | <td><input type="text" id="langcode" name="langcode" value="" /></td> | ||
| 85 | </tr> | ||
| 86 | <tr> | ||
| 87 | <td class="column1"><label for="langdir">{#fullpage_dlg.langdir}</label></td> | ||
| 88 | <td> | ||
| 89 | <select id="langdir" name="langdir"> | ||
| 90 | <option value="">{#not_set}</option> | ||
| 91 | <option value="ltr">{#fullpage_dlg.ltr}</option> | ||
| 92 | <option value="rtl">{#fullpage_dlg.rtl}</option> | ||
| 93 | </select> | ||
| 94 | </td> | ||
| 95 | </tr> | ||
| 96 | <tr> | ||
| 97 | <td class="nowrap"><label for="xml_pi">{#fullpage_dlg.xml_pi}</label> </td> | ||
| 98 | <td><input type="checkbox" id="xml_pi" name="xml_pi" class="checkbox" /></td> | ||
| 99 | </tr> | ||
| 100 | </table> | ||
| 101 | </fieldset> | ||
| 102 | </div> | ||
| 103 | |||
| 104 | <div id="appearance_panel" class="panel"> | ||
| 105 | <fieldset> | ||
| 106 | <legend>{#fullpage_dlg.appearance_textprops}</legend> | ||
| 107 | |||
| 108 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 109 | <tr> | ||
| 110 | <td class="column1"><label for="fontface">{#fullpage_dlg.fontface}</label></td> | ||
| 111 | <td> | ||
| 112 | <select id="fontface" name="fontface" onchange="changedStyleField(this);"> | ||
| 113 | <option value="">{#not_set}</option> | ||
| 114 | </select> | ||
| 115 | </td> | ||
| 116 | </tr> | ||
| 117 | |||
| 118 | <tr> | ||
| 119 | <td class="column1"><label for="fontsize">{#fullpage_dlg.fontsize}</label></td> | ||
| 120 | <td> | ||
| 121 | <select id="fontsize" name="fontsize" onchange="changedStyleField(this);"> | ||
| 122 | <option value="">{#not_set}</option> | ||
| 123 | </select> | ||
| 124 | </td> | ||
| 125 | </tr> | ||
| 126 | |||
| 127 | <tr> | ||
| 128 | <td class="column1"><label for="textcolor">{#fullpage_dlg.textcolor}</label></td> | ||
| 129 | <td> | ||
| 130 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 131 | <tr> | ||
| 132 | <td><input id="textcolor" name="textcolor" type="text" value="" size="9" onchange="updateColor('textcolor_pick','textcolor');changedStyleField(this);" /></td> | ||
| 133 | <td id="textcolor_pickcontainer"> </td> | ||
| 134 | </tr> | ||
| 135 | </table> | ||
| 136 | </td> | ||
| 137 | </tr> | ||
| 138 | </table> | ||
| 139 | </fieldset> | ||
| 140 | |||
| 141 | <fieldset> | ||
| 142 | <legend>{#fullpage_dlg.appearance_bgprops}</legend> | ||
| 143 | |||
| 144 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 145 | <tr> | ||
| 146 | <td class="column1"><label for="bgimage">{#fullpage_dlg.bgimage}</label></td> | ||
| 147 | <td> | ||
| 148 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 149 | <tr> | ||
| 150 | <td><input id="bgimage" name="bgimage" type="text" value="" onchange="changedStyleField(this);" /></td> | ||
| 151 | <td id="bgimage_pickcontainer"> </td> | ||
| 152 | </tr> | ||
| 153 | </table> | ||
| 154 | </td> | ||
| 155 | </tr> | ||
| 156 | <tr> | ||
| 157 | <td class="column1"><label for="bgcolor">{#fullpage_dlg.bgcolor}</label></td> | ||
| 158 | <td> | ||
| 159 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 160 | <tr> | ||
| 161 | <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedStyleField(this);" /></td> | ||
| 162 | <td id="bgcolor_pickcontainer"> </td> | ||
| 163 | </tr> | ||
| 164 | </table> | ||
| 165 | </td> | ||
| 166 | </tr> | ||
| 167 | </table> | ||
| 168 | </fieldset> | ||
| 169 | |||
| 170 | <fieldset> | ||
| 171 | <legend>{#fullpage_dlg.appearance_marginprops}</legend> | ||
| 172 | |||
| 173 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 174 | <tr> | ||
| 175 | <td class="column1"><label for="leftmargin">{#fullpage_dlg.left_margin}</label></td> | ||
| 176 | <td><input id="leftmargin" name="leftmargin" type="text" value="" onchange="changedStyleField(this);" /></td> | ||
| 177 | <td class="column1"><label for="rightmargin">{#fullpage_dlg.right_margin}</label></td> | ||
| 178 | <td><input id="rightmargin" name="rightmargin" type="text" value="" onchange="changedStyleField(this);" /></td> | ||
| 179 | </tr> | ||
| 180 | <tr> | ||
| 181 | <td class="column1"><label for="topmargin">{#fullpage_dlg.top_margin}</label></td> | ||
| 182 | <td><input id="topmargin" name="topmargin" type="text" value="" onchange="changedStyleField(this);" /></td> | ||
| 183 | <td class="column1"><label for="bottommargin">{#fullpage_dlg.bottom_margin}</label></td> | ||
| 184 | <td><input id="bottommargin" name="bottommargin" type="text" value="" onchange="changedStyleField(this);" /></td> | ||
| 185 | </tr> | ||
| 186 | </table> | ||
| 187 | </fieldset> | ||
| 188 | |||
| 189 | <fieldset> | ||
| 190 | <legend>{#fullpage_dlg.appearance_linkprops}</legend> | ||
| 191 | |||
| 192 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 193 | <tr> | ||
| 194 | <td class="column1"><label for="link_color">{#fullpage_dlg.link_color}</label></td> | ||
| 195 | <td> | ||
| 196 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 197 | <tr> | ||
| 198 | <td><input id="link_color" name="link_color" type="text" value="" size="9" onchange="updateColor('link_color_pick','link_color');changedStyleField(this);" /></td> | ||
| 199 | <td id="link_color_pickcontainer"> </td> | ||
| 200 | </tr> | ||
| 201 | </table> | ||
| 202 | </td> | ||
| 203 | |||
| 204 | <td class="column1"><label for="visited_color">{#fullpage_dlg.visited_color}</label></td> | ||
| 205 | <td> | ||
| 206 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 207 | <tr> | ||
| 208 | <td><input id="visited_color" name="visited_color" type="text" value="" size="9" onchange="updateColor('visited_color_pick','visited_color');changedStyleField(this);" /></td> | ||
| 209 | <td id="visited_color_pickcontainer"> </td> | ||
| 210 | </tr> | ||
| 211 | </table> | ||
| 212 | </td> | ||
| 213 | </tr> | ||
| 214 | |||
| 215 | <tr> | ||
| 216 | <td class="column1"><label for="active_color">{#fullpage_dlg.active_color}</label></td> | ||
| 217 | <td> | ||
| 218 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 219 | <tr> | ||
| 220 | <td><input id="active_color" name="active_color" type="text" value="" size="9" onchange="updateColor('active_color_pick','active_color');changedStyleField(this);" /></td> | ||
| 221 | <td id="active_color_pickcontainer"> </td> | ||
| 222 | </tr> | ||
| 223 | </table> | ||
| 224 | </td> | ||
| 225 | |||
| 226 | <td> </td> | ||
| 227 | <td> </td> | ||
| 228 | |||
| 229 | <!-- <td class="column1"><label for="hover_color">{#fullpage_dlg.hover_color}</label></td> | ||
| 230 | <td> | ||
| 231 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 232 | <tr> | ||
| 233 | <td><input id="hover_color" name="hover_color" type="text" value="" size="9" onchange="changedStyleField(this);" /></td> | ||
| 234 | <td id="hover_color_pickcontainer"> </td> | ||
| 235 | </tr> | ||
| 236 | </table> | ||
| 237 | </td> --> | ||
| 238 | </tr> | ||
| 239 | </table> | ||
| 240 | </fieldset> | ||
| 241 | |||
| 242 | <fieldset> | ||
| 243 | <legend>{#fullpage_dlg.appearance_style}</legend> | ||
| 244 | |||
| 245 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 246 | <tr> | ||
| 247 | <td class="column1"><label for="stylesheet">{#fullpage_dlg.stylesheet}</label></td> | ||
| 248 | <td><table border="0" cellpadding="0" cellspacing="0"> | ||
| 249 | <tr> | ||
| 250 | <td><input id="stylesheet" name="stylesheet" type="text" value="" /></td> | ||
| 251 | <td id="stylesheet_browsercontainer"> </td> | ||
| 252 | </tr> | ||
| 253 | </table></td> | ||
| 254 | </tr> | ||
| 255 | <tr> | ||
| 256 | <td class="column1"><label for="style">{#fullpage_dlg.style}</label></td> | ||
| 257 | <td><input id="style" name="style" type="text" value="" onchange="changedStyleField(this);" /></td> | ||
| 258 | </tr> | ||
| 259 | </table> | ||
| 260 | </fieldset> | ||
| 261 | </div> | ||
| 262 | |||
| 263 | <div id="advanced_panel" class="panel"> | ||
| 264 | <div id="addmenu"> | ||
| 265 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 266 | <tr><td><a href="javascript:addHeadElm('title');" onmousedown="return false;"><span>{#fullpage_dlg.add_title}</span></a></td></tr> | ||
| 267 | <tr><td><a href="javascript:addHeadElm('meta');" onmousedown="return false;"><span>{#fullpage_dlg.add_meta}</span></a></td></tr> | ||
| 268 | <tr><td><a href="javascript:addHeadElm('script');" onmousedown="return false;"><span>{#fullpage_dlg.add_script}</span></a></td></tr> | ||
| 269 | <tr><td><a href="javascript:addHeadElm('style');" onmousedown="return false;"><span>{#fullpage_dlg.add_style}</span></a></td></tr> | ||
| 270 | <tr><td><a href="javascript:addHeadElm('link');" onmousedown="return false;"><span>{#fullpage_dlg.add_link}</span></a></td></tr> | ||
| 271 | <tr><td><a href="javascript:addHeadElm('base');" onmousedown="return false;"><span>{#fullpage_dlg.add_base}</span></a></td></tr> | ||
| 272 | <tr><td><a href="javascript:addHeadElm('comment');" onmousedown="return false;"><span>{#fullpage_dlg.add_comment}</span></a></td></tr> | ||
| 273 | </table> | ||
| 274 | </div> | ||
| 275 | |||
| 276 | <fieldset> | ||
| 277 | <legend>{#fullpage_dlg.head_elements}</legend> | ||
| 278 | |||
| 279 | <div class="headlistwrapper"> | ||
| 280 | <div class="toolbar"> | ||
| 281 | <div style="float: left"> | ||
| 282 | <a id="addbutton" href="javascript:showAddMenu();" onmousedown="return false;" class="addbutton" title="{#fullpage_dlg.add}"></a> | ||
| 283 | <a href="#" onmousedown="return false;" class="removebutton" title="{#fullpage_dlg.remove}"></a> | ||
| 284 | </div> | ||
| 285 | <div style="float: right"> | ||
| 286 | <a href="#" onmousedown="return false;" class="moveupbutton" title="{#fullpage_dlg.moveup}"></a> | ||
| 287 | <a href="#" onmousedown="return false;" class="movedownbutton" title="{#fullpage_dlg.movedown}"></a> | ||
| 288 | </div> | ||
| 289 | <br style="clear: both" /> | ||
| 290 | </div> | ||
| 291 | <select id="headlist" size="26" onchange="updateHeadElm(this.options[this.selectedIndex].value);"> | ||
| 292 | <option value="title_0"><title>Some title bla bla bla</title></option> | ||
| 293 | <option value="meta_1"><meta name="keywords">Some bla bla bla</meta></option> | ||
| 294 | <option value="meta_2"><meta name="description">Some bla bla bla bla bla bla bla bla bla</meta></option> | ||
| 295 | <option value="script_3"><script language="javascript">...</script></option> | ||
| 296 | <option value="style_4"><style>...</style></option> | ||
| 297 | <option value="base_5"><base href="." /></option> | ||
| 298 | <option value="comment_6"><!-- ... --></option> | ||
| 299 | <option value="link_7"><link href="." /></option> | ||
| 300 | </select> | ||
| 301 | </div> | ||
| 302 | </fieldset> | ||
| 303 | |||
| 304 | <fieldset id="meta_element"> | ||
| 305 | <legend>{#fullpage_dlg.meta_element}</legend> | ||
| 306 | |||
| 307 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 308 | <tr> | ||
| 309 | <td class="column1"><label for="element_meta_type">{#fullpage_dlg.type}</label></td> | ||
| 310 | <td><select id="element_meta_type"> | ||
| 311 | <option value="name">name</option> | ||
| 312 | <option value="http-equiv">http-equiv</option> | ||
| 313 | </select></td> | ||
| 314 | </tr> | ||
| 315 | <tr> | ||
| 316 | <td class="column1"><label for="element_meta_name">{#fullpage_dlg.name}</label></td> | ||
| 317 | <td><input id="element_meta_name" name="element_meta_name" type="text" value="" /></td> | ||
| 318 | </tr> | ||
| 319 | <tr> | ||
| 320 | <td class="column1"><label for="element_meta_content">{#fullpage_dlg.content}</label></td> | ||
| 321 | <td><input id="element_meta_content" name="element_meta_content" type="text" value="" /></td> | ||
| 322 | </tr> | ||
| 323 | </table> | ||
| 324 | |||
| 325 | <input type="button" id="meta_updateelement" class="updateElementButton" name="update" value="{#update}" onclick="updateElement();" /> | ||
| 326 | </fieldset> | ||
| 327 | |||
| 328 | <fieldset id="title_element"> | ||
| 329 | <legend>{#fullpage_dlg.title_element}</legend> | ||
| 330 | |||
| 331 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 332 | <tr> | ||
| 333 | <td class="column1"><label for="element_title">{#fullpage_dlg.meta_title}</label></td> | ||
| 334 | <td><input id="element_title" name="element_title" type="text" value="" /></td> | ||
| 335 | </tr> | ||
| 336 | </table> | ||
| 337 | |||
| 338 | <input type="button" id="title_updateelement" class="updateElementButton" name="update" value="{#update}" onclick="updateElement();" /> | ||
| 339 | </fieldset> | ||
| 340 | |||
| 341 | <fieldset id="script_element"> | ||
| 342 | <legend>{#fullpage_dlg.script_element}</legend> | ||
| 343 | |||
| 344 | <div class="tabs"> | ||
| 345 | <ul> | ||
| 346 | <li id="script_props_tab" class="current"><span><a href="javascript:mcTabs.displayTab('script_props_tab','script_props_panel');" onmousedown="return false;">{#fullpage_dlg.properties}</a></span></li> | ||
| 347 | <li id="script_value_tab"><span><a href="javascript:mcTabs.displayTab('script_value_tab','script_value_panel');" onmousedown="return false;">{#fullpage_dlg.value}</a></span></li> | ||
| 348 | </ul> | ||
| 349 | </div> | ||
| 350 | |||
| 351 | <br style="clear: both" /> | ||
| 352 | |||
| 353 | <div class="panel_wrapper"> | ||
| 354 | <div id="script_props_panel" class="panel current"> | ||
| 355 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 356 | <tr> | ||
| 357 | <td class="column1"><label for="element_script_type">{#fullpage_dlg.type}</label></td> | ||
| 358 | <td><select id="element_script_type"> | ||
| 359 | <option value="text/javascript">text/javascript</option> | ||
| 360 | <option value="text/jscript">text/jscript</option> | ||
| 361 | <option value="text/vbscript">text/vbscript</option> | ||
| 362 | <option value="text/vbs">text/vbs</option> | ||
| 363 | <option value="text/ecmascript">text/ecmascript</option> | ||
| 364 | <option value="text/xml">text/xml</option> | ||
| 365 | </select></td> | ||
| 366 | </tr> | ||
| 367 | <tr> | ||
| 368 | <td class="column1"><label for="element_script_src">{#fullpage_dlg.src}</label></td> | ||
| 369 | <td><table border="0" cellpadding="0" cellspacing="0"> | ||
| 370 | <tr> | ||
| 371 | <td><input id="element_script_src" name="element_script_src" type="text" value="" /></td> | ||
| 372 | <td id="script_src_pickcontainer"> </td> | ||
| 373 | </tr> | ||
| 374 | </table></td> | ||
| 375 | </tr> | ||
| 376 | <tr> | ||
| 377 | <td class="column1"><label for="element_script_charset">{#fullpage_dlg.charset}</label></td> | ||
| 378 | <td><select id="element_script_charset"><option value="">{#not_set}</option></select></td> | ||
| 379 | </tr> | ||
| 380 | <tr> | ||
| 381 | <td class="column1"><label for="element_script_defer">{#fullpage_dlg.defer}</label></td> | ||
| 382 | <td><input type="checkbox" id="element_script_defer" name="element_script_defer" class="checkbox" /></td> | ||
| 383 | </tr> | ||
| 384 | </table> | ||
| 385 | </div> | ||
| 386 | |||
| 387 | <div id="script_value_panel" class="panel"> | ||
| 388 | <textarea id="element_script_value"></textarea> | ||
| 389 | </div> | ||
| 390 | </div> | ||
| 391 | |||
| 392 | <input type="button" id="script_updateelement" class="updateElementButton" name="update" value="{#update}" onclick="updateElement();" /> | ||
| 393 | </fieldset> | ||
| 394 | |||
| 395 | <fieldset id="style_element"> | ||
| 396 | <legend>{#fullpage_dlg.style_element}</legend> | ||
| 397 | |||
| 398 | <div class="tabs"> | ||
| 399 | <ul> | ||
| 400 | <li id="style_props_tab" class="current"><span><a href="javascript:mcTabs.displayTab('style_props_tab','style_props_panel');" onmousedown="return false;">{#fullpage_dlg.properties}</a></span></li> | ||
| 401 | <li id="style_value_tab"><span><a href="javascript:mcTabs.displayTab('style_value_tab','style_value_panel');" onmousedown="return false;">{#fullpage_dlg.value}</a></span></li> | ||
| 402 | </ul> | ||
| 403 | </div> | ||
| 404 | |||
| 405 | <br style="clear: both" /> | ||
| 406 | |||
| 407 | <div class="panel_wrapper"> | ||
| 408 | <div id="style_props_panel" class="panel current"> | ||
| 409 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 410 | <tr> | ||
| 411 | <td class="column1"><label for="element_style_type">{#fullpage_dlg.type}</label></td> | ||
| 412 | <td><select id="element_style_type"> | ||
| 413 | <option value="text/css">text/css</option> | ||
| 414 | </select></td> | ||
| 415 | </tr> | ||
| 416 | <tr> | ||
| 417 | <td class="column1"><label for="element_style_media">{#fullpage_dlg.media}</label></td> | ||
| 418 | <td><select id="element_style_media"></select></td> | ||
| 419 | </tr> | ||
| 420 | </table> | ||
| 421 | </div> | ||
| 422 | |||
| 423 | <div id="style_value_panel" class="panel"> | ||
| 424 | <textarea id="element_style_value"></textarea> | ||
| 425 | </div> | ||
| 426 | </div> | ||
| 427 | |||
| 428 | <input type="button" id="style_updateelement" class="updateElementButton" name="update" value="{#update}" onclick="updateElement();" /> | ||
| 429 | </fieldset> | ||
| 430 | |||
| 431 | <fieldset id="base_element"> | ||
| 432 | <legend>{#fullpage_dlg.base_element}</legend> | ||
| 433 | |||
| 434 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 435 | <tr> | ||
| 436 | <td class="column1"><label for="element_base_href">{#fullpage_dlg.href}</label></td> | ||
| 437 | <td><input id="element_base_href" name="element_base_href" type="text" value="" /></td> | ||
| 438 | </tr> | ||
| 439 | <tr> | ||
| 440 | <td class="column1"><label for="element_base_target">{#fullpage_dlg.target}</label></td> | ||
| 441 | <td><input id="element_base_target" name="element_base_target" type="text" value="" /></td> | ||
| 442 | </tr> | ||
| 443 | </table> | ||
| 444 | |||
| 445 | <input type="button" id="base_updateelement" class="updateElementButton" name="update" value="{#update}" onclick="updateElement();" /> | ||
| 446 | </fieldset> | ||
| 447 | |||
| 448 | <fieldset id="link_element"> | ||
| 449 | <legend>{#fullpage_dlg.link_element}</legend> | ||
| 450 | |||
| 451 | <div class="tabs"> | ||
| 452 | <ul> | ||
| 453 | <li id="link_general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('link_general_tab','link_general_panel');" onmousedown="return false;">{#fullpage_dlg.general_props}</a></span></li> | ||
| 454 | <li id="link_advanced_tab"><span><a href="javascript:mcTabs.displayTab('link_advanced_tab','link_advanced_panel');" onmousedown="return false;">{#fullpage_dlg.advanced_props}</a></span></li> | ||
| 455 | </ul> | ||
| 456 | </div> | ||
| 457 | |||
| 458 | <br style="clear: both" /> | ||
| 459 | |||
| 460 | <div class="panel_wrapper"> | ||
| 461 | <div id="link_general_panel" class="panel current"> | ||
| 462 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 463 | <tr> | ||
| 464 | <td class="column1"><label for="element_link_href">{#fullpage_dlg.href}</label></td> | ||
| 465 | <td><table border="0" cellpadding="0" cellspacing="0"> | ||
| 466 | <tr> | ||
| 467 | <td><input id="element_link_href" name="element_link_href" type="text" value="" /></td> | ||
| 468 | <td id="link_href_pickcontainer"> </td> | ||
| 469 | </tr> | ||
| 470 | </table></td> | ||
| 471 | </tr> | ||
| 472 | <tr> | ||
| 473 | <td class="column1"><label for="element_link_title">{#fullpage_dlg.meta_title}</label></td> | ||
| 474 | <td><input id="element_link_title" name="element_link_title" type="text" value="" /></td> | ||
| 475 | </tr> | ||
| 476 | <tr> | ||
| 477 | <td class="column1"><label for="element_link_type">{#fullpage_dlg.type}</label></td> | ||
| 478 | <td><select id="element_link_type" name="element_link_type"> | ||
| 479 | <option value="text/css">text/css</option> | ||
| 480 | <option value="text/javascript">text/javascript</option> | ||
| 481 | </select></td> | ||
| 482 | </tr> | ||
| 483 | <tr> | ||
| 484 | <td class="column1"><label for="element_link_media">{#fullpage_dlg.media}</label></td> | ||
| 485 | <td><select id="element_link_media" name="element_link_media"></select></td> | ||
| 486 | </tr> | ||
| 487 | <tr> | ||
| 488 | <td><label for="element_style_rel">{#fullpage_dlg.rel}</label></td> | ||
| 489 | <td><select id="element_style_rel" name="element_style_rel"> | ||
| 490 | <option value="">{#not_set}</option> | ||
| 491 | <option value="stylesheet">Stylesheet</option> | ||
| 492 | <option value="alternate">Alternate</option> | ||
| 493 | <option value="designates">Designates</option> | ||
| 494 | <option value="start">Start</option> | ||
| 495 | <option value="next">Next</option> | ||
| 496 | <option value="prev">Prev</option> | ||
| 497 | <option value="contents">Contents</option> | ||
| 498 | <option value="index">Index</option> | ||
| 499 | <option value="glossary">Glossary</option> | ||
| 500 | <option value="copyright">Copyright</option> | ||
| 501 | <option value="chapter">Chapter</option> | ||
| 502 | <option value="subsection">Subsection</option> | ||
| 503 | <option value="appendix">Appendix</option> | ||
| 504 | <option value="help">Help</option> | ||
| 505 | <option value="bookmark">Bookmark</option> | ||
| 506 | </select> | ||
| 507 | </td> | ||
| 508 | </tr> | ||
| 509 | </table> | ||
| 510 | </div> | ||
| 511 | |||
| 512 | <div id="link_advanced_panel" class="panel"> | ||
| 513 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 514 | <tr> | ||
| 515 | <td class="column1"><label for="element_link_charset">{#fullpage_dlg.charset}</label></td> | ||
| 516 | <td><select id="element_link_charset"><option value="">{#not_set}</option></select></td> | ||
| 517 | </tr> | ||
| 518 | <tr> | ||
| 519 | <td class="column1"><label for="element_link_hreflang">{#fullpage_dlg.hreflang}</label></td> | ||
| 520 | <td><input id="element_link_hreflang" name="element_link_hreflang" type="text" value="" /></td> | ||
| 521 | </tr> | ||
| 522 | <tr> | ||
| 523 | <td class="column1"><label for="element_link_target">{#fullpage_dlg.target}</label></td> | ||
| 524 | <td><input id="element_link_target" name="element_link_target" type="text" value="" /></td> | ||
| 525 | </tr> | ||
| 526 | <tr> | ||
| 527 | <td><label for="element_style_rev">{#fullpage_dlg.rev}</label></td> | ||
| 528 | <td><select id="element_style_rev" name="element_style_rev"> | ||
| 529 | <option value="">{#not_set}</option> | ||
| 530 | <option value="alternate">Alternate</option> | ||
| 531 | <option value="designates">Designates</option> | ||
| 532 | <option value="stylesheet">Stylesheet</option> | ||
| 533 | <option value="start">Start</option> | ||
| 534 | <option value="next">Next</option> | ||
| 535 | <option value="prev">Prev</option> | ||
| 536 | <option value="contents">Contents</option> | ||
| 537 | <option value="index">Index</option> | ||
| 538 | <option value="glossary">Glossary</option> | ||
| 539 | <option value="copyright">Copyright</option> | ||
| 540 | <option value="chapter">Chapter</option> | ||
| 541 | <option value="subsection">Subsection</option> | ||
| 542 | <option value="appendix">Appendix</option> | ||
| 543 | <option value="help">Help</option> | ||
| 544 | <option value="bookmark">Bookmark</option> | ||
| 545 | </select> | ||
| 546 | </td> | ||
| 547 | </tr> | ||
| 548 | </table> | ||
| 549 | </div> | ||
| 550 | </div> | ||
| 551 | |||
| 552 | <input type="button" id="link_updateelement" class="updateElementButton" name="update" value="{#update}" onclick="updateElement();" /> | ||
| 553 | </fieldset> | ||
| 554 | |||
| 555 | <fieldset id="comment_element"> | ||
| 556 | <legend>{#fullpage_dlg.comment_element}</legend> | ||
| 557 | |||
| 558 | <textarea id="element_comment_value"></textarea> | ||
| 559 | |||
| 560 | <input type="button" id="comment_updateelement" class="updateElementButton" name="update" value="{#update}" onclick="updateElement();" /> | ||
| 561 | </fieldset> | ||
| 562 | </div> | ||
| 563 | </div> | ||
| 564 | |||
| 565 | <div class="mceActionPanel"> | ||
| 566 | <div style="float: left"> | ||
| 567 | <input type="submit" id="insert" name="update" value="{#update}" /> | ||
| 568 | </div> | ||
| 569 | |||
| 570 | <div style="float: right"> | ||
| 571 | <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" /> | ||
| 572 | </div> | ||
| 573 | </div> | ||
| 574 | </form> | ||
| 575 | </body> | ||
| 576 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js b/public/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js deleted file mode 100644 index dd3a29c..0000000 --- a/public/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js +++ /dev/null | |||
| @@ -1,461 +0,0 @@ | |||
| 1 | tinyMCEPopup.requireLangPack(); | ||
| 2 | |||
| 3 | var doc; | ||
| 4 | |||
| 5 | var defaultDocTypes = | ||
| 6 | 'XHTML 1.0 Transitional=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">,' + | ||
| 7 | 'XHTML 1.0 Frameset=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">,' + | ||
| 8 | 'XHTML 1.0 Strict=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">,' + | ||
| 9 | 'XHTML 1.1=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">,' + | ||
| 10 | 'HTML 4.01 Transitional=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">,' + | ||
| 11 | 'HTML 4.01 Strict=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">,' + | ||
| 12 | 'HTML 4.01 Frameset=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">'; | ||
| 13 | |||
| 14 | var defaultEncodings = | ||
| 15 | 'Western european (iso-8859-1)=iso-8859-1,' + | ||
| 16 | 'Central European (iso-8859-2)=iso-8859-2,' + | ||
| 17 | 'Unicode (UTF-8)=utf-8,' + | ||
| 18 | 'Chinese traditional (Big5)=big5,' + | ||
| 19 | 'Cyrillic (iso-8859-5)=iso-8859-5,' + | ||
| 20 | 'Japanese (iso-2022-jp)=iso-2022-jp,' + | ||
| 21 | 'Greek (iso-8859-7)=iso-8859-7,' + | ||
| 22 | 'Korean (iso-2022-kr)=iso-2022-kr,' + | ||
| 23 | 'ASCII (us-ascii)=us-ascii'; | ||
| 24 | |||
| 25 | var defaultMediaTypes = | ||
| 26 | 'all=all,' + | ||
| 27 | 'screen=screen,' + | ||
| 28 | 'print=print,' + | ||
| 29 | 'tty=tty,' + | ||
| 30 | 'tv=tv,' + | ||
| 31 | 'projection=projection,' + | ||
| 32 | 'handheld=handheld,' + | ||
| 33 | 'braille=braille,' + | ||
| 34 | 'aural=aural'; | ||
| 35 | |||
| 36 | var defaultFontNames = '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'; | ||
| 37 | var defaultFontSizes = '10px,11px,12px,13px,14px,15px,16px'; | ||
| 38 | |||
| 39 | function init() { | ||
| 40 | var f = document.forms['fullpage'], el = f.elements, e, i, p, doctypes, encodings, mediaTypes, fonts, ed = tinyMCEPopup.editor, dom = tinyMCEPopup.dom, style; | ||
| 41 | |||
| 42 | // Setup doctype select box | ||
| 43 | doctypes = ed.getParam("fullpage_doctypes", defaultDocTypes).split(','); | ||
| 44 | for (i=0; i<doctypes.length; i++) { | ||
| 45 | p = doctypes[i].split('='); | ||
| 46 | |||
| 47 | if (p.length > 1) | ||
| 48 | addSelectValue(f, 'doctypes', p[0], p[1]); | ||
| 49 | } | ||
| 50 | |||
| 51 | // Setup fonts select box | ||
| 52 | fonts = ed.getParam("fullpage_fonts", defaultFontNames).split(';'); | ||
| 53 | for (i=0; i<fonts.length; i++) { | ||
| 54 | p = fonts[i].split('='); | ||
| 55 | |||
| 56 | if (p.length > 1) | ||
| 57 | addSelectValue(f, 'fontface', p[0], p[1]); | ||
| 58 | } | ||
| 59 | |||
| 60 | // Setup fontsize select box | ||
| 61 | fonts = ed.getParam("fullpage_fontsizes", defaultFontSizes).split(','); | ||
| 62 | for (i=0; i<fonts.length; i++) | ||
| 63 | addSelectValue(f, 'fontsize', fonts[i], fonts[i]); | ||
| 64 | |||
| 65 | // Setup mediatype select boxs | ||
| 66 | mediaTypes = ed.getParam("fullpage_media_types", defaultMediaTypes).split(','); | ||
| 67 | for (i=0; i<mediaTypes.length; i++) { | ||
| 68 | p = mediaTypes[i].split('='); | ||
| 69 | |||
| 70 | if (p.length > 1) { | ||
| 71 | addSelectValue(f, 'element_style_media', p[0], p[1]); | ||
| 72 | addSelectValue(f, 'element_link_media', p[0], p[1]); | ||
| 73 | } | ||
| 74 | } | ||
| 75 | |||
| 76 | // Setup encodings select box | ||
| 77 | encodings = ed.getParam("fullpage_encodings", defaultEncodings).split(','); | ||
| 78 | for (i=0; i<encodings.length; i++) { | ||
| 79 | p = encodings[i].split('='); | ||
| 80 | |||
| 81 | if (p.length > 1) { | ||
| 82 | addSelectValue(f, 'docencoding', p[0], p[1]); | ||
| 83 | addSelectValue(f, 'element_script_charset', p[0], p[1]); | ||
| 84 | addSelectValue(f, 'element_link_charset', p[0], p[1]); | ||
| 85 | } | ||
| 86 | } | ||
| 87 | |||
| 88 | document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); | ||
| 89 | document.getElementById('link_color_pickcontainer').innerHTML = getColorPickerHTML('link_color_pick','link_color'); | ||
| 90 | //document.getElementById('hover_color_pickcontainer').innerHTML = getColorPickerHTML('hover_color_pick','hover_color'); | ||
| 91 | document.getElementById('visited_color_pickcontainer').innerHTML = getColorPickerHTML('visited_color_pick','visited_color'); | ||
| 92 | document.getElementById('active_color_pickcontainer').innerHTML = getColorPickerHTML('active_color_pick','active_color'); | ||
| 93 | document.getElementById('textcolor_pickcontainer').innerHTML = getColorPickerHTML('textcolor_pick','textcolor'); | ||
| 94 | document.getElementById('stylesheet_browsercontainer').innerHTML = getBrowserHTML('stylesheetbrowser','stylesheet','file','fullpage'); | ||
| 95 | document.getElementById('link_href_pickcontainer').innerHTML = getBrowserHTML('link_href_browser','element_link_href','file','fullpage'); | ||
| 96 | document.getElementById('script_src_pickcontainer').innerHTML = getBrowserHTML('script_src_browser','element_script_src','file','fullpage'); | ||
| 97 | document.getElementById('bgimage_pickcontainer').innerHTML = getBrowserHTML('bgimage_browser','bgimage','image','fullpage'); | ||
| 98 | |||
| 99 | // Resize some elements | ||
| 100 | if (isVisible('stylesheetbrowser')) | ||
| 101 | document.getElementById('stylesheet').style.width = '220px'; | ||
| 102 | |||
| 103 | if (isVisible('link_href_browser')) | ||
| 104 | document.getElementById('element_link_href').style.width = '230px'; | ||
| 105 | |||
| 106 | if (isVisible('bgimage_browser')) | ||
| 107 | document.getElementById('bgimage').style.width = '210px'; | ||
| 108 | |||
| 109 | // Add iframe | ||
| 110 | dom.add(document.body, 'iframe', {id : 'documentIframe', src : 'javascript:""', style : {display : 'none'}}); | ||
| 111 | doc = dom.get('documentIframe').contentWindow.document; | ||
| 112 | h = tinyMCEPopup.getWindowArg('head_html'); | ||
| 113 | |||
| 114 | // Preprocess the HTML disable scripts and urls | ||
| 115 | h = h.replace(/<script>/gi, '<script type="text/javascript">'); | ||
| 116 | h = h.replace(/type=([\"\'])?/gi, 'type=$1-mce-'); | ||
| 117 | h = h.replace(/(src=|href=)/g, 'mce_$1'); | ||
| 118 | |||
| 119 | // Write in the content in the iframe | ||
| 120 | doc.write(h + '</body></html>'); | ||
| 121 | doc.close(); | ||
| 122 | |||
| 123 | // Parse xml and doctype | ||
| 124 | xmlVer = getReItem(/<\?\s*?xml.*?version\s*?=\s*?"(.*?)".*?\?>/gi, h, 1); | ||
| 125 | xmlEnc = getReItem(/<\?\s*?xml.*?encoding\s*?=\s*?"(.*?)".*?\?>/gi, h, 1); | ||
| 126 | docType = getReItem(/<\!DOCTYPE.*?>/gi, h.replace(/\n/g, ''), 0).replace(/ +/g, ' '); | ||
| 127 | f.langcode.value = getReItem(/lang="(.*?)"/gi, h, 1); | ||
| 128 | |||
| 129 | // Parse title | ||
| 130 | if (e = doc.getElementsByTagName('title')[0]) | ||
| 131 | el.metatitle.value = e.textContent || e.text; | ||
| 132 | |||
| 133 | // Parse meta | ||
| 134 | tinymce.each(doc.getElementsByTagName('meta'), function(n) { | ||
| 135 | var na = (n.getAttribute('name', 2) || '').toLowerCase(), va = n.getAttribute('content', 2), eq = n.getAttribute('httpEquiv', 2) || ''; | ||
| 136 | |||
| 137 | e = el['meta' + na]; | ||
| 138 | |||
| 139 | if (na == 'robots') { | ||
| 140 | selectByValue(f, 'metarobots', tinymce.trim(va), true, true); | ||
| 141 | return; | ||
| 142 | } | ||
| 143 | |||
| 144 | switch (eq.toLowerCase()) { | ||
| 145 | case "content-type": | ||
| 146 | tmp = getReItem(/charset\s*=\s*(.*)\s*/gi, va, 1); | ||
| 147 | |||
| 148 | // Override XML encoding | ||
| 149 | if (tmp != "") | ||
| 150 | xmlEnc = tmp; | ||
| 151 | |||
| 152 | return; | ||
| 153 | } | ||
| 154 | |||
| 155 | if (e) | ||
| 156 | e.value = va; | ||
| 157 | }); | ||
| 158 | |||
| 159 | selectByValue(f, 'doctypes', docType, true, true); | ||
| 160 | selectByValue(f, 'docencoding', xmlEnc, true, true); | ||
| 161 | selectByValue(f, 'langdir', doc.body.getAttribute('dir', 2) || '', true, true); | ||
| 162 | |||
| 163 | if (xmlVer != '') | ||
| 164 | el.xml_pi.checked = true; | ||
| 165 | |||
| 166 | // Parse appearance | ||
| 167 | |||
| 168 | // Parse primary stylesheet | ||
| 169 | tinymce.each(doc.getElementsByTagName("link"), function(l) { | ||
| 170 | var m = l.getAttribute('media', 2) || '', t = l.getAttribute('type', 2) || ''; | ||
| 171 | |||
| 172 | if (t == "-mce-text/css" && (m == "" || m == "screen" || m == "all") && (l.getAttribute('rel', 2) || '') == "stylesheet") { | ||
| 173 | f.stylesheet.value = l.getAttribute('mce_href', 2) || ''; | ||
| 174 | return false; | ||
| 175 | } | ||
| 176 | }); | ||
| 177 | |||
| 178 | // Get from style elements | ||
| 179 | tinymce.each(doc.getElementsByTagName("style"), function(st) { | ||
| 180 | var tmp = parseStyleElement(st); | ||
| 181 | |||
| 182 | for (x=0; x<tmp.length; x++) { | ||
| 183 | if (tmp[x].rule.indexOf('a:visited') != -1 && tmp[x].data['color']) | ||
| 184 | f.visited_color.value = tmp[x].data['color']; | ||
| 185 | |||
| 186 | if (tmp[x].rule.indexOf('a:link') != -1 && tmp[x].data['color']) | ||
| 187 | f.link_color.value = tmp[x].data['color']; | ||
| 188 | |||
| 189 | if (tmp[x].rule.indexOf('a:active') != -1 && tmp[x].data['color']) | ||
| 190 | f.active_color.value = tmp[x].data['color']; | ||
| 191 | } | ||
| 192 | }); | ||
| 193 | |||
| 194 | f.textcolor.value = tinyMCEPopup.dom.getAttrib(doc.body, "text"); | ||
| 195 | f.active_color.value = tinyMCEPopup.dom.getAttrib(doc.body, "alink"); | ||
| 196 | f.link_color.value = tinyMCEPopup.dom.getAttrib(doc.body, "link"); | ||
| 197 | f.visited_color.value = tinyMCEPopup.dom.getAttrib(doc.body, "vlink"); | ||
| 198 | f.bgcolor.value = tinyMCEPopup.dom.getAttrib(doc.body, "bgcolor"); | ||
| 199 | f.bgimage.value = tinyMCEPopup.dom.getAttrib(doc.body, "background"); | ||
| 200 | |||
| 201 | // Get from style info | ||
| 202 | style = tinyMCEPopup.dom.parseStyle(tinyMCEPopup.dom.getAttrib(doc.body, 'style')); | ||
| 203 | |||
| 204 | if (style['font-family']) | ||
| 205 | selectByValue(f, 'fontface', style['font-family'], true, true); | ||
| 206 | else | ||
| 207 | selectByValue(f, 'fontface', ed.getParam("fullpage_default_fontface", ""), true, true); | ||
| 208 | |||
| 209 | if (style['font-size']) | ||
| 210 | selectByValue(f, 'fontsize', style['font-size'], true, true); | ||
| 211 | else | ||
| 212 | selectByValue(f, 'fontsize', ed.getParam("fullpage_default_fontsize", ""), true, true); | ||
| 213 | |||
| 214 | if (style['color']) | ||
| 215 | f.textcolor.value = convertRGBToHex(style['color']); | ||
| 216 | |||
| 217 | if (style['background-image']) | ||
| 218 | f.bgimage.value = style['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); | ||
| 219 | |||
| 220 | if (style['background-color']) | ||
| 221 | f.bgcolor.value = style['background-color']; | ||
| 222 | |||
| 223 | if (style['margin']) { | ||
| 224 | tmp = style['margin'].replace(/[^0-9 ]/g, ''); | ||
| 225 | tmp = tmp.split(/ +/); | ||
| 226 | f.topmargin.value = tmp.length > 0 ? tmp[0] : ''; | ||
| 227 | f.rightmargin.value = tmp.length > 1 ? tmp[1] : tmp[0]; | ||
| 228 | f.bottommargin.value = tmp.length > 2 ? tmp[2] : tmp[0]; | ||
| 229 | f.leftmargin.value = tmp.length > 3 ? tmp[3] : tmp[0]; | ||
| 230 | } | ||
| 231 | |||
| 232 | if (style['margin-left']) | ||
| 233 | f.leftmargin.value = style['margin-left'].replace(/[^0-9]/g, ''); | ||
| 234 | |||
| 235 | if (style['margin-right']) | ||
| 236 | f.rightmargin.value = style['margin-right'].replace(/[^0-9]/g, ''); | ||
| 237 | |||
| 238 | if (style['margin-top']) | ||
| 239 | f.topmargin.value = style['margin-top'].replace(/[^0-9]/g, ''); | ||
| 240 | |||
| 241 | if (style['margin-bottom']) | ||
| 242 | f.bottommargin.value = style['margin-bottom'].replace(/[^0-9]/g, ''); | ||
| 243 | |||
| 244 | f.style.value = tinyMCEPopup.dom.serializeStyle(style); | ||
| 245 | |||
| 246 | // Update colors | ||
| 247 | updateColor('textcolor_pick', 'textcolor'); | ||
| 248 | updateColor('bgcolor_pick', 'bgcolor'); | ||
| 249 | updateColor('visited_color_pick', 'visited_color'); | ||
| 250 | updateColor('active_color_pick', 'active_color'); | ||
| 251 | updateColor('link_color_pick', 'link_color'); | ||
| 252 | } | ||
| 253 | |||
| 254 | function getReItem(r, s, i) { | ||
| 255 | var c = r.exec(s); | ||
| 256 | |||
| 257 | if (c && c.length > i) | ||
| 258 | return c[i]; | ||
| 259 | |||
| 260 | return ''; | ||
| 261 | } | ||
| 262 | |||
| 263 | function updateAction() { | ||
| 264 | var f = document.forms[0], nl, i, h, v, s, head, html, l, tmp, addlink = true, ser; | ||
| 265 | |||
| 266 | head = doc.getElementsByTagName('head')[0]; | ||
| 267 | |||
| 268 | // Fix scripts without a type | ||
| 269 | nl = doc.getElementsByTagName('script'); | ||
| 270 | for (i=0; i<nl.length; i++) { | ||
| 271 | if (tinyMCEPopup.dom.getAttrib(nl[i], 'mce_type') == '') | ||
| 272 | nl[i].setAttribute('mce_type', 'text/javascript'); | ||
| 273 | } | ||
| 274 | |||
| 275 | // Get primary stylesheet | ||
| 276 | nl = doc.getElementsByTagName("link"); | ||
| 277 | for (i=0; i<nl.length; i++) { | ||
| 278 | l = nl[i]; | ||
| 279 | |||
| 280 | tmp = tinyMCEPopup.dom.getAttrib(l, 'media'); | ||
| 281 | |||
| 282 | if (tinyMCEPopup.dom.getAttrib(l, 'mce_type') == "text/css" && (tmp == "" || tmp == "screen" || tmp == "all") && tinyMCEPopup.dom.getAttrib(l, 'rel') == "stylesheet") { | ||
| 283 | addlink = false; | ||
| 284 | |||
| 285 | if (f.stylesheet.value == '') | ||
| 286 | l.parentNode.removeChild(l); | ||
| 287 | else | ||
| 288 | l.setAttribute('mce_href', f.stylesheet.value); | ||
| 289 | |||
| 290 | break; | ||
| 291 | } | ||
| 292 | } | ||
| 293 | |||
| 294 | // Add new link | ||
| 295 | if (f.stylesheet.value != '') { | ||
| 296 | l = doc.createElement('link'); | ||
| 297 | |||
| 298 | l.setAttribute('type', 'text/css'); | ||
| 299 | l.setAttribute('mce_href', f.stylesheet.value); | ||
| 300 | l.setAttribute('rel', 'stylesheet'); | ||
| 301 | |||
| 302 | head.appendChild(l); | ||
| 303 | } | ||
| 304 | |||
| 305 | setMeta(head, 'keywords', f.metakeywords.value); | ||
| 306 | setMeta(head, 'description', f.metadescription.value); | ||
| 307 | setMeta(head, 'author', f.metaauthor.value); | ||
| 308 | setMeta(head, 'copyright', f.metacopyright.value); | ||
| 309 | setMeta(head, 'robots', getSelectValue(f, 'metarobots')); | ||
| 310 | setMeta(head, 'Content-Type', getSelectValue(f, 'docencoding')); | ||
| 311 | |||
| 312 | doc.body.dir = getSelectValue(f, 'langdir'); | ||
| 313 | doc.body.style.cssText = f.style.value; | ||
| 314 | |||
| 315 | doc.body.setAttribute('vLink', f.visited_color.value); | ||
| 316 | doc.body.setAttribute('link', f.link_color.value); | ||
| 317 | doc.body.setAttribute('text', f.textcolor.value); | ||
| 318 | doc.body.setAttribute('aLink', f.active_color.value); | ||
| 319 | |||
| 320 | doc.body.style.fontFamily = getSelectValue(f, 'fontface'); | ||
| 321 | doc.body.style.fontSize = getSelectValue(f, 'fontsize'); | ||
| 322 | doc.body.style.backgroundColor = f.bgcolor.value; | ||
| 323 | |||
| 324 | if (f.leftmargin.value != '') | ||
| 325 | doc.body.style.marginLeft = f.leftmargin.value + 'px'; | ||
| 326 | |||
| 327 | if (f.rightmargin.value != '') | ||
| 328 | doc.body.style.marginRight = f.rightmargin.value + 'px'; | ||
| 329 | |||
| 330 | if (f.bottommargin.value != '') | ||
| 331 | doc.body.style.marginBottom = f.bottommargin.value + 'px'; | ||
| 332 | |||
| 333 | if (f.topmargin.value != '') | ||
| 334 | doc.body.style.marginTop = f.topmargin.value + 'px'; | ||
| 335 | |||
| 336 | html = doc.getElementsByTagName('html')[0]; | ||
| 337 | html.setAttribute('lang', f.langcode.value); | ||
| 338 | html.setAttribute('xml:lang', f.langcode.value); | ||
| 339 | |||
| 340 | if (f.bgimage.value != '') | ||
| 341 | doc.body.style.backgroundImage = "url('" + f.bgimage.value + "')"; | ||
| 342 | else | ||
| 343 | doc.body.style.backgroundImage = ''; | ||
| 344 | |||
| 345 | ser = tinyMCEPopup.editor.plugins.fullpage._createSerializer(); | ||
| 346 | ser.setRules('-title,meta[http-equiv|name|content],base[href|target],link[href|rel|type|title|media],style[type],script[type|language|src],html[lang|xml::lang|xmlns],body[style|dir|vlink|link|text|alink],head'); | ||
| 347 | |||
| 348 | h = ser.serialize(doc.documentElement); | ||
| 349 | h = h.substring(0, h.lastIndexOf('</body>')); | ||
| 350 | |||
| 351 | if (h.indexOf('<title>') == -1) | ||
| 352 | h = h.replace(/<head.*?>/, '$&\n' + '<title>' + tinyMCEPopup.dom.encode(f.metatitle.value) + '</title>'); | ||
| 353 | else | ||
| 354 | h = h.replace(/<title>(.*?)<\/title>/, '<title>' + tinyMCEPopup.dom.encode(f.metatitle.value) + '</title>'); | ||
| 355 | |||
| 356 | if ((v = getSelectValue(f, 'doctypes')) != '') | ||
| 357 | h = v + '\n' + h; | ||
| 358 | |||
| 359 | if (f.xml_pi.checked) { | ||
| 360 | s = '<?xml version="1.0"'; | ||
| 361 | |||
| 362 | if ((v = getSelectValue(f, 'docencoding')) != '') | ||
| 363 | s += ' encoding="' + v + '"'; | ||
| 364 | |||
| 365 | s += '?>\n'; | ||
| 366 | h = s + h; | ||
| 367 | } | ||
| 368 | |||
| 369 | h = h.replace(/type=\"\-mce\-/gi, 'type="'); | ||
| 370 | |||
| 371 | tinyMCEPopup.editor.plugins.fullpage.head = h; | ||
| 372 | tinyMCEPopup.editor.plugins.fullpage._setBodyAttribs(tinyMCEPopup.editor, {}); | ||
| 373 | tinyMCEPopup.close(); | ||
| 374 | } | ||
| 375 | |||
| 376 | function changedStyleField(field) { | ||
| 377 | } | ||
| 378 | |||
| 379 | function setMeta(he, k, v) { | ||
| 380 | var nl, i, m; | ||
| 381 | |||
| 382 | nl = he.getElementsByTagName('meta'); | ||
| 383 | for (i=0; i<nl.length; i++) { | ||
| 384 | if (k == 'Content-Type' && tinyMCEPopup.dom.getAttrib(nl[i], 'http-equiv') == k) { | ||
| 385 | if (v == '') | ||
| 386 | nl[i].parentNode.removeChild(nl[i]); | ||
| 387 | else | ||
| 388 | nl[i].setAttribute('content', "text/html; charset=" + v); | ||
| 389 | |||
| 390 | return; | ||
| 391 | } | ||
| 392 | |||
| 393 | if (tinyMCEPopup.dom.getAttrib(nl[i], 'name') == k) { | ||
| 394 | if (v == '') | ||
| 395 | nl[i].parentNode.removeChild(nl[i]); | ||
| 396 | else | ||
| 397 | nl[i].setAttribute('content', v); | ||
| 398 | return; | ||
| 399 | } | ||
| 400 | } | ||
| 401 | |||
| 402 | if (v == '') | ||
| 403 | return; | ||
| 404 | |||
| 405 | m = doc.createElement('meta'); | ||
| 406 | |||
| 407 | if (k == 'Content-Type') | ||
| 408 | m.httpEquiv = k; | ||
| 409 | else | ||
| 410 | m.setAttribute('name', k); | ||
| 411 | |||
| 412 | m.setAttribute('content', v); | ||
| 413 | he.appendChild(m); | ||
| 414 | } | ||
| 415 | |||
| 416 | function parseStyleElement(e) { | ||
| 417 | var v = e.innerHTML; | ||
| 418 | var p, i, r; | ||
| 419 | |||
| 420 | v = v.replace(/<!--/gi, ''); | ||
| 421 | v = v.replace(/-->/gi, ''); | ||
| 422 | v = v.replace(/[\n\r]/gi, ''); | ||
| 423 | v = v.replace(/\s+/gi, ' '); | ||
| 424 | |||
| 425 | r = []; | ||
| 426 | p = v.split(/{|}/); | ||
| 427 | |||
| 428 | for (i=0; i<p.length; i+=2) { | ||
| 429 | if (p[i] != "") | ||
| 430 | r[r.length] = {rule : tinymce.trim(p[i]), data : tinyMCEPopup.dom.parseStyle(p[i+1])}; | ||
| 431 | } | ||
| 432 | |||
| 433 | return r; | ||
| 434 | } | ||
| 435 | |||
| 436 | function serializeStyleElement(d) { | ||
| 437 | var i, s, st; | ||
| 438 | |||
| 439 | s = '<!--\n'; | ||
| 440 | |||
| 441 | for (i=0; i<d.length; i++) { | ||
| 442 | s += d[i].rule + ' {\n'; | ||
| 443 | |||
| 444 | st = tinyMCE.serializeStyle(d[i].data); | ||
| 445 | |||
| 446 | if (st != '') | ||
| 447 | st += ';'; | ||
| 448 | |||
| 449 | s += st.replace(/;/g, ';\n'); | ||
| 450 | s += '}\n'; | ||
| 451 | |||
| 452 | if (i != d.length - 1) | ||
| 453 | s += '\n'; | ||
| 454 | } | ||
| 455 | |||
| 456 | s += '\n-->'; | ||
| 457 | |||
| 458 | return s; | ||
| 459 | } | ||
| 460 | |||
| 461 | tinyMCEPopup.onInit.add(init); | ||
diff --git a/public/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js deleted file mode 100644 index f5801b8..0000000 --- a/public/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js +++ /dev/null | |||
| @@ -1,85 +0,0 @@ | |||
| 1 | tinyMCE.addI18n('en.fullpage_dlg',{ | ||
| 2 | title:"Document properties", | ||
| 3 | meta_tab:"General", | ||
| 4 | appearance_tab:"Appearance", | ||
| 5 | advanced_tab:"Advanced", | ||
| 6 | meta_props:"Meta information", | ||
| 7 | langprops:"Language and encoding", | ||
| 8 | meta_title:"Title", | ||
| 9 | meta_keywords:"Keywords", | ||
| 10 | meta_description:"Description", | ||
| 11 | meta_robots:"Robots", | ||
| 12 | doctypes:"Doctype", | ||
| 13 | langcode:"Language code", | ||
| 14 | langdir:"Language direction", | ||
| 15 | ltr:"Left to right", | ||
| 16 | rtl:"Right to left", | ||
| 17 | xml_pi:"XML declaration", | ||
| 18 | encoding:"Character encoding", | ||
| 19 | appearance_bgprops:"Background properties", | ||
| 20 | appearance_marginprops:"Body margins", | ||
| 21 | appearance_linkprops:"Link colors", | ||
| 22 | appearance_textprops:"Text properties", | ||
| 23 | bgcolor:"Background color", | ||
| 24 | bgimage:"Background image", | ||
| 25 | left_margin:"Left margin", | ||
| 26 | right_margin:"Right margin", | ||
| 27 | top_margin:"Top margin", | ||
| 28 | bottom_margin:"Bottom margin", | ||
| 29 | text_color:"Text color", | ||
| 30 | font_size:"Font size", | ||
| 31 | font_face:"Font face", | ||
| 32 | link_color:"Link color", | ||
| 33 | hover_color:"Hover color", | ||
| 34 | visited_color:"Visited color", | ||
| 35 | active_color:"Active color", | ||
| 36 | textcolor:"Color", | ||
| 37 | fontsize:"Font size", | ||
| 38 | fontface:"Font family", | ||
| 39 | meta_index_follow:"Index and follow the links", | ||
| 40 | meta_index_nofollow:"Index and don't follow the links", | ||
| 41 | meta_noindex_follow:"Do not index but follow the links", | ||
| 42 | meta_noindex_nofollow:"Do not index and don\'t follow the links", | ||
| 43 | appearance_style:"Stylesheet and style properties", | ||
| 44 | stylesheet:"Stylesheet", | ||
| 45 | style:"Style", | ||
| 46 | author:"Author", | ||
| 47 | copyright:"Copyright", | ||
| 48 | add:"Add new element", | ||
| 49 | remove:"Remove selected element", | ||
| 50 | moveup:"Move selected element up", | ||
| 51 | movedown:"Move selected element down", | ||
| 52 | head_elements:"Head elements", | ||
| 53 | info:"Information", | ||
| 54 | add_title:"Title element", | ||
| 55 | add_meta:"Meta element", | ||
| 56 | add_script:"Script element", | ||
| 57 | add_style:"Style element", | ||
| 58 | add_link:"Link element", | ||
| 59 | add_base:"Base element", | ||
| 60 | add_comment:"Comment node", | ||
| 61 | title_element:"Title element", | ||
| 62 | script_element:"Script element", | ||
| 63 | style_element:"Style element", | ||
| 64 | base_element:"Base element", | ||
| 65 | link_element:"Link element", | ||
| 66 | meta_element:"Meta element", | ||
| 67 | comment_element:"Comment", | ||
| 68 | src:"Src", | ||
| 69 | language:"Language", | ||
| 70 | href:"Href", | ||
| 71 | target:"Target", | ||
| 72 | type:"Type", | ||
| 73 | charset:"Charset", | ||
| 74 | defer:"Defer", | ||
| 75 | media:"Media", | ||
| 76 | properties:"Properties", | ||
| 77 | name:"Name", | ||
| 78 | value:"Value", | ||
| 79 | content:"Content", | ||
| 80 | rel:"Rel", | ||
| 81 | rev:"Rev", | ||
| 82 | hreflang:"Href lang", | ||
| 83 | general_props:"General", | ||
| 84 | advanced_props:"Advanced" | ||
| 85 | }); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/fullscreen/editor_plugin.js b/public/javascripts/tiny_mce/plugins/fullscreen/editor_plugin.js deleted file mode 100644 index dfb3f16..0000000 --- a/public/javascripts/tiny_mce/plugins/fullscreen/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(c,d){var e=this,f={},b;e.editor=c;c.addCommand("mceFullScreen",function(){var h,i=a.doc.documentElement;if(c.getParam("fullscreen_is_enabled")){if(c.getParam("fullscreen_new_window")){closeFullscreen()}else{a.win.setTimeout(function(){tinymce.dom.Event.remove(a.win,"resize",e.resizeFunc);tinyMCE.get(c.getParam("fullscreen_editor_id")).setContent(c.getContent({format:"raw"}),{format:"raw"});tinyMCE.remove(c);a.remove("mce_fullscreen_container");i.style.overflow=c.getParam("fullscreen_html_overflow");a.setStyle(a.doc.body,"overflow",c.getParam("fullscreen_overflow"));a.win.scrollTo(c.getParam("fullscreen_scrollx"),c.getParam("fullscreen_scrolly"));tinyMCE.settings=tinyMCE.oldSettings},10)}return}if(c.getParam("fullscreen_new_window")){h=a.win.open(d+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{h.resizeTo(screen.availWidth,screen.availHeight)}catch(g){}}else{tinyMCE.oldSettings=tinyMCE.settings;f.fullscreen_overflow=a.getStyle(a.doc.body,"overflow",1)||"auto";f.fullscreen_html_overflow=a.getStyle(i,"overflow",1);b=a.getViewPort();f.fullscreen_scrollx=b.x;f.fullscreen_scrolly=b.y;if(tinymce.isOpera&&f.fullscreen_overflow=="visible"){f.fullscreen_overflow="auto"}if(tinymce.isIE&&f.fullscreen_overflow=="scroll"){f.fullscreen_overflow="auto"}if(tinymce.isIE&&(f.fullscreen_html_overflow=="visible"||f.fullscreen_html_overflow=="scroll")){f.fullscreen_html_overflow="auto"}if(f.fullscreen_overflow=="0px"){f.fullscreen_overflow=""}a.setStyle(a.doc.body,"overflow","hidden");i.style.overflow="hidden";b=a.getViewPort();a.win.scrollTo(0,0);if(tinymce.isIE){b.h-=1}n=a.add(a.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+(tinymce.isIE6||(tinymce.isIE&&!a.boxModel)?"absolute":"fixed")+";top:0;left:0;width:"+b.w+"px;height:"+b.h+"px;z-index:200000;"});a.add(n,"div",{id:"mce_fullscreen"});tinymce.each(c.settings,function(j,k){f[k]=j});f.id="mce_fullscreen";f.width=n.clientWidth;f.height=n.clientHeight-15;f.fullscreen_is_enabled=true;f.fullscreen_editor_id=c.id;f.theme_advanced_resizing=false;f.save_onsavecallback=function(){c.setContent(tinyMCE.get(f.id).getContent({format:"raw"}),{format:"raw"});c.execCommand("mceSave")};tinymce.each(c.getParam("fullscreen_settings"),function(l,j){f[j]=l});if(f.theme_advanced_toolbar_location==="external"){f.theme_advanced_toolbar_location="top"}e.fullscreenEditor=new tinymce.Editor("mce_fullscreen",f);e.fullscreenEditor.onInit.add(function(){e.fullscreenEditor.setContent(c.getContent());e.fullscreenEditor.focus()});e.fullscreenEditor.render();tinyMCE.add(e.fullscreenEditor);e.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");e.fullscreenElement.update();e.resizeFunc=tinymce.dom.Event.add(a.win,"resize",function(){var j=tinymce.DOM.getViewPort();e.fullscreenEditor.theme.resizeTo(j.w,j.h)})}});c.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});c.onNodeChange.add(function(h,g){g.setActive("fullscreen",h.getParam("fullscreen_is_enabled"))})},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js deleted file mode 100644 index 77a8c3b..0000000 --- a/public/javascripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,145 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 923 2008-09-09 16:45:29Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | var DOM = tinymce.DOM; | ||
| 10 | |||
| 11 | tinymce.create('tinymce.plugins.FullScreenPlugin', { | ||
| 12 | init : function(ed, url) { | ||
| 13 | var t = this, s = {}, vp; | ||
| 14 | |||
| 15 | t.editor = ed; | ||
| 16 | |||
| 17 | // Register commands | ||
| 18 | ed.addCommand('mceFullScreen', function() { | ||
| 19 | var win, de = DOM.doc.documentElement; | ||
| 20 | |||
| 21 | if (ed.getParam('fullscreen_is_enabled')) { | ||
| 22 | if (ed.getParam('fullscreen_new_window')) | ||
| 23 | closeFullscreen(); // Call to close in new window | ||
| 24 | else { | ||
| 25 | DOM.win.setTimeout(function() { | ||
| 26 | tinymce.dom.Event.remove(DOM.win, 'resize', t.resizeFunc); | ||
| 27 | tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent({format : 'raw'}), {format : 'raw'}); | ||
| 28 | tinyMCE.remove(ed); | ||
| 29 | DOM.remove('mce_fullscreen_container'); | ||
| 30 | de.style.overflow = ed.getParam('fullscreen_html_overflow'); | ||
| 31 | DOM.setStyle(DOM.doc.body, 'overflow', ed.getParam('fullscreen_overflow')); | ||
| 32 | DOM.win.scrollTo(ed.getParam('fullscreen_scrollx'), ed.getParam('fullscreen_scrolly')); | ||
| 33 | tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings | ||
| 34 | }, 10); | ||
| 35 | } | ||
| 36 | |||
| 37 | return; | ||
| 38 | } | ||
| 39 | |||
| 40 | if (ed.getParam('fullscreen_new_window')) { | ||
| 41 | win = DOM.win.open(url + "/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight); | ||
| 42 | try { | ||
| 43 | win.resizeTo(screen.availWidth, screen.availHeight); | ||
| 44 | } catch (e) { | ||
| 45 | // Ignore | ||
| 46 | } | ||
| 47 | } else { | ||
| 48 | tinyMCE.oldSettings = tinyMCE.settings; // Store old settings | ||
| 49 | s.fullscreen_overflow = DOM.getStyle(DOM.doc.body, 'overflow', 1) || 'auto'; | ||
| 50 | s.fullscreen_html_overflow = DOM.getStyle(de, 'overflow', 1); | ||
| 51 | vp = DOM.getViewPort(); | ||
| 52 | s.fullscreen_scrollx = vp.x; | ||
| 53 | s.fullscreen_scrolly = vp.y; | ||
| 54 | |||
| 55 | // Fixes an Opera bug where the scrollbars doesn't reappear | ||
| 56 | if (tinymce.isOpera && s.fullscreen_overflow == 'visible') | ||
| 57 | s.fullscreen_overflow = 'auto'; | ||
| 58 | |||
| 59 | // Fixes an IE bug where horizontal scrollbars would appear | ||
| 60 | if (tinymce.isIE && s.fullscreen_overflow == 'scroll') | ||
| 61 | s.fullscreen_overflow = 'auto'; | ||
| 62 | |||
| 63 | // Fixes an IE bug where the scrollbars doesn't reappear | ||
| 64 | if (tinymce.isIE && (s.fullscreen_html_overflow == 'visible' || s.fullscreen_html_overflow == 'scroll')) | ||
| 65 | s.fullscreen_html_overflow = 'auto'; | ||
| 66 | |||
| 67 | if (s.fullscreen_overflow == '0px') | ||
| 68 | s.fullscreen_overflow = ''; | ||
| 69 | |||
| 70 | DOM.setStyle(DOM.doc.body, 'overflow', 'hidden'); | ||
| 71 | de.style.overflow = 'hidden'; //Fix for IE6/7 | ||
| 72 | vp = DOM.getViewPort(); | ||
| 73 | DOM.win.scrollTo(0, 0); | ||
| 74 | |||
| 75 | if (tinymce.isIE) | ||
| 76 | vp.h -= 1; | ||
| 77 | |||
| 78 | n = DOM.add(DOM.doc.body, 'div', {id : 'mce_fullscreen_container', style : 'position:' + (tinymce.isIE6 || (tinymce.isIE && !DOM.boxModel) ? 'absolute' : 'fixed') + ';top:0;left:0;width:' + vp.w + 'px;height:' + vp.h + 'px;z-index:200000;'}); | ||
| 79 | DOM.add(n, 'div', {id : 'mce_fullscreen'}); | ||
| 80 | |||
| 81 | tinymce.each(ed.settings, function(v, n) { | ||
| 82 | s[n] = v; | ||
| 83 | }); | ||
| 84 | |||
| 85 | s.id = 'mce_fullscreen'; | ||
| 86 | s.width = n.clientWidth; | ||
| 87 | s.height = n.clientHeight - 15; | ||
| 88 | s.fullscreen_is_enabled = true; | ||
| 89 | s.fullscreen_editor_id = ed.id; | ||
| 90 | s.theme_advanced_resizing = false; | ||
| 91 | s.save_onsavecallback = function() { | ||
| 92 | ed.setContent(tinyMCE.get(s.id).getContent({format : 'raw'}), {format : 'raw'}); | ||
| 93 | ed.execCommand('mceSave'); | ||
| 94 | }; | ||
| 95 | |||
| 96 | tinymce.each(ed.getParam('fullscreen_settings'), function(v, k) { | ||
| 97 | s[k] = v; | ||
| 98 | }); | ||
| 99 | |||
| 100 | if (s.theme_advanced_toolbar_location === 'external') | ||
| 101 | s.theme_advanced_toolbar_location = 'top'; | ||
| 102 | |||
| 103 | t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s); | ||
| 104 | t.fullscreenEditor.onInit.add(function() { | ||
| 105 | t.fullscreenEditor.setContent(ed.getContent()); | ||
| 106 | t.fullscreenEditor.focus(); | ||
| 107 | }); | ||
| 108 | |||
| 109 | t.fullscreenEditor.render(); | ||
| 110 | tinyMCE.add(t.fullscreenEditor); | ||
| 111 | |||
| 112 | t.fullscreenElement = new tinymce.dom.Element('mce_fullscreen_container'); | ||
| 113 | t.fullscreenElement.update(); | ||
| 114 | //document.body.overflow = 'hidden'; | ||
| 115 | |||
| 116 | t.resizeFunc = tinymce.dom.Event.add(DOM.win, 'resize', function() { | ||
| 117 | var vp = tinymce.DOM.getViewPort(); | ||
| 118 | |||
| 119 | t.fullscreenEditor.theme.resizeTo(vp.w, vp.h); | ||
| 120 | }); | ||
| 121 | } | ||
| 122 | }); | ||
| 123 | |||
| 124 | // Register buttons | ||
| 125 | ed.addButton('fullscreen', {title : 'fullscreen.desc', cmd : 'mceFullScreen'}); | ||
| 126 | |||
| 127 | ed.onNodeChange.add(function(ed, cm) { | ||
| 128 | cm.setActive('fullscreen', ed.getParam('fullscreen_is_enabled')); | ||
| 129 | }); | ||
| 130 | }, | ||
| 131 | |||
| 132 | getInfo : function() { | ||
| 133 | return { | ||
| 134 | longname : 'Fullscreen', | ||
| 135 | author : 'Moxiecode Systems AB', | ||
| 136 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 137 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen', | ||
| 138 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 139 | }; | ||
| 140 | } | ||
| 141 | }); | ||
| 142 | |||
| 143 | // Register plugin | ||
| 144 | tinymce.PluginManager.add('fullscreen', tinymce.plugins.FullScreenPlugin); | ||
| 145 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/fullscreen/fullscreen.htm b/public/javascripts/tiny_mce/plugins/fullscreen/fullscreen.htm deleted file mode 100644 index 6ec4f26..0000000 --- a/public/javascripts/tiny_mce/plugins/fullscreen/fullscreen.htm +++ /dev/null | |||
| @@ -1,110 +0,0 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title></title> | ||
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | ||
| 6 | <script type="text/javascript" src="../../tiny_mce.js"></script> | ||
| 7 | <script type="text/javascript"> | ||
| 8 | function patchCallback(settings, key) { | ||
| 9 | if (settings[key]) | ||
| 10 | settings[key] = "window.opener." + settings[key]; | ||
| 11 | } | ||
| 12 | |||
| 13 | var settings = {}, paSe = window.opener.tinyMCE.activeEditor.settings, oeID = window.opener.tinyMCE.activeEditor.id; | ||
| 14 | |||
| 15 | // Clone array | ||
| 16 | for (var n in paSe) | ||
| 17 | settings[n] = paSe[n]; | ||
| 18 | |||
| 19 | // Override options for fullscreen | ||
| 20 | for (var n in paSe.fullscreen_settings) | ||
| 21 | settings[n] = paSe.fullscreen_settings[n]; | ||
| 22 | |||
| 23 | // Patch callbacks, make them point to window.opener | ||
| 24 | patchCallback(settings, 'urlconverter_callback'); | ||
| 25 | patchCallback(settings, 'insertlink_callback'); | ||
| 26 | patchCallback(settings, 'insertimage_callback'); | ||
| 27 | patchCallback(settings, 'setupcontent_callback'); | ||
| 28 | patchCallback(settings, 'save_callback'); | ||
| 29 | patchCallback(settings, 'onchange_callback'); | ||
| 30 | patchCallback(settings, 'init_instance_callback'); | ||
| 31 | patchCallback(settings, 'file_browser_callback'); | ||
| 32 | patchCallback(settings, 'cleanup_callback'); | ||
| 33 | patchCallback(settings, 'execcommand_callback'); | ||
| 34 | patchCallback(settings, 'oninit'); | ||
| 35 | |||
| 36 | // Set options | ||
| 37 | delete settings.id; | ||
| 38 | settings['mode'] = 'exact'; | ||
| 39 | settings['elements'] = 'fullscreenarea'; | ||
| 40 | settings['add_unload_trigger'] = false; | ||
| 41 | settings['ask'] = false; | ||
| 42 | settings['document_base_url'] = window.opener.tinyMCE.activeEditor.documentBaseURI.getURI(); | ||
| 43 | settings['fullscreen_is_enabled'] = true; | ||
| 44 | settings['fullscreen_editor_id'] = oeID; | ||
| 45 | settings['theme_advanced_resizing'] = false; | ||
| 46 | settings['strict_loading_mode'] = true; | ||
| 47 | |||
| 48 | settings.save_onsavecallback = function() { | ||
| 49 | window.opener.tinyMCE.get(oeID).setContent(tinyMCE.get('fullscreenarea').getContent({format : 'raw'}), {format : 'raw'}); | ||
| 50 | window.opener.tinyMCE.get(oeID).execCommand('mceSave'); | ||
| 51 | window.close(); | ||
| 52 | }; | ||
| 53 | |||
| 54 | function unloadHandler(e) { | ||
| 55 | moveContent(); | ||
| 56 | } | ||
| 57 | |||
| 58 | function moveContent() { | ||
| 59 | window.opener.tinyMCE.get(oeID).setContent(tinyMCE.activeEditor.getContent()); | ||
| 60 | } | ||
| 61 | |||
| 62 | function closeFullscreen() { | ||
| 63 | moveContent(); | ||
| 64 | window.close(); | ||
| 65 | } | ||
| 66 | |||
| 67 | function doParentSubmit() { | ||
| 68 | moveContent(); | ||
| 69 | |||
| 70 | if (window.opener.tinyMCE.selectedInstance.formElement.form) | ||
| 71 | window.opener.tinyMCE.selectedInstance.formElement.form.submit(); | ||
| 72 | |||
| 73 | window.close(); | ||
| 74 | |||
| 75 | return false; | ||
| 76 | } | ||
| 77 | |||
| 78 | function render() { | ||
| 79 | var e = document.getElementById('fullscreenarea'), vp, ed, ow, oh, dom = tinymce.DOM; | ||
| 80 | |||
| 81 | e.value = window.opener.tinyMCE.get(oeID).getContent(); | ||
| 82 | |||
| 83 | vp = dom.getViewPort(); | ||
| 84 | settings.width = vp.w; | ||
| 85 | settings.height = vp.h - 15; | ||
| 86 | |||
| 87 | tinymce.dom.Event.add(window, 'resize', function() { | ||
| 88 | var vp = dom.getViewPort(); | ||
| 89 | |||
| 90 | tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h); | ||
| 91 | }); | ||
| 92 | |||
| 93 | tinyMCE.init(settings); | ||
| 94 | } | ||
| 95 | |||
| 96 | // Add onunload | ||
| 97 | tinymce.dom.Event.add(window, "beforeunload", unloadHandler); | ||
| 98 | </script> | ||
| 99 | </head> | ||
| 100 | <body style="margin:0;overflow:hidden;width:100%;height:100%" scrolling="no" scroll="no"> | ||
| 101 | <form onsubmit="doParentSubmit();"> | ||
| 102 | <textarea id="fullscreenarea" style="width:100%; height:100%"></textarea> | ||
| 103 | </form> | ||
| 104 | |||
| 105 | <script type="text/javascript"> | ||
| 106 | render(); | ||
| 107 | </script> | ||
| 108 | |||
| 109 | </body> | ||
| 110 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/iespell/editor_plugin.js b/public/javascripts/tiny_mce/plugins/iespell/editor_plugin.js deleted file mode 100644 index e9cba10..0000000 --- a/public/javascripts/tiny_mce/plugins/iespell/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.IESpell",{init:function(a,b){var c=this,d;if(!tinymce.isIE){return}c.editor=a;a.addCommand("mceIESpell",function(){try{d=new ActiveXObject("ieSpell.ieSpellExtension");d.CheckDocumentNode(a.getDoc().documentElement)}catch(f){if(f.number==-2146827859){a.windowManager.confirm(a.getLang("iespell.download"),function(e){if(e){window.open("http://www.iespell.com/download.php","ieSpellDownload","")}})}else{a.windowManager.alert("Error Loading ieSpell: Exception "+f.number)}}});a.addButton("iespell",{title:"iespell.iespell_desc",cmd:"mceIESpell"})},getInfo:function(){return{longname:"IESpell (IE Only)",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("iespell",tinymce.plugins.IESpell)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/iespell/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/iespell/editor_plugin_src.js deleted file mode 100644 index a68f69a..0000000 --- a/public/javascripts/tiny_mce/plugins/iespell/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,51 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.IESpell', { | ||
| 10 | init : function(ed, url) { | ||
| 11 | var t = this, sp; | ||
| 12 | |||
| 13 | if (!tinymce.isIE) | ||
| 14 | return; | ||
| 15 | |||
| 16 | t.editor = ed; | ||
| 17 | |||
| 18 | // Register commands | ||
| 19 | ed.addCommand('mceIESpell', function() { | ||
| 20 | try { | ||
| 21 | sp = new ActiveXObject("ieSpell.ieSpellExtension"); | ||
| 22 | sp.CheckDocumentNode(ed.getDoc().documentElement); | ||
| 23 | } catch (e) { | ||
| 24 | if (e.number == -2146827859) { | ||
| 25 | ed.windowManager.confirm(ed.getLang("iespell.download"), function(s) { | ||
| 26 | if (s) | ||
| 27 | window.open('http://www.iespell.com/download.php', 'ieSpellDownload', ''); | ||
| 28 | }); | ||
| 29 | } else | ||
| 30 | ed.windowManager.alert("Error Loading ieSpell: Exception " + e.number); | ||
| 31 | } | ||
| 32 | }); | ||
| 33 | |||
| 34 | // Register buttons | ||
| 35 | ed.addButton('iespell', {title : 'iespell.iespell_desc', cmd : 'mceIESpell'}); | ||
| 36 | }, | ||
| 37 | |||
| 38 | getInfo : function() { | ||
| 39 | return { | ||
| 40 | longname : 'IESpell (IE Only)', | ||
| 41 | author : 'Moxiecode Systems AB', | ||
| 42 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 43 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell', | ||
| 44 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 45 | }; | ||
| 46 | } | ||
| 47 | }); | ||
| 48 | |||
| 49 | // Register plugin | ||
| 50 | tinymce.PluginManager.add('iespell', tinymce.plugins.IESpell); | ||
| 51 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin.js b/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin.js deleted file mode 100644 index 07ea477..0000000 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(r,j){var y=this,i,k="",q=y.editor,g=0,s=0,h,m,n,o,l,v,x;r=r||{};j=j||{};if(!r.inline){return y.parent(r,j)}if(!r.type){y.bookmark=q.selection.getBookmark(1)}i=d.uniqueId();h=d.getViewPort();r.width=parseInt(r.width||320);r.height=parseInt(r.height||240)+(tinymce.isIE?8:0);r.min_width=parseInt(r.min_width||150);r.min_height=parseInt(r.min_height||100);r.max_width=parseInt(r.max_width||2000);r.max_height=parseInt(r.max_height||2000);r.left=r.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(r.width/2)));r.top=r.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(r.height/2)));r.movable=r.resizable=true;j.mce_width=r.width;j.mce_height=r.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=r.auto_focus;y.features=r;y.params=j;y.onOpen.dispatch(y,r,j);if(r.type){k+=" mceModal";if(r.type){k+=" mce"+r.type.substring(0,1).toUpperCase()+r.type.substring(1)}r.resizable=false}if(r.statusbar){k+=" mceStatusbar"}if(r.resizable){k+=" mceResizable"}if(r.minimizable){k+=" mceMinimizable"}if(r.maximizable){k+=" mceMaximizable"}if(r.movable){k+=" mceMovable"}y._addAll(d.doc.body,["div",{id:i,"class":q.settings.inlinepopups_skin||"clearlooks2",style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},r.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!r.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;s+=d.get(i+"_top").clientHeight;s+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:r.top,left:r.left,width:r.width+g,height:r.height+s});x=r.url||r.file;if(x){if(tinymce.relaxedDomain){x+=(x.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}x=tinymce._addVer(x)}if(!r.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:r.width,height:r.height});d.setAttrib(i+"_ifr","src",x)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(r.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",r.content.replace("\n","<br />"))}n=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=y.windows[i];y.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return y._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return y._startDrag(i,t,u.className.substring(13))}}}}}});o=a.add(i,"click",function(f){var p=f.target;y.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":y.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":r.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});v=y.windows[i]={id:i,mousedown_func:n,click_func:o,element:new b(i,{blocker:1,container:q.getContainer()}),iframeElement:new b(i+"_ifr"),features:r,deltaWidth:g,deltaHeight:s};v.iframeElement.on("focus",function(){y.focus(i)});if(y.count==0&&y.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(y.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:y.zIndex-1}});d.show("mceModalBlocker")}else{d.setStyle("mceModalBlocker","z-index",y.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}y.focus(i);y._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}y.count++;return v},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;g<h.length;g++){f._addAll(k,h[g])}}}},_startDrag:function(v,G,E){var o=this,u,z,C=d.doc,f,l=o.windows[v],h=l.element,y=h.getXY(),x,q,F,g,A,s,r,j,i,m,k,n,B;g={x:0,y:0};A=d.getViewPort();A.w-=2;A.h-=2;j=G.screenX;i=G.screenY;m=k=n=B=0;u=a.add(C,"mouseup",function(p){a.remove(C,"mouseup",u);a.remove(C,"mousemove",z);if(f){f.remove()}h.moveBy(m,k);h.resizeBy(n,B);q=h.getSize();d.setStyles(v+"_ifr",{width:q.w-l.deltaWidth,height:q.h-l.deltaHeight});o._fixIELayout(v,1);return a.cancel(p)});if(E!="Move"){D()}function D(){if(f){return}o._fixIELayout(v,0);d.add(C.body,"div",{id:"mceEventBlocker","class":"mceEventBlocker "+(o.editor.settings.inlinepopups_skin||"clearlooks2"),style:{zIndex:o.zIndex+1}});if(tinymce.isIE6||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceEventBlocker",{position:"absolute",left:A.x,top:A.y,width:A.w-2,height:A.h-2})}f=new b("mceEventBlocker");f.update();x=h.getXY();q=h.getSize();s=g.x+x.x-A.x;r=g.y+x.y-A.y;d.add(f.get(),"div",{id:"mcePlaceHolder","class":"mcePlaceHolder",style:{left:s,top:r,width:q.w,height:q.h}});F=new b("mcePlaceHolder")}z=a.add(C,"mousemove",function(w){var p,H,t;D();p=w.screenX-j;H=w.screenY-i;switch(E){case"ResizeW":m=p;n=0-p;break;case"ResizeE":n=p;break;case"ResizeN":case"ResizeNW":case"ResizeNE":if(E=="ResizeNW"){m=p;n=0-p}else{if(E=="ResizeNE"){n=p}}k=H;B=0-H;break;case"ResizeS":case"ResizeSW":case"ResizeSE":if(E=="ResizeSW"){m=p;n=0-p}else{if(E=="ResizeSE"){n=p}}B=H;break;case"mceMove":m=p;k=H;break}if(n<(t=l.features.min_width-q.w)){if(m!==0){m+=n-t}n=t}if(B<(t=l.features.min_height-q.h)){if(k!==0){k+=B-t}B=t}n=Math.min(n,l.features.max_width-q.w);B=Math.min(B,l.features.max_height-q.h);m=Math.max(m,A.x-(s+A.x));k=Math.max(k,A.y-(r+A.y));m=Math.min(m,(A.w+A.x)-(s+q.w+A.x));k=Math.min(k,(A.h+A.y)-(r+q.h+A.y));if(m+k!==0){if(s+m<0){m=0}if(r+k<0){k=0}F.moveTo(s+m,r+k)}if(n+B!==0){F.resizeTo(q.w+n,q.h+B)}return a.cancel(w)});return a.cancel(G)},resizeBy:function(g,h,i){var f=this.windows[i];if(f){f.element.resizeBy(g,h);f.iframeElement.resizeBy(g,h)}},close:function(j,l){var h=this,g,k=d.doc,f=0,i,l;l=h._findId(l||j);if(!h.windows[l]){h.parent(j);return}h.count--;if(h.count==0){d.remove("mceModalBlocker")}if(g=h.windows[l]){h.onClose.dispatch(h);a.remove(k,"mousedown",g.mousedownFunc);a.remove(k,"click",g.clickFunc);a.clear(l);a.clear(l+"_ifr");d.setAttrib(l+"_ifr","src",'javascript:""');g.element.remove();delete h.windows[l];e(h.windows,function(m){if(m.zIndex>f){i=m;f=m.zIndex}});if(i){h.focus(i.id)}}},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js deleted file mode 100644 index fffca5a..0000000 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,632 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 1150 2009-06-01 11:50:46Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | var DOM = tinymce.DOM, Element = tinymce.dom.Element, Event = tinymce.dom.Event, each = tinymce.each, is = tinymce.is; | ||
| 10 | |||
| 11 | tinymce.create('tinymce.plugins.InlinePopups', { | ||
| 12 | init : function(ed, url) { | ||
| 13 | // Replace window manager | ||
| 14 | ed.onBeforeRenderUI.add(function() { | ||
| 15 | ed.windowManager = new tinymce.InlineWindowManager(ed); | ||
| 16 | DOM.loadCSS(url + '/skins/' + (ed.settings.inlinepopups_skin || 'clearlooks2') + "/window.css"); | ||
| 17 | }); | ||
| 18 | }, | ||
| 19 | |||
| 20 | getInfo : function() { | ||
| 21 | return { | ||
| 22 | longname : 'InlinePopups', | ||
| 23 | author : 'Moxiecode Systems AB', | ||
| 24 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 25 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups', | ||
| 26 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 27 | }; | ||
| 28 | } | ||
| 29 | }); | ||
| 30 | |||
| 31 | tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager', { | ||
| 32 | InlineWindowManager : function(ed) { | ||
| 33 | var t = this; | ||
| 34 | |||
| 35 | t.parent(ed); | ||
| 36 | t.zIndex = 300000; | ||
| 37 | t.count = 0; | ||
| 38 | t.windows = {}; | ||
| 39 | }, | ||
| 40 | |||
| 41 | open : function(f, p) { | ||
| 42 | var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u; | ||
| 43 | |||
| 44 | f = f || {}; | ||
| 45 | p = p || {}; | ||
| 46 | |||
| 47 | // Run native windows | ||
| 48 | if (!f.inline) | ||
| 49 | return t.parent(f, p); | ||
| 50 | |||
| 51 | // Only store selection if the type is a normal window | ||
| 52 | if (!f.type) | ||
| 53 | t.bookmark = ed.selection.getBookmark(1); | ||
| 54 | |||
| 55 | id = DOM.uniqueId(); | ||
| 56 | vp = DOM.getViewPort(); | ||
| 57 | f.width = parseInt(f.width || 320); | ||
| 58 | f.height = parseInt(f.height || 240) + (tinymce.isIE ? 8 : 0); | ||
| 59 | f.min_width = parseInt(f.min_width || 150); | ||
| 60 | f.min_height = parseInt(f.min_height || 100); | ||
| 61 | f.max_width = parseInt(f.max_width || 2000); | ||
| 62 | f.max_height = parseInt(f.max_height || 2000); | ||
| 63 | f.left = f.left || Math.round(Math.max(vp.x, vp.x + (vp.w / 2.0) - (f.width / 2.0))); | ||
| 64 | f.top = f.top || Math.round(Math.max(vp.y, vp.y + (vp.h / 2.0) - (f.height / 2.0))); | ||
| 65 | f.movable = f.resizable = true; | ||
| 66 | p.mce_width = f.width; | ||
| 67 | p.mce_height = f.height; | ||
| 68 | p.mce_inline = true; | ||
| 69 | p.mce_window_id = id; | ||
| 70 | p.mce_auto_focus = f.auto_focus; | ||
| 71 | |||
| 72 | // Transpose | ||
| 73 | // po = DOM.getPos(ed.getContainer()); | ||
| 74 | // f.left -= po.x; | ||
| 75 | // f.top -= po.y; | ||
| 76 | |||
| 77 | t.features = f; | ||
| 78 | t.params = p; | ||
| 79 | t.onOpen.dispatch(t, f, p); | ||
| 80 | |||
| 81 | if (f.type) { | ||
| 82 | opt += ' mceModal'; | ||
| 83 | |||
| 84 | if (f.type) | ||
| 85 | opt += ' mce' + f.type.substring(0, 1).toUpperCase() + f.type.substring(1); | ||
| 86 | |||
| 87 | f.resizable = false; | ||
| 88 | } | ||
| 89 | |||
| 90 | if (f.statusbar) | ||
| 91 | opt += ' mceStatusbar'; | ||
| 92 | |||
| 93 | if (f.resizable) | ||
| 94 | opt += ' mceResizable'; | ||
| 95 | |||
| 96 | if (f.minimizable) | ||
| 97 | opt += ' mceMinimizable'; | ||
| 98 | |||
| 99 | if (f.maximizable) | ||
| 100 | opt += ' mceMaximizable'; | ||
| 101 | |||
| 102 | if (f.movable) | ||
| 103 | opt += ' mceMovable'; | ||
| 104 | |||
| 105 | // Create DOM objects | ||
| 106 | t._addAll(DOM.doc.body, | ||
| 107 | ['div', {id : id, 'class' : ed.settings.inlinepopups_skin || 'clearlooks2', style : 'width:100px;height:100px'}, | ||
| 108 | ['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt}, | ||
| 109 | ['div', {id : id + '_top', 'class' : 'mceTop'}, | ||
| 110 | ['div', {'class' : 'mceLeft'}], | ||
| 111 | ['div', {'class' : 'mceCenter'}], | ||
| 112 | ['div', {'class' : 'mceRight'}], | ||
| 113 | ['span', {id : id + '_title'}, f.title || ''] | ||
| 114 | ], | ||
| 115 | |||
| 116 | ['div', {id : id + '_middle', 'class' : 'mceMiddle'}, | ||
| 117 | ['div', {id : id + '_left', 'class' : 'mceLeft'}], | ||
| 118 | ['span', {id : id + '_content'}], | ||
| 119 | ['div', {id : id + '_right', 'class' : 'mceRight'}] | ||
| 120 | ], | ||
| 121 | |||
| 122 | ['div', {id : id + '_bottom', 'class' : 'mceBottom'}, | ||
| 123 | ['div', {'class' : 'mceLeft'}], | ||
| 124 | ['div', {'class' : 'mceCenter'}], | ||
| 125 | ['div', {'class' : 'mceRight'}], | ||
| 126 | ['span', {id : id + '_status'}, 'Content'] | ||
| 127 | ], | ||
| 128 | |||
| 129 | ['a', {'class' : 'mceMove', tabindex : '-1', href : 'javascript:;'}], | ||
| 130 | ['a', {'class' : 'mceMin', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], | ||
| 131 | ['a', {'class' : 'mceMax', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], | ||
| 132 | ['a', {'class' : 'mceMed', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], | ||
| 133 | ['a', {'class' : 'mceClose', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}], | ||
| 134 | ['a', {id : id + '_resize_n', 'class' : 'mceResize mceResizeN', tabindex : '-1', href : 'javascript:;'}], | ||
| 135 | ['a', {id : id + '_resize_s', 'class' : 'mceResize mceResizeS', tabindex : '-1', href : 'javascript:;'}], | ||
| 136 | ['a', {id : id + '_resize_w', 'class' : 'mceResize mceResizeW', tabindex : '-1', href : 'javascript:;'}], | ||
| 137 | ['a', {id : id + '_resize_e', 'class' : 'mceResize mceResizeE', tabindex : '-1', href : 'javascript:;'}], | ||
| 138 | ['a', {id : id + '_resize_nw', 'class' : 'mceResize mceResizeNW', tabindex : '-1', href : 'javascript:;'}], | ||
| 139 | ['a', {id : id + '_resize_ne', 'class' : 'mceResize mceResizeNE', tabindex : '-1', href : 'javascript:;'}], | ||
| 140 | ['a', {id : id + '_resize_sw', 'class' : 'mceResize mceResizeSW', tabindex : '-1', href : 'javascript:;'}], | ||
| 141 | ['a', {id : id + '_resize_se', 'class' : 'mceResize mceResizeSE', tabindex : '-1', href : 'javascript:;'}] | ||
| 142 | ] | ||
| 143 | ] | ||
| 144 | ); | ||
| 145 | |||
| 146 | DOM.setStyles(id, {top : -10000, left : -10000}); | ||
| 147 | |||
| 148 | // Fix gecko rendering bug, where the editors iframe messed with window contents | ||
| 149 | if (tinymce.isGecko) | ||
| 150 | DOM.setStyle(id, 'overflow', 'auto'); | ||
| 151 | |||
| 152 | // Measure borders | ||
| 153 | if (!f.type) { | ||
| 154 | dw += DOM.get(id + '_left').clientWidth; | ||
| 155 | dw += DOM.get(id + '_right').clientWidth; | ||
| 156 | dh += DOM.get(id + '_top').clientHeight; | ||
| 157 | dh += DOM.get(id + '_bottom').clientHeight; | ||
| 158 | } | ||
| 159 | |||
| 160 | // Resize window | ||
| 161 | DOM.setStyles(id, {top : f.top, left : f.left, width : f.width + dw, height : f.height + dh}); | ||
| 162 | |||
| 163 | u = f.url || f.file; | ||
| 164 | if (u) { | ||
| 165 | if (tinymce.relaxedDomain) | ||
| 166 | u += (u.indexOf('?') == -1 ? '?' : '&') + 'mce_rdomain=' + tinymce.relaxedDomain; | ||
| 167 | |||
| 168 | u = tinymce._addVer(u); | ||
| 169 | } | ||
| 170 | |||
| 171 | if (!f.type) { | ||
| 172 | DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:""', frameBorder : 0, style : 'border:0;width:10px;height:10px'}); | ||
| 173 | DOM.setStyles(id + '_ifr', {width : f.width, height : f.height}); | ||
| 174 | DOM.setAttrib(id + '_ifr', 'src', u); | ||
| 175 | } else { | ||
| 176 | DOM.add(id + '_wrapper', 'a', {id : id + '_ok', 'class' : 'mceButton mceOk', href : 'javascript:;', onmousedown : 'return false;'}, 'Ok'); | ||
| 177 | |||
| 178 | if (f.type == 'confirm') | ||
| 179 | DOM.add(id + '_wrapper', 'a', {'class' : 'mceButton mceCancel', href : 'javascript:;', onmousedown : 'return false;'}, 'Cancel'); | ||
| 180 | |||
| 181 | DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'}); | ||
| 182 | DOM.setHTML(id + '_content', f.content.replace('\n', '<br />')); | ||
| 183 | } | ||
| 184 | |||
| 185 | // Register events | ||
| 186 | mdf = Event.add(id, 'mousedown', function(e) { | ||
| 187 | var n = e.target, w, vp; | ||
| 188 | |||
| 189 | w = t.windows[id]; | ||
| 190 | t.focus(id); | ||
| 191 | |||
| 192 | if (n.nodeName == 'A' || n.nodeName == 'a') { | ||
| 193 | if (n.className == 'mceMax') { | ||
| 194 | w.oldPos = w.element.getXY(); | ||
| 195 | w.oldSize = w.element.getSize(); | ||
| 196 | |||
| 197 | vp = DOM.getViewPort(); | ||
| 198 | |||
| 199 | // Reduce viewport size to avoid scrollbars | ||
| 200 | vp.w -= 2; | ||
| 201 | vp.h -= 2; | ||
| 202 | |||
| 203 | w.element.moveTo(vp.x, vp.y); | ||
| 204 | w.element.resizeTo(vp.w, vp.h); | ||
| 205 | DOM.setStyles(id + '_ifr', {width : vp.w - w.deltaWidth, height : vp.h - w.deltaHeight}); | ||
| 206 | DOM.addClass(id + '_wrapper', 'mceMaximized'); | ||
| 207 | } else if (n.className == 'mceMed') { | ||
| 208 | // Reset to old size | ||
| 209 | w.element.moveTo(w.oldPos.x, w.oldPos.y); | ||
| 210 | w.element.resizeTo(w.oldSize.w, w.oldSize.h); | ||
| 211 | w.iframeElement.resizeTo(w.oldSize.w - w.deltaWidth, w.oldSize.h - w.deltaHeight); | ||
| 212 | |||
| 213 | DOM.removeClass(id + '_wrapper', 'mceMaximized'); | ||
| 214 | } else if (n.className == 'mceMove') | ||
| 215 | return t._startDrag(id, e, n.className); | ||
| 216 | else if (DOM.hasClass(n, 'mceResize')) | ||
| 217 | return t._startDrag(id, e, n.className.substring(13)); | ||
| 218 | } | ||
| 219 | }); | ||
| 220 | |||
| 221 | clf = Event.add(id, 'click', function(e) { | ||
| 222 | var n = e.target; | ||
| 223 | |||
| 224 | t.focus(id); | ||
| 225 | |||
| 226 | if (n.nodeName == 'A' || n.nodeName == 'a') { | ||
| 227 | switch (n.className) { | ||
| 228 | case 'mceClose': | ||
| 229 | t.close(null, id); | ||
| 230 | return Event.cancel(e); | ||
| 231 | |||
| 232 | case 'mceButton mceOk': | ||
| 233 | case 'mceButton mceCancel': | ||
| 234 | f.button_func(n.className == 'mceButton mceOk'); | ||
| 235 | return Event.cancel(e); | ||
| 236 | } | ||
| 237 | } | ||
| 238 | }); | ||
| 239 | |||
| 240 | // Add window | ||
| 241 | w = t.windows[id] = { | ||
| 242 | id : id, | ||
| 243 | mousedown_func : mdf, | ||
| 244 | click_func : clf, | ||
| 245 | element : new Element(id, {blocker : 1, container : ed.getContainer()}), | ||
| 246 | iframeElement : new Element(id + '_ifr'), | ||
| 247 | features : f, | ||
| 248 | deltaWidth : dw, | ||
| 249 | deltaHeight : dh | ||
| 250 | }; | ||
| 251 | |||
| 252 | w.iframeElement.on('focus', function() { | ||
| 253 | t.focus(id); | ||
| 254 | }); | ||
| 255 | |||
| 256 | // Setup blocker | ||
| 257 | if (t.count == 0 && t.editor.getParam('dialog_type', 'modal') == 'modal') { | ||
| 258 | DOM.add(DOM.doc.body, 'div', { | ||
| 259 | id : 'mceModalBlocker', | ||
| 260 | 'class' : (t.editor.settings.inlinepopups_skin || 'clearlooks2') + '_modalBlocker', | ||
| 261 | style : {zIndex : t.zIndex - 1} | ||
| 262 | }); | ||
| 263 | |||
| 264 | DOM.show('mceModalBlocker'); // Reduces flicker in IE | ||
| 265 | } else | ||
| 266 | DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1); | ||
| 267 | |||
| 268 | if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel)) | ||
| 269 | DOM.setStyles('mceModalBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2}); | ||
| 270 | |||
| 271 | t.focus(id); | ||
| 272 | t._fixIELayout(id, 1); | ||
| 273 | |||
| 274 | // Focus ok button | ||
| 275 | if (DOM.get(id + '_ok')) | ||
| 276 | DOM.get(id + '_ok').focus(); | ||
| 277 | |||
| 278 | t.count++; | ||
| 279 | |||
| 280 | return w; | ||
| 281 | }, | ||
| 282 | |||
| 283 | focus : function(id) { | ||
| 284 | var t = this, w; | ||
| 285 | |||
| 286 | if (w = t.windows[id]) { | ||
| 287 | w.zIndex = this.zIndex++; | ||
| 288 | w.element.setStyle('zIndex', w.zIndex); | ||
| 289 | w.element.update(); | ||
| 290 | |||
| 291 | id = id + '_wrapper'; | ||
| 292 | DOM.removeClass(t.lastId, 'mceFocus'); | ||
| 293 | DOM.addClass(id, 'mceFocus'); | ||
| 294 | t.lastId = id; | ||
| 295 | } | ||
| 296 | }, | ||
| 297 | |||
| 298 | _addAll : function(te, ne) { | ||
| 299 | var i, n, t = this, dom = tinymce.DOM; | ||
| 300 | |||
| 301 | if (is(ne, 'string')) | ||
| 302 | te.appendChild(dom.doc.createTextNode(ne)); | ||
| 303 | else if (ne.length) { | ||
| 304 | te = te.appendChild(dom.create(ne[0], ne[1])); | ||
| 305 | |||
| 306 | for (i=2; i<ne.length; i++) | ||
| 307 | t._addAll(te, ne[i]); | ||
| 308 | } | ||
| 309 | }, | ||
| 310 | |||
| 311 | _startDrag : function(id, se, ac) { | ||
| 312 | var t = this, mu, mm, d = DOM.doc, eb, w = t.windows[id], we = w.element, sp = we.getXY(), p, sz, ph, cp, vp, sx, sy, sex, sey, dx, dy, dw, dh; | ||
| 313 | |||
| 314 | // Get positons and sizes | ||
| 315 | // cp = DOM.getPos(t.editor.getContainer()); | ||
| 316 | cp = {x : 0, y : 0}; | ||
| 317 | vp = DOM.getViewPort(); | ||
| 318 | |||
| 319 | // Reduce viewport size to avoid scrollbars while dragging | ||
| 320 | vp.w -= 2; | ||
| 321 | vp.h -= 2; | ||
| 322 | |||
| 323 | sex = se.screenX; | ||
| 324 | sey = se.screenY; | ||
| 325 | dx = dy = dw = dh = 0; | ||
| 326 | |||
| 327 | // Handle mouse up | ||
| 328 | mu = Event.add(d, 'mouseup', function(e) { | ||
| 329 | Event.remove(d, 'mouseup', mu); | ||
| 330 | Event.remove(d, 'mousemove', mm); | ||
| 331 | |||
| 332 | if (eb) | ||
| 333 | eb.remove(); | ||
| 334 | |||
| 335 | we.moveBy(dx, dy); | ||
| 336 | we.resizeBy(dw, dh); | ||
| 337 | sz = we.getSize(); | ||
| 338 | DOM.setStyles(id + '_ifr', {width : sz.w - w.deltaWidth, height : sz.h - w.deltaHeight}); | ||
| 339 | t._fixIELayout(id, 1); | ||
| 340 | |||
| 341 | return Event.cancel(e); | ||
| 342 | }); | ||
| 343 | |||
| 344 | if (ac != 'Move') | ||
| 345 | startMove(); | ||
| 346 | |||
| 347 | function startMove() { | ||
| 348 | if (eb) | ||
| 349 | return; | ||
| 350 | |||
| 351 | t._fixIELayout(id, 0); | ||
| 352 | |||
| 353 | // Setup event blocker | ||
| 354 | DOM.add(d.body, 'div', { | ||
| 355 | id : 'mceEventBlocker', | ||
| 356 | 'class' : 'mceEventBlocker ' + (t.editor.settings.inlinepopups_skin || 'clearlooks2'), | ||
| 357 | style : {zIndex : t.zIndex + 1} | ||
| 358 | }); | ||
| 359 | |||
| 360 | if (tinymce.isIE6 || (tinymce.isIE && !DOM.boxModel)) | ||
| 361 | DOM.setStyles('mceEventBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2}); | ||
| 362 | |||
| 363 | eb = new Element('mceEventBlocker'); | ||
| 364 | eb.update(); | ||
| 365 | |||
| 366 | // Setup placeholder | ||
| 367 | p = we.getXY(); | ||
| 368 | sz = we.getSize(); | ||
| 369 | sx = cp.x + p.x - vp.x; | ||
| 370 | sy = cp.y + p.y - vp.y; | ||
| 371 | DOM.add(eb.get(), 'div', {id : 'mcePlaceHolder', 'class' : 'mcePlaceHolder', style : {left : sx, top : sy, width : sz.w, height : sz.h}}); | ||
| 372 | ph = new Element('mcePlaceHolder'); | ||
| 373 | }; | ||
| 374 | |||
| 375 | // Handle mouse move/drag | ||
| 376 | mm = Event.add(d, 'mousemove', function(e) { | ||
| 377 | var x, y, v; | ||
| 378 | |||
| 379 | startMove(); | ||
| 380 | |||
| 381 | x = e.screenX - sex; | ||
| 382 | y = e.screenY - sey; | ||
| 383 | |||
| 384 | switch (ac) { | ||
| 385 | case 'ResizeW': | ||
| 386 | dx = x; | ||
| 387 | dw = 0 - x; | ||
| 388 | break; | ||
| 389 | |||
| 390 | case 'ResizeE': | ||
| 391 | dw = x; | ||
| 392 | break; | ||
| 393 | |||
| 394 | case 'ResizeN': | ||
| 395 | case 'ResizeNW': | ||
| 396 | case 'ResizeNE': | ||
| 397 | if (ac == "ResizeNW") { | ||
| 398 | dx = x; | ||
| 399 | dw = 0 - x; | ||
| 400 | } else if (ac == "ResizeNE") | ||
| 401 | dw = x; | ||
| 402 | |||
| 403 | dy = y; | ||
| 404 | dh = 0 - y; | ||
| 405 | break; | ||
| 406 | |||
| 407 | case 'ResizeS': | ||
| 408 | case 'ResizeSW': | ||
| 409 | case 'ResizeSE': | ||
| 410 | if (ac == "ResizeSW") { | ||
| 411 | dx = x; | ||
| 412 | dw = 0 - x; | ||
| 413 | } else if (ac == "ResizeSE") | ||
| 414 | dw = x; | ||
| 415 | |||
| 416 | dh = y; | ||
| 417 | break; | ||
| 418 | |||
| 419 | case 'mceMove': | ||
| 420 | dx = x; | ||
| 421 | dy = y; | ||
| 422 | break; | ||
| 423 | } | ||
| 424 | |||
| 425 | // Boundary check | ||
| 426 | if (dw < (v = w.features.min_width - sz.w)) { | ||
| 427 | if (dx !== 0) | ||
| 428 | dx += dw - v; | ||
| 429 | |||
| 430 | dw = v; | ||
| 431 | } | ||
| 432 | |||
| 433 | if (dh < (v = w.features.min_height - sz.h)) { | ||
| 434 | if (dy !== 0) | ||
| 435 | dy += dh - v; | ||
| 436 | |||
| 437 | dh = v; | ||
| 438 | } | ||
| 439 | |||
| 440 | dw = Math.min(dw, w.features.max_width - sz.w); | ||
| 441 | dh = Math.min(dh, w.features.max_height - sz.h); | ||
| 442 | dx = Math.max(dx, vp.x - (sx + vp.x)); | ||
| 443 | dy = Math.max(dy, vp.y - (sy + vp.y)); | ||
| 444 | dx = Math.min(dx, (vp.w + vp.x) - (sx + sz.w + vp.x)); | ||
| 445 | dy = Math.min(dy, (vp.h + vp.y) - (sy + sz.h + vp.y)); | ||
| 446 | |||
| 447 | // Move if needed | ||
| 448 | if (dx + dy !== 0) { | ||
| 449 | if (sx + dx < 0) | ||
| 450 | dx = 0; | ||
| 451 | |||
| 452 | if (sy + dy < 0) | ||
| 453 | dy = 0; | ||
| 454 | |||
| 455 | ph.moveTo(sx + dx, sy + dy); | ||
| 456 | } | ||
| 457 | |||
| 458 | // Resize if needed | ||
| 459 | if (dw + dh !== 0) | ||
| 460 | ph.resizeTo(sz.w + dw, sz.h + dh); | ||
| 461 | |||
| 462 | return Event.cancel(e); | ||
| 463 | }); | ||
| 464 | |||
| 465 | return Event.cancel(se); | ||
| 466 | }, | ||
| 467 | |||
| 468 | resizeBy : function(dw, dh, id) { | ||
| 469 | var w = this.windows[id]; | ||
| 470 | |||
| 471 | if (w) { | ||
| 472 | w.element.resizeBy(dw, dh); | ||
| 473 | w.iframeElement.resizeBy(dw, dh); | ||
| 474 | } | ||
| 475 | }, | ||
| 476 | |||
| 477 | close : function(win, id) { | ||
| 478 | var t = this, w, d = DOM.doc, ix = 0, fw, id; | ||
| 479 | |||
| 480 | id = t._findId(id || win); | ||
| 481 | |||
| 482 | // Probably not inline | ||
| 483 | if (!t.windows[id]) { | ||
| 484 | t.parent(win); | ||
| 485 | return; | ||
| 486 | } | ||
| 487 | |||
| 488 | t.count--; | ||
| 489 | |||
| 490 | if (t.count == 0) | ||
| 491 | DOM.remove('mceModalBlocker'); | ||
| 492 | |||
| 493 | if (w = t.windows[id]) { | ||
| 494 | t.onClose.dispatch(t); | ||
| 495 | Event.remove(d, 'mousedown', w.mousedownFunc); | ||
| 496 | Event.remove(d, 'click', w.clickFunc); | ||
| 497 | Event.clear(id); | ||
| 498 | Event.clear(id + '_ifr'); | ||
| 499 | |||
| 500 | DOM.setAttrib(id + '_ifr', 'src', 'javascript:""'); // Prevent leak | ||
| 501 | w.element.remove(); | ||
| 502 | delete t.windows[id]; | ||
| 503 | |||
| 504 | // Find front most window and focus that | ||
| 505 | each (t.windows, function(w) { | ||
| 506 | if (w.zIndex > ix) { | ||
| 507 | fw = w; | ||
| 508 | ix = w.zIndex; | ||
| 509 | } | ||
| 510 | }); | ||
| 511 | |||
| 512 | if (fw) | ||
| 513 | t.focus(fw.id); | ||
| 514 | } | ||
| 515 | }, | ||
| 516 | |||
| 517 | setTitle : function(w, ti) { | ||
| 518 | var e; | ||
| 519 | |||
| 520 | w = this._findId(w); | ||
| 521 | |||
| 522 | if (e = DOM.get(w + '_title')) | ||
| 523 | e.innerHTML = DOM.encode(ti); | ||
| 524 | }, | ||
| 525 | |||
| 526 | alert : function(txt, cb, s) { | ||
| 527 | var t = this, w; | ||
| 528 | |||
| 529 | w = t.open({ | ||
| 530 | title : t, | ||
| 531 | type : 'alert', | ||
| 532 | button_func : function(s) { | ||
| 533 | if (cb) | ||
| 534 | cb.call(s || t, s); | ||
| 535 | |||
| 536 | t.close(null, w.id); | ||
| 537 | }, | ||
| 538 | content : DOM.encode(t.editor.getLang(txt, txt)), | ||
| 539 | inline : 1, | ||
| 540 | width : 400, | ||
| 541 | height : 130 | ||
| 542 | }); | ||
| 543 | }, | ||
| 544 | |||
| 545 | confirm : function(txt, cb, s) { | ||
| 546 | var t = this, w; | ||
| 547 | |||
| 548 | w = t.open({ | ||
| 549 | title : t, | ||
| 550 | type : 'confirm', | ||
| 551 | button_func : function(s) { | ||
| 552 | if (cb) | ||
| 553 | cb.call(s || t, s); | ||
| 554 | |||
| 555 | t.close(null, w.id); | ||
| 556 | }, | ||
| 557 | content : DOM.encode(t.editor.getLang(txt, txt)), | ||
| 558 | inline : 1, | ||
| 559 | width : 400, | ||
| 560 | height : 130 | ||
| 561 | }); | ||
| 562 | }, | ||
| 563 | |||
| 564 | // Internal functions | ||
| 565 | |||
| 566 | _findId : function(w) { | ||
| 567 | var t = this; | ||
| 568 | |||
| 569 | if (typeof(w) == 'string') | ||
| 570 | return w; | ||
| 571 | |||
| 572 | each(t.windows, function(wo) { | ||
| 573 | var ifr = DOM.get(wo.id + '_ifr'); | ||
| 574 | |||
| 575 | if (ifr && w == ifr.contentWindow) { | ||
| 576 | w = wo.id; | ||
| 577 | return false; | ||
| 578 | } | ||
| 579 | }); | ||
| 580 | |||
| 581 | return w; | ||
| 582 | }, | ||
| 583 | |||
| 584 | _fixIELayout : function(id, s) { | ||
| 585 | var w, img; | ||
| 586 | |||
| 587 | if (!tinymce.isIE6) | ||
| 588 | return; | ||
| 589 | |||
| 590 | // Fixes the bug where hover flickers and does odd things in IE6 | ||
| 591 | each(['n','s','w','e','nw','ne','sw','se'], function(v) { | ||
| 592 | var e = DOM.get(id + '_resize_' + v); | ||
| 593 | |||
| 594 | DOM.setStyles(e, { | ||
| 595 | width : s ? e.clientWidth : '', | ||
| 596 | height : s ? e.clientHeight : '', | ||
| 597 | cursor : DOM.getStyle(e, 'cursor', 1) | ||
| 598 | }); | ||
| 599 | |||
| 600 | DOM.setStyle(id + "_bottom", 'bottom', '-1px'); | ||
| 601 | |||
| 602 | e = 0; | ||
| 603 | }); | ||
| 604 | |||
| 605 | // Fixes graphics glitch | ||
| 606 | if (w = this.windows[id]) { | ||
| 607 | // Fixes rendering bug after resize | ||
| 608 | w.element.hide(); | ||
| 609 | w.element.show(); | ||
| 610 | |||
| 611 | // Forced a repaint of the window | ||
| 612 | //DOM.get(id).style.filter = ''; | ||
| 613 | |||
| 614 | // IE has a bug where images used in CSS won't get loaded | ||
| 615 | // sometimes when the cache in the browser is disabled | ||
| 616 | // This fix tries to solve it by loading the images using the image object | ||
| 617 | each(DOM.select('div,a', id), function(e, i) { | ||
| 618 | if (e.currentStyle.backgroundImage != 'none') { | ||
| 619 | img = new Image(); | ||
| 620 | img.src = e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/, '$1'); | ||
| 621 | } | ||
| 622 | }); | ||
| 623 | |||
| 624 | DOM.get(id).style.filter = ''; | ||
| 625 | } | ||
| 626 | } | ||
| 627 | }); | ||
| 628 | |||
| 629 | // Register plugin | ||
| 630 | tinymce.PluginManager.add('inlinepopups', tinymce.plugins.InlinePopups); | ||
| 631 | })(); | ||
| 632 | |||
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif deleted file mode 100644 index 94abd08..0000000 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif deleted file mode 100644 index e671094..0000000 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif deleted file mode 100644 index 6baf64a..0000000 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif deleted file mode 100644 index 497307a..0000000 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif deleted file mode 100644 index c894b2e..0000000 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif deleted file mode 100644 index c2a2ad4..0000000 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif deleted file mode 100644 index 43a735f..0000000 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css deleted file mode 100644 index 5e6fd7d..0000000 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +++ /dev/null | |||
| @@ -1,90 +0,0 @@ | |||
| 1 | /* Clearlooks 2 */ | ||
| 2 | |||
| 3 | /* Reset */ | ||
| 4 | .clearlooks2, .clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block} | ||
| 5 | |||
| 6 | /* General */ | ||
| 7 | .clearlooks2 {position:absolute; direction:ltr} | ||
| 8 | .clearlooks2 .mceWrapper {position:static} | ||
| 9 | .mceEventBlocker {position:fixed; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%} | ||
| 10 | .clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50)} | ||
| 11 | .clearlooks2_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; background:#FFF; opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60); display:none} | ||
| 12 | |||
| 13 | /* Top */ | ||
| 14 | .clearlooks2 .mceTop, .clearlooks2 .mceTop div {top:0; width:100%; height:23px} | ||
| 15 | .clearlooks2 .mceTop .mceLeft {width:6px; background:url(img/corners.gif)} | ||
| 16 | .clearlooks2 .mceTop .mceCenter {right:6px; width:100%; height:23px; background:url(img/horizontal.gif) 12px 0; clip:rect(auto auto auto 12px)} | ||
| 17 | .clearlooks2 .mceTop .mceRight {right:0; width:6px; height:23px; background:url(img/corners.gif) -12px 0} | ||
| 18 | .clearlooks2 .mceTop span {width:100%; text-align:center; vertical-align:middle; line-height:23px; font-weight:bold} | ||
| 19 | .clearlooks2 .mceFocus .mceTop .mceLeft {background:url(img/corners.gif) -6px 0} | ||
| 20 | .clearlooks2 .mceFocus .mceTop .mceCenter {background:url(img/horizontal.gif) 0 -23px} | ||
| 21 | .clearlooks2 .mceFocus .mceTop .mceRight {background:url(img/corners.gif) -18px 0} | ||
| 22 | .clearlooks2 .mceFocus .mceTop span {color:#FFF} | ||
| 23 | |||
| 24 | /* Middle */ | ||
| 25 | .clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0} | ||
| 26 | .clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto)} | ||
| 27 | .clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:url(img/vertical.gif) -5px 0} | ||
| 28 | .clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF} | ||
| 29 | .clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:url(img/vertical.gif)} | ||
| 30 | |||
| 31 | /* Bottom */ | ||
| 32 | .clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px} | ||
| 33 | .clearlooks2 .mceBottom {left:0; bottom:0; width:100%} | ||
| 34 | .clearlooks2 .mceBottom div {top:0} | ||
| 35 | .clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:url(img/corners.gif) -34px -6px} | ||
| 36 | .clearlooks2 .mceBottom .mceCenter {left:5px; width:100%; background:url(img/horizontal.gif) 0 -46px} | ||
| 37 | .clearlooks2 .mceBottom .mceRight {right:0; width:5px; background: url(img/corners.gif) -34px 0} | ||
| 38 | .clearlooks2 .mceBottom span {display:none} | ||
| 39 | .clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px} | ||
| 40 | .clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0} | ||
| 41 | .clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px} | ||
| 42 | .clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0} | ||
| 43 | .clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px} | ||
| 44 | |||
| 45 | /* Actions */ | ||
| 46 | .clearlooks2 a {width:29px; height:16px; top:3px;} | ||
| 47 | .clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0} | ||
| 48 | .clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0} | ||
| 49 | .clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0} | ||
| 50 | .clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0} | ||
| 51 | .clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px} | ||
| 52 | .clearlooks2 .mceMovable .mceMove {display:block} | ||
| 53 | .clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px} | ||
| 54 | .clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px} | ||
| 55 | .clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px} | ||
| 56 | .clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px} | ||
| 57 | .clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px} | ||
| 58 | .clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px} | ||
| 59 | .clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px} | ||
| 60 | .clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px} | ||
| 61 | .clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px} | ||
| 62 | |||
| 63 | /* Resize */ | ||
| 64 | .clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px} | ||
| 65 | .clearlooks2 .mceResizable .mceResize {display:block} | ||
| 66 | .clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none} | ||
| 67 | .clearlooks2 .mceMinimizable .mceMin {display:block} | ||
| 68 | .clearlooks2 .mceMaximizable .mceMax {display:block} | ||
| 69 | .clearlooks2 .mceMaximized .mceMed {display:block} | ||
| 70 | .clearlooks2 .mceMaximized .mceMax {display:none} | ||
| 71 | .clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize} | ||
| 72 | .clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize} | ||
| 73 | .clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize} | ||
| 74 | .clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;} | ||
| 75 | .clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize} | ||
| 76 | .clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize} | ||
| 77 | .clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize} | ||
| 78 | .clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize} | ||
| 79 | |||
| 80 | /* Alert/Confirm */ | ||
| 81 | .clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0} | ||
| 82 | .clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px} | ||
| 83 | .clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal} | ||
| 84 | .clearlooks2 a:hover {font-weight:bold;} | ||
| 85 | .clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#D6D7D5} | ||
| 86 | .clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px} | ||
| 87 | .clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)} | ||
| 88 | .clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px} | ||
| 89 | .clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto} | ||
| 90 | .clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)} \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/template.htm b/public/javascripts/tiny_mce/plugins/inlinepopups/template.htm deleted file mode 100644 index f9ec642..0000000 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/template.htm +++ /dev/null | |||
| @@ -1,387 +0,0 @@ | |||
| 1 | <!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> --> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title>Template for dialogs</title> | ||
| 5 | <link rel="stylesheet" type="text/css" href="skins/clearlooks2/window.css" /> | ||
| 6 | </head> | ||
| 7 | <body> | ||
| 8 | |||
| 9 | <div class="mceEditor"> | ||
| 10 | <div class="clearlooks2" style="width:400px; height:100px; left:10px;"> | ||
| 11 | <div class="mceWrapper"> | ||
| 12 | <div class="mceTop"> | ||
| 13 | <div class="mceLeft"></div> | ||
| 14 | <div class="mceCenter"></div> | ||
| 15 | <div class="mceRight"></div> | ||
| 16 | <span>Blured</span> | ||
| 17 | </div> | ||
| 18 | |||
| 19 | <div class="mceMiddle"> | ||
| 20 | <div class="mceLeft"></div> | ||
| 21 | <span>Content</span> | ||
| 22 | <div class="mceRight"></div> | ||
| 23 | </div> | ||
| 24 | |||
| 25 | <div class="mceBottom"> | ||
| 26 | <div class="mceLeft"></div> | ||
| 27 | <div class="mceCenter"></div> | ||
| 28 | <div class="mceRight"></div> | ||
| 29 | <span>Statusbar text.</span> | ||
| 30 | </div> | ||
| 31 | |||
| 32 | <a class="mceMove" href="#"></a> | ||
| 33 | <a class="mceMin" href="#"></a> | ||
| 34 | <a class="mceMax" href="#"></a> | ||
| 35 | <a class="mceMed" href="#"></a> | ||
| 36 | <a class="mceClose" href="#"></a> | ||
| 37 | <a class="mceResize mceResizeN" href="#"></a> | ||
| 38 | <a class="mceResize mceResizeS" href="#"></a> | ||
| 39 | <a class="mceResize mceResizeW" href="#"></a> | ||
| 40 | <a class="mceResize mceResizeE" href="#"></a> | ||
| 41 | <a class="mceResize mceResizeNW" href="#"></a> | ||
| 42 | <a class="mceResize mceResizeNE" href="#"></a> | ||
| 43 | <a class="mceResize mceResizeSW" href="#"></a> | ||
| 44 | <a class="mceResize mceResizeSE" href="#"></a> | ||
| 45 | </div> | ||
| 46 | </div> | ||
| 47 | |||
| 48 | <div class="clearlooks2" style="width:400px; height:100px; left:420px;"> | ||
| 49 | <div class="mceWrapper mceMovable mceFocus"> | ||
| 50 | <div class="mceTop"> | ||
| 51 | <div class="mceLeft"></div> | ||
| 52 | <div class="mceCenter"></div> | ||
| 53 | <div class="mceRight"></div> | ||
| 54 | <span>Focused</span> | ||
| 55 | </div> | ||
| 56 | |||
| 57 | <div class="mceMiddle"> | ||
| 58 | <div class="mceLeft"></div> | ||
| 59 | <span>Content</span> | ||
| 60 | <div class="mceRight"></div> | ||
| 61 | </div> | ||
| 62 | |||
| 63 | <div class="mceBottom"> | ||
| 64 | <div class="mceLeft"></div> | ||
| 65 | <div class="mceCenter"></div> | ||
| 66 | <div class="mceRight"></div> | ||
| 67 | <span>Statusbar text.</span> | ||
| 68 | </div> | ||
| 69 | |||
| 70 | <a class="mceMove" href="#"></a> | ||
| 71 | <a class="mceMin" href="#"></a> | ||
| 72 | <a class="mceMax" href="#"></a> | ||
| 73 | <a class="mceMed" href="#"></a> | ||
| 74 | <a class="mceClose" href="#"></a> | ||
| 75 | <a class="mceResize mceResizeN" href="#"></a> | ||
| 76 | <a class="mceResize mceResizeS" href="#"></a> | ||
| 77 | <a class="mceResize mceResizeW" href="#"></a> | ||
| 78 | <a class="mceResize mceResizeE" href="#"></a> | ||
| 79 | <a class="mceResize mceResizeNW" href="#"></a> | ||
| 80 | <a class="mceResize mceResizeNE" href="#"></a> | ||
| 81 | <a class="mceResize mceResizeSW" href="#"></a> | ||
| 82 | <a class="mceResize mceResizeSE" href="#"></a> | ||
| 83 | </div> | ||
| 84 | </div> | ||
| 85 | |||
| 86 | <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:120px;"> | ||
| 87 | <div class="mceWrapper mceMovable mceFocus mceStatusbar"> | ||
| 88 | <div class="mceTop"> | ||
| 89 | <div class="mceLeft"></div> | ||
| 90 | <div class="mceCenter"></div> | ||
| 91 | <div class="mceRight"></div> | ||
| 92 | <span>Statusbar</span> | ||
| 93 | </div> | ||
| 94 | |||
| 95 | <div class="mceMiddle"> | ||
| 96 | <div class="mceLeft"></div> | ||
| 97 | <span>Content</span> | ||
| 98 | <div class="mceRight"></div> | ||
| 99 | </div> | ||
| 100 | |||
| 101 | <div class="mceBottom"> | ||
| 102 | <div class="mceLeft"></div> | ||
| 103 | <div class="mceCenter"></div> | ||
| 104 | <div class="mceRight"></div> | ||
| 105 | <span>Statusbar text.</span> | ||
| 106 | </div> | ||
| 107 | |||
| 108 | <a class="mceMove" href="#"></a> | ||
| 109 | <a class="mceMin" href="#"></a> | ||
| 110 | <a class="mceMax" href="#"></a> | ||
| 111 | <a class="mceMed" href="#"></a> | ||
| 112 | <a class="mceClose" href="#"></a> | ||
| 113 | <a class="mceResize mceResizeN" href="#"></a> | ||
| 114 | <a class="mceResize mceResizeS" href="#"></a> | ||
| 115 | <a class="mceResize mceResizeW" href="#"></a> | ||
| 116 | <a class="mceResize mceResizeE" href="#"></a> | ||
| 117 | <a class="mceResize mceResizeNW" href="#"></a> | ||
| 118 | <a class="mceResize mceResizeNE" href="#"></a> | ||
| 119 | <a class="mceResize mceResizeSW" href="#"></a> | ||
| 120 | <a class="mceResize mceResizeSE" href="#"></a> | ||
| 121 | </div> | ||
| 122 | </div> | ||
| 123 | |||
| 124 | <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:120px;"> | ||
| 125 | <div class="mceWrapper mceMovable mceFocus mceStatusbar mceResizable"> | ||
| 126 | <div class="mceTop"> | ||
| 127 | <div class="mceLeft"></div> | ||
| 128 | <div class="mceCenter"></div> | ||
| 129 | <div class="mceRight"></div> | ||
| 130 | <span>Statusbar, Resizable</span> | ||
| 131 | </div> | ||
| 132 | |||
| 133 | <div class="mceMiddle"> | ||
| 134 | <div class="mceLeft"></div> | ||
| 135 | <span>Content</span> | ||
| 136 | <div class="mceRight"></div> | ||
| 137 | </div> | ||
| 138 | |||
| 139 | <div class="mceBottom"> | ||
| 140 | <div class="mceLeft"></div> | ||
| 141 | <div class="mceCenter"></div> | ||
| 142 | <div class="mceRight"></div> | ||
| 143 | <span>Statusbar text.</span> | ||
| 144 | </div> | ||
| 145 | |||
| 146 | <a class="mceMove" href="#"></a> | ||
| 147 | <a class="mceMin" href="#"></a> | ||
| 148 | <a class="mceMax" href="#"></a> | ||
| 149 | <a class="mceMed" href="#"></a> | ||
| 150 | <a class="mceClose" href="#"></a> | ||
| 151 | <a class="mceResize mceResizeN" href="#"></a> | ||
| 152 | <a class="mceResize mceResizeS" href="#"></a> | ||
| 153 | <a class="mceResize mceResizeW" href="#"></a> | ||
| 154 | <a class="mceResize mceResizeE" href="#"></a> | ||
| 155 | <a class="mceResize mceResizeNW" href="#"></a> | ||
| 156 | <a class="mceResize mceResizeNE" href="#"></a> | ||
| 157 | <a class="mceResize mceResizeSW" href="#"></a> | ||
| 158 | <a class="mceResize mceResizeSE" href="#"></a> | ||
| 159 | </div> | ||
| 160 | </div> | ||
| 161 | |||
| 162 | <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:230px;"> | ||
| 163 | <div class="mceWrapper mceMovable mceFocus mceResizable mceMaximizable"> | ||
| 164 | <div class="mceTop"> | ||
| 165 | <div class="mceLeft"></div> | ||
| 166 | <div class="mceCenter"></div> | ||
| 167 | <div class="mceRight"></div> | ||
| 168 | <span>Resizable, Maximizable</span> | ||
| 169 | </div> | ||
| 170 | |||
| 171 | <div class="mceMiddle"> | ||
| 172 | <div class="mceLeft"></div> | ||
| 173 | <span>Content</span> | ||
| 174 | <div class="mceRight"></div> | ||
| 175 | </div> | ||
| 176 | |||
| 177 | <div class="mceBottom"> | ||
| 178 | <div class="mceLeft"></div> | ||
| 179 | <div class="mceCenter"></div> | ||
| 180 | <div class="mceRight"></div> | ||
| 181 | <span>Statusbar text.</span> | ||
| 182 | </div> | ||
| 183 | |||
| 184 | <a class="mceMove" href="#"></a> | ||
| 185 | <a class="mceMin" href="#"></a> | ||
| 186 | <a class="mceMax" href="#"></a> | ||
| 187 | <a class="mceMed" href="#"></a> | ||
| 188 | <a class="mceClose" href="#"></a> | ||
| 189 | <a class="mceResize mceResizeN" href="#"></a> | ||
| 190 | <a class="mceResize mceResizeS" href="#"></a> | ||
| 191 | <a class="mceResize mceResizeW" href="#"></a> | ||
| 192 | <a class="mceResize mceResizeE" href="#"></a> | ||
| 193 | <a class="mceResize mceResizeNW" href="#"></a> | ||
| 194 | <a class="mceResize mceResizeNE" href="#"></a> | ||
| 195 | <a class="mceResize mceResizeSW" href="#"></a> | ||
| 196 | <a class="mceResize mceResizeSE" href="#"></a> | ||
| 197 | </div> | ||
| 198 | </div> | ||
| 199 | |||
| 200 | <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:230px;"> | ||
| 201 | <div class="mceWrapper mceMovable mceStatusbar mceResizable mceMaximizable"> | ||
| 202 | <div class="mceTop"> | ||
| 203 | <div class="mceLeft"></div> | ||
| 204 | <div class="mceCenter"></div> | ||
| 205 | <div class="mceRight"></div> | ||
| 206 | <span>Blurred, Maximizable, Statusbar, Resizable</span> | ||
| 207 | </div> | ||
| 208 | |||
| 209 | <div class="mceMiddle"> | ||
| 210 | <div class="mceLeft"></div> | ||
| 211 | <span>Content</span> | ||
| 212 | <div class="mceRight"></div> | ||
| 213 | </div> | ||
| 214 | |||
| 215 | <div class="mceBottom"> | ||
| 216 | <div class="mceLeft"></div> | ||
| 217 | <div class="mceCenter"></div> | ||
| 218 | <div class="mceRight"></div> | ||
| 219 | <span>Statusbar text.</span> | ||
| 220 | </div> | ||
| 221 | |||
| 222 | <a class="mceMove" href="#"></a> | ||
| 223 | <a class="mceMin" href="#"></a> | ||
| 224 | <a class="mceMax" href="#"></a> | ||
| 225 | <a class="mceMed" href="#"></a> | ||
| 226 | <a class="mceClose" href="#"></a> | ||
| 227 | <a class="mceResize mceResizeN" href="#"></a> | ||
| 228 | <a class="mceResize mceResizeS" href="#"></a> | ||
| 229 | <a class="mceResize mceResizeW" href="#"></a> | ||
| 230 | <a class="mceResize mceResizeE" href="#"></a> | ||
| 231 | <a class="mceResize mceResizeNW" href="#"></a> | ||
| 232 | <a class="mceResize mceResizeNE" href="#"></a> | ||
| 233 | <a class="mceResize mceResizeSW" href="#"></a> | ||
| 234 | <a class="mceResize mceResizeSE" href="#"></a> | ||
| 235 | </div> | ||
| 236 | </div> | ||
| 237 | |||
| 238 | <div class="clearlooks2" style="width:400px; height:100px; left:10px; top:340px;"> | ||
| 239 | <div class="mceWrapper mceMovable mceFocus mceResizable mceMaximized mceMinimizable mceMaximizable"> | ||
| 240 | <div class="mceTop"> | ||
| 241 | <div class="mceLeft"></div> | ||
| 242 | <div class="mceCenter"></div> | ||
| 243 | <div class="mceRight"></div> | ||
| 244 | <span>Maximized, Maximizable, Minimizable</span> | ||
| 245 | </div> | ||
| 246 | |||
| 247 | <div class="mceMiddle"> | ||
| 248 | <div class="mceLeft"></div> | ||
| 249 | <span>Content</span> | ||
| 250 | <div class="mceRight"></div> | ||
| 251 | </div> | ||
| 252 | |||
| 253 | <div class="mceBottom"> | ||
| 254 | <div class="mceLeft"></div> | ||
| 255 | <div class="mceCenter"></div> | ||
| 256 | <div class="mceRight"></div> | ||
| 257 | <span>Statusbar text.</span> | ||
| 258 | </div> | ||
| 259 | |||
| 260 | <a class="mceMove" href="#"></a> | ||
| 261 | <a class="mceMin" href="#"></a> | ||
| 262 | <a class="mceMax" href="#"></a> | ||
| 263 | <a class="mceMed" href="#"></a> | ||
| 264 | <a class="mceClose" href="#"></a> | ||
| 265 | <a class="mceResize mceResizeN" href="#"></a> | ||
| 266 | <a class="mceResize mceResizeS" href="#"></a> | ||
| 267 | <a class="mceResize mceResizeW" href="#"></a> | ||
| 268 | <a class="mceResize mceResizeE" href="#"></a> | ||
| 269 | <a class="mceResize mceResizeNW" href="#"></a> | ||
| 270 | <a class="mceResize mceResizeNE" href="#"></a> | ||
| 271 | <a class="mceResize mceResizeSW" href="#"></a> | ||
| 272 | <a class="mceResize mceResizeSE" href="#"></a> | ||
| 273 | </div> | ||
| 274 | </div> | ||
| 275 | |||
| 276 | <div class="clearlooks2" style="width:400px; height:100px; left:420px; top:340px;"> | ||
| 277 | <div class="mceWrapper mceMovable mceStatusbar mceResizable mceMaximized mceMinimizable mceMaximizable"> | ||
| 278 | <div class="mceTop"> | ||
| 279 | <div class="mceLeft"></div> | ||
| 280 | <div class="mceCenter"></div> | ||
| 281 | <div class="mceRight"></div> | ||
| 282 | <span>Blured</span> | ||
| 283 | </div> | ||
| 284 | |||
| 285 | <div class="mceMiddle"> | ||
| 286 | <div class="mceLeft"></div> | ||
| 287 | <span>Content</span> | ||
| 288 | <div class="mceRight"></div> | ||
| 289 | </div> | ||
| 290 | |||
| 291 | <div class="mceBottom"> | ||
| 292 | <div class="mceLeft"></div> | ||
| 293 | <div class="mceCenter"></div> | ||
| 294 | <div class="mceRight"></div> | ||
| 295 | <span>Statusbar text.</span> | ||
| 296 | </div> | ||
| 297 | |||
| 298 | <a class="mceMove" href="#"></a> | ||
| 299 | <a class="mceMin" href="#"></a> | ||
| 300 | <a class="mceMax" href="#"></a> | ||
| 301 | <a class="mceMed" href="#"></a> | ||
| 302 | <a class="mceClose" href="#"></a> | ||
| 303 | <a class="mceResize mceResizeN" href="#"></a> | ||
| 304 | <a class="mceResize mceResizeS" href="#"></a> | ||
| 305 | <a class="mceResize mceResizeW" href="#"></a> | ||
| 306 | <a class="mceResize mceResizeE" href="#"></a> | ||
| 307 | <a class="mceResize mceResizeNW" href="#"></a> | ||
| 308 | <a class="mceResize mceResizeNE" href="#"></a> | ||
| 309 | <a class="mceResize mceResizeSW" href="#"></a> | ||
| 310 | <a class="mceResize mceResizeSE" href="#"></a> | ||
| 311 | </div> | ||
| 312 | </div> | ||
| 313 | |||
| 314 | <div class="clearlooks2" style="width:400px; height:130px; left:10px; top:450px;"> | ||
| 315 | <div class="mceWrapper mceMovable mceFocus mceModal mceAlert"> | ||
| 316 | <div class="mceTop"> | ||
| 317 | <div class="mceLeft"></div> | ||
| 318 | <div class="mceCenter"></div> | ||
| 319 | <div class="mceRight"></div> | ||
| 320 | <span>Alert</span> | ||
| 321 | </div> | ||
| 322 | |||
| 323 | <div class="mceMiddle"> | ||
| 324 | <div class="mceLeft"></div> | ||
| 325 | <span> | ||
| 326 | This is a very long error message. This is a very long error message. | ||
| 327 | This is a very long error message. This is a very long error message. | ||
| 328 | This is a very long error message. This is a very long error message. | ||
| 329 | This is a very long error message. This is a very long error message. | ||
| 330 | This is a very long error message. This is a very long error message. | ||
| 331 | This is a very long error message. This is a very long error message. | ||
| 332 | </span> | ||
| 333 | <div class="mceRight"></div> | ||
| 334 | <div class="mceIcon"></div> | ||
| 335 | </div> | ||
| 336 | |||
| 337 | <div class="mceBottom"> | ||
| 338 | <div class="mceLeft"></div> | ||
| 339 | <div class="mceCenter"></div> | ||
| 340 | <div class="mceRight"></div> | ||
| 341 | </div> | ||
| 342 | |||
| 343 | <a class="mceMove" href="#"></a> | ||
| 344 | <a class="mceButton mceOk" href="#">Ok</a> | ||
| 345 | <a class="mceClose" href="#"></a> | ||
| 346 | </div> | ||
| 347 | </div> | ||
| 348 | |||
| 349 | <div class="clearlooks2" style="width:400px; height:130px; left:420px; top:450px;"> | ||
| 350 | <div class="mceWrapper mceMovable mceFocus mceModal mceConfirm"> | ||
| 351 | <div class="mceTop"> | ||
| 352 | <div class="mceLeft"></div> | ||
| 353 | <div class="mceCenter"></div> | ||
| 354 | <div class="mceRight"></div> | ||
| 355 | <span>Confirm</span> | ||
| 356 | </div> | ||
| 357 | |||
| 358 | <div class="mceMiddle"> | ||
| 359 | <div class="mceLeft"></div> | ||
| 360 | <span> | ||
| 361 | This is a very long error message. This is a very long error message. | ||
| 362 | This is a very long error message. This is a very long error message. | ||
| 363 | This is a very long error message. This is a very long error message. | ||
| 364 | This is a very long error message. This is a very long error message. | ||
| 365 | This is a very long error message. This is a very long error message. | ||
| 366 | This is a very long error message. This is a very long error message. | ||
| 367 | </span> | ||
| 368 | <div class="mceRight"></div> | ||
| 369 | <div class="mceIcon"></div> | ||
| 370 | </div> | ||
| 371 | |||
| 372 | <div class="mceBottom"> | ||
| 373 | <div class="mceLeft"></div> | ||
| 374 | <div class="mceCenter"></div> | ||
| 375 | <div class="mceRight"></div> | ||
| 376 | </div> | ||
| 377 | |||
| 378 | <a class="mceMove" href="#"></a> | ||
| 379 | <a class="mceButton mceOk" href="#">Ok</a> | ||
| 380 | <a class="mceButton mceCancel" href="#">Cancel</a> | ||
| 381 | <a class="mceClose" href="#"></a> | ||
| 382 | </div> | ||
| 383 | </div> | ||
| 384 | </div> | ||
| 385 | |||
| 386 | </body> | ||
| 387 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin.js b/public/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin.js deleted file mode 100644 index 938ce6b..0000000 --- a/public/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.InsertDateTime",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceInsertDate",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_dateFormat",a.getLang("insertdatetime.date_fmt")));a.execCommand("mceInsertContent",false,d)});a.addCommand("mceInsertTime",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_timeFormat",a.getLang("insertdatetime.time_fmt")));a.execCommand("mceInsertContent",false,d)});a.addButton("insertdate",{title:"insertdatetime.insertdate_desc",cmd:"mceInsertDate"});a.addButton("inserttime",{title:"insertdatetime.inserttime_desc",cmd:"mceInsertTime"})},getInfo:function(){return{longname:"Insert date/time",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getDateTime:function(e,a){var c=this.editor;function b(g,d){g=""+g;if(g.length<d){for(var f=0;f<(d-g.length);f++){g="0"+g}}return g}a=a.replace("%D","%m/%d/%y");a=a.replace("%r","%I:%M:%S %p");a=a.replace("%Y",""+e.getFullYear());a=a.replace("%y",""+e.getYear());a=a.replace("%m",b(e.getMonth()+1,2));a=a.replace("%d",b(e.getDate(),2));a=a.replace("%H",""+b(e.getHours(),2));a=a.replace("%M",""+b(e.getMinutes(),2));a=a.replace("%S",""+b(e.getSeconds(),2));a=a.replace("%I",""+((e.getHours()+11)%12+1));a=a.replace("%p",""+(e.getHours()<12?"AM":"PM"));a=a.replace("%B",""+c.getLang("insertdatetime.months_long").split(",")[e.getMonth()]);a=a.replace("%b",""+c.getLang("insertdatetime.months_short").split(",")[e.getMonth()]);a=a.replace("%A",""+c.getLang("insertdatetime.day_long").split(",")[e.getDay()]);a=a.replace("%a",""+c.getLang("insertdatetime.day_short").split(",")[e.getDay()]);a=a.replace("%%","%");return a}});tinymce.PluginManager.add("insertdatetime",tinymce.plugins.InsertDateTime)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js deleted file mode 100644 index 9ab3135..0000000 --- a/public/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,80 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.InsertDateTime', { | ||
| 10 | init : function(ed, url) { | ||
| 11 | var t = this; | ||
| 12 | |||
| 13 | t.editor = ed; | ||
| 14 | |||
| 15 | ed.addCommand('mceInsertDate', function() { | ||
| 16 | var str = t._getDateTime(new Date(), ed.getParam("plugin_insertdate_dateFormat", ed.getLang('insertdatetime.date_fmt'))); | ||
| 17 | |||
| 18 | ed.execCommand('mceInsertContent', false, str); | ||
| 19 | }); | ||
| 20 | |||
| 21 | ed.addCommand('mceInsertTime', function() { | ||
| 22 | var str = t._getDateTime(new Date(), ed.getParam("plugin_insertdate_timeFormat", ed.getLang('insertdatetime.time_fmt'))); | ||
| 23 | |||
| 24 | ed.execCommand('mceInsertContent', false, str); | ||
| 25 | }); | ||
| 26 | |||
| 27 | ed.addButton('insertdate', {title : 'insertdatetime.insertdate_desc', cmd : 'mceInsertDate'}); | ||
| 28 | ed.addButton('inserttime', {title : 'insertdatetime.inserttime_desc', cmd : 'mceInsertTime'}); | ||
| 29 | }, | ||
| 30 | |||
| 31 | getInfo : function() { | ||
| 32 | return { | ||
| 33 | longname : 'Insert date/time', | ||
| 34 | author : 'Moxiecode Systems AB', | ||
| 35 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 36 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime', | ||
| 37 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 38 | }; | ||
| 39 | }, | ||
| 40 | |||
| 41 | // Private methods | ||
| 42 | |||
| 43 | _getDateTime : function(d, fmt) { | ||
| 44 | var ed = this.editor; | ||
| 45 | |||
| 46 | function addZeros(value, len) { | ||
| 47 | value = "" + value; | ||
| 48 | |||
| 49 | if (value.length < len) { | ||
| 50 | for (var i=0; i<(len-value.length); i++) | ||
| 51 | value = "0" + value; | ||
| 52 | } | ||
| 53 | |||
| 54 | return value; | ||
| 55 | }; | ||
| 56 | |||
| 57 | fmt = fmt.replace("%D", "%m/%d/%y"); | ||
| 58 | fmt = fmt.replace("%r", "%I:%M:%S %p"); | ||
| 59 | fmt = fmt.replace("%Y", "" + d.getFullYear()); | ||
| 60 | fmt = fmt.replace("%y", "" + d.getYear()); | ||
| 61 | fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2)); | ||
| 62 | fmt = fmt.replace("%d", addZeros(d.getDate(), 2)); | ||
| 63 | fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2)); | ||
| 64 | fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2)); | ||
| 65 | fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2)); | ||
| 66 | fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1)); | ||
| 67 | fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM")); | ||
| 68 | fmt = fmt.replace("%B", "" + ed.getLang("insertdatetime.months_long").split(',')[d.getMonth()]); | ||
| 69 | fmt = fmt.replace("%b", "" + ed.getLang("insertdatetime.months_short").split(',')[d.getMonth()]); | ||
| 70 | fmt = fmt.replace("%A", "" + ed.getLang("insertdatetime.day_long").split(',')[d.getDay()]); | ||
| 71 | fmt = fmt.replace("%a", "" + ed.getLang("insertdatetime.day_short").split(',')[d.getDay()]); | ||
| 72 | fmt = fmt.replace("%%", "%"); | ||
| 73 | |||
| 74 | return fmt; | ||
| 75 | } | ||
| 76 | }); | ||
| 77 | |||
| 78 | // Register plugin | ||
| 79 | tinymce.PluginManager.add('insertdatetime', tinymce.plugins.InsertDateTime); | ||
| 80 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/layer/editor_plugin.js b/public/javascripts/tiny_mce/plugins/layer/editor_plugin.js deleted file mode 100644 index f88a6dd..0000000 --- a/public/javascripts/tiny_mce/plugins/layer/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.Layer",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceInsertLayer",c._insertLayer,c);a.addCommand("mceMoveForward",function(){c._move(1)});a.addCommand("mceMoveBackward",function(){c._move(-1)});a.addCommand("mceMakeAbsolute",function(){c._toggleAbsolute()});a.addButton("moveforward",{title:"layer.forward_desc",cmd:"mceMoveForward"});a.addButton("movebackward",{title:"layer.backward_desc",cmd:"mceMoveBackward"});a.addButton("absolute",{title:"layer.absolute_desc",cmd:"mceMakeAbsolute"});a.addButton("insertlayer",{title:"layer.insertlayer_desc",cmd:"mceInsertLayer"});a.onInit.add(function(){if(tinymce.isIE){a.getDoc().execCommand("2D-Position",false,true)}});a.onNodeChange.add(c._nodeChange,c);a.onVisualAid.add(c._visualAid,c)},getInfo:function(){return{longname:"Layer",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var c,d;c=this._getParentLayer(e);d=b.dom.getParent(e,"DIV,P,IMG");if(!d){a.setDisabled("absolute",1);a.setDisabled("moveforward",1);a.setDisabled("movebackward",1)}else{a.setDisabled("absolute",0);a.setDisabled("moveforward",!c);a.setDisabled("movebackward",!c);a.setActive("absolute",c&&c.style.position.toLowerCase()=="absolute")}},_visualAid:function(a,c,b){var d=a.dom;tinymce.each(d.select("div,p",c),function(f){if(/^(absolute|relative|static)$/i.test(f.style.position)){if(b){d.addClass(f,"mceItemVisualAid")}else{d.removeClass(f,"mceItemVisualAid")}}})},_move:function(h){var b=this.editor,f,g=[],e=this._getParentLayer(b.selection.getNode()),c=-1,j=-1,a;a=[];tinymce.walk(b.getBody(),function(d){if(d.nodeType==1&&/^(absolute|relative|static)$/i.test(d.style.position)){a.push(d)}},"childNodes");for(f=0;f<a.length;f++){g[f]=a[f].style.zIndex?parseInt(a[f].style.zIndex):0;if(c<0&&a[f]==e){c=f}}if(h<0){for(f=0;f<g.length;f++){if(g[f]<g[c]){j=f;break}}if(j>-1){a[c].style.zIndex=g[j];a[j].style.zIndex=g[c]}else{if(g[c]>0){a[c].style.zIndex=g[c]-1}}}else{for(f=0;f<g.length;f++){if(g[f]>g[c]){j=f;break}}if(j>-1){a[c].style.zIndex=g[j];a[j].style.zIndex=g[c]}else{a[c].style.zIndex=g[c]+1}}b.execCommand("mceRepaint")},_getParentLayer:function(a){return this.editor.dom.getParent(a,function(b){return b.nodeType==1&&/^(absolute|relative|static)$/i.test(b.style.position)})},_insertLayer:function(){var a=this.editor,b=a.dom.getPos(a.dom.getParent(a.selection.getNode(),"*"));a.dom.add(a.getBody(),"div",{style:{position:"absolute",left:b.x,top:(b.y>20?b.y:20),width:100,height:100},"class":"mceItemVisualAid"},a.selection.getContent()||a.getLang("layer.content"))},_toggleAbsolute:function(){var a=this.editor,b=this._getParentLayer(a.selection.getNode());if(!b){b=a.dom.getParent(a.selection.getNode(),"DIV,P,IMG")}if(b){if(b.style.position.toLowerCase()=="absolute"){a.dom.setStyles(b,{position:"",left:"",top:"",width:"",height:""});a.dom.removeClass(b,"mceItemVisualAid")}else{if(b.style.left==""){b.style.left=20+"px"}if(b.style.top==""){b.style.top=20+"px"}if(b.style.width==""){b.style.width=b.width?(b.width+"px"):"100px"}if(b.style.height==""){b.style.height=b.height?(b.height+"px"):"100px"}b.style.position="absolute";a.addVisual(a.getBody())}a.execCommand("mceRepaint");a.nodeChanged()}}});tinymce.PluginManager.add("layer",tinymce.plugins.Layer)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/layer/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/layer/editor_plugin_src.js deleted file mode 100644 index a72f6c3..0000000 --- a/public/javascripts/tiny_mce/plugins/layer/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,209 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 652 2008-02-29 13:09:46Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.Layer', { | ||
| 10 | init : function(ed, url) { | ||
| 11 | var t = this; | ||
| 12 | |||
| 13 | t.editor = ed; | ||
| 14 | |||
| 15 | // Register commands | ||
| 16 | ed.addCommand('mceInsertLayer', t._insertLayer, t); | ||
| 17 | |||
| 18 | ed.addCommand('mceMoveForward', function() { | ||
| 19 | t._move(1); | ||
| 20 | }); | ||
| 21 | |||
| 22 | ed.addCommand('mceMoveBackward', function() { | ||
| 23 | t._move(-1); | ||
| 24 | }); | ||
| 25 | |||
| 26 | ed.addCommand('mceMakeAbsolute', function() { | ||
| 27 | t._toggleAbsolute(); | ||
| 28 | }); | ||
| 29 | |||
| 30 | // Register buttons | ||
| 31 | ed.addButton('moveforward', {title : 'layer.forward_desc', cmd : 'mceMoveForward'}); | ||
| 32 | ed.addButton('movebackward', {title : 'layer.backward_desc', cmd : 'mceMoveBackward'}); | ||
| 33 | ed.addButton('absolute', {title : 'layer.absolute_desc', cmd : 'mceMakeAbsolute'}); | ||
| 34 | ed.addButton('insertlayer', {title : 'layer.insertlayer_desc', cmd : 'mceInsertLayer'}); | ||
| 35 | |||
| 36 | ed.onInit.add(function() { | ||
| 37 | if (tinymce.isIE) | ||
| 38 | ed.getDoc().execCommand('2D-Position', false, true); | ||
| 39 | }); | ||
| 40 | |||
| 41 | ed.onNodeChange.add(t._nodeChange, t); | ||
| 42 | ed.onVisualAid.add(t._visualAid, t); | ||
| 43 | }, | ||
| 44 | |||
| 45 | getInfo : function() { | ||
| 46 | return { | ||
| 47 | longname : 'Layer', | ||
| 48 | author : 'Moxiecode Systems AB', | ||
| 49 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 50 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer', | ||
| 51 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 52 | }; | ||
| 53 | }, | ||
| 54 | |||
| 55 | // Private methods | ||
| 56 | |||
| 57 | _nodeChange : function(ed, cm, n) { | ||
| 58 | var le, p; | ||
| 59 | |||
| 60 | le = this._getParentLayer(n); | ||
| 61 | p = ed.dom.getParent(n, 'DIV,P,IMG'); | ||
| 62 | |||
| 63 | if (!p) { | ||
| 64 | cm.setDisabled('absolute', 1); | ||
| 65 | cm.setDisabled('moveforward', 1); | ||
| 66 | cm.setDisabled('movebackward', 1); | ||
| 67 | } else { | ||
| 68 | cm.setDisabled('absolute', 0); | ||
| 69 | cm.setDisabled('moveforward', !le); | ||
| 70 | cm.setDisabled('movebackward', !le); | ||
| 71 | cm.setActive('absolute', le && le.style.position.toLowerCase() == "absolute"); | ||
| 72 | } | ||
| 73 | }, | ||
| 74 | |||
| 75 | // Private methods | ||
| 76 | |||
| 77 | _visualAid : function(ed, e, s) { | ||
| 78 | var dom = ed.dom; | ||
| 79 | |||
| 80 | tinymce.each(dom.select('div,p', e), function(e) { | ||
| 81 | if (/^(absolute|relative|static)$/i.test(e.style.position)) { | ||
| 82 | if (s) | ||
| 83 | dom.addClass(e, 'mceItemVisualAid'); | ||
| 84 | else | ||
| 85 | dom.removeClass(e, 'mceItemVisualAid'); | ||
| 86 | } | ||
| 87 | }); | ||
| 88 | }, | ||
| 89 | |||
| 90 | _move : function(d) { | ||
| 91 | var ed = this.editor, i, z = [], le = this._getParentLayer(ed.selection.getNode()), ci = -1, fi = -1, nl; | ||
| 92 | |||
| 93 | nl = []; | ||
| 94 | tinymce.walk(ed.getBody(), function(n) { | ||
| 95 | if (n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position)) | ||
| 96 | nl.push(n); | ||
| 97 | }, 'childNodes'); | ||
| 98 | |||
| 99 | // Find z-indexes | ||
| 100 | for (i=0; i<nl.length; i++) { | ||
| 101 | z[i] = nl[i].style.zIndex ? parseInt(nl[i].style.zIndex) : 0; | ||
| 102 | |||
| 103 | if (ci < 0 && nl[i] == le) | ||
| 104 | ci = i; | ||
| 105 | } | ||
| 106 | |||
| 107 | if (d < 0) { | ||
| 108 | // Move back | ||
| 109 | |||
| 110 | // Try find a lower one | ||
| 111 | for (i=0; i<z.length; i++) { | ||
| 112 | if (z[i] < z[ci]) { | ||
| 113 | fi = i; | ||
| 114 | break; | ||
| 115 | } | ||
| 116 | } | ||
| 117 | |||
| 118 | if (fi > -1) { | ||
| 119 | nl[ci].style.zIndex = z[fi]; | ||
| 120 | nl[fi].style.zIndex = z[ci]; | ||
| 121 | } else { | ||
| 122 | if (z[ci] > 0) | ||
| 123 | nl[ci].style.zIndex = z[ci] - 1; | ||
| 124 | } | ||
| 125 | } else { | ||
| 126 | // Move forward | ||
| 127 | |||
| 128 | // Try find a higher one | ||
| 129 | for (i=0; i<z.length; i++) { | ||
| 130 | if (z[i] > z[ci]) { | ||
| 131 | fi = i; | ||
| 132 | break; | ||
| 133 | } | ||
| 134 | } | ||
| 135 | |||
| 136 | if (fi > -1) { | ||
| 137 | nl[ci].style.zIndex = z[fi]; | ||
| 138 | nl[fi].style.zIndex = z[ci]; | ||
| 139 | } else | ||
| 140 | nl[ci].style.zIndex = z[ci] + 1; | ||
| 141 | } | ||
| 142 | |||
| 143 | ed.execCommand('mceRepaint'); | ||
| 144 | }, | ||
| 145 | |||
| 146 | _getParentLayer : function(n) { | ||
| 147 | return this.editor.dom.getParent(n, function(n) { | ||
| 148 | return n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position); | ||
| 149 | }); | ||
| 150 | }, | ||
| 151 | |||
| 152 | _insertLayer : function() { | ||
| 153 | var ed = this.editor, p = ed.dom.getPos(ed.dom.getParent(ed.selection.getNode(), '*')); | ||
| 154 | |||
| 155 | ed.dom.add(ed.getBody(), 'div', { | ||
| 156 | style : { | ||
| 157 | position : 'absolute', | ||
| 158 | left : p.x, | ||
| 159 | top : (p.y > 20 ? p.y : 20), | ||
| 160 | width : 100, | ||
| 161 | height : 100 | ||
| 162 | }, | ||
| 163 | 'class' : 'mceItemVisualAid' | ||
| 164 | }, ed.selection.getContent() || ed.getLang('layer.content')); | ||
| 165 | }, | ||
| 166 | |||
| 167 | _toggleAbsolute : function() { | ||
| 168 | var ed = this.editor, le = this._getParentLayer(ed.selection.getNode()); | ||
| 169 | |||
| 170 | if (!le) | ||
| 171 | le = ed.dom.getParent(ed.selection.getNode(), 'DIV,P,IMG'); | ||
| 172 | |||
| 173 | if (le) { | ||
| 174 | if (le.style.position.toLowerCase() == "absolute") { | ||
| 175 | ed.dom.setStyles(le, { | ||
| 176 | position : '', | ||
| 177 | left : '', | ||
| 178 | top : '', | ||
| 179 | width : '', | ||
| 180 | height : '' | ||
| 181 | }); | ||
| 182 | |||
| 183 | ed.dom.removeClass(le, 'mceItemVisualAid'); | ||
| 184 | } else { | ||
| 185 | if (le.style.left == "") | ||
| 186 | le.style.left = 20 + 'px'; | ||
| 187 | |||
| 188 | if (le.style.top == "") | ||
| 189 | le.style.top = 20 + 'px'; | ||
| 190 | |||
| 191 | if (le.style.width == "") | ||
| 192 | le.style.width = le.width ? (le.width + 'px') : '100px'; | ||
| 193 | |||
| 194 | if (le.style.height == "") | ||
| 195 | le.style.height = le.height ? (le.height + 'px') : '100px'; | ||
| 196 | |||
| 197 | le.style.position = "absolute"; | ||
| 198 | ed.addVisual(ed.getBody()); | ||
| 199 | } | ||
| 200 | |||
| 201 | ed.execCommand('mceRepaint'); | ||
| 202 | ed.nodeChanged(); | ||
| 203 | } | ||
| 204 | } | ||
| 205 | }); | ||
| 206 | |||
| 207 | // Register plugin | ||
| 208 | tinymce.PluginManager.add('layer', tinymce.plugins.Layer); | ||
| 209 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/media/css/content.css b/public/javascripts/tiny_mce/plugins/media/css/content.css deleted file mode 100644 index 1bf6a75..0000000 --- a/public/javascripts/tiny_mce/plugins/media/css/content.css +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | .mceItemFlash, .mceItemShockWave, .mceItemQuickTime, .mceItemWindowsMedia, .mceItemRealMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc;} | ||
| 2 | .mceItemShockWave {background-image: url(../img/shockwave.gif);} | ||
| 3 | .mceItemFlash {background-image:url(../img/flash.gif);} | ||
| 4 | .mceItemQuickTime {background-image:url(../img/quicktime.gif);} | ||
| 5 | .mceItemWindowsMedia {background-image:url(../img/windowsmedia.gif);} | ||
| 6 | .mceItemRealMedia {background-image:url(../img/realmedia.gif);} | ||
diff --git a/public/javascripts/tiny_mce/plugins/media/css/media.css b/public/javascripts/tiny_mce/plugins/media/css/media.css deleted file mode 100644 index 2d08794..0000000 --- a/public/javascripts/tiny_mce/plugins/media/css/media.css +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | #id, #name, #hspace, #vspace, #class_name, #align { width: 100px } | ||
| 2 | #hspace, #vspace { width: 50px } | ||
| 3 | #flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px } | ||
| 4 | #flash_base, #flash_flashvars { width: 240px } | ||
| 5 | #width, #height { width: 40px } | ||
| 6 | #src, #media_type { width: 250px } | ||
| 7 | #class { width: 120px } | ||
| 8 | #prev { margin: 0; border: 1px solid black; width: 380px; height: 230px; overflow: auto } | ||
| 9 | .panel_wrapper div.current { height: 390px; overflow: auto } | ||
| 10 | #flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none } | ||
| 11 | .mceAddSelectValue { background-color: #DDDDDD } | ||
| 12 | #qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px } | ||
| 13 | #wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px } | ||
| 14 | #rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px } | ||
| 15 | #shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px } | ||
| 16 | #qt_qtsrc { width: 200px } | ||
diff --git a/public/javascripts/tiny_mce/plugins/media/editor_plugin.js b/public/javascripts/tiny_mce/plugins/media/editor_plugin.js deleted file mode 100644 index 2889be5..0000000 --- a/public/javascripts/tiny_mce/plugins/media/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){var a=tinymce.each;tinymce.create("tinymce.plugins.MediaPlugin",{init:function(b,c){var e=this;e.editor=b;e.url=c;function f(g){return/^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(g.className)}b.onPreInit.add(function(){b.serializer.addRules("param[name|value|_mce_value]")});b.addCommand("mceMedia",function(){b.windowManager.open({file:c+"/media.htm",width:430+parseInt(b.getLang("media.delta_width",0)),height:470+parseInt(b.getLang("media.delta_height",0)),inline:1},{plugin_url:c})});b.addButton("media",{title:"media.desc",cmd:"mceMedia"});b.onNodeChange.add(function(h,g,i){g.setActive("media",i.nodeName=="IMG"&&f(i))});b.onInit.add(function(){var g={mceItemFlash:"flash",mceItemShockWave:"shockwave",mceItemWindowsMedia:"windowsmedia",mceItemQuickTime:"quicktime",mceItemRealMedia:"realmedia"};b.selection.onSetContent.add(function(){e._spansToImgs(b.getBody())});b.selection.onBeforeSetContent.add(e._objectsToSpans,e);if(b.settings.content_css!==false){b.dom.loadCSS(c+"/css/content.css")}if(b.theme&&b.theme.onResolveName){b.theme.onResolveName.add(function(h,i){if(i.name=="img"){a(g,function(l,j){if(b.dom.hasClass(i.node,j)){i.name=l;i.title=b.dom.getAttrib(i.node,"title");return false}})}})}if(b&&b.plugins.contextmenu){b.plugins.contextmenu.onContextMenu.add(function(i,h,j){if(j.nodeName=="IMG"&&/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(j.className)){h.add({title:"media.edit",icon:"media",cmd:"mceMedia"})}})}});b.onBeforeSetContent.add(e._objectsToSpans,e);b.onSetContent.add(function(){e._spansToImgs(b.getBody())});b.onPreProcess.add(function(g,i){var h=g.dom;if(i.set){e._spansToImgs(i.node);a(h.select("IMG",i.node),function(k){var j;if(f(k)){j=e._parse(k.title);h.setAttrib(k,"width",h.getAttrib(k,"width",j.width||100));h.setAttrib(k,"height",h.getAttrib(k,"height",j.height||100))}})}if(i.get){a(h.select("IMG",i.node),function(m){var l,j,k;if(g.getParam("media_use_script")){if(f(m)){m.className=m.className.replace(/mceItem/g,"mceTemp")}return}switch(m.className){case"mceItemFlash":l="d27cdb6e-ae6d-11cf-96b8-444553540000";j="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0";k="application/x-shockwave-flash";break;case"mceItemShockWave":l="166b1bca-3f9c-11cf-8075-444553540000";j="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0";k="application/x-director";break;case"mceItemWindowsMedia":l=g.getParam("media_wmp6_compatible")?"05589fa1-c356-11ce-bf01-00aa0055595a":"6bf52a52-394a-11d3-b153-00c04f79faa6";j="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701";k="application/x-mplayer2";break;case"mceItemQuickTime":l="02bf25d5-8c17-4b23-bc80-d3488abddc6b";j="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0";k="video/quicktime";break;case"mceItemRealMedia":l="cfcdaa03-8be4-11cf-b84b-0020afbbccfa";j="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0";k="audio/x-pn-realaudio-plugin";break}if(l){h.replace(e._buildObj({classid:l,codebase:j,type:k},m),m)}})}});b.onPostProcess.add(function(g,h){h.content=h.content.replace(/_mce_value=/g,"value=")});function d(g,h){h=new RegExp(h+'="([^"]+)"',"g").exec(g);return h?b.dom.decode(h[1]):""}b.onPostProcess.add(function(g,h){if(g.getParam("media_use_script")){h.content=h.content.replace(/<img[^>]+>/g,function(j){var i=d(j,"class");if(/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(i)){at=e._parse(d(j,"title"));at.width=d(j,"width");at.height=d(j,"height");j='<script type="text/javascript">write'+i.substring(7)+"({"+e._serialize(at)+"});<\/script>"}return j})}})},getInfo:function(){return{longname:"Media",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_objectsToSpans:function(b,e){var c=this,d=e.content;d=d.replace(/<script[^>]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi,function(g,f,i){var h=c._parse(i);return'<img class="mceItem'+f+'" title="'+b.dom.encode(i)+'" src="'+c.url+'/img/trans.gif" width="'+h.width+'" height="'+h.height+'" />'});d=d.replace(/<object([^>]*)>/gi,'<span class="mceItemObject" $1>');d=d.replace(/<embed([^>]*)\/?>/gi,'<span class="mceItemEmbed" $1></span>');d=d.replace(/<embed([^>]*)>/gi,'<span class="mceItemEmbed" $1>');d=d.replace(/<\/(object)([^>]*)>/gi,"</span>");d=d.replace(/<\/embed>/gi,"");d=d.replace(/<param([^>]*)>/gi,function(g,f){return"<span "+f.replace(/value=/gi,"_mce_value=")+' class="mceItemParam"></span>'});d=d.replace(/\/ class=\"mceItemParam\"><\/span>/gi,'class="mceItemParam"></span>');e.content=d},_buildObj:function(g,h){var d,c=this.editor,f=c.dom,e=this._parse(h.title),b;b=c.getParam("media_strict",true)&&g.type=="application/x-shockwave-flash";e.width=g.width=f.getAttrib(h,"width")||100;e.height=g.height=f.getAttrib(h,"height")||100;if(e.src){e.src=c.convertURL(e.src,"src",h)}if(b){d=f.create("span",{id:e.id,mce_name:"object",type:"application/x-shockwave-flash",data:e.src,style:f.getAttrib(h,"style"),width:g.width,height:g.height})}else{d=f.create("span",{id:e.id,mce_name:"object",classid:"clsid:"+g.classid,style:f.getAttrib(h,"style"),codebase:g.codebase,width:g.width,height:g.height})}a(e,function(j,i){if(!/^(width|height|codebase|classid|id|_cx|_cy)$/.test(i)){if(g.type=="application/x-mplayer2"&&i=="src"&&!e.url){i="url"}if(j){f.add(d,"span",{mce_name:"param",name:i,_mce_value:j})}}});if(!b){f.add(d,"span",tinymce.extend({mce_name:"embed",type:g.type,style:f.getAttrib(h,"style")},e))}return d},_spansToImgs:function(e){var d=this,f=d.editor.dom,b,c;a(f.select("span",e),function(g){if(f.getAttrib(g,"class")=="mceItemObject"){c=f.getAttrib(g,"classid").toLowerCase().replace(/\s+/g,"");switch(c){case"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000":f.replace(d._createImg("mceItemFlash",g),g);break;case"clsid:166b1bca-3f9c-11cf-8075-444553540000":f.replace(d._createImg("mceItemShockWave",g),g);break;case"clsid:6bf52a52-394a-11d3-b153-00c04f79faa6":case"clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95":case"clsid:05589fa1-c356-11ce-bf01-00aa0055595a":f.replace(d._createImg("mceItemWindowsMedia",g),g);break;case"clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b":f.replace(d._createImg("mceItemQuickTime",g),g);break;case"clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa":f.replace(d._createImg("mceItemRealMedia",g),g);break;default:f.replace(d._createImg("mceItemFlash",g),g)}return}if(f.getAttrib(g,"class")=="mceItemEmbed"){switch(f.getAttrib(g,"type")){case"application/x-shockwave-flash":f.replace(d._createImg("mceItemFlash",g),g);break;case"application/x-director":f.replace(d._createImg("mceItemShockWave",g),g);break;case"application/x-mplayer2":f.replace(d._createImg("mceItemWindowsMedia",g),g);break;case"video/quicktime":f.replace(d._createImg("mceItemQuickTime",g),g);break;case"audio/x-pn-realaudio-plugin":f.replace(d._createImg("mceItemRealMedia",g),g);break;default:f.replace(d._createImg("mceItemFlash",g),g)}}})},_createImg:function(c,h){var b,g=this.editor.dom,f={},e="",d;d=["id","name","width","height","bgcolor","align","flashvars","src","wmode","allowfullscreen","quality","data"];b=g.create("img",{src:this.url+"/img/trans.gif",width:g.getAttrib(h,"width")||100,height:g.getAttrib(h,"height")||100,style:g.getAttrib(h,"style"),"class":c});a(d,function(i){var j=g.getAttrib(h,i);if(j){f[i]=j}});a(g.select("span",h),function(i){if(g.hasClass(i,"mceItemParam")){f[g.getAttrib(i,"name")]=g.getAttrib(i,"_mce_value")}});if(f.movie){f.src=f.movie;delete f.movie}if(!f.src){f.src=f.data;delete f.data}h=g.select(".mceItemEmbed",h)[0];if(h){a(d,function(i){var j=g.getAttrib(h,i);if(j&&!f[i]){f[i]=j}})}delete f.width;delete f.height;b.title=this._serialize(f);return b},_parse:function(b){return tinymce.util.JSON.parse("{"+b+"}")},_serialize:function(b){return tinymce.util.JSON.serialize(b).replace(/[{}]/g,"")}});tinymce.PluginManager.add("media",tinymce.plugins.MediaPlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/media/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/media/editor_plugin_src.js deleted file mode 100644 index 2692e0a..0000000 --- a/public/javascripts/tiny_mce/plugins/media/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,411 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 1222 2009-09-03 17:26:47Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | var each = tinymce.each; | ||
| 10 | |||
| 11 | tinymce.create('tinymce.plugins.MediaPlugin', { | ||
| 12 | init : function(ed, url) { | ||
| 13 | var t = this; | ||
| 14 | |||
| 15 | t.editor = ed; | ||
| 16 | t.url = url; | ||
| 17 | |||
| 18 | function isMediaElm(n) { | ||
| 19 | return /^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(n.className); | ||
| 20 | }; | ||
| 21 | |||
| 22 | ed.onPreInit.add(function() { | ||
| 23 | // Force in _value parameter this extra parameter is required for older Opera versions | ||
| 24 | ed.serializer.addRules('param[name|value|_mce_value]'); | ||
| 25 | }); | ||
| 26 | |||
| 27 | // Register commands | ||
| 28 | ed.addCommand('mceMedia', function() { | ||
| 29 | ed.windowManager.open({ | ||
| 30 | file : url + '/media.htm', | ||
| 31 | width : 430 + parseInt(ed.getLang('media.delta_width', 0)), | ||
| 32 | height : 470 + parseInt(ed.getLang('media.delta_height', 0)), | ||
| 33 | inline : 1 | ||
| 34 | }, { | ||
| 35 | plugin_url : url | ||
| 36 | }); | ||
| 37 | }); | ||
| 38 | |||
| 39 | // Register buttons | ||
| 40 | ed.addButton('media', {title : 'media.desc', cmd : 'mceMedia'}); | ||
| 41 | |||
| 42 | ed.onNodeChange.add(function(ed, cm, n) { | ||
| 43 | cm.setActive('media', n.nodeName == 'IMG' && isMediaElm(n)); | ||
| 44 | }); | ||
| 45 | |||
| 46 | ed.onInit.add(function() { | ||
| 47 | var lo = { | ||
| 48 | mceItemFlash : 'flash', | ||
| 49 | mceItemShockWave : 'shockwave', | ||
| 50 | mceItemWindowsMedia : 'windowsmedia', | ||
| 51 | mceItemQuickTime : 'quicktime', | ||
| 52 | mceItemRealMedia : 'realmedia' | ||
| 53 | }; | ||
| 54 | |||
| 55 | ed.selection.onSetContent.add(function() { | ||
| 56 | t._spansToImgs(ed.getBody()); | ||
| 57 | }); | ||
| 58 | |||
| 59 | ed.selection.onBeforeSetContent.add(t._objectsToSpans, t); | ||
| 60 | |||
| 61 | if (ed.settings.content_css !== false) | ||
| 62 | ed.dom.loadCSS(url + "/css/content.css"); | ||
| 63 | |||
| 64 | if (ed.theme && ed.theme.onResolveName) { | ||
| 65 | ed.theme.onResolveName.add(function(th, o) { | ||
| 66 | if (o.name == 'img') { | ||
| 67 | each(lo, function(v, k) { | ||
| 68 | if (ed.dom.hasClass(o.node, k)) { | ||
| 69 | o.name = v; | ||
| 70 | o.title = ed.dom.getAttrib(o.node, 'title'); | ||
| 71 | return false; | ||
| 72 | } | ||
| 73 | }); | ||
| 74 | } | ||
| 75 | }); | ||
| 76 | } | ||
| 77 | |||
| 78 | if (ed && ed.plugins.contextmenu) { | ||
| 79 | ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) { | ||
| 80 | if (e.nodeName == 'IMG' && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(e.className)) { | ||
| 81 | m.add({title : 'media.edit', icon : 'media', cmd : 'mceMedia'}); | ||
| 82 | } | ||
| 83 | }); | ||
| 84 | } | ||
| 85 | }); | ||
| 86 | |||
| 87 | ed.onBeforeSetContent.add(t._objectsToSpans, t); | ||
| 88 | |||
| 89 | ed.onSetContent.add(function() { | ||
| 90 | t._spansToImgs(ed.getBody()); | ||
| 91 | }); | ||
| 92 | |||
| 93 | ed.onPreProcess.add(function(ed, o) { | ||
| 94 | var dom = ed.dom; | ||
| 95 | |||
| 96 | if (o.set) { | ||
| 97 | t._spansToImgs(o.node); | ||
| 98 | |||
| 99 | each(dom.select('IMG', o.node), function(n) { | ||
| 100 | var p; | ||
| 101 | |||
| 102 | if (isMediaElm(n)) { | ||
| 103 | p = t._parse(n.title); | ||
| 104 | dom.setAttrib(n, 'width', dom.getAttrib(n, 'width', p.width || 100)); | ||
| 105 | dom.setAttrib(n, 'height', dom.getAttrib(n, 'height', p.height || 100)); | ||
| 106 | } | ||
| 107 | }); | ||
| 108 | } | ||
| 109 | |||
| 110 | if (o.get) { | ||
| 111 | each(dom.select('IMG', o.node), function(n) { | ||
| 112 | var ci, cb, mt; | ||
| 113 | |||
| 114 | if (ed.getParam('media_use_script')) { | ||
| 115 | if (isMediaElm(n)) | ||
| 116 | n.className = n.className.replace(/mceItem/g, 'mceTemp'); | ||
| 117 | |||
| 118 | return; | ||
| 119 | } | ||
| 120 | |||
| 121 | switch (n.className) { | ||
| 122 | case 'mceItemFlash': | ||
| 123 | ci = 'd27cdb6e-ae6d-11cf-96b8-444553540000'; | ||
| 124 | cb = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'; | ||
| 125 | mt = 'application/x-shockwave-flash'; | ||
| 126 | break; | ||
| 127 | |||
| 128 | case 'mceItemShockWave': | ||
| 129 | ci = '166b1bca-3f9c-11cf-8075-444553540000'; | ||
| 130 | cb = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0'; | ||
| 131 | mt = 'application/x-director'; | ||
| 132 | break; | ||
| 133 | |||
| 134 | case 'mceItemWindowsMedia': | ||
| 135 | ci = ed.getParam('media_wmp6_compatible') ? '05589fa1-c356-11ce-bf01-00aa0055595a' : '6bf52a52-394a-11d3-b153-00c04f79faa6'; | ||
| 136 | cb = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'; | ||
| 137 | mt = 'application/x-mplayer2'; | ||
| 138 | break; | ||
| 139 | |||
| 140 | case 'mceItemQuickTime': | ||
| 141 | ci = '02bf25d5-8c17-4b23-bc80-d3488abddc6b'; | ||
| 142 | cb = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0'; | ||
| 143 | mt = 'video/quicktime'; | ||
| 144 | break; | ||
| 145 | |||
| 146 | case 'mceItemRealMedia': | ||
| 147 | ci = 'cfcdaa03-8be4-11cf-b84b-0020afbbccfa'; | ||
| 148 | cb = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'; | ||
| 149 | mt = 'audio/x-pn-realaudio-plugin'; | ||
| 150 | break; | ||
| 151 | } | ||
| 152 | |||
| 153 | if (ci) { | ||
| 154 | dom.replace(t._buildObj({ | ||
| 155 | classid : ci, | ||
| 156 | codebase : cb, | ||
| 157 | type : mt | ||
| 158 | }, n), n); | ||
| 159 | } | ||
| 160 | }); | ||
| 161 | } | ||
| 162 | }); | ||
| 163 | |||
| 164 | ed.onPostProcess.add(function(ed, o) { | ||
| 165 | o.content = o.content.replace(/_mce_value=/g, 'value='); | ||
| 166 | }); | ||
| 167 | |||
| 168 | function getAttr(s, n) { | ||
| 169 | n = new RegExp(n + '=\"([^\"]+)\"', 'g').exec(s); | ||
| 170 | |||
| 171 | return n ? ed.dom.decode(n[1]) : ''; | ||
| 172 | }; | ||
| 173 | |||
| 174 | ed.onPostProcess.add(function(ed, o) { | ||
| 175 | if (ed.getParam('media_use_script')) { | ||
| 176 | o.content = o.content.replace(/<img[^>]+>/g, function(im) { | ||
| 177 | var cl = getAttr(im, 'class'); | ||
| 178 | |||
| 179 | if (/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(cl)) { | ||
| 180 | at = t._parse(getAttr(im, 'title')); | ||
| 181 | at.width = getAttr(im, 'width'); | ||
| 182 | at.height = getAttr(im, 'height'); | ||
| 183 | im = '<script type="text/javascript">write' + cl.substring(7) + '({' + t._serialize(at) + '});</script>'; | ||
| 184 | } | ||
| 185 | |||
| 186 | return im; | ||
| 187 | }); | ||
| 188 | } | ||
| 189 | }); | ||
| 190 | }, | ||
| 191 | |||
| 192 | getInfo : function() { | ||
| 193 | return { | ||
| 194 | longname : 'Media', | ||
| 195 | author : 'Moxiecode Systems AB', | ||
| 196 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 197 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media', | ||
| 198 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 199 | }; | ||
| 200 | }, | ||
| 201 | |||
| 202 | // Private methods | ||
| 203 | _objectsToSpans : function(ed, o) { | ||
| 204 | var t = this, h = o.content; | ||
| 205 | |||
| 206 | h = h.replace(/<script[^>]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi, function(a, b, c) { | ||
| 207 | var o = t._parse(c); | ||
| 208 | |||
| 209 | return '<img class="mceItem' + b + '" title="' + ed.dom.encode(c) + '" src="' + t.url + '/img/trans.gif" width="' + o.width + '" height="' + o.height + '" />' | ||
| 210 | }); | ||
| 211 | |||
| 212 | h = h.replace(/<object([^>]*)>/gi, '<span class="mceItemObject" $1>'); | ||
| 213 | h = h.replace(/<embed([^>]*)\/?>/gi, '<span class="mceItemEmbed" $1></span>'); | ||
| 214 | h = h.replace(/<embed([^>]*)>/gi, '<span class="mceItemEmbed" $1>'); | ||
| 215 | h = h.replace(/<\/(object)([^>]*)>/gi, '</span>'); | ||
| 216 | h = h.replace(/<\/embed>/gi, ''); | ||
| 217 | h = h.replace(/<param([^>]*)>/gi, function(a, b) {return '<span ' + b.replace(/value=/gi, '_mce_value=') + ' class="mceItemParam"></span>'}); | ||
| 218 | h = h.replace(/\/ class=\"mceItemParam\"><\/span>/gi, 'class="mceItemParam"></span>'); | ||
| 219 | |||
| 220 | o.content = h; | ||
| 221 | }, | ||
| 222 | |||
| 223 | _buildObj : function(o, n) { | ||
| 224 | var ob, ed = this.editor, dom = ed.dom, p = this._parse(n.title), stc; | ||
| 225 | |||
| 226 | stc = ed.getParam('media_strict', true) && o.type == 'application/x-shockwave-flash'; | ||
| 227 | |||
| 228 | p.width = o.width = dom.getAttrib(n, 'width') || 100; | ||
| 229 | p.height = o.height = dom.getAttrib(n, 'height') || 100; | ||
| 230 | |||
| 231 | if (p.src) | ||
| 232 | p.src = ed.convertURL(p.src, 'src', n); | ||
| 233 | |||
| 234 | if (stc) { | ||
| 235 | ob = dom.create('span', { | ||
| 236 | id : p.id, | ||
| 237 | mce_name : 'object', | ||
| 238 | type : 'application/x-shockwave-flash', | ||
| 239 | data : p.src, | ||
| 240 | style : dom.getAttrib(n, 'style'), | ||
| 241 | width : o.width, | ||
| 242 | height : o.height | ||
| 243 | }); | ||
| 244 | } else { | ||
| 245 | ob = dom.create('span', { | ||
| 246 | id : p.id, | ||
| 247 | mce_name : 'object', | ||
| 248 | classid : "clsid:" + o.classid, | ||
| 249 | style : dom.getAttrib(n, 'style'), | ||
| 250 | codebase : o.codebase, | ||
| 251 | width : o.width, | ||
| 252 | height : o.height | ||
| 253 | }); | ||
| 254 | } | ||
| 255 | |||
| 256 | each (p, function(v, k) { | ||
| 257 | if (!/^(width|height|codebase|classid|id|_cx|_cy)$/.test(k)) { | ||
| 258 | // Use url instead of src in IE for Windows media | ||
| 259 | if (o.type == 'application/x-mplayer2' && k == 'src' && !p.url) | ||
| 260 | k = 'url'; | ||
| 261 | |||
| 262 | if (v) | ||
| 263 | dom.add(ob, 'span', {mce_name : 'param', name : k, '_mce_value' : v}); | ||
| 264 | } | ||
| 265 | }); | ||
| 266 | |||
| 267 | if (!stc) | ||
| 268 | dom.add(ob, 'span', tinymce.extend({mce_name : 'embed', type : o.type, style : dom.getAttrib(n, 'style')}, p)); | ||
| 269 | |||
| 270 | return ob; | ||
| 271 | }, | ||
| 272 | |||
| 273 | _spansToImgs : function(p) { | ||
| 274 | var t = this, dom = t.editor.dom, im, ci; | ||
| 275 | |||
| 276 | each(dom.select('span', p), function(n) { | ||
| 277 | // Convert object into image | ||
| 278 | if (dom.getAttrib(n, 'class') == 'mceItemObject') { | ||
| 279 | ci = dom.getAttrib(n, "classid").toLowerCase().replace(/\s+/g, ''); | ||
| 280 | |||
| 281 | switch (ci) { | ||
| 282 | case 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000': | ||
| 283 | dom.replace(t._createImg('mceItemFlash', n), n); | ||
| 284 | break; | ||
| 285 | |||
| 286 | case 'clsid:166b1bca-3f9c-11cf-8075-444553540000': | ||
| 287 | dom.replace(t._createImg('mceItemShockWave', n), n); | ||
| 288 | break; | ||
| 289 | |||
| 290 | case 'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6': | ||
| 291 | case 'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95': | ||
| 292 | case 'clsid:05589fa1-c356-11ce-bf01-00aa0055595a': | ||
| 293 | dom.replace(t._createImg('mceItemWindowsMedia', n), n); | ||
| 294 | break; | ||
| 295 | |||
| 296 | case 'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b': | ||
| 297 | dom.replace(t._createImg('mceItemQuickTime', n), n); | ||
| 298 | break; | ||
| 299 | |||
| 300 | case 'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa': | ||
| 301 | dom.replace(t._createImg('mceItemRealMedia', n), n); | ||
| 302 | break; | ||
| 303 | |||
| 304 | default: | ||
| 305 | dom.replace(t._createImg('mceItemFlash', n), n); | ||
| 306 | } | ||
| 307 | |||
| 308 | return; | ||
| 309 | } | ||
| 310 | |||
| 311 | // Convert embed into image | ||
| 312 | if (dom.getAttrib(n, 'class') == 'mceItemEmbed') { | ||
| 313 | switch (dom.getAttrib(n, 'type')) { | ||
| 314 | case 'application/x-shockwave-flash': | ||
| 315 | dom.replace(t._createImg('mceItemFlash', n), n); | ||
| 316 | break; | ||
| 317 | |||
| 318 | case 'application/x-director': | ||
| 319 | dom.replace(t._createImg('mceItemShockWave', n), n); | ||
| 320 | break; | ||
| 321 | |||
| 322 | case 'application/x-mplayer2': | ||
| 323 | dom.replace(t._createImg('mceItemWindowsMedia', n), n); | ||
| 324 | break; | ||
| 325 | |||
| 326 | case 'video/quicktime': | ||
| 327 | dom.replace(t._createImg('mceItemQuickTime', n), n); | ||
| 328 | break; | ||
| 329 | |||
| 330 | case 'audio/x-pn-realaudio-plugin': | ||
| 331 | dom.replace(t._createImg('mceItemRealMedia', n), n); | ||
| 332 | break; | ||
| 333 | |||
| 334 | default: | ||
| 335 | dom.replace(t._createImg('mceItemFlash', n), n); | ||
| 336 | } | ||
| 337 | } | ||
| 338 | }); | ||
| 339 | }, | ||
| 340 | |||
| 341 | _createImg : function(cl, n) { | ||
| 342 | var im, dom = this.editor.dom, pa = {}, ti = '', args; | ||
| 343 | |||
| 344 | args = ['id', 'name', 'width', 'height', 'bgcolor', 'align', 'flashvars', 'src', 'wmode', 'allowfullscreen', 'quality', 'data']; | ||
| 345 | |||
| 346 | // Create image | ||
| 347 | im = dom.create('img', { | ||
| 348 | src : this.url + '/img/trans.gif', | ||
| 349 | width : dom.getAttrib(n, 'width') || 100, | ||
| 350 | height : dom.getAttrib(n, 'height') || 100, | ||
| 351 | style : dom.getAttrib(n, 'style'), | ||
| 352 | 'class' : cl | ||
| 353 | }); | ||
| 354 | |||
| 355 | // Setup base parameters | ||
| 356 | each(args, function(na) { | ||
| 357 | var v = dom.getAttrib(n, na); | ||
| 358 | |||
| 359 | if (v) | ||
| 360 | pa[na] = v; | ||
| 361 | }); | ||
| 362 | |||
| 363 | // Add optional parameters | ||
| 364 | each(dom.select('span', n), function(n) { | ||
| 365 | if (dom.hasClass(n, 'mceItemParam')) | ||
| 366 | pa[dom.getAttrib(n, 'name')] = dom.getAttrib(n, '_mce_value'); | ||
| 367 | }); | ||
| 368 | |||
| 369 | // Use src not movie | ||
| 370 | if (pa.movie) { | ||
| 371 | pa.src = pa.movie; | ||
| 372 | delete pa.movie; | ||
| 373 | } | ||
| 374 | |||
| 375 | // No src try data | ||
| 376 | if (!pa.src) { | ||
| 377 | pa.src = pa.data; | ||
| 378 | delete pa.data; | ||
| 379 | } | ||
| 380 | |||
| 381 | // Merge with embed args | ||
| 382 | n = dom.select('.mceItemEmbed', n)[0]; | ||
| 383 | if (n) { | ||
| 384 | each(args, function(na) { | ||
| 385 | var v = dom.getAttrib(n, na); | ||
| 386 | |||
| 387 | if (v && !pa[na]) | ||
| 388 | pa[na] = v; | ||
| 389 | }); | ||
| 390 | } | ||
| 391 | |||
| 392 | delete pa.width; | ||
| 393 | delete pa.height; | ||
| 394 | |||
| 395 | im.title = this._serialize(pa); | ||
| 396 | |||
| 397 | return im; | ||
| 398 | }, | ||
| 399 | |||
| 400 | _parse : function(s) { | ||
| 401 | return tinymce.util.JSON.parse('{' + s + '}'); | ||
| 402 | }, | ||
| 403 | |||
| 404 | _serialize : function(o) { | ||
| 405 | return tinymce.util.JSON.serialize(o).replace(/[{}]/g, ''); | ||
| 406 | } | ||
| 407 | }); | ||
| 408 | |||
| 409 | // Register plugin | ||
| 410 | tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin); | ||
| 411 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/media/img/flash.gif b/public/javascripts/tiny_mce/plugins/media/img/flash.gif deleted file mode 100644 index cb192e6..0000000 --- a/public/javascripts/tiny_mce/plugins/media/img/flash.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/media/img/flv_player.swf b/public/javascripts/tiny_mce/plugins/media/img/flv_player.swf deleted file mode 100644 index 042c2ab..0000000 --- a/public/javascripts/tiny_mce/plugins/media/img/flv_player.swf +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/media/img/quicktime.gif b/public/javascripts/tiny_mce/plugins/media/img/quicktime.gif deleted file mode 100644 index 3b04991..0000000 --- a/public/javascripts/tiny_mce/plugins/media/img/quicktime.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/media/img/realmedia.gif b/public/javascripts/tiny_mce/plugins/media/img/realmedia.gif deleted file mode 100644 index fdfe0b9..0000000 --- a/public/javascripts/tiny_mce/plugins/media/img/realmedia.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/media/img/shockwave.gif b/public/javascripts/tiny_mce/plugins/media/img/shockwave.gif deleted file mode 100644 index 5f235df..0000000 --- a/public/javascripts/tiny_mce/plugins/media/img/shockwave.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/media/img/trans.gif b/public/javascripts/tiny_mce/plugins/media/img/trans.gif deleted file mode 100644 index 3884865..0000000 --- a/public/javascripts/tiny_mce/plugins/media/img/trans.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/media/img/windowsmedia.gif b/public/javascripts/tiny_mce/plugins/media/img/windowsmedia.gif deleted file mode 100644 index ab50f2d..0000000 --- a/public/javascripts/tiny_mce/plugins/media/img/windowsmedia.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/media/js/embed.js b/public/javascripts/tiny_mce/plugins/media/js/embed.js deleted file mode 100644 index f8dc810..0000000 --- a/public/javascripts/tiny_mce/plugins/media/js/embed.js +++ /dev/null | |||
| @@ -1,73 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose. | ||
| 3 | */ | ||
| 4 | |||
| 5 | function writeFlash(p) { | ||
| 6 | writeEmbed( | ||
| 7 | 'D27CDB6E-AE6D-11cf-96B8-444553540000', | ||
| 8 | 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', | ||
| 9 | 'application/x-shockwave-flash', | ||
| 10 | p | ||
| 11 | ); | ||
| 12 | } | ||
| 13 | |||
| 14 | function writeShockWave(p) { | ||
| 15 | writeEmbed( | ||
| 16 | '166B1BCA-3F9C-11CF-8075-444553540000', | ||
| 17 | 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0', | ||
| 18 | 'application/x-director', | ||
| 19 | p | ||
| 20 | ); | ||
| 21 | } | ||
| 22 | |||
| 23 | function writeQuickTime(p) { | ||
| 24 | writeEmbed( | ||
| 25 | '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B', | ||
| 26 | 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0', | ||
| 27 | 'video/quicktime', | ||
| 28 | p | ||
| 29 | ); | ||
| 30 | } | ||
| 31 | |||
| 32 | function writeRealMedia(p) { | ||
| 33 | writeEmbed( | ||
| 34 | 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA', | ||
| 35 | 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', | ||
| 36 | 'audio/x-pn-realaudio-plugin', | ||
| 37 | p | ||
| 38 | ); | ||
| 39 | } | ||
| 40 | |||
| 41 | function writeWindowsMedia(p) { | ||
| 42 | p.url = p.src; | ||
| 43 | writeEmbed( | ||
| 44 | '6BF52A52-394A-11D3-B153-00C04F79FAA6', | ||
| 45 | 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701', | ||
| 46 | 'application/x-mplayer2', | ||
| 47 | p | ||
| 48 | ); | ||
| 49 | } | ||
| 50 | |||
| 51 | function writeEmbed(cls, cb, mt, p) { | ||
| 52 | var h = '', n; | ||
| 53 | |||
| 54 | h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"'; | ||
| 55 | h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : ''; | ||
| 56 | h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : ''; | ||
| 57 | h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : ''; | ||
| 58 | h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : ''; | ||
| 59 | h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : ''; | ||
| 60 | h += '>'; | ||
| 61 | |||
| 62 | for (n in p) | ||
| 63 | h += '<param name="' + n + '" value="' + p[n] + '">'; | ||
| 64 | |||
| 65 | h += '<embed type="' + mt + '"'; | ||
| 66 | |||
| 67 | for (n in p) | ||
| 68 | h += n + '="' + p[n] + '" '; | ||
| 69 | |||
| 70 | h += '></embed></object>'; | ||
| 71 | |||
| 72 | document.write(h); | ||
| 73 | } | ||
diff --git a/public/javascripts/tiny_mce/plugins/media/js/media.js b/public/javascripts/tiny_mce/plugins/media/js/media.js deleted file mode 100644 index 86cfa98..0000000 --- a/public/javascripts/tiny_mce/plugins/media/js/media.js +++ /dev/null | |||
| @@ -1,630 +0,0 @@ | |||
| 1 | tinyMCEPopup.requireLangPack(); | ||
| 2 | |||
| 3 | var oldWidth, oldHeight, ed, url; | ||
| 4 | |||
| 5 | if (url = tinyMCEPopup.getParam("media_external_list_url")) | ||
| 6 | document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>'); | ||
| 7 | |||
| 8 | function init() { | ||
| 9 | var pl = "", f, val; | ||
| 10 | var type = "flash", fe, i; | ||
| 11 | |||
| 12 | ed = tinyMCEPopup.editor; | ||
| 13 | |||
| 14 | tinyMCEPopup.resizeToInnerSize(); | ||
| 15 | f = document.forms[0] | ||
| 16 | |||
| 17 | fe = ed.selection.getNode(); | ||
| 18 | if (/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) { | ||
| 19 | pl = fe.title; | ||
| 20 | |||
| 21 | switch (ed.dom.getAttrib(fe, 'class')) { | ||
| 22 | case 'mceItemFlash': | ||
| 23 | type = 'flash'; | ||
| 24 | break; | ||
| 25 | |||
| 26 | case 'mceItemFlashVideo': | ||
| 27 | type = 'flv'; | ||
| 28 | break; | ||
| 29 | |||
| 30 | case 'mceItemShockWave': | ||
| 31 | type = 'shockwave'; | ||
| 32 | break; | ||
| 33 | |||
| 34 | case 'mceItemWindowsMedia': | ||
| 35 | type = 'wmp'; | ||
| 36 | break; | ||
| 37 | |||
| 38 | case 'mceItemQuickTime': | ||
| 39 | type = 'qt'; | ||
| 40 | break; | ||
| 41 | |||
| 42 | case 'mceItemRealMedia': | ||
| 43 | type = 'rmp'; | ||
| 44 | break; | ||
| 45 | } | ||
| 46 | |||
| 47 | document.forms[0].insert.value = ed.getLang('update', 'Insert', true); | ||
| 48 | } | ||
| 49 | |||
| 50 | document.getElementById('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media'); | ||
| 51 | document.getElementById('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','qt_qtsrc','media','media'); | ||
| 52 | document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); | ||
| 53 | |||
| 54 | var html = getMediaListHTML('medialist','src','media','media'); | ||
| 55 | if (html == "") | ||
| 56 | document.getElementById("linklistrow").style.display = 'none'; | ||
| 57 | else | ||
| 58 | document.getElementById("linklistcontainer").innerHTML = html; | ||
| 59 | |||
| 60 | // Resize some elements | ||
| 61 | if (isVisible('filebrowser')) | ||
| 62 | document.getElementById('src').style.width = '230px'; | ||
| 63 | |||
| 64 | // Setup form | ||
| 65 | if (pl != "") { | ||
| 66 | pl = tinyMCEPopup.editor.plugins.media._parse(pl); | ||
| 67 | |||
| 68 | switch (type) { | ||
| 69 | case "flash": | ||
| 70 | setBool(pl, 'flash', 'play'); | ||
| 71 | setBool(pl, 'flash', 'loop'); | ||
| 72 | setBool(pl, 'flash', 'menu'); | ||
| 73 | setBool(pl, 'flash', 'swliveconnect'); | ||
| 74 | setStr(pl, 'flash', 'quality'); | ||
| 75 | setStr(pl, 'flash', 'scale'); | ||
| 76 | setStr(pl, 'flash', 'salign'); | ||
| 77 | setStr(pl, 'flash', 'wmode'); | ||
| 78 | setStr(pl, 'flash', 'base'); | ||
| 79 | setStr(pl, 'flash', 'flashvars'); | ||
| 80 | break; | ||
| 81 | |||
| 82 | case "qt": | ||
| 83 | setBool(pl, 'qt', 'loop'); | ||
| 84 | setBool(pl, 'qt', 'autoplay'); | ||
| 85 | setBool(pl, 'qt', 'cache'); | ||
| 86 | setBool(pl, 'qt', 'controller'); | ||
| 87 | setBool(pl, 'qt', 'correction'); | ||
| 88 | setBool(pl, 'qt', 'enablejavascript'); | ||
| 89 | setBool(pl, 'qt', 'kioskmode'); | ||
| 90 | setBool(pl, 'qt', 'autohref'); | ||
| 91 | setBool(pl, 'qt', 'playeveryframe'); | ||
| 92 | setBool(pl, 'qt', 'tarsetcache'); | ||
| 93 | setStr(pl, 'qt', 'scale'); | ||
| 94 | setStr(pl, 'qt', 'starttime'); | ||
| 95 | setStr(pl, 'qt', 'endtime'); | ||
| 96 | setStr(pl, 'qt', 'tarset'); | ||
| 97 | setStr(pl, 'qt', 'qtsrcchokespeed'); | ||
| 98 | setStr(pl, 'qt', 'volume'); | ||
| 99 | setStr(pl, 'qt', 'qtsrc'); | ||
| 100 | break; | ||
| 101 | |||
| 102 | case "shockwave": | ||
| 103 | setBool(pl, 'shockwave', 'sound'); | ||
| 104 | setBool(pl, 'shockwave', 'progress'); | ||
| 105 | setBool(pl, 'shockwave', 'autostart'); | ||
| 106 | setBool(pl, 'shockwave', 'swliveconnect'); | ||
| 107 | setStr(pl, 'shockwave', 'swvolume'); | ||
| 108 | setStr(pl, 'shockwave', 'swstretchstyle'); | ||
| 109 | setStr(pl, 'shockwave', 'swstretchhalign'); | ||
| 110 | setStr(pl, 'shockwave', 'swstretchvalign'); | ||
| 111 | break; | ||
| 112 | |||
| 113 | case "wmp": | ||
| 114 | setBool(pl, 'wmp', 'autostart'); | ||
| 115 | setBool(pl, 'wmp', 'enabled'); | ||
| 116 | setBool(pl, 'wmp', 'enablecontextmenu'); | ||
| 117 | setBool(pl, 'wmp', 'fullscreen'); | ||
| 118 | setBool(pl, 'wmp', 'invokeurls'); | ||
| 119 | setBool(pl, 'wmp', 'mute'); | ||
| 120 | setBool(pl, 'wmp', 'stretchtofit'); | ||
| 121 | setBool(pl, 'wmp', 'windowlessvideo'); | ||
| 122 | setStr(pl, 'wmp', 'balance'); | ||
| 123 | setStr(pl, 'wmp', 'baseurl'); | ||
| 124 | setStr(pl, 'wmp', 'captioningid'); | ||
| 125 | setStr(pl, 'wmp', 'currentmarker'); | ||
| 126 | setStr(pl, 'wmp', 'currentposition'); | ||
| 127 | setStr(pl, 'wmp', 'defaultframe'); | ||
| 128 | setStr(pl, 'wmp', 'playcount'); | ||
| 129 | setStr(pl, 'wmp', 'rate'); | ||
| 130 | setStr(pl, 'wmp', 'uimode'); | ||
| 131 | setStr(pl, 'wmp', 'volume'); | ||
| 132 | break; | ||
| 133 | |||
| 134 | case "rmp": | ||
| 135 | setBool(pl, 'rmp', 'autostart'); | ||
| 136 | setBool(pl, 'rmp', 'loop'); | ||
| 137 | setBool(pl, 'rmp', 'autogotourl'); | ||
| 138 | setBool(pl, 'rmp', 'center'); | ||
| 139 | setBool(pl, 'rmp', 'imagestatus'); | ||
| 140 | setBool(pl, 'rmp', 'maintainaspect'); | ||
| 141 | setBool(pl, 'rmp', 'nojava'); | ||
| 142 | setBool(pl, 'rmp', 'prefetch'); | ||
| 143 | setBool(pl, 'rmp', 'shuffle'); | ||
| 144 | setStr(pl, 'rmp', 'console'); | ||
| 145 | setStr(pl, 'rmp', 'controls'); | ||
| 146 | setStr(pl, 'rmp', 'numloop'); | ||
| 147 | setStr(pl, 'rmp', 'scriptcallbacks'); | ||
| 148 | break; | ||
| 149 | } | ||
| 150 | |||
| 151 | setStr(pl, null, 'src'); | ||
| 152 | setStr(pl, null, 'id'); | ||
| 153 | setStr(pl, null, 'name'); | ||
| 154 | setStr(pl, null, 'vspace'); | ||
| 155 | setStr(pl, null, 'hspace'); | ||
| 156 | setStr(pl, null, 'bgcolor'); | ||
| 157 | setStr(pl, null, 'align'); | ||
| 158 | setStr(pl, null, 'width'); | ||
| 159 | setStr(pl, null, 'height'); | ||
| 160 | |||
| 161 | if ((val = ed.dom.getAttrib(fe, "width")) != "") | ||
| 162 | pl.width = f.width.value = val; | ||
| 163 | |||
| 164 | if ((val = ed.dom.getAttrib(fe, "height")) != "") | ||
| 165 | pl.height = f.height.value = val; | ||
| 166 | |||
| 167 | oldWidth = pl.width ? parseInt(pl.width) : 0; | ||
| 168 | oldHeight = pl.height ? parseInt(pl.height) : 0; | ||
| 169 | } else | ||
| 170 | oldWidth = oldHeight = 0; | ||
| 171 | |||
| 172 | selectByValue(f, 'media_type', type); | ||
| 173 | changedType(type); | ||
| 174 | updateColor('bgcolor_pick', 'bgcolor'); | ||
| 175 | |||
| 176 | TinyMCE_EditableSelects.init(); | ||
| 177 | generatePreview(); | ||
| 178 | } | ||
| 179 | |||
| 180 | function insertMedia() { | ||
| 181 | var fe, f = document.forms[0], h; | ||
| 182 | |||
| 183 | tinyMCEPopup.restoreSelection(); | ||
| 184 | |||
| 185 | if (!AutoValidator.validate(f)) { | ||
| 186 | tinyMCEPopup.alert(ed.getLang('invalid_data')); | ||
| 187 | return false; | ||
| 188 | } | ||
| 189 | |||
| 190 | f.width.value = f.width.value == "" ? 100 : f.width.value; | ||
| 191 | f.height.value = f.height.value == "" ? 100 : f.height.value; | ||
| 192 | |||
| 193 | fe = ed.selection.getNode(); | ||
| 194 | if (fe != null && /mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(ed.dom.getAttrib(fe, 'class'))) { | ||
| 195 | switch (f.media_type.options[f.media_type.selectedIndex].value) { | ||
| 196 | case "flash": | ||
| 197 | fe.className = "mceItemFlash"; | ||
| 198 | break; | ||
| 199 | |||
| 200 | case "flv": | ||
| 201 | fe.className = "mceItemFlashVideo"; | ||
| 202 | break; | ||
| 203 | |||
| 204 | case "shockwave": | ||
| 205 | fe.className = "mceItemShockWave"; | ||
| 206 | break; | ||
| 207 | |||
| 208 | case "qt": | ||
| 209 | fe.className = "mceItemQuickTime"; | ||
| 210 | break; | ||
| 211 | |||
| 212 | case "wmp": | ||
| 213 | fe.className = "mceItemWindowsMedia"; | ||
| 214 | break; | ||
| 215 | |||
| 216 | case "rmp": | ||
| 217 | fe.className = "mceItemRealMedia"; | ||
| 218 | break; | ||
| 219 | } | ||
| 220 | |||
| 221 | if (fe.width != f.width.value || fe.height != f.height.value) | ||
| 222 | ed.execCommand('mceRepaint'); | ||
| 223 | |||
| 224 | fe.title = serializeParameters(); | ||
| 225 | fe.width = f.width.value; | ||
| 226 | fe.height = f.height.value; | ||
| 227 | fe.style.width = f.width.value + (f.width.value.indexOf('%') == -1 ? 'px' : ''); | ||
| 228 | fe.style.height = f.height.value + (f.height.value.indexOf('%') == -1 ? 'px' : ''); | ||
| 229 | fe.align = f.align.options[f.align.selectedIndex].value; | ||
| 230 | } else { | ||
| 231 | h = '<img src="' + tinyMCEPopup.getWindowArg("plugin_url") + '/img/trans.gif"' ; | ||
| 232 | |||
| 233 | switch (f.media_type.options[f.media_type.selectedIndex].value) { | ||
| 234 | case "flash": | ||
| 235 | h += ' class="mceItemFlash"'; | ||
| 236 | break; | ||
| 237 | |||
| 238 | case "flv": | ||
| 239 | h += ' class="mceItemFlashVideo"'; | ||
| 240 | break; | ||
| 241 | |||
| 242 | case "shockwave": | ||
| 243 | h += ' class="mceItemShockWave"'; | ||
| 244 | break; | ||
| 245 | |||
| 246 | case "qt": | ||
| 247 | h += ' class="mceItemQuickTime"'; | ||
| 248 | break; | ||
| 249 | |||
| 250 | case "wmp": | ||
| 251 | h += ' class="mceItemWindowsMedia"'; | ||
| 252 | break; | ||
| 253 | |||
| 254 | case "rmp": | ||
| 255 | h += ' class="mceItemRealMedia"'; | ||
| 256 | break; | ||
| 257 | } | ||
| 258 | |||
| 259 | h += ' title="' + serializeParameters() + '"'; | ||
| 260 | h += ' width="' + f.width.value + '"'; | ||
| 261 | h += ' height="' + f.height.value + '"'; | ||
| 262 | h += ' align="' + f.align.options[f.align.selectedIndex].value + '"'; | ||
| 263 | |||
| 264 | h += ' />'; | ||
| 265 | |||
| 266 | ed.execCommand('mceInsertContent', false, h); | ||
| 267 | } | ||
| 268 | |||
| 269 | tinyMCEPopup.close(); | ||
| 270 | } | ||
| 271 | |||
| 272 | function updatePreview() { | ||
| 273 | var f = document.forms[0], type; | ||
| 274 | |||
| 275 | f.width.value = f.width.value || '320'; | ||
| 276 | f.height.value = f.height.value || '240'; | ||
| 277 | |||
| 278 | type = getType(f.src.value); | ||
| 279 | selectByValue(f, 'media_type', type); | ||
| 280 | changedType(type); | ||
| 281 | generatePreview(); | ||
| 282 | } | ||
| 283 | |||
| 284 | function getMediaListHTML() { | ||
| 285 | if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) { | ||
| 286 | var html = ""; | ||
| 287 | |||
| 288 | html += '<select id="linklist" name="linklist" style="width: 250px" onchange="this.form.src.value=this.options[this.selectedIndex].value;updatePreview();">'; | ||
| 289 | html += '<option value="">---</option>'; | ||
| 290 | |||
| 291 | for (var i=0; i<tinyMCEMediaList.length; i++) | ||
| 292 | html += '<option value="' + tinyMCEMediaList[i][1] + '">' + tinyMCEMediaList[i][0] + '</option>'; | ||
| 293 | |||
| 294 | html += '</select>'; | ||
| 295 | |||
| 296 | return html; | ||
| 297 | } | ||
| 298 | |||
| 299 | return ""; | ||
| 300 | } | ||
| 301 | |||
| 302 | function getType(v) { | ||
| 303 | var fo, i, c, el, x, f = document.forms[0]; | ||
| 304 | |||
| 305 | fo = ed.getParam("media_types", "flash=swf;flv=flv;shockwave=dcr;qt=mov,qt,mpg,mp3,mp4,mpeg;shockwave=dcr;wmp=avi,wmv,wm,asf,asx,wmx,wvx;rmp=rm,ra,ram").split(';'); | ||
| 306 | |||
| 307 | // YouTube | ||
| 308 | if (v.match(/watch\?v=(.+)(.*)/)) { | ||
| 309 | f.width.value = '425'; | ||
| 310 | f.height.value = '350'; | ||
| 311 | f.src.value = 'http://www.youtube.com/v/' + v.match(/v=(.*)(.*)/)[0].split('=')[1]; | ||
| 312 | return 'flash'; | ||
| 313 | } | ||
| 314 | |||
| 315 | // Google video | ||
| 316 | if (v.indexOf('http://video.google.com/videoplay?docid=') == 0) { | ||
| 317 | f.width.value = '425'; | ||
| 318 | f.height.value = '326'; | ||
| 319 | f.src.value = 'http://video.google.com/googleplayer.swf?docId=' + v.substring('http://video.google.com/videoplay?docid='.length) + '&hl=en'; | ||
| 320 | return 'flash'; | ||
| 321 | } | ||
| 322 | |||
| 323 | for (i=0; i<fo.length; i++) { | ||
| 324 | c = fo[i].split('='); | ||
| 325 | |||
| 326 | el = c[1].split(','); | ||
| 327 | for (x=0; x<el.length; x++) | ||
| 328 | if (v.indexOf('.' + el[x]) != -1) | ||
| 329 | return c[0]; | ||
| 330 | } | ||
| 331 | |||
| 332 | return null; | ||
| 333 | } | ||
| 334 | |||
| 335 | function switchType(v) { | ||
| 336 | var t = getType(v), d = document, f = d.forms[0]; | ||
| 337 | |||
| 338 | if (!t) | ||
| 339 | return; | ||
| 340 | |||
| 341 | selectByValue(d.forms[0], 'media_type', t); | ||
| 342 | changedType(t); | ||
| 343 | |||
| 344 | // Update qtsrc also | ||
| 345 | if (t == 'qt' && f.src.value.toLowerCase().indexOf('rtsp://') != -1) { | ||
| 346 | alert(ed.getLang("media_qt_stream_warn")); | ||
| 347 | |||
| 348 | if (f.qt_qtsrc.value == '') | ||
| 349 | f.qt_qtsrc.value = f.src.value; | ||
| 350 | } | ||
| 351 | } | ||
| 352 | |||
| 353 | function changedType(t) { | ||
| 354 | var d = document; | ||
| 355 | |||
| 356 | d.getElementById('flash_options').style.display = 'none'; | ||
| 357 | d.getElementById('flv_options').style.display = 'none'; | ||
| 358 | d.getElementById('qt_options').style.display = 'none'; | ||
| 359 | d.getElementById('shockwave_options').style.display = 'none'; | ||
| 360 | d.getElementById('wmp_options').style.display = 'none'; | ||
| 361 | d.getElementById('rmp_options').style.display = 'none'; | ||
| 362 | |||
| 363 | if (t) | ||
| 364 | d.getElementById(t + '_options').style.display = 'block'; | ||
| 365 | } | ||
| 366 | |||
| 367 | function serializeParameters() { | ||
| 368 | var d = document, f = d.forms[0], s = ''; | ||
| 369 | |||
| 370 | switch (f.media_type.options[f.media_type.selectedIndex].value) { | ||
| 371 | case "flash": | ||
| 372 | s += getBool('flash', 'play', true); | ||
| 373 | s += getBool('flash', 'loop', true); | ||
| 374 | s += getBool('flash', 'menu', true); | ||
| 375 | s += getBool('flash', 'swliveconnect', false); | ||
| 376 | s += getStr('flash', 'quality'); | ||
| 377 | s += getStr('flash', 'scale'); | ||
| 378 | s += getStr('flash', 'salign'); | ||
| 379 | s += getStr('flash', 'wmode'); | ||
| 380 | s += getStr('flash', 'base'); | ||
| 381 | s += getStr('flash', 'flashvars'); | ||
| 382 | break; | ||
| 383 | |||
| 384 | case "qt": | ||
| 385 | s += getBool('qt', 'loop', false); | ||
| 386 | s += getBool('qt', 'autoplay', true); | ||
| 387 | s += getBool('qt', 'cache', false); | ||
| 388 | s += getBool('qt', 'controller', true); | ||
| 389 | s += getBool('qt', 'correction', false, 'none', 'full'); | ||
| 390 | s += getBool('qt', 'enablejavascript', false); | ||
| 391 | s += getBool('qt', 'kioskmode', false); | ||
| 392 | s += getBool('qt', 'autohref', false); | ||
| 393 | s += getBool('qt', 'playeveryframe', false); | ||
| 394 | s += getBool('qt', 'targetcache', false); | ||
| 395 | s += getStr('qt', 'scale'); | ||
| 396 | s += getStr('qt', 'starttime'); | ||
| 397 | s += getStr('qt', 'endtime'); | ||
| 398 | s += getStr('qt', 'target'); | ||
| 399 | s += getStr('qt', 'qtsrcchokespeed'); | ||
| 400 | s += getStr('qt', 'volume'); | ||
| 401 | s += getStr('qt', 'qtsrc'); | ||
| 402 | break; | ||
| 403 | |||
| 404 | case "shockwave": | ||
| 405 | s += getBool('shockwave', 'sound'); | ||
| 406 | s += getBool('shockwave', 'progress'); | ||
| 407 | s += getBool('shockwave', 'autostart'); | ||
| 408 | s += getBool('shockwave', 'swliveconnect'); | ||
| 409 | s += getStr('shockwave', 'swvolume'); | ||
| 410 | s += getStr('shockwave', 'swstretchstyle'); | ||
| 411 | s += getStr('shockwave', 'swstretchhalign'); | ||
| 412 | s += getStr('shockwave', 'swstretchvalign'); | ||
| 413 | break; | ||
| 414 | |||
| 415 | case "wmp": | ||
| 416 | s += getBool('wmp', 'autostart', true); | ||
| 417 | s += getBool('wmp', 'enabled', false); | ||
| 418 | s += getBool('wmp', 'enablecontextmenu', true); | ||
| 419 | s += getBool('wmp', 'fullscreen', false); | ||
| 420 | s += getBool('wmp', 'invokeurls', true); | ||
| 421 | s += getBool('wmp', 'mute', false); | ||
| 422 | s += getBool('wmp', 'stretchtofit', false); | ||
| 423 | s += getBool('wmp', 'windowlessvideo', false); | ||
| 424 | s += getStr('wmp', 'balance'); | ||
| 425 | s += getStr('wmp', 'baseurl'); | ||
| 426 | s += getStr('wmp', 'captioningid'); | ||
| 427 | s += getStr('wmp', 'currentmarker'); | ||
| 428 | s += getStr('wmp', 'currentposition'); | ||
| 429 | s += getStr('wmp', 'defaultframe'); | ||
| 430 | s += getStr('wmp', 'playcount'); | ||
| 431 | s += getStr('wmp', 'rate'); | ||
| 432 | s += getStr('wmp', 'uimode'); | ||
| 433 | s += getStr('wmp', 'volume'); | ||
| 434 | break; | ||
| 435 | |||
| 436 | case "rmp": | ||
| 437 | s += getBool('rmp', 'autostart', false); | ||
| 438 | s += getBool('rmp', 'loop', false); | ||
| 439 | s += getBool('rmp', 'autogotourl', true); | ||
| 440 | s += getBool('rmp', 'center', false); | ||
| 441 | s += getBool('rmp', 'imagestatus', true); | ||
| 442 | s += getBool('rmp', 'maintainaspect', false); | ||
| 443 | s += getBool('rmp', 'nojava', false); | ||
| 444 | s += getBool('rmp', 'prefetch', false); | ||
| 445 | s += getBool('rmp', 'shuffle', false); | ||
| 446 | s += getStr('rmp', 'console'); | ||
| 447 | s += getStr('rmp', 'controls'); | ||
| 448 | s += getStr('rmp', 'numloop'); | ||
| 449 | s += getStr('rmp', 'scriptcallbacks'); | ||
| 450 | break; | ||
| 451 | } | ||
| 452 | |||
| 453 | s += getStr(null, 'id'); | ||
| 454 | s += getStr(null, 'name'); | ||
| 455 | s += getStr(null, 'src'); | ||
| 456 | s += getStr(null, 'align'); | ||
| 457 | s += getStr(null, 'bgcolor'); | ||
| 458 | s += getInt(null, 'vspace'); | ||
| 459 | s += getInt(null, 'hspace'); | ||
| 460 | s += getStr(null, 'width'); | ||
| 461 | s += getStr(null, 'height'); | ||
| 462 | |||
| 463 | s = s.length > 0 ? s.substring(0, s.length - 1) : s; | ||
| 464 | |||
| 465 | return s; | ||
| 466 | } | ||
| 467 | |||
| 468 | function setBool(pl, p, n) { | ||
| 469 | if (typeof(pl[n]) == "undefined") | ||
| 470 | return; | ||
| 471 | |||
| 472 | document.forms[0].elements[p + "_" + n].checked = pl[n] != 'false'; | ||
| 473 | } | ||
| 474 | |||
| 475 | function setStr(pl, p, n) { | ||
| 476 | var f = document.forms[0], e = f.elements[(p != null ? p + "_" : '') + n]; | ||
| 477 | |||
| 478 | if (typeof(pl[n]) == "undefined") | ||
| 479 | return; | ||
| 480 | |||
| 481 | if (e.type == "text") | ||
| 482 | e.value = pl[n]; | ||
| 483 | else | ||
| 484 | selectByValue(f, (p != null ? p + "_" : '') + n, pl[n]); | ||
| 485 | } | ||
| 486 | |||
| 487 | function getBool(p, n, d, tv, fv) { | ||
| 488 | var v = document.forms[0].elements[p + "_" + n].checked; | ||
| 489 | |||
| 490 | tv = typeof(tv) == 'undefined' ? 'true' : "'" + jsEncode(tv) + "'"; | ||
| 491 | fv = typeof(fv) == 'undefined' ? 'false' : "'" + jsEncode(fv) + "'"; | ||
| 492 | |||
| 493 | return (v == d) ? '' : n + (v ? ':' + tv + ',' : ":\'" + fv + "\',"); | ||
| 494 | } | ||
| 495 | |||
| 496 | function getStr(p, n, d) { | ||
| 497 | var e = document.forms[0].elements[(p != null ? p + "_" : "") + n]; | ||
| 498 | var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value; | ||
| 499 | |||
| 500 | if (n == 'src') | ||
| 501 | v = tinyMCEPopup.editor.convertURL(v, 'src', null); | ||
| 502 | |||
| 503 | return ((n == d || v == '') ? '' : n + ":'" + jsEncode(v) + "',"); | ||
| 504 | } | ||
| 505 | |||
| 506 | function getInt(p, n, d) { | ||
| 507 | var e = document.forms[0].elements[(p != null ? p + "_" : "") + n]; | ||
| 508 | var v = e.type == "text" ? e.value : e.options[e.selectedIndex].value; | ||
| 509 | |||
| 510 | return ((n == d || v == '') ? '' : n + ":" + v.replace(/[^0-9]+/g, '') + ","); | ||
| 511 | } | ||
| 512 | |||
| 513 | function jsEncode(s) { | ||
| 514 | s = s.replace(new RegExp('\\\\', 'g'), '\\\\'); | ||
| 515 | s = s.replace(new RegExp('"', 'g'), '\\"'); | ||
| 516 | s = s.replace(new RegExp("'", 'g'), "\\'"); | ||
| 517 | |||
| 518 | return s; | ||
| 519 | } | ||
| 520 | |||
| 521 | function generatePreview(c) { | ||
| 522 | var f = document.forms[0], p = document.getElementById('prev'), h = '', cls, pl, n, type, codebase, wp, hp, nw, nh; | ||
| 523 | |||
| 524 | p.innerHTML = '<!-- x --->'; | ||
| 525 | |||
| 526 | nw = parseInt(f.width.value); | ||
| 527 | nh = parseInt(f.height.value); | ||
| 528 | |||
| 529 | if (f.width.value != "" && f.height.value != "") { | ||
| 530 | if (f.constrain.checked) { | ||
| 531 | if (c == 'width' && oldWidth != 0) { | ||
| 532 | wp = nw / oldWidth; | ||
| 533 | nh = Math.round(wp * nh); | ||
| 534 | f.height.value = nh; | ||
| 535 | } else if (c == 'height' && oldHeight != 0) { | ||
| 536 | hp = nh / oldHeight; | ||
| 537 | nw = Math.round(hp * nw); | ||
| 538 | f.width.value = nw; | ||
| 539 | } | ||
| 540 | } | ||
| 541 | } | ||
| 542 | |||
| 543 | if (f.width.value != "") | ||
| 544 | oldWidth = nw; | ||
| 545 | |||
| 546 | if (f.height.value != "") | ||
| 547 | oldHeight = nh; | ||
| 548 | |||
| 549 | // After constrain | ||
| 550 | pl = serializeParameters(); | ||
| 551 | |||
| 552 | switch (f.media_type.options[f.media_type.selectedIndex].value) { | ||
| 553 | case "flash": | ||
| 554 | cls = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'; | ||
| 555 | codebase = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'; | ||
| 556 | type = 'application/x-shockwave-flash'; | ||
| 557 | break; | ||
| 558 | |||
| 559 | case "shockwave": | ||
| 560 | cls = 'clsid:166B1BCA-3F9C-11CF-8075-444553540000'; | ||
| 561 | codebase = 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0'; | ||
| 562 | type = 'application/x-director'; | ||
| 563 | break; | ||
| 564 | |||
| 565 | case "qt": | ||
| 566 | cls = 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B'; | ||
| 567 | codebase = 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0'; | ||
| 568 | type = 'video/quicktime'; | ||
| 569 | break; | ||
| 570 | |||
| 571 | case "wmp": | ||
| 572 | cls = ed.getParam('media_wmp6_compatible') ? 'clsid:05589FA1-C356-11CE-BF01-00AA0055595A' : 'clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6'; | ||
| 573 | codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'; | ||
| 574 | type = 'application/x-mplayer2'; | ||
| 575 | break; | ||
| 576 | |||
| 577 | case "rmp": | ||
| 578 | cls = 'clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA'; | ||
| 579 | codebase = 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'; | ||
| 580 | type = 'audio/x-pn-realaudio-plugin'; | ||
| 581 | break; | ||
| 582 | } | ||
| 583 | |||
| 584 | if (pl == '') { | ||
| 585 | p.innerHTML = ''; | ||
| 586 | return; | ||
| 587 | } | ||
| 588 | |||
| 589 | pl = tinyMCEPopup.editor.plugins.media._parse(pl); | ||
| 590 | |||
| 591 | if (!pl.src) { | ||
| 592 | p.innerHTML = ''; | ||
| 593 | return; | ||
| 594 | } | ||
| 595 | |||
| 596 | pl.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(pl.src); | ||
| 597 | pl.width = !pl.width ? 100 : pl.width; | ||
| 598 | pl.height = !pl.height ? 100 : pl.height; | ||
| 599 | pl.id = !pl.id ? 'obj' : pl.id; | ||
| 600 | pl.name = !pl.name ? 'eobj' : pl.name; | ||
| 601 | pl.align = !pl.align ? '' : pl.align; | ||
| 602 | |||
| 603 | // Avoid annoying warning about insecure items | ||
| 604 | if (!tinymce.isIE || document.location.protocol != 'https:') { | ||
| 605 | h += '<object classid="' + cls + '" codebase="' + codebase + '" width="' + pl.width + '" height="' + pl.height + '" id="' + pl.id + '" name="' + pl.name + '" align="' + pl.align + '">'; | ||
| 606 | |||
| 607 | for (n in pl) { | ||
| 608 | h += '<param name="' + n + '" value="' + pl[n] + '">'; | ||
| 609 | |||
| 610 | // Add extra url parameter if it's an absolute URL | ||
| 611 | if (n == 'src' && pl[n].indexOf('://') != -1) | ||
| 612 | h += '<param name="url" value="' + pl[n] + '" />'; | ||
| 613 | } | ||
| 614 | } | ||
| 615 | |||
| 616 | h += '<embed type="' + type + '" '; | ||
| 617 | |||
| 618 | for (n in pl) | ||
| 619 | h += n + '="' + pl[n] + '" '; | ||
| 620 | |||
| 621 | h += '></embed>'; | ||
| 622 | |||
| 623 | // Avoid annoying warning about insecure items | ||
| 624 | if (!tinymce.isIE || document.location.protocol != 'https:') | ||
| 625 | h += '</object>'; | ||
| 626 | |||
| 627 | p.innerHTML = "<!-- x --->" + h; | ||
| 628 | } | ||
| 629 | |||
| 630 | tinyMCEPopup.onInit.add(init); | ||
diff --git a/public/javascripts/tiny_mce/plugins/media/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/media/langs/en_dlg.js deleted file mode 100644 index 6d0a996..0000000 --- a/public/javascripts/tiny_mce/plugins/media/langs/en_dlg.js +++ /dev/null | |||
| @@ -1,103 +0,0 @@ | |||
| 1 | tinyMCE.addI18n('en.media_dlg',{ | ||
| 2 | title:"Insert / edit embedded media", | ||
| 3 | general:"General", | ||
| 4 | advanced:"Advanced", | ||
| 5 | file:"File/URL", | ||
| 6 | list:"List", | ||
| 7 | size:"Dimensions", | ||
| 8 | preview:"Preview", | ||
| 9 | constrain_proportions:"Constrain proportions", | ||
| 10 | type:"Type", | ||
| 11 | id:"Id", | ||
| 12 | name:"Name", | ||
| 13 | class_name:"Class", | ||
| 14 | vspace:"V-Space", | ||
| 15 | hspace:"H-Space", | ||
| 16 | play:"Auto play", | ||
| 17 | loop:"Loop", | ||
| 18 | menu:"Show menu", | ||
| 19 | quality:"Quality", | ||
| 20 | scale:"Scale", | ||
| 21 | align:"Align", | ||
| 22 | salign:"SAlign", | ||
| 23 | wmode:"WMode", | ||
| 24 | bgcolor:"Background", | ||
| 25 | base:"Base", | ||
| 26 | flashvars:"Flashvars", | ||
| 27 | liveconnect:"SWLiveConnect", | ||
| 28 | autohref:"AutoHREF", | ||
| 29 | cache:"Cache", | ||
| 30 | hidden:"Hidden", | ||
| 31 | controller:"Controller", | ||
| 32 | kioskmode:"Kiosk mode", | ||
| 33 | playeveryframe:"Play every frame", | ||
| 34 | targetcache:"Target cache", | ||
| 35 | correction:"No correction", | ||
| 36 | enablejavascript:"Enable JavaScript", | ||
| 37 | starttime:"Start time", | ||
| 38 | endtime:"End time", | ||
| 39 | href:"Href", | ||
| 40 | qtsrcchokespeed:"Choke speed", | ||
| 41 | target:"Target", | ||
| 42 | volume:"Volume", | ||
| 43 | autostart:"Auto start", | ||
| 44 | enabled:"Enabled", | ||
| 45 | fullscreen:"Fullscreen", | ||
| 46 | invokeurls:"Invoke URLs", | ||
| 47 | mute:"Mute", | ||
| 48 | stretchtofit:"Stretch to fit", | ||
| 49 | windowlessvideo:"Windowless video", | ||
| 50 | balance:"Balance", | ||
| 51 | baseurl:"Base URL", | ||
| 52 | captioningid:"Captioning id", | ||
| 53 | currentmarker:"Current marker", | ||
| 54 | currentposition:"Current position", | ||
| 55 | defaultframe:"Default frame", | ||
| 56 | playcount:"Play count", | ||
| 57 | rate:"Rate", | ||
| 58 | uimode:"UI Mode", | ||
| 59 | flash_options:"Flash options", | ||
| 60 | qt_options:"Quicktime options", | ||
| 61 | wmp_options:"Windows media player options", | ||
| 62 | rmp_options:"Real media player options", | ||
| 63 | shockwave_options:"Shockwave options", | ||
| 64 | autogotourl:"Auto goto URL", | ||
| 65 | center:"Center", | ||
| 66 | imagestatus:"Image status", | ||
| 67 | maintainaspect:"Maintain aspect", | ||
| 68 | nojava:"No java", | ||
| 69 | prefetch:"Prefetch", | ||
| 70 | shuffle:"Shuffle", | ||
| 71 | console:"Console", | ||
| 72 | numloop:"Num loops", | ||
| 73 | controls:"Controls", | ||
| 74 | scriptcallbacks:"Script callbacks", | ||
| 75 | swstretchstyle:"Stretch style", | ||
| 76 | swstretchhalign:"Stretch H-Align", | ||
| 77 | swstretchvalign:"Stretch V-Align", | ||
| 78 | sound:"Sound", | ||
| 79 | progress:"Progress", | ||
| 80 | qtsrc:"QT Src", | ||
| 81 | qt_stream_warn:"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..", | ||
| 82 | align_top:"Top", | ||
| 83 | align_right:"Right", | ||
| 84 | align_bottom:"Bottom", | ||
| 85 | align_left:"Left", | ||
| 86 | align_center:"Center", | ||
| 87 | align_top_left:"Top left", | ||
| 88 | align_top_right:"Top right", | ||
| 89 | align_bottom_left:"Bottom left", | ||
| 90 | align_bottom_right:"Bottom right", | ||
| 91 | flv_options:"Flash video options", | ||
| 92 | flv_scalemode:"Scale mode", | ||
| 93 | flv_buffer:"Buffer", | ||
| 94 | flv_startimage:"Start image", | ||
| 95 | flv_starttime:"Start time", | ||
| 96 | flv_defaultvolume:"Default volumne", | ||
| 97 | flv_hiddengui:"Hidden GUI", | ||
| 98 | flv_autostart:"Auto start", | ||
| 99 | flv_loop:"Loop", | ||
| 100 | flv_showscalemodes:"Show scale modes", | ||
| 101 | flv_smoothvideo:"Smooth video", | ||
| 102 | flv_jscallback:"JS Callback" | ||
| 103 | }); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/media/media.htm b/public/javascripts/tiny_mce/plugins/media/media.htm deleted file mode 100644 index 911c03d..0000000 --- a/public/javascripts/tiny_mce/plugins/media/media.htm +++ /dev/null | |||
| @@ -1,822 +0,0 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title>{#media_dlg.title}</title> | ||
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 6 | <script type="text/javascript" src="js/media.js"></script> | ||
| 7 | <script type="text/javascript" src="../../utils/mctabs.js"></script> | ||
| 8 | <script type="text/javascript" src="../../utils/validate.js"></script> | ||
| 9 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | ||
| 10 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> | ||
| 11 | <link href="css/media.css" rel="stylesheet" type="text/css" /> | ||
| 12 | </head> | ||
| 13 | <body style="display: none"> | ||
| 14 | <form onsubmit="insertMedia();return false;" action="#"> | ||
| 15 | <div class="tabs"> | ||
| 16 | <ul> | ||
| 17 | <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');generatePreview();" onmousedown="return false;">{#media_dlg.general}</a></span></li> | ||
| 18 | <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#media_dlg.advanced}</a></span></li> | ||
| 19 | </ul> | ||
| 20 | </div> | ||
| 21 | |||
| 22 | <div class="panel_wrapper"> | ||
| 23 | <div id="general_panel" class="panel current"> | ||
| 24 | <fieldset> | ||
| 25 | <legend>{#media_dlg.general}</legend> | ||
| 26 | |||
| 27 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 28 | <tr> | ||
| 29 | <td><label for="media_type">{#media_dlg.type}</label></td> | ||
| 30 | <td> | ||
| 31 | <select id="media_type" name="media_type" onchange="changedType(this.value);generatePreview();"> | ||
| 32 | <option value="flash">Flash</option> | ||
| 33 | <!-- <option value="flv">Flash video (FLV)</option> --> | ||
| 34 | <option value="qt">Quicktime</option> | ||
| 35 | <option value="shockwave">Shockwave</option> | ||
| 36 | <option value="wmp">Windows Media</option> | ||
| 37 | <option value="rmp">Real Media</option> | ||
| 38 | </select> | ||
| 39 | </td> | ||
| 40 | </tr> | ||
| 41 | <tr> | ||
| 42 | <td><label for="src">{#media_dlg.file}</label></td> | ||
| 43 | <td> | ||
| 44 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 45 | <tr> | ||
| 46 | <td><input id="src" name="src" type="text" value="" class="mceFocus" onchange="switchType(this.value);generatePreview();" /></td> | ||
| 47 | <td id="filebrowsercontainer"> </td> | ||
| 48 | </tr> | ||
| 49 | </table> | ||
| 50 | </td> | ||
| 51 | </tr> | ||
| 52 | <tr id="linklistrow"> | ||
| 53 | <td><label for="linklist">{#media_dlg.list}</label></td> | ||
| 54 | <td id="linklistcontainer"><select id="linklist"><option value=""></option></select></td> | ||
| 55 | </tr> | ||
| 56 | <tr> | ||
| 57 | <td><label for="width">{#media_dlg.size}</label></td> | ||
| 58 | <td> | ||
| 59 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 60 | <tr> | ||
| 61 | <td><input type="text" id="width" name="width" value="" class="size" onchange="generatePreview('width');" /> x <input type="text" id="height" name="height" value="" class="size" onchange="generatePreview('height');" /></td> | ||
| 62 | <td> <input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td> | ||
| 63 | <td><label id="constrainlabel" for="constrain">{#media_dlg.constrain_proportions}</label></td> | ||
| 64 | </tr> | ||
| 65 | </table> | ||
| 66 | </td> | ||
| 67 | </tr> | ||
| 68 | </table> | ||
| 69 | </fieldset> | ||
| 70 | |||
| 71 | <fieldset> | ||
| 72 | <legend>{#media_dlg.preview}</legend> | ||
| 73 | <div id="prev"></div> | ||
| 74 | </fieldset> | ||
| 75 | </div> | ||
| 76 | |||
| 77 | <div id="advanced_panel" class="panel"> | ||
| 78 | <fieldset> | ||
| 79 | <legend>{#media_dlg.advanced}</legend> | ||
| 80 | |||
| 81 | <table border="0" cellpadding="4" cellspacing="0" width="100%"> | ||
| 82 | <tr> | ||
| 83 | <td><label for="id">{#media_dlg.id}</label></td> | ||
| 84 | <td><input type="text" id="id" name="id" onchange="generatePreview();" /></td> | ||
| 85 | <td><label for="name">{#media_dlg.name}</label></td> | ||
| 86 | <td><input type="text" id="name" name="name" onchange="generatePreview();" /></td> | ||
| 87 | </tr> | ||
| 88 | |||
| 89 | <tr> | ||
| 90 | <td><label for="align">{#media_dlg.align}</label></td> | ||
| 91 | <td> | ||
| 92 | <select id="align" name="align" onchange="generatePreview();"> | ||
| 93 | <option value="">{#not_set}</option> | ||
| 94 | <option value="top">{#media_dlg.align_top}</option> | ||
| 95 | <option value="right">{#media_dlg.align_right}</option> | ||
| 96 | <option value="bottom">{#media_dlg.align_bottom}</option> | ||
| 97 | <option value="left">{#media_dlg.align_left}</option> | ||
| 98 | </select> | ||
| 99 | </td> | ||
| 100 | |||
| 101 | <td><label for="bgcolor">{#media_dlg.bgcolor}</label></td> | ||
| 102 | <td> | ||
| 103 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 104 | <tr> | ||
| 105 | <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');generatePreview();" /></td> | ||
| 106 | <td id="bgcolor_pickcontainer"> </td> | ||
| 107 | </tr> | ||
| 108 | </table> | ||
| 109 | </td> | ||
| 110 | </tr> | ||
| 111 | |||
| 112 | <tr> | ||
| 113 | <td><label for="vspace">{#media_dlg.vspace}</label></td> | ||
| 114 | <td><input type="text" id="vspace" name="vspace" class="number" onchange="generatePreview();" /></td> | ||
| 115 | <td><label for="hspace">{#media_dlg.hspace}</label></td> | ||
| 116 | <td><input type="text" id="hspace" name="hspace" class="number" onchange="generatePreview();" /></td> | ||
| 117 | </tr> | ||
| 118 | </table> | ||
| 119 | </fieldset> | ||
| 120 | |||
| 121 | <fieldset id="flash_options"> | ||
| 122 | <legend>{#media_dlg.flash_options}</legend> | ||
| 123 | |||
| 124 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 125 | <tr> | ||
| 126 | <td><label for="flash_quality">{#media_dlg.quality}</label></td> | ||
| 127 | <td> | ||
| 128 | <select id="flash_quality" name="flash_quality" onchange="generatePreview();"> | ||
| 129 | <option value="">{#not_set}</option> | ||
| 130 | <option value="high">high</option> | ||
| 131 | <option value="low">low</option> | ||
| 132 | <option value="autolow">autolow</option> | ||
| 133 | <option value="autohigh">autohigh</option> | ||
| 134 | <option value="best">best</option> | ||
| 135 | </select> | ||
| 136 | </td> | ||
| 137 | |||
| 138 | <td><label for="flash_scale">{#media_dlg.scale}</label></td> | ||
| 139 | <td> | ||
| 140 | <select id="flash_scale" name="flash_scale" onchange="generatePreview();"> | ||
| 141 | <option value="">{#not_set}</option> | ||
| 142 | <option value="showall">showall</option> | ||
| 143 | <option value="noborder">noborder</option> | ||
| 144 | <option value="exactfit">exactfit</option> | ||
| 145 | <option value="noscale">noscale</option> | ||
| 146 | </select> | ||
| 147 | </td> | ||
| 148 | </tr> | ||
| 149 | |||
| 150 | <tr> | ||
| 151 | <td><label for="flash_wmode">{#media_dlg.wmode}</label></td> | ||
| 152 | <td> | ||
| 153 | <select id="flash_wmode" name="flash_wmode" onchange="generatePreview();"> | ||
| 154 | <option value="">{#not_set}</option> | ||
| 155 | <option value="window">window</option> | ||
| 156 | <option value="opaque">opaque</option> | ||
| 157 | <option value="transparent">transparent</option> | ||
| 158 | </select> | ||
| 159 | </td> | ||
| 160 | |||
| 161 | <td><label for="flash_salign">{#media_dlg.salign}</label></td> | ||
| 162 | <td> | ||
| 163 | <select id="flash_salign" name="flash_salign" onchange="generatePreview();"> | ||
| 164 | <option value="">{#not_set}</option> | ||
| 165 | <option value="l">{#media_dlg.align_left}</option> | ||
| 166 | <option value="t">{#media_dlg.align_top}</option> | ||
| 167 | <option value="r">{#media_dlg.align_right}</option> | ||
| 168 | <option value="b">{#media_dlg.align_bottom}</option> | ||
| 169 | <option value="tl">{#media_dlg.align_top_left}</option> | ||
| 170 | <option value="tr">{#media_dlg.align_top_right}</option> | ||
| 171 | <option value="bl">{#media_dlg.align_bottom_left}</option> | ||
| 172 | <option value="br">{#media_dlg.align_bottom_right}</option> | ||
| 173 | </select> | ||
| 174 | </td> | ||
| 175 | </tr> | ||
| 176 | |||
| 177 | <tr> | ||
| 178 | <td colspan="2"> | ||
| 179 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 180 | <tr> | ||
| 181 | <td><input type="checkbox" class="checkbox" id="flash_play" name="flash_play" checked="checked" onchange="generatePreview();" /></td> | ||
| 182 | <td><label for="flash_play">{#media_dlg.play}</label></td> | ||
| 183 | </tr> | ||
| 184 | </table> | ||
| 185 | </td> | ||
| 186 | |||
| 187 | <td colspan="2"> | ||
| 188 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 189 | <tr> | ||
| 190 | <td><input type="checkbox" class="checkbox" id="flash_loop" name="flash_loop" checked="checked" onchange="generatePreview();" /></td> | ||
| 191 | <td><label for="flash_loop">{#media_dlg.loop}</label></td> | ||
| 192 | </tr> | ||
| 193 | </table> | ||
| 194 | </td> | ||
| 195 | </tr> | ||
| 196 | |||
| 197 | <tr> | ||
| 198 | <td colspan="2"> | ||
| 199 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 200 | <tr> | ||
| 201 | <td><input type="checkbox" class="checkbox" id="flash_menu" name="flash_menu" checked="checked" onchange="generatePreview();" /></td> | ||
| 202 | <td><label for="flash_menu">{#media_dlg.menu}</label></td> | ||
| 203 | </tr> | ||
| 204 | </table> | ||
| 205 | </td> | ||
| 206 | |||
| 207 | <td colspan="2"> | ||
| 208 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 209 | <tr> | ||
| 210 | <td><input type="checkbox" class="checkbox" id="flash_swliveconnect" name="flash_swliveconnect" onchange="generatePreview();" /></td> | ||
| 211 | <td><label for="flash_swliveconnect">{#media_dlg.liveconnect}</label></td> | ||
| 212 | </tr> | ||
| 213 | </table> | ||
| 214 | </td> | ||
| 215 | </tr> | ||
| 216 | </table> | ||
| 217 | |||
| 218 | <table> | ||
| 219 | <tr> | ||
| 220 | <td><label for="flash_base">{#media_dlg.base}</label></td> | ||
| 221 | <td><input type="text" id="flash_base" name="flash_base" onchange="generatePreview();" /></td> | ||
| 222 | </tr> | ||
| 223 | |||
| 224 | <tr> | ||
| 225 | <td><label for="flash_flashvars">{#media_dlg.flashvars}</label></td> | ||
| 226 | <td><input type="text" id="flash_flashvars" name="flash_flashvars" onchange="generatePreview();" /></td> | ||
| 227 | </tr> | ||
| 228 | </table> | ||
| 229 | </fieldset> | ||
| 230 | |||
| 231 | <fieldset id="flv_options"> | ||
| 232 | <legend>{#media_dlg.flv_options}</legend> | ||
| 233 | |||
| 234 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 235 | <tr> | ||
| 236 | <td><label for="flv_scalemode">{#media_dlg.flv_scalemode}</label></td> | ||
| 237 | <td> | ||
| 238 | <select id="flv_scalemode" name="flv_scalemode" onchange="generatePreview();"> | ||
| 239 | <option value="">{#not_set}</option> | ||
| 240 | <option value="none">none</option> | ||
| 241 | <option value="double">double</option> | ||
| 242 | <option value="full">full</option> | ||
| 243 | </select> | ||
| 244 | </td> | ||
| 245 | |||
| 246 | <td><label for="flv_buffer">{#media_dlg.flv_buffer}</label></td> | ||
| 247 | <td><input type="text" id="flv_buffer" name="flv_buffer" onchange="generatePreview();" /></td> | ||
| 248 | </tr> | ||
| 249 | |||
| 250 | <tr> | ||
| 251 | <td><label for="flv_startimage">{#media_dlg.flv_startimage}</label></td> | ||
| 252 | <td><input type="text" id="flv_startimage" name="flv_startimage" onchange="generatePreview();" /></td> | ||
| 253 | |||
| 254 | <td><label for="flv_starttime">{#media_dlg.flv_starttime}</label></td> | ||
| 255 | <td><input type="text" id="flv_starttime" name="flv_starttime" onchange="generatePreview();" /></td> | ||
| 256 | </tr> | ||
| 257 | |||
| 258 | <tr> | ||
| 259 | <td><label for="flv_defaultvolume">{#media_dlg.flv_defaultvolume}</label></td> | ||
| 260 | <td><input type="text" id="flv_defaultvolume" name="flv_defaultvolume" onchange="generatePreview();" /></td> | ||
| 261 | |||
| 262 | |||
| 263 | </tr> | ||
| 264 | |||
| 265 | <tr> | ||
| 266 | <td colspan="2"> | ||
| 267 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 268 | <tr> | ||
| 269 | <td><input type="checkbox" class="checkbox" id="flv_hiddengui" name="flv_hiddengui" checked="checked" onchange="generatePreview();" /></td> | ||
| 270 | <td><label for="flv_hiddengui">{#media_dlg.flv_hiddengui}</label></td> | ||
| 271 | </tr> | ||
| 272 | </table> | ||
| 273 | </td> | ||
| 274 | |||
| 275 | <td colspan="2"> | ||
| 276 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 277 | <tr> | ||
| 278 | <td><input type="checkbox" class="checkbox" id="flv_autostart" name="flv_autostart" checked="checked" onchange="generatePreview();" /></td> | ||
| 279 | <td><label for="flv_autostart">{#media_dlg.flv_autostart}</label></td> | ||
| 280 | </tr> | ||
| 281 | </table> | ||
| 282 | </td> | ||
| 283 | </tr> | ||
| 284 | |||
| 285 | <tr> | ||
| 286 | <td colspan="2"> | ||
| 287 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 288 | <tr> | ||
| 289 | <td><input type="checkbox" class="checkbox" id="flv_loop" name="flv_loop" checked="checked" onchange="generatePreview();" /></td> | ||
| 290 | <td><label for="flv_loop">{#media_dlg.flv_loop}</label></td> | ||
| 291 | </tr> | ||
| 292 | </table> | ||
| 293 | </td> | ||
| 294 | |||
| 295 | <td colspan="2"> | ||
| 296 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 297 | <tr> | ||
| 298 | <td><input type="checkbox" class="checkbox" id="flv_showscalemodes" name="flv_showscalemodes" onchange="generatePreview();" /></td> | ||
| 299 | <td><label for="flv_showscalemodes">{#media_dlg.flv_showscalemodes}</label></td> | ||
| 300 | </tr> | ||
| 301 | </table> | ||
| 302 | </td> | ||
| 303 | </tr> | ||
| 304 | |||
| 305 | <tr> | ||
| 306 | <td colspan="2"> | ||
| 307 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 308 | <tr> | ||
| 309 | <td><input type="checkbox" class="checkbox" id="flv_smoothvideo" name="flash_flv_flv_smoothvideosmoothvideo" checked="checked" onchange="generatePreview();" /></td> | ||
| 310 | <td><label for="flv_smoothvideo">{#media_dlg.flv_smoothvideo}</label></td> | ||
| 311 | </tr> | ||
| 312 | </table> | ||
| 313 | </td> | ||
| 314 | |||
| 315 | <td colspan="2"> | ||
| 316 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 317 | <tr> | ||
| 318 | <td><input type="checkbox" class="checkbox" id="flv_jscallback" name="flv_jscallback" onchange="generatePreview();" /></td> | ||
| 319 | <td><label for="flv_jscallback">{#media_dlg.flv_jscallback}</label></td> | ||
| 320 | </tr> | ||
| 321 | </table> | ||
| 322 | </td> | ||
| 323 | </tr> | ||
| 324 | </table> | ||
| 325 | </fieldset> | ||
| 326 | |||
| 327 | <fieldset id="qt_options"> | ||
| 328 | <legend>{#media_dlg.qt_options}</legend> | ||
| 329 | |||
| 330 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 331 | <tr> | ||
| 332 | <td colspan="2"> | ||
| 333 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 334 | <tr> | ||
| 335 | <td><input type="checkbox" class="checkbox" id="qt_loop" name="qt_loop" onchange="generatePreview();" /></td> | ||
| 336 | <td><label for="qt_loop">{#media_dlg.loop}</label></td> | ||
| 337 | </tr> | ||
| 338 | </table> | ||
| 339 | </td> | ||
| 340 | |||
| 341 | <td colspan="2"> | ||
| 342 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 343 | <tr> | ||
| 344 | <td><input type="checkbox" class="checkbox" id="qt_autoplay" name="qt_autoplay" checked="checked" onchange="generatePreview();" /></td> | ||
| 345 | <td><label for="qt_autoplay">{#media_dlg.play}</label></td> | ||
| 346 | </tr> | ||
| 347 | </table> | ||
| 348 | </td> | ||
| 349 | </tr> | ||
| 350 | |||
| 351 | <tr> | ||
| 352 | <td colspan="2"> | ||
| 353 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 354 | <tr> | ||
| 355 | <td><input type="checkbox" class="checkbox" id="qt_cache" name="qt_cache" onchange="generatePreview();" /></td> | ||
| 356 | <td><label for="qt_cache">{#media_dlg.cache}</label></td> | ||
| 357 | </tr> | ||
| 358 | </table> | ||
| 359 | </td> | ||
| 360 | |||
| 361 | <td colspan="2"> | ||
| 362 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 363 | <tr> | ||
| 364 | <td><input type="checkbox" class="checkbox" id="qt_controller" name="qt_controller" checked="checked" onchange="generatePreview();" /></td> | ||
| 365 | <td><label for="qt_controller">{#media_dlg.controller}</label></td> | ||
| 366 | </tr> | ||
| 367 | </table> | ||
| 368 | </td> | ||
| 369 | </tr> | ||
| 370 | |||
| 371 | <tr> | ||
| 372 | <td colspan="2"> | ||
| 373 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 374 | <tr> | ||
| 375 | <td><input type="checkbox" class="checkbox" id="qt_correction" name="qt_correction" onchange="generatePreview();" /></td> | ||
| 376 | <td><label for="qt_correction">{#media_dlg.correction}</label></td> | ||
| 377 | </tr> | ||
| 378 | </table> | ||
| 379 | </td> | ||
| 380 | |||
| 381 | <td colspan="2"> | ||
| 382 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 383 | <tr> | ||
| 384 | <td><input type="checkbox" class="checkbox" id="qt_enablejavascript" name="qt_enablejavascript" onchange="generatePreview();" /></td> | ||
| 385 | <td><label for="qt_enablejavascript">{#media_dlg.enablejavascript}</label></td> | ||
| 386 | </tr> | ||
| 387 | </table> | ||
| 388 | </td> | ||
| 389 | </tr> | ||
| 390 | |||
| 391 | <tr> | ||
| 392 | <td colspan="2"> | ||
| 393 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 394 | <tr> | ||
| 395 | <td><input type="checkbox" class="checkbox" id="qt_kioskmode" name="qt_kioskmode" onchange="generatePreview();" /></td> | ||
| 396 | <td><label for="qt_kioskmode">{#media_dlg.kioskmode}</label></td> | ||
| 397 | </tr> | ||
| 398 | </table> | ||
| 399 | </td> | ||
| 400 | |||
| 401 | <td colspan="2"> | ||
| 402 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 403 | <tr> | ||
| 404 | <td><input type="checkbox" class="checkbox" id="qt_autohref" name="qt_autohref" onchange="generatePreview();" /></td> | ||
| 405 | <td><label for="qt_autohref">{#media_dlg.autohref}</label></td> | ||
| 406 | </tr> | ||
| 407 | </table> | ||
| 408 | </td> | ||
| 409 | </tr> | ||
| 410 | |||
| 411 | <tr> | ||
| 412 | <td colspan="2"> | ||
| 413 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 414 | <tr> | ||
| 415 | <td><input type="checkbox" class="checkbox" id="qt_playeveryframe" name="qt_playeveryframe" onchange="generatePreview();" /></td> | ||
| 416 | <td><label for="qt_playeveryframe">{#media_dlg.playeveryframe}</label></td> | ||
| 417 | </tr> | ||
| 418 | </table> | ||
| 419 | </td> | ||
| 420 | |||
| 421 | <td colspan="2"> | ||
| 422 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 423 | <tr> | ||
| 424 | <td><input type="checkbox" class="checkbox" id="qt_targetcache" name="qt_targetcache" onchange="generatePreview();" /></td> | ||
| 425 | <td><label for="qt_targetcache">{#media_dlg.targetcache}</label></td> | ||
| 426 | </tr> | ||
| 427 | </table> | ||
| 428 | </td> | ||
| 429 | </tr> | ||
| 430 | |||
| 431 | <tr> | ||
| 432 | <td><label for="qt_scale">{#media_dlg.scale}</label></td> | ||
| 433 | <td><select id="qt_scale" name="qt_scale" class="mceEditableSelect" onchange="generatePreview();"> | ||
| 434 | <option value="">{#not_set}</option> | ||
| 435 | <option value="tofit">tofit</option> | ||
| 436 | <option value="aspect">aspect</option> | ||
| 437 | </select> | ||
| 438 | </td> | ||
| 439 | |||
| 440 | <td colspan="2"> </td> | ||
| 441 | </tr> | ||
| 442 | |||
| 443 | <tr> | ||
| 444 | <td><label for="qt_starttime">{#media_dlg.starttime}</label></td> | ||
| 445 | <td><input type="text" id="qt_starttime" name="qt_starttime" onchange="generatePreview();" /></td> | ||
| 446 | |||
| 447 | <td><label for="qt_endtime">{#media_dlg.endtime}</label></td> | ||
| 448 | <td><input type="text" id="qt_endtime" name="qt_endtime" onchange="generatePreview();" /></td> | ||
| 449 | </tr> | ||
| 450 | |||
| 451 | <tr> | ||
| 452 | <td><label for="qt_target">{#media_dlg.target}</label></td> | ||
| 453 | <td><input type="text" id="qt_target" name="qt_target" onchange="generatePreview();" /></td> | ||
| 454 | |||
| 455 | <td><label for="qt_href">{#media_dlg.href}</label></td> | ||
| 456 | <td><input type="text" id="qt_href" name="qt_href" onchange="generatePreview();" /></td> | ||
| 457 | </tr> | ||
| 458 | |||
| 459 | <tr> | ||
| 460 | <td><label for="qt_qtsrcchokespeed">{#media_dlg.qtsrcchokespeed}</label></td> | ||
| 461 | <td><input type="text" id="qt_qtsrcchokespeed" name="qt_qtsrcchokespeed" onchange="generatePreview();" /></td> | ||
| 462 | |||
| 463 | <td><label for="qt_volume">{#media_dlg.volume}</label></td> | ||
| 464 | <td><input type="text" id="qt_volume" name="qt_volume" onchange="generatePreview();" /></td> | ||
| 465 | </tr> | ||
| 466 | |||
| 467 | <tr> | ||
| 468 | <td><label for="qt_qtsrc">{#media_dlg.qtsrc}</label></td> | ||
| 469 | <td colspan="4"> | ||
| 470 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 471 | <tr> | ||
| 472 | <td><input type="text" id="qt_qtsrc" name="qt_qtsrc" onchange="generatePreview();" /></td> | ||
| 473 | <td id="qtsrcfilebrowsercontainer"> </td> | ||
| 474 | </tr> | ||
| 475 | </table> | ||
| 476 | </td> | ||
| 477 | </tr> | ||
| 478 | </table> | ||
| 479 | </fieldset> | ||
| 480 | |||
| 481 | <fieldset id="wmp_options"> | ||
| 482 | <legend>{#media_dlg.wmp_options}</legend> | ||
| 483 | |||
| 484 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 485 | <tr> | ||
| 486 | <td colspan="2"> | ||
| 487 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 488 | <tr> | ||
| 489 | <td><input type="checkbox" class="checkbox" id="wmp_autostart" name="wmp_autostart" checked="checked" onchange="generatePreview();" /></td> | ||
| 490 | <td><label for="wmp_autostart">{#media_dlg.autostart}</label></td> | ||
| 491 | </tr> | ||
| 492 | </table> | ||
| 493 | </td> | ||
| 494 | |||
| 495 | <td colspan="2"> | ||
| 496 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 497 | <tr> | ||
| 498 | <td><input type="checkbox" class="checkbox" id="wmp_enabled" name="wmp_enabled" onchange="generatePreview();" /></td> | ||
| 499 | <td><label for="wmp_enabled">{#media_dlg.enabled}</label></td> | ||
| 500 | </tr> | ||
| 501 | </table> | ||
| 502 | </td> | ||
| 503 | </tr> | ||
| 504 | |||
| 505 | <tr> | ||
| 506 | <td colspan="2"> | ||
| 507 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 508 | <tr> | ||
| 509 | <td><input type="checkbox" class="checkbox" id="wmp_enablecontextmenu" name="wmp_enablecontextmenu" checked="checked" onchange="generatePreview();" /></td> | ||
| 510 | <td><label for="wmp_enablecontextmenu">{#media_dlg.menu}</label></td> | ||
| 511 | </tr> | ||
| 512 | </table> | ||
| 513 | </td> | ||
| 514 | |||
| 515 | <td colspan="2"> | ||
| 516 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 517 | <tr> | ||
| 518 | <td><input type="checkbox" class="checkbox" id="wmp_fullscreen" name="wmp_fullscreen" onchange="generatePreview();" /></td> | ||
| 519 | <td><label for="wmp_fullscreen">{#media_dlg.fullscreen}</label></td> | ||
| 520 | </tr> | ||
| 521 | </table> | ||
| 522 | </td> | ||
| 523 | </tr> | ||
| 524 | |||
| 525 | <tr> | ||
| 526 | <td colspan="2"> | ||
| 527 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 528 | <tr> | ||
| 529 | <td><input type="checkbox" class="checkbox" id="wmp_invokeurls" name="wmp_invokeurls" checked="checked" onchange="generatePreview();" /></td> | ||
| 530 | <td><label for="wmp_invokeurls">{#media_dlg.invokeurls}</label></td> | ||
| 531 | </tr> | ||
| 532 | </table> | ||
| 533 | </td> | ||
| 534 | |||
| 535 | <td colspan="2"> | ||
| 536 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 537 | <tr> | ||
| 538 | <td><input type="checkbox" class="checkbox" id="wmp_mute" name="wmp_mute" onchange="generatePreview();" /></td> | ||
| 539 | <td><label for="wmp_mute">{#media_dlg.mute}</label></td> | ||
| 540 | </tr> | ||
| 541 | </table> | ||
| 542 | </td> | ||
| 543 | </tr> | ||
| 544 | |||
| 545 | <tr> | ||
| 546 | <td colspan="2"> | ||
| 547 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 548 | <tr> | ||
| 549 | <td><input type="checkbox" class="checkbox" id="wmp_stretchtofit" name="wmp_stretchtofit" onchange="generatePreview();" /></td> | ||
| 550 | <td><label for="wmp_stretchtofit">{#media_dlg.stretchtofit}</label></td> | ||
| 551 | </tr> | ||
| 552 | </table> | ||
| 553 | </td> | ||
| 554 | |||
| 555 | <td colspan="2"> | ||
| 556 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 557 | <tr> | ||
| 558 | <td><input type="checkbox" class="checkbox" id="wmp_windowlessvideo" name="wmp_windowlessvideo" onchange="generatePreview();" /></td> | ||
| 559 | <td><label for="wmp_windowlessvideo">{#media_dlg.windowlessvideo}</label></td> | ||
| 560 | </tr> | ||
| 561 | </table> | ||
| 562 | </td> | ||
| 563 | </tr> | ||
| 564 | |||
| 565 | <tr> | ||
| 566 | <td><label for="wmp_balance">{#media_dlg.balance}</label></td> | ||
| 567 | <td><input type="text" id="wmp_balance" name="wmp_balance" onchange="generatePreview();" /></td> | ||
| 568 | |||
| 569 | <td><label for="wmp_baseurl">{#media_dlg.baseurl}</label></td> | ||
| 570 | <td><input type="text" id="wmp_baseurl" name="wmp_baseurl" onchange="generatePreview();" /></td> | ||
| 571 | </tr> | ||
| 572 | |||
| 573 | <tr> | ||
| 574 | <td><label for="wmp_captioningid">{#media_dlg.captioningid}</label></td> | ||
| 575 | <td><input type="text" id="wmp_captioningid" name="wmp_captioningid" onchange="generatePreview();" /></td> | ||
| 576 | |||
| 577 | <td><label for="wmp_currentmarker">{#media_dlg.currentmarker}</label></td> | ||
| 578 | <td><input type="text" id="wmp_currentmarker" name="wmp_currentmarker" onchange="generatePreview();" /></td> | ||
| 579 | </tr> | ||
| 580 | |||
| 581 | <tr> | ||
| 582 | <td><label for="wmp_currentposition">{#media_dlg.currentposition}</label></td> | ||
| 583 | <td><input type="text" id="wmp_currentposition" name="wmp_currentposition" onchange="generatePreview();" /></td> | ||
| 584 | |||
| 585 | <td><label for="wmp_defaultframe">{#media_dlg.defaultframe}</label></td> | ||
| 586 | <td><input type="text" id="wmp_defaultframe" name="wmp_defaultframe" onchange="generatePreview();" /></td> | ||
| 587 | </tr> | ||
| 588 | |||
| 589 | <tr> | ||
| 590 | <td><label for="wmp_playcount">{#media_dlg.playcount}</label></td> | ||
| 591 | <td><input type="text" id="wmp_playcount" name="wmp_playcount" onchange="generatePreview();" /></td> | ||
| 592 | |||
| 593 | <td><label for="wmp_rate">{#media_dlg.rate}</label></td> | ||
| 594 | <td><input type="text" id="wmp_rate" name="wmp_rate" onchange="generatePreview();" /></td> | ||
| 595 | </tr> | ||
| 596 | |||
| 597 | <tr> | ||
| 598 | <td><label for="wmp_uimode">{#media_dlg.uimode}</label></td> | ||
| 599 | <td><input type="text" id="wmp_uimode" name="wmp_uimode" onchange="generatePreview();" /></td> | ||
| 600 | |||
| 601 | <td><label for="wmp_volume">{#media_dlg.volume}</label></td> | ||
| 602 | <td><input type="text" id="wmp_volume" name="wmp_volume" onchange="generatePreview();" /></td> | ||
| 603 | </tr> | ||
| 604 | |||
| 605 | </table> | ||
| 606 | </fieldset> | ||
| 607 | |||
| 608 | <fieldset id="rmp_options"> | ||
| 609 | <legend>{#media_dlg.rmp_options}</legend> | ||
| 610 | |||
| 611 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 612 | <tr> | ||
| 613 | <td colspan="2"> | ||
| 614 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 615 | <tr> | ||
| 616 | <td><input type="checkbox" class="checkbox" id="rmp_autostart" name="rmp_autostart" onchange="generatePreview();" /></td> | ||
| 617 | <td><label for="rmp_autostart">{#media_dlg.autostart}</label></td> | ||
| 618 | </tr> | ||
| 619 | </table> | ||
| 620 | </td> | ||
| 621 | |||
| 622 | <td colspan="2"> | ||
| 623 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 624 | <tr> | ||
| 625 | <td><input type="checkbox" class="checkbox" id="rmp_loop" name="rmp_loop" onchange="generatePreview();" /></td> | ||
| 626 | <td><label for="rmp_loop">{#media_dlg.loop}</label></td> | ||
| 627 | </tr> | ||
| 628 | </table> | ||
| 629 | </td> | ||
| 630 | </tr> | ||
| 631 | |||
| 632 | <tr> | ||
| 633 | <td colspan="2"> | ||
| 634 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 635 | <tr> | ||
| 636 | <td><input type="checkbox" class="checkbox" id="rmp_autogotourl" name="rmp_autogotourl" checked="checked" onchange="generatePreview();" /></td> | ||
| 637 | <td><label for="rmp_autogotourl">{#media_dlg.autogotourl}</label></td> | ||
| 638 | </tr> | ||
| 639 | </table> | ||
| 640 | </td> | ||
| 641 | |||
| 642 | <td colspan="2"> | ||
| 643 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 644 | <tr> | ||
| 645 | <td><input type="checkbox" class="checkbox" id="rmp_center" name="rmp_center" onchange="generatePreview();" /></td> | ||
| 646 | <td><label for="rmp_center">{#media_dlg.center}</label></td> | ||
| 647 | </tr> | ||
| 648 | </table> | ||
| 649 | </td> | ||
| 650 | </tr> | ||
| 651 | |||
| 652 | <tr> | ||
| 653 | <td colspan="2"> | ||
| 654 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 655 | <tr> | ||
| 656 | <td><input type="checkbox" class="checkbox" id="rmp_imagestatus" name="rmp_imagestatus" checked="checked" onchange="generatePreview();" /></td> | ||
| 657 | <td><label for="rmp_imagestatus">{#media_dlg.imagestatus}</label></td> | ||
| 658 | </tr> | ||
| 659 | </table> | ||
| 660 | </td> | ||
| 661 | |||
| 662 | <td colspan="2"> | ||
| 663 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 664 | <tr> | ||
| 665 | <td><input type="checkbox" class="checkbox" id="rmp_maintainaspect" name="rmp_maintainaspect" onchange="generatePreview();" /></td> | ||
| 666 | <td><label for="rmp_maintainaspect">{#media_dlg.maintainaspect}</label></td> | ||
| 667 | </tr> | ||
| 668 | </table> | ||
| 669 | </td> | ||
| 670 | </tr> | ||
| 671 | |||
| 672 | <tr> | ||
| 673 | <td colspan="2"> | ||
| 674 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 675 | <tr> | ||
| 676 | <td><input type="checkbox" class="checkbox" id="rmp_nojava" name="rmp_nojava" onchange="generatePreview();" /></td> | ||
| 677 | <td><label for="rmp_nojava">{#media_dlg.nojava}</label></td> | ||
| 678 | </tr> | ||
| 679 | </table> | ||
| 680 | </td> | ||
| 681 | |||
| 682 | <td colspan="2"> | ||
| 683 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 684 | <tr> | ||
| 685 | <td><input type="checkbox" class="checkbox" id="rmp_prefetch" name="rmp_prefetch" onchange="generatePreview();" /></td> | ||
| 686 | <td><label for="rmp_prefetch">{#media_dlg.prefetch}</label></td> | ||
| 687 | </tr> | ||
| 688 | </table> | ||
| 689 | </td> | ||
| 690 | </tr> | ||
| 691 | |||
| 692 | <tr> | ||
| 693 | <td colspan="2"> | ||
| 694 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 695 | <tr> | ||
| 696 | <td><input type="checkbox" class="checkbox" id="rmp_shuffle" name="rmp_shuffle" onchange="generatePreview();" /></td> | ||
| 697 | <td><label for="rmp_shuffle">{#media_dlg.shuffle}</label></td> | ||
| 698 | </tr> | ||
| 699 | </table> | ||
| 700 | </td> | ||
| 701 | |||
| 702 | <td colspan="2"> | ||
| 703 | | ||
| 704 | </td> | ||
| 705 | </tr> | ||
| 706 | |||
| 707 | <tr> | ||
| 708 | <td><label for="rmp_console">{#media_dlg.console}</label></td> | ||
| 709 | <td><input type="text" id="rmp_console" name="rmp_console" onchange="generatePreview();" /></td> | ||
| 710 | |||
| 711 | <td><label for="rmp_controls">{#media_dlg.controls}</label></td> | ||
| 712 | <td><input type="text" id="rmp_controls" name="rmp_controls" onchange="generatePreview();" /></td> | ||
| 713 | </tr> | ||
| 714 | |||
| 715 | <tr> | ||
| 716 | <td><label for="rmp_numloop">{#media_dlg.numloop}</label></td> | ||
| 717 | <td><input type="text" id="rmp_numloop" name="rmp_numloop" onchange="generatePreview();" /></td> | ||
| 718 | |||
| 719 | <td><label for="rmp_scriptcallbacks">{#media_dlg.scriptcallbacks}</label></td> | ||
| 720 | <td><input type="text" id="rmp_scriptcallbacks" name="rmp_scriptcallbacks" onchange="generatePreview();" /></td> | ||
| 721 | </tr> | ||
| 722 | </table> | ||
| 723 | </fieldset> | ||
| 724 | |||
| 725 | <fieldset id="shockwave_options"> | ||
| 726 | <legend>{#media_dlg.shockwave_options}</legend> | ||
| 727 | |||
| 728 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 729 | <tr> | ||
| 730 | <td><label for="shockwave_swstretchstyle">{#media_dlg.swstretchstyle}</label></td> | ||
| 731 | <td> | ||
| 732 | <select id="shockwave_swstretchstyle" name="shockwave_swstretchstyle" onchange="generatePreview();"> | ||
| 733 | <option value="none">{#not_set}</option> | ||
| 734 | <option value="meet">Meet</option> | ||
| 735 | <option value="fill">Fill</option> | ||
| 736 | <option value="stage">Stage</option> | ||
| 737 | </select> | ||
| 738 | </td> | ||
| 739 | |||
| 740 | <td><label for="shockwave_swvolume">{#media_dlg.volume}</label></td> | ||
| 741 | <td><input type="text" id="shockwave_swvolume" name="shockwave_swvolume" onchange="generatePreview();" /></td> | ||
| 742 | </tr> | ||
| 743 | |||
| 744 | <tr> | ||
| 745 | <td><label for="shockwave_swstretchhalign">{#media_dlg.swstretchhalign}</label></td> | ||
| 746 | <td> | ||
| 747 | <select id="shockwave_swstretchhalign" name="shockwave_swstretchhalign" onchange="generatePreview();"> | ||
| 748 | <option value="none">{#not_set}</option> | ||
| 749 | <option value="left">{#media_dlg.align_left}</option> | ||
| 750 | <option value="center">{#media_dlg.align_center}</option> | ||
| 751 | <option value="right">{#media_dlg.align_right}</option> | ||
| 752 | </select> | ||
| 753 | </td> | ||
| 754 | |||
| 755 | <td><label for="shockwave_swstretchvalign">{#media_dlg.swstretchvalign}</label></td> | ||
| 756 | <td> | ||
| 757 | <select id="shockwave_swstretchvalign" name="shockwave_swstretchvalign" onchange="generatePreview();"> | ||
| 758 | <option value="none">{#not_set}</option> | ||
| 759 | <option value="meet">Meet</option> | ||
| 760 | <option value="fill">Fill</option> | ||
| 761 | <option value="stage">Stage</option> | ||
| 762 | </select> | ||
| 763 | </td> | ||
| 764 | </tr> | ||
| 765 | |||
| 766 | <tr> | ||
| 767 | <td colspan="2"> | ||
| 768 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 769 | <tr> | ||
| 770 | <td><input type="checkbox" class="checkbox" id="shockwave_autostart" name="shockwave_autostart" onchange="generatePreview();" checked="checked" /></td> | ||
| 771 | <td><label for="shockwave_autostart">{#media_dlg.autostart}</label></td> | ||
| 772 | </tr> | ||
| 773 | </table> | ||
| 774 | </td> | ||
| 775 | |||
| 776 | <td colspan="2"> | ||
| 777 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 778 | <tr> | ||
| 779 | <td><input type="checkbox" class="checkbox" id="shockwave_sound" name="shockwave_sound" onchange="generatePreview();" checked="checked" /></td> | ||
| 780 | <td><label for="shockwave_sound">{#media_dlg.sound}</label></td> | ||
| 781 | </tr> | ||
| 782 | </table> | ||
| 783 | </td> | ||
| 784 | </tr> | ||
| 785 | |||
| 786 | |||
| 787 | <tr> | ||
| 788 | <td colspan="2"> | ||
| 789 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 790 | <tr> | ||
| 791 | <td><input type="checkbox" class="checkbox" id="shockwave_swliveconnect" name="shockwave_swliveconnect" onchange="generatePreview();" /></td> | ||
| 792 | <td><label for="shockwave_swliveconnect">{#media_dlg.liveconnect}</label></td> | ||
| 793 | </tr> | ||
| 794 | </table> | ||
| 795 | </td> | ||
| 796 | |||
| 797 | <td colspan="2"> | ||
| 798 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 799 | <tr> | ||
| 800 | <td><input type="checkbox" class="checkbox" id="shockwave_progress" name="shockwave_progress" onchange="generatePreview();" checked="checked" /></td> | ||
| 801 | <td><label for="shockwave_progress">{#media_dlg.progress}</label></td> | ||
| 802 | </tr> | ||
| 803 | </table> | ||
| 804 | </td> | ||
| 805 | </tr> | ||
| 806 | </table> | ||
| 807 | </fieldset> | ||
| 808 | </div> | ||
| 809 | </div> | ||
| 810 | |||
| 811 | <div class="mceActionPanel"> | ||
| 812 | <div style="float: left"> | ||
| 813 | <input type="submit" id="insert" name="insert" value="{#insert}" /> | ||
| 814 | </div> | ||
| 815 | |||
| 816 | <div style="float: right"> | ||
| 817 | <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" /> | ||
| 818 | </div> | ||
| 819 | </div> | ||
| 820 | </form> | ||
| 821 | </body> | ||
| 822 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js b/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js deleted file mode 100644 index f2dbbff..0000000 --- a/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.Nonbreaking",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceNonBreaking",function(){a.execCommand("mceInsertContent",false,(a.plugins.visualchars&&a.plugins.visualchars.state)?'<span class="mceItemHidden mceVisualNbsp">·</span>':" ")});a.addButton("nonbreaking",{title:"nonbreaking.nonbreaking_desc",cmd:"mceNonBreaking"});if(a.getParam("nonbreaking_force_tab")){a.onKeyDown.add(function(d,f){if(tinymce.isIE&&f.keyCode==9){d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");tinymce.dom.Event.cancel(f)}})}},getInfo:function(){return{longname:"Nonbreaking space",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("nonbreaking",tinymce.plugins.Nonbreaking)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js deleted file mode 100644 index b723756..0000000 --- a/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,50 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.Nonbreaking', { | ||
| 10 | init : function(ed, url) { | ||
| 11 | var t = this; | ||
| 12 | |||
| 13 | t.editor = ed; | ||
| 14 | |||
| 15 | // Register commands | ||
| 16 | ed.addCommand('mceNonBreaking', function() { | ||
| 17 | ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? '<span class="mceItemHidden mceVisualNbsp">·</span>' : ' '); | ||
| 18 | }); | ||
| 19 | |||
| 20 | // Register buttons | ||
| 21 | ed.addButton('nonbreaking', {title : 'nonbreaking.nonbreaking_desc', cmd : 'mceNonBreaking'}); | ||
| 22 | |||
| 23 | if (ed.getParam('nonbreaking_force_tab')) { | ||
| 24 | ed.onKeyDown.add(function(ed, e) { | ||
| 25 | if (tinymce.isIE && e.keyCode == 9) { | ||
| 26 | ed.execCommand('mceNonBreaking'); | ||
| 27 | ed.execCommand('mceNonBreaking'); | ||
| 28 | ed.execCommand('mceNonBreaking'); | ||
| 29 | tinymce.dom.Event.cancel(e); | ||
| 30 | } | ||
| 31 | }); | ||
| 32 | } | ||
| 33 | }, | ||
| 34 | |||
| 35 | getInfo : function() { | ||
| 36 | return { | ||
| 37 | longname : 'Nonbreaking space', | ||
| 38 | author : 'Moxiecode Systems AB', | ||
| 39 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 40 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking', | ||
| 41 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 42 | }; | ||
| 43 | } | ||
| 44 | |||
| 45 | // Private methods | ||
| 46 | }); | ||
| 47 | |||
| 48 | // Register plugin | ||
| 49 | tinymce.PluginManager.add('nonbreaking', tinymce.plugins.Nonbreaking); | ||
| 50 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/noneditable/editor_plugin.js b/public/javascripts/tiny_mce/plugins/noneditable/editor_plugin.js deleted file mode 100644 index 9945cd8..0000000 --- a/public/javascripts/tiny_mce/plugins/noneditable/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){var a=tinymce.dom.Event;tinymce.create("tinymce.plugins.NonEditablePlugin",{init:function(d,e){var f=this,c,b;f.editor=d;c=d.getParam("noneditable_editable_class","mceEditable");b=d.getParam("noneditable_noneditable_class","mceNonEditable");d.onNodeChange.addToTop(function(h,g,k){var j,i;j=h.dom.getParent(h.selection.getStart(),function(l){return h.dom.hasClass(l,b)});i=h.dom.getParent(h.selection.getEnd(),function(l){return h.dom.hasClass(l,b)});if(j||i){f._setDisabled(1);return false}else{f._setDisabled(0)}})},getInfo:function(){return{longname:"Non editable elements",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_block:function(c,d){var b=d.keyCode;if((b>32&&b<41)||(b>111&&b<124)){return}return a.cancel(d)},_setDisabled:function(d){var c=this,b=c.editor;tinymce.each(b.controlManager.controls,function(e){e.setDisabled(d)});if(d!==c.disabled){if(d){b.onKeyDown.addToTop(c._block);b.onKeyPress.addToTop(c._block);b.onKeyUp.addToTop(c._block);b.onPaste.addToTop(c._block)}else{b.onKeyDown.remove(c._block);b.onKeyPress.remove(c._block);b.onKeyUp.remove(c._block);b.onPaste.remove(c._block)}c.disabled=d}}});tinymce.PluginManager.add("noneditable",tinymce.plugins.NonEditablePlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/noneditable/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/noneditable/editor_plugin_src.js deleted file mode 100644 index 77db577..0000000 --- a/public/javascripts/tiny_mce/plugins/noneditable/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,87 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 743 2008-03-23 17:47:33Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | var Event = tinymce.dom.Event; | ||
| 10 | |||
| 11 | tinymce.create('tinymce.plugins.NonEditablePlugin', { | ||
| 12 | init : function(ed, url) { | ||
| 13 | var t = this, editClass, nonEditClass; | ||
| 14 | |||
| 15 | t.editor = ed; | ||
| 16 | editClass = ed.getParam("noneditable_editable_class", "mceEditable"); | ||
| 17 | nonEditClass = ed.getParam("noneditable_noneditable_class", "mceNonEditable"); | ||
| 18 | |||
| 19 | ed.onNodeChange.addToTop(function(ed, cm, n) { | ||
| 20 | var sc, ec; | ||
| 21 | |||
| 22 | // Block if start or end is inside a non editable element | ||
| 23 | sc = ed.dom.getParent(ed.selection.getStart(), function(n) { | ||
| 24 | return ed.dom.hasClass(n, nonEditClass); | ||
| 25 | }); | ||
| 26 | |||
| 27 | ec = ed.dom.getParent(ed.selection.getEnd(), function(n) { | ||
| 28 | return ed.dom.hasClass(n, nonEditClass); | ||
| 29 | }); | ||
| 30 | |||
| 31 | // Block or unblock | ||
| 32 | if (sc || ec) { | ||
| 33 | t._setDisabled(1); | ||
| 34 | return false; | ||
| 35 | } else | ||
| 36 | t._setDisabled(0); | ||
| 37 | }); | ||
| 38 | }, | ||
| 39 | |||
| 40 | getInfo : function() { | ||
| 41 | return { | ||
| 42 | longname : 'Non editable elements', | ||
| 43 | author : 'Moxiecode Systems AB', | ||
| 44 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 45 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable', | ||
| 46 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 47 | }; | ||
| 48 | }, | ||
| 49 | |||
| 50 | _block : function(ed, e) { | ||
| 51 | var k = e.keyCode; | ||
| 52 | |||
| 53 | // Don't block arrow keys, pg up/down, and F1-F12 | ||
| 54 | if ((k > 32 && k < 41) || (k > 111 && k < 124)) | ||
| 55 | return; | ||
| 56 | |||
| 57 | return Event.cancel(e); | ||
| 58 | }, | ||
| 59 | |||
| 60 | _setDisabled : function(s) { | ||
| 61 | var t = this, ed = t.editor; | ||
| 62 | |||
| 63 | tinymce.each(ed.controlManager.controls, function(c) { | ||
| 64 | c.setDisabled(s); | ||
| 65 | }); | ||
| 66 | |||
| 67 | if (s !== t.disabled) { | ||
| 68 | if (s) { | ||
| 69 | ed.onKeyDown.addToTop(t._block); | ||
| 70 | ed.onKeyPress.addToTop(t._block); | ||
| 71 | ed.onKeyUp.addToTop(t._block); | ||
| 72 | ed.onPaste.addToTop(t._block); | ||
| 73 | } else { | ||
| 74 | ed.onKeyDown.remove(t._block); | ||
| 75 | ed.onKeyPress.remove(t._block); | ||
| 76 | ed.onKeyUp.remove(t._block); | ||
| 77 | ed.onPaste.remove(t._block); | ||
| 78 | } | ||
| 79 | |||
| 80 | t.disabled = s; | ||
| 81 | } | ||
| 82 | } | ||
| 83 | }); | ||
| 84 | |||
| 85 | // Register plugin | ||
| 86 | tinymce.PluginManager.add('noneditable', tinymce.plugins.NonEditablePlugin); | ||
| 87 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/pagebreak/css/content.css b/public/javascripts/tiny_mce/plugins/pagebreak/css/content.css deleted file mode 100644 index c949d58..0000000 --- a/public/javascripts/tiny_mce/plugins/pagebreak/css/content.css +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | .mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../img/pagebreak.gif) no-repeat center top;} | ||
diff --git a/public/javascripts/tiny_mce/plugins/pagebreak/editor_plugin.js b/public/javascripts/tiny_mce/plugins/pagebreak/editor_plugin.js deleted file mode 100644 index a212f69..0000000 --- a/public/javascripts/tiny_mce/plugins/pagebreak/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.PageBreakPlugin",{init:function(b,d){var f='<img src="'+d+'/img/trans.gif" class="mcePageBreak mceItemNoResize" />',a="mcePageBreak",c=b.getParam("pagebreak_separator","<!-- pagebreak -->"),e;e=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(g){return"\\"+g}),"g");b.addCommand("mcePageBreak",function(){b.execCommand("mceInsertContent",0,f)});b.addButton("pagebreak",{title:"pagebreak.desc",cmd:a});b.onInit.add(function(){if(b.settings.content_css!==false){b.dom.loadCSS(d+"/css/content.css")}if(b.theme.onResolveName){b.theme.onResolveName.add(function(g,h){if(h.node.nodeName=="IMG"&&b.dom.hasClass(h.node,a)){h.name="pagebreak"}})}});b.onClick.add(function(g,h){h=h.target;if(h.nodeName==="IMG"&&g.dom.hasClass(h,a)){g.selection.select(h)}});b.onNodeChange.add(function(h,g,i){g.setActive("pagebreak",i.nodeName==="IMG"&&h.dom.hasClass(i,a))});b.onBeforeSetContent.add(function(g,h){h.content=h.content.replace(e,f)});b.onPostProcess.add(function(g,h){if(h.get){h.content=h.content.replace(/<img[^>]+>/g,function(i){if(i.indexOf('class="mcePageBreak')!==-1){i=c}return i})}})},getInfo:function(){return{longname:"PageBreak",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("pagebreak",tinymce.plugins.PageBreakPlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js deleted file mode 100644 index 16f5748..0000000 --- a/public/javascripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,74 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.PageBreakPlugin', { | ||
| 10 | init : function(ed, url) { | ||
| 11 | var pb = '<img src="' + url + '/img/trans.gif" class="mcePageBreak mceItemNoResize" />', cls = 'mcePageBreak', sep = ed.getParam('pagebreak_separator', '<!-- pagebreak -->'), pbRE; | ||
| 12 | |||
| 13 | pbRE = new RegExp(sep.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g, function(a) {return '\\' + a;}), 'g'); | ||
| 14 | |||
| 15 | // Register commands | ||
| 16 | ed.addCommand('mcePageBreak', function() { | ||
| 17 | ed.execCommand('mceInsertContent', 0, pb); | ||
| 18 | }); | ||
| 19 | |||
| 20 | // Register buttons | ||
| 21 | ed.addButton('pagebreak', {title : 'pagebreak.desc', cmd : cls}); | ||
| 22 | |||
| 23 | ed.onInit.add(function() { | ||
| 24 | if (ed.settings.content_css !== false) | ||
| 25 | ed.dom.loadCSS(url + "/css/content.css"); | ||
| 26 | |||
| 27 | if (ed.theme.onResolveName) { | ||
| 28 | ed.theme.onResolveName.add(function(th, o) { | ||
| 29 | if (o.node.nodeName == 'IMG' && ed.dom.hasClass(o.node, cls)) | ||
| 30 | o.name = 'pagebreak'; | ||
| 31 | }); | ||
| 32 | } | ||
| 33 | }); | ||
| 34 | |||
| 35 | ed.onClick.add(function(ed, e) { | ||
| 36 | e = e.target; | ||
| 37 | |||
| 38 | if (e.nodeName === 'IMG' && ed.dom.hasClass(e, cls)) | ||
| 39 | ed.selection.select(e); | ||
| 40 | }); | ||
| 41 | |||
| 42 | ed.onNodeChange.add(function(ed, cm, n) { | ||
| 43 | cm.setActive('pagebreak', n.nodeName === 'IMG' && ed.dom.hasClass(n, cls)); | ||
| 44 | }); | ||
| 45 | |||
| 46 | ed.onBeforeSetContent.add(function(ed, o) { | ||
| 47 | o.content = o.content.replace(pbRE, pb); | ||
| 48 | }); | ||
| 49 | |||
| 50 | ed.onPostProcess.add(function(ed, o) { | ||
| 51 | if (o.get) | ||
| 52 | o.content = o.content.replace(/<img[^>]+>/g, function(im) { | ||
| 53 | if (im.indexOf('class="mcePageBreak') !== -1) | ||
| 54 | im = sep; | ||
| 55 | |||
| 56 | return im; | ||
| 57 | }); | ||
| 58 | }); | ||
| 59 | }, | ||
| 60 | |||
| 61 | getInfo : function() { | ||
| 62 | return { | ||
| 63 | longname : 'PageBreak', | ||
| 64 | author : 'Moxiecode Systems AB', | ||
| 65 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 66 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak', | ||
| 67 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 68 | }; | ||
| 69 | } | ||
| 70 | }); | ||
| 71 | |||
| 72 | // Register plugin | ||
| 73 | tinymce.PluginManager.add('pagebreak', tinymce.plugins.PageBreakPlugin); | ||
| 74 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/pagebreak/img/pagebreak.gif b/public/javascripts/tiny_mce/plugins/pagebreak/img/pagebreak.gif deleted file mode 100644 index acdf408..0000000 --- a/public/javascripts/tiny_mce/plugins/pagebreak/img/pagebreak.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/pagebreak/img/trans.gif b/public/javascripts/tiny_mce/plugins/pagebreak/img/trans.gif deleted file mode 100644 index 3884865..0000000 --- a/public/javascripts/tiny_mce/plugins/pagebreak/img/trans.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/paste/editor_plugin.js b/public/javascripts/tiny_mce/plugins/paste/editor_plugin.js deleted file mode 100644 index 7b2bbd9..0000000 --- a/public/javascripts/tiny_mce/plugins/paste/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){var a=tinymce.each;tinymce.create("tinymce.plugins.PastePlugin",{init:function(c,d){var e=this,b;e.editor=c;e.url=d;e.onPreProcess=new tinymce.util.Dispatcher(e);e.onPostProcess=new tinymce.util.Dispatcher(e);e.onPreProcess.add(e._preProcess);e.onPostProcess.add(e._postProcess);e.onPreProcess.add(function(h,i){c.execCallback("paste_preprocess",h,i)});e.onPostProcess.add(function(h,i){c.execCallback("paste_postprocess",h,i)});function g(i){var h=c.dom;e.onPreProcess.dispatch(e,i);i.node=h.create("div",0,i.content);e.onPostProcess.dispatch(e,i);i.content=c.serializer.serialize(i.node,{getInner:1});if(/<(p|h[1-6]|ul|ol)/.test(i.content)){e._insertBlockContent(c,h,i.content)}else{e._insert(i.content)}}c.addCommand("mceInsertClipboardContent",function(h,i){g(i)});function f(l){var p,k,i,j=c.selection,o=c.dom,h=c.getBody(),m;if(o.get("_mcePaste")){return}p=o.add(h,"div",{id:"_mcePaste"},"\uFEFF");if(h!=c.getDoc().body){m=o.getPos(c.selection.getStart(),h).y}else{m=h.scrollTop}o.setStyles(p,{position:"absolute",left:-10000,top:m,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){i=o.doc.body.createTextRange();i.moveToElementText(p);i.execCommand("Paste");o.remove(p);if(p.innerHTML==="\uFEFF"){c.execCommand("mcePasteWord");l.preventDefault();return}g({content:p.innerHTML});return tinymce.dom.Event.cancel(l)}else{k=c.selection.getRng();p=p.firstChild;i=c.getDoc().createRange();i.setStart(p,0);i.setEnd(p,1);j.setRng(i);window.setTimeout(function(){var q="",n=o.select("div[id=_mcePaste]");a(n,function(r){q+=(o.select("> span.Apple-style-span div",r)[0]||o.select("> span.Apple-style-span",r)[0]||r).innerHTML});a(n,function(r){o.remove(r)});if(k){j.setRng(k)}g({content:q})},0)}}if(c.getParam("paste_auto_cleanup_on_paste",true)){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){c.onKeyDown.add(function(h,i){if(((tinymce.isMac?i.metaKey:i.ctrlKey)&&i.keyCode==86)||(i.shiftKey&&i.keyCode==45)){f(i)}})}else{c.onPaste.addToTop(function(h,i){return f(i)})}}if(c.getParam("paste_block_drop")){c.onInit.add(function(){c.dom.bind(c.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(h){h.preventDefault();h.stopPropagation();return false})})}e._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(d,i){var b=this.editor,c=i.content,g,f;function g(h){a(h,function(j){if(j.constructor==RegExp){c=c.replace(j,"")}else{c=c.replace(j[0],j[1])}})}if(/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(c)||i.wordContent){i.wordContent=true;g([/^\s*( )+/g,/( |<br[^>]*>)+\s*$/g]);if(b.getParam("paste_convert_middot_lists",true)){g([[/<!--\[if !supportLists\]-->/gi,"$&__MCE_ITEM__"],[/(<span[^>]+:\s*symbol[^>]+>)/gi,"$1__MCE_ITEM__"],[/(<span[^>]+mso-list:[^>]+>)/gi,"$1__MCE_ITEM__"]])}g([/<!--[\s\S]+?-->/gi,/<\/?(img|font|meta|link|style|div|v:\w+)[^>]*>/gi,/<\\?\?xml[^>]*>/gi,/<\/?o:[^>]*>/gi,/ (id|name|language|type|on\w+|v:\w+)=\"([^\"]*)\"/gi,/ (id|name|language|type|on\w+|v:\w+)=(\w+)/gi,[/<(\/?)s>/gi,"<$1strike>"],/<script[^>]+>[\s\S]*?<\/script>/gi,[/ /g,"\u00a0"]]);if(!b.getParam("paste_retain_style_properties")){g([/<\/?(span)[^>]*>/gi])}}f=b.getParam("paste_strip_class_attributes");if(f!="none"){function e(l,h){var k,j="";if(f=="all"){return""}h=tinymce.explode(h," ");for(k=h.length-1;k>=0;k--){if(!/^(Mso)/i.test(h[k])){j+=(!j?"":" ")+h[k]}}return' class="'+j+'"'}g([[/ class=\"([^\"]*)\"/gi,e],[/ class=(\w+)/gi,e]])}if(b.getParam("paste_remove_spans")){g([/<\/?(span)[^>]*>/gi])}i.content=c},_postProcess:function(e,g){var d=this,c=d.editor,f=c.dom,b;if(g.wordContent){a(f.select("a",g.node),function(h){if(!h.href||h.href.indexOf("#_Toc")!=-1){f.remove(h,1)}});if(d.editor.getParam("paste_convert_middot_lists",true)){d._convertLists(e,g)}b=c.getParam("paste_retain_style_properties");if(tinymce.is(b,"string")){b=tinymce.explode(b)}a(f.select("*",g.node),function(l){var m={},j=0,k,n,h;if(b){for(k=0;k<b.length;k++){n=b[k];h=f.getStyle(l,n);if(h){m[n]=h;j++}}}f.setAttrib(l,"style","");if(b&&j>0){f.setStyles(l,m)}else{if(l.nodeName=="SPAN"&&!l.className){f.remove(l,true)}}})}if(c.getParam("paste_remove_styles")||(c.getParam("paste_remove_styles_if_webkit")&&tinymce.isWebKit)){a(f.select("*[style]",g.node),function(h){h.removeAttribute("style");h.removeAttribute("mce_style")})}else{if(tinymce.isWebKit){a(f.select("*",g.node),function(h){h.removeAttribute("mce_style")})}}},_convertLists:function(e,c){var g=e.editor.dom,f,j,b=-1,d,k=[],i,h;a(g.select("p",c.node),function(r){var n,s="",q,o,l,m;for(n=r.firstChild;n&&n.nodeType==3;n=n.nextSibling){s+=n.nodeValue}s=r.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o]\s*\u00a0*/.test(s)){q="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0{2,}/.test(s)){q="ol"}if(q){d=parseFloat(r.style.marginLeft||0);if(d>b){k.push(d)}if(!f||q!=i){f=g.create(q);g.insertAfter(f,r)}else{if(d>b){f=j.appendChild(g.create(q))}else{if(d<b){l=tinymce.inArray(k,d);m=g.getParents(f.parentNode,q);f=m[m.length-1-l]||f}}}a(g.select("span",r),function(t){var p=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"");if(q=="ul"&&/^[\u2022\u00b7\u00a7\u00d8o]/.test(p)){g.remove(t)}else{if(/^[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){g.remove(t)}}});o=r.innerHTML;if(q=="ul"){o=r.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o]\s*( |\u00a0)+\s*/,"")}else{o=r.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}j=f.appendChild(g.create("li",0,o));g.remove(r);b=d;i=q}else{f=b=0}});h=c.node.innerHTML;if(h.indexOf("__MCE_ITEM__")!=-1){c.node.innerHTML=h.replace(/__MCE_ITEM__/g,"")}},_insertBlockContent:function(h,e,i){var c,g,d=h.selection,m,j,b,k,f;function l(p){var o;if(tinymce.isIE){o=h.getDoc().body.createTextRange();o.moveToElementText(p);o.collapse(false);o.select()}else{d.select(p,1);d.collapse(false)}}this._insert('<span id="_marker"> </span>',1);g=e.get("_marker");c=e.getParent(g,"p,h1,h2,h3,h4,h5,h6,ul,ol,th,td");if(c&&!/TD|TH/.test(c.nodeName)){g=e.split(c,g);a(e.create("div",0,i).childNodes,function(o){m=g.parentNode.insertBefore(o.cloneNode(true),g)});l(m)}else{e.setOuterHTML(g,i);d.select(h.getBody(),1);d.collapse(0)}e.remove("_marker");j=d.getStart();b=e.getViewPort(h.getWin());k=h.dom.getPos(j).y;f=j.clientHeight;if(k<b.y||k+f>b.y+b.h){h.getDoc().body.scrollTop=k<b.y?k:k-b.h+25}},_insert:function(d,b){var c=this.editor;if(!c.selection.isCollapsed()){c.getDoc().execCommand("Delete",false,null)}c.execCommand(tinymce.isGecko?"insertHTML":"mceInsertContent",false,d,{skip_undo:b})},_legacySupport:function(){var c=this,b=c.editor;a(["mcePasteText","mcePasteWord"],function(d){b.addCommand(d,function(){b.windowManager.open({file:c.url+(d=="mcePasteText"?"/pastetext.htm":"/pasteword.htm"),width:parseInt(b.getParam("paste_dialog_width","450")),height:parseInt(b.getParam("paste_dialog_height","400")),inline:1})})});b.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});b.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"});b.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/paste/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/paste/editor_plugin_src.js deleted file mode 100644 index 8b6cae3..0000000 --- a/public/javascripts/tiny_mce/plugins/paste/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,531 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 1225 2009-09-07 19:06:19Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | var each = tinymce.each; | ||
| 10 | |||
| 11 | tinymce.create('tinymce.plugins.PastePlugin', { | ||
| 12 | init : function(ed, url) { | ||
| 13 | var t = this, cb; | ||
| 14 | |||
| 15 | t.editor = ed; | ||
| 16 | t.url = url; | ||
| 17 | |||
| 18 | // Setup plugin events | ||
| 19 | t.onPreProcess = new tinymce.util.Dispatcher(t); | ||
| 20 | t.onPostProcess = new tinymce.util.Dispatcher(t); | ||
| 21 | |||
| 22 | // Register default handlers | ||
| 23 | t.onPreProcess.add(t._preProcess); | ||
| 24 | t.onPostProcess.add(t._postProcess); | ||
| 25 | |||
| 26 | // Register optional preprocess handler | ||
| 27 | t.onPreProcess.add(function(pl, o) { | ||
| 28 | ed.execCallback('paste_preprocess', pl, o); | ||
| 29 | }); | ||
| 30 | |||
| 31 | // Register optional postprocess | ||
| 32 | t.onPostProcess.add(function(pl, o) { | ||
| 33 | ed.execCallback('paste_postprocess', pl, o); | ||
| 34 | }); | ||
| 35 | |||
| 36 | // This function executes the process handlers and inserts the contents | ||
| 37 | function process(o) { | ||
| 38 | var dom = ed.dom; | ||
| 39 | |||
| 40 | // Execute pre process handlers | ||
| 41 | t.onPreProcess.dispatch(t, o); | ||
| 42 | |||
| 43 | // Create DOM structure | ||
| 44 | o.node = dom.create('div', 0, o.content); | ||
| 45 | |||
| 46 | // Execute post process handlers | ||
| 47 | t.onPostProcess.dispatch(t, o); | ||
| 48 | |||
| 49 | // Serialize content | ||
| 50 | o.content = ed.serializer.serialize(o.node, {getInner : 1}); | ||
| 51 | |||
| 52 | // Insert cleaned content. We need to handle insertion of contents containing block elements separately | ||
| 53 | if (/<(p|h[1-6]|ul|ol)/.test(o.content)) | ||
| 54 | t._insertBlockContent(ed, dom, o.content); | ||
| 55 | else | ||
| 56 | t._insert(o.content); | ||
| 57 | }; | ||
| 58 | |||
| 59 | // Add command for external usage | ||
| 60 | ed.addCommand('mceInsertClipboardContent', function(u, o) { | ||
| 61 | process(o); | ||
| 62 | }); | ||
| 63 | |||
| 64 | // This function grabs the contents from the clipboard by adding a | ||
| 65 | // hidden div and placing the caret inside it and after the browser paste | ||
| 66 | // is done it grabs that contents and processes that | ||
| 67 | function grabContent(e) { | ||
| 68 | var n, or, rng, sel = ed.selection, dom = ed.dom, body = ed.getBody(), posY; | ||
| 69 | |||
| 70 | if (dom.get('_mcePaste')) | ||
| 71 | return; | ||
| 72 | |||
| 73 | // Create container to paste into | ||
| 74 | n = dom.add(body, 'div', {id : '_mcePaste'}, '\uFEFF'); | ||
| 75 | |||
| 76 | // If contentEditable mode we need to find out the position of the closest element | ||
| 77 | if (body != ed.getDoc().body) | ||
| 78 | posY = dom.getPos(ed.selection.getStart(), body).y; | ||
| 79 | else | ||
| 80 | posY = body.scrollTop; | ||
| 81 | |||
| 82 | // Styles needs to be applied after the element is added to the document since WebKit will otherwise remove all styles | ||
| 83 | dom.setStyles(n, { | ||
| 84 | position : 'absolute', | ||
| 85 | left : -10000, | ||
| 86 | top : posY, | ||
| 87 | width : 1, | ||
| 88 | height : 1, | ||
| 89 | overflow : 'hidden' | ||
| 90 | }); | ||
| 91 | |||
| 92 | if (tinymce.isIE) { | ||
| 93 | // Select the container | ||
| 94 | rng = dom.doc.body.createTextRange(); | ||
| 95 | rng.moveToElementText(n); | ||
| 96 | rng.execCommand('Paste'); | ||
| 97 | |||
| 98 | // Remove container | ||
| 99 | dom.remove(n); | ||
| 100 | |||
| 101 | // Check if the contents was changed, if it wasn't then clipboard extraction failed probably due | ||
| 102 | // to IE security settings so we pass the junk though better than nothing right | ||
| 103 | if (n.innerHTML === '\uFEFF') { | ||
| 104 | ed.execCommand('mcePasteWord'); | ||
| 105 | e.preventDefault(); | ||
| 106 | return; | ||
| 107 | } | ||
| 108 | |||
| 109 | // Process contents | ||
| 110 | process({content : n.innerHTML}); | ||
| 111 | |||
| 112 | // Block the real paste event | ||
| 113 | return tinymce.dom.Event.cancel(e); | ||
| 114 | } else { | ||
| 115 | or = ed.selection.getRng(); | ||
| 116 | |||
| 117 | // Move caret into hidden div | ||
| 118 | n = n.firstChild; | ||
| 119 | rng = ed.getDoc().createRange(); | ||
| 120 | rng.setStart(n, 0); | ||
| 121 | rng.setEnd(n, 1); | ||
| 122 | sel.setRng(rng); | ||
| 123 | |||
| 124 | // Wait a while and grab the pasted contents | ||
| 125 | window.setTimeout(function() { | ||
| 126 | var h = '', nl = dom.select('div[id=_mcePaste]'); | ||
| 127 | |||
| 128 | // WebKit will split the div into multiple ones so this will loop through then all and join them to get the whole HTML string | ||
| 129 | each(nl, function(n) { | ||
| 130 | h += (dom.select('> span.Apple-style-span div', n)[0] || dom.select('> span.Apple-style-span', n)[0] || n).innerHTML; | ||
| 131 | }); | ||
| 132 | |||
| 133 | // Remove the nodes | ||
| 134 | each(nl, function(n) { | ||
| 135 | dom.remove(n); | ||
| 136 | }); | ||
| 137 | |||
| 138 | // Restore the old selection | ||
| 139 | if (or) | ||
| 140 | sel.setRng(or); | ||
| 141 | |||
| 142 | process({content : h}); | ||
| 143 | }, 0); | ||
| 144 | } | ||
| 145 | }; | ||
| 146 | |||
| 147 | // Check if we should use the new auto process method | ||
| 148 | if (ed.getParam('paste_auto_cleanup_on_paste', true)) { | ||
| 149 | // Is it's Opera or older FF use key handler | ||
| 150 | if (tinymce.isOpera || /Firefox\/2/.test(navigator.userAgent)) { | ||
| 151 | ed.onKeyDown.add(function(ed, e) { | ||
| 152 | if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45)) | ||
| 153 | grabContent(e); | ||
| 154 | }); | ||
| 155 | } else { | ||
| 156 | // Grab contents on paste event on Gecko and WebKit | ||
| 157 | ed.onPaste.addToTop(function(ed, e) { | ||
| 158 | return grabContent(e); | ||
| 159 | }); | ||
| 160 | } | ||
| 161 | } | ||
| 162 | |||
| 163 | // Block all drag/drop events | ||
| 164 | if (ed.getParam('paste_block_drop')) { | ||
| 165 | ed.onInit.add(function() { | ||
| 166 | ed.dom.bind(ed.getBody(), ['dragend', 'dragover', 'draggesture', 'dragdrop', 'drop', 'drag'], function(e) { | ||
| 167 | e.preventDefault(); | ||
| 168 | e.stopPropagation(); | ||
| 169 | |||
| 170 | return false; | ||
| 171 | }); | ||
| 172 | }); | ||
| 173 | } | ||
| 174 | |||
| 175 | // Add legacy support | ||
| 176 | t._legacySupport(); | ||
| 177 | }, | ||
| 178 | |||
| 179 | getInfo : function() { | ||
| 180 | return { | ||
| 181 | longname : 'Paste text/word', | ||
| 182 | author : 'Moxiecode Systems AB', | ||
| 183 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 184 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste', | ||
| 185 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 186 | }; | ||
| 187 | }, | ||
| 188 | |||
| 189 | _preProcess : function(pl, o) { | ||
| 190 | var ed = this.editor, h = o.content, process, stripClass; | ||
| 191 | |||
| 192 | //console.log('Before preprocess:' + o.content); | ||
| 193 | |||
| 194 | function process(items) { | ||
| 195 | each(items, function(v) { | ||
| 196 | // Remove or replace | ||
| 197 | if (v.constructor == RegExp) | ||
| 198 | h = h.replace(v, ''); | ||
| 199 | else | ||
| 200 | h = h.replace(v[0], v[1]); | ||
| 201 | }); | ||
| 202 | }; | ||
| 203 | |||
| 204 | // Detect Word content and process it more aggressive | ||
| 205 | if (/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(h) || o.wordContent) { | ||
| 206 | o.wordContent = true; // Mark the pasted contents as word specific content | ||
| 207 | //console.log('Word contents detected.'); | ||
| 208 | |||
| 209 | // Process away some basic content | ||
| 210 | process([ | ||
| 211 | /^\s*( )+/g, // nbsp entities at the start of contents | ||
| 212 | /( |<br[^>]*>)+\s*$/g // nbsp entities at the end of contents | ||
| 213 | ]); | ||
| 214 | |||
| 215 | if (ed.getParam('paste_convert_middot_lists', true)) { | ||
| 216 | process([ | ||
| 217 | [/<!--\[if !supportLists\]-->/gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker | ||
| 218 | [/(<span[^>]+:\s*symbol[^>]+>)/gi, '$1__MCE_ITEM__'], // Convert symbol spans to list items | ||
| 219 | [/(<span[^>]+mso-list:[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list to item marker | ||
| 220 | ]); | ||
| 221 | } | ||
| 222 | |||
| 223 | process([ | ||
| 224 | /<!--[\s\S]+?-->/gi, // Word comments | ||
| 225 | /<\/?(img|font|meta|link|style|div|v:\w+)[^>]*>/gi, // Remove some tags including VML content | ||
| 226 | /<\\?\?xml[^>]*>/gi, // XML namespace declarations | ||
| 227 | /<\/?o:[^>]*>/gi, // MS namespaced elements <o:tag> | ||
| 228 | / (id|name|language|type|on\w+|v:\w+)=\"([^\"]*)\"/gi, // on.., class, style and language attributes with quotes | ||
| 229 | / (id|name|language|type|on\w+|v:\w+)=(\w+)/gi, // on.., class, style and language attributes without quotes (IE) | ||
| 230 | [/<(\/?)s>/gi, '<$1strike>'], // Convert <s> into <strike> for line-though | ||
| 231 | /<script[^>]+>[\s\S]*?<\/script>/gi, // All scripts elements for msoShowComment for example | ||
| 232 | [/ /g, '\u00a0'] // Replace nsbp entites to char since it's easier to handle | ||
| 233 | ]); | ||
| 234 | |||
| 235 | // Remove all spans if no styles is to be retained | ||
| 236 | if (!ed.getParam('paste_retain_style_properties')) { | ||
| 237 | process([ | ||
| 238 | /<\/?(span)[^>]*>/gi | ||
| 239 | ]); | ||
| 240 | } | ||
| 241 | } | ||
| 242 | |||
| 243 | // Allow for class names to be retained if desired; either all, or just the ones from Word | ||
| 244 | // Note that the paste_strip_class_attributes: 'none, verify_css_classes: true is also a good variation. | ||
| 245 | stripClass = ed.getParam('paste_strip_class_attributes'); | ||
| 246 | if (stripClass != 'none') { | ||
| 247 | // Cleans everything but mceItem... classes | ||
| 248 | function cleanClasses(str, cls) { | ||
| 249 | var i, out = ''; | ||
| 250 | |||
| 251 | // Remove all classes | ||
| 252 | if (stripClass == 'all') | ||
| 253 | return ''; | ||
| 254 | |||
| 255 | cls = tinymce.explode(cls, ' '); | ||
| 256 | |||
| 257 | for (i = cls.length - 1; i >= 0; i--) { | ||
| 258 | // Remove Mso classes | ||
| 259 | if (!/^(Mso)/i.test(cls[i])) | ||
| 260 | out += (!out ? '' : ' ') + cls[i]; | ||
| 261 | } | ||
| 262 | |||
| 263 | return ' class="' + out + '"'; | ||
| 264 | }; | ||
| 265 | |||
| 266 | process([ | ||
| 267 | [/ class=\"([^\"]*)\"/gi, cleanClasses], // class attributes with quotes | ||
| 268 | [/ class=(\w+)/gi, cleanClasses] // class attributes without quotes (IE) | ||
| 269 | ]); | ||
| 270 | } | ||
| 271 | |||
| 272 | // Remove spans option | ||
| 273 | if (ed.getParam('paste_remove_spans')) { | ||
| 274 | process([ | ||
| 275 | /<\/?(span)[^>]*>/gi | ||
| 276 | ]); | ||
| 277 | } | ||
| 278 | |||
| 279 | //console.log('After preprocess:' + h); | ||
| 280 | |||
| 281 | o.content = h; | ||
| 282 | }, | ||
| 283 | |||
| 284 | /** | ||
| 285 | * Various post process items. | ||
| 286 | */ | ||
| 287 | _postProcess : function(pl, o) { | ||
| 288 | var t = this, ed = t.editor, dom = ed.dom, styleProps; | ||
| 289 | |||
| 290 | if (o.wordContent) { | ||
| 291 | // Remove named anchors or TOC links | ||
| 292 | each(dom.select('a', o.node), function(a) { | ||
| 293 | if (!a.href || a.href.indexOf('#_Toc') != -1) | ||
| 294 | dom.remove(a, 1); | ||
| 295 | }); | ||
| 296 | |||
| 297 | if (t.editor.getParam('paste_convert_middot_lists', true)) | ||
| 298 | t._convertLists(pl, o); | ||
| 299 | |||
| 300 | // Process styles | ||
| 301 | styleProps = ed.getParam('paste_retain_style_properties'); // retained properties | ||
| 302 | |||
| 303 | // If string property then split it | ||
| 304 | if (tinymce.is(styleProps, 'string')) | ||
| 305 | styleProps = tinymce.explode(styleProps); | ||
| 306 | |||
| 307 | // Retains some style properties | ||
| 308 | each(dom.select('*', o.node), function(el) { | ||
| 309 | var newStyle = {}, npc = 0, i, sp, sv; | ||
| 310 | |||
| 311 | // Store a subset of the existing styles | ||
| 312 | if (styleProps) { | ||
| 313 | for (i = 0; i < styleProps.length; i++) { | ||
| 314 | sp = styleProps[i]; | ||
| 315 | sv = dom.getStyle(el, sp); | ||
| 316 | |||
| 317 | if (sv) { | ||
| 318 | newStyle[sp] = sv; | ||
| 319 | npc++; | ||
| 320 | } | ||
| 321 | } | ||
| 322 | } | ||
| 323 | |||
| 324 | // Remove all of the existing styles | ||
| 325 | dom.setAttrib(el, 'style', ''); | ||
| 326 | |||
| 327 | if (styleProps && npc > 0) | ||
| 328 | dom.setStyles(el, newStyle); // Add back the stored subset of styles | ||
| 329 | else // Remove empty span tags that do not have class attributes | ||
| 330 | if (el.nodeName == 'SPAN' && !el.className) | ||
| 331 | dom.remove(el, true); | ||
| 332 | }); | ||
| 333 | } | ||
| 334 | |||
| 335 | // Remove all style information or only specifically on WebKit to avoid the style bug on that browser | ||
| 336 | if (ed.getParam("paste_remove_styles") || (ed.getParam("paste_remove_styles_if_webkit") && tinymce.isWebKit)) { | ||
| 337 | each(dom.select('*[style]', o.node), function(el) { | ||
| 338 | el.removeAttribute('style'); | ||
| 339 | el.removeAttribute('mce_style'); | ||
| 340 | }); | ||
| 341 | } else { | ||
| 342 | if (tinymce.isWebKit) { | ||
| 343 | // We need to compress the styles on WebKit since if you paste <img border="0" /> it will become <img border="0" style="... lots of junk ..." /> | ||
| 344 | // Removing the mce_style that contains the real value will force the Serializer engine to compress the styles | ||
| 345 | each(dom.select('*', o.node), function(el) { | ||
| 346 | el.removeAttribute('mce_style'); | ||
| 347 | }); | ||
| 348 | } | ||
| 349 | } | ||
| 350 | }, | ||
| 351 | |||
| 352 | /** | ||
| 353 | * Converts the most common bullet and number formats in Office into a real semantic UL/LI list. | ||
| 354 | */ | ||
| 355 | _convertLists : function(pl, o) { | ||
| 356 | var dom = pl.editor.dom, listElm, li, lastMargin = -1, margin, levels = [], lastType, html; | ||
| 357 | |||
| 358 | // Convert middot lists into real semantic lists | ||
| 359 | each(dom.select('p', o.node), function(p) { | ||
| 360 | var sib, val = '', type, html, idx, parents; | ||
| 361 | |||
| 362 | // Get text node value at beginning of paragraph | ||
| 363 | for (sib = p.firstChild; sib && sib.nodeType == 3; sib = sib.nextSibling) | ||
| 364 | val += sib.nodeValue; | ||
| 365 | |||
| 366 | val = p.innerHTML.replace(/<\/?\w+[^>]*>/gi, '').replace(/ /g, '\u00a0'); | ||
| 367 | |||
| 368 | // Detect unordered lists look for bullets | ||
| 369 | if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o]\s*\u00a0*/.test(val)) | ||
| 370 | type = 'ul'; | ||
| 371 | |||
| 372 | // Detect ordered lists 1., a. or ixv. | ||
| 373 | if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0{2,}/.test(val)) | ||
| 374 | type = 'ol'; | ||
| 375 | |||
| 376 | // Check if node value matches the list pattern: o | ||
| 377 | if (type) { | ||
| 378 | margin = parseFloat(p.style.marginLeft || 0); | ||
| 379 | |||
| 380 | if (margin > lastMargin) | ||
| 381 | levels.push(margin); | ||
| 382 | |||
| 383 | if (!listElm || type != lastType) { | ||
| 384 | listElm = dom.create(type); | ||
| 385 | dom.insertAfter(listElm, p); | ||
| 386 | } else { | ||
| 387 | // Nested list element | ||
| 388 | if (margin > lastMargin) { | ||
| 389 | listElm = li.appendChild(dom.create(type)); | ||
| 390 | } else if (margin < lastMargin) { | ||
| 391 | // Find parent level based on margin value | ||
| 392 | idx = tinymce.inArray(levels, margin); | ||
| 393 | parents = dom.getParents(listElm.parentNode, type); | ||
| 394 | listElm = parents[parents.length - 1 - idx] || listElm; | ||
| 395 | } | ||
| 396 | } | ||
| 397 | |||
| 398 | // Remove middot or number spans if they exists | ||
| 399 | each(dom.select('span', p), function(span) { | ||
| 400 | var html = span.innerHTML.replace(/<\/?\w+[^>]*>/gi, ''); | ||
| 401 | |||
| 402 | // Remove span with the middot or the number | ||
| 403 | if (type == 'ul' && /^[\u2022\u00b7\u00a7\u00d8o]/.test(html)) | ||
| 404 | dom.remove(span); | ||
| 405 | else if (/^[\s\S]*\w+\.( |\u00a0)*\s*/.test(html)) | ||
| 406 | dom.remove(span); | ||
| 407 | }); | ||
| 408 | |||
| 409 | html = p.innerHTML; | ||
| 410 | |||
| 411 | // Remove middot/list items | ||
| 412 | if (type == 'ul') | ||
| 413 | html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o]\s*( |\u00a0)+\s*/, ''); | ||
| 414 | else | ||
| 415 | html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.( |\u00a0)+\s*/, ''); | ||
| 416 | |||
| 417 | // Create li and add paragraph data into the new li | ||
| 418 | li = listElm.appendChild(dom.create('li', 0, html)); | ||
| 419 | dom.remove(p); | ||
| 420 | |||
| 421 | lastMargin = margin; | ||
| 422 | lastType = type; | ||
| 423 | } else | ||
| 424 | listElm = lastMargin = 0; // End list element | ||
| 425 | }); | ||
| 426 | |||
| 427 | // Remove any left over makers | ||
| 428 | html = o.node.innerHTML; | ||
| 429 | if (html.indexOf('__MCE_ITEM__') != -1) | ||
| 430 | o.node.innerHTML = html.replace(/__MCE_ITEM__/g, ''); | ||
| 431 | }, | ||
| 432 | |||
| 433 | /** | ||
| 434 | * This method will split the current block parent and insert the contents inside the split position. | ||
| 435 | * This logic can be improved so text nodes at the start/end remain in the start/end block elements | ||
| 436 | */ | ||
| 437 | _insertBlockContent : function(ed, dom, content) { | ||
| 438 | var parentBlock, marker, sel = ed.selection, last, elm, vp, y, elmHeight; | ||
| 439 | |||
| 440 | function select(n) { | ||
| 441 | var r; | ||
| 442 | |||
| 443 | if (tinymce.isIE) { | ||
| 444 | r = ed.getDoc().body.createTextRange(); | ||
| 445 | r.moveToElementText(n); | ||
| 446 | r.collapse(false); | ||
| 447 | r.select(); | ||
| 448 | } else { | ||
| 449 | sel.select(n, 1); | ||
| 450 | sel.collapse(false); | ||
| 451 | } | ||
| 452 | }; | ||
| 453 | |||
| 454 | // Insert a marker for the caret position | ||
| 455 | this._insert('<span id="_marker"> </span>', 1); | ||
| 456 | marker = dom.get('_marker'); | ||
| 457 | parentBlock = dom.getParent(marker, 'p,h1,h2,h3,h4,h5,h6,ul,ol,th,td'); | ||
| 458 | |||
| 459 | // If it's a parent block but not a table cell | ||
| 460 | if (parentBlock && !/TD|TH/.test(parentBlock.nodeName)) { | ||
| 461 | // Split parent block | ||
| 462 | marker = dom.split(parentBlock, marker); | ||
| 463 | |||
| 464 | // Insert nodes before the marker | ||
| 465 | each(dom.create('div', 0, content).childNodes, function(n) { | ||
| 466 | last = marker.parentNode.insertBefore(n.cloneNode(true), marker); | ||
| 467 | }); | ||
| 468 | |||
| 469 | // Move caret after marker | ||
| 470 | select(last); | ||
| 471 | } else { | ||
| 472 | dom.setOuterHTML(marker, content); | ||
| 473 | sel.select(ed.getBody(), 1); | ||
| 474 | sel.collapse(0); | ||
| 475 | } | ||
| 476 | |||
| 477 | dom.remove('_marker'); // Remove marker if it's left | ||
| 478 | |||
| 479 | // Get element, position and height | ||
| 480 | elm = sel.getStart(); | ||
| 481 | vp = dom.getViewPort(ed.getWin()); | ||
| 482 | y = ed.dom.getPos(elm).y; | ||
| 483 | elmHeight = elm.clientHeight; | ||
| 484 | |||
| 485 | // Is element within viewport if not then scroll it into view | ||
| 486 | if (y < vp.y || y + elmHeight > vp.y + vp.h) | ||
| 487 | ed.getDoc().body.scrollTop = y < vp.y ? y : y - vp.h + 25; | ||
| 488 | }, | ||
| 489 | |||
| 490 | /** | ||
| 491 | * Inserts the specified contents at the caret position. | ||
| 492 | */ | ||
| 493 | _insert : function(h, skip_undo) { | ||
| 494 | var ed = this.editor; | ||
| 495 | |||
| 496 | // First delete the contents seems to work better on WebKit | ||
| 497 | if (!ed.selection.isCollapsed()) | ||
| 498 | ed.getDoc().execCommand('Delete', false, null); | ||
| 499 | |||
| 500 | // It's better to use the insertHTML method on Gecko since it will combine paragraphs correctly before inserting the contents | ||
| 501 | ed.execCommand(tinymce.isGecko ? 'insertHTML' : 'mceInsertContent', false, h, {skip_undo : skip_undo}); | ||
| 502 | }, | ||
| 503 | |||
| 504 | /** | ||
| 505 | * This method will open the old style paste dialogs. Some users might want the old behavior but still use the new cleanup engine. | ||
| 506 | */ | ||
| 507 | _legacySupport : function() { | ||
| 508 | var t = this, ed = t.editor; | ||
| 509 | |||
| 510 | // Register commands for backwards compatibility | ||
| 511 | each(['mcePasteText', 'mcePasteWord'], function(cmd) { | ||
| 512 | ed.addCommand(cmd, function() { | ||
| 513 | ed.windowManager.open({ | ||
| 514 | file : t.url + (cmd == 'mcePasteText' ? '/pastetext.htm' : '/pasteword.htm'), | ||
| 515 | width : parseInt(ed.getParam("paste_dialog_width", "450")), | ||
| 516 | height : parseInt(ed.getParam("paste_dialog_height", "400")), | ||
| 517 | inline : 1 | ||
| 518 | }); | ||
| 519 | }); | ||
| 520 | }); | ||
| 521 | |||
| 522 | // Register buttons for backwards compatibility | ||
| 523 | ed.addButton('pastetext', {title : 'paste.paste_text_desc', cmd : 'mcePasteText'}); | ||
| 524 | ed.addButton('pasteword', {title : 'paste.paste_word_desc', cmd : 'mcePasteWord'}); | ||
| 525 | ed.addButton('selectall', {title : 'paste.selectall_desc', cmd : 'selectall'}); | ||
| 526 | } | ||
| 527 | }); | ||
| 528 | |||
| 529 | // Register plugin | ||
| 530 | tinymce.PluginManager.add('paste', tinymce.plugins.PastePlugin); | ||
| 531 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/paste/js/pastetext.js b/public/javascripts/tiny_mce/plugins/paste/js/pastetext.js deleted file mode 100644 index c524f9e..0000000 --- a/public/javascripts/tiny_mce/plugins/paste/js/pastetext.js +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 1 | tinyMCEPopup.requireLangPack(); | ||
| 2 | |||
| 3 | var PasteTextDialog = { | ||
| 4 | init : function() { | ||
| 5 | this.resize(); | ||
| 6 | }, | ||
| 7 | |||
| 8 | insert : function() { | ||
| 9 | var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines; | ||
| 10 | |||
| 11 | // Convert linebreaks into paragraphs | ||
| 12 | if (document.getElementById('linebreaks').checked) { | ||
| 13 | lines = h.split(/\r?\n/); | ||
| 14 | if (lines.length > 1) { | ||
| 15 | h = ''; | ||
| 16 | tinymce.each(lines, function(row) { | ||
| 17 | h += '<p>' + row + '</p>'; | ||
| 18 | }); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h}); | ||
| 23 | tinyMCEPopup.close(); | ||
| 24 | }, | ||
| 25 | |||
| 26 | resize : function() { | ||
| 27 | var vp = tinyMCEPopup.dom.getViewPort(window), el; | ||
| 28 | |||
| 29 | el = document.getElementById('content'); | ||
| 30 | |||
| 31 | el.style.width = (vp.w - 20) + 'px'; | ||
| 32 | el.style.height = (vp.h - 90) + 'px'; | ||
| 33 | } | ||
| 34 | }; | ||
| 35 | |||
| 36 | tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog); | ||
diff --git a/public/javascripts/tiny_mce/plugins/paste/js/pasteword.js b/public/javascripts/tiny_mce/plugins/paste/js/pasteword.js deleted file mode 100644 index a52731c..0000000 --- a/public/javascripts/tiny_mce/plugins/paste/js/pasteword.js +++ /dev/null | |||
| @@ -1,51 +0,0 @@ | |||
| 1 | tinyMCEPopup.requireLangPack(); | ||
| 2 | |||
| 3 | var PasteWordDialog = { | ||
| 4 | init : function() { | ||
| 5 | var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = ''; | ||
| 6 | |||
| 7 | // Create iframe | ||
| 8 | el.innerHTML = '<iframe id="iframe" src="javascript:\'\';" frameBorder="0" style="border: 1px solid gray"></iframe>'; | ||
| 9 | ifr = document.getElementById('iframe'); | ||
| 10 | doc = ifr.contentWindow.document; | ||
| 11 | |||
| 12 | // Force absolute CSS urls | ||
| 13 | css = [ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css")]; | ||
| 14 | css = css.concat(tinymce.explode(ed.settings.content_css) || []); | ||
| 15 | tinymce.each(css, function(u) { | ||
| 16 | cssHTML += '<link href="' + ed.documentBaseURI.toAbsolute('' + u) + '" rel="stylesheet" type="text/css" />'; | ||
| 17 | }); | ||
| 18 | |||
| 19 | // Write content into iframe | ||
| 20 | doc.open(); | ||
| 21 | doc.write('<html><head>' + cssHTML + '</head><body class="mceContentBody" spellcheck="false"></body></html>'); | ||
| 22 | doc.close(); | ||
| 23 | |||
| 24 | doc.designMode = 'on'; | ||
| 25 | this.resize(); | ||
| 26 | |||
| 27 | window.setTimeout(function() { | ||
| 28 | ifr.contentWindow.focus(); | ||
| 29 | }, 10); | ||
| 30 | }, | ||
| 31 | |||
| 32 | insert : function() { | ||
| 33 | var h = document.getElementById('iframe').contentWindow.document.body.innerHTML; | ||
| 34 | |||
| 35 | tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h, wordContent : true}); | ||
| 36 | tinyMCEPopup.close(); | ||
| 37 | }, | ||
| 38 | |||
| 39 | resize : function() { | ||
| 40 | var vp = tinyMCEPopup.dom.getViewPort(window), el; | ||
| 41 | |||
| 42 | el = document.getElementById('iframe'); | ||
| 43 | |||
| 44 | if (el) { | ||
| 45 | el.style.width = (vp.w - 20) + 'px'; | ||
| 46 | el.style.height = (vp.h - 90) + 'px'; | ||
| 47 | } | ||
| 48 | } | ||
| 49 | }; | ||
| 50 | |||
| 51 | tinyMCEPopup.onInit.add(PasteWordDialog.init, PasteWordDialog); | ||
diff --git a/public/javascripts/tiny_mce/plugins/paste/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/paste/langs/en_dlg.js deleted file mode 100644 index eeac778..0000000 --- a/public/javascripts/tiny_mce/plugins/paste/langs/en_dlg.js +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | tinyMCE.addI18n('en.paste_dlg',{ | ||
| 2 | text_title:"Use CTRL+V on your keyboard to paste the text into the window.", | ||
| 3 | text_linebreaks:"Keep linebreaks", | ||
| 4 | word_title:"Use CTRL+V on your keyboard to paste the text into the window." | ||
| 5 | }); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/paste/pastetext.htm b/public/javascripts/tiny_mce/plugins/paste/pastetext.htm deleted file mode 100644 index 42c3d9c..0000000 --- a/public/javascripts/tiny_mce/plugins/paste/pastetext.htm +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 2 | <head> | ||
| 3 | <title>{#paste.paste_text_desc}</title> | ||
| 4 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | ||
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 6 | <script type="text/javascript" src="js/pastetext.js"></script> | ||
| 7 | </head> | ||
| 8 | <body onresize="PasteTextDialog.resize();" style="display:none; overflow:hidden;"> | ||
| 9 | <form name="source" onsubmit="return PasteTextDialog.insert();" action="#"> | ||
| 10 | <div style="float: left" class="title">{#paste.paste_text_desc}</div> | ||
| 11 | |||
| 12 | <div style="float: right"> | ||
| 13 | <input type="checkbox" name="linebreaks" id="linebreaks" class="wordWrapCode" checked="checked" /><label for="linebreaks">{#paste_dlg.text_linebreaks}</label> | ||
| 14 | </div> | ||
| 15 | |||
| 16 | <br style="clear: both" /> | ||
| 17 | |||
| 18 | <div>{#paste_dlg.text_title}</div> | ||
| 19 | |||
| 20 | <textarea id="content" name="content" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,mono; font-size: 12px;" dir="ltr" wrap="soft" class="mceFocus"></textarea> | ||
| 21 | |||
| 22 | <div class="mceActionPanel"> | ||
| 23 | <div style="float: left"> | ||
| 24 | <input type="submit" name="insert" value="{#insert}" id="insert" /> | ||
| 25 | </div> | ||
| 26 | |||
| 27 | <div style="float: right"> | ||
| 28 | <input type="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" /> | ||
| 29 | </div> | ||
| 30 | </div> | ||
| 31 | </form> | ||
| 32 | </body> | ||
| 33 | </html> \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/paste/pasteword.htm b/public/javascripts/tiny_mce/plugins/paste/pasteword.htm deleted file mode 100644 index f4a9b3d..0000000 --- a/public/javascripts/tiny_mce/plugins/paste/pasteword.htm +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 2 | <head> | ||
| 3 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | ||
| 4 | <title>{#paste.paste_word_desc}</title> | ||
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 6 | <script type="text/javascript" src="js/pasteword.js"></script> | ||
| 7 | </head> | ||
| 8 | <body onresize="PasteWordDialog.resize();" style="display:none; overflow:hidden;"> | ||
| 9 | <form name="source" onsubmit="return PasteWordDialog.insert();" action="#"> | ||
| 10 | <div class="title">{#paste.paste_word_desc}</div> | ||
| 11 | |||
| 12 | <div>{#paste_dlg.word_title}</div> | ||
| 13 | |||
| 14 | <div id="iframecontainer"></div> | ||
| 15 | |||
| 16 | <div class="mceActionPanel"> | ||
| 17 | <div style="float: left"> | ||
| 18 | <input type="submit" id="insert" name="insert" value="{#insert}" /> | ||
| 19 | </div> | ||
| 20 | |||
| 21 | <div style="float: right"> | ||
| 22 | <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" /> | ||
| 23 | </div> | ||
| 24 | </div> | ||
| 25 | </form> | ||
| 26 | </body> | ||
| 27 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/preview/editor_plugin.js b/public/javascripts/tiny_mce/plugins/preview/editor_plugin.js deleted file mode 100644 index 507909c..0000000 --- a/public/javascripts/tiny_mce/plugins/preview/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.Preview",{init:function(a,b){var d=this,c=tinymce.explode(a.settings.content_css);d.editor=a;tinymce.each(c,function(f,e){c[e]=a.documentBaseURI.toAbsolute(f)});a.addCommand("mcePreview",function(){a.windowManager.open({file:a.getParam("plugin_preview_pageurl",b+"/preview.html"),width:parseInt(a.getParam("plugin_preview_width","550")),height:parseInt(a.getParam("plugin_preview_height","600")),resizable:"yes",scrollbars:"yes",popup_css:c?c.join(","):a.baseURI.toAbsolute("themes/"+a.settings.theme+"/skins/"+a.settings.skin+"/content.css"),inline:a.getParam("plugin_preview_inline",1)},{base:a.documentBaseURI.getURI()})});a.addButton("preview",{title:"preview.preview_desc",cmd:"mcePreview"})},getInfo:function(){return{longname:"Preview",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("preview",tinymce.plugins.Preview)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/preview/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/preview/editor_plugin_src.js deleted file mode 100644 index 0582ab8..0000000 --- a/public/javascripts/tiny_mce/plugins/preview/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,50 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 1056 2009-03-13 12:47:03Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.Preview', { | ||
| 10 | init : function(ed, url) { | ||
| 11 | var t = this, css = tinymce.explode(ed.settings.content_css); | ||
| 12 | |||
| 13 | t.editor = ed; | ||
| 14 | |||
| 15 | // Force absolute CSS urls | ||
| 16 | tinymce.each(css, function(u, k) { | ||
| 17 | css[k] = ed.documentBaseURI.toAbsolute(u); | ||
| 18 | }); | ||
| 19 | |||
| 20 | ed.addCommand('mcePreview', function() { | ||
| 21 | ed.windowManager.open({ | ||
| 22 | file : ed.getParam("plugin_preview_pageurl", url + "/preview.html"), | ||
| 23 | width : parseInt(ed.getParam("plugin_preview_width", "550")), | ||
| 24 | height : parseInt(ed.getParam("plugin_preview_height", "600")), | ||
| 25 | resizable : "yes", | ||
| 26 | scrollbars : "yes", | ||
| 27 | popup_css : css ? css.join(',') : ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css"), | ||
| 28 | inline : ed.getParam("plugin_preview_inline", 1) | ||
| 29 | }, { | ||
| 30 | base : ed.documentBaseURI.getURI() | ||
| 31 | }); | ||
| 32 | }); | ||
| 33 | |||
| 34 | ed.addButton('preview', {title : 'preview.preview_desc', cmd : 'mcePreview'}); | ||
| 35 | }, | ||
| 36 | |||
| 37 | getInfo : function() { | ||
| 38 | return { | ||
| 39 | longname : 'Preview', | ||
| 40 | author : 'Moxiecode Systems AB', | ||
| 41 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 42 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview', | ||
| 43 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 44 | }; | ||
| 45 | } | ||
| 46 | }); | ||
| 47 | |||
| 48 | // Register plugin | ||
| 49 | tinymce.PluginManager.add('preview', tinymce.plugins.Preview); | ||
| 50 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/preview/example.html b/public/javascripts/tiny_mce/plugins/preview/example.html deleted file mode 100644 index b2c3d90..0000000 --- a/public/javascripts/tiny_mce/plugins/preview/example.html +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 2 | <head> | ||
| 3 | <script language="javascript" src="../../tiny_mce_popup.js"></script> | ||
| 4 | <script type="text/javascript" src="jscripts/embed.js"></script> | ||
| 5 | <script type="text/javascript"> | ||
| 6 | tinyMCEPopup.onInit.add(function(ed) { | ||
| 7 | var dom = tinyMCEPopup.dom; | ||
| 8 | |||
| 9 | // Load editor content_css | ||
| 10 | tinymce.each(ed.settings.content_css.split(','), function(u) { | ||
| 11 | dom.loadCSS(ed.documentBaseURI.toAbsolute(u)); | ||
| 12 | }); | ||
| 13 | |||
| 14 | // Place contents inside div container | ||
| 15 | dom.setHTML('content', ed.getContent()); | ||
| 16 | }); | ||
| 17 | </script> | ||
| 18 | <title>Example of a custom preview page</title> | ||
| 19 | </head> | ||
| 20 | <body> | ||
| 21 | |||
| 22 | Editor contents: <br /> | ||
| 23 | <div id="content"> | ||
| 24 | <!-- Gets filled with editor contents --> | ||
| 25 | </div> | ||
| 26 | |||
| 27 | </body> | ||
| 28 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/preview/jscripts/embed.js b/public/javascripts/tiny_mce/plugins/preview/jscripts/embed.js deleted file mode 100644 index f8dc810..0000000 --- a/public/javascripts/tiny_mce/plugins/preview/jscripts/embed.js +++ /dev/null | |||
| @@ -1,73 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose. | ||
| 3 | */ | ||
| 4 | |||
| 5 | function writeFlash(p) { | ||
| 6 | writeEmbed( | ||
| 7 | 'D27CDB6E-AE6D-11cf-96B8-444553540000', | ||
| 8 | 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', | ||
| 9 | 'application/x-shockwave-flash', | ||
| 10 | p | ||
| 11 | ); | ||
| 12 | } | ||
| 13 | |||
| 14 | function writeShockWave(p) { | ||
| 15 | writeEmbed( | ||
| 16 | '166B1BCA-3F9C-11CF-8075-444553540000', | ||
| 17 | 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0', | ||
| 18 | 'application/x-director', | ||
| 19 | p | ||
| 20 | ); | ||
| 21 | } | ||
| 22 | |||
| 23 | function writeQuickTime(p) { | ||
| 24 | writeEmbed( | ||
| 25 | '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B', | ||
| 26 | 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0', | ||
| 27 | 'video/quicktime', | ||
| 28 | p | ||
| 29 | ); | ||
| 30 | } | ||
| 31 | |||
| 32 | function writeRealMedia(p) { | ||
| 33 | writeEmbed( | ||
| 34 | 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA', | ||
| 35 | 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', | ||
| 36 | 'audio/x-pn-realaudio-plugin', | ||
| 37 | p | ||
| 38 | ); | ||
| 39 | } | ||
| 40 | |||
| 41 | function writeWindowsMedia(p) { | ||
| 42 | p.url = p.src; | ||
| 43 | writeEmbed( | ||
| 44 | '6BF52A52-394A-11D3-B153-00C04F79FAA6', | ||
| 45 | 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701', | ||
| 46 | 'application/x-mplayer2', | ||
| 47 | p | ||
| 48 | ); | ||
| 49 | } | ||
| 50 | |||
| 51 | function writeEmbed(cls, cb, mt, p) { | ||
| 52 | var h = '', n; | ||
| 53 | |||
| 54 | h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"'; | ||
| 55 | h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : ''; | ||
| 56 | h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : ''; | ||
| 57 | h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : ''; | ||
| 58 | h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : ''; | ||
| 59 | h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : ''; | ||
| 60 | h += '>'; | ||
| 61 | |||
| 62 | for (n in p) | ||
| 63 | h += '<param name="' + n + '" value="' + p[n] + '">'; | ||
| 64 | |||
| 65 | h += '<embed type="' + mt + '"'; | ||
| 66 | |||
| 67 | for (n in p) | ||
| 68 | h += n + '="' + p[n] + '" '; | ||
| 69 | |||
| 70 | h += '></embed></object>'; | ||
| 71 | |||
| 72 | document.write(h); | ||
| 73 | } | ||
diff --git a/public/javascripts/tiny_mce/plugins/preview/preview.html b/public/javascripts/tiny_mce/plugins/preview/preview.html deleted file mode 100644 index 67e7b14..0000000 --- a/public/javascripts/tiny_mce/plugins/preview/preview.html +++ /dev/null | |||
| @@ -1,17 +0,0 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 5 | <script type="text/javascript" src="jscripts/embed.js"></script> | ||
| 6 | <script type="text/javascript"><!-- | ||
| 7 | document.write('<base href="' + tinyMCEPopup.getWindowArg("base") + '">'); | ||
| 8 | // --> | ||
| 9 | </script> | ||
| 10 | <title>{#preview.preview_desc}</title> | ||
| 11 | </head> | ||
| 12 | <body id="content"> | ||
| 13 | <script type="text/javascript"> | ||
| 14 | document.write(tinyMCEPopup.editor.getContent()); | ||
| 15 | </script> | ||
| 16 | </body> | ||
| 17 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/print/editor_plugin.js b/public/javascripts/tiny_mce/plugins/print/editor_plugin.js deleted file mode 100644 index b5b3a55..0000000 --- a/public/javascripts/tiny_mce/plugins/print/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.Print",{init:function(a,b){a.addCommand("mcePrint",function(){a.getWin().print()});a.addButton("print",{title:"print.print_desc",cmd:"mcePrint"})},getInfo:function(){return{longname:"Print",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("print",tinymce.plugins.Print)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/print/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/print/editor_plugin_src.js deleted file mode 100644 index 51fe156..0000000 --- a/public/javascripts/tiny_mce/plugins/print/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.Print', { | ||
| 10 | init : function(ed, url) { | ||
| 11 | ed.addCommand('mcePrint', function() { | ||
| 12 | ed.getWin().print(); | ||
| 13 | }); | ||
| 14 | |||
| 15 | ed.addButton('print', {title : 'print.print_desc', cmd : 'mcePrint'}); | ||
| 16 | }, | ||
| 17 | |||
| 18 | getInfo : function() { | ||
| 19 | return { | ||
| 20 | longname : 'Print', | ||
| 21 | author : 'Moxiecode Systems AB', | ||
| 22 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 23 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print', | ||
| 24 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 25 | }; | ||
| 26 | } | ||
| 27 | }); | ||
| 28 | |||
| 29 | // Register plugin | ||
| 30 | tinymce.PluginManager.add('print', tinymce.plugins.Print); | ||
| 31 | })(); | ||
diff --git a/public/javascripts/tiny_mce/plugins/safari/blank.htm b/public/javascripts/tiny_mce/plugins/safari/blank.htm deleted file mode 100644 index 266808c..0000000 --- a/public/javascripts/tiny_mce/plugins/safari/blank.htm +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | <!-- WebKit --> \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/safari/editor_plugin.js b/public/javascripts/tiny_mce/plugins/safari/editor_plugin.js deleted file mode 100644 index 794477c..0000000 --- a/public/javascripts/tiny_mce/plugins/safari/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){var a=tinymce.dom.Event,c=tinymce.grep,d=tinymce.each,b=tinymce.inArray;function e(j,i,h){var g,k;g=j.createTreeWalker(i,NodeFilter.SHOW_ALL,null,false);while(k=g.nextNode()){if(h){if(!h(k)){return false}}if(k.nodeType==3&&k.nodeValue&&/[^\s\u00a0]+/.test(k.nodeValue)){return false}if(k.nodeType==1&&/^(HR|IMG|TABLE)$/.test(k.nodeName)){return false}}return true}tinymce.create("tinymce.plugins.Safari",{init:function(f){var g=this,h;if(!tinymce.isWebKit){return}g.editor=f;g.webKitFontSizes=["x-small","small","medium","large","x-large","xx-large","-webkit-xxx-large"];g.namedFontSizes=["xx-small","x-small","small","medium","large","x-large","xx-large"];f.addCommand("CreateLink",function(k,j){var m=f.selection.getNode(),l=f.dom,i;if(m&&(/^(left|right)$/i.test(l.getStyle(m,"float",1))||/^(left|right)$/i.test(l.getAttrib(m,"align")))){i=l.create("a",{href:j},m.cloneNode());m.parentNode.replaceChild(i,m);f.selection.select(i)}else{f.getDoc().execCommand("CreateLink",false,j)}});f.onKeyUp.add(function(j,o){var l,i,m,p,k;if(o.keyCode==46||o.keyCode==8){i=j.getBody();l=i.innerHTML;k=j.selection;if(i.childNodes.length==1&&!/<(img|hr)/.test(l)&&tinymce.trim(l.replace(/<[^>]+>/g,"")).length==0){j.setContent('<p><br mce_bogus="1" /></p>',{format:"raw"});p=i.firstChild;m=k.getRng();m.setStart(p,0);m.setEnd(p,0);k.setRng(m)}}});f.addCommand("FormatBlock",function(j,i){var l=f.dom,k=l.getParent(f.selection.getNode(),l.isBlock);if(k){l.replace(l.create(i),k,1)}else{f.getDoc().execCommand("FormatBlock",false,i)}});f.addCommand("mceInsertContent",function(j,i){f.getDoc().execCommand("InsertText",false,"mce_marker");f.getBody().innerHTML=f.getBody().innerHTML.replace(/mce_marker/g,f.dom.processHTML(i)+'<span id="_mce_tmp">XX</span>');f.selection.select(f.dom.get("_mce_tmp"));f.getDoc().execCommand("Delete",false," ")});f.onKeyPress.add(function(o,p){var q,v,r,l,j,k,i,u,m,t,s;if(p.keyCode==13){i=o.selection;q=i.getNode();if(p.shiftKey||o.settings.force_br_newlines&&q.nodeName!="LI"){g._insertBR(o);a.cancel(p)}if(v=h.getParent(q,"LI")){r=h.getParent(v,"OL,UL");u=o.getDoc();s=h.create("p");h.add(s,"br",{mce_bogus:"1"});if(e(u,v)){if(k=h.getParent(r.parentNode,"LI,OL,UL")){return}k=h.getParent(r,"p,h1,h2,h3,h4,h5,h6,div")||r;l=u.createRange();l.setStartBefore(k);l.setEndBefore(v);j=u.createRange();j.setStartAfter(v);j.setEndAfter(k);m=l.cloneContents();t=j.cloneContents();if(!e(u,t)){h.insertAfter(t,k)}h.insertAfter(s,k);if(!e(u,m)){h.insertAfter(m,k)}h.remove(k);k=s.firstChild;l=u.createRange();l.setStartBefore(k);l.setEndBefore(k);i.setRng(l);return a.cancel(p)}}}});f.onExecCommand.add(function(i,k){var j,m,n,l;if(k=="InsertUnorderedList"||k=="InsertOrderedList"){j=i.selection;m=i.dom;if(n=m.getParent(j.getNode(),function(o){return/^(H[1-6]|P|ADDRESS|PRE)$/.test(o.nodeName)})){l=j.getBookmark();m.remove(n,1);j.moveToBookmark(l)}}});f.onClick.add(function(i,j){j=j.target;if(j.nodeName=="IMG"){g.selElm=j;i.selection.select(j)}else{g.selElm=null}});f.onInit.add(function(){g._fixWebKitSpans()});f.onSetContent.add(function(){h=f.dom;d(["strong","b","em","u","strike","sub","sup","a"],function(i){d(c(h.select(i)).reverse(),function(l){var k=l.nodeName.toLowerCase(),j;if(k=="a"){if(l.name){h.replace(h.create("img",{mce_name:"a",name:l.name,"class":"mceItemAnchor"}),l)}return}switch(k){case"b":case"strong":if(k=="b"){k="strong"}j="font-weight: bold;";break;case"em":j="font-style: italic;";break;case"u":j="text-decoration: underline;";break;case"sub":j="vertical-align: sub;";break;case"sup":j="vertical-align: super;";break;case"strike":j="text-decoration: line-through;";break}h.replace(h.create("span",{mce_name:k,style:j,"class":"Apple-style-span"}),l,1)})})});f.onPreProcess.add(function(i,j){h=i.dom;d(c(j.node.getElementsByTagName("span")).reverse(),function(m){var k,l;if(j.get){if(h.hasClass(m,"Apple-style-span")){l=m.style.backgroundColor;switch(h.getAttrib(m,"mce_name")){case"font":if(!i.settings.convert_fonts_to_spans){h.setAttrib(m,"style","")}break;case"strong":case"em":case"sub":case"sup":h.setAttrib(m,"style","");break;case"strike":case"u":if(!i.settings.inline_styles){h.setAttrib(m,"style","")}else{h.setAttrib(m,"mce_name","")}break;default:if(!i.settings.inline_styles){h.setAttrib(m,"style","")}}if(l){m.style.backgroundColor=l}}}if(h.hasClass(m,"mceItemRemoved")){h.remove(m,1)}})});f.onPostProcess.add(function(i,j){j.content=j.content.replace(/<br \/><\/(h[1-6]|div|p|address|pre)>/g,"</$1>");j.content=j.content.replace(/ id=\"undefined\"/g,"")})},getInfo:function(){return{longname:"Safari compatibility",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/safari",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_fixWebKitSpans:function(){var g=this,f=g.editor;a.add(f.getDoc(),"DOMNodeInserted",function(h){h=h.target;if(h&&h.nodeType==1){g._fixAppleSpan(h)}})},_fixAppleSpan:function(l){var g=this.editor,m=g.dom,i=this.webKitFontSizes,f=this.namedFontSizes,j=g.settings,h,k;if(m.getAttrib(l,"mce_fixed")){return}if(l.nodeName=="SPAN"&&l.className=="Apple-style-span"){h=l.style;if(!j.convert_fonts_to_spans){if(h.fontSize){m.setAttrib(l,"mce_name","font");m.setAttrib(l,"size",b(i,h.fontSize)+1)}if(h.fontFamily){m.setAttrib(l,"mce_name","font");m.setAttrib(l,"face",h.fontFamily)}if(h.color){m.setAttrib(l,"mce_name","font");m.setAttrib(l,"color",m.toHex(h.color))}if(h.backgroundColor){m.setAttrib(l,"mce_name","font");m.setStyle(l,"background-color",h.backgroundColor)}}else{if(h.fontSize){m.setStyle(l,"fontSize",f[b(i,h.fontSize)])}}if(h.fontWeight=="bold"){m.setAttrib(l,"mce_name","strong")}if(h.fontStyle=="italic"){m.setAttrib(l,"mce_name","em")}if(h.textDecoration=="underline"){m.setAttrib(l,"mce_name","u")}if(h.textDecoration=="line-through"){m.setAttrib(l,"mce_name","strike")}if(h.verticalAlign=="super"){m.setAttrib(l,"mce_name","sup")}if(h.verticalAlign=="sub"){m.setAttrib(l,"mce_name","sub")}m.setAttrib(l,"mce_fixed","1")}},_insertBR:function(f){var j=f.dom,h=f.selection,i=h.getRng(),g;i.insertNode(g=j.create("br"));i.setStartAfter(g);i.setEndAfter(g);h.setRng(i);if(h.getSel().focusNode==g.previousSibling){h.select(j.insertAfter(j.doc.createTextNode("\u00a0"),g));h.collapse(1)}f.getWin().scrollTo(0,j.getPos(h.getRng().startContainer).y)}});tinymce.PluginManager.add("safari",tinymce.plugins.Safari)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/safari/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/safari/editor_plugin_src.js deleted file mode 100644 index 6667b7c..0000000 --- a/public/javascripts/tiny_mce/plugins/safari/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,438 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 264 2007-04-26 20:53:09Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | var Event = tinymce.dom.Event, grep = tinymce.grep, each = tinymce.each, inArray = tinymce.inArray; | ||
| 10 | |||
| 11 | function isEmpty(d, e, f) { | ||
| 12 | var w, n; | ||
| 13 | |||
| 14 | w = d.createTreeWalker(e, NodeFilter.SHOW_ALL, null, false); | ||
| 15 | while (n = w.nextNode()) { | ||
| 16 | // Filter func | ||
| 17 | if (f) { | ||
| 18 | if (!f(n)) | ||
| 19 | return false; | ||
| 20 | } | ||
| 21 | |||
| 22 | // Non whitespace text node | ||
| 23 | if (n.nodeType == 3 && n.nodeValue && /[^\s\u00a0]+/.test(n.nodeValue)) | ||
| 24 | return false; | ||
| 25 | |||
| 26 | // Is non text element byt still content | ||
| 27 | if (n.nodeType == 1 && /^(HR|IMG|TABLE)$/.test(n.nodeName)) | ||
| 28 | return false; | ||
| 29 | } | ||
| 30 | |||
| 31 | return true; | ||
| 32 | }; | ||
| 33 | |||
| 34 | tinymce.create('tinymce.plugins.Safari', { | ||
| 35 | init : function(ed) { | ||
| 36 | var t = this, dom; | ||
| 37 | |||
| 38 | // Ignore on non webkit | ||
| 39 | if (!tinymce.isWebKit) | ||
| 40 | return; | ||
| 41 | |||
| 42 | t.editor = ed; | ||
| 43 | t.webKitFontSizes = ['x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', '-webkit-xxx-large']; | ||
| 44 | t.namedFontSizes = ['xx-small', 'x-small','small','medium','large','x-large', 'xx-large']; | ||
| 45 | |||
| 46 | // Safari CreateLink command will not work correctly on images that is aligned | ||
| 47 | ed.addCommand('CreateLink', function(u, v) { | ||
| 48 | var n = ed.selection.getNode(), dom = ed.dom, a; | ||
| 49 | |||
| 50 | if (n && (/^(left|right)$/i.test(dom.getStyle(n, 'float', 1)) || /^(left|right)$/i.test(dom.getAttrib(n, 'align')))) { | ||
| 51 | a = dom.create('a', {href : v}, n.cloneNode()); | ||
| 52 | n.parentNode.replaceChild(a, n); | ||
| 53 | ed.selection.select(a); | ||
| 54 | } else | ||
| 55 | ed.getDoc().execCommand("CreateLink", false, v); | ||
| 56 | }); | ||
| 57 | |||
| 58 | /* | ||
| 59 | // WebKit generates spans out of thin air this patch used to remove them but it will also remove styles we want so it's disabled for now | ||
| 60 | ed.onPaste.add(function(ed, e) { | ||
| 61 | function removeStyles(e) { | ||
| 62 | e = e.target; | ||
| 63 | |||
| 64 | if (e.nodeType == 1) { | ||
| 65 | e.style.cssText = ''; | ||
| 66 | |||
| 67 | each(ed.dom.select('*', e), function(e) { | ||
| 68 | e.style.cssText = ''; | ||
| 69 | }); | ||
| 70 | } | ||
| 71 | }; | ||
| 72 | |||
| 73 | Event.add(ed.getDoc(), 'DOMNodeInserted', removeStyles); | ||
| 74 | |||
| 75 | window.setTimeout(function() { | ||
| 76 | Event.remove(ed.getDoc(), 'DOMNodeInserted', removeStyles); | ||
| 77 | }, 0); | ||
| 78 | }); | ||
| 79 | */ | ||
| 80 | ed.onKeyUp.add(function(ed, e) { | ||
| 81 | var h, b, r, n, s; | ||
| 82 | |||
| 83 | // If backspace or delete key | ||
| 84 | if (e.keyCode == 46 || e.keyCode == 8) { | ||
| 85 | b = ed.getBody(); | ||
| 86 | h = b.innerHTML; | ||
| 87 | s = ed.selection; | ||
| 88 | |||
| 89 | // If there is no text content or images or hr elements then remove everything | ||
| 90 | if (b.childNodes.length == 1 && !/<(img|hr)/.test(h) && tinymce.trim(h.replace(/<[^>]+>/g, '')).length == 0) { | ||
| 91 | // Inject paragrah and bogus br | ||
| 92 | ed.setContent('<p><br mce_bogus="1" /></p>', {format : 'raw'}); | ||
| 93 | |||
| 94 | // Move caret before bogus br | ||
| 95 | n = b.firstChild; | ||
| 96 | r = s.getRng(); | ||
| 97 | r.setStart(n, 0); | ||
| 98 | r.setEnd(n, 0); | ||
| 99 | s.setRng(r); | ||
| 100 | } | ||
| 101 | } | ||
| 102 | }); | ||
| 103 | |||
| 104 | // Workaround for FormatBlock bug, http://bugs.webkit.org/show_bug.cgi?id=16004 | ||
| 105 | ed.addCommand('FormatBlock', function(u, v) { | ||
| 106 | var dom = ed.dom, e = dom.getParent(ed.selection.getNode(), dom.isBlock); | ||
| 107 | |||
| 108 | if (e) | ||
| 109 | dom.replace(dom.create(v), e, 1); | ||
| 110 | else | ||
| 111 | ed.getDoc().execCommand("FormatBlock", false, v); | ||
| 112 | }); | ||
| 113 | |||
| 114 | // Workaround for InsertHTML bug, http://bugs.webkit.org/show_bug.cgi?id=16382 | ||
| 115 | ed.addCommand('mceInsertContent', function(u, v) { | ||
| 116 | ed.getDoc().execCommand("InsertText", false, 'mce_marker'); | ||
| 117 | ed.getBody().innerHTML = ed.getBody().innerHTML.replace(/mce_marker/g, ed.dom.processHTML(v) + '<span id="_mce_tmp">XX</span>'); | ||
| 118 | ed.selection.select(ed.dom.get('_mce_tmp')); | ||
| 119 | ed.getDoc().execCommand("Delete", false, ' '); | ||
| 120 | }); | ||
| 121 | |||
| 122 | /* ed.onKeyDown.add(function(ed, e) { | ||
| 123 | // Ctrl+A select all will fail on WebKit since if you paste the contents you selected it will produce a odd div wrapper | ||
| 124 | if ((e.ctrlKey || e.metaKey) && e.keyCode == 65) { | ||
| 125 | ed.selection.select(ed.getBody(), 1); | ||
| 126 | return Event.cancel(e); | ||
| 127 | } | ||
| 128 | });*/ | ||
| 129 | |||
| 130 | ed.onKeyPress.add(function(ed, e) { | ||
| 131 | var se, li, lic, r1, r2, n, sel, doc, be, af, pa; | ||
| 132 | |||
| 133 | if (e.keyCode == 13) { | ||
| 134 | sel = ed.selection; | ||
| 135 | se = sel.getNode(); | ||
| 136 | |||
| 137 | // Workaround for missing shift+enter support, http://bugs.webkit.org/show_bug.cgi?id=16973 | ||
| 138 | if (e.shiftKey || ed.settings.force_br_newlines && se.nodeName != 'LI') { | ||
| 139 | t._insertBR(ed); | ||
| 140 | Event.cancel(e); | ||
| 141 | } | ||
| 142 | |||
| 143 | // Workaround for DIV elements produced by Safari | ||
| 144 | if (li = dom.getParent(se, 'LI')) { | ||
| 145 | lic = dom.getParent(li, 'OL,UL'); | ||
| 146 | doc = ed.getDoc(); | ||
| 147 | |||
| 148 | pa = dom.create('p'); | ||
| 149 | dom.add(pa, 'br', {mce_bogus : "1"}); | ||
| 150 | |||
| 151 | if (isEmpty(doc, li)) { | ||
| 152 | // If list in list then use browser default behavior | ||
| 153 | if (n = dom.getParent(lic.parentNode, 'LI,OL,UL')) | ||
| 154 | return; | ||
| 155 | |||
| 156 | n = dom.getParent(lic, 'p,h1,h2,h3,h4,h5,h6,div') || lic; | ||
| 157 | |||
| 158 | // Create range from the start of block element to the list item | ||
| 159 | r1 = doc.createRange(); | ||
| 160 | r1.setStartBefore(n); | ||
| 161 | r1.setEndBefore(li); | ||
| 162 | |||
| 163 | // Create range after the list to the end of block element | ||
| 164 | r2 = doc.createRange(); | ||
| 165 | r2.setStartAfter(li); | ||
| 166 | r2.setEndAfter(n); | ||
| 167 | |||
| 168 | be = r1.cloneContents(); | ||
| 169 | af = r2.cloneContents(); | ||
| 170 | |||
| 171 | if (!isEmpty(doc, af)) | ||
| 172 | dom.insertAfter(af, n); | ||
| 173 | |||
| 174 | dom.insertAfter(pa, n); | ||
| 175 | |||
| 176 | if (!isEmpty(doc, be)) | ||
| 177 | dom.insertAfter(be, n); | ||
| 178 | |||
| 179 | dom.remove(n); | ||
| 180 | |||
| 181 | n = pa.firstChild; | ||
| 182 | r1 = doc.createRange(); | ||
| 183 | r1.setStartBefore(n); | ||
| 184 | r1.setEndBefore(n); | ||
| 185 | sel.setRng(r1); | ||
| 186 | |||
| 187 | return Event.cancel(e); | ||
| 188 | } | ||
| 189 | } | ||
| 190 | } | ||
| 191 | }); | ||
| 192 | |||
| 193 | // Safari doesn't place lists outside block elements | ||
| 194 | ed.onExecCommand.add(function(ed, cmd) { | ||
| 195 | var sel, dom, bl, bm; | ||
| 196 | |||
| 197 | if (cmd == 'InsertUnorderedList' || cmd == 'InsertOrderedList') { | ||
| 198 | sel = ed.selection; | ||
| 199 | dom = ed.dom; | ||
| 200 | |||
| 201 | if (bl = dom.getParent(sel.getNode(), function(n) {return /^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName);})) { | ||
| 202 | bm = sel.getBookmark(); | ||
| 203 | dom.remove(bl, 1); | ||
| 204 | sel.moveToBookmark(bm); | ||
| 205 | } | ||
| 206 | } | ||
| 207 | }); | ||
| 208 | |||
| 209 | // Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250 | ||
| 210 | ed.onClick.add(function(ed, e) { | ||
| 211 | e = e.target; | ||
| 212 | |||
| 213 | if (e.nodeName == 'IMG') { | ||
| 214 | t.selElm = e; | ||
| 215 | ed.selection.select(e); | ||
| 216 | } else | ||
| 217 | t.selElm = null; | ||
| 218 | }); | ||
| 219 | |||
| 220 | ed.onInit.add(function() { | ||
| 221 | t._fixWebKitSpans(); | ||
| 222 | }); | ||
| 223 | |||
| 224 | ed.onSetContent.add(function() { | ||
| 225 | dom = ed.dom; | ||
| 226 | |||
| 227 | // Convert strong,b,em,u,strike to spans | ||
| 228 | each(['strong','b','em','u','strike','sub','sup','a'], function(v) { | ||
| 229 | each(grep(dom.select(v)).reverse(), function(n) { | ||
| 230 | var nn = n.nodeName.toLowerCase(), st; | ||
| 231 | |||
| 232 | // Convert anchors into images | ||
| 233 | if (nn == 'a') { | ||
| 234 | if (n.name) | ||
| 235 | dom.replace(dom.create('img', {mce_name : 'a', name : n.name, 'class' : 'mceItemAnchor'}), n); | ||
| 236 | |||
| 237 | return; | ||
| 238 | } | ||
| 239 | |||
| 240 | switch (nn) { | ||
| 241 | case 'b': | ||
| 242 | case 'strong': | ||
| 243 | if (nn == 'b') | ||
| 244 | nn = 'strong'; | ||
| 245 | |||
| 246 | st = 'font-weight: bold;'; | ||
| 247 | break; | ||
| 248 | |||
| 249 | case 'em': | ||
| 250 | st = 'font-style: italic;'; | ||
| 251 | break; | ||
| 252 | |||
| 253 | case 'u': | ||
| 254 | st = 'text-decoration: underline;'; | ||
| 255 | break; | ||
| 256 | |||
| 257 | case 'sub': | ||
| 258 | st = 'vertical-align: sub;'; | ||
| 259 | break; | ||
| 260 | |||
| 261 | case 'sup': | ||
| 262 | st = 'vertical-align: super;'; | ||
| 263 | break; | ||
| 264 | |||
| 265 | case 'strike': | ||
| 266 | st = 'text-decoration: line-through;'; | ||
| 267 | break; | ||
| 268 | } | ||
| 269 | |||
| 270 | dom.replace(dom.create('span', {mce_name : nn, style : st, 'class' : 'Apple-style-span'}), n, 1); | ||
| 271 | }); | ||
| 272 | }); | ||
| 273 | }); | ||
| 274 | |||
| 275 | ed.onPreProcess.add(function(ed, o) { | ||
| 276 | dom = ed.dom; | ||
| 277 | |||
| 278 | each(grep(o.node.getElementsByTagName('span')).reverse(), function(n) { | ||
| 279 | var v, bg; | ||
| 280 | |||
| 281 | if (o.get) { | ||
| 282 | if (dom.hasClass(n, 'Apple-style-span')) { | ||
| 283 | bg = n.style.backgroundColor; | ||
| 284 | |||
| 285 | switch (dom.getAttrib(n, 'mce_name')) { | ||
| 286 | case 'font': | ||
| 287 | if (!ed.settings.convert_fonts_to_spans) | ||
| 288 | dom.setAttrib(n, 'style', ''); | ||
| 289 | break; | ||
| 290 | |||
| 291 | case 'strong': | ||
| 292 | case 'em': | ||
| 293 | case 'sub': | ||
| 294 | case 'sup': | ||
| 295 | dom.setAttrib(n, 'style', ''); | ||
| 296 | break; | ||
| 297 | |||
| 298 | case 'strike': | ||
| 299 | case 'u': | ||
| 300 | if (!ed.settings.inline_styles) | ||
| 301 | dom.setAttrib(n, 'style', ''); | ||
| 302 | else | ||
| 303 | dom.setAttrib(n, 'mce_name', ''); | ||
| 304 | |||
| 305 | break; | ||
| 306 | |||
| 307 | default: | ||
| 308 | if (!ed.settings.inline_styles) | ||
| 309 | dom.setAttrib(n, 'style', ''); | ||
| 310 | } | ||
| 311 | |||
| 312 | |||
| 313 | if (bg) | ||
| 314 | n.style.backgroundColor = bg; | ||
| 315 | } | ||
| 316 | } | ||
| 317 | |||
| 318 | if (dom.hasClass(n, 'mceItemRemoved')) | ||
| 319 | dom.remove(n, 1); | ||
| 320 | }); | ||
| 321 | }); | ||
| 322 | |||
| 323 | ed.onPostProcess.add(function(ed, o) { | ||
| 324 | // Safari adds BR at end of all block elements | ||
| 325 | o.content = o.content.replace(/<br \/><\/(h[1-6]|div|p|address|pre)>/g, '</$1>'); | ||
| 326 | |||
| 327 | // Safari adds id="undefined" to HR elements | ||
| 328 | o.content = o.content.replace(/ id=\"undefined\"/g, ''); | ||
| 329 | }); | ||
| 330 | }, | ||
| 331 | |||
| 332 | getInfo : function() { | ||
| 333 | return { | ||
| 334 | longname : 'Safari compatibility', | ||
| 335 | author : 'Moxiecode Systems AB', | ||
| 336 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 337 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/safari', | ||
| 338 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 339 | }; | ||
| 340 | }, | ||
| 341 | |||
| 342 | // Internal methods | ||
| 343 | |||
| 344 | _fixWebKitSpans : function() { | ||
| 345 | var t = this, ed = t.editor; | ||
| 346 | |||
| 347 | // Use mutator events on new WebKit | ||
| 348 | Event.add(ed.getDoc(), 'DOMNodeInserted', function(e) { | ||
| 349 | e = e.target; | ||
| 350 | |||
| 351 | if (e && e.nodeType == 1) | ||
| 352 | t._fixAppleSpan(e); | ||
| 353 | }); | ||
| 354 | }, | ||
| 355 | |||
| 356 | _fixAppleSpan : function(e) { | ||
| 357 | var ed = this.editor, dom = ed.dom, fz = this.webKitFontSizes, fzn = this.namedFontSizes, s = ed.settings, st, p; | ||
| 358 | |||
| 359 | if (dom.getAttrib(e, 'mce_fixed')) | ||
| 360 | return; | ||
| 361 | |||
| 362 | // Handle Apple style spans | ||
| 363 | if (e.nodeName == 'SPAN' && e.className == 'Apple-style-span') { | ||
| 364 | st = e.style; | ||
| 365 | |||
| 366 | if (!s.convert_fonts_to_spans) { | ||
| 367 | if (st.fontSize) { | ||
| 368 | dom.setAttrib(e, 'mce_name', 'font'); | ||
| 369 | dom.setAttrib(e, 'size', inArray(fz, st.fontSize) + 1); | ||
| 370 | } | ||
| 371 | |||
| 372 | if (st.fontFamily) { | ||
| 373 | dom.setAttrib(e, 'mce_name', 'font'); | ||
| 374 | dom.setAttrib(e, 'face', st.fontFamily); | ||
| 375 | } | ||
| 376 | |||
| 377 | if (st.color) { | ||
| 378 | dom.setAttrib(e, 'mce_name', 'font'); | ||
| 379 | dom.setAttrib(e, 'color', dom.toHex(st.color)); | ||
| 380 | } | ||
| 381 | |||
| 382 | if (st.backgroundColor) { | ||
| 383 | dom.setAttrib(e, 'mce_name', 'font'); | ||
| 384 | dom.setStyle(e, 'background-color', st.backgroundColor); | ||
| 385 | } | ||
| 386 | } else { | ||
| 387 | if (st.fontSize) | ||
| 388 | dom.setStyle(e, 'fontSize', fzn[inArray(fz, st.fontSize)]); | ||
| 389 | } | ||
| 390 | |||
| 391 | if (st.fontWeight == 'bold') | ||
| 392 | dom.setAttrib(e, 'mce_name', 'strong'); | ||
| 393 | |||
| 394 | if (st.fontStyle == 'italic') | ||
| 395 | dom.setAttrib(e, 'mce_name', 'em'); | ||
| 396 | |||
| 397 | if (st.textDecoration == 'underline') | ||
| 398 | dom.setAttrib(e, 'mce_name', 'u'); | ||
| 399 | |||
| 400 | if (st.textDecoration == 'line-through') | ||
| 401 | dom.setAttrib(e, 'mce_name', 'strike'); | ||
| 402 | |||
| 403 | if (st.verticalAlign == 'super') | ||
| 404 | dom.setAttrib(e, 'mce_name', 'sup'); | ||
| 405 | |||
| 406 | if (st.verticalAlign == 'sub') | ||
| 407 | dom.setAttrib(e, 'mce_name', 'sub'); | ||
| 408 | |||
| 409 | dom.setAttrib(e, 'mce_fixed', '1'); | ||
| 410 | } | ||
| 411 | }, | ||
| 412 | |||
| 413 | _insertBR : function(ed) { | ||
| 414 | var dom = ed.dom, s = ed.selection, r = s.getRng(), br; | ||
| 415 | |||
| 416 | // Insert BR element | ||
| 417 | r.insertNode(br = dom.create('br')); | ||
| 418 | |||
| 419 | // Place caret after BR | ||
| 420 | r.setStartAfter(br); | ||
| 421 | r.setEndAfter(br); | ||
| 422 | s.setRng(r); | ||
| 423 | |||
| 424 | // Could not place caret after BR then insert an nbsp entity and move the caret | ||
| 425 | if (s.getSel().focusNode == br.previousSibling) { | ||
| 426 | s.select(dom.insertAfter(dom.doc.createTextNode('\u00a0'), br)); | ||
| 427 | s.collapse(1); | ||
| 428 | } | ||
| 429 | |||
| 430 | // Scroll to new position, scrollIntoView can't be used due to bug: http://bugs.webkit.org/show_bug.cgi?id=16117 | ||
| 431 | ed.getWin().scrollTo(0, dom.getPos(s.getRng().startContainer).y); | ||
| 432 | } | ||
| 433 | }); | ||
| 434 | |||
| 435 | // Register plugin | ||
| 436 | tinymce.PluginManager.add('safari', tinymce.plugins.Safari); | ||
| 437 | })(); | ||
| 438 | |||
diff --git a/public/javascripts/tiny_mce/plugins/save/editor_plugin.js b/public/javascripts/tiny_mce/plugins/save/editor_plugin.js deleted file mode 100644 index 8e93996..0000000 --- a/public/javascripts/tiny_mce/plugins/save/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.Save",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceSave",c._save,c);a.addCommand("mceCancel",c._cancel,c);a.addButton("save",{title:"save.save_desc",cmd:"mceSave"});a.addButton("cancel",{title:"save.cancel_desc",cmd:"mceCancel"});a.onNodeChange.add(c._nodeChange,c);a.addShortcut("ctrl+s",a.getLang("save.save_desc"),"mceSave")},getInfo:function(){return{longname:"Save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,c){var b=this.editor;if(b.getParam("save_enablewhendirty")){a.setDisabled("save",!b.isDirty());a.setDisabled("cancel",!b.isDirty())}},_save:function(){var c=this.editor,a,e,d,b;a=tinymce.DOM.get(c.id).form||tinymce.DOM.getParent(c.id,"form");if(c.getParam("save_enablewhendirty")&&!c.isDirty()){return}tinyMCE.triggerSave();if(e=c.getParam("save_onsavecallback")){if(c.execCallback("save_onsavecallback",c)){c.startContent=tinymce.trim(c.getContent({format:"raw"}));c.nodeChanged()}return}if(a){c.isNotDirty=true;if(a.onsubmit==null||a.onsubmit()!=false){a.submit()}c.nodeChanged()}else{c.windowManager.alert("Error: No form element found.")}},_cancel:function(){var a=this.editor,c,b=tinymce.trim(a.startContent);if(c=a.getParam("save_oncancelcallback")){a.execCallback("save_oncancelcallback",a);return}a.setContent(b);a.undoManager.clear();a.nodeChanged()}});tinymce.PluginManager.add("save",tinymce.plugins.Save)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/save/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/save/editor_plugin_src.js deleted file mode 100644 index b38be4d..0000000 --- a/public/javascripts/tiny_mce/plugins/save/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,98 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 851 2008-05-26 15:38:49Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.Save', { | ||
| 10 | init : function(ed, url) { | ||
| 11 | var t = this; | ||
| 12 | |||
| 13 | t.editor = ed; | ||
| 14 | |||
| 15 | // Register commands | ||
| 16 | ed.addCommand('mceSave', t._save, t); | ||
| 17 | ed.addCommand('mceCancel', t._cancel, t); | ||
| 18 | |||
| 19 | // Register buttons | ||
| 20 | ed.addButton('save', {title : 'save.save_desc', cmd : 'mceSave'}); | ||
| 21 | ed.addButton('cancel', {title : 'save.cancel_desc', cmd : 'mceCancel'}); | ||
| 22 | |||
| 23 | ed.onNodeChange.add(t._nodeChange, t); | ||
| 24 | ed.addShortcut('ctrl+s', ed.getLang('save.save_desc'), 'mceSave'); | ||
| 25 | }, | ||
| 26 | |||
| 27 | getInfo : function() { | ||
| 28 | return { | ||
| 29 | longname : 'Save', | ||
| 30 | author : 'Moxiecode Systems AB', | ||
| 31 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 32 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save', | ||
| 33 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 34 | }; | ||
| 35 | }, | ||
| 36 | |||
| 37 | // Private methods | ||
| 38 | |||
| 39 | _nodeChange : function(ed, cm, n) { | ||
| 40 | var ed = this.editor; | ||
| 41 | |||
| 42 | if (ed.getParam('save_enablewhendirty')) { | ||
| 43 | cm.setDisabled('save', !ed.isDirty()); | ||
| 44 | cm.setDisabled('cancel', !ed.isDirty()); | ||
| 45 | } | ||
| 46 | }, | ||
| 47 | |||
| 48 | // Private methods | ||
| 49 | |||
| 50 | _save : function() { | ||
| 51 | var ed = this.editor, formObj, os, i, elementId; | ||
| 52 | |||
| 53 | formObj = tinymce.DOM.get(ed.id).form || tinymce.DOM.getParent(ed.id, 'form'); | ||
| 54 | |||
| 55 | if (ed.getParam("save_enablewhendirty") && !ed.isDirty()) | ||
| 56 | return; | ||
| 57 | |||
| 58 | tinyMCE.triggerSave(); | ||
| 59 | |||
| 60 | // Use callback instead | ||
| 61 | if (os = ed.getParam("save_onsavecallback")) { | ||
| 62 | if (ed.execCallback('save_onsavecallback', ed)) { | ||
| 63 | ed.startContent = tinymce.trim(ed.getContent({format : 'raw'})); | ||
| 64 | ed.nodeChanged(); | ||
| 65 | } | ||
| 66 | |||
| 67 | return; | ||
| 68 | } | ||
| 69 | |||
| 70 | if (formObj) { | ||
| 71 | ed.isNotDirty = true; | ||
| 72 | |||
| 73 | if (formObj.onsubmit == null || formObj.onsubmit() != false) | ||
| 74 | formObj.submit(); | ||
| 75 | |||
| 76 | ed.nodeChanged(); | ||
| 77 | } else | ||
| 78 | ed.windowManager.alert("Error: No form element found."); | ||
| 79 | }, | ||
| 80 | |||
| 81 | _cancel : function() { | ||
| 82 | var ed = this.editor, os, h = tinymce.trim(ed.startContent); | ||
| 83 | |||
| 84 | // Use callback instead | ||
| 85 | if (os = ed.getParam("save_oncancelcallback")) { | ||
| 86 | ed.execCallback('save_oncancelcallback', ed); | ||
| 87 | return; | ||
| 88 | } | ||
| 89 | |||
| 90 | ed.setContent(h); | ||
| 91 | ed.undoManager.clear(); | ||
| 92 | ed.nodeChanged(); | ||
| 93 | } | ||
| 94 | }); | ||
| 95 | |||
| 96 | // Register plugin | ||
| 97 | tinymce.PluginManager.add('save', tinymce.plugins.Save); | ||
| 98 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css b/public/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css deleted file mode 100644 index ecdf58c..0000000 --- a/public/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | .panel_wrapper {height:85px;} | ||
| 2 | .panel_wrapper div.current {height:85px;} | ||
| 3 | |||
| 4 | /* IE */ | ||
| 5 | * html .panel_wrapper {height:100px;} | ||
| 6 | * html .panel_wrapper div.current {height:100px;} | ||
diff --git a/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js b/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js deleted file mode 100644 index c3f8358..0000000 --- a/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.SearchReplacePlugin",{init:function(a,c){function b(d){a.windowManager.open({file:c+"/searchreplace.htm",width:420+parseInt(a.getLang("searchreplace.delta_width",0)),height:160+parseInt(a.getLang("searchreplace.delta_height",0)),inline:1,auto_focus:0},{mode:d,search_string:a.selection.getContent({format:"text"}),plugin_url:c})}a.addCommand("mceSearch",function(){b("search")});a.addCommand("mceReplace",function(){b("replace")});a.addButton("search",{title:"searchreplace.search_desc",cmd:"mceSearch"});a.addButton("replace",{title:"searchreplace.replace_desc",cmd:"mceReplace"});a.addShortcut("ctrl+f","searchreplace.search_desc","mceSearch")},getInfo:function(){return{longname:"Search/Replace",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("searchreplace",tinymce.plugins.SearchReplacePlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js deleted file mode 100644 index 59edc3b..0000000 --- a/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,54 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 686 2008-03-09 18:13:49Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.SearchReplacePlugin', { | ||
| 10 | init : function(ed, url) { | ||
| 11 | function open(m) { | ||
| 12 | ed.windowManager.open({ | ||
| 13 | file : url + '/searchreplace.htm', | ||
| 14 | width : 420 + parseInt(ed.getLang('searchreplace.delta_width', 0)), | ||
| 15 | height : 160 + parseInt(ed.getLang('searchreplace.delta_height', 0)), | ||
| 16 | inline : 1, | ||
| 17 | auto_focus : 0 | ||
| 18 | }, { | ||
| 19 | mode : m, | ||
| 20 | search_string : ed.selection.getContent({format : 'text'}), | ||
| 21 | plugin_url : url | ||
| 22 | }); | ||
| 23 | }; | ||
| 24 | |||
| 25 | // Register commands | ||
| 26 | ed.addCommand('mceSearch', function() { | ||
| 27 | open('search'); | ||
| 28 | }); | ||
| 29 | |||
| 30 | ed.addCommand('mceReplace', function() { | ||
| 31 | open('replace'); | ||
| 32 | }); | ||
| 33 | |||
| 34 | // Register buttons | ||
| 35 | ed.addButton('search', {title : 'searchreplace.search_desc', cmd : 'mceSearch'}); | ||
| 36 | ed.addButton('replace', {title : 'searchreplace.replace_desc', cmd : 'mceReplace'}); | ||
| 37 | |||
| 38 | ed.addShortcut('ctrl+f', 'searchreplace.search_desc', 'mceSearch'); | ||
| 39 | }, | ||
| 40 | |||
| 41 | getInfo : function() { | ||
| 42 | return { | ||
| 43 | longname : 'Search/Replace', | ||
| 44 | author : 'Moxiecode Systems AB', | ||
| 45 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 46 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace', | ||
| 47 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 48 | }; | ||
| 49 | } | ||
| 50 | }); | ||
| 51 | |||
| 52 | // Register plugin | ||
| 53 | tinymce.PluginManager.add('searchreplace', tinymce.plugins.SearchReplacePlugin); | ||
| 54 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js b/public/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js deleted file mode 100644 index a8585cc..0000000 --- a/public/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js +++ /dev/null | |||
| @@ -1,126 +0,0 @@ | |||
| 1 | tinyMCEPopup.requireLangPack(); | ||
| 2 | |||
| 3 | var SearchReplaceDialog = { | ||
| 4 | init : function(ed) { | ||
| 5 | var f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode"); | ||
| 6 | |||
| 7 | this.switchMode(m); | ||
| 8 | |||
| 9 | f[m + '_panel_searchstring'].value = tinyMCEPopup.getWindowArg("search_string"); | ||
| 10 | |||
| 11 | // Focus input field | ||
| 12 | f[m + '_panel_searchstring'].focus(); | ||
| 13 | }, | ||
| 14 | |||
| 15 | switchMode : function(m) { | ||
| 16 | var f, lm = this.lastMode; | ||
| 17 | |||
| 18 | if (lm != m) { | ||
| 19 | f = document.forms[0]; | ||
| 20 | |||
| 21 | if (lm) { | ||
| 22 | f[m + '_panel_searchstring'].value = f[lm + '_panel_searchstring'].value; | ||
| 23 | f[m + '_panel_backwardsu'].checked = f[lm + '_panel_backwardsu'].checked; | ||
| 24 | f[m + '_panel_backwardsd'].checked = f[lm + '_panel_backwardsd'].checked; | ||
| 25 | f[m + '_panel_casesensitivebox'].checked = f[lm + '_panel_casesensitivebox'].checked; | ||
| 26 | } | ||
| 27 | |||
| 28 | mcTabs.displayTab(m + '_tab', m + '_panel'); | ||
| 29 | document.getElementById("replaceBtn").style.display = (m == "replace") ? "inline" : "none"; | ||
| 30 | document.getElementById("replaceAllBtn").style.display = (m == "replace") ? "inline" : "none"; | ||
| 31 | this.lastMode = m; | ||
| 32 | } | ||
| 33 | }, | ||
| 34 | |||
| 35 | searchNext : function(a) { | ||
| 36 | var ed = tinyMCEPopup.editor, se = ed.selection, r = se.getRng(), f, m = this.lastMode, s, b, fl = 0, w = ed.getWin(), wm = ed.windowManager, fo = 0; | ||
| 37 | |||
| 38 | // Get input | ||
| 39 | f = document.forms[0]; | ||
| 40 | s = f[m + '_panel_searchstring'].value; | ||
| 41 | b = f[m + '_panel_backwardsu'].checked; | ||
| 42 | ca = f[m + '_panel_casesensitivebox'].checked; | ||
| 43 | rs = f['replace_panel_replacestring'].value; | ||
| 44 | |||
| 45 | if (s == '') | ||
| 46 | return; | ||
| 47 | |||
| 48 | function fix() { | ||
| 49 | // Correct Firefox graphics glitches | ||
| 50 | r = se.getRng().cloneRange(); | ||
| 51 | ed.getDoc().execCommand('SelectAll', false, null); | ||
| 52 | se.setRng(r); | ||
| 53 | }; | ||
| 54 | |||
| 55 | function replace() { | ||
| 56 | if (tinymce.isIE) | ||
| 57 | ed.selection.getRng().duplicate().pasteHTML(rs); // Needs to be duplicated due to selection bug in IE | ||
| 58 | else | ||
| 59 | ed.getDoc().execCommand('InsertHTML', false, rs); | ||
| 60 | }; | ||
| 61 | |||
| 62 | // IE flags | ||
| 63 | if (ca) | ||
| 64 | fl = fl | 4; | ||
| 65 | |||
| 66 | switch (a) { | ||
| 67 | case 'all': | ||
| 68 | // Move caret to beginning of text | ||
| 69 | ed.execCommand('SelectAll'); | ||
| 70 | ed.selection.collapse(true); | ||
| 71 | |||
| 72 | if (tinymce.isIE) { | ||
| 73 | while (r.findText(s, b ? -1 : 1, fl)) { | ||
| 74 | r.scrollIntoView(); | ||
| 75 | r.select(); | ||
| 76 | replace(); | ||
| 77 | fo = 1; | ||
| 78 | } | ||
| 79 | |||
| 80 | tinyMCEPopup.storeSelection(); | ||
| 81 | } else { | ||
| 82 | while (w.find(s, ca, b, false, false, false, false)) { | ||
| 83 | replace(); | ||
| 84 | fo = 1; | ||
| 85 | } | ||
| 86 | } | ||
| 87 | |||
| 88 | if (fo) | ||
| 89 | tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.allreplaced')); | ||
| 90 | else | ||
| 91 | tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound')); | ||
| 92 | |||
| 93 | return; | ||
| 94 | |||
| 95 | case 'current': | ||
| 96 | if (!ed.selection.isCollapsed()) | ||
| 97 | replace(); | ||
| 98 | |||
| 99 | break; | ||
| 100 | } | ||
| 101 | |||
| 102 | se.collapse(b); | ||
| 103 | r = se.getRng(); | ||
| 104 | |||
| 105 | // Whats the point | ||
| 106 | if (!s) | ||
| 107 | return; | ||
| 108 | |||
| 109 | if (tinymce.isIE) { | ||
| 110 | if (r.findText(s, b ? -1 : 1, fl)) { | ||
| 111 | r.scrollIntoView(); | ||
| 112 | r.select(); | ||
| 113 | } else | ||
| 114 | tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound')); | ||
| 115 | |||
| 116 | tinyMCEPopup.storeSelection(); | ||
| 117 | } else { | ||
| 118 | if (!w.find(s, ca, b, false, false, false, false)) | ||
| 119 | tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound')); | ||
| 120 | else | ||
| 121 | fix(); | ||
| 122 | } | ||
| 123 | } | ||
| 124 | }; | ||
| 125 | |||
| 126 | tinyMCEPopup.onInit.add(SearchReplaceDialog.init, SearchReplaceDialog); | ||
diff --git a/public/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js deleted file mode 100644 index 370959a..0000000 --- a/public/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | tinyMCE.addI18n('en.searchreplace_dlg',{ | ||
| 2 | searchnext_desc:"Find again", | ||
| 3 | notfound:"The search has been completed. The search string could not be found.", | ||
| 4 | search_title:"Find", | ||
| 5 | replace_title:"Find/Replace", | ||
| 6 | allreplaced:"All occurrences of the search string were replaced.", | ||
| 7 | findwhat:"Find what", | ||
| 8 | replacewith:"Replace with", | ||
| 9 | direction:"Direction", | ||
| 10 | up:"Up", | ||
| 11 | down:"Down", | ||
| 12 | mcase:"Match case", | ||
| 13 | findnext:"Find next", | ||
| 14 | replace:"Replace", | ||
| 15 | replaceall:"Replace all" | ||
| 16 | }); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm b/public/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm deleted file mode 100644 index 0b42486..0000000 --- a/public/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm +++ /dev/null | |||
| @@ -1,104 +0,0 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title>{#searchreplace_dlg.replace_title}</title> | ||
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 6 | <script type="text/javascript" src="../../utils/mctabs.js"></script> | ||
| 7 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | ||
| 8 | <script type="text/javascript" src="js/searchreplace.js"></script> | ||
| 9 | <link rel="stylesheet" type="text/css" href="css/searchreplace.css" /> | ||
| 10 | </head> | ||
| 11 | <body style="display:none;"> | ||
| 12 | <form onsubmit="SearchReplaceDialog.searchNext('none');return false;" action="#"> | ||
| 13 | <div class="tabs"> | ||
| 14 | <ul> | ||
| 15 | <li id="search_tab"><span><a href="javascript:SearchReplaceDialog.switchMode('search');" onmousedown="return false;">{#searchreplace.search_desc}</a></span></li> | ||
| 16 | <li id="replace_tab"><span><a href="javascript:SearchReplaceDialog.switchMode('replace');" onmousedown="return false;">{#searchreplace_dlg.replace}</a></span></li> | ||
| 17 | </ul> | ||
| 18 | </div> | ||
| 19 | |||
| 20 | <div class="panel_wrapper"> | ||
| 21 | <div id="search_panel" class="panel"> | ||
| 22 | <table border="0" cellspacing="0" cellpadding="2"> | ||
| 23 | <tr> | ||
| 24 | <td><label for="search_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td> | ||
| 25 | <td><input type="text" id="search_panel_searchstring" name="search_panel_searchstring" style="width: 200px" /></td> | ||
| 26 | </tr> | ||
| 27 | <tr> | ||
| 28 | <td colspan="2"> | ||
| 29 | <table border="0" cellspacing="0" cellpadding="0" class="direction"> | ||
| 30 | <tr> | ||
| 31 | <td><label>{#searchreplace_dlg.direction}</label></td> | ||
| 32 | <td><input id="search_panel_backwardsu" name="search_panel_backwards" class="radio" type="radio" /></td> | ||
| 33 | <td><label for="search_panel_backwardsu">{#searchreplace_dlg.up}</label></td> | ||
| 34 | <td><input id="search_panel_backwardsd" name="search_panel_backwards" class="radio" type="radio" checked="checked" /></td> | ||
| 35 | <td><label for="search_panel_backwardsd">{#searchreplace_dlg.down}</label></td> | ||
| 36 | </tr> | ||
| 37 | </table> | ||
| 38 | </td> | ||
| 39 | </tr> | ||
| 40 | <tr> | ||
| 41 | <td colspan="2"> | ||
| 42 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 43 | <tr> | ||
| 44 | <td><input id="search_panel_casesensitivebox" name="search_panel_casesensitivebox" class="checkbox" type="checkbox" /></td> | ||
| 45 | <td><label for="search_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td> | ||
| 46 | </tr> | ||
| 47 | </table> | ||
| 48 | </td> | ||
| 49 | </tr> | ||
| 50 | </table> | ||
| 51 | </div> | ||
| 52 | |||
| 53 | <div id="replace_panel" class="panel"> | ||
| 54 | <table border="0" cellspacing="0" cellpadding="2"> | ||
| 55 | <tr> | ||
| 56 | <td><label for="replace_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td> | ||
| 57 | <td><input type="text" id="replace_panel_searchstring" name="replace_panel_searchstring" style="width: 200px" /></td> | ||
| 58 | </tr> | ||
| 59 | <tr> | ||
| 60 | <td><label for="replace_panel_replacestring">{#searchreplace_dlg.replacewith}</label></td> | ||
| 61 | <td><input type="text" id="replace_panel_replacestring" name="replace_panel_replacestring" style="width: 200px" /></td> | ||
| 62 | </tr> | ||
| 63 | <tr> | ||
| 64 | <td colspan="2"> | ||
| 65 | <table border="0" cellspacing="0" cellpadding="0" class="direction"> | ||
| 66 | <tr> | ||
| 67 | <td><label>{#searchreplace_dlg.direction}</label></td> | ||
| 68 | <td><input id="replace_panel_backwardsu" name="replace_panel_backwards" class="radio" type="radio" /></td> | ||
| 69 | <td><label for="replace_panel_backwardsu">{#searchreplace_dlg.up}</label></td> | ||
| 70 | <td><input id="replace_panel_backwardsd" name="replace_panel_backwards" class="radio" type="radio" checked="checked" /></td> | ||
| 71 | <td><label for="replace_panel_backwardsd">{#searchreplace_dlg.down}</label></td> | ||
| 72 | </tr> | ||
| 73 | </table> | ||
| 74 | </td> | ||
| 75 | </tr> | ||
| 76 | <tr> | ||
| 77 | <td colspan="2"> | ||
| 78 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 79 | <tr> | ||
| 80 | <td><input id="replace_panel_casesensitivebox" name="replace_panel_casesensitivebox" class="checkbox" type="checkbox" /></td> | ||
| 81 | <td><label for="replace_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td> | ||
| 82 | </tr> | ||
| 83 | </table> | ||
| 84 | </td> | ||
| 85 | </tr> | ||
| 86 | </table> | ||
| 87 | </div> | ||
| 88 | |||
| 89 | </div> | ||
| 90 | |||
| 91 | <div class="mceActionPanel"> | ||
| 92 | <div style="float: left"> | ||
| 93 | <input type="submit" id="insert" name="insert" value="{#searchreplace_dlg.findnext}" /> | ||
| 94 | <input type="button" class="button" id="replaceBtn" name="replaceBtn" value="{#searchreplace_dlg.replace}" onclick="SearchReplaceDialog.searchNext('current');" /> | ||
| 95 | <input type="button" class="button" id="replaceAllBtn" name="replaceAllBtn" value="{#searchreplace_dlg.replaceall}" onclick="SearchReplaceDialog.searchNext('all');" /> | ||
| 96 | </div> | ||
| 97 | |||
| 98 | <div style="float: right"> | ||
| 99 | <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" /> | ||
| 100 | </div> | ||
| 101 | </div> | ||
| 102 | </form> | ||
| 103 | </body> | ||
| 104 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/spellchecker/css/content.css b/public/javascripts/tiny_mce/plugins/spellchecker/css/content.css deleted file mode 100644 index 24efa02..0000000 --- a/public/javascripts/tiny_mce/plugins/spellchecker/css/content.css +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | .mceItemHiddenSpellWord {background:url(../img/wline.gif) repeat-x bottom left; cursor:default;} | ||
diff --git a/public/javascripts/tiny_mce/plugins/spellchecker/editor_plugin.js b/public/javascripts/tiny_mce/plugins/spellchecker/editor_plugin.js deleted file mode 100644 index 377e4e8..0000000 --- a/public/javascripts/tiny_mce/plugins/spellchecker/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;e.addCommand("mceSpellCheck",function(){if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);e.windowManager.alert("spellchecker.no_mpell")}})}else{g._done()}});e.onInit.add(function(){if(e.settings.content_css!==false){e.dom.loadCSS(f+"/css/content.css")}});e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){l.setSelected(1);f.selectedItem.setSelected(0);f.selectedItem=l;f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);if(n==f.selectedLang){f.selectedItem=l}})});return g}},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c');for(d=0;d<f.length;d++){e+="\\"+f.charAt(d)}return e},_getWords:function(){var e=this.editor,g=[],d="",f={};this._walk(e.getBody(),function(h){if(h.nodeType==3){d+=h.nodeValue+" "}});d=d.replace(new RegExp("([0-9]|["+this._getSeparators()+"])","g")," ");d=tinymce.trim(d.replace(/(\s+)/g," "));c(d.split(" "),function(h){if(!f[h]){g.push(h);f[h]=1}});return g},_removeWords:function(e){var f=this.editor,h=f.dom,g=f.selection,d=g.getBookmark();c(h.select("span").reverse(),function(i){if(i&&(h.hasClass(i,"mceItemHiddenSpellWord")||h.hasClass(i,"mceItemHidden"))){if(!e||h.decode(i.innerHTML)==e){h.remove(i,1)}}});g.moveToBookmark(d)},_markWords:function(o){var i,h,g,f,e,n="",k=this.editor,p=this._getSeparators(),j=k.dom,d=[];var l=k.selection,m=l.getBookmark();c(o,function(q){n+=(n?"|":"")+q});i=new RegExp("(["+p+"])("+n+")(["+p+"])","g");h=new RegExp("^("+n+")","g");g=new RegExp("("+n+")(["+p+"]?)$","g");f=new RegExp("^("+n+")(["+p+"]?)$","g");e=new RegExp("("+n+")(["+p+"])","g");this._walk(this.editor.getBody(),function(q){if(q.nodeType==3){d.push(q)}});c(d,function(r){var q;if(r.nodeType==3){q=r.nodeValue;if(i.test(q)||h.test(q)||g.test(q)||f.test(q)){q=j.encode(q);q=q.replace(e,'<span class="mceItemHiddenSpellWord">$1</span>$2');q=q.replace(g,'<span class="mceItemHiddenSpellWord">$1</span>$2');j.replace(j.create("span",{"class":"mceItemHidden"},q),r)}}});l.moveToBookmark(m)},_showMenu:function(g,i){var h=this,g=h.editor,d=h._menu,k,j=g.dom,f=j.getViewPort(g.getWin());if(!d){k=b.getPos(g.getContentAreaContainer());d=g.controlManager.createDropMenu("spellcheckermenu",{offset_x:k.x,offset_y:k.y,"class":"mceNoIcons"});h._menu=d}if(j.hasClass(i.target,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);h._sendRPC("getSuggestions",[h.selectedLang,j.decode(i.target.innerHTML)],function(e){d.removeAll();if(e.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(e,function(l){d.add({title:l,onclick:function(){j.replace(g.getDoc().createTextNode(l),i.target);h._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}d.add({title:"spellchecker.ignore_word",onclick:function(){j.remove(i.target,1);h._checkDone()}});d.add({title:"spellchecker.ignore_words",onclick:function(){h._removeWords(j.decode(i.target.innerHTML));h._checkDone()}});d.update()});g.selection.select(i.target);k=j.getPos(i.target);d.showMenu(k.x,k.y+i.target.offsetHeight-f.y);return tinymce.dom.Event.cancel(i)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,h,d){var g=this,f=g.editor.getParam("spellchecker_rpc_url","{backend}");if(f=="{backend}"){g.editor.setProgressState(0);alert("Please specify: spellchecker_rpc_url");return}a.sendRPC({url:f,method:e,params:h,success:d,error:function(j,i){g.editor.setProgressState(0);g.editor.windowManager.alert(j.errstr||("Error response: "+i.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js deleted file mode 100644 index c913c46..0000000 --- a/public/javascripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,338 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 425 2007-11-21 15:17:39Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | var JSONRequest = tinymce.util.JSONRequest, each = tinymce.each, DOM = tinymce.DOM; | ||
| 10 | |||
| 11 | tinymce.create('tinymce.plugins.SpellcheckerPlugin', { | ||
| 12 | getInfo : function() { | ||
| 13 | return { | ||
| 14 | longname : 'Spellchecker', | ||
| 15 | author : 'Moxiecode Systems AB', | ||
| 16 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 17 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker', | ||
| 18 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 19 | }; | ||
| 20 | }, | ||
| 21 | |||
| 22 | init : function(ed, url) { | ||
| 23 | var t = this, cm; | ||
| 24 | |||
| 25 | t.url = url; | ||
| 26 | t.editor = ed; | ||
| 27 | |||
| 28 | // Register commands | ||
| 29 | ed.addCommand('mceSpellCheck', function() { | ||
| 30 | if (!t.active) { | ||
| 31 | ed.setProgressState(1); | ||
| 32 | t._sendRPC('checkWords', [t.selectedLang, t._getWords()], function(r) { | ||
| 33 | if (r.length > 0) { | ||
| 34 | t.active = 1; | ||
| 35 | t._markWords(r); | ||
| 36 | ed.setProgressState(0); | ||
| 37 | ed.nodeChanged(); | ||
| 38 | } else { | ||
| 39 | ed.setProgressState(0); | ||
| 40 | ed.windowManager.alert('spellchecker.no_mpell'); | ||
| 41 | } | ||
| 42 | }); | ||
| 43 | } else | ||
| 44 | t._done(); | ||
| 45 | }); | ||
| 46 | |||
| 47 | ed.onInit.add(function() { | ||
| 48 | if (ed.settings.content_css !== false) | ||
| 49 | ed.dom.loadCSS(url + '/css/content.css'); | ||
| 50 | }); | ||
| 51 | |||
| 52 | ed.onClick.add(t._showMenu, t); | ||
| 53 | ed.onContextMenu.add(t._showMenu, t); | ||
| 54 | ed.onBeforeGetContent.add(function() { | ||
| 55 | if (t.active) | ||
| 56 | t._removeWords(); | ||
| 57 | }); | ||
| 58 | |||
| 59 | ed.onNodeChange.add(function(ed, cm) { | ||
| 60 | cm.setActive('spellchecker', t.active); | ||
| 61 | }); | ||
| 62 | |||
| 63 | ed.onSetContent.add(function() { | ||
| 64 | t._done(); | ||
| 65 | }); | ||
| 66 | |||
| 67 | ed.onBeforeGetContent.add(function() { | ||
| 68 | t._done(); | ||
| 69 | }); | ||
| 70 | |||
| 71 | ed.onBeforeExecCommand.add(function(ed, cmd) { | ||
| 72 | if (cmd == 'mceFullScreen') | ||
| 73 | t._done(); | ||
| 74 | }); | ||
| 75 | |||
| 76 | // Find selected language | ||
| 77 | t.languages = {}; | ||
| 78 | each(ed.getParam('spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv', 'hash'), function(v, k) { | ||
| 79 | if (k.indexOf('+') === 0) { | ||
| 80 | k = k.substring(1); | ||
| 81 | t.selectedLang = v; | ||
| 82 | } | ||
| 83 | |||
| 84 | t.languages[k] = v; | ||
| 85 | }); | ||
| 86 | }, | ||
| 87 | |||
| 88 | createControl : function(n, cm) { | ||
| 89 | var t = this, c, ed = t.editor; | ||
| 90 | |||
| 91 | if (n == 'spellchecker') { | ||
| 92 | c = cm.createSplitButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t}); | ||
| 93 | |||
| 94 | c.onRenderMenu.add(function(c, m) { | ||
| 95 | m.add({title : 'spellchecker.langs', 'class' : 'mceMenuItemTitle'}).setDisabled(1); | ||
| 96 | each(t.languages, function(v, k) { | ||
| 97 | var o = {icon : 1}, mi; | ||
| 98 | |||
| 99 | o.onclick = function() { | ||
| 100 | mi.setSelected(1); | ||
| 101 | t.selectedItem.setSelected(0); | ||
| 102 | t.selectedItem = mi; | ||
| 103 | t.selectedLang = v; | ||
| 104 | }; | ||
| 105 | |||
| 106 | o.title = k; | ||
| 107 | mi = m.add(o); | ||
| 108 | mi.setSelected(v == t.selectedLang); | ||
| 109 | |||
| 110 | if (v == t.selectedLang) | ||
| 111 | t.selectedItem = mi; | ||
| 112 | }) | ||
| 113 | }); | ||
| 114 | |||
| 115 | return c; | ||
| 116 | } | ||
| 117 | }, | ||
| 118 | |||
| 119 | // Internal functions | ||
| 120 | |||
| 121 | _walk : function(n, f) { | ||
| 122 | var d = this.editor.getDoc(), w; | ||
| 123 | |||
| 124 | if (d.createTreeWalker) { | ||
| 125 | w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false); | ||
| 126 | |||
| 127 | while ((n = w.nextNode()) != null) | ||
| 128 | f.call(this, n); | ||
| 129 | } else | ||
| 130 | tinymce.walk(n, f, 'childNodes'); | ||
| 131 | }, | ||
| 132 | |||
| 133 | _getSeparators : function() { | ||
| 134 | var re = '', i, str = this.editor.getParam('spellchecker_word_separator_chars', '\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c'); | ||
| 135 | |||
| 136 | // Build word separator regexp | ||
| 137 | for (i=0; i<str.length; i++) | ||
| 138 | re += '\\' + str.charAt(i); | ||
| 139 | |||
| 140 | return re; | ||
| 141 | }, | ||
| 142 | |||
| 143 | _getWords : function() { | ||
| 144 | var ed = this.editor, wl = [], tx = '', lo = {}; | ||
| 145 | |||
| 146 | // Get area text | ||
| 147 | this._walk(ed.getBody(), function(n) { | ||
| 148 | if (n.nodeType == 3) | ||
| 149 | tx += n.nodeValue + ' '; | ||
| 150 | }); | ||
| 151 | |||
| 152 | // Split words by separator | ||
| 153 | tx = tx.replace(new RegExp('([0-9]|[' + this._getSeparators() + '])', 'g'), ' '); | ||
| 154 | tx = tinymce.trim(tx.replace(/(\s+)/g, ' ')); | ||
| 155 | |||
| 156 | // Build word array and remove duplicates | ||
| 157 | each(tx.split(' '), function(v) { | ||
| 158 | if (!lo[v]) { | ||
| 159 | wl.push(v); | ||
| 160 | lo[v] = 1; | ||
| 161 | } | ||
| 162 | }); | ||
| 163 | |||
| 164 | return wl; | ||
| 165 | }, | ||
| 166 | |||
| 167 | _removeWords : function(w) { | ||
| 168 | var ed = this.editor, dom = ed.dom, se = ed.selection, b = se.getBookmark(); | ||
| 169 | |||
| 170 | each(dom.select('span').reverse(), function(n) { | ||
| 171 | if (n && (dom.hasClass(n, 'mceItemHiddenSpellWord') || dom.hasClass(n, 'mceItemHidden'))) { | ||
| 172 | if (!w || dom.decode(n.innerHTML) == w) | ||
| 173 | dom.remove(n, 1); | ||
| 174 | } | ||
| 175 | }); | ||
| 176 | |||
| 177 | se.moveToBookmark(b); | ||
| 178 | }, | ||
| 179 | |||
| 180 | _markWords : function(wl) { | ||
| 181 | var r1, r2, r3, r4, r5, w = '', ed = this.editor, re = this._getSeparators(), dom = ed.dom, nl = []; | ||
| 182 | var se = ed.selection, b = se.getBookmark(); | ||
| 183 | |||
| 184 | each(wl, function(v) { | ||
| 185 | w += (w ? '|' : '') + v; | ||
| 186 | }); | ||
| 187 | |||
| 188 | r1 = new RegExp('([' + re + '])(' + w + ')([' + re + '])', 'g'); | ||
| 189 | r2 = new RegExp('^(' + w + ')', 'g'); | ||
| 190 | r3 = new RegExp('(' + w + ')([' + re + ']?)$', 'g'); | ||
| 191 | r4 = new RegExp('^(' + w + ')([' + re + ']?)$', 'g'); | ||
| 192 | r5 = new RegExp('(' + w + ')([' + re + '])', 'g'); | ||
| 193 | |||
| 194 | // Collect all text nodes | ||
| 195 | this._walk(this.editor.getBody(), function(n) { | ||
| 196 | if (n.nodeType == 3) { | ||
| 197 | nl.push(n); | ||
| 198 | } | ||
| 199 | }); | ||
| 200 | |||
| 201 | // Wrap incorrect words in spans | ||
| 202 | each(nl, function(n) { | ||
| 203 | var v; | ||
| 204 | |||
| 205 | if (n.nodeType == 3) { | ||
| 206 | v = n.nodeValue; | ||
| 207 | |||
| 208 | if (r1.test(v) || r2.test(v) || r3.test(v) || r4.test(v)) { | ||
| 209 | v = dom.encode(v); | ||
| 210 | v = v.replace(r5, '<span class="mceItemHiddenSpellWord">$1</span>$2'); | ||
| 211 | v = v.replace(r3, '<span class="mceItemHiddenSpellWord">$1</span>$2'); | ||
| 212 | |||
| 213 | dom.replace(dom.create('span', {'class' : 'mceItemHidden'}, v), n); | ||
| 214 | } | ||
| 215 | } | ||
| 216 | }); | ||
| 217 | |||
| 218 | se.moveToBookmark(b); | ||
| 219 | }, | ||
| 220 | |||
| 221 | _showMenu : function(ed, e) { | ||
| 222 | var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin()); | ||
| 223 | |||
| 224 | if (!m) { | ||
| 225 | p1 = DOM.getPos(ed.getContentAreaContainer()); | ||
| 226 | //p2 = DOM.getPos(ed.getContainer()); | ||
| 227 | |||
| 228 | m = ed.controlManager.createDropMenu('spellcheckermenu', { | ||
| 229 | offset_x : p1.x, | ||
| 230 | offset_y : p1.y, | ||
| 231 | 'class' : 'mceNoIcons' | ||
| 232 | }); | ||
| 233 | |||
| 234 | t._menu = m; | ||
| 235 | } | ||
| 236 | |||
| 237 | if (dom.hasClass(e.target, 'mceItemHiddenSpellWord')) { | ||
| 238 | m.removeAll(); | ||
| 239 | m.add({title : 'spellchecker.wait', 'class' : 'mceMenuItemTitle'}).setDisabled(1); | ||
| 240 | |||
| 241 | t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(e.target.innerHTML)], function(r) { | ||
| 242 | m.removeAll(); | ||
| 243 | |||
| 244 | if (r.length > 0) { | ||
| 245 | m.add({title : 'spellchecker.sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1); | ||
| 246 | each(r, function(v) { | ||
| 247 | m.add({title : v, onclick : function() { | ||
| 248 | dom.replace(ed.getDoc().createTextNode(v), e.target); | ||
| 249 | t._checkDone(); | ||
| 250 | }}); | ||
| 251 | }); | ||
| 252 | |||
| 253 | m.addSeparator(); | ||
| 254 | } else | ||
| 255 | m.add({title : 'spellchecker.no_sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1); | ||
| 256 | |||
| 257 | m.add({ | ||
| 258 | title : 'spellchecker.ignore_word', | ||
| 259 | onclick : function() { | ||
| 260 | dom.remove(e.target, 1); | ||
| 261 | t._checkDone(); | ||
| 262 | } | ||
| 263 | }); | ||
| 264 | |||
| 265 | m.add({ | ||
| 266 | title : 'spellchecker.ignore_words', | ||
| 267 | onclick : function() { | ||
| 268 | t._removeWords(dom.decode(e.target.innerHTML)); | ||
| 269 | t._checkDone(); | ||
| 270 | } | ||
| 271 | }); | ||
| 272 | |||
| 273 | m.update(); | ||
| 274 | }); | ||
| 275 | |||
| 276 | ed.selection.select(e.target); | ||
| 277 | p1 = dom.getPos(e.target); | ||
| 278 | m.showMenu(p1.x, p1.y + e.target.offsetHeight - vp.y); | ||
| 279 | |||
| 280 | return tinymce.dom.Event.cancel(e); | ||
| 281 | } else | ||
| 282 | m.hideMenu(); | ||
| 283 | }, | ||
| 284 | |||
| 285 | _checkDone : function() { | ||
| 286 | var t = this, ed = t.editor, dom = ed.dom, o; | ||
| 287 | |||
| 288 | each(dom.select('span'), function(n) { | ||
| 289 | if (n && dom.hasClass(n, 'mceItemHiddenSpellWord')) { | ||
| 290 | o = true; | ||
| 291 | return false; | ||
| 292 | } | ||
| 293 | }); | ||
| 294 | |||
| 295 | if (!o) | ||
| 296 | t._done(); | ||
| 297 | }, | ||
| 298 | |||
| 299 | _done : function() { | ||
| 300 | var t = this, la = t.active; | ||
| 301 | |||
| 302 | if (t.active) { | ||
| 303 | t.active = 0; | ||
| 304 | t._removeWords(); | ||
| 305 | |||
| 306 | if (t._menu) | ||
| 307 | t._menu.hideMenu(); | ||
| 308 | |||
| 309 | if (la) | ||
| 310 | t.editor.nodeChanged(); | ||
| 311 | } | ||
| 312 | }, | ||
| 313 | |||
| 314 | _sendRPC : function(m, p, cb) { | ||
| 315 | var t = this, url = t.editor.getParam("spellchecker_rpc_url", "{backend}"); | ||
| 316 | |||
| 317 | if (url == '{backend}') { | ||
| 318 | t.editor.setProgressState(0); | ||
| 319 | alert('Please specify: spellchecker_rpc_url'); | ||
| 320 | return; | ||
| 321 | } | ||
| 322 | |||
| 323 | JSONRequest.sendRPC({ | ||
| 324 | url : url, | ||
| 325 | method : m, | ||
| 326 | params : p, | ||
| 327 | success : cb, | ||
| 328 | error : function(e, x) { | ||
| 329 | t.editor.setProgressState(0); | ||
| 330 | t.editor.windowManager.alert(e.errstr || ('Error response: ' + x.responseText)); | ||
| 331 | } | ||
| 332 | }); | ||
| 333 | } | ||
| 334 | }); | ||
| 335 | |||
| 336 | // Register plugin | ||
| 337 | tinymce.PluginManager.add('spellchecker', tinymce.plugins.SpellcheckerPlugin); | ||
| 338 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/spellchecker/img/wline.gif b/public/javascripts/tiny_mce/plugins/spellchecker/img/wline.gif deleted file mode 100644 index 7d0a4db..0000000 --- a/public/javascripts/tiny_mce/plugins/spellchecker/img/wline.gif +++ /dev/null | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/style/css/props.css b/public/javascripts/tiny_mce/plugins/style/css/props.css deleted file mode 100644 index eb1f264..0000000 --- a/public/javascripts/tiny_mce/plugins/style/css/props.css +++ /dev/null | |||
| @@ -1,13 +0,0 @@ | |||
| 1 | #text_font {width:250px;} | ||
| 2 | #text_size {width:70px;} | ||
| 3 | .mceAddSelectValue {background:#DDD;} | ||
| 4 | select, #block_text_indent, #box_width, #box_height, #box_padding_top, #box_padding_right, #box_padding_bottom, #box_padding_left {width:70px;} | ||
| 5 | #box_margin_top, #box_margin_right, #box_margin_bottom, #box_margin_left, #positioning_width, #positioning_height, #positioning_zindex {width:70px;} | ||
| 6 | #positioning_placement_top, #positioning_placement_right, #positioning_placement_bottom, #positioning_placement_left {width:70px;} | ||
| 7 | #positioning_clip_top, #positioning_clip_right, #positioning_clip_bottom, #positioning_clip_left {width:70px;} | ||
| 8 | .panel_wrapper div.current {padding-top:10px;height:230px;} | ||
| 9 | .delim {border-left:1px solid gray;} | ||
| 10 | .tdelim {border-bottom:1px solid gray;} | ||
| 11 | #block_display {width:145px;} | ||
| 12 | #list_type {width:115px;} | ||
| 13 | .disabled {background:#EEE;} | ||
diff --git a/public/javascripts/tiny_mce/plugins/style/editor_plugin.js b/public/javascripts/tiny_mce/plugins/style/editor_plugin.js deleted file mode 100644 index cab2153..0000000 --- a/public/javascripts/tiny_mce/plugins/style/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.StylePlugin",{init:function(a,b){a.addCommand("mceStyleProps",function(){a.windowManager.open({file:b+"/props.htm",width:480+parseInt(a.getLang("style.delta_width",0)),height:320+parseInt(a.getLang("style.delta_height",0)),inline:1},{plugin_url:b,style_text:a.selection.getNode().style.cssText})});a.addCommand("mceSetElementStyle",function(d,c){if(e=a.selection.getNode()){a.dom.setAttrib(e,"style",c);a.execCommand("mceRepaint")}});a.onNodeChange.add(function(d,c,f){c.setDisabled("styleprops",f.nodeName==="BODY")});a.addButton("styleprops",{title:"style.desc",cmd:"mceStyleProps"})},getInfo:function(){return{longname:"Style",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("style",tinymce.plugins.StylePlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/style/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/style/editor_plugin_src.js deleted file mode 100644 index 6c817ce..0000000 --- a/public/javascripts/tiny_mce/plugins/style/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,52 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 787 2008-04-10 11:40:57Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.StylePlugin', { | ||
| 10 | init : function(ed, url) { | ||
| 11 | // Register commands | ||
| 12 | ed.addCommand('mceStyleProps', function() { | ||
| 13 | ed.windowManager.open({ | ||
| 14 | file : url + '/props.htm', | ||
| 15 | width : 480 + parseInt(ed.getLang('style.delta_width', 0)), | ||
| 16 | height : 320 + parseInt(ed.getLang('style.delta_height', 0)), | ||
| 17 | inline : 1 | ||
| 18 | }, { | ||
| 19 | plugin_url : url, | ||
| 20 | style_text : ed.selection.getNode().style.cssText | ||
| 21 | }); | ||
| 22 | }); | ||
| 23 | |||
| 24 | ed.addCommand('mceSetElementStyle', function(ui, v) { | ||
| 25 | if (e = ed.selection.getNode()) { | ||
| 26 | ed.dom.setAttrib(e, 'style', v); | ||
| 27 | ed.execCommand('mceRepaint'); | ||
| 28 | } | ||
| 29 | }); | ||
| 30 | |||
| 31 | ed.onNodeChange.add(function(ed, cm, n) { | ||
| 32 | cm.setDisabled('styleprops', n.nodeName === 'BODY'); | ||
| 33 | }); | ||
| 34 | |||
| 35 | // Register buttons | ||
| 36 | ed.addButton('styleprops', {title : 'style.desc', cmd : 'mceStyleProps'}); | ||
| 37 | }, | ||
| 38 | |||
| 39 | getInfo : function() { | ||
| 40 | return { | ||
| 41 | longname : 'Style', | ||
| 42 | author : 'Moxiecode Systems AB', | ||
| 43 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 44 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style', | ||
| 45 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 46 | }; | ||
| 47 | } | ||
| 48 | }); | ||
| 49 | |||
| 50 | // Register plugin | ||
| 51 | tinymce.PluginManager.add('style', tinymce.plugins.StylePlugin); | ||
| 52 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/style/js/props.js b/public/javascripts/tiny_mce/plugins/style/js/props.js deleted file mode 100644 index a8dd93d..0000000 --- a/public/javascripts/tiny_mce/plugins/style/js/props.js +++ /dev/null | |||
| @@ -1,641 +0,0 @@ | |||
| 1 | tinyMCEPopup.requireLangPack(); | ||
| 2 | |||
| 3 | var defaultFonts = "" + | ||
| 4 | "Arial, Helvetica, sans-serif=Arial, Helvetica, sans-serif;" + | ||
| 5 | "Times New Roman, Times, serif=Times New Roman, Times, serif;" + | ||
| 6 | "Courier New, Courier, mono=Courier New, Courier, mono;" + | ||
| 7 | "Times New Roman, Times, serif=Times New Roman, Times, serif;" + | ||
| 8 | "Georgia, Times New Roman, Times, serif=Georgia, Times New Roman, Times, serif;" + | ||
| 9 | "Verdana, Arial, Helvetica, sans-serif=Verdana, Arial, Helvetica, sans-serif;" + | ||
| 10 | "Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif"; | ||
| 11 | |||
| 12 | var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger"; | ||
| 13 | var defaultMeasurement = "+pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%"; | ||
| 14 | var defaultSpacingMeasurement = "pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;+ems=em;exs=ex;%"; | ||
| 15 | var defaultIndentMeasurement = "pixels=px;+points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%"; | ||
| 16 | var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900"; | ||
| 17 | var defaultTextStyle = "normal;italic;oblique"; | ||
| 18 | var defaultVariant = "normal;small-caps"; | ||
| 19 | var defaultLineHeight = "normal"; | ||
| 20 | var defaultAttachment = "fixed;scroll"; | ||
| 21 | var defaultRepeat = "no-repeat;repeat;repeat-x;repeat-y"; | ||
| 22 | var defaultPosH = "left;center;right"; | ||
| 23 | var defaultPosV = "top;center;bottom"; | ||
| 24 | var defaultVAlign = "baseline;sub;super;top;text-top;middle;bottom;text-bottom"; | ||
| 25 | var defaultDisplay = "inline;block;list-item;run-in;compact;marker;table;inline-table;table-row-group;table-header-group;table-footer-group;table-row;table-column-group;table-column;table-cell;table-caption;none"; | ||
| 26 | var defaultBorderStyle = "none;solid;dashed;dotted;double;groove;ridge;inset;outset"; | ||
| 27 | var defaultBorderWidth = "thin;medium;thick"; | ||
| 28 | var defaultListType = "disc;circle;square;decimal;lower-roman;upper-roman;lower-alpha;upper-alpha;none"; | ||
| 29 | |||
| 30 | function init() { | ||
| 31 | var ce = document.getElementById('container'), h; | ||
| 32 | |||
| 33 | ce.style.cssText = tinyMCEPopup.getWindowArg('style_text'); | ||
| 34 | |||
| 35 | h = getBrowserHTML('background_image_browser','background_image','image','advimage'); | ||
| 36 | document.getElementById("background_image_browser").innerHTML = h; | ||
| 37 | |||
| 38 | document.getElementById('text_color_pickcontainer').innerHTML = getColorPickerHTML('text_color_pick','text_color'); | ||
| 39 | document.getElementById('background_color_pickcontainer').innerHTML = getColorPickerHTML('background_color_pick','background_color'); | ||
| 40 | document.getElementById('border_color_top_pickcontainer').innerHTML = getColorPickerHTML('border_color_top_pick','border_color_top'); | ||
| 41 | document.getElementById('border_color_right_pickcontainer').innerHTML = getColorPickerHTML('border_color_right_pick','border_color_right'); | ||
| 42 | document.getElementById('border_color_bottom_pickcontainer').innerHTML = getColorPickerHTML('border_color_bottom_pick','border_color_bottom'); | ||
| 43 | document.getElementById('border_color_left_pickcontainer').innerHTML = getColorPickerHTML('border_color_left_pick','border_color_left'); | ||
| 44 | |||
| 45 | fillSelect(0, 'text_font', 'style_font', defaultFonts, ';', true); | ||
| 46 | fillSelect(0, 'text_size', 'style_font_size', defaultSizes, ';', true); | ||
| 47 | fillSelect(0, 'text_size_measurement', 'style_font_size_measurement', defaultMeasurement, ';', true); | ||
| 48 | fillSelect(0, 'text_case', 'style_text_case', "capitalize;uppercase;lowercase", ';', true); | ||
| 49 | fillSelect(0, 'text_weight', 'style_font_weight', defaultWeight, ';', true); | ||
| 50 | fillSelect(0, 'text_style', 'style_font_style', defaultTextStyle, ';', true); | ||
| 51 | fillSelect(0, 'text_variant', 'style_font_variant', defaultVariant, ';', true); | ||
| 52 | fillSelect(0, 'text_lineheight', 'style_font_line_height', defaultLineHeight, ';', true); | ||
| 53 | fillSelect(0, 'text_lineheight_measurement', 'style_font_line_height_measurement', defaultMeasurement, ';', true); | ||
| 54 | |||
| 55 | fillSelect(0, 'background_attachment', 'style_background_attachment', defaultAttachment, ';', true); | ||
| 56 | fillSelect(0, 'background_repeat', 'style_background_repeat', defaultRepeat, ';', true); | ||
| 57 | |||
| 58 | fillSelect(0, 'background_hpos_measurement', 'style_background_hpos_measurement', defaultMeasurement, ';', true); | ||
| 59 | fillSelect(0, 'background_vpos_measurement', 'style_background_vpos_measurement', defaultMeasurement, ';', true); | ||
| 60 | |||
| 61 | fillSelect(0, 'background_hpos', 'style_background_hpos', defaultPosH, ';', true); | ||
| 62 | fillSelect(0, 'background_vpos', 'style_background_vpos', defaultPosV, ';', true); | ||
| 63 | |||
| 64 | fillSelect(0, 'block_wordspacing', 'style_wordspacing', 'normal', ';', true); | ||
| 65 | fillSelect(0, 'block_wordspacing_measurement', 'style_wordspacing_measurement', defaultSpacingMeasurement, ';', true); | ||
| 66 | fillSelect(0, 'block_letterspacing', 'style_letterspacing', 'normal', ';', true); | ||
| 67 | fillSelect(0, 'block_letterspacing_measurement', 'style_letterspacing_measurement', defaultSpacingMeasurement, ';', true); | ||
| 68 | fillSelect(0, 'block_vertical_alignment', 'style_vertical_alignment', defaultVAlign, ';', true); | ||
| 69 | fillSelect(0, 'block_text_align', 'style_text_align', "left;right;center;justify", ';', true); | ||
| 70 | fillSelect(0, 'block_whitespace', 'style_whitespace', "normal;pre;nowrap", ';', true); | ||
| 71 | fillSelect(0, 'block_display', 'style_display', defaultDisplay, ';', true); | ||
| 72 | fillSelect(0, 'block_text_indent_measurement', 'style_text_indent_measurement', defaultIndentMeasurement, ';', true); | ||
| 73 | |||
| 74 | fillSelect(0, 'box_width_measurement', 'style_box_width_measurement', defaultMeasurement, ';', true); | ||
| 75 | fillSelect(0, 'box_height_measurement', 'style_box_height_measurement', defaultMeasurement, ';', true); | ||
| 76 | fillSelect(0, 'box_float', 'style_float', 'left;right;none', ';', true); | ||
| 77 | fillSelect(0, 'box_clear', 'style_clear', 'left;right;both;none', ';', true); | ||
| 78 | fillSelect(0, 'box_padding_left_measurement', 'style_padding_left_measurement', defaultMeasurement, ';', true); | ||
| 79 | fillSelect(0, 'box_padding_top_measurement', 'style_padding_top_measurement', defaultMeasurement, ';', true); | ||
| 80 | fillSelect(0, 'box_padding_bottom_measurement', 'style_padding_bottom_measurement', defaultMeasurement, ';', true); | ||
| 81 | fillSelect(0, 'box_padding_right_measurement', 'style_padding_right_measurement', defaultMeasurement, ';', true); | ||
| 82 | fillSelect(0, 'box_margin_left_measurement', 'style_margin_left_measurement', defaultMeasurement, ';', true); | ||
| 83 | fillSelect(0, 'box_margin_top_measurement', 'style_margin_top_measurement', defaultMeasurement, ';', true); | ||
| 84 | fillSelect(0, 'box_margin_bottom_measurement', 'style_margin_bottom_measurement', defaultMeasurement, ';', true); | ||
| 85 | fillSelect(0, 'box_margin_right_measurement', 'style_margin_right_measurement', defaultMeasurement, ';', true); | ||
| 86 | |||
| 87 | fillSelect(0, 'border_style_top', 'style_border_style_top', defaultBorderStyle, ';', true); | ||
| 88 | fillSelect(0, 'border_style_right', 'style_border_style_right', defaultBorderStyle, ';', true); | ||
| 89 | fillSelect(0, 'border_style_bottom', 'style_border_style_bottom', defaultBorderStyle, ';', true); | ||
| 90 | fillSelect(0, 'border_style_left', 'style_border_style_left', defaultBorderStyle, ';', true); | ||
| 91 | |||
| 92 | fillSelect(0, 'border_width_top', 'style_border_width_top', defaultBorderWidth, ';', true); | ||
| 93 | fillSelect(0, 'border_width_right', 'style_border_width_right', defaultBorderWidth, ';', true); | ||
| 94 | fillSelect(0, 'border_width_bottom', 'style_border_width_bottom', defaultBorderWidth, ';', true); | ||
| 95 | fillSelect(0, 'border_width_left', 'style_border_width_left', defaultBorderWidth, ';', true); | ||
| 96 | |||
| 97 | fillSelect(0, 'border_width_top_measurement', 'style_border_width_top_measurement', defaultMeasurement, ';', true); | ||
| 98 | fillSelect(0, 'border_width_right_measurement', 'style_border_width_right_measurement', defaultMeasurement, ';', true); | ||
| 99 | fillSelect(0, 'border_width_bottom_measurement', 'style_border_width_bottom_measurement', defaultMeasurement, ';', true); | ||
| 100 | fillSelect(0, 'border_width_left_measurement', 'style_border_width_left_measurement', defaultMeasurement, ';', true); | ||
| 101 | |||
| 102 | fillSelect(0, 'list_type', 'style_list_type', defaultListType, ';', true); | ||
| 103 | fillSelect(0, 'list_position', 'style_list_position', "inside;outside", ';', true); | ||
| 104 | |||
| 105 | fillSelect(0, 'positioning_type', 'style_positioning_type', "absolute;relative;static", ';', true); | ||
| 106 | fillSelect(0, 'positioning_visibility', 'style_positioning_visibility', "inherit;visible;hidden", ';', true); | ||
| 107 | |||
| 108 | fillSelect(0, 'positioning_width_measurement', 'style_positioning_width_measurement', defaultMeasurement, ';', true); | ||
| 109 | fillSelect(0, 'positioning_height_measurement', 'style_positioning_height_measurement', defaultMeasurement, ';', true); | ||
| 110 | fillSelect(0, 'positioning_overflow', 'style_positioning_overflow', "visible;hidden;scroll;auto", ';', true); | ||
| 111 | |||
| 112 | fillSelect(0, 'positioning_placement_top_measurement', 'style_positioning_placement_top_measurement', defaultMeasurement, ';', true); | ||
| 113 | fillSelect(0, 'positioning_placement_right_measurement', 'style_positioning_placement_right_measurement', defaultMeasurement, ';', true); | ||
| 114 | fillSelect(0, 'positioning_placement_bottom_measurement', 'style_positioning_placement_bottom_measurement', defaultMeasurement, ';', true); | ||
| 115 | fillSelect(0, 'positioning_placement_left_measurement', 'style_positioning_placement_left_measurement', defaultMeasurement, ';', true); | ||
| 116 | |||
| 117 | fillSelect(0, 'positioning_clip_top_measurement', 'style_positioning_clip_top_measurement', defaultMeasurement, ';', true); | ||
| 118 | fillSelect(0, 'positioning_clip_right_measurement', 'style_positioning_clip_right_measurement', defaultMeasurement, ';', true); | ||
| 119 | fillSelect(0, 'positioning_clip_bottom_measurement', 'style_positioning_clip_bottom_measurement', defaultMeasurement, ';', true); | ||
| 120 | fillSelect(0, 'positioning_clip_left_measurement', 'style_positioning_clip_left_measurement', defaultMeasurement, ';', true); | ||
| 121 | |||
| 122 | TinyMCE_EditableSelects.init(); | ||
| 123 | setupFormData(); | ||
| 124 | showDisabledControls(); | ||
| 125 | } | ||
| 126 | |||
| 127 | function setupFormData() { | ||
| 128 | var ce = document.getElementById('container'), f = document.forms[0], s, b, i; | ||
| 129 | |||
| 130 | // Setup text fields | ||
| 131 | |||
| 132 | selectByValue(f, 'text_font', ce.style.fontFamily, true, true); | ||
| 133 | selectByValue(f, 'text_size', getNum(ce.style.fontSize), true, true); | ||
| 134 | selectByValue(f, 'text_size_measurement', getMeasurement(ce.style.fontSize)); | ||
| 135 | selectByValue(f, 'text_weight', ce.style.fontWeight, true, true); | ||
| 136 | selectByValue(f, 'text_style', ce.style.fontStyle, true, true); | ||
| 137 | selectByValue(f, 'text_lineheight', getNum(ce.style.lineHeight), true, true); | ||
| 138 | selectByValue(f, 'text_lineheight_measurement', getMeasurement(ce.style.lineHeight)); | ||
| 139 | selectByValue(f, 'text_case', ce.style.textTransform, true, true); | ||
| 140 | selectByValue(f, 'text_variant', ce.style.fontVariant, true, true); | ||
| 141 | f.text_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.color); | ||
| 142 | updateColor('text_color_pick', 'text_color'); | ||
| 143 | f.text_underline.checked = inStr(ce.style.textDecoration, 'underline'); | ||
| 144 | f.text_overline.checked = inStr(ce.style.textDecoration, 'overline'); | ||
| 145 | f.text_linethrough.checked = inStr(ce.style.textDecoration, 'line-through'); | ||
| 146 | f.text_blink.checked = inStr(ce.style.textDecoration, 'blink'); | ||
| 147 | |||
| 148 | // Setup background fields | ||
| 149 | |||
| 150 | f.background_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.backgroundColor); | ||
| 151 | updateColor('background_color_pick', 'background_color'); | ||
| 152 | f.background_image.value = ce.style.backgroundImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); | ||
| 153 | selectByValue(f, 'background_repeat', ce.style.backgroundRepeat, true, true); | ||
| 154 | selectByValue(f, 'background_attachment', ce.style.backgroundAttachment, true, true); | ||
| 155 | selectByValue(f, 'background_hpos', getNum(getVal(ce.style.backgroundPosition, 0)), true, true); | ||
| 156 | selectByValue(f, 'background_hpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 0))); | ||
| 157 | selectByValue(f, 'background_vpos', getNum(getVal(ce.style.backgroundPosition, 1)), true, true); | ||
| 158 | selectByValue(f, 'background_vpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 1))); | ||
| 159 | |||
| 160 | // Setup block fields | ||
| 161 | |||
| 162 | selectByValue(f, 'block_wordspacing', getNum(ce.style.wordSpacing), true, true); | ||
| 163 | selectByValue(f, 'block_wordspacing_measurement', getMeasurement(ce.style.wordSpacing)); | ||
| 164 | selectByValue(f, 'block_letterspacing', getNum(ce.style.letterSpacing), true, true); | ||
| 165 | selectByValue(f, 'block_letterspacing_measurement', getMeasurement(ce.style.letterSpacing)); | ||
| 166 | selectByValue(f, 'block_vertical_alignment', ce.style.verticalAlign, true, true); | ||
| 167 | selectByValue(f, 'block_text_align', ce.style.textAlign, true, true); | ||
| 168 | f.block_text_indent.value = getNum(ce.style.textIndent); | ||
| 169 | selectByValue(f, 'block_text_indent_measurement', getMeasurement(ce.style.textIndent)); | ||
| 170 | selectByValue(f, 'block_whitespace', ce.style.whiteSpace, true, true); | ||
| 171 | selectByValue(f, 'block_display', ce.style.display, true, true); | ||
| 172 | |||
| 173 | // Setup box fields | ||
| 174 | |||
| 175 | f.box_width.value = getNum(ce.style.width); | ||
| 176 | selectByValue(f, 'box_width_measurement', getMeasurement(ce.style.width)); | ||
| 177 | |||
| 178 | f.box_height.value = getNum(ce.style.height); | ||
| 179 | selectByValue(f, 'box_height_measurement', getMeasurement(ce.style.height)); | ||
| 180 | |||
| 181 | if (tinymce.isGecko) | ||
| 182 | selectByValue(f, 'box_float', ce.style.cssFloat, true, true); | ||
| 183 | else | ||
| 184 | selectByValue(f, 'box_float', ce.style.styleFloat, true, true); | ||
| 185 | |||
| 186 | selectByValue(f, 'box_clear', ce.style.clear, true, true); | ||
| 187 | |||
| 188 | setupBox(f, ce, 'box_padding', 'padding', ''); | ||
| 189 | setupBox(f, ce, 'box_margin', 'margin', ''); | ||
| 190 | |||
| 191 | // Setup border fields | ||
| 192 | |||
| 193 | setupBox(f, ce, 'border_style', 'border', 'Style'); | ||
| 194 | setupBox(f, ce, 'border_width', 'border', 'Width'); | ||
| 195 | setupBox(f, ce, 'border_color', 'border', 'Color'); | ||
| 196 | |||
| 197 | updateColor('border_color_top_pick', 'border_color_top'); | ||
| 198 | updateColor('border_color_right_pick', 'border_color_right'); | ||
| 199 | updateColor('border_color_bottom_pick', 'border_color_bottom'); | ||
| 200 | updateColor('border_color_left_pick', 'border_color_left'); | ||
| 201 | |||
| 202 | f.elements.border_color_top.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_top.value); | ||
| 203 | f.elements.border_color_right.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_right.value); | ||
| 204 | f.elements.border_color_bottom.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_bottom.value); | ||
| 205 | f.elements.border_color_left.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_left.value); | ||
| 206 | |||
| 207 | // Setup list fields | ||
| 208 | |||
| 209 | selectByValue(f, 'list_type', ce.style.listStyleType, true, true); | ||
| 210 | selectByValue(f, 'list_position', ce.style.listStylePosition, true, true); | ||
| 211 | f.list_bullet_image.value = ce.style.listStyleImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); | ||
| 212 | |||
| 213 | // Setup box fields | ||
| 214 | |||
| 215 | selectByValue(f, 'positioning_type', ce.style.position, true, true); | ||
| 216 | selectByValue(f, 'positioning_visibility', ce.style.visibility, true, true); | ||
| 217 | selectByValue(f, 'positioning_overflow', ce.style.overflow, true, true); | ||
| 218 | f.positioning_zindex.value = ce.style.zIndex ? ce.style.zIndex : ""; | ||
| 219 | |||
| 220 | f.positioning_width.value = getNum(ce.style.width); | ||
| 221 | selectByValue(f, 'positioning_width_measurement', getMeasurement(ce.style.width)); | ||
| 222 | |||
| 223 | f.positioning_height.value = getNum(ce.style.height); | ||
| 224 | selectByValue(f, 'positioning_height_measurement', getMeasurement(ce.style.height)); | ||
| 225 | |||
| 226 | setupBox(f, ce, 'positioning_placement', '', '', ['top', 'right', 'bottom', 'left']); | ||
| 227 | |||
| 228 | s = ce.style.clip.replace(new RegExp("rect\\('?([^']*)'?\\)", 'gi'), "$1"); | ||
| 229 | s = s.replace(/,/g, ' '); | ||
| 230 | |||
| 231 | if (!hasEqualValues([getVal(s, 0), getVal(s, 1), getVal(s, 2), getVal(s, 3)])) { | ||
| 232 | f.positioning_clip_top.value = getNum(getVal(s, 0)); | ||
| 233 | selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0))); | ||
| 234 | f.positioning_clip_right.value = getNum(getVal(s, 1)); | ||
| 235 | selectByValue(f, 'positioning_clip_right_measurement', getMeasurement(getVal(s, 1))); | ||
| 236 | f.positioning_clip_bottom.value = getNum(getVal(s, 2)); | ||
| 237 | selectByValue(f, 'positioning_clip_bottom_measurement', getMeasurement(getVal(s, 2))); | ||
| 238 | f.positioning_clip_left.value = getNum(getVal(s, 3)); | ||
| 239 | selectByValue(f, 'positioning_clip_left_measurement', getMeasurement(getVal(s, 3))); | ||
| 240 | } else { | ||
| 241 | f.positioning_clip_top.value = getNum(getVal(s, 0)); | ||
| 242 | selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0))); | ||
| 243 | f.positioning_clip_right.value = f.positioning_clip_bottom.value = f.positioning_clip_left.value; | ||
| 244 | } | ||
| 245 | |||
| 246 | // setupBox(f, ce, '', 'border', 'Color'); | ||
| 247 | } | ||
| 248 | |||
| 249 | function getMeasurement(s) { | ||
| 250 | return s.replace(/^([0-9.]+)(.*)$/, "$2"); | ||
| 251 | } | ||
| 252 | |||
| 253 | function getNum(s) { | ||
| 254 | if (new RegExp('^(?:[0-9.]+)(?:[a-z%]+)$', 'gi').test(s)) | ||
| 255 | return s.replace(/[^0-9.]/g, ''); | ||
| 256 | |||
| 257 | return s; | ||
| 258 | } | ||
| 259 | |||
| 260 | function inStr(s, n) { | ||
| 261 | return new RegExp(n, 'gi').test(s); | ||
| 262 | } | ||
| 263 | |||
| 264 | function getVal(s, i) { | ||
| 265 | var a = s.split(' '); | ||
| 266 | |||
| 267 | if (a.length > 1) | ||
| 268 | return a[i]; | ||
| 269 | |||
| 270 | return ""; | ||
| 271 | } | ||
| 272 | |||
| 273 | function setValue(f, n, v) { | ||
| 274 | if (f.elements[n].type == "text") | ||
| 275 | f.elements[n].value = v; | ||
| 276 | else | ||
| 277 | selectByValue(f, n, v, true, true); | ||
| 278 | } | ||
| 279 | |||
| 280 | function setupBox(f, ce, fp, pr, sf, b) { | ||
| 281 | if (typeof(b) == "undefined") | ||
| 282 | b = ['Top', 'Right', 'Bottom', 'Left']; | ||
| 283 | |||
| 284 | if (isSame(ce, pr, sf, b)) { | ||
| 285 | f.elements[fp + "_same"].checked = true; | ||
| 286 | |||
| 287 | setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf])); | ||
| 288 | f.elements[fp + "_top"].disabled = false; | ||
| 289 | |||
| 290 | f.elements[fp + "_right"].value = ""; | ||
| 291 | f.elements[fp + "_right"].disabled = true; | ||
| 292 | f.elements[fp + "_bottom"].value = ""; | ||
| 293 | f.elements[fp + "_bottom"].disabled = true; | ||
| 294 | f.elements[fp + "_left"].value = ""; | ||
| 295 | f.elements[fp + "_left"].disabled = true; | ||
| 296 | |||
| 297 | if (f.elements[fp + "_top_measurement"]) { | ||
| 298 | selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf])); | ||
| 299 | f.elements[fp + "_left_measurement"].disabled = true; | ||
| 300 | f.elements[fp + "_bottom_measurement"].disabled = true; | ||
| 301 | f.elements[fp + "_right_measurement"].disabled = true; | ||
| 302 | } | ||
| 303 | } else { | ||
| 304 | f.elements[fp + "_same"].checked = false; | ||
| 305 | |||
| 306 | setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf])); | ||
| 307 | f.elements[fp + "_top"].disabled = false; | ||
| 308 | |||
| 309 | setValue(f, fp + "_right", getNum(ce.style[pr + b[1] + sf])); | ||
| 310 | f.elements[fp + "_right"].disabled = false; | ||
| 311 | |||
| 312 | setValue(f, fp + "_bottom", getNum(ce.style[pr + b[2] + sf])); | ||
| 313 | f.elements[fp + "_bottom"].disabled = false; | ||
| 314 | |||
| 315 | setValue(f, fp + "_left", getNum(ce.style[pr + b[3] + sf])); | ||
| 316 | f.elements[fp + "_left"].disabled = false; | ||
| 317 | |||
| 318 | if (f.elements[fp + "_top_measurement"]) { | ||
| 319 | selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf])); | ||
| 320 | selectByValue(f, fp + '_right_measurement', getMeasurement(ce.style[pr + b[1] + sf])); | ||
| 321 | selectByValue(f, fp + '_bottom_measurement', getMeasurement(ce.style[pr + b[2] + sf])); | ||
| 322 | selectByValue(f, fp + '_left_measurement', getMeasurement(ce.style[pr + b[3] + sf])); | ||
| 323 | f.elements[fp + "_left_measurement"].disabled = false; | ||
| 324 | f.elements[fp + "_bottom_measurement"].disabled = false; | ||
| 325 | f.elements[fp + "_right_measurement"].disabled = false; | ||
| 326 | } | ||
| 327 | } | ||
| 328 | } | ||
| 329 | |||
| 330 | function isSame(e, pr, sf, b) { | ||
| 331 | var a = [], i, x; | ||
| 332 | |||
| 333 | if (typeof(b) == "undefined") | ||
| 334 | b = ['Top', 'Right', 'Bottom', 'Left']; | ||
| 335 | |||
| 336 | if (typeof(sf) == "undefined" || sf == null) | ||
| 337 | sf = ""; | ||
| 338 | |||
| 339 | a[0] = e.style[pr + b[0] + sf]; | ||
| 340 | a[1] = e.style[pr + b[1] + sf]; | ||
| 341 | a[2] = e.style[pr + b[2] + sf]; | ||
| 342 | a[3] = e.style[pr + b[3] + sf]; | ||
| 343 | |||
| 344 | for (i=0; i<a.length; i++) { | ||
| 345 | if (a[i] == null) | ||
| 346 | return false; | ||
| 347 | |||
| 348 | for (x=0; x<a.length; x++) { | ||
| 349 | if (a[x] != a[i]) | ||
| 350 | return false; | ||
| 351 | } | ||
| 352 | } | ||
| 353 | |||
| 354 | return true; | ||
| 355 | }; | ||
| 356 | |||
| 357 | function hasEqualValues(a) { | ||
| 358 | var i, x; | ||
| 359 | |||
| 360 | for (i=0; i<a.length; i++) { | ||
| 361 | if (a[i] == null) | ||
| 362 | return false; | ||
| 363 | |||
| 364 | for (x=0; x<a.length; x++) { | ||
| 365 | if (a[x] != a[i]) | ||
| 366 | return false; | ||
| 367 | } | ||
| 368 | } | ||
| 369 | |||
| 370 | return true; | ||
| 371 | } | ||
| 372 | |||
| 373 | function applyAction() { | ||
| 374 | var ce = document.getElementById('container'), ed = tinyMCEPopup.editor; | ||
| 375 | |||
| 376 | generateCSS(); | ||
| 377 | |||
| 378 | tinyMCEPopup.restoreSelection(); | ||
| 379 | ed.dom.setAttrib(ed.selection.getNode(), 'style', tinyMCEPopup.editor.dom.serializeStyle(tinyMCEPopup.editor.dom.parseStyle(ce.style.cssText))); | ||
| 380 | } | ||
| 381 | |||
| 382 | function updateAction() { | ||
| 383 | applyAction(); | ||
| 384 | tinyMCEPopup.close(); | ||
| 385 | } | ||
| 386 | |||
| 387 | function generateCSS() { | ||
| 388 | var ce = document.getElementById('container'), f = document.forms[0], num = new RegExp('[0-9]+', 'g'), s, t; | ||
| 389 | |||
| 390 | ce.style.cssText = ""; | ||
| 391 | |||
| 392 | // Build text styles | ||
| 393 | ce.style.fontFamily = f.text_font.value; | ||
| 394 | ce.style.fontSize = f.text_size.value + (isNum(f.text_size.value) ? (f.text_size_measurement.value || 'px') : ""); | ||
| 395 | ce.style.fontStyle = f.text_style.value; | ||
| 396 | ce.style.lineHeight = f.text_lineheight.value + (isNum(f.text_lineheight.value) ? f.text_lineheight_measurement.value : ""); | ||
| 397 | ce.style.textTransform = f.text_case.value; | ||
| 398 | ce.style.fontWeight = f.text_weight.value; | ||
| 399 | ce.style.fontVariant = f.text_variant.value; | ||
| 400 | ce.style.color = f.text_color.value; | ||
| 401 | |||
| 402 | s = ""; | ||
| 403 | s += f.text_underline.checked ? " underline" : ""; | ||
| 404 | s += f.text_overline.checked ? " overline" : ""; | ||
| 405 | s += f.text_linethrough.checked ? " line-through" : ""; | ||
| 406 | s += f.text_blink.checked ? " blink" : ""; | ||
| 407 | s = s.length > 0 ? s.substring(1) : s; | ||
| 408 | |||
| 409 | if (f.text_none.checked) | ||
| 410 | s = "none"; | ||
| 411 | |||
| 412 | ce.style.textDecoration = s; | ||
| 413 | |||
| 414 | // Build background styles | ||
| 415 | |||
| 416 | ce.style.backgroundColor = f.background_color.value; | ||
| 417 | ce.style.backgroundImage = f.background_image.value != "" ? "url(" + f.background_image.value + ")" : ""; | ||
| 418 | ce.style.backgroundRepeat = f.background_repeat.value; | ||
| 419 | ce.style.backgroundAttachment = f.background_attachment.value; | ||
| 420 | |||
| 421 | if (f.background_hpos.value != "") { | ||
| 422 | s = ""; | ||
| 423 | s += f.background_hpos.value + (isNum(f.background_hpos.value) ? f.background_hpos_measurement.value : "") + " "; | ||
| 424 | s += f.background_vpos.value + (isNum(f.background_vpos.value) ? f.background_vpos_measurement.value : ""); | ||
| 425 | ce.style.backgroundPosition = s; | ||
| 426 | } | ||
| 427 | |||
| 428 | // Build block styles | ||
| 429 | |||
| 430 | ce.style.wordSpacing = f.block_wordspacing.value + (isNum(f.block_wordspacing.value) ? f.block_wordspacing_measurement.value : ""); | ||
| 431 | ce.style.letterSpacing = f.block_letterspacing.value + (isNum(f.block_letterspacing.value) ? f.block_letterspacing_measurement.value : ""); | ||
| 432 | ce.style.verticalAlign = f.block_vertical_alignment.value; | ||
| 433 | ce.style.textAlign = f.block_text_align.value; | ||
| 434 | ce.style.textIndent = f.block_text_indent.value + (isNum(f.block_text_indent.value) ? f.block_text_indent_measurement.value : ""); | ||
| 435 | ce.style.whiteSpace = f.block_whitespace.value; | ||
| 436 | ce.style.display = f.block_display.value; | ||
| 437 | |||
| 438 | // Build box styles | ||
| 439 | |||
| 440 | ce.style.width = f.box_width.value + (isNum(f.box_width.value) ? f.box_width_measurement.value : ""); | ||
| 441 | ce.style.height = f.box_height.value + (isNum(f.box_height.value) ? f.box_height_measurement.value : ""); | ||
| 442 | ce.style.styleFloat = f.box_float.value; | ||
| 443 | |||
| 444 | if (tinymce.isGecko) | ||
| 445 | ce.style.cssFloat = f.box_float.value; | ||
| 446 | |||
| 447 | ce.style.clear = f.box_clear.value; | ||
| 448 | |||
| 449 | if (!f.box_padding_same.checked) { | ||
| 450 | ce.style.paddingTop = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : ""); | ||
| 451 | ce.style.paddingRight = f.box_padding_right.value + (isNum(f.box_padding_right.value) ? f.box_padding_right_measurement.value : ""); | ||
| 452 | ce.style.paddingBottom = f.box_padding_bottom.value + (isNum(f.box_padding_bottom.value) ? f.box_padding_bottom_measurement.value : ""); | ||
| 453 | ce.style.paddingLeft = f.box_padding_left.value + (isNum(f.box_padding_left.value) ? f.box_padding_left_measurement.value : ""); | ||
| 454 | } else | ||
| 455 | ce.style.padding = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : ""); | ||
| 456 | |||
| 457 | if (!f.box_margin_same.checked) { | ||
| 458 | ce.style.marginTop = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : ""); | ||
| 459 | ce.style.marginRight = f.box_margin_right.value + (isNum(f.box_margin_right.value) ? f.box_margin_right_measurement.value : ""); | ||
| 460 | ce.style.marginBottom = f.box_margin_bottom.value + (isNum(f.box_margin_bottom.value) ? f.box_margin_bottom_measurement.value : ""); | ||
| 461 | ce.style.marginLeft = f.box_margin_left.value + (isNum(f.box_margin_left.value) ? f.box_margin_left_measurement.value : ""); | ||
| 462 | } else | ||
| 463 | ce.style.margin = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : ""); | ||
| 464 | |||
| 465 | // Build border styles | ||
| 466 | |||
| 467 | if (!f.border_style_same.checked) { | ||
| 468 | ce.style.borderTopStyle = f.border_style_top.value; | ||
| 469 | ce.style.borderRightStyle = f.border_style_right.value; | ||
| 470 | ce.style.borderBottomStyle = f.border_style_bottom.value; | ||
| 471 | ce.style.borderLeftStyle = f.border_style_left.value; | ||
| 472 | } else | ||
| 473 | ce.style.borderStyle = f.border_style_top.value; | ||
| 474 | |||
| 475 | if (!f.border_width_same.checked) { | ||
| 476 | ce.style.borderTopWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : ""); | ||
| 477 | ce.style.borderRightWidth = f.border_width_right.value + (isNum(f.border_width_right.value) ? f.border_width_right_measurement.value : ""); | ||
| 478 | ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : ""); | ||
| 479 | ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : ""); | ||
| 480 | } else | ||
| 481 | ce.style.borderWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : ""); | ||
| 482 | |||
| 483 | if (!f.border_color_same.checked) { | ||
| 484 | ce.style.borderTopColor = f.border_color_top.value; | ||
| 485 | ce.style.borderRightColor = f.border_color_right.value; | ||
| 486 | ce.style.borderBottomColor = f.border_color_bottom.value; | ||
| 487 | ce.style.borderLeftColor = f.border_color_left.value; | ||
| 488 | } else | ||
| 489 | ce.style.borderColor = f.border_color_top.value; | ||
| 490 | |||
| 491 | // Build list styles | ||
| 492 | |||
| 493 | ce.style.listStyleType = f.list_type.value; | ||
| 494 | ce.style.listStylePosition = f.list_position.value; | ||
| 495 | ce.style.listStyleImage = f.list_bullet_image.value != "" ? "url(" + f.list_bullet_image.value + ")" : ""; | ||
| 496 | |||
| 497 | // Build positioning styles | ||
| 498 | |||
| 499 | ce.style.position = f.positioning_type.value; | ||
| 500 | ce.style.visibility = f.positioning_visibility.value; | ||
| 501 | |||
| 502 | if (ce.style.width == "") | ||
| 503 | ce.style.width = f.positioning_width.value + (isNum(f.positioning_width.value) ? f.positioning_width_measurement.value : ""); | ||
| 504 | |||
| 505 | if (ce.style.height == "") | ||
| 506 | ce.style.height = f.positioning_height.value + (isNum(f.positioning_height.value) ? f.positioning_height_measurement.value : ""); | ||
| 507 | |||
| 508 | ce.style.zIndex = f.positioning_zindex.value; | ||
| 509 | ce.style.overflow = f.positioning_overflow.value; | ||
| 510 | |||
| 511 | if (!f.positioning_placement_same.checked) { | ||
| 512 | ce.style.top = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : ""); | ||
| 513 | ce.style.right = f.positioning_placement_right.value + (isNum(f.positioning_placement_right.value) ? f.positioning_placement_right_measurement.value : ""); | ||
| 514 | ce.style.bottom = f.positioning_placement_bottom.value + (isNum(f.positioning_placement_bottom.value) ? f.positioning_placement_bottom_measurement.value : ""); | ||
| 515 | ce.style.left = f.positioning_placement_left.value + (isNum(f.positioning_placement_left.value) ? f.positioning_placement_left_measurement.value : ""); | ||
| 516 | } else { | ||
| 517 | s = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : ""); | ||
| 518 | ce.style.top = s; | ||
| 519 | ce.style.right = s; | ||
| 520 | ce.style.bottom = s; | ||
| 521 | ce.style.left = s; | ||
| 522 | } | ||
| 523 | |||
| 524 | if (!f.positioning_clip_same.checked) { | ||
| 525 | s = "rect("; | ||
| 526 | s += (isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto") + " "; | ||
| 527 | s += (isNum(f.positioning_clip_right.value) ? f.positioning_clip_right.value + f.positioning_clip_right_measurement.value : "auto") + " "; | ||
| 528 | s += (isNum(f.positioning_clip_bottom.value) ? f.positioning_clip_bottom.value + f.positioning_clip_bottom_measurement.value : "auto") + " "; | ||
| 529 | s += (isNum(f.positioning_clip_left.value) ? f.positioning_clip_left.value + f.positioning_clip_left_measurement.value : "auto"); | ||
| 530 | s += ")"; | ||
| 531 | |||
| 532 | if (s != "rect(auto auto auto auto)") | ||
| 533 | ce.style.clip = s; | ||
| 534 | } else { | ||
| 535 | s = "rect("; | ||
| 536 | t = isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto"; | ||
| 537 | s += t + " "; | ||
| 538 | s += t + " "; | ||
| 539 | s += t + " "; | ||
| 540 | s += t + ")"; | ||
| 541 | |||
| 542 | if (s != "rect(auto auto auto auto)") | ||
| 543 | ce.style.clip = s; | ||
| 544 | } | ||
| 545 | |||
| 546 | ce.style.cssText = ce.style.cssText; | ||
| 547 | } | ||
| 548 | |||
| 549 | function isNum(s) { | ||
| 550 | return new RegExp('[0-9]+', 'g').test(s); | ||
| 551 | } | ||
| 552 | |||
| 553 | function showDisabledControls() { | ||
| 554 | var f = document.forms, i, a; | ||
| 555 | |||
| 556 | for (i=0; i<f.length; i++) { | ||
| 557 | for (a=0; a<f[i].elements.length; a++) { | ||
| 558 | if (f[i].elements[a].disabled) | ||
| 559 | tinyMCEPopup.editor.dom.addClass(f[i].elements[a], "disabled"); | ||
| 560 | else | ||
| 561 | tinyMCEPopup.editor.dom.removeClass(f[i].elements[a], "disabled"); | ||
| 562 | } | ||
| 563 | } | ||
| 564 | } | ||
| 565 | |||
| 566 | function fillSelect(f, s, param, dval, sep, em) { | ||
| 567 | var i, ar, p, se; | ||
| 568 | |||
| 569 | f = document.forms[f]; | ||
| 570 | sep = typeof(sep) == "undefined" ? ";" : sep; | ||
| 571 | |||
| 572 | if (em) | ||
| 573 | addSelectValue(f, s, "", ""); | ||
| 574 | |||
| 575 | ar = tinyMCEPopup.getParam(param, dval).split(sep); | ||
| 576 | for (i=0; i<ar.length; i++) { | ||
| 577 | se = false; | ||
| 578 | |||
| 579 | if (ar[i].charAt(0) == '+') { | ||
| 580 | ar[i] = ar[i].substring(1); | ||
| 581 | se = true; | ||
| 582 | } | ||
| 583 | |||
| 584 | p = ar[i].split('='); | ||
| 585 | |||
| 586 | if (p.length > 1) { | ||
| 587 | addSelectValue(f, s, p[0], p[1]); | ||
| 588 | |||
| 589 | if (se) | ||
| 590 | selectByValue(f, s, p[1]); | ||
| 591 | } else { | ||
| 592 | addSelectValue(f, s, p[0], p[0]); | ||
| 593 | |||
| 594 | if (se) | ||
| 595 | selectByValue(f, s, p[0]); | ||
| 596 | } | ||
| 597 | } | ||
| 598 | } | ||
| 599 | |||
| 600 | function toggleSame(ce, pre) { | ||
| 601 | var el = document.forms[0].elements, i; | ||
| 602 | |||
| 603 | if (ce.checked) { | ||
| 604 | el[pre + "_top"].disabled = false; | ||
| 605 | el[pre + "_right"].disabled = true; | ||
| 606 | el[pre + "_bottom"].disabled = true; | ||
| 607 | el[pre + "_left"].disabled = true; | ||
| 608 | |||
| 609 | if (el[pre + "_top_measurement"]) { | ||
| 610 | el[pre + "_top_measurement"].disabled = false; | ||
| 611 | el[pre + "_right_measurement"].disabled = true; | ||
| 612 | el[pre + "_bottom_measurement"].disabled = true; | ||
| 613 | el[pre + "_left_measurement"].disabled = true; | ||
| 614 | } | ||
| 615 | } else { | ||
| 616 | el[pre + "_top"].disabled = false; | ||
| 617 | el[pre + "_right"].disabled = false; | ||
| 618 | el[pre + "_bottom"].disabled = false; | ||
| 619 | el[pre + "_left"].disabled = false; | ||
| 620 | |||
| 621 | if (el[pre + "_top_measurement"]) { | ||
| 622 | el[pre + "_top_measurement"].disabled = false; | ||
| 623 | el[pre + "_right_measurement"].disabled = false; | ||
| 624 | el[pre + "_bottom_measurement"].disabled = false; | ||
| 625 | el[pre + "_left_measurement"].disabled = false; | ||
| 626 | } | ||
| 627 | } | ||
| 628 | |||
| 629 | showDisabledControls(); | ||
| 630 | } | ||
| 631 | |||
| 632 | function synch(fr, to) { | ||
| 633 | var f = document.forms[0]; | ||
| 634 | |||
| 635 | f.elements[to].value = f.elements[fr].value; | ||
| 636 | |||
| 637 | if (f.elements[fr + "_measurement"]) | ||
| 638 | selectByValue(f, to + "_measurement", f.elements[fr + "_measurement"].value); | ||
| 639 | } | ||
| 640 | |||
| 641 | tinyMCEPopup.onInit.add(init); | ||
diff --git a/public/javascripts/tiny_mce/plugins/style/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/style/langs/en_dlg.js deleted file mode 100644 index 5026313..0000000 --- a/public/javascripts/tiny_mce/plugins/style/langs/en_dlg.js +++ /dev/null | |||
| @@ -1,63 +0,0 @@ | |||
| 1 | tinyMCE.addI18n('en.style_dlg',{ | ||
| 2 | title:"Edit CSS Style", | ||
| 3 | apply:"Apply", | ||
| 4 | text_tab:"Text", | ||
| 5 | background_tab:"Background", | ||
| 6 | block_tab:"Block", | ||
| 7 | box_tab:"Box", | ||
| 8 | border_tab:"Border", | ||
| 9 | list_tab:"List", | ||
| 10 | positioning_tab:"Positioning", | ||
| 11 | text_props:"Text", | ||
| 12 | text_font:"Font", | ||
| 13 | text_size:"Size", | ||
| 14 | text_weight:"Weight", | ||
| 15 | text_style:"Style", | ||
| 16 | text_variant:"Variant", | ||
| 17 | text_lineheight:"Line height", | ||
| 18 | text_case:"Case", | ||
| 19 | text_color:"Color", | ||
| 20 | text_decoration:"Decoration", | ||
| 21 | text_overline:"overline", | ||
| 22 | text_underline:"underline", | ||
| 23 | text_striketrough:"strikethrough", | ||
| 24 | text_blink:"blink", | ||
| 25 | text_none:"none", | ||
| 26 | background_color:"Background color", | ||
| 27 | background_image:"Background image", | ||
| 28 | background_repeat:"Repeat", | ||
| 29 | background_attachment:"Attachment", | ||
| 30 | background_hpos:"Horizontal position", | ||
| 31 | background_vpos:"Vertical position", | ||
| 32 | block_wordspacing:"Word spacing", | ||
| 33 | block_letterspacing:"Letter spacing", | ||
| 34 | block_vertical_alignment:"Vertical alignment", | ||
| 35 | block_text_align:"Text align", | ||
| 36 | block_text_indent:"Text indent", | ||
| 37 | block_whitespace:"Whitespace", | ||
| 38 | block_display:"Display", | ||
| 39 | box_width:"Width", | ||
| 40 | box_height:"Height", | ||
| 41 | box_float:"Float", | ||
| 42 | box_clear:"Clear", | ||
| 43 | padding:"Padding", | ||
| 44 | same:"Same for all", | ||
| 45 | top:"Top", | ||
| 46 | right:"Right", | ||
| 47 | bottom:"Bottom", | ||
| 48 | left:"Left", | ||
| 49 | margin:"Margin", | ||
| 50 | style:"Style", | ||
| 51 | width:"Width", | ||
| 52 | height:"Height", | ||
| 53 | color:"Color", | ||
| 54 | list_type:"Type", | ||
| 55 | bullet_image:"Bullet image", | ||
| 56 | position:"Position", | ||
| 57 | positioning_type:"Type", | ||
| 58 | visibility:"Visibility", | ||
| 59 | zindex:"Z-index", | ||
| 60 | overflow:"Overflow", | ||
| 61 | placement:"Placement", | ||
| 62 | clip:"Clip" | ||
| 63 | }); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/style/props.htm b/public/javascripts/tiny_mce/plugins/style/props.htm deleted file mode 100644 index 3a1582c..0000000 --- a/public/javascripts/tiny_mce/plugins/style/props.htm +++ /dev/null | |||
| @@ -1,730 +0,0 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title>{#style_dlg.title}</title> | ||
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 6 | <script type="text/javascript" src="../../utils/mctabs.js"></script> | ||
| 7 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> | ||
| 8 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | ||
| 9 | <script type="text/javascript" src="js/props.js"></script> | ||
| 10 | <link href="css/props.css" rel="stylesheet" type="text/css" /> | ||
| 11 | </head> | ||
| 12 | |||
| 13 | <body id="styleprops" style="display: none"> | ||
| 14 | <form onsubmit="updateAction();return false;" action="#"> | ||
| 15 | <div class="tabs"> | ||
| 16 | <ul> | ||
| 17 | <li id="text_tab" class="current"><span><a href="javascript:mcTabs.displayTab('text_tab','text_panel');" onMouseDown="return false;">{#style_dlg.text_tab}</a></span></li> | ||
| 18 | <li id="background_tab"><span><a href="javascript:mcTabs.displayTab('background_tab','background_panel');" onMouseDown="return false;">{#style_dlg.background_tab}</a></span></li> | ||
| 19 | <li id="block_tab"><span><a href="javascript:mcTabs.displayTab('block_tab','block_panel');" onMouseDown="return false;">{#style_dlg.block_tab}</a></span></li> | ||
| 20 | <li id="box_tab"><span><a href="javascript:mcTabs.displayTab('box_tab','box_panel');" onMouseDown="return false;">{#style_dlg.box_tab}</a></span></li> | ||
| 21 | <li id="border_tab"><span><a href="javascript:mcTabs.displayTab('border_tab','border_panel');" onMouseDown="return false;">{#style_dlg.border_tab}</a></span></li> | ||
| 22 | <li id="list_tab"><span><a href="javascript:mcTabs.displayTab('list_tab','list_panel');" onMouseDown="return false;">{#style_dlg.list_tab}</a></span></li> | ||
| 23 | <li id="positioning_tab"><span><a href="javascript:mcTabs.displayTab('positioning_tab','positioning_panel');" onMouseDown="return false;">{#style_dlg.positioning_tab}</a></span></li> | ||
| 24 | </ul> | ||
| 25 | </div> | ||
| 26 | |||
| 27 | <div class="panel_wrapper"> | ||
| 28 | <div id="text_panel" class="panel current"> | ||
| 29 | <table border="0" width="100%"> | ||
| 30 | <tr> | ||
| 31 | <td><label for="text_font">{#style_dlg.text_font}</label></td> | ||
| 32 | <td colspan="3"> | ||
| 33 | <select id="text_font" name="text_font" class="mceEditableSelect mceFocus"></select> | ||
| 34 | </td> | ||
| 35 | </tr> | ||
| 36 | <tr> | ||
| 37 | <td><label for="text_size">{#style_dlg.text_size}</label></td> | ||
| 38 | <td> | ||
| 39 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 40 | <tr> | ||
| 41 | <td><select id="text_size" name="text_size" class="mceEditableSelect"></select></td> | ||
| 42 | <td> </td> | ||
| 43 | <td><select id="text_size_measurement" name="text_size_measurement"></select></td> | ||
| 44 | </tr> | ||
| 45 | </table> | ||
| 46 | </td> | ||
| 47 | <td><label for="text_weight">{#style_dlg.text_weight}</label></td> | ||
| 48 | <td> | ||
| 49 | <select id="text_weight" name="text_weight"></select> | ||
| 50 | </td> | ||
| 51 | </tr> | ||
| 52 | <tr> | ||
| 53 | <td><label for="text_style">{#style_dlg.text_style}</label></td> | ||
| 54 | <td> | ||
| 55 | <select id="text_style" name="text_style" class="mceEditableSelect"></select> | ||
| 56 | </td> | ||
| 57 | <td><label for="text_variant">{#style_dlg.text_variant}</label></td> | ||
| 58 | <td> | ||
| 59 | <select id="text_variant" name="text_variant"></select> | ||
| 60 | </td> | ||
| 61 | </tr> | ||
| 62 | <tr> | ||
| 63 | <td><label for="text_lineheight">{#style_dlg.text_lineheight}</label></td> | ||
| 64 | <td> | ||
| 65 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 66 | <tr> | ||
| 67 | <td> | ||
| 68 | <select id="text_lineheight" name="text_lineheight" class="mceEditableSelect"></select> | ||
| 69 | </td> | ||
| 70 | <td> </td> | ||
| 71 | <td><select id="text_lineheight_measurement" name="text_lineheight_measurement"></select></td> | ||
| 72 | </tr> | ||
| 73 | </table> | ||
| 74 | </td> | ||
| 75 | <td><label for="text_case">{#style_dlg.text_case}</label></td> | ||
| 76 | <td> | ||
| 77 | <select id="text_case" name="text_case"></select> | ||
| 78 | </td> | ||
| 79 | </tr> | ||
| 80 | <tr> | ||
| 81 | <td><label for="text_color">{#style_dlg.text_color}</label></td> | ||
| 82 | <td colspan="2"> | ||
| 83 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 84 | <tr> | ||
| 85 | <td><input id="text_color" name="text_color" type="text" value="" size="9" onChange="updateColor('text_color_pick','text_color');" /></td> | ||
| 86 | <td id="text_color_pickcontainer"> </td> | ||
| 87 | </tr> | ||
| 88 | </table> | ||
| 89 | </td> | ||
| 90 | </tr> | ||
| 91 | <tr> | ||
| 92 | <td valign="top" style="vertical-align: top; padding-top: 3px;">{#style_dlg.text_decoration}</td> | ||
| 93 | <td colspan="2"> | ||
| 94 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 95 | <tr> | ||
| 96 | <td><input id="text_underline" name="text_underline" class="checkbox" type="checkbox" /></td> | ||
| 97 | <td><label for="text_underline">{#style_dlg.text_underline}</label></td> | ||
| 98 | </tr> | ||
| 99 | <tr> | ||
| 100 | <td><input id="text_overline" name="text_overline" class="checkbox" type="checkbox" /></td> | ||
| 101 | <td><label for="text_overline">{#style_dlg.text_overline}</label></td> | ||
| 102 | </tr> | ||
| 103 | <tr> | ||
| 104 | <td><input id="text_linethrough" name="text_linethrough" class="checkbox" type="checkbox" /></td> | ||
| 105 | <td><label for="text_linethrough">{#style_dlg.text_striketrough}</label></td> | ||
| 106 | </tr> | ||
| 107 | <tr> | ||
| 108 | <td><input id="text_blink" name="text_blink" class="checkbox" type="checkbox" /></td> | ||
| 109 | <td><label for="text_blink">{#style_dlg.text_blink}</label></td> | ||
| 110 | </tr> | ||
| 111 | <tr> | ||
| 112 | <td><input id="text_none" name="text_none" class="checkbox" type="checkbox" /></td> | ||
| 113 | <td><label for="text_none">{#style_dlg.text_none}</label></td> | ||
| 114 | </tr> | ||
| 115 | </table> | ||
| 116 | </td> | ||
| 117 | </tr> | ||
| 118 | </table> | ||
| 119 | </div> | ||
| 120 | |||
| 121 | <div id="background_panel" class="panel"> | ||
| 122 | <table border="0"> | ||
| 123 | <tr> | ||
| 124 | <td><label for="background_color">{#style_dlg.background_color}</label></td> | ||
| 125 | <td> | ||
| 126 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 127 | <tr> | ||
| 128 | <td><input id="background_color" name="background_color" type="text" value="" size="9" onChange="updateColor('background_color_pick','background_color');" /></td> | ||
| 129 | <td id="background_color_pickcontainer"> </td> | ||
| 130 | </tr> | ||
| 131 | </table> | ||
| 132 | </td> | ||
| 133 | </tr> | ||
| 134 | |||
| 135 | <tr> | ||
| 136 | <td><label for="background_image">{#style_dlg.background_image}</label></td> | ||
| 137 | <td><table border="0" cellspacing="0" cellpadding="0"> | ||
| 138 | <tr> | ||
| 139 | <td><input id="background_image" name="background_image" type="text" /></td> | ||
| 140 | <td id="background_image_browser"> </td> | ||
| 141 | </tr> | ||
| 142 | </table> | ||
| 143 | </td> | ||
| 144 | </tr> | ||
| 145 | |||
| 146 | <tr> | ||
| 147 | <td><label for="background_repeat">{#style_dlg.background_repeat}</label></td> | ||
| 148 | <td><select id="background_repeat" name="background_repeat" class="mceEditableSelect"></select></td> | ||
| 149 | </tr> | ||
| 150 | |||
| 151 | <tr> | ||
| 152 | <td><label for="background_attachment">{#style_dlg.background_attachment}</label></td> | ||
| 153 | <td><select id="background_attachment" name="background_attachment" class="mceEditableSelect"></select></td> | ||
| 154 | </tr> | ||
| 155 | |||
| 156 | <tr> | ||
| 157 | <td><label for="background_hpos">{#style_dlg.background_hpos}</label></td> | ||
| 158 | <td> | ||
| 159 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 160 | <tr> | ||
| 161 | <td><select id="background_hpos" name="background_hpos" class="mceEditableSelect"></select></td> | ||
| 162 | <td> </td> | ||
| 163 | <td><select id="background_hpos_measurement" name="background_hpos_measurement"></select></td> | ||
| 164 | </tr> | ||
| 165 | </table> | ||
| 166 | </td> | ||
| 167 | </tr> | ||
| 168 | |||
| 169 | <tr> | ||
| 170 | <td><label for="background_vpos">{#style_dlg.background_vpos}</label></td> | ||
| 171 | <td> | ||
| 172 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 173 | <tr> | ||
| 174 | <td><select id="background_vpos" name="background_vpos" class="mceEditableSelect"></select></td> | ||
| 175 | <td> </td> | ||
| 176 | <td><select id="background_vpos_measurement" name="background_vpos_measurement"></select></td> | ||
| 177 | </tr> | ||
| 178 | </table> | ||
| 179 | </td> | ||
| 180 | </tr> | ||
| 181 | </table> | ||
| 182 | </div> | ||
| 183 | |||
| 184 | <div id="block_panel" class="panel"> | ||
| 185 | <table border="0"> | ||
| 186 | <tr> | ||
| 187 | <td><label for="block_wordspacing">{#style_dlg.block_wordspacing}</label></td> | ||
| 188 | <td> | ||
| 189 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 190 | <tr> | ||
| 191 | <td><select id="block_wordspacing" name="block_wordspacing" class="mceEditableSelect"></select></td> | ||
| 192 | <td> </td> | ||
| 193 | <td><select id="block_wordspacing_measurement" name="block_wordspacing_measurement"></select></td> | ||
| 194 | </tr> | ||
| 195 | </table> | ||
| 196 | </td> | ||
| 197 | </tr> | ||
| 198 | |||
| 199 | <tr> | ||
| 200 | <td><label for="block_letterspacing">{#style_dlg.block_letterspacing}</label></td> | ||
| 201 | <td> | ||
| 202 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 203 | <tr> | ||
| 204 | <td><select id="block_letterspacing" name="block_letterspacing" class="mceEditableSelect"></select></td> | ||
| 205 | <td> </td> | ||
| 206 | <td><select id="block_letterspacing_measurement" name="block_letterspacing_measurement"></select></td> | ||
| 207 | </tr> | ||
| 208 | </table> | ||
| 209 | </td> | ||
| 210 | </tr> | ||
| 211 | |||
| 212 | <tr> | ||
| 213 | <td><label for="block_vertical_alignment">{#style_dlg.block_vertical_alignment}</label></td> | ||
| 214 | <td><select id="block_vertical_alignment" name="block_vertical_alignment" class="mceEditableSelect"></select></td> | ||
| 215 | </tr> | ||
| 216 | |||
| 217 | <tr> | ||
| 218 | <td><label for="block_text_align">{#style_dlg.block_text_align}</label></td> | ||
| 219 | <td><select id="block_text_align" name="block_text_align" class="mceEditableSelect"></select></td> | ||
| 220 | </tr> | ||
| 221 | |||
| 222 | <tr> | ||
| 223 | <td><label for="block_text_indent">{#style_dlg.block_text_indent}</label></td> | ||
| 224 | <td> | ||
| 225 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 226 | <tr> | ||
| 227 | <td><input type="text" id="block_text_indent" name="block_text_indent" /></td> | ||
| 228 | <td> </td> | ||
| 229 | <td><select id="block_text_indent_measurement" name="block_text_indent_measurement"></select></td> | ||
| 230 | </tr> | ||
| 231 | </table> | ||
| 232 | </td> | ||
| 233 | </tr> | ||
| 234 | |||
| 235 | <tr> | ||
| 236 | <td><label for="block_whitespace">{#style_dlg.block_whitespace}</label></td> | ||
| 237 | <td><select id="block_whitespace" name="block_whitespace" class="mceEditableSelect"></select></td> | ||
| 238 | </tr> | ||
| 239 | |||
| 240 | <tr> | ||
| 241 | <td><label for="block_display">{#style_dlg.block_display}</label></td> | ||
| 242 | <td><select id="block_display" name="block_display" class="mceEditableSelect"></select></td> | ||
| 243 | </tr> | ||
| 244 | </table> | ||
| 245 | </div> | ||
| 246 | |||
| 247 | <div id="box_panel" class="panel"> | ||
| 248 | <table border="0"> | ||
| 249 | <tr> | ||
| 250 | <td><label for="box_width">{#style_dlg.box_width}</label></td> | ||
| 251 | <td> | ||
| 252 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 253 | <tr> | ||
| 254 | <td><input type="text" id="box_width" name="box_width" class="mceEditableSelect" onChange="synch('box_width','positioning_width');" /></td> | ||
| 255 | <td> </td> | ||
| 256 | <td><select id="box_width_measurement" name="box_width_measurement"></select></td> | ||
| 257 | </tr> | ||
| 258 | </table> | ||
| 259 | </td> | ||
| 260 | <td> <label for="box_float">{#style_dlg.box_float}</label></td> | ||
| 261 | <td><select id="box_float" name="box_float" class="mceEditableSelect"></select></td> | ||
| 262 | </tr> | ||
| 263 | |||
| 264 | <tr> | ||
| 265 | <td><label for="box_height">{#style_dlg.box_height}</label></td> | ||
| 266 | <td> | ||
| 267 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 268 | <tr> | ||
| 269 | <td><input type="text" id="box_height" name="box_height" class="mceEditableSelect" onChange="synch('box_height','positioning_height');" /></td> | ||
| 270 | <td> </td> | ||
| 271 | <td><select id="box_height_measurement" name="box_height_measurement"></select></td> | ||
| 272 | </tr> | ||
| 273 | </table> | ||
| 274 | </td> | ||
| 275 | <td> <label for="box_clear">{#style_dlg.box_clear}</label></td> | ||
| 276 | <td><select id="box_clear" name="box_clear" class="mceEditableSelect"></select></td> | ||
| 277 | </tr> | ||
| 278 | </table> | ||
| 279 | <div style="float: left; width: 49%"> | ||
| 280 | <fieldset> | ||
| 281 | <legend>{#style_dlg.padding}</legend> | ||
| 282 | |||
| 283 | <table border="0"> | ||
| 284 | <tr> | ||
| 285 | <td> </td> | ||
| 286 | <td><input type="checkbox" id="box_padding_same" name="box_padding_same" class="checkbox" checked="checked" onClick="toggleSame(this,'box_padding');" /> <label for="box_padding_same">{#style_dlg.same}</label></td> | ||
| 287 | </tr> | ||
| 288 | <tr> | ||
| 289 | <td><label for="box_padding_top">{#style_dlg.top}</label></td> | ||
| 290 | <td> | ||
| 291 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 292 | <tr> | ||
| 293 | <td><input type="text" id="box_padding_top" name="box_padding_top" class="mceEditableSelect" /></td> | ||
| 294 | <td> </td> | ||
| 295 | <td><select id="box_padding_top_measurement" name="box_padding_top_measurement"></select></td> | ||
| 296 | </tr> | ||
| 297 | </table> | ||
| 298 | </td> | ||
| 299 | </tr> | ||
| 300 | <tr> | ||
| 301 | <td><label for="box_padding_right">{#style_dlg.right}</label></td> | ||
| 302 | <td> | ||
| 303 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 304 | <tr> | ||
| 305 | <td><input type="text" id="box_padding_right" name="box_padding_right" class="mceEditableSelect" disabled="disabled" /></td> | ||
| 306 | <td> </td> | ||
| 307 | <td><select id="box_padding_right_measurement" name="box_padding_right_measurement" disabled="disabled"></select></td> | ||
| 308 | </tr> | ||
| 309 | </table> | ||
| 310 | </td> | ||
| 311 | </tr> | ||
| 312 | <tr> | ||
| 313 | <td><label for="box_padding_bottom">{#style_dlg.bottom}</label></td> | ||
| 314 | <td> | ||
| 315 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 316 | <tr> | ||
| 317 | <td><input type="text" id="box_padding_bottom" name="box_padding_bottom" class="mceEditableSelect" disabled="disabled" /></td> | ||
| 318 | <td> </td> | ||
| 319 | <td><select id="box_padding_bottom_measurement" name="box_padding_bottom_measurement" disabled="disabled"></select></td> | ||
| 320 | </tr> | ||
| 321 | </table> | ||
| 322 | </td> | ||
| 323 | </tr> | ||
| 324 | <tr> | ||
| 325 | <td><label for="box_padding_left">{#style_dlg.left}</label></td> | ||
| 326 | <td> | ||
| 327 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 328 | <tr> | ||
| 329 | <td><input type="text" id="box_padding_left" name="box_padding_left" class="mceEditableSelect" disabled="disabled" /></td> | ||
| 330 | <td> </td> | ||
| 331 | <td><select id="box_padding_left_measurement" name="box_padding_left_measurement" disabled="disabled"></select></td> | ||
| 332 | </tr> | ||
| 333 | </table> | ||
| 334 | </td> | ||
| 335 | </tr> | ||
| 336 | </table> | ||
| 337 | </fieldset> | ||
| 338 | </div> | ||
| 339 | |||
| 340 | <div style="float: right; width: 49%"> | ||
| 341 | <fieldset> | ||
| 342 | <legend>{#style_dlg.margin}</legend> | ||
| 343 | |||
| 344 | <table border="0"> | ||
| 345 | <tr> | ||
| 346 | <td> </td> | ||
| 347 | <td><input type="checkbox" id="box_margin_same" name="box_margin_same" class="checkbox" checked="checked" onClick="toggleSame(this,'box_margin');" /> <label for="box_margin_same">{#style_dlg.same}</label></td> | ||
| 348 | </tr> | ||
| 349 | <tr> | ||
| 350 | <td><label for="box_margin_top">{#style_dlg.top}</label></td> | ||
| 351 | <td> | ||
| 352 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 353 | <tr> | ||
| 354 | <td><input type="text" id="box_margin_top" name="box_margin_top" class="mceEditableSelect" /></td> | ||
| 355 | <td> </td> | ||
| 356 | <td><select id="box_margin_top_measurement" name="box_margin_top_measurement"></select></td> | ||
| 357 | </tr> | ||
| 358 | </table> | ||
| 359 | </td> | ||
| 360 | </tr> | ||
| 361 | <tr> | ||
| 362 | <td><label for="box_margin_right">{#style_dlg.right}</label></td> | ||
| 363 | <td> | ||
| 364 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 365 | <tr> | ||
| 366 | <td><input type="text" id="box_margin_right" name="box_margin_right" class="mceEditableSelect" disabled="disabled" /></td> | ||
| 367 | <td> </td> | ||
| 368 | <td><select id="box_margin_right_measurement" name="box_margin_right_measurement" disabled="disabled"></select></td> | ||
| 369 | </tr> | ||
| 370 | </table> | ||
| 371 | </td> | ||
| 372 | </tr> | ||
| 373 | <tr> | ||
| 374 | <td><label for="box_margin_bottom">{#style_dlg.bottom}</label></td> | ||
| 375 | <td> | ||
| 376 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 377 | <tr> | ||
| 378 | <td><input type="text" id="box_margin_bottom" name="box_margin_bottom" class="mceEditableSelect" disabled="disabled" /></td> | ||
| 379 | <td> </td> | ||
| 380 | <td><select id="box_margin_bottom_measurement" name="box_margin_bottom_measurement" disabled="disabled"></select></td> | ||
| 381 | </tr> | ||
| 382 | </table> | ||
| 383 | </td> | ||
| 384 | </tr> | ||
| 385 | <tr> | ||
| 386 | <td><label for="box_margin_left">{#style_dlg.left}</label></td> | ||
| 387 | <td> | ||
| 388 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 389 | <tr> | ||
| 390 | <td><input type="text" id="box_margin_left" name="box_margin_left" class="mceEditableSelect" disabled="disabled" /></td> | ||
| 391 | <td> </td> | ||
| 392 | <td><select id="box_margin_left_measurement" name="box_margin_left_measurement" disabled="disabled"></select></td> | ||
| 393 | </tr> | ||
| 394 | </table> | ||
| 395 | </td> | ||
| 396 | </tr> | ||
| 397 | </table> | ||
| 398 | </fieldset> | ||
| 399 | </div> | ||
| 400 | <br style="clear: both" /> | ||
| 401 | </div> | ||
| 402 | |||
| 403 | <div id="border_panel" class="panel"> | ||
| 404 | <table border="0" cellspacing="0" cellpadding="0" width="100%"> | ||
| 405 | <tr> | ||
| 406 | <td class="tdelim"> </td> | ||
| 407 | <td class="tdelim delim"> </td> | ||
| 408 | <td class="tdelim">{#style_dlg.style}</td> | ||
| 409 | <td class="tdelim delim"> </td> | ||
| 410 | <td class="tdelim">{#style_dlg.width}</td> | ||
| 411 | <td class="tdelim delim"> </td> | ||
| 412 | <td class="tdelim">{#style_dlg.color}</td> | ||
| 413 | </tr> | ||
| 414 | |||
| 415 | <tr> | ||
| 416 | <td> </td> | ||
| 417 | <td class="delim"> </td> | ||
| 418 | <td><input type="checkbox" id="border_style_same" name="border_style_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_style');" /> <label for="border_style_same">{#style_dlg.same}</label></td> | ||
| 419 | <td class="delim"> </td> | ||
| 420 | <td><input type="checkbox" id="border_width_same" name="border_width_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_width');" /> <label for="border_width_same">{#style_dlg.same}</label></td> | ||
| 421 | <td class="delim"> </td> | ||
| 422 | <td><input type="checkbox" id="border_color_same" name="border_color_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_color');" /> <label for="border_color_same">{#style_dlg.same}</label></td> | ||
| 423 | </tr> | ||
| 424 | |||
| 425 | <tr> | ||
| 426 | <td>{#style_dlg.top}</td> | ||
| 427 | <td class="delim"> </td> | ||
| 428 | <td><select id="border_style_top" name="border_style_top" class="mceEditableSelect"></select></td> | ||
| 429 | <td class="delim"> </td> | ||
| 430 | <td> | ||
| 431 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 432 | <tr> | ||
| 433 | <td><select id="border_width_top" name="border_width_top" class="mceEditableSelect"></select></td> | ||
| 434 | <td> </td> | ||
| 435 | <td><select id="border_width_top_measurement" name="border_width_top_measurement"></select></td> | ||
| 436 | </tr> | ||
| 437 | </table> | ||
| 438 | </td> | ||
| 439 | <td class="delim"> </td> | ||
| 440 | <td> | ||
| 441 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 442 | <tr> | ||
| 443 | <td><input id="border_color_top" name="border_color_top" type="text" value="" size="9" onChange="updateColor('border_color_top_pick','border_color_top');" /></td> | ||
| 444 | <td id="border_color_top_pickcontainer"> </td> | ||
| 445 | </tr> | ||
| 446 | </table> | ||
| 447 | </td> | ||
| 448 | </tr> | ||
| 449 | |||
| 450 | <tr> | ||
| 451 | <td>{#style_dlg.right}</td> | ||
| 452 | <td class="delim"> </td> | ||
| 453 | <td><select id="border_style_right" name="border_style_right" class="mceEditableSelect" disabled="disabled"></select></td> | ||
| 454 | <td class="delim"> </td> | ||
| 455 | <td> | ||
| 456 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 457 | <tr> | ||
| 458 | <td><select id="border_width_right" name="border_width_right" class="mceEditableSelect" disabled="disabled"></select></td> | ||
| 459 | <td> </td> | ||
| 460 | <td><select id="border_width_right_measurement" name="border_width_right_measurement" disabled="disabled"></select></td> | ||
| 461 | </tr> | ||
| 462 | </table> | ||
| 463 | </td> | ||
| 464 | <td class="delim"> </td> | ||
| 465 | <td> | ||
| 466 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 467 | <tr> | ||
| 468 | <td><input id="border_color_right" name="border_color_right" type="text" value="" size="9" onChange="updateColor('border_color_right_pick','border_color_right');" disabled="disabled" /></td> | ||
| 469 | <td id="border_color_right_pickcontainer"> </td> | ||
| 470 | </tr> | ||
| 471 | </table> | ||
| 472 | </td> | ||
| 473 | </tr> | ||
| 474 | |||
| 475 | <tr> | ||
| 476 | <td>{#style_dlg.bottom}</td> | ||
| 477 | <td class="delim"> </td> | ||
| 478 | <td><select id="border_style_bottom" name="border_style_bottom" class="mceEditableSelect" disabled="disabled"></select></td> | ||
| 479 | <td class="delim"> </td> | ||
| 480 | <td> | ||
| 481 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 482 | <tr> | ||
| 483 | <td><select id="border_width_bottom" name="border_width_bottom" class="mceEditableSelect" disabled="disabled"></select></td> | ||
| 484 | <td> </td> | ||
| 485 | <td><select id="border_width_bottom_measurement" name="border_width_bottom_measurement" disabled="disabled"></select></td> | ||
| 486 | </tr> | ||
| 487 | </table> | ||
| 488 | </td> | ||
| 489 | <td class="delim"> </td> | ||
| 490 | <td> | ||
| 491 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 492 | <tr> | ||
| 493 | <td><input id="border_color_bottom" name="border_color_bottom" type="text" value="" size="9" onChange="updateColor('border_color_bottom_pick','border_color_bottom');" disabled="disabled" /></td> | ||
| 494 | <td id="border_color_bottom_pickcontainer"> </td> | ||
| 495 | </tr> | ||
| 496 | </table> | ||
| 497 | </td> | ||
| 498 | </tr> | ||
| 499 | |||
| 500 | <tr> | ||
| 501 | <td>{#style_dlg.left}</td> | ||
| 502 | <td class="delim"> </td> | ||
| 503 | <td><select id="border_style_left" name="border_style_left" class="mceEditableSelect" disabled="disabled"></select></td> | ||
| 504 | <td class="delim"> </td> | ||
| 505 | <td> | ||
| 506 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 507 | <tr> | ||
| 508 | <td><select id="border_width_left" name="border_width_left" class="mceEditableSelect" disabled="disabled"></select></td> | ||
| 509 | <td> </td> | ||
| 510 | <td><select id="border_width_left_measurement" name="border_width_left_measurement" disabled="disabled"></select></td> | ||
| 511 | </tr> | ||
| 512 | </table> | ||
| 513 | </td> | ||
| 514 | <td class="delim"> </td> | ||
| 515 | <td> | ||
| 516 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 517 | <tr> | ||
| 518 | <td><input id="border_color_left" name="border_color_left" type="text" value="" size="9" onChange="updateColor('border_color_left_pick','border_color_left');" disabled="disabled" /></td> | ||
| 519 | <td id="border_color_left_pickcontainer"> </td> | ||
| 520 | </tr> | ||
| 521 | </table> | ||
| 522 | </td> | ||
| 523 | </tr> | ||
| 524 | </table> | ||
| 525 | </div> | ||
| 526 | |||
| 527 | <div id="list_panel" class="panel"> | ||
| 528 | <table border="0"> | ||
| 529 | <tr> | ||
| 530 | <td><label for="list_type">{#style_dlg.list_type}</label></td> | ||
| 531 | <td><select id="list_type" name="list_type" class="mceEditableSelect"></select></td> | ||
| 532 | </tr> | ||
| 533 | |||
| 534 | <tr> | ||
| 535 | <td><label for="list_bullet_image">{#style_dlg.bullet_image}</label></td> | ||
| 536 | <td><input id="list_bullet_image" name="list_bullet_image" type="text" /></td> | ||
| 537 | </tr> | ||
| 538 | |||
| 539 | <tr> | ||
| 540 | <td><label for="list_position">{#style_dlg.position}</label></td> | ||
| 541 | <td><select id="list_position" name="list_position" class="mceEditableSelect"></select></td> | ||
| 542 | </tr> | ||
| 543 | </table> | ||
| 544 | </div> | ||
| 545 | |||
| 546 | <div id="positioning_panel" class="panel"> | ||
| 547 | <table border="0"> | ||
| 548 | <tr> | ||
| 549 | <td><label for="positioning_type">{#style_dlg.positioning_type}</label></td> | ||
| 550 | <td><select id="positioning_type" name="positioning_type" class="mceEditableSelect"></select></td> | ||
| 551 | <td> <label for="positioning_visibility">{#style_dlg.visibility}</label></td> | ||
| 552 | <td><select id="positioning_visibility" name="positioning_visibility" class="mceEditableSelect"></select></td> | ||
| 553 | </tr> | ||
| 554 | |||
| 555 | <tr> | ||
| 556 | <td><label for="positioning_width">{#style_dlg.width}</label></td> | ||
| 557 | <td> | ||
| 558 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 559 | <tr> | ||
| 560 | <td><input type="text" id="positioning_width" name="positioning_width" onChange="synch('positioning_width','box_width');" /></td> | ||
| 561 | <td> </td> | ||
| 562 | <td><select id="positioning_width_measurement" name="positioning_width_measurement"></select></td> | ||
| 563 | </tr> | ||
| 564 | </table> | ||
| 565 | </td> | ||
| 566 | <td> <label for="positioning_zindex">{#style_dlg.zindex}</label></td> | ||
| 567 | <td><input type="text" id="positioning_zindex" name="positioning_zindex" /></td> | ||
| 568 | </tr> | ||
| 569 | |||
| 570 | <tr> | ||
| 571 | <td><label for="positioning_height">{#style_dlg.height}</label></td> | ||
| 572 | <td> | ||
| 573 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 574 | <tr> | ||
| 575 | <td><input type="text" id="positioning_height" name="positioning_height" onChange="synch('positioning_height','box_height');" /></td> | ||
| 576 | <td> </td> | ||
| 577 | <td><select id="positioning_height_measurement" name="positioning_height_measurement"></select></td> | ||
| 578 | </tr> | ||
| 579 | </table> | ||
| 580 | </td> | ||
| 581 | <td> <label for="positioning_overflow">{#style_dlg.overflow}</label></td> | ||
| 582 | <td><select id="positioning_overflow" name="positioning_overflow" class="mceEditableSelect"></select></td> | ||
| 583 | </tr> | ||
| 584 | </table> | ||
| 585 | |||
| 586 | <div style="float: left; width: 49%"> | ||
| 587 | <fieldset> | ||
| 588 | <legend>{#style_dlg.placement}</legend> | ||
| 589 | |||
| 590 | <table border="0"> | ||
| 591 | <tr> | ||
| 592 | <td> </td> | ||
| 593 | <td><input type="checkbox" id="positioning_placement_same" name="positioning_placement_same" class="checkbox" checked="checked" onClick="toggleSame(this,'positioning_placement');" /> <label for="positioning_placement_same">{#style_dlg.same}</label></td> | ||
| 594 | </tr> | ||
| 595 | <tr> | ||
| 596 | <td>{#style_dlg.top}</td> | ||
| 597 | <td> | ||
| 598 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 599 | <tr> | ||
| 600 | <td><input type="text" id="positioning_placement_top" name="positioning_placement_top" /></td> | ||
| 601 | <td> </td> | ||
| 602 | <td><select id="positioning_placement_top_measurement" name="positioning_placement_top_measurement"></select></td> | ||
| 603 | </tr> | ||
| 604 | </table> | ||
| 605 | </td> | ||
| 606 | </tr> | ||
| 607 | <tr> | ||
| 608 | <td>{#style_dlg.right}</td> | ||
| 609 | <td> | ||
| 610 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 611 | <tr> | ||
| 612 | <td><input type="text" id="positioning_placement_right" name="positioning_placement_right" disabled="disabled" /></td> | ||
| 613 | <td> </td> | ||
| 614 | <td><select id="positioning_placement_right_measurement" name="positioning_placement_right_measurement" disabled="disabled"></select></td> | ||
| 615 | </tr> | ||
| 616 | </table> | ||
| 617 | </td> | ||
| 618 | </tr> | ||
| 619 | <tr> | ||
| 620 | <td>{#style_dlg.bottom}</td> | ||
| 621 | <td> | ||
| 622 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 623 | <tr> | ||
| 624 | <td><input type="text" id="positioning_placement_bottom" name="positioning_placement_bottom" disabled="disabled" /></td> | ||
| 625 | <td> </td> | ||
| 626 | <td><select id="positioning_placement_bottom_measurement" name="positioning_placement_bottom_measurement" disabled="disabled"></select></td> | ||
| 627 | </tr> | ||
| 628 | </table> | ||
| 629 | </td> | ||
| 630 | </tr> | ||
| 631 | <tr> | ||
| 632 | <td>{#style_dlg.left}</td> | ||
| 633 | <td> | ||
| 634 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 635 | <tr> | ||
| 636 | <td><input type="text" id="positioning_placement_left" name="positioning_placement_left" disabled="disabled" /></td> | ||
| 637 | <td> </td> | ||
| 638 | <td><select id="positioning_placement_left_measurement" name="positioning_placement_left_measurement" disabled="disabled"></select></td> | ||
| 639 | </tr> | ||
| 640 | </table> | ||
| 641 | </td> | ||
| 642 | </tr> | ||
| 643 | </table> | ||
| 644 | </fieldset> | ||
| 645 | </div> | ||
| 646 | |||
| 647 | <div style="float: right; width: 49%"> | ||
| 648 | <fieldset> | ||
| 649 | <legend>{#style_dlg.clip}</legend> | ||
| 650 | |||
| 651 | <table border="0"> | ||
| 652 | <tr> | ||
| 653 | <td> </td> | ||
| 654 | <td><input type="checkbox" id="positioning_clip_same" name="positioning_clip_same" class="checkbox" checked="checked" onClick="toggleSame(this,'positioning_clip');" /> <label for="positioning_clip_same">{#style_dlg.same}</label></td> | ||
| 655 | </tr> | ||
| 656 | <tr> | ||
| 657 | <td>{#style_dlg.top}</td> | ||
| 658 | <td> | ||
| 659 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 660 | <tr> | ||
| 661 | <td><input type="text" id="positioning_clip_top" name="positioning_clip_top" /></td> | ||
| 662 | <td> </td> | ||
| 663 | <td><select id="positioning_clip_top_measurement" name="positioning_clip_top_measurement"></select></td> | ||
| 664 | </tr> | ||
| 665 | </table> | ||
| 666 | </td> | ||
| 667 | </tr> | ||
| 668 | <tr> | ||
| 669 | <td>{#style_dlg.right}</td> | ||
| 670 | <td> | ||
| 671 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 672 | <tr> | ||
| 673 | <td><input type="text" id="positioning_clip_right" name="positioning_clip_right" disabled="disabled" /></td> | ||
| 674 | <td> </td> | ||
| 675 | <td><select id="positioning_clip_right_measurement" name="positioning_clip_right_measurement" disabled="disabled"></select></td> | ||
| 676 | </tr> | ||
| 677 | </table> | ||
| 678 | </td> | ||
| 679 | </tr> | ||
| 680 | <tr> | ||
| 681 | <td>{#style_dlg.bottom}</td> | ||
| 682 | <td> | ||
| 683 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 684 | <tr> | ||
| 685 | <td><input type="text" id="positioning_clip_bottom" name="positioning_clip_bottom" disabled="disabled" /></td> | ||
| 686 | <td> </td> | ||
| 687 | <td><select id="positioning_clip_bottom_measurement" name="positioning_clip_bottom_measurement" disabled="disabled"></select></td> | ||
| 688 | </tr> | ||
| 689 | </table> | ||
| 690 | </td> | ||
| 691 | </tr> | ||
| 692 | <tr> | ||
| 693 | <td>{#style_dlg.left}</td> | ||
| 694 | <td> | ||
| 695 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 696 | <tr> | ||
| 697 | <td><input type="text" id="positioning_clip_left" name="positioning_clip_left" disabled="disabled" /></td> | ||
| 698 | <td> </td> | ||
| 699 | <td><select id="positioning_clip_left_measurement" name="positioning_clip_left_measurement" disabled="disabled"></select></td> | ||
| 700 | </tr> | ||
| 701 | </table> | ||
| 702 | </td> | ||
| 703 | </tr> | ||
| 704 | </table> | ||
| 705 | </fieldset> | ||
| 706 | </div> | ||
| 707 | <br style="clear: both" /> | ||
| 708 | </div> | ||
| 709 | </div> | ||
| 710 | |||
| 711 | <div class="mceActionPanel"> | ||
| 712 | <div style="float: left"> | ||
| 713 | <div style="float: left"><input type="submit" id="insert" name="insert" value="{#update}" /></div> | ||
| 714 | |||
| 715 | <div style="float: left"> <input type="button" class="button" id="apply" name="apply" value="{#style_dlg.apply}" onClick="applyAction();" /></div> | ||
| 716 | <br style="clear: both" /> | ||
| 717 | </div> | ||
| 718 | |||
| 719 | <div style="float: right"> | ||
| 720 | <input type="button" id="cancel" name="cancel" value="{#cancel}" onClick="tinyMCEPopup.close();" /> | ||
| 721 | </div> | ||
| 722 | </div> | ||
| 723 | </form> | ||
| 724 | |||
| 725 | <div style="display: none"> | ||
| 726 | <div id="container"></div> | ||
| 727 | </div> | ||
| 728 | |||
| 729 | </body> | ||
| 730 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin.js b/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin.js deleted file mode 100644 index 7f1fe26..0000000 --- a/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(i){o=c.getParent(l.id,"form");n=o.elements;if(o){d(n,function(s,r){if(s.id==l.id){j=r;return false}});if(i>0){for(m=j+1;m<n.length;m++){if(n[m].type!="hidden"){return n[m]}}}else{for(m=j-1;m>=0;m--){if(n[m].type!="hidden"){return n[m]}}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(l=tinymce.EditorManager.get(n.id||n.name)){l.focus()}else{window.setTimeout(function(){window.focus();n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e);if(tinymce.isGecko){f.onKeyPress.add(h);f.onKeyDown.add(e)}else{f.onKeyDown.add(h)}f.onInit.add(function(){d(c.select("a:first,a:last",f.getContainer()),function(i){a.add(i,"focus",function(){f.focus()})})})},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js deleted file mode 100644 index 0fa8d81..0000000 --- a/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,109 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 787 2008-04-10 11:40:57Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode; | ||
| 10 | |||
| 11 | tinymce.create('tinymce.plugins.TabFocusPlugin', { | ||
| 12 | init : function(ed, url) { | ||
| 13 | function tabCancel(ed, e) { | ||
| 14 | if (e.keyCode === 9) | ||
| 15 | return Event.cancel(e); | ||
| 16 | }; | ||
| 17 | |||
| 18 | function tabHandler(ed, e) { | ||
| 19 | var x, i, f, el, v; | ||
| 20 | |||
| 21 | function find(d) { | ||
| 22 | f = DOM.getParent(ed.id, 'form'); | ||
| 23 | el = f.elements; | ||
| 24 | |||
| 25 | if (f) { | ||
| 26 | each(el, function(e, i) { | ||
| 27 | if (e.id == ed.id) { | ||
| 28 | x = i; | ||
| 29 | return false; | ||
| 30 | } | ||
| 31 | }); | ||
| 32 | |||
| 33 | if (d > 0) { | ||
| 34 | for (i = x + 1; i < el.length; i++) { | ||
| 35 | if (el[i].type != 'hidden') | ||
| 36 | return el[i]; | ||
| 37 | } | ||
| 38 | } else { | ||
| 39 | for (i = x - 1; i >= 0; i--) { | ||
| 40 | if (el[i].type != 'hidden') | ||
| 41 | return el[i]; | ||
| 42 | } | ||
| 43 | } | ||
| 44 | } | ||
| 45 | |||
| 46 | return null; | ||
| 47 | }; | ||
| 48 | |||
| 49 | if (e.keyCode === 9) { | ||
| 50 | v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next'))); | ||
| 51 | |||
| 52 | if (v.length == 1) { | ||
| 53 | v[1] = v[0]; | ||
| 54 | v[0] = ':prev'; | ||
| 55 | } | ||
| 56 | |||
| 57 | // Find element to focus | ||
| 58 | if (e.shiftKey) { | ||
| 59 | if (v[0] == ':prev') | ||
| 60 | el = find(-1); | ||
| 61 | else | ||
| 62 | el = DOM.get(v[0]); | ||
| 63 | } else { | ||
| 64 | if (v[1] == ':next') | ||
| 65 | el = find(1); | ||
| 66 | else | ||
| 67 | el = DOM.get(v[1]); | ||
| 68 | } | ||
| 69 | |||
| 70 | if (el) { | ||
| 71 | if (ed = tinymce.EditorManager.get(el.id || el.name)) | ||
| 72 | ed.focus(); | ||
| 73 | else | ||
| 74 | window.setTimeout(function() {window.focus();el.focus();}, 10); | ||
| 75 | |||
| 76 | return Event.cancel(e); | ||
| 77 | } | ||
| 78 | } | ||
| 79 | }; | ||
| 80 | |||
| 81 | ed.onKeyUp.add(tabCancel); | ||
| 82 | |||
| 83 | if (tinymce.isGecko) { | ||
| 84 | ed.onKeyPress.add(tabHandler); | ||
| 85 | ed.onKeyDown.add(tabCancel); | ||
| 86 | } else | ||
| 87 | ed.onKeyDown.add(tabHandler); | ||
| 88 | |||
| 89 | ed.onInit.add(function() { | ||
| 90 | each(DOM.select('a:first,a:last', ed.getContainer()), function(n) { | ||
| 91 | Event.add(n, 'focus', function() {ed.focus();}); | ||
| 92 | }); | ||
| 93 | }); | ||
| 94 | }, | ||
| 95 | |||
| 96 | getInfo : function() { | ||
| 97 | return { | ||
| 98 | longname : 'Tabfocus', | ||
| 99 | author : 'Moxiecode Systems AB', | ||
| 100 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 101 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus', | ||
| 102 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 103 | }; | ||
| 104 | } | ||
| 105 | }); | ||
| 106 | |||
| 107 | // Register plugin | ||
| 108 | tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin); | ||
| 109 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/table/cell.htm b/public/javascripts/tiny_mce/plugins/table/cell.htm deleted file mode 100644 index 1fabc8d..0000000 --- a/public/javascripts/tiny_mce/plugins/table/cell.htm +++ /dev/null | |||
| @@ -1,183 +0,0 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title>{#table_dlg.cell_title}</title> | ||
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 6 | <script type="text/javascript" src="../../utils/mctabs.js"></script> | ||
| 7 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | ||
| 8 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> | ||
| 9 | <script type="text/javascript" src="js/cell.js"></script> | ||
| 10 | <link href="css/cell.css" rel="stylesheet" type="text/css" /> | ||
| 11 | </head> | ||
| 12 | <body id="tablecell" style="display: none"> | ||
| 13 | <form onsubmit="updateAction();return false;" action="#"> | ||
| 14 | <div class="tabs"> | ||
| 15 | <ul> | ||
| 16 | <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li> | ||
| 17 | <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li> | ||
| 18 | </ul> | ||
| 19 | </div> | ||
| 20 | |||
| 21 | <div class="panel_wrapper"> | ||
| 22 | <div id="general_panel" class="panel current"> | ||
| 23 | <fieldset> | ||
| 24 | <legend>{#table_dlg.general_props}</legend> | ||
| 25 | |||
| 26 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 27 | <tr> | ||
| 28 | <td><label for="align">{#table_dlg.align}</label></td> | ||
| 29 | <td> | ||
| 30 | <select id="align" name="align" class="mceFocus"> | ||
| 31 | <option value="">{#not_set}</option> | ||
| 32 | <option value="center">{#table_dlg.align_middle}</option> | ||
| 33 | <option value="left">{#table_dlg.align_left}</option> | ||
| 34 | <option value="right">{#table_dlg.align_right}</option> | ||
| 35 | </select> | ||
| 36 | </td> | ||
| 37 | |||
| 38 | <td><label for="celltype">{#table_dlg.cell_type}</label></td> | ||
| 39 | <td> | ||
| 40 | <select id="celltype" name="celltype"> | ||
| 41 | <option value="td">{#table_dlg.td}</option> | ||
| 42 | <option value="th">{#table_dlg.th}</option> | ||
| 43 | </select> | ||
| 44 | </td> | ||
| 45 | </tr> | ||
| 46 | |||
| 47 | <tr> | ||
| 48 | <td><label for="valign">{#table_dlg.valign}</label></td> | ||
| 49 | <td> | ||
| 50 | <select id="valign" name="valign"> | ||
| 51 | <option value="">{#not_set}</option> | ||
| 52 | <option value="top">{#table_dlg.align_top}</option> | ||
| 53 | <option value="middle">{#table_dlg.align_middle}</option> | ||
| 54 | <option value="bottom">{#table_dlg.align_bottom}</option> | ||
| 55 | </select> | ||
| 56 | </td> | ||
| 57 | |||
| 58 | <td><label for="scope">{#table_dlg.scope}</label></td> | ||
| 59 | <td> | ||
| 60 | <select id="scope" name="scope"> | ||
| 61 | <option value="">{#not_set}</option> | ||
| 62 | <option value="col">{#table.col}</option> | ||
| 63 | <option value="row">{#table.row}</option> | ||
| 64 | <option value="rowgroup">{#table_dlg.rowgroup}</option> | ||
| 65 | <option value="colgroup">{#table_dlg.colgroup}</option> | ||
| 66 | </select> | ||
| 67 | </td> | ||
| 68 | |||
| 69 | </tr> | ||
| 70 | |||
| 71 | <tr> | ||
| 72 | <td><label for="width">{#table_dlg.width}</label></td> | ||
| 73 | <td><input id="width" name="width" type="text" value="" size="4" maxlength="4" onchange="changedSize();" /></td> | ||
| 74 | |||
| 75 | <td><label for="height">{#table_dlg.height}</label></td> | ||
| 76 | <td><input id="height" name="height" type="text" value="" size="4" maxlength="4" onchange="changedSize();" /></td> | ||
| 77 | </tr> | ||
| 78 | |||
| 79 | <tr id="styleSelectRow"> | ||
| 80 | <td><label for="class">{#class_name}</label></td> | ||
| 81 | <td colspan="3"> | ||
| 82 | <select id="class" name="class" class="mceEditableSelect"> | ||
| 83 | <option value="" selected="selected">{#not_set}</option> | ||
| 84 | </select> | ||
| 85 | </td> | ||
| 86 | </tr> | ||
| 87 | </table> | ||
| 88 | </fieldset> | ||
| 89 | </div> | ||
| 90 | |||
| 91 | <div id="advanced_panel" class="panel"> | ||
| 92 | <fieldset> | ||
| 93 | <legend>{#table_dlg.advanced_props}</legend> | ||
| 94 | |||
| 95 | <table border="0" cellpadding="0" cellspacing="4"> | ||
| 96 | <tr> | ||
| 97 | <td class="column1"><label for="id">{#table_dlg.id}</label></td> | ||
| 98 | <td><input id="id" name="id" type="text" value="" style="width: 200px" /></td> | ||
| 99 | </tr> | ||
| 100 | |||
| 101 | <tr> | ||
| 102 | <td><label for="style">{#table_dlg.style}</label></td> | ||
| 103 | <td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td> | ||
| 104 | </tr> | ||
| 105 | |||
| 106 | <tr> | ||
| 107 | <td class="column1"><label for="dir">{#table_dlg.langdir}</label></td> | ||
| 108 | <td> | ||
| 109 | <select id="dir" name="dir" style="width: 200px"> | ||
| 110 | <option value="">{#not_set}</option> | ||
| 111 | <option value="ltr">{#table_dlg.ltr}</option> | ||
| 112 | <option value="rtl">{#table_dlg.rtl}</option> | ||
| 113 | </select> | ||
| 114 | </td> | ||
| 115 | </tr> | ||
| 116 | |||
| 117 | <tr> | ||
| 118 | <td class="column1"><label for="lang">{#table_dlg.langcode}</label></td> | ||
| 119 | <td> | ||
| 120 | <input id="lang" name="lang" type="text" value="" style="width: 200px" /> | ||
| 121 | </td> | ||
| 122 | </tr> | ||
| 123 | |||
| 124 | <tr> | ||
| 125 | <td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td> | ||
| 126 | <td> | ||
| 127 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 128 | <tr> | ||
| 129 | <td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td> | ||
| 130 | <td id="backgroundimagebrowsercontainer"> </td> | ||
| 131 | </tr> | ||
| 132 | </table> | ||
| 133 | </td> | ||
| 134 | </tr> | ||
| 135 | |||
| 136 | <tr> | ||
| 137 | <td class="column1"><label for="bordercolor">{#table_dlg.bordercolor}</label></td> | ||
| 138 | <td> | ||
| 139 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 140 | <tr> | ||
| 141 | <td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td> | ||
| 142 | <td id="bordercolor_pickcontainer"> </td> | ||
| 143 | </tr> | ||
| 144 | </table> | ||
| 145 | </td> | ||
| 146 | </tr> | ||
| 147 | |||
| 148 | <tr> | ||
| 149 | <td class="column1"><label for="bgcolor">{#table_dlg.bgcolor}</label></td> | ||
| 150 | <td> | ||
| 151 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 152 | <tr> | ||
| 153 | <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td> | ||
| 154 | <td id="bgcolor_pickcontainer"> </td> | ||
| 155 | </tr> | ||
| 156 | </table> | ||
| 157 | </td> | ||
| 158 | </tr> | ||
| 159 | </table> | ||
| 160 | </fieldset> | ||
| 161 | </div> | ||
| 162 | </div> | ||
| 163 | |||
| 164 | <div class="mceActionPanel"> | ||
| 165 | <div> | ||
| 166 | <select id="action" name="action"> | ||
| 167 | <option value="cell">{#table_dlg.cell_cell}</option> | ||
| 168 | <option value="row">{#table_dlg.cell_row}</option> | ||
| 169 | <option value="all">{#table_dlg.cell_all}</option> | ||
| 170 | </select> | ||
| 171 | </div> | ||
| 172 | |||
| 173 | <div style="float: left"> | ||
| 174 | <div><input type="submit" id="insert" name="insert" value="{#update}" /></div> | ||
| 175 | </div> | ||
| 176 | |||
| 177 | <div style="float: right"> | ||
| 178 | <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" /> | ||
| 179 | </div> | ||
| 180 | </div> | ||
| 181 | </form> | ||
| 182 | </body> | ||
| 183 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/table/css/cell.css b/public/javascripts/tiny_mce/plugins/table/css/cell.css deleted file mode 100644 index a067ecd..0000000 --- a/public/javascripts/tiny_mce/plugins/table/css/cell.css +++ /dev/null | |||
| @@ -1,17 +0,0 @@ | |||
| 1 | /* CSS file for cell dialog in the table plugin */ | ||
| 2 | |||
| 3 | .panel_wrapper div.current { | ||
| 4 | height: 200px; | ||
| 5 | } | ||
| 6 | |||
| 7 | .advfield { | ||
| 8 | width: 200px; | ||
| 9 | } | ||
| 10 | |||
| 11 | #action { | ||
| 12 | margin-bottom: 3px; | ||
| 13 | } | ||
| 14 | |||
| 15 | #class { | ||
| 16 | width: 150px; | ||
| 17 | } \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/table/css/row.css b/public/javascripts/tiny_mce/plugins/table/css/row.css deleted file mode 100644 index 1f7755d..0000000 --- a/public/javascripts/tiny_mce/plugins/table/css/row.css +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | /* CSS file for row dialog in the table plugin */ | ||
| 2 | |||
| 3 | .panel_wrapper div.current { | ||
| 4 | height: 200px; | ||
| 5 | } | ||
| 6 | |||
| 7 | .advfield { | ||
| 8 | width: 200px; | ||
| 9 | } | ||
| 10 | |||
| 11 | #action { | ||
| 12 | margin-bottom: 3px; | ||
| 13 | } | ||
| 14 | |||
| 15 | #rowtype,#align,#valign,#class,#height { | ||
| 16 | width: 150px; | ||
| 17 | } | ||
| 18 | |||
| 19 | #height { | ||
| 20 | width: 50px; | ||
| 21 | } | ||
| 22 | |||
| 23 | .col2 { | ||
| 24 | padding-left: 20px; | ||
| 25 | } | ||
diff --git a/public/javascripts/tiny_mce/plugins/table/css/table.css b/public/javascripts/tiny_mce/plugins/table/css/table.css deleted file mode 100644 index d11c3f6..0000000 --- a/public/javascripts/tiny_mce/plugins/table/css/table.css +++ /dev/null | |||
| @@ -1,13 +0,0 @@ | |||
| 1 | /* CSS file for table dialog in the table plugin */ | ||
| 2 | |||
| 3 | .panel_wrapper div.current { | ||
| 4 | height: 245px; | ||
| 5 | } | ||
| 6 | |||
| 7 | .advfield { | ||
| 8 | width: 200px; | ||
| 9 | } | ||
| 10 | |||
| 11 | #class { | ||
| 12 | width: 150px; | ||
| 13 | } | ||
diff --git a/public/javascripts/tiny_mce/plugins/table/editor_plugin.js b/public/javascripts/tiny_mce/plugins/table/editor_plugin.js deleted file mode 100644 index 806ef28..0000000 --- a/public/javascripts/tiny_mce/plugins/table/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){var b=tinymce.each;function a(d,e){var f=e.ownerDocument,c=f.createRange(),g;c.setStartBefore(e);c.setEnd(d.endContainer,d.endOffset);g=f.createElement("body");g.appendChild(c.cloneContents());return g.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}tinymce.create("tinymce.plugins.TablePlugin",{init:function(c,d){var e=this;e.editor=c;e.url=d;b([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(f){c.addButton(f[0],{title:f[1],cmd:f[2],ui:f[3]})});if(c.getParam("inline_styles")){c.onPreProcess.add(function(f,h){var g=f.dom;b(g.select("table",h.node),function(j){var i;if(i=g.getAttrib(j,"width")){g.setStyle(j,"width",i);g.setAttrib(j,"width")}if(i=g.getAttrib(j,"height")){g.setStyle(j,"height",i);g.setAttrib(j,"height")}})})}c.onInit.add(function(){if(!tinymce.isIE&&c.getParam("forced_root_block")){function f(){var g=c.getBody().lastChild;if(g&&g.nodeName=="TABLE"){c.dom.add(c.getBody(),"p",null,'<br mce_bogus="1" />')}}if(tinymce.isGecko){c.onKeyDown.add(function(h,j){var g,i,k=h.dom;if(j.keyCode==37||j.keyCode==38){g=h.selection.getRng();i=k.getParent(g.startContainer,"table");if(i&&h.getBody().firstChild==i){if(a(g,i)){g=k.createRng();g.setStartBefore(i);g.setEndBefore(i);h.selection.setRng(g);j.preventDefault()}}}})}c.onKeyUp.add(f);c.onSetContent.add(f);c.onVisualAid.add(f);c.onPreProcess.add(function(g,i){var h=i.node.lastChild;if(h&&h.childNodes.length==1&&h.firstChild.nodeName=="BR"){g.dom.remove(h)}});f()}if(c&&c.plugins.contextmenu){c.plugins.contextmenu.onContextMenu.add(function(i,g,k){var l,j=c.selection,h=j.getNode()||c.getBody();if(c.dom.getParent(k,"td")||c.dom.getParent(k,"th")){g.removeAll();if(h.nodeName=="A"&&!c.dom.getAttrib(h,"name")){g.add({title:"advanced.link_desc",icon:"link",cmd:c.plugins.advlink?"mceAdvLink":"mceLink",ui:true});g.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});g.addSeparator()}if(h.nodeName=="IMG"&&h.className.indexOf("mceItem")==-1){g.add({title:"advanced.image_desc",icon:"image",cmd:c.plugins.advimage?"mceAdvImage":"mceImage",ui:true});g.addSeparator()}g.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",ui:true,value:{action:"insert"}});g.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable",ui:true});g.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete",ui:true});g.addSeparator();l=g.addMenu({title:"table.cell"});l.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps",ui:true});l.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells",ui:true});l.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells",ui:true});l=g.addMenu({title:"table.row"});l.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps",ui:true});l.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});l.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});l.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});l.addSeparator();l.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});l.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});l.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"});l.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"});l=g.addMenu({title:"table.col"});l.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});l.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});l.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{g.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",ui:true})}})}});c.onKeyDown.add(function(f,g){if(g.keyCode==9&&f.dom.getParent(f.selection.getNode(),"TABLE")){if(!tinymce.isGecko&&!tinymce.isOpera){tinyMCE.execInstanceCommand(f.editorId,"mceTableMoveToNextRow",true);return tinymce.dom.Event.cancel(g)}f.undoManager.add()}});if(!tinymce.isIE){if(c.getParam("table_selection",true)){c.onClick.add(function(f,g){g=g.target;if(g.nodeName==="TABLE"){f.selection.select(g)}})}}c.onNodeChange.add(function(g,f,i){var h=g.dom.getParent(i,"td,th,caption");f.setActive("table",i.nodeName==="TABLE"||!!h);if(h&&h.nodeName==="CAPTION"){h=null}f.setDisabled("delete_table",!h);f.setDisabled("delete_col",!h);f.setDisabled("delete_table",!h);f.setDisabled("delete_row",!h);f.setDisabled("col_after",!h);f.setDisabled("col_before",!h);f.setDisabled("row_after",!h);f.setDisabled("row_before",!h);f.setDisabled("row_props",!h);f.setDisabled("cell_props",!h);f.setDisabled("split_cells",!h||(parseInt(g.dom.getAttrib(h,"colspan","1"))<2&&parseInt(g.dom.getAttrib(h,"rowspan","1"))<2));f.setDisabled("merge_cells",!h)});if(!tinymce.isIE){c.onBeforeSetContent.add(function(f,g){if(g.initial){g.content=g.content.replace(/<(td|th)([^>]+|)>\s*<\/(td|th)>/g,tinymce.isOpera?"<$1$2> </$1>":'<$1$2><br mce_bogus="1" /></$1>')}})}},execCommand:function(f,e,g){var d=this.editor,c;switch(f){case"mceTableMoveToNextRow":case"mceInsertTable":case"mceTableRowProps":case"mceTableCellProps":case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":case"mceTableDelete":d.execCommand("mceBeginUndoLevel");this._doExecCommand(f,e,g);d.execCommand("mceEndUndoLevel");return true}return false},getInfo:function(){return{longname:"Tables",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/table",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_doExecCommand:function(s,aa,af){var W=this.editor,av=W,h=this.url;var o=W.selection.getNode();var X=W.dom.getParent(o,"tr");var ar=W.dom.getParent(o,"td,th");var G=W.dom.getParent(o,"table");var l=W.contentWindow.document;var aw=G?G.getAttribute("border"):"";if(X&&ar==null){ar=X.cells[0]}function aq(y,x){for(var ay=0;ay<y.length;ay++){if(y[ay].length>0&&aq(y[ay],x)){return true}if(y[ay]==x){return true}}return false}function ak(x,i){var y;ae=f(G);x=x||0;i=i||0;x=Math.max(p.cellindex+x,0);i=Math.max(p.rowindex+i,0);W.execCommand("mceRepaint");y=e(ae,i,x);if(y){W.selection.select(y.firstChild||y);W.selection.collapse(1)}}function ai(){var i=l.createElement("td");if(!tinymce.isIE){i.innerHTML='<br mce_bogus="1"/>'}}function k(y){var x=W.dom.getAttrib(y,"colspan");var i=W.dom.getAttrib(y,"rowspan");x=x==""?1:parseInt(x);i=i==""?1:parseInt(i);return{colspan:x,rowspan:i}}function am(ay,aA){var i,az;for(az=0;az<ay.length;az++){for(i=0;i<ay[az].length;i++){if(ay[az][i]==aA){return{cellindex:i,rowindex:az}}}}return null}function e(x,y,i){if(x[y]&&x[y][i]){return x[y][i]}return null}function B(aD,ay){var aA=[],y=0,aB,az,ay,aC;for(aB=0;aB<aD.rows.length;aB++){for(az=0;az<aD.rows[aB].cells.length;az++,y++){aA[y]=aD.rows[aB].cells[az]}}for(aB=0;aB<aA.length;aB++){if(aA[aB]==ay){if(aC=aA[aB+1]){return aC}}}}function f(aF){var i=[],aG=aF.rows,aD,aC,az,aA,aE,ay,aB;for(aC=0;aC<aG.length;aC++){for(aD=0;aD<aG[aC].cells.length;aD++){az=aG[aC].cells[aD];aA=k(az);for(aE=aD;i[aC]&&i[aC][aE];aE++){}for(aB=aC;aB<aC+aA.rowspan;aB++){if(!i[aB]){i[aB]=[]}for(ay=aE;ay<aE+aA.colspan;ay++){i[aB][ay]=az}}}}return i}function n(aH,aE,az,ay){var y=f(aH),aG=am(y,az);var aI,aD;if(ay.cells.length!=aE.childNodes.length){aI=aE.childNodes;aD=null;for(var aF=0;az=e(y,aG.rowindex,aF);aF++){var aB=true;var aC=k(az);if(aq(aI,az)){ay.childNodes[aF]._delete=true}else{if((aD==null||az!=aD)&&aC.colspan>1){for(var aA=aF;aA<aF+az.colSpan;aA++){ay.childNodes[aA]._delete=true}}}if((aD==null||az!=aD)&&aC.rowspan>1){az.rowSpan=aC.rowspan+1}aD=az}C(G)}}function P(x,i){while((x=x.previousSibling)!=null){if(x.nodeName==i){return x}}return null}function ag(ay,az){var x=az.split(",");while((ay=ay.nextSibling)!=null){for(var y=0;y<x.length;y++){if(ay.nodeName.toLowerCase()==x[y].toLowerCase()){return ay}}}return null}function C(ay){if(ay.rows==0){return}var y=ay.rows[0];do{var x=ag(y,"TR");if(y._delete){y.parentNode.removeChild(y);continue}var az=y.cells[0];if(az.cells>1){do{var i=ag(az,"TD,TH");if(az._delete){az.parentNode.removeChild(az)}}while((az=i)!=null)}}while((y=x)!=null)}function q(ay,aB,aA){ay.rowSpan=1;var x=ag(aB,"TR");for(var az=1;az<aA&&x;az++){var y=l.createElement("td");if(!tinymce.isIE){y.innerHTML='<br mce_bogus="1"/>'}if(tinymce.isIE){x.insertBefore(y,x.cells(ay.cellIndex))}else{x.insertBefore(y,x.cells[ay.cellIndex])}x=ag(x,"TR")}}function T(aG,aI,aC){var y=f(aI);var ay=aC.cloneNode(false);var aH=am(y,aC.cells[0]);var aD=null;var aB=W.dom.getAttrib(aI,"border");var aA=null;for(var aF=0;aA=e(y,aH.rowindex,aF);aF++){var aE=null;if(aD!=aA){for(var az=0;az<aC.cells.length;az++){if(aA==aC.cells[az]){aE=aA.cloneNode(true);break}}}if(aE==null){aE=aG.createElement("td");if(!tinymce.isIE){aE.innerHTML='<br mce_bogus="1"/>'}}aE.colSpan=1;aE.rowSpan=1;ay.appendChild(aE);aD=aA}return ay}switch(s){case"mceTableMoveToNextRow":var M=B(G,ar);if(!M){W.execCommand("mceTableInsertRowAfter",ar);M=B(G,ar)}W.selection.select(M);W.selection.collapse(true);return true;case"mceTableRowProps":if(X==null){return true}if(aa){W.windowManager.open({url:h+"/row.htm",width:400+parseInt(W.getLang("table.rowprops_delta_width",0)),height:295+parseInt(W.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:h})}return true;case"mceTableCellProps":if(ar==null){return true}if(aa){W.windowManager.open({url:h+"/cell.htm",width:400+parseInt(W.getLang("table.cellprops_delta_width",0)),height:295+parseInt(W.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:h})}return true;case"mceInsertTable":if(aa){W.windowManager.open({url:h+"/table.htm",width:400+parseInt(W.getLang("table.table_delta_width",0)),height:320+parseInt(W.getLang("table.table_delta_height",0)),inline:1},{plugin_url:h,action:af?af.action:0})}return true;case"mceTableDelete":var H=W.dom.getParent(W.selection.getNode(),"table");if(H){H.parentNode.removeChild(H);W.execCommand("mceRepaint")}return true;case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":if(!G){return true}if(X&&G!=X.parentNode){G=X.parentNode}if(G&&X){switch(s){case"mceTableCutRow":if(!X||!ar){return true}W.tableRowClipboard=T(l,G,X);W.execCommand("mceTableDeleteRow");break;case"mceTableCopyRow":if(!X||!ar){return true}W.tableRowClipboard=T(l,G,X);break;case"mceTablePasteRowBefore":if(!X||!ar){return true}var w=W.tableRowClipboard.cloneNode(true);var j=P(X,"TR");if(j!=null){n(G,j,j.cells[0],w)}X.parentNode.insertBefore(w,X);break;case"mceTablePasteRowAfter":if(!X||!ar){return true}var Y=ag(X,"TR");var w=W.tableRowClipboard.cloneNode(true);n(G,X,ar,w);if(Y==null){X.parentNode.appendChild(w)}else{Y.parentNode.insertBefore(w,Y)}break;case"mceTableInsertRowBefore":if(!X||!ar){return true}var ae=f(G);var p=am(ae,ar);var w=l.createElement("tr");var v=null;p.rowindex--;if(p.rowindex<0){p.rowindex=0}for(var ad=0;ar=e(ae,p.rowindex,ad);ad++){if(ar!=v){var F=k(ar);if(F.rowspan==1){var K=l.createElement("td");if(!tinymce.isIE){K.innerHTML='<br mce_bogus="1"/>'}K.colSpan=ar.colSpan;w.appendChild(K)}else{ar.rowSpan=F.rowspan+1}v=ar}}X.parentNode.insertBefore(w,X);ak(0,1);break;case"mceTableInsertRowAfter":if(!X||!ar){return true}var ae=f(G);var p=am(ae,ar);var w=l.createElement("tr");var v=null;for(var ad=0;ar=e(ae,p.rowindex,ad);ad++){if(ar!=v){var F=k(ar);if(F.rowspan==1){var K=l.createElement("td");if(!tinymce.isIE){K.innerHTML='<br mce_bogus="1"/>'}K.colSpan=ar.colSpan;w.appendChild(K)}else{ar.rowSpan=F.rowspan+1}v=ar}}if(w.hasChildNodes()){var Y=ag(X,"TR");if(Y){Y.parentNode.insertBefore(w,Y)}else{G.appendChild(w)}}ak(0,1);break;case"mceTableDeleteRow":if(!X||!ar){return true}var ae=f(G);var p=am(ae,ar);if(ae.length==1&&G.nodeName=="TBODY"){W.dom.remove(W.dom.getParent(G,"table"));return true}var E=X.cells;var Y=ag(X,"TR");for(var ad=0;ad<E.length;ad++){if(E[ad].rowSpan>1){var K=E[ad].cloneNode(true);var F=k(E[ad]);K.rowSpan=F.rowspan-1;var al=Y.cells[ad];if(al==null){Y.appendChild(K)}else{Y.insertBefore(K,al)}}}var v=null;for(var ad=0;ar=e(ae,p.rowindex,ad);ad++){if(ar!=v){var F=k(ar);if(F.rowspan>1){ar.rowSpan=F.rowspan-1}else{X=ar.parentNode;if(X.parentNode){X._delete=true}}v=ar}}C(G);ak(0,-1);break;case"mceTableInsertColBefore":if(!X||!ar){return true}var ae=f(W.dom.getParent(G,"table"));var p=am(ae,ar);var v=null;for(var ab=0;ar=e(ae,ab,p.cellindex);ab++){if(ar!=v){var F=k(ar);if(F.colspan==1){var K=l.createElement(ar.nodeName);if(!tinymce.isIE){K.innerHTML='<br mce_bogus="1"/>'}K.rowSpan=ar.rowSpan;ar.parentNode.insertBefore(K,ar)}else{ar.colSpan++}v=ar}}ak();break;case"mceTableInsertColAfter":if(!X||!ar){return true}var ae=f(W.dom.getParent(G,"table"));var p=am(ae,ar);var v=null;for(var ab=0;ar=e(ae,ab,p.cellindex);ab++){if(ar!=v){var F=k(ar);if(F.colspan==1){var K=l.createElement(ar.nodeName);if(!tinymce.isIE){K.innerHTML='<br mce_bogus="1"/>'}K.rowSpan=ar.rowSpan;var al=ag(ar,"TD,TH");if(al==null){ar.parentNode.appendChild(K)}else{al.parentNode.insertBefore(K,al)}}else{ar.colSpan++}v=ar}}ak(1);break;case"mceTableDeleteCol":if(!X||!ar){return true}var ae=f(G);var p=am(ae,ar);var v=null;if((ae.length>1&&ae[0].length<=1)&&G.nodeName=="TBODY"){W.dom.remove(W.dom.getParent(G,"table"));return true}for(var ab=0;ar=e(ae,ab,p.cellindex);ab++){if(ar!=v){var F=k(ar);if(F.colspan>1){ar.colSpan=F.colspan-1}else{if(ar.parentNode){ar.parentNode.removeChild(ar)}}v=ar}}ak(-1);break;case"mceTableSplitCells":if(!X||!ar){return true}var m=k(ar);var D=m.colspan;var I=m.rowspan;if(D>1||I>1){ar.colSpan=1;for(var an=1;an<D;an++){var K=l.createElement("td");if(!tinymce.isIE){K.innerHTML='<br mce_bogus="1"/>'}X.insertBefore(K,ag(ar,"TD,TH"));if(I>1){q(K,X,I)}}q(ar,X,I)}G=W.dom.getParent(W.selection.getNode(),"table");break;case"mceTableMergeCells":var ap=[];var S=W.selection.getSel();var ae=f(G);if(tinymce.isIE||S.rangeCount==1){if(aa){var u=k(ar);W.windowManager.open({url:h+"/merge_cells.htm",width:240+parseInt(W.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(W.getLang("table.merge_cells_delta_height",0)),inline:1},{action:"update",numcols:u.colspan,numrows:u.rowspan,plugin_url:h});return true}else{var V=parseInt(af.numrows);var d=parseInt(af.numcols);var p=am(ae,ar);if((""+V)=="NaN"){V=1}if((""+d)=="NaN"){d=1}var c=G.rows;for(var ab=p.rowindex;ab<ae.length;ab++){var ah=[];for(var ad=p.cellindex;ad<ae[ab].length;ad++){var g=e(ae,ab,ad);if(g&&!aq(ap,g)&&!aq(ah,g)){var O=am(ae,g);if(O.cellindex<p.cellindex+d&&O.rowindex<p.rowindex+V){ah[ah.length]=g}}}if(ah.length>0){ap[ap.length]=ah}var g=e(ae,p.rowindex,p.cellindex);b(av.dom.select("br",g),function(y,x){if(x>0&&av.dom.getAttrib("mce_bogus")){av.dom.remove(y)}})}}}else{var E=[];var S=W.selection.getSel();var Z=null;var ao=null;var A=-1,ax=-1,z,au;if(S.rangeCount<2){return true}for(var an=0;an<S.rangeCount;an++){var aj=S.getRangeAt(an);var ar=aj.startContainer.childNodes[aj.startOffset];if(!ar){break}if(ar.nodeName=="TD"||ar.nodeName=="TH"){E[E.length]=ar}}var c=G.rows;for(var ab=0;ab<c.length;ab++){var ah=[];for(var ad=0;ad<c[ab].cells.length;ad++){var g=c[ab].cells[ad];for(var an=0;an<E.length;an++){if(g==E[an]){ah[ah.length]=g}}}if(ah.length>0){ap[ap.length]=ah}}var ao=[];var Z=null;for(var ab=0;ab<ae.length;ab++){for(var ad=0;ad<ae[ab].length;ad++){ae[ab][ad]._selected=false;for(var an=0;an<E.length;an++){if(ae[ab][ad]==E[an]){if(A==-1){A=ad;ax=ab}z=ad;au=ab;ae[ab][ad]._selected=true}}}}for(var ab=ax;ab<=au;ab++){for(var ad=A;ad<=z;ad++){if(!ae[ab][ad]._selected){alert("Invalid selection for merge.");return true}}}}var t=1,r=1;var U=-1;for(var ab=0;ab<ap.length;ab++){var J=0;for(var ad=0;ad<ap[ab].length;ad++){var F=k(ap[ab][ad]);J+=F.colspan;if(U!=-1&&F.rowspan!=U){alert("Invalid selection for merge.");return true}U=F.rowspan}if(J>r){r=J}U=-1}var R=-1;for(var ad=0;ad<ap[0].length;ad++){var N=0;for(var ab=0;ab<ap.length;ab++){var F=k(ap[ab][ad]);N+=F.rowspan;if(R!=-1&&F.colspan!=R){alert("Invalid selection for merge.");return true}R=F.colspan}if(N>t){t=N}R=-1}ar=ap[0][0];ar.rowSpan=t;ar.colSpan=r;for(var ab=0;ab<ap.length;ab++){for(var ad=0;ad<ap[ab].length;ad++){var Q=ap[ab][ad].innerHTML;var L=Q.replace(/[ \t\r\n]/g,"");if(L!="<br/>"&&L!="<br>"&&L!='<br mce_bogus="1"/>'&&(ad+ab>0)){ar.innerHTML+=Q}if(ap[ab][ad]!=ar&&!ap[ab][ad]._deleted){var p=am(ae,ap[ab][ad]);var at=ap[ab][ad].parentNode;at.removeChild(ap[ab][ad]);ap[ab][ad]._deleted=true;if(!at.hasChildNodes()){at.parentNode.removeChild(at);var ac=null;for(var ad=0;cellElm=e(ae,p.rowindex,ad);ad++){if(cellElm!=ac&&cellElm.rowSpan>1){cellElm.rowSpan--}ac=cellElm}if(ar.rowSpan>1){ar.rowSpan--}}}}}b(av.dom.select("br",ar),function(y,x){if(x>0&&av.dom.getAttrib(y,"mce_bogus")){av.dom.remove(y)}});break}G=W.dom.getParent(W.selection.getNode(),"table");W.addVisual(G);W.nodeChanged()}return true}return false}});tinymce.PluginManager.add("table",tinymce.plugins.TablePlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/table/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/table/editor_plugin_src.js deleted file mode 100644 index 87b1055..0000000 --- a/public/javascripts/tiny_mce/plugins/table/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,1202 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 1209 2009-08-20 12:35:10Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | var each = tinymce.each; | ||
| 10 | |||
| 11 | // Checks if the selection/caret is at the start of the specified block element | ||
| 12 | function isAtStart(rng, par) { | ||
| 13 | var doc = par.ownerDocument, rng2 = doc.createRange(), elm; | ||
| 14 | |||
| 15 | rng2.setStartBefore(par); | ||
| 16 | rng2.setEnd(rng.endContainer, rng.endOffset); | ||
| 17 | |||
| 18 | elm = doc.createElement('body'); | ||
| 19 | elm.appendChild(rng2.cloneContents()); | ||
| 20 | |||
| 21 | // Check for text characters of other elements that should be treated as content | ||
| 22 | return elm.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi, '-').replace(/<[^>]+>/g, '').length == 0; | ||
| 23 | }; | ||
| 24 | |||
| 25 | tinymce.create('tinymce.plugins.TablePlugin', { | ||
| 26 | init : function(ed, url) { | ||
| 27 | var t = this; | ||
| 28 | |||
| 29 | t.editor = ed; | ||
| 30 | t.url = url; | ||
| 31 | |||
| 32 | // Register buttons | ||
| 33 | each([ | ||
| 34 | ['table', 'table.desc', 'mceInsertTable', true], | ||
| 35 | ['delete_table', 'table.del', 'mceTableDelete'], | ||
| 36 | ['delete_col', 'table.delete_col_desc', 'mceTableDeleteCol'], | ||
| 37 | ['delete_row', 'table.delete_row_desc', 'mceTableDeleteRow'], | ||
| 38 | ['col_after', 'table.col_after_desc', 'mceTableInsertColAfter'], | ||
| 39 | ['col_before', 'table.col_before_desc', 'mceTableInsertColBefore'], | ||
| 40 | ['row_after', 'table.row_after_desc', 'mceTableInsertRowAfter'], | ||
| 41 | ['row_before', 'table.row_before_desc', 'mceTableInsertRowBefore'], | ||
| 42 | ['row_props', 'table.row_desc', 'mceTableRowProps', true], | ||
| 43 | ['cell_props', 'table.cell_desc', 'mceTableCellProps', true], | ||
| 44 | ['split_cells', 'table.split_cells_desc', 'mceTableSplitCells', true], | ||
| 45 | ['merge_cells', 'table.merge_cells_desc', 'mceTableMergeCells', true] | ||
| 46 | ], function(c) { | ||
| 47 | ed.addButton(c[0], {title : c[1], cmd : c[2], ui : c[3]}); | ||
| 48 | }); | ||
| 49 | |||
| 50 | if (ed.getParam('inline_styles')) { | ||
| 51 | // Force move of attribs to styles in strict mode | ||
| 52 | ed.onPreProcess.add(function(ed, o) { | ||
| 53 | var dom = ed.dom; | ||
| 54 | |||
| 55 | each(dom.select('table', o.node), function(n) { | ||
| 56 | var v; | ||
| 57 | |||
| 58 | if (v = dom.getAttrib(n, 'width')) { | ||
| 59 | dom.setStyle(n, 'width', v); | ||
| 60 | dom.setAttrib(n, 'width'); | ||
| 61 | } | ||
| 62 | |||
| 63 | if (v = dom.getAttrib(n, 'height')) { | ||
| 64 | dom.setStyle(n, 'height', v); | ||
| 65 | dom.setAttrib(n, 'height'); | ||
| 66 | } | ||
| 67 | }); | ||
| 68 | }); | ||
| 69 | } | ||
| 70 | |||
| 71 | ed.onInit.add(function() { | ||
| 72 | // Fixes an issue on Gecko where it's impossible to place the caret behind a table | ||
| 73 | // This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled | ||
| 74 | if (!tinymce.isIE && ed.getParam('forced_root_block')) { | ||
| 75 | function fixTableCaretPos() { | ||
| 76 | var last = ed.getBody().lastChild; | ||
| 77 | |||
| 78 | if (last && last.nodeName == 'TABLE') | ||
| 79 | ed.dom.add(ed.getBody(), 'p', null, '<br mce_bogus="1" />'); | ||
| 80 | }; | ||
| 81 | |||
| 82 | // Fixes an bug where it's impossible to place the caret before a table in Gecko | ||
| 83 | // this fix solves it by detecting when the caret is at the beginning of such a table | ||
| 84 | // and then manually moves the caret infront of the table | ||
| 85 | if (tinymce.isGecko) { | ||
| 86 | ed.onKeyDown.add(function(ed, e) { | ||
| 87 | var rng, table, dom = ed.dom; | ||
| 88 | |||
| 89 | // On gecko it's not possible to place the caret before a table | ||
| 90 | if (e.keyCode == 37 || e.keyCode == 38) { | ||
| 91 | rng = ed.selection.getRng(); | ||
| 92 | table = dom.getParent(rng.startContainer, 'table'); | ||
| 93 | |||
| 94 | if (table && ed.getBody().firstChild == table) { | ||
| 95 | if (isAtStart(rng, table)) { | ||
| 96 | rng = dom.createRng(); | ||
| 97 | |||
| 98 | rng.setStartBefore(table); | ||
| 99 | rng.setEndBefore(table); | ||
| 100 | |||
| 101 | ed.selection.setRng(rng); | ||
| 102 | |||
| 103 | e.preventDefault(); | ||
| 104 | } | ||
| 105 | } | ||
| 106 | } | ||
| 107 | }); | ||
| 108 | } | ||
| 109 | |||
| 110 | ed.onKeyUp.add(fixTableCaretPos); | ||
| 111 | ed.onSetContent.add(fixTableCaretPos); | ||
| 112 | ed.onVisualAid.add(fixTableCaretPos); | ||
| 113 | |||
| 114 | ed.onPreProcess.add(function(ed, o) { | ||
| 115 | var last = o.node.lastChild; | ||
| 116 | |||
| 117 | if (last && last.childNodes.length == 1 && last.firstChild.nodeName == 'BR') | ||
| 118 | ed.dom.remove(last); | ||
| 119 | }); | ||
| 120 | |||
| 121 | fixTableCaretPos(); | ||
| 122 | } | ||
| 123 | |||
| 124 | if (ed && ed.plugins.contextmenu) { | ||
| 125 | ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) { | ||
| 126 | var sm, se = ed.selection, el = se.getNode() || ed.getBody(); | ||
| 127 | |||
| 128 | if (ed.dom.getParent(e, 'td') || ed.dom.getParent(e, 'th')) { | ||
| 129 | m.removeAll(); | ||
| 130 | |||
| 131 | if (el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) { | ||
| 132 | m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true}); | ||
| 133 | m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'}); | ||
| 134 | m.addSeparator(); | ||
| 135 | } | ||
| 136 | |||
| 137 | if (el.nodeName == 'IMG' && el.className.indexOf('mceItem') == -1) { | ||
| 138 | m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true}); | ||
| 139 | m.addSeparator(); | ||
| 140 | } | ||
| 141 | |||
| 142 | m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', ui : true, value : {action : 'insert'}}); | ||
| 143 | m.add({title : 'table.props_desc', icon : 'table_props', cmd : 'mceInsertTable', ui : true}); | ||
| 144 | m.add({title : 'table.del', icon : 'delete_table', cmd : 'mceTableDelete', ui : true}); | ||
| 145 | m.addSeparator(); | ||
| 146 | |||
| 147 | // Cell menu | ||
| 148 | sm = m.addMenu({title : 'table.cell'}); | ||
| 149 | sm.add({title : 'table.cell_desc', icon : 'cell_props', cmd : 'mceTableCellProps', ui : true}); | ||
| 150 | sm.add({title : 'table.split_cells_desc', icon : 'split_cells', cmd : 'mceTableSplitCells', ui : true}); | ||
| 151 | sm.add({title : 'table.merge_cells_desc', icon : 'merge_cells', cmd : 'mceTableMergeCells', ui : true}); | ||
| 152 | |||
| 153 | // Row menu | ||
| 154 | sm = m.addMenu({title : 'table.row'}); | ||
| 155 | sm.add({title : 'table.row_desc', icon : 'row_props', cmd : 'mceTableRowProps', ui : true}); | ||
| 156 | sm.add({title : 'table.row_before_desc', icon : 'row_before', cmd : 'mceTableInsertRowBefore'}); | ||
| 157 | sm.add({title : 'table.row_after_desc', icon : 'row_after', cmd : 'mceTableInsertRowAfter'}); | ||
| 158 | sm.add({title : 'table.delete_row_desc', icon : 'delete_row', cmd : 'mceTableDeleteRow'}); | ||
| 159 | sm.addSeparator(); | ||
| 160 | sm.add({title : 'table.cut_row_desc', icon : 'cut', cmd : 'mceTableCutRow'}); | ||
| 161 | sm.add({title : 'table.copy_row_desc', icon : 'copy', cmd : 'mceTableCopyRow'}); | ||
| 162 | sm.add({title : 'table.paste_row_before_desc', icon : 'paste', cmd : 'mceTablePasteRowBefore'}); | ||
| 163 | sm.add({title : 'table.paste_row_after_desc', icon : 'paste', cmd : 'mceTablePasteRowAfter'}); | ||
| 164 | |||
| 165 | // Column menu | ||
| 166 | sm = m.addMenu({title : 'table.col'}); | ||
| 167 | sm.add({title : 'table.col_before_desc', icon : 'col_before', cmd : 'mceTableInsertColBefore'}); | ||
| 168 | sm.add({title : 'table.col_after_desc', icon : 'col_after', cmd : 'mceTableInsertColAfter'}); | ||
| 169 | sm.add({title : 'table.delete_col_desc', icon : 'delete_col', cmd : 'mceTableDeleteCol'}); | ||
| 170 | } else | ||
| 171 | m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', ui : true}); | ||
| 172 | }); | ||
| 173 | } | ||
| 174 | }); | ||
| 175 | |||
| 176 | // Add undo level when new rows are created using the tab key | ||
| 177 | ed.onKeyDown.add(function(ed, e) { | ||
| 178 | if (e.keyCode == 9 && ed.dom.getParent(ed.selection.getNode(), 'TABLE')) { | ||
| 179 | if (!tinymce.isGecko && !tinymce.isOpera) { | ||
| 180 | tinyMCE.execInstanceCommand(ed.editorId, "mceTableMoveToNextRow", true); | ||
| 181 | return tinymce.dom.Event.cancel(e); | ||
| 182 | } | ||
| 183 | |||
| 184 | ed.undoManager.add(); | ||
| 185 | } | ||
| 186 | }); | ||
| 187 | |||
| 188 | // Select whole table is a table border is clicked | ||
| 189 | if (!tinymce.isIE) { | ||
| 190 | if (ed.getParam('table_selection', true)) { | ||
| 191 | ed.onClick.add(function(ed, e) { | ||
| 192 | e = e.target; | ||
| 193 | |||
| 194 | if (e.nodeName === 'TABLE') | ||
| 195 | ed.selection.select(e); | ||
| 196 | }); | ||
| 197 | } | ||
| 198 | } | ||
| 199 | |||
| 200 | ed.onNodeChange.add(function(ed, cm, n) { | ||
| 201 | var p = ed.dom.getParent(n, 'td,th,caption'); | ||
| 202 | |||
| 203 | cm.setActive('table', n.nodeName === 'TABLE' || !!p); | ||
| 204 | if (p && p.nodeName === 'CAPTION') | ||
| 205 | p = null; | ||
| 206 | |||
| 207 | cm.setDisabled('delete_table', !p); | ||
| 208 | cm.setDisabled('delete_col', !p); | ||
| 209 | cm.setDisabled('delete_table', !p); | ||
| 210 | cm.setDisabled('delete_row', !p); | ||
| 211 | cm.setDisabled('col_after', !p); | ||
| 212 | cm.setDisabled('col_before', !p); | ||
| 213 | cm.setDisabled('row_after', !p); | ||
| 214 | cm.setDisabled('row_before', !p); | ||
| 215 | cm.setDisabled('row_props', !p); | ||
| 216 | cm.setDisabled('cell_props', !p); | ||
| 217 | cm.setDisabled('split_cells', !p || (parseInt(ed.dom.getAttrib(p, 'colspan', '1')) < 2 && parseInt(ed.dom.getAttrib(p, 'rowspan', '1')) < 2)); | ||
| 218 | cm.setDisabled('merge_cells', !p); | ||
| 219 | }); | ||
| 220 | |||
| 221 | // Padd empty table cells | ||
| 222 | if (!tinymce.isIE) { | ||
| 223 | ed.onBeforeSetContent.add(function(ed, o) { | ||
| 224 | if (o.initial) | ||
| 225 | o.content = o.content.replace(/<(td|th)([^>]+|)>\s*<\/(td|th)>/g, tinymce.isOpera ? '<$1$2> </$1>' : '<$1$2><br mce_bogus="1" /></$1>'); | ||
| 226 | }); | ||
| 227 | } | ||
| 228 | }, | ||
| 229 | |||
| 230 | execCommand : function(cmd, ui, val) { | ||
| 231 | var ed = this.editor, b; | ||
| 232 | |||
| 233 | // Is table command | ||
| 234 | switch (cmd) { | ||
| 235 | case "mceTableMoveToNextRow": | ||
| 236 | case "mceInsertTable": | ||
| 237 | case "mceTableRowProps": | ||
| 238 | case "mceTableCellProps": | ||
| 239 | case "mceTableSplitCells": | ||
| 240 | case "mceTableMergeCells": | ||
| 241 | case "mceTableInsertRowBefore": | ||
| 242 | case "mceTableInsertRowAfter": | ||
| 243 | case "mceTableDeleteRow": | ||
| 244 | case "mceTableInsertColBefore": | ||
| 245 | case "mceTableInsertColAfter": | ||
| 246 | case "mceTableDeleteCol": | ||
| 247 | case "mceTableCutRow": | ||
| 248 | case "mceTableCopyRow": | ||
| 249 | case "mceTablePasteRowBefore": | ||
| 250 | case "mceTablePasteRowAfter": | ||
| 251 | case "mceTableDelete": | ||
| 252 | ed.execCommand('mceBeginUndoLevel'); | ||
| 253 | this._doExecCommand(cmd, ui, val); | ||
| 254 | ed.execCommand('mceEndUndoLevel'); | ||
| 255 | |||
| 256 | return true; | ||
| 257 | } | ||
| 258 | |||
| 259 | // Pass to next handler in chain | ||
| 260 | return false; | ||
| 261 | }, | ||
| 262 | |||
| 263 | getInfo : function() { | ||
| 264 | return { | ||
| 265 | longname : 'Tables', | ||
| 266 | author : 'Moxiecode Systems AB', | ||
| 267 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 268 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/table', | ||
| 269 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 270 | }; | ||
| 271 | }, | ||
| 272 | |||
| 273 | // Private plugin internal methods | ||
| 274 | |||
| 275 | /** | ||
| 276 | * Executes the table commands. | ||
| 277 | */ | ||
| 278 | _doExecCommand : function(command, user_interface, value) { | ||
| 279 | var inst = this.editor, ed = inst, url = this.url; | ||
| 280 | var focusElm = inst.selection.getNode(); | ||
| 281 | var trElm = inst.dom.getParent(focusElm, "tr"); | ||
| 282 | var tdElm = inst.dom.getParent(focusElm, "td,th"); | ||
| 283 | var tableElm = inst.dom.getParent(focusElm, "table"); | ||
| 284 | var doc = inst.contentWindow.document; | ||
| 285 | var tableBorder = tableElm ? tableElm.getAttribute("border") : ""; | ||
| 286 | |||
| 287 | // Get first TD if no TD found | ||
| 288 | if (trElm && tdElm == null) | ||
| 289 | tdElm = trElm.cells[0]; | ||
| 290 | |||
| 291 | function inArray(ar, v) { | ||
| 292 | for (var i=0; i<ar.length; i++) { | ||
| 293 | // Is array | ||
| 294 | if (ar[i].length > 0 && inArray(ar[i], v)) | ||
| 295 | return true; | ||
| 296 | |||
| 297 | // Found value | ||
| 298 | if (ar[i] == v) | ||
| 299 | return true; | ||
| 300 | } | ||
| 301 | |||
| 302 | return false; | ||
| 303 | } | ||
| 304 | |||
| 305 | function select(dx, dy) { | ||
| 306 | var td; | ||
| 307 | |||
| 308 | grid = getTableGrid(tableElm); | ||
| 309 | dx = dx || 0; | ||
| 310 | dy = dy || 0; | ||
| 311 | dx = Math.max(cpos.cellindex + dx, 0); | ||
| 312 | dy = Math.max(cpos.rowindex + dy, 0); | ||
| 313 | |||
| 314 | // Recalculate grid and select | ||
| 315 | inst.execCommand('mceRepaint'); | ||
| 316 | td = getCell(grid, dy, dx); | ||
| 317 | |||
| 318 | if (td) { | ||
| 319 | inst.selection.select(td.firstChild || td); | ||
| 320 | inst.selection.collapse(1); | ||
| 321 | } | ||
| 322 | }; | ||
| 323 | |||
| 324 | function makeTD() { | ||
| 325 | var newTD = doc.createElement("td"); | ||
| 326 | |||
| 327 | if (!tinymce.isIE) | ||
| 328 | newTD.innerHTML = '<br mce_bogus="1"/>'; | ||
| 329 | } | ||
| 330 | |||
| 331 | function getColRowSpan(td) { | ||
| 332 | var colspan = inst.dom.getAttrib(td, "colspan"); | ||
| 333 | var rowspan = inst.dom.getAttrib(td, "rowspan"); | ||
| 334 | |||
| 335 | colspan = colspan == "" ? 1 : parseInt(colspan); | ||
| 336 | rowspan = rowspan == "" ? 1 : parseInt(rowspan); | ||
| 337 | |||
| 338 | return {colspan : colspan, rowspan : rowspan}; | ||
| 339 | } | ||
| 340 | |||
| 341 | function getCellPos(grid, td) { | ||
| 342 | var x, y; | ||
| 343 | |||
| 344 | for (y=0; y<grid.length; y++) { | ||
| 345 | for (x=0; x<grid[y].length; x++) { | ||
| 346 | if (grid[y][x] == td) | ||
| 347 | return {cellindex : x, rowindex : y}; | ||
| 348 | } | ||
| 349 | } | ||
| 350 | |||
| 351 | return null; | ||
| 352 | } | ||
| 353 | |||
| 354 | function getCell(grid, row, col) { | ||
| 355 | if (grid[row] && grid[row][col]) | ||
| 356 | return grid[row][col]; | ||
| 357 | |||
| 358 | return null; | ||
| 359 | } | ||
| 360 | |||
| 361 | function getNextCell(table, cell) { | ||
| 362 | var cells = [], x = 0, i, j, cell, nextCell; | ||
| 363 | |||
| 364 | for (i = 0; i < table.rows.length; i++) | ||
| 365 | for (j = 0; j < table.rows[i].cells.length; j++, x++) | ||
| 366 | cells[x] = table.rows[i].cells[j]; | ||
| 367 | |||
| 368 | for (i = 0; i < cells.length; i++) | ||
| 369 | if (cells[i] == cell) | ||
| 370 | if (nextCell = cells[i+1]) | ||
| 371 | return nextCell; | ||
| 372 | } | ||
| 373 | |||
| 374 | function getTableGrid(table) { | ||
| 375 | var grid = [], rows = table.rows, x, y, td, sd, xstart, x2, y2; | ||
| 376 | |||
| 377 | for (y=0; y<rows.length; y++) { | ||
| 378 | for (x=0; x<rows[y].cells.length; x++) { | ||
| 379 | td = rows[y].cells[x]; | ||
| 380 | sd = getColRowSpan(td); | ||
| 381 | |||
| 382 | // All ready filled | ||
| 383 | for (xstart = x; grid[y] && grid[y][xstart]; xstart++) ; | ||
| 384 | |||
| 385 | // Fill box | ||
| 386 | for (y2=y; y2<y+sd['rowspan']; y2++) { | ||
| 387 | if (!grid[y2]) | ||
| 388 | grid[y2] = []; | ||
| 389 | |||
| 390 | for (x2=xstart; x2<xstart+sd['colspan']; x2++) | ||
| 391 | grid[y2][x2] = td; | ||
| 392 | } | ||
| 393 | } | ||
| 394 | } | ||
| 395 | |||
| 396 | return grid; | ||
| 397 | } | ||
| 398 | |||
| 399 | function trimRow(table, tr, td, new_tr) { | ||
| 400 | var grid = getTableGrid(table), cpos = getCellPos(grid, td); | ||
| 401 | var cells, lastElm; | ||
| 402 | |||
| 403 | // Time to crop away some | ||
| 404 | if (new_tr.cells.length != tr.childNodes.length) { | ||
| 405 | cells = tr.childNodes; | ||
| 406 | lastElm = null; | ||
| 407 | |||
| 408 | for (var x=0; td = getCell(grid, cpos.rowindex, x); x++) { | ||
| 409 | var remove = true; | ||
| 410 | var sd = getColRowSpan(td); | ||
| 411 | |||
| 412 | // Remove due to rowspan | ||
| 413 | if (inArray(cells, td)) { | ||
| 414 | new_tr.childNodes[x]._delete = true; | ||
| 415 | } else if ((lastElm == null || td != lastElm) && sd.colspan > 1) { // Remove due to colspan | ||
| 416 | for (var i=x; i<x+td.colSpan; i++) | ||
| 417 | new_tr.childNodes[i]._delete = true; | ||
| 418 | } | ||
| 419 | |||
| 420 | if ((lastElm == null || td != lastElm) && sd.rowspan > 1) | ||
| 421 | td.rowSpan = sd.rowspan + 1; | ||
| 422 | |||
| 423 | lastElm = td; | ||
| 424 | } | ||
| 425 | |||
| 426 | deleteMarked(tableElm); | ||
| 427 | } | ||
| 428 | } | ||
| 429 | |||
| 430 | function prevElm(node, name) { | ||
| 431 | while ((node = node.previousSibling) != null) { | ||
| 432 | if (node.nodeName == name) | ||
| 433 | return node; | ||
| 434 | } | ||
| 435 | |||
| 436 | return null; | ||
| 437 | } | ||
| 438 | |||
| 439 | function nextElm(node, names) { | ||
| 440 | var namesAr = names.split(','); | ||
| 441 | |||
| 442 | while ((node = node.nextSibling) != null) { | ||
| 443 | for (var i=0; i<namesAr.length; i++) { | ||
| 444 | if (node.nodeName.toLowerCase() == namesAr[i].toLowerCase() ) | ||
| 445 | return node; | ||
| 446 | } | ||
| 447 | } | ||
| 448 | |||
| 449 | return null; | ||
| 450 | } | ||
| 451 | |||
| 452 | function deleteMarked(tbl) { | ||
| 453 | if (tbl.rows == 0) | ||
| 454 | return; | ||
| 455 | |||
| 456 | var tr = tbl.rows[0]; | ||
| 457 | do { | ||
| 458 | var next = nextElm(tr, "TR"); | ||
| 459 | |||
| 460 | // Delete row | ||
| 461 | if (tr._delete) { | ||
| 462 | tr.parentNode.removeChild(tr); | ||
| 463 | continue; | ||
| 464 | } | ||
| 465 | |||
| 466 | // Delete cells | ||
| 467 | var td = tr.cells[0]; | ||
| 468 | if (td.cells > 1) { | ||
| 469 | do { | ||
| 470 | var nexttd = nextElm(td, "TD,TH"); | ||
| 471 | |||
| 472 | if (td._delete) | ||
| 473 | td.parentNode.removeChild(td); | ||
| 474 | } while ((td = nexttd) != null); | ||
| 475 | } | ||
| 476 | } while ((tr = next) != null); | ||
| 477 | } | ||
| 478 | |||
| 479 | function addRows(td_elm, tr_elm, rowspan) { | ||
| 480 | // Add rows | ||
| 481 | td_elm.rowSpan = 1; | ||
| 482 | var trNext = nextElm(tr_elm, "TR"); | ||
| 483 | for (var i=1; i<rowspan && trNext; i++) { | ||
| 484 | var newTD = doc.createElement("td"); | ||
| 485 | |||
| 486 | if (!tinymce.isIE) | ||
| 487 | newTD.innerHTML = '<br mce_bogus="1"/>'; | ||
| 488 | |||
| 489 | if (tinymce.isIE) | ||
| 490 | trNext.insertBefore(newTD, trNext.cells(td_elm.cellIndex)); | ||
| 491 | else | ||
| 492 | trNext.insertBefore(newTD, trNext.cells[td_elm.cellIndex]); | ||
| 493 | |||
| 494 | trNext = nextElm(trNext, "TR"); | ||
| 495 | } | ||
| 496 | } | ||
| 497 | |||
| 498 | function copyRow(doc, table, tr) { | ||
| 499 | var grid = getTableGrid(table); | ||
| 500 | var newTR = tr.cloneNode(false); | ||
| 501 | var cpos = getCellPos(grid, tr.cells[0]); | ||
| 502 | var lastCell = null; | ||
| 503 | var tableBorder = inst.dom.getAttrib(table, "border"); | ||
| 504 | var tdElm = null; | ||
| 505 | |||
| 506 | for (var x=0; tdElm = getCell(grid, cpos.rowindex, x); x++) { | ||
| 507 | var newTD = null; | ||
| 508 | |||
| 509 | if (lastCell != tdElm) { | ||
| 510 | for (var i=0; i<tr.cells.length; i++) { | ||
| 511 | if (tdElm == tr.cells[i]) { | ||
| 512 | newTD = tdElm.cloneNode(true); | ||
| 513 | break; | ||
| 514 | } | ||
| 515 | } | ||
| 516 | } | ||
| 517 | |||
| 518 | if (newTD == null) { | ||
| 519 | newTD = doc.createElement("td"); | ||
| 520 | |||
| 521 | if (!tinymce.isIE) | ||
| 522 | newTD.innerHTML = '<br mce_bogus="1"/>'; | ||
| 523 | } | ||
| 524 | |||
| 525 | // Reset col/row span | ||
| 526 | newTD.colSpan = 1; | ||
| 527 | newTD.rowSpan = 1; | ||
| 528 | |||
| 529 | newTR.appendChild(newTD); | ||
| 530 | |||
| 531 | lastCell = tdElm; | ||
| 532 | } | ||
| 533 | |||
| 534 | return newTR; | ||
| 535 | } | ||
| 536 | |||
| 537 | // ---- Commands ----- | ||
| 538 | |||
| 539 | // Handle commands | ||
| 540 | switch (command) { | ||
| 541 | case "mceTableMoveToNextRow": | ||
| 542 | var nextCell = getNextCell(tableElm, tdElm); | ||
| 543 | |||
| 544 | if (!nextCell) { | ||
| 545 | inst.execCommand("mceTableInsertRowAfter", tdElm); | ||
| 546 | nextCell = getNextCell(tableElm, tdElm); | ||
| 547 | } | ||
| 548 | |||
| 549 | inst.selection.select(nextCell); | ||
| 550 | inst.selection.collapse(true); | ||
| 551 | |||
| 552 | return true; | ||
| 553 | |||
| 554 | case "mceTableRowProps": | ||
| 555 | if (trElm == null) | ||
| 556 | return true; | ||
| 557 | |||
| 558 | if (user_interface) { | ||
| 559 | inst.windowManager.open({ | ||
| 560 | url : url + '/row.htm', | ||
| 561 | width : 400 + parseInt(inst.getLang('table.rowprops_delta_width', 0)), | ||
| 562 | height : 295 + parseInt(inst.getLang('table.rowprops_delta_height', 0)), | ||
| 563 | inline : 1 | ||
| 564 | }, { | ||
| 565 | plugin_url : url | ||
| 566 | }); | ||
| 567 | } | ||
| 568 | |||
| 569 | return true; | ||
| 570 | |||
| 571 | case "mceTableCellProps": | ||
| 572 | if (tdElm == null) | ||
| 573 | return true; | ||
| 574 | |||
| 575 | if (user_interface) { | ||
| 576 | inst.windowManager.open({ | ||
| 577 | url : url + '/cell.htm', | ||
| 578 | width : 400 + parseInt(inst.getLang('table.cellprops_delta_width', 0)), | ||
| 579 | height : 295 + parseInt(inst.getLang('table.cellprops_delta_height', 0)), | ||
| 580 | inline : 1 | ||
| 581 | }, { | ||
| 582 | plugin_url : url | ||
| 583 | }); | ||
| 584 | } | ||
| 585 | |||
| 586 | return true; | ||
| 587 | |||
| 588 | case "mceInsertTable": | ||
| 589 | if (user_interface) { | ||
| 590 | inst.windowManager.open({ | ||
| 591 | url : url + '/table.htm', | ||
| 592 | width : 400 + parseInt(inst.getLang('table.table_delta_width', 0)), | ||
| 593 | height : 320 + parseInt(inst.getLang('table.table_delta_height', 0)), | ||
| 594 | inline : 1 | ||
| 595 | }, { | ||
| 596 | plugin_url : url, | ||
| 597 | action : value ? value.action : 0 | ||
| 598 | }); | ||
| 599 | } | ||
| 600 | |||
| 601 | return true; | ||
| 602 | |||
| 603 | case "mceTableDelete": | ||
| 604 | var table = inst.dom.getParent(inst.selection.getNode(), "table"); | ||
| 605 | if (table) { | ||
| 606 | table.parentNode.removeChild(table); | ||
| 607 | inst.execCommand('mceRepaint'); | ||
| 608 | } | ||
| 609 | return true; | ||
| 610 | |||
| 611 | case "mceTableSplitCells": | ||
| 612 | case "mceTableMergeCells": | ||
| 613 | case "mceTableInsertRowBefore": | ||
| 614 | case "mceTableInsertRowAfter": | ||
| 615 | case "mceTableDeleteRow": | ||
| 616 | case "mceTableInsertColBefore": | ||
| 617 | case "mceTableInsertColAfter": | ||
| 618 | case "mceTableDeleteCol": | ||
| 619 | case "mceTableCutRow": | ||
| 620 | case "mceTableCopyRow": | ||
| 621 | case "mceTablePasteRowBefore": | ||
| 622 | case "mceTablePasteRowAfter": | ||
| 623 | // No table just return (invalid command) | ||
| 624 | if (!tableElm) | ||
| 625 | return true; | ||
| 626 | |||
| 627 | // Table has a tbody use that reference | ||
| 628 | // Changed logic by ApTest 2005.07.12 (www.aptest.com) | ||
| 629 | // Now lookk at the focused element and take its parentNode. That will be a tbody or a table. | ||
| 630 | if (trElm && tableElm != trElm.parentNode) | ||
| 631 | tableElm = trElm.parentNode; | ||
| 632 | |||
| 633 | if (tableElm && trElm) { | ||
| 634 | switch (command) { | ||
| 635 | case "mceTableCutRow": | ||
| 636 | if (!trElm || !tdElm) | ||
| 637 | return true; | ||
| 638 | |||
| 639 | inst.tableRowClipboard = copyRow(doc, tableElm, trElm); | ||
| 640 | inst.execCommand("mceTableDeleteRow"); | ||
| 641 | break; | ||
| 642 | |||
| 643 | case "mceTableCopyRow": | ||
| 644 | if (!trElm || !tdElm) | ||
| 645 | return true; | ||
| 646 | |||
| 647 | inst.tableRowClipboard = copyRow(doc, tableElm, trElm); | ||
| 648 | break; | ||
| 649 | |||
| 650 | case "mceTablePasteRowBefore": | ||
| 651 | if (!trElm || !tdElm) | ||
| 652 | return true; | ||
| 653 | |||
| 654 | var newTR = inst.tableRowClipboard.cloneNode(true); | ||
| 655 | |||
| 656 | var prevTR = prevElm(trElm, "TR"); | ||
| 657 | if (prevTR != null) | ||
| 658 | trimRow(tableElm, prevTR, prevTR.cells[0], newTR); | ||
| 659 | |||
| 660 | trElm.parentNode.insertBefore(newTR, trElm); | ||
| 661 | break; | ||
| 662 | |||
| 663 | case "mceTablePasteRowAfter": | ||
| 664 | if (!trElm || !tdElm) | ||
| 665 | return true; | ||
| 666 | |||
| 667 | var nextTR = nextElm(trElm, "TR"); | ||
| 668 | var newTR = inst.tableRowClipboard.cloneNode(true); | ||
| 669 | |||
| 670 | trimRow(tableElm, trElm, tdElm, newTR); | ||
| 671 | |||
| 672 | if (nextTR == null) | ||
| 673 | trElm.parentNode.appendChild(newTR); | ||
| 674 | else | ||
| 675 | nextTR.parentNode.insertBefore(newTR, nextTR); | ||
| 676 | |||
| 677 | break; | ||
| 678 | |||
| 679 | case "mceTableInsertRowBefore": | ||
| 680 | if (!trElm || !tdElm) | ||
| 681 | return true; | ||
| 682 | |||
| 683 | var grid = getTableGrid(tableElm); | ||
| 684 | var cpos = getCellPos(grid, tdElm); | ||
| 685 | var newTR = doc.createElement("tr"); | ||
| 686 | var lastTDElm = null; | ||
| 687 | |||
| 688 | cpos.rowindex--; | ||
| 689 | if (cpos.rowindex < 0) | ||
| 690 | cpos.rowindex = 0; | ||
| 691 | |||
| 692 | // Create cells | ||
| 693 | for (var x=0; tdElm = getCell(grid, cpos.rowindex, x); x++) { | ||
| 694 | if (tdElm != lastTDElm) { | ||
| 695 | var sd = getColRowSpan(tdElm); | ||
| 696 | |||
| 697 | if (sd['rowspan'] == 1) { | ||
| 698 | var newTD = doc.createElement("td"); | ||
| 699 | |||
| 700 | if (!tinymce.isIE) | ||
| 701 | newTD.innerHTML = '<br mce_bogus="1"/>'; | ||
| 702 | |||
| 703 | newTD.colSpan = tdElm.colSpan; | ||
| 704 | |||
| 705 | newTR.appendChild(newTD); | ||
| 706 | } else | ||
| 707 | tdElm.rowSpan = sd['rowspan'] + 1; | ||
| 708 | |||
| 709 | lastTDElm = tdElm; | ||
| 710 | } | ||
| 711 | } | ||
| 712 | |||
| 713 | trElm.parentNode.insertBefore(newTR, trElm); | ||
| 714 | select(0, 1); | ||
| 715 | break; | ||
| 716 | |||
| 717 | case "mceTableInsertRowAfter": | ||
| 718 | if (!trElm || !tdElm) | ||
| 719 | return true; | ||
| 720 | |||
| 721 | var grid = getTableGrid(tableElm); | ||
| 722 | var cpos = getCellPos(grid, tdElm); | ||
| 723 | var newTR = doc.createElement("tr"); | ||
| 724 | var lastTDElm = null; | ||
| 725 | |||
| 726 | // Create cells | ||
| 727 | for (var x=0; tdElm = getCell(grid, cpos.rowindex, x); x++) { | ||
| 728 | if (tdElm != lastTDElm) { | ||
| 729 | var sd = getColRowSpan(tdElm); | ||
| 730 | |||
| 731 | if (sd['rowspan'] == 1) { | ||
| 732 | var newTD = doc.createElement("td"); | ||
| 733 | |||
| 734 | if (!tinymce.isIE) | ||
| 735 | newTD.innerHTML = '<br mce_bogus="1"/>'; | ||
| 736 | |||
| 737 | newTD.colSpan = tdElm.colSpan; | ||
| 738 | |||
| 739 | newTR.appendChild(newTD); | ||
| 740 | } else | ||
| 741 | tdElm.rowSpan = sd['rowspan'] + 1; | ||
| 742 | |||
| 743 | lastTDElm = tdElm; | ||
| 744 | } | ||
| 745 | } | ||
| 746 | |||
| 747 | if (newTR.hasChildNodes()) { | ||
| 748 | var nextTR = nextElm(trElm, "TR"); | ||
| 749 | if (nextTR) | ||
| 750 | nextTR.parentNode.insertBefore(newTR, nextTR); | ||
| 751 | else | ||
| 752 | tableElm.appendChild(newTR); | ||
| 753 | } | ||
| 754 | |||
| 755 | select(0, 1); | ||
| 756 | break; | ||
| 757 | |||
| 758 | case "mceTableDeleteRow": | ||
| 759 | if (!trElm || !tdElm) | ||
| 760 | return true; | ||
| 761 | |||
| 762 | var grid = getTableGrid(tableElm); | ||
| 763 | var cpos = getCellPos(grid, tdElm); | ||
| 764 | |||
| 765 | // Only one row, remove whole table | ||
| 766 | if (grid.length == 1 && tableElm.nodeName == 'TBODY') { | ||
| 767 | inst.dom.remove(inst.dom.getParent(tableElm, "table")); | ||
| 768 | return true; | ||
| 769 | } | ||
| 770 | |||
| 771 | // Move down row spanned cells | ||
| 772 | var cells = trElm.cells; | ||
| 773 | var nextTR = nextElm(trElm, "TR"); | ||
| 774 | for (var x=0; x<cells.length; x++) { | ||
| 775 | if (cells[x].rowSpan > 1) { | ||
| 776 | var newTD = cells[x].cloneNode(true); | ||
| 777 | var sd = getColRowSpan(cells[x]); | ||
| 778 | |||
| 779 | newTD.rowSpan = sd.rowspan - 1; | ||
| 780 | |||
| 781 | var nextTD = nextTR.cells[x]; | ||
| 782 | |||
| 783 | if (nextTD == null) | ||
| 784 | nextTR.appendChild(newTD); | ||
| 785 | else | ||
| 786 | nextTR.insertBefore(newTD, nextTD); | ||
| 787 | } | ||
| 788 | } | ||
| 789 | |||
| 790 | // Delete cells | ||
| 791 | var lastTDElm = null; | ||
| 792 | for (var x=0; tdElm = getCell(grid, cpos.rowindex, x); x++) { | ||
| 793 | if (tdElm != lastTDElm) { | ||
| 794 | var sd = getColRowSpan(tdElm); | ||
| 795 | |||
| 796 | if (sd.rowspan > 1) { | ||
| 797 | tdElm.rowSpan = sd.rowspan - 1; | ||
| 798 | } else { | ||
| 799 | trElm = tdElm.parentNode; | ||
| 800 | |||
| 801 | if (trElm.parentNode) | ||
| 802 | trElm._delete = true; | ||
| 803 | } | ||
| 804 | |||
| 805 | lastTDElm = tdElm; | ||
| 806 | } | ||
| 807 | } | ||
| 808 | |||
| 809 | deleteMarked(tableElm); | ||
| 810 | |||
| 811 | select(0, -1); | ||
| 812 | break; | ||
| 813 | |||
| 814 | case "mceTableInsertColBefore": | ||
| 815 | if (!trElm || !tdElm) | ||
| 816 | return true; | ||
| 817 | |||
| 818 | var grid = getTableGrid(inst.dom.getParent(tableElm, "table")); | ||
| 819 | var cpos = getCellPos(grid, tdElm); | ||
| 820 | var lastTDElm = null; | ||
| 821 | |||
| 822 | for (var y=0; tdElm = getCell(grid, y, cpos.cellindex); y++) { | ||
| 823 | if (tdElm != lastTDElm) { | ||
| 824 | var sd = getColRowSpan(tdElm); | ||
| 825 | |||
| 826 | if (sd['colspan'] == 1) { | ||
| 827 | var newTD = doc.createElement(tdElm.nodeName); | ||
| 828 | |||
| 829 | if (!tinymce.isIE) | ||
| 830 | newTD.innerHTML = '<br mce_bogus="1"/>'; | ||
| 831 | |||
| 832 | newTD.rowSpan = tdElm.rowSpan; | ||
| 833 | |||
| 834 | tdElm.parentNode.insertBefore(newTD, tdElm); | ||
| 835 | } else | ||
| 836 | tdElm.colSpan++; | ||
| 837 | |||
| 838 | lastTDElm = tdElm; | ||
| 839 | } | ||
| 840 | } | ||
| 841 | |||
| 842 | select(); | ||
| 843 | break; | ||
| 844 | |||
| 845 | case "mceTableInsertColAfter": | ||
| 846 | if (!trElm || !tdElm) | ||
| 847 | return true; | ||
| 848 | |||
| 849 | var grid = getTableGrid(inst.dom.getParent(tableElm, "table")); | ||
| 850 | var cpos = getCellPos(grid, tdElm); | ||
| 851 | var lastTDElm = null; | ||
| 852 | |||
| 853 | for (var y=0; tdElm = getCell(grid, y, cpos.cellindex); y++) { | ||
| 854 | if (tdElm != lastTDElm) { | ||
| 855 | var sd = getColRowSpan(tdElm); | ||
| 856 | |||
| 857 | if (sd['colspan'] == 1) { | ||
| 858 | var newTD = doc.createElement(tdElm.nodeName); | ||
| 859 | |||
| 860 | if (!tinymce.isIE) | ||
| 861 | newTD.innerHTML = '<br mce_bogus="1"/>'; | ||
| 862 | |||
| 863 | newTD.rowSpan = tdElm.rowSpan; | ||
| 864 | |||
| 865 | var nextTD = nextElm(tdElm, "TD,TH"); | ||
| 866 | if (nextTD == null) | ||
| 867 | tdElm.parentNode.appendChild(newTD); | ||
| 868 | else | ||
| 869 | nextTD.parentNode.insertBefore(newTD, nextTD); | ||
| 870 | } else | ||
| 871 | tdElm.colSpan++; | ||
| 872 | |||
| 873 | lastTDElm = tdElm; | ||
| 874 | } | ||
| 875 | } | ||
| 876 | |||
| 877 | select(1); | ||
| 878 | break; | ||
| 879 | |||
| 880 | case "mceTableDeleteCol": | ||
| 881 | if (!trElm || !tdElm) | ||
| 882 | return true; | ||
| 883 | |||
| 884 | var grid = getTableGrid(tableElm); | ||
| 885 | var cpos = getCellPos(grid, tdElm); | ||
| 886 | var lastTDElm = null; | ||
| 887 | |||
| 888 | // Only one col, remove whole table | ||
| 889 | if ((grid.length > 1 && grid[0].length <= 1) && tableElm.nodeName == 'TBODY') { | ||
| 890 | inst.dom.remove(inst.dom.getParent(tableElm, "table")); | ||
| 891 | return true; | ||
| 892 | } | ||
| 893 | |||
| 894 | // Delete cells | ||
| 895 | for (var y=0; tdElm = getCell(grid, y, cpos.cellindex); y++) { | ||
| 896 | if (tdElm != lastTDElm) { | ||
| 897 | var sd = getColRowSpan(tdElm); | ||
| 898 | |||
| 899 | if (sd['colspan'] > 1) | ||
| 900 | tdElm.colSpan = sd['colspan'] - 1; | ||
| 901 | else { | ||
| 902 | if (tdElm.parentNode) | ||
| 903 | tdElm.parentNode.removeChild(tdElm); | ||
| 904 | } | ||
| 905 | |||
| 906 | lastTDElm = tdElm; | ||
| 907 | } | ||
| 908 | } | ||
| 909 | |||
| 910 | select(-1); | ||
| 911 | break; | ||
| 912 | |||
| 913 | case "mceTableSplitCells": | ||
| 914 | if (!trElm || !tdElm) | ||
| 915 | return true; | ||
| 916 | |||
| 917 | var spandata = getColRowSpan(tdElm); | ||
| 918 | |||
| 919 | var colspan = spandata["colspan"]; | ||
| 920 | var rowspan = spandata["rowspan"]; | ||
| 921 | |||
| 922 | // Needs splitting | ||
| 923 | if (colspan > 1 || rowspan > 1) { | ||
| 924 | // Generate cols | ||
| 925 | tdElm.colSpan = 1; | ||
| 926 | for (var i=1; i<colspan; i++) { | ||
| 927 | var newTD = doc.createElement("td"); | ||
| 928 | |||
| 929 | if (!tinymce.isIE) | ||
| 930 | newTD.innerHTML = '<br mce_bogus="1"/>'; | ||
| 931 | |||
| 932 | trElm.insertBefore(newTD, nextElm(tdElm, "TD,TH")); | ||
| 933 | |||
| 934 | if (rowspan > 1) | ||
| 935 | addRows(newTD, trElm, rowspan); | ||
| 936 | } | ||
| 937 | |||
| 938 | addRows(tdElm, trElm, rowspan); | ||
| 939 | } | ||
| 940 | |||
| 941 | // Apply visual aids | ||
| 942 | tableElm = inst.dom.getParent(inst.selection.getNode(), "table"); | ||
| 943 | break; | ||
| 944 | |||
| 945 | case "mceTableMergeCells": | ||
| 946 | var rows = []; | ||
| 947 | var sel = inst.selection.getSel(); | ||
| 948 | var grid = getTableGrid(tableElm); | ||
| 949 | |||
| 950 | if (tinymce.isIE || sel.rangeCount == 1) { | ||
| 951 | if (user_interface) { | ||
| 952 | // Setup template | ||
| 953 | var sp = getColRowSpan(tdElm); | ||
| 954 | |||
| 955 | inst.windowManager.open({ | ||
| 956 | url : url + '/merge_cells.htm', | ||
| 957 | width : 240 + parseInt(inst.getLang('table.merge_cells_delta_width', 0)), | ||
| 958 | height : 110 + parseInt(inst.getLang('table.merge_cells_delta_height', 0)), | ||
| 959 | inline : 1 | ||
| 960 | }, { | ||
| 961 | action : "update", | ||
| 962 | numcols : sp.colspan, | ||
| 963 | numrows : sp.rowspan, | ||
| 964 | plugin_url : url | ||
| 965 | }); | ||
| 966 | |||
| 967 | return true; | ||
| 968 | } else { | ||
| 969 | var numRows = parseInt(value['numrows']); | ||
| 970 | var numCols = parseInt(value['numcols']); | ||
| 971 | var cpos = getCellPos(grid, tdElm); | ||
| 972 | |||
| 973 | if (("" + numRows) == "NaN") | ||
| 974 | numRows = 1; | ||
| 975 | |||
| 976 | if (("" + numCols) == "NaN") | ||
| 977 | numCols = 1; | ||
| 978 | |||
| 979 | // Get rows and cells | ||
| 980 | var tRows = tableElm.rows; | ||
| 981 | for (var y=cpos.rowindex; y<grid.length; y++) { | ||
| 982 | var rowCells = []; | ||
| 983 | |||
| 984 | for (var x=cpos.cellindex; x<grid[y].length; x++) { | ||
| 985 | var td = getCell(grid, y, x); | ||
| 986 | |||
| 987 | if (td && !inArray(rows, td) && !inArray(rowCells, td)) { | ||
| 988 | var cp = getCellPos(grid, td); | ||
| 989 | |||
| 990 | // Within range | ||
| 991 | if (cp.cellindex < cpos.cellindex+numCols && cp.rowindex < cpos.rowindex+numRows) | ||
| 992 | rowCells[rowCells.length] = td; | ||
| 993 | } | ||
| 994 | } | ||
| 995 | |||
| 996 | if (rowCells.length > 0) | ||
| 997 | rows[rows.length] = rowCells; | ||
| 998 | |||
| 999 | var td = getCell(grid, cpos.rowindex, cpos.cellindex); | ||
| 1000 | each(ed.dom.select('br', td), function(e, i) { | ||
| 1001 | if (i > 0 && ed.dom.getAttrib('mce_bogus')) | ||
| 1002 | ed.dom.remove(e); | ||
| 1003 | }); | ||
| 1004 | } | ||
| 1005 | |||
| 1006 | //return true; | ||
| 1007 | } | ||
| 1008 | } else { | ||
| 1009 | var cells = []; | ||
| 1010 | var sel = inst.selection.getSel(); | ||
| 1011 | var lastTR = null; | ||
| 1012 | var curRow = null; | ||
| 1013 | var x1 = -1, y1 = -1, x2, y2; | ||
| 1014 | |||
| 1015 | // Only one cell selected, whats the point? | ||
| 1016 | if (sel.rangeCount < 2) | ||
| 1017 | return true; | ||
| 1018 | |||
| 1019 | // Get all selected cells | ||
| 1020 | for (var i=0; i<sel.rangeCount; i++) { | ||
| 1021 | var rng = sel.getRangeAt(i); | ||
| 1022 | var tdElm = rng.startContainer.childNodes[rng.startOffset]; | ||
| 1023 | |||
| 1024 | if (!tdElm) | ||
| 1025 | break; | ||
| 1026 | |||
| 1027 | if (tdElm.nodeName == "TD" || tdElm.nodeName == "TH") | ||
| 1028 | cells[cells.length] = tdElm; | ||
| 1029 | } | ||
| 1030 | |||
| 1031 | // Get rows and cells | ||
| 1032 | var tRows = tableElm.rows; | ||
| 1033 | for (var y=0; y<tRows.length; y++) { | ||
| 1034 | var rowCells = []; | ||
| 1035 | |||
| 1036 | for (var x=0; x<tRows[y].cells.length; x++) { | ||
| 1037 | var td = tRows[y].cells[x]; | ||
| 1038 | |||
| 1039 | for (var i=0; i<cells.length; i++) { | ||
| 1040 | if (td == cells[i]) { | ||
| 1041 | rowCells[rowCells.length] = td; | ||
| 1042 | } | ||
| 1043 | } | ||
| 1044 | } | ||
| 1045 | |||
| 1046 | if (rowCells.length > 0) | ||
| 1047 | rows[rows.length] = rowCells; | ||
| 1048 | } | ||
| 1049 | |||
| 1050 | // Find selected cells in grid and box | ||
| 1051 | var curRow = []; | ||
| 1052 | var lastTR = null; | ||
| 1053 | for (var y=0; y<grid.length; y++) { | ||
| 1054 | for (var x=0; x<grid[y].length; x++) { | ||
| 1055 | grid[y][x]._selected = false; | ||
| 1056 | |||
| 1057 | for (var i=0; i<cells.length; i++) { | ||
| 1058 | if (grid[y][x] == cells[i]) { | ||
| 1059 | // Get start pos | ||
| 1060 | if (x1 == -1) { | ||
| 1061 | x1 = x; | ||
| 1062 | y1 = y; | ||
| 1063 | } | ||
| 1064 | |||
| 1065 | // Get end pos | ||
| 1066 | x2 = x; | ||
| 1067 | y2 = y; | ||
| 1068 | |||
| 1069 | grid[y][x]._selected = true; | ||
| 1070 | } | ||
| 1071 | } | ||
| 1072 | } | ||
| 1073 | } | ||
| 1074 | |||
| 1075 | // Is there gaps, if so deny | ||
| 1076 | for (var y=y1; y<=y2; y++) { | ||
| 1077 | for (var x=x1; x<=x2; x++) { | ||
| 1078 | if (!grid[y][x]._selected) { | ||
| 1079 | alert("Invalid selection for merge."); | ||
| 1080 | return true; | ||
| 1081 | } | ||
| 1082 | } | ||
| 1083 | } | ||
| 1084 | } | ||
| 1085 | |||
| 1086 | // Validate selection and get total rowspan and colspan | ||
| 1087 | var rowSpan = 1, colSpan = 1; | ||
| 1088 | |||
| 1089 | // Validate horizontal and get total colspan | ||
| 1090 | var lastRowSpan = -1; | ||
| 1091 | for (var y=0; y<rows.length; y++) { | ||
| 1092 | var rowColSpan = 0; | ||
| 1093 | |||
| 1094 | for (var x=0; x<rows[y].length; x++) { | ||
| 1095 | var sd = getColRowSpan(rows[y][x]); | ||
| 1096 | |||
| 1097 | rowColSpan += sd['colspan']; | ||
| 1098 | |||
| 1099 | if (lastRowSpan != -1 && sd['rowspan'] != lastRowSpan) { | ||
| 1100 | alert("Invalid selection for merge."); | ||
| 1101 | return true; | ||
| 1102 | } | ||
| 1103 | |||
| 1104 | lastRowSpan = sd['rowspan']; | ||
| 1105 | } | ||
| 1106 | |||
| 1107 | if (rowColSpan > colSpan) | ||
| 1108 | colSpan = rowColSpan; | ||
| 1109 | |||
| 1110 | lastRowSpan = -1; | ||
| 1111 | } | ||
| 1112 | |||
| 1113 | // Validate vertical and get total rowspan | ||
| 1114 | var lastColSpan = -1; | ||
| 1115 | for (var x=0; x<rows[0].length; x++) { | ||
| 1116 | var colRowSpan = 0; | ||
| 1117 | |||
| 1118 | for (var y=0; y<rows.length; y++) { | ||
| 1119 | var sd = getColRowSpan(rows[y][x]); | ||
| 1120 | |||
| 1121 | colRowSpan += sd['rowspan']; | ||
| 1122 | |||
| 1123 | if (lastColSpan != -1 && sd['colspan'] != lastColSpan) { | ||
| 1124 | alert("Invalid selection for merge."); | ||
| 1125 | return true; | ||
| 1126 | } | ||
| 1127 | |||
| 1128 | lastColSpan = sd['colspan']; | ||
| 1129 | } | ||
| 1130 | |||
| 1131 | if (colRowSpan > rowSpan) | ||
| 1132 | rowSpan = colRowSpan; | ||
| 1133 | |||
| 1134 | lastColSpan = -1; | ||
| 1135 | } | ||
| 1136 | |||
| 1137 | // Setup td | ||
| 1138 | tdElm = rows[0][0]; | ||
| 1139 | tdElm.rowSpan = rowSpan; | ||
| 1140 | tdElm.colSpan = colSpan; | ||
| 1141 | |||
| 1142 | // Merge cells | ||
| 1143 | for (var y=0; y<rows.length; y++) { | ||
| 1144 | for (var x=0; x<rows[y].length; x++) { | ||
| 1145 | var html = rows[y][x].innerHTML; | ||
| 1146 | var chk = html.replace(/[ \t\r\n]/g, ""); | ||
| 1147 | |||
| 1148 | if (chk != "<br/>" && chk != "<br>" && chk != '<br mce_bogus="1"/>' && (x+y > 0)) | ||
| 1149 | tdElm.innerHTML += html; | ||
| 1150 | |||
| 1151 | // Not current cell | ||
| 1152 | if (rows[y][x] != tdElm && !rows[y][x]._deleted) { | ||
| 1153 | var cpos = getCellPos(grid, rows[y][x]); | ||
| 1154 | var tr = rows[y][x].parentNode; | ||
| 1155 | |||
| 1156 | tr.removeChild(rows[y][x]); | ||
| 1157 | rows[y][x]._deleted = true; | ||
| 1158 | |||
| 1159 | // Empty TR, remove it | ||
| 1160 | if (!tr.hasChildNodes()) { | ||
| 1161 | tr.parentNode.removeChild(tr); | ||
| 1162 | |||
| 1163 | var lastCell = null; | ||
| 1164 | for (var x=0; cellElm = getCell(grid, cpos.rowindex, x); x++) { | ||
| 1165 | if (cellElm != lastCell && cellElm.rowSpan > 1) | ||
| 1166 | cellElm.rowSpan--; | ||
| 1167 | |||
| 1168 | lastCell = cellElm; | ||
| 1169 | } | ||
| 1170 | |||
| 1171 | if (tdElm.rowSpan > 1) | ||
| 1172 | tdElm.rowSpan--; | ||
| 1173 | } | ||
| 1174 | } | ||
| 1175 | } | ||
| 1176 | } | ||
| 1177 | |||
| 1178 | // Remove all but one bogus br | ||
| 1179 | each(ed.dom.select('br', tdElm), function(e, i) { | ||
| 1180 | if (i > 0 && ed.dom.getAttrib(e, 'mce_bogus')) | ||
| 1181 | ed.dom.remove(e); | ||
| 1182 | }); | ||
| 1183 | |||
| 1184 | break; | ||
| 1185 | } | ||
| 1186 | |||
| 1187 | tableElm = inst.dom.getParent(inst.selection.getNode(), "table"); | ||
| 1188 | inst.addVisual(tableElm); | ||
| 1189 | inst.nodeChanged(); | ||
| 1190 | } | ||
| 1191 | |||
| 1192 | return true; | ||
| 1193 | } | ||
| 1194 | |||
| 1195 | // Pass to next handler in chain | ||
| 1196 | return false; | ||
| 1197 | } | ||
| 1198 | }); | ||
| 1199 | |||
| 1200 | // Register plugin | ||
| 1201 | tinymce.PluginManager.add('table', tinymce.plugins.TablePlugin); | ||
| 1202 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/table/js/cell.js b/public/javascripts/tiny_mce/plugins/table/js/cell.js deleted file mode 100644 index f23b067..0000000 --- a/public/javascripts/tiny_mce/plugins/table/js/cell.js +++ /dev/null | |||
| @@ -1,269 +0,0 @@ | |||
| 1 | tinyMCEPopup.requireLangPack(); | ||
| 2 | |||
| 3 | var ed; | ||
| 4 | |||
| 5 | function init() { | ||
| 6 | ed = tinyMCEPopup.editor; | ||
| 7 | tinyMCEPopup.resizeToInnerSize(); | ||
| 8 | |||
| 9 | document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); | ||
| 10 | document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor'); | ||
| 11 | document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor') | ||
| 12 | |||
| 13 | var inst = ed; | ||
| 14 | var tdElm = ed.dom.getParent(ed.selection.getNode(), "td,th"); | ||
| 15 | var formObj = document.forms[0]; | ||
| 16 | var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style")); | ||
| 17 | |||
| 18 | // Get table cell data | ||
| 19 | var celltype = tdElm.nodeName.toLowerCase(); | ||
| 20 | var align = ed.dom.getAttrib(tdElm, 'align'); | ||
| 21 | var valign = ed.dom.getAttrib(tdElm, 'valign'); | ||
| 22 | var width = trimSize(getStyle(tdElm, 'width', 'width')); | ||
| 23 | var height = trimSize(getStyle(tdElm, 'height', 'height')); | ||
| 24 | var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor')); | ||
| 25 | var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor')); | ||
| 26 | var className = ed.dom.getAttrib(tdElm, 'class'); | ||
| 27 | var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");; | ||
| 28 | var id = ed.dom.getAttrib(tdElm, 'id'); | ||
| 29 | var lang = ed.dom.getAttrib(tdElm, 'lang'); | ||
| 30 | var dir = ed.dom.getAttrib(tdElm, 'dir'); | ||
| 31 | var scope = ed.dom.getAttrib(tdElm, 'scope'); | ||
| 32 | |||
| 33 | // Setup form | ||
| 34 | addClassesToList('class', 'table_cell_styles'); | ||
| 35 | TinyMCE_EditableSelects.init(); | ||
| 36 | |||
| 37 | formObj.bordercolor.value = bordercolor; | ||
| 38 | formObj.bgcolor.value = bgcolor; | ||
| 39 | formObj.backgroundimage.value = backgroundimage; | ||
| 40 | formObj.width.value = width; | ||
| 41 | formObj.height.value = height; | ||
| 42 | formObj.id.value = id; | ||
| 43 | formObj.lang.value = lang; | ||
| 44 | formObj.style.value = ed.dom.serializeStyle(st); | ||
| 45 | selectByValue(formObj, 'align', align); | ||
| 46 | selectByValue(formObj, 'valign', valign); | ||
| 47 | selectByValue(formObj, 'class', className, true, true); | ||
| 48 | selectByValue(formObj, 'celltype', celltype); | ||
| 49 | selectByValue(formObj, 'dir', dir); | ||
| 50 | selectByValue(formObj, 'scope', scope); | ||
| 51 | |||
| 52 | // Resize some elements | ||
| 53 | if (isVisible('backgroundimagebrowser')) | ||
| 54 | document.getElementById('backgroundimage').style.width = '180px'; | ||
| 55 | |||
| 56 | updateColor('bordercolor_pick', 'bordercolor'); | ||
| 57 | updateColor('bgcolor_pick', 'bgcolor'); | ||
| 58 | } | ||
| 59 | |||
| 60 | function updateAction() { | ||
| 61 | var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0]; | ||
| 62 | |||
| 63 | tinyMCEPopup.restoreSelection(); | ||
| 64 | el = ed.selection.getNode(); | ||
| 65 | tdElm = ed.dom.getParent(el, "td,th"); | ||
| 66 | trElm = ed.dom.getParent(el, "tr"); | ||
| 67 | tableElm = ed.dom.getParent(el, "table"); | ||
| 68 | |||
| 69 | ed.execCommand('mceBeginUndoLevel'); | ||
| 70 | |||
| 71 | switch (getSelectValue(formObj, 'action')) { | ||
| 72 | case "cell": | ||
| 73 | var celltype = getSelectValue(formObj, 'celltype'); | ||
| 74 | var scope = getSelectValue(formObj, 'scope'); | ||
| 75 | |||
| 76 | function doUpdate(s) { | ||
| 77 | if (s) { | ||
| 78 | updateCell(tdElm); | ||
| 79 | |||
| 80 | ed.addVisual(); | ||
| 81 | ed.nodeChanged(); | ||
| 82 | inst.execCommand('mceEndUndoLevel'); | ||
| 83 | tinyMCEPopup.close(); | ||
| 84 | } | ||
| 85 | }; | ||
| 86 | |||
| 87 | if (ed.getParam("accessibility_warnings", 1)) { | ||
| 88 | if (celltype == "th" && scope == "") | ||
| 89 | tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), doUpdate); | ||
| 90 | else | ||
| 91 | doUpdate(1); | ||
| 92 | |||
| 93 | return; | ||
| 94 | } | ||
| 95 | |||
| 96 | updateCell(tdElm); | ||
| 97 | break; | ||
| 98 | |||
| 99 | case "row": | ||
| 100 | var cell = trElm.firstChild; | ||
| 101 | |||
| 102 | if (cell.nodeName != "TD" && cell.nodeName != "TH") | ||
| 103 | cell = nextCell(cell); | ||
| 104 | |||
| 105 | do { | ||
| 106 | cell = updateCell(cell, true); | ||
| 107 | } while ((cell = nextCell(cell)) != null); | ||
| 108 | |||
| 109 | break; | ||
| 110 | |||
| 111 | case "all": | ||
| 112 | var rows = tableElm.getElementsByTagName("tr"); | ||
| 113 | |||
| 114 | for (var i=0; i<rows.length; i++) { | ||
| 115 | var cell = rows[i].firstChild; | ||
| 116 | |||
| 117 | if (cell.nodeName != "TD" && cell.nodeName != "TH") | ||
| 118 | cell = nextCell(cell); | ||
| 119 | |||
| 120 | do { | ||
| 121 | cell = updateCell(cell, true); | ||
| 122 | } while ((cell = nextCell(cell)) != null); | ||
| 123 | } | ||
| 124 | |||
| 125 | break; | ||
| 126 | } | ||
| 127 | |||
| 128 | ed.addVisual(); | ||
| 129 | ed.nodeChanged(); | ||
| 130 | inst.execCommand('mceEndUndoLevel'); | ||
| 131 | tinyMCEPopup.close(); | ||
| 132 | } | ||
| 133 | |||
| 134 | function nextCell(elm) { | ||
| 135 | while ((elm = elm.nextSibling) != null) { | ||
| 136 | if (elm.nodeName == "TD" || elm.nodeName == "TH") | ||
| 137 | return elm; | ||
| 138 | } | ||
| 139 | |||
| 140 | return null; | ||
| 141 | } | ||
| 142 | |||
| 143 | function updateCell(td, skip_id) { | ||
| 144 | var inst = ed; | ||
| 145 | var formObj = document.forms[0]; | ||
| 146 | var curCellType = td.nodeName.toLowerCase(); | ||
| 147 | var celltype = getSelectValue(formObj, 'celltype'); | ||
| 148 | var doc = inst.getDoc(); | ||
| 149 | var dom = ed.dom; | ||
| 150 | |||
| 151 | if (!skip_id) | ||
| 152 | td.setAttribute('id', formObj.id.value); | ||
| 153 | |||
| 154 | td.setAttribute('align', formObj.align.value); | ||
| 155 | td.setAttribute('vAlign', formObj.valign.value); | ||
| 156 | td.setAttribute('lang', formObj.lang.value); | ||
| 157 | td.setAttribute('dir', getSelectValue(formObj, 'dir')); | ||
| 158 | td.setAttribute('style', ed.dom.serializeStyle(ed.dom.parseStyle(formObj.style.value))); | ||
| 159 | td.setAttribute('scope', formObj.scope.value); | ||
| 160 | ed.dom.setAttrib(td, 'class', getSelectValue(formObj, 'class')); | ||
| 161 | |||
| 162 | // Clear deprecated attributes | ||
| 163 | ed.dom.setAttrib(td, 'width', ''); | ||
| 164 | ed.dom.setAttrib(td, 'height', ''); | ||
| 165 | ed.dom.setAttrib(td, 'bgColor', ''); | ||
| 166 | ed.dom.setAttrib(td, 'borderColor', ''); | ||
| 167 | ed.dom.setAttrib(td, 'background', ''); | ||
| 168 | |||
| 169 | // Set styles | ||
| 170 | td.style.width = getCSSSize(formObj.width.value); | ||
| 171 | td.style.height = getCSSSize(formObj.height.value); | ||
| 172 | if (formObj.bordercolor.value != "") { | ||
| 173 | td.style.borderColor = formObj.bordercolor.value; | ||
| 174 | td.style.borderStyle = td.style.borderStyle == "" ? "solid" : td.style.borderStyle; | ||
| 175 | td.style.borderWidth = td.style.borderWidth == "" ? "1px" : td.style.borderWidth; | ||
| 176 | } else | ||
| 177 | td.style.borderColor = ''; | ||
| 178 | |||
| 179 | td.style.backgroundColor = formObj.bgcolor.value; | ||
| 180 | |||
| 181 | if (formObj.backgroundimage.value != "") | ||
| 182 | td.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')"; | ||
| 183 | else | ||
| 184 | td.style.backgroundImage = ''; | ||
| 185 | |||
| 186 | if (curCellType != celltype) { | ||
| 187 | // changing to a different node type | ||
| 188 | var newCell = doc.createElement(celltype); | ||
| 189 | |||
| 190 | for (var c=0; c<td.childNodes.length; c++) | ||
| 191 | newCell.appendChild(td.childNodes[c].cloneNode(1)); | ||
| 192 | |||
| 193 | for (var a=0; a<td.attributes.length; a++) | ||
| 194 | ed.dom.setAttrib(newCell, td.attributes[a].name, ed.dom.getAttrib(td, td.attributes[a].name)); | ||
| 195 | |||
| 196 | td.parentNode.replaceChild(newCell, td); | ||
| 197 | td = newCell; | ||
| 198 | } | ||
| 199 | |||
| 200 | dom.setAttrib(td, 'style', dom.serializeStyle(dom.parseStyle(td.style.cssText))); | ||
| 201 | |||
| 202 | return td; | ||
| 203 | } | ||
| 204 | |||
| 205 | function changedBackgroundImage() { | ||
| 206 | var formObj = document.forms[0]; | ||
| 207 | var st = ed.dom.parseStyle(formObj.style.value); | ||
| 208 | |||
| 209 | st['background-image'] = "url('" + formObj.backgroundimage.value + "')"; | ||
| 210 | |||
| 211 | formObj.style.value = ed.dom.serializeStyle(st); | ||
| 212 | } | ||
| 213 | |||
| 214 | function changedSize() { | ||
| 215 | var formObj = document.forms[0]; | ||
| 216 | var st = ed.dom.parseStyle(formObj.style.value); | ||
| 217 | |||
| 218 | var width = formObj.width.value; | ||
| 219 | if (width != "") | ||
| 220 | st['width'] = getCSSSize(width); | ||
| 221 | else | ||
| 222 | st['width'] = ""; | ||
| 223 | |||
| 224 | var height = formObj.height.value; | ||
| 225 | if (height != "") | ||
| 226 | st['height'] = getCSSSize(height); | ||
| 227 | else | ||
| 228 | st['height'] = ""; | ||
| 229 | |||
| 230 | formObj.style.value = ed.dom.serializeStyle(st); | ||
| 231 | } | ||
| 232 | |||
| 233 | function changedColor() { | ||
| 234 | var formObj = document.forms[0]; | ||
| 235 | var st = ed.dom.parseStyle(formObj.style.value); | ||
| 236 | |||
| 237 | st['background-color'] = formObj.bgcolor.value; | ||
| 238 | st['border-color'] = formObj.bordercolor.value; | ||
| 239 | |||
| 240 | formObj.style.value = ed.dom.serializeStyle(st); | ||
| 241 | } | ||
| 242 | |||
| 243 | function changedStyle() { | ||
| 244 | var formObj = document.forms[0]; | ||
| 245 | var st = ed.dom.parseStyle(formObj.style.value); | ||
| 246 | |||
| 247 | if (st['background-image']) | ||
| 248 | formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); | ||
| 249 | else | ||
| 250 | formObj.backgroundimage.value = ''; | ||
| 251 | |||
| 252 | if (st['width']) | ||
| 253 | formObj.width.value = trimSize(st['width']); | ||
| 254 | |||
| 255 | if (st['height']) | ||
| 256 | formObj.height.value = trimSize(st['height']); | ||
| 257 | |||
| 258 | if (st['background-color']) { | ||
| 259 | formObj.bgcolor.value = st['background-color']; | ||
| 260 | updateColor('bgcolor_pick','bgcolor'); | ||
| 261 | } | ||
| 262 | |||
| 263 | if (st['border-color']) { | ||
| 264 | formObj.bordercolor.value = st['border-color']; | ||
| 265 | updateColor('bordercolor_pick','bordercolor'); | ||
| 266 | } | ||
| 267 | } | ||
| 268 | |||
| 269 | tinyMCEPopup.onInit.add(init); | ||
diff --git a/public/javascripts/tiny_mce/plugins/table/js/merge_cells.js b/public/javascripts/tiny_mce/plugins/table/js/merge_cells.js deleted file mode 100644 index 31d6df0..0000000 --- a/public/javascripts/tiny_mce/plugins/table/js/merge_cells.js +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | tinyMCEPopup.requireLangPack(); | ||
| 2 | |||
| 3 | function init() { | ||
| 4 | var f = document.forms[0], v; | ||
| 5 | |||
| 6 | tinyMCEPopup.resizeToInnerSize(); | ||
| 7 | |||
| 8 | f.numcols.value = tinyMCEPopup.getWindowArg('numcols', 1); | ||
| 9 | f.numrows.value = tinyMCEPopup.getWindowArg('numrows', 1); | ||
| 10 | } | ||
| 11 | |||
| 12 | function mergeCells() { | ||
| 13 | var args = [], f = document.forms[0]; | ||
| 14 | |||
| 15 | tinyMCEPopup.restoreSelection(); | ||
| 16 | |||
| 17 | if (!AutoValidator.validate(f)) { | ||
| 18 | tinyMCEPopup.alert(tinyMCEPopup.getLang('invalid_data')); | ||
| 19 | return false; | ||
| 20 | } | ||
| 21 | |||
| 22 | args["numcols"] = f.numcols.value; | ||
| 23 | args["numrows"] = f.numrows.value; | ||
| 24 | |||
| 25 | tinyMCEPopup.execCommand("mceTableMergeCells", false, args); | ||
| 26 | tinyMCEPopup.close(); | ||
| 27 | } | ||
| 28 | |||
| 29 | tinyMCEPopup.onInit.add(init); | ||
diff --git a/public/javascripts/tiny_mce/plugins/table/js/row.js b/public/javascripts/tiny_mce/plugins/table/js/row.js deleted file mode 100644 index d25f635..0000000 --- a/public/javascripts/tiny_mce/plugins/table/js/row.js +++ /dev/null | |||
| @@ -1,212 +0,0 @@ | |||
| 1 | tinyMCEPopup.requireLangPack(); | ||
| 2 | |||
| 3 | function init() { | ||
| 4 | tinyMCEPopup.resizeToInnerSize(); | ||
| 5 | |||
| 6 | document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); | ||
| 7 | document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); | ||
| 8 | |||
| 9 | var inst = tinyMCEPopup.editor; | ||
| 10 | var dom = inst.dom; | ||
| 11 | var trElm = dom.getParent(inst.selection.getNode(), "tr"); | ||
| 12 | var formObj = document.forms[0]; | ||
| 13 | var st = dom.parseStyle(dom.getAttrib(trElm, "style")); | ||
| 14 | |||
| 15 | // Get table row data | ||
| 16 | var rowtype = trElm.parentNode.nodeName.toLowerCase(); | ||
| 17 | var align = dom.getAttrib(trElm, 'align'); | ||
| 18 | var valign = dom.getAttrib(trElm, 'valign'); | ||
| 19 | var height = trimSize(getStyle(trElm, 'height', 'height')); | ||
| 20 | var className = dom.getAttrib(trElm, 'class'); | ||
| 21 | var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor')); | ||
| 22 | var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");; | ||
| 23 | var id = dom.getAttrib(trElm, 'id'); | ||
| 24 | var lang = dom.getAttrib(trElm, 'lang'); | ||
| 25 | var dir = dom.getAttrib(trElm, 'dir'); | ||
| 26 | |||
| 27 | // Setup form | ||
| 28 | addClassesToList('class', 'table_row_styles'); | ||
| 29 | TinyMCE_EditableSelects.init(); | ||
| 30 | |||
| 31 | formObj.bgcolor.value = bgcolor; | ||
| 32 | formObj.backgroundimage.value = backgroundimage; | ||
| 33 | formObj.height.value = height; | ||
| 34 | formObj.id.value = id; | ||
| 35 | formObj.lang.value = lang; | ||
| 36 | formObj.style.value = dom.serializeStyle(st); | ||
| 37 | selectByValue(formObj, 'align', align); | ||
| 38 | selectByValue(formObj, 'valign', valign); | ||
| 39 | selectByValue(formObj, 'class', className, true, true); | ||
| 40 | selectByValue(formObj, 'rowtype', rowtype); | ||
| 41 | selectByValue(formObj, 'dir', dir); | ||
| 42 | |||
| 43 | // Resize some elements | ||
| 44 | if (isVisible('backgroundimagebrowser')) | ||
| 45 | document.getElementById('backgroundimage').style.width = '180px'; | ||
| 46 | |||
| 47 | updateColor('bgcolor_pick', 'bgcolor'); | ||
| 48 | } | ||
| 49 | |||
| 50 | function updateAction() { | ||
| 51 | var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0]; | ||
| 52 | var action = getSelectValue(formObj, 'action'); | ||
| 53 | |||
| 54 | tinyMCEPopup.restoreSelection(); | ||
| 55 | trElm = dom.getParent(inst.selection.getNode(), "tr"); | ||
| 56 | tableElm = dom.getParent(inst.selection.getNode(), "table"); | ||
| 57 | |||
| 58 | inst.execCommand('mceBeginUndoLevel'); | ||
| 59 | |||
| 60 | switch (action) { | ||
| 61 | case "row": | ||
| 62 | updateRow(trElm); | ||
| 63 | break; | ||
| 64 | |||
| 65 | case "all": | ||
| 66 | var rows = tableElm.getElementsByTagName("tr"); | ||
| 67 | |||
| 68 | for (var i=0; i<rows.length; i++) | ||
| 69 | updateRow(rows[i], true); | ||
| 70 | |||
| 71 | break; | ||
| 72 | |||
| 73 | case "odd": | ||
| 74 | case "even": | ||
| 75 | var rows = tableElm.getElementsByTagName("tr"); | ||
| 76 | |||
| 77 | for (var i=0; i<rows.length; i++) { | ||
| 78 | if ((i % 2 == 0 && action == "odd") || (i % 2 != 0 && action == "even")) | ||
| 79 | updateRow(rows[i], true, true); | ||
| 80 | } | ||
| 81 | |||
| 82 | break; | ||
| 83 | } | ||
| 84 | |||
| 85 | inst.addVisual(); | ||
| 86 | inst.nodeChanged(); | ||
| 87 | inst.execCommand('mceEndUndoLevel'); | ||
| 88 | tinyMCEPopup.close(); | ||
| 89 | } | ||
| 90 | |||
| 91 | function updateRow(tr_elm, skip_id, skip_parent) { | ||
| 92 | var inst = tinyMCEPopup.editor; | ||
| 93 | var formObj = document.forms[0]; | ||
| 94 | var dom = inst.dom; | ||
| 95 | var curRowType = tr_elm.parentNode.nodeName.toLowerCase(); | ||
| 96 | var rowtype = getSelectValue(formObj, 'rowtype'); | ||
| 97 | var doc = inst.getDoc(); | ||
| 98 | |||
| 99 | // Update row element | ||
| 100 | if (!skip_id) | ||
| 101 | tr_elm.setAttribute('id', formObj.id.value); | ||
| 102 | |||
| 103 | tr_elm.setAttribute('align', getSelectValue(formObj, 'align')); | ||
| 104 | tr_elm.setAttribute('vAlign', getSelectValue(formObj, 'valign')); | ||
| 105 | tr_elm.setAttribute('lang', formObj.lang.value); | ||
| 106 | tr_elm.setAttribute('dir', getSelectValue(formObj, 'dir')); | ||
| 107 | tr_elm.setAttribute('style', dom.serializeStyle(dom.parseStyle(formObj.style.value))); | ||
| 108 | dom.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class')); | ||
| 109 | |||
| 110 | // Clear deprecated attributes | ||
| 111 | tr_elm.setAttribute('background', ''); | ||
| 112 | tr_elm.setAttribute('bgColor', ''); | ||
| 113 | tr_elm.setAttribute('height', ''); | ||
| 114 | |||
| 115 | // Set styles | ||
| 116 | tr_elm.style.height = getCSSSize(formObj.height.value); | ||
| 117 | tr_elm.style.backgroundColor = formObj.bgcolor.value; | ||
| 118 | |||
| 119 | if (formObj.backgroundimage.value != "") | ||
| 120 | tr_elm.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')"; | ||
| 121 | else | ||
| 122 | tr_elm.style.backgroundImage = ''; | ||
| 123 | |||
| 124 | // Setup new rowtype | ||
| 125 | if (curRowType != rowtype && !skip_parent) { | ||
| 126 | // first, clone the node we are working on | ||
| 127 | var newRow = tr_elm.cloneNode(1); | ||
| 128 | |||
| 129 | // next, find the parent of its new destination (creating it if necessary) | ||
| 130 | var theTable = dom.getParent(tr_elm, "table"); | ||
| 131 | var dest = rowtype; | ||
| 132 | var newParent = null; | ||
| 133 | for (var i = 0; i < theTable.childNodes.length; i++) { | ||
| 134 | if (theTable.childNodes[i].nodeName.toLowerCase() == dest) | ||
| 135 | newParent = theTable.childNodes[i]; | ||
| 136 | } | ||
| 137 | |||
| 138 | if (newParent == null) { | ||
| 139 | newParent = doc.createElement(dest); | ||
| 140 | |||
| 141 | if (dest == "thead") { | ||
| 142 | if (theTable.firstChild.nodeName == 'CAPTION') | ||
| 143 | inst.dom.insertAfter(newParent, theTable.firstChild); | ||
| 144 | else | ||
| 145 | theTable.insertBefore(newParent, theTable.firstChild); | ||
| 146 | } else | ||
| 147 | theTable.appendChild(newParent); | ||
| 148 | } | ||
| 149 | |||
| 150 | // append the row to the new parent | ||
| 151 | newParent.appendChild(newRow); | ||
| 152 | |||
| 153 | // remove the original | ||
| 154 | tr_elm.parentNode.removeChild(tr_elm); | ||
| 155 | |||
| 156 | // set tr_elm to the new node | ||
| 157 | tr_elm = newRow; | ||
| 158 | } | ||
| 159 | |||
| 160 | dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(tr_elm.style.cssText))); | ||
| 161 | } | ||
| 162 | |||
| 163 | function changedBackgroundImage() { | ||
| 164 | var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom; | ||
| 165 | var st = dom.parseStyle(formObj.style.value); | ||
| 166 | |||
| 167 | st['background-image'] = "url('" + formObj.backgroundimage.value + "')"; | ||
| 168 | |||
| 169 | formObj.style.value = dom.serializeStyle(st); | ||
| 170 | } | ||
| 171 | |||
| 172 | function changedStyle() { | ||
| 173 | var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom; | ||
| 174 | var st = dom.parseStyle(formObj.style.value); | ||
| 175 | |||
| 176 | if (st['background-image']) | ||
| 177 | formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); | ||
| 178 | else | ||
| 179 | formObj.backgroundimage.value = ''; | ||
| 180 | |||
| 181 | if (st['height']) | ||
| 182 | formObj.height.value = trimSize(st['height']); | ||
| 183 | |||
| 184 | if (st['background-color']) { | ||
| 185 | formObj.bgcolor.value = st['background-color']; | ||
| 186 | updateColor('bgcolor_pick','bgcolor'); | ||
| 187 | } | ||
| 188 | } | ||
| 189 | |||
| 190 | function changedSize() { | ||
| 191 | var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom; | ||
| 192 | var st = dom.parseStyle(formObj.style.value); | ||
| 193 | |||
| 194 | var height = formObj.height.value; | ||
| 195 | if (height != "") | ||
| 196 | st['height'] = getCSSSize(height); | ||
| 197 | else | ||
| 198 | st['height'] = ""; | ||
| 199 | |||
| 200 | formObj.style.value = dom.serializeStyle(st); | ||
| 201 | } | ||
| 202 | |||
| 203 | function changedColor() { | ||
| 204 | var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom; | ||
| 205 | var st = dom.parseStyle(formObj.style.value); | ||
| 206 | |||
| 207 | st['background-color'] = formObj.bgcolor.value; | ||
| 208 | |||
| 209 | formObj.style.value = dom.serializeStyle(st); | ||
| 210 | } | ||
| 211 | |||
| 212 | tinyMCEPopup.onInit.add(init); | ||
diff --git a/public/javascripts/tiny_mce/plugins/table/js/table.js b/public/javascripts/tiny_mce/plugins/table/js/table.js deleted file mode 100644 index 182589d..0000000 --- a/public/javascripts/tiny_mce/plugins/table/js/table.js +++ /dev/null | |||
| @@ -1,440 +0,0 @@ | |||
| 1 | tinyMCEPopup.requireLangPack(); | ||
| 2 | |||
| 3 | var action, orgTableWidth, orgTableHeight, dom = tinyMCEPopup.editor.dom; | ||
| 4 | |||
| 5 | function insertTable() { | ||
| 6 | var formObj = document.forms[0]; | ||
| 7 | var inst = tinyMCEPopup.editor, dom = inst.dom; | ||
| 8 | var cols = 2, rows = 2, border = 0, cellpadding = -1, cellspacing = -1, align, width, height, className, caption, frame, rules; | ||
| 9 | var html = '', capEl, elm; | ||
| 10 | var cellLimit, rowLimit, colLimit; | ||
| 11 | |||
| 12 | tinyMCEPopup.restoreSelection(); | ||
| 13 | |||
| 14 | if (!AutoValidator.validate(formObj)) { | ||
| 15 | tinyMCEPopup.alert(inst.getLang('invalid_data')); | ||
| 16 | return false; | ||
| 17 | } | ||
| 18 | |||
| 19 | elm = dom.getParent(inst.selection.getNode(), 'table'); | ||
| 20 | |||
| 21 | // Get form data | ||
| 22 | cols = formObj.elements['cols'].value; | ||
| 23 | rows = formObj.elements['rows'].value; | ||
| 24 | border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0; | ||
| 25 | cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : ""; | ||
| 26 | cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : ""; | ||
| 27 | align = getSelectValue(formObj, "align"); | ||
| 28 | frame = getSelectValue(formObj, "tframe"); | ||
| 29 | rules = getSelectValue(formObj, "rules"); | ||
| 30 | width = formObj.elements['width'].value; | ||
| 31 | height = formObj.elements['height'].value; | ||
| 32 | bordercolor = formObj.elements['bordercolor'].value; | ||
| 33 | bgcolor = formObj.elements['bgcolor'].value; | ||
| 34 | className = getSelectValue(formObj, "class"); | ||
| 35 | id = formObj.elements['id'].value; | ||
| 36 | summary = formObj.elements['summary'].value; | ||
| 37 | style = formObj.elements['style'].value; | ||
| 38 | dir = formObj.elements['dir'].value; | ||
| 39 | lang = formObj.elements['lang'].value; | ||
| 40 | background = formObj.elements['backgroundimage'].value; | ||
| 41 | caption = formObj.elements['caption'].checked; | ||
| 42 | |||
| 43 | cellLimit = tinyMCEPopup.getParam('table_cell_limit', false); | ||
| 44 | rowLimit = tinyMCEPopup.getParam('table_row_limit', false); | ||
| 45 | colLimit = tinyMCEPopup.getParam('table_col_limit', false); | ||
| 46 | |||
| 47 | // Validate table size | ||
| 48 | if (colLimit && cols > colLimit) { | ||
| 49 | tinyMCEPopup.alert(inst.getLang('table_dlg.col_limit').replace(/\{\$cols\}/g, colLimit)); | ||
| 50 | return false; | ||
| 51 | } else if (rowLimit && rows > rowLimit) { | ||
| 52 | tinyMCEPopup.alert(inst.getLang('table_dlg.row_limit').replace(/\{\$rows\}/g, rowLimit)); | ||
| 53 | return false; | ||
| 54 | } else if (cellLimit && cols * rows > cellLimit) { | ||
| 55 | tinyMCEPopup.alert(inst.getLang('table_dlg.cell_limit').replace(/\{\$cells\}/g, cellLimit)); | ||
| 56 | return false; | ||
| 57 | } | ||
| 58 | |||
| 59 | // Update table | ||
| 60 | if (action == "update") { | ||
| 61 | inst.execCommand('mceBeginUndoLevel'); | ||
| 62 | |||
| 63 | dom.setAttrib(elm, 'cellPadding', cellpadding, true); | ||
| 64 | dom.setAttrib(elm, 'cellSpacing', cellspacing, true); | ||
| 65 | dom.setAttrib(elm, 'border', border); | ||
| 66 | dom.setAttrib(elm, 'align', align); | ||
| 67 | dom.setAttrib(elm, 'frame', frame); | ||
| 68 | dom.setAttrib(elm, 'rules', rules); | ||
| 69 | dom.setAttrib(elm, 'class', className); | ||
| 70 | dom.setAttrib(elm, 'style', style); | ||
| 71 | dom.setAttrib(elm, 'id', id); | ||
| 72 | dom.setAttrib(elm, 'summary', summary); | ||
| 73 | dom.setAttrib(elm, 'dir', dir); | ||
| 74 | dom.setAttrib(elm, 'lang', lang); | ||
| 75 | |||
| 76 | capEl = inst.dom.select('caption', elm)[0]; | ||
| 77 | |||
| 78 | if (capEl && !caption) | ||
| 79 | capEl.parentNode.removeChild(capEl); | ||
| 80 | |||
| 81 | if (!capEl && caption) { | ||
| 82 | capEl = elm.ownerDocument.createElement('caption'); | ||
| 83 | |||
| 84 | if (!tinymce.isIE) | ||
| 85 | capEl.innerHTML = '<br mce_bogus="1"/>'; | ||
| 86 | |||
| 87 | elm.insertBefore(capEl, elm.firstChild); | ||
| 88 | } | ||
| 89 | |||
| 90 | if (width && inst.settings.inline_styles) { | ||
| 91 | dom.setStyle(elm, 'width', width); | ||
| 92 | dom.setAttrib(elm, 'width', ''); | ||
| 93 | } else { | ||
| 94 | dom.setAttrib(elm, 'width', width, true); | ||
| 95 | dom.setStyle(elm, 'width', ''); | ||
| 96 | } | ||
| 97 | |||
| 98 | // Remove these since they are not valid XHTML | ||
| 99 | dom.setAttrib(elm, 'borderColor', ''); | ||
| 100 | dom.setAttrib(elm, 'bgColor', ''); | ||
| 101 | dom.setAttrib(elm, 'background', ''); | ||
| 102 | |||
| 103 | if (height && inst.settings.inline_styles) { | ||
| 104 | dom.setStyle(elm, 'height', height); | ||
| 105 | dom.setAttrib(elm, 'height', ''); | ||
| 106 | } else { | ||
| 107 | dom.setAttrib(elm, 'height', height, true); | ||
| 108 | dom.setStyle(elm, 'height', ''); | ||
| 109 | } | ||
| 110 | |||
| 111 | if (background != '') | ||
| 112 | elm.style.backgroundImage = "url('" + background + "')"; | ||
| 113 | else | ||
| 114 | elm.style.backgroundImage = ''; | ||
| 115 | |||
| 116 | /* if (tinyMCEPopup.getParam("inline_styles")) { | ||
| 117 | if (width != '') | ||
| 118 | elm.style.width = getCSSSize(width); | ||
| 119 | }*/ | ||
| 120 | |||
| 121 | if (bordercolor != "") { | ||
| 122 | elm.style.borderColor = bordercolor; | ||
| 123 | elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle; | ||
| 124 | elm.style.borderWidth = border == "" ? "1px" : border; | ||
| 125 | } else | ||
| 126 | elm.style.borderColor = ''; | ||
| 127 | |||
| 128 | elm.style.backgroundColor = bgcolor; | ||
| 129 | elm.style.height = getCSSSize(height); | ||
| 130 | |||
| 131 | inst.addVisual(); | ||
| 132 | |||
| 133 | // Fix for stange MSIE align bug | ||
| 134 | //elm.outerHTML = elm.outerHTML; | ||
| 135 | |||
| 136 | inst.nodeChanged(); | ||
| 137 | inst.execCommand('mceEndUndoLevel'); | ||
| 138 | |||
| 139 | // Repaint if dimensions changed | ||
| 140 | if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight) | ||
| 141 | inst.execCommand('mceRepaint'); | ||
| 142 | |||
| 143 | tinyMCEPopup.close(); | ||
| 144 | return true; | ||
| 145 | } | ||
| 146 | |||
| 147 | // Create new table | ||
| 148 | html += '<table'; | ||
| 149 | |||
| 150 | html += makeAttrib('id', id); | ||
| 151 | html += makeAttrib('border', border); | ||
| 152 | html += makeAttrib('cellpadding', cellpadding); | ||
| 153 | html += makeAttrib('cellspacing', cellspacing); | ||
| 154 | |||
| 155 | if (width && inst.settings.inline_styles) { | ||
| 156 | if (style) | ||
| 157 | style += '; '; | ||
| 158 | |||
| 159 | // Force px | ||
| 160 | if (/^[0-9\.]+$/.test(width)) | ||
| 161 | width += 'px'; | ||
| 162 | |||
| 163 | style += 'width: ' + width; | ||
| 164 | } else | ||
| 165 | html += makeAttrib('width', width); | ||
| 166 | |||
| 167 | /* if (height) { | ||
| 168 | if (style) | ||
| 169 | style += '; '; | ||
| 170 | |||
| 171 | style += 'height: ' + height; | ||
| 172 | }*/ | ||
| 173 | |||
| 174 | //html += makeAttrib('height', height); | ||
| 175 | //html += makeAttrib('bordercolor', bordercolor); | ||
| 176 | //html += makeAttrib('bgcolor', bgcolor); | ||
| 177 | html += makeAttrib('align', align); | ||
| 178 | html += makeAttrib('frame', frame); | ||
| 179 | html += makeAttrib('rules', rules); | ||
| 180 | html += makeAttrib('class', className); | ||
| 181 | html += makeAttrib('style', style); | ||
| 182 | html += makeAttrib('summary', summary); | ||
| 183 | html += makeAttrib('dir', dir); | ||
| 184 | html += makeAttrib('lang', lang); | ||
| 185 | html += '>'; | ||
| 186 | |||
| 187 | if (caption) { | ||
| 188 | if (!tinymce.isIE) | ||
| 189 | html += '<caption><br mce_bogus="1"/></caption>'; | ||
| 190 | else | ||
| 191 | html += '<caption></caption>'; | ||
| 192 | } | ||
| 193 | |||
| 194 | for (var y=0; y<rows; y++) { | ||
| 195 | html += "<tr>"; | ||
| 196 | |||
| 197 | for (var x=0; x<cols; x++) { | ||
| 198 | if (!tinymce.isIE) | ||
| 199 | html += '<td><br mce_bogus="1"/></td>'; | ||
| 200 | else | ||
| 201 | html += '<td></td>'; | ||
| 202 | } | ||
| 203 | |||
| 204 | html += "</tr>"; | ||
| 205 | } | ||
| 206 | |||
| 207 | html += "</table>"; | ||
| 208 | |||
| 209 | inst.execCommand('mceBeginUndoLevel'); | ||
| 210 | |||
| 211 | // Move table | ||
| 212 | if (inst.settings.fix_table_elements) { | ||
| 213 | var bm = inst.selection.getBookmark(), patt = ''; | ||
| 214 | |||
| 215 | inst.execCommand('mceInsertContent', false, '<br class="_mce_marker" />'); | ||
| 216 | |||
| 217 | tinymce.each('h1,h2,h3,h4,h5,h6,p'.split(','), function(n) { | ||
| 218 | if (patt) | ||
| 219 | patt += ','; | ||
| 220 | |||
| 221 | patt += n + ' ._mce_marker'; | ||
| 222 | }); | ||
| 223 | |||
| 224 | tinymce.each(inst.dom.select(patt), function(n) { | ||
| 225 | inst.dom.split(inst.dom.getParent(n, 'h1,h2,h3,h4,h5,h6,p'), n); | ||
| 226 | }); | ||
| 227 | |||
| 228 | dom.setOuterHTML(dom.select('._mce_marker')[0], html); | ||
| 229 | |||
| 230 | inst.selection.moveToBookmark(bm); | ||
| 231 | } else | ||
| 232 | inst.execCommand('mceInsertContent', false, html); | ||
| 233 | |||
| 234 | inst.addVisual(); | ||
| 235 | inst.execCommand('mceEndUndoLevel'); | ||
| 236 | |||
| 237 | tinyMCEPopup.close(); | ||
| 238 | } | ||
| 239 | |||
| 240 | function makeAttrib(attrib, value) { | ||
| 241 | var formObj = document.forms[0]; | ||
| 242 | var valueElm = formObj.elements[attrib]; | ||
| 243 | |||
| 244 | if (typeof(value) == "undefined" || value == null) { | ||
| 245 | value = ""; | ||
| 246 | |||
| 247 | if (valueElm) | ||
| 248 | value = valueElm.value; | ||
| 249 | } | ||
| 250 | |||
| 251 | if (value == "") | ||
| 252 | return ""; | ||
| 253 | |||
| 254 | // XML encode it | ||
| 255 | value = value.replace(/&/g, '&'); | ||
| 256 | value = value.replace(/\"/g, '"'); | ||
| 257 | value = value.replace(/</g, '<'); | ||
| 258 | value = value.replace(/>/g, '>'); | ||
| 259 | |||
| 260 | return ' ' + attrib + '="' + value + '"'; | ||
| 261 | } | ||
| 262 | |||
| 263 | function init() { | ||
| 264 | tinyMCEPopup.resizeToInnerSize(); | ||
| 265 | |||
| 266 | document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); | ||
| 267 | document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); | ||
| 268 | document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor'); | ||
| 269 | document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); | ||
| 270 | |||
| 271 | var cols = 2, rows = 2, border = tinyMCEPopup.getParam('table_default_border', '0'), cellpadding = tinyMCEPopup.getParam('table_default_cellpadding', ''), cellspacing = tinyMCEPopup.getParam('table_default_cellspacing', ''); | ||
| 272 | var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = ""; | ||
| 273 | var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules, frame; | ||
| 274 | var inst = tinyMCEPopup.editor, dom = inst.dom; | ||
| 275 | var formObj = document.forms[0]; | ||
| 276 | var elm = dom.getParent(inst.selection.getNode(), "table"); | ||
| 277 | |||
| 278 | action = tinyMCEPopup.getWindowArg('action'); | ||
| 279 | |||
| 280 | if (!action) | ||
| 281 | action = elm ? "update" : "insert"; | ||
| 282 | |||
| 283 | if (elm && action != "insert") { | ||
| 284 | var rowsAr = elm.rows; | ||
| 285 | var cols = 0; | ||
| 286 | for (var i=0; i<rowsAr.length; i++) | ||
| 287 | if (rowsAr[i].cells.length > cols) | ||
| 288 | cols = rowsAr[i].cells.length; | ||
| 289 | |||
| 290 | cols = cols; | ||
| 291 | rows = rowsAr.length; | ||
| 292 | |||
| 293 | st = dom.parseStyle(dom.getAttrib(elm, "style")); | ||
| 294 | border = trimSize(getStyle(elm, 'border', 'borderWidth')); | ||
| 295 | cellpadding = dom.getAttrib(elm, 'cellpadding', ""); | ||
| 296 | cellspacing = dom.getAttrib(elm, 'cellspacing', ""); | ||
| 297 | width = trimSize(getStyle(elm, 'width', 'width')); | ||
| 298 | height = trimSize(getStyle(elm, 'height', 'height')); | ||
| 299 | bordercolor = convertRGBToHex(getStyle(elm, 'bordercolor', 'borderLeftColor')); | ||
| 300 | bgcolor = convertRGBToHex(getStyle(elm, 'bgcolor', 'backgroundColor')); | ||
| 301 | align = dom.getAttrib(elm, 'align', align); | ||
| 302 | frame = dom.getAttrib(elm, 'frame'); | ||
| 303 | rules = dom.getAttrib(elm, 'rules'); | ||
| 304 | className = tinymce.trim(dom.getAttrib(elm, 'class').replace(/mceItem.+/g, '')); | ||
| 305 | id = dom.getAttrib(elm, 'id'); | ||
| 306 | summary = dom.getAttrib(elm, 'summary'); | ||
| 307 | style = dom.serializeStyle(st); | ||
| 308 | dir = dom.getAttrib(elm, 'dir'); | ||
| 309 | lang = dom.getAttrib(elm, 'lang'); | ||
| 310 | background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); | ||
| 311 | formObj.caption.checked = elm.getElementsByTagName('caption').length > 0; | ||
| 312 | |||
| 313 | orgTableWidth = width; | ||
| 314 | orgTableHeight = height; | ||
| 315 | |||
| 316 | action = "update"; | ||
| 317 | formObj.insert.value = inst.getLang('update'); | ||
| 318 | } | ||
| 319 | |||
| 320 | addClassesToList('class', "table_styles"); | ||
| 321 | TinyMCE_EditableSelects.init(); | ||
| 322 | |||
| 323 | // Update form | ||
| 324 | selectByValue(formObj, 'align', align); | ||
| 325 | selectByValue(formObj, 'tframe', frame); | ||
| 326 | selectByValue(formObj, 'rules', rules); | ||
| 327 | selectByValue(formObj, 'class', className, true, true); | ||
| 328 | formObj.cols.value = cols; | ||
| 329 | formObj.rows.value = rows; | ||
| 330 | formObj.border.value = border; | ||
| 331 | formObj.cellpadding.value = cellpadding; | ||
| 332 | formObj.cellspacing.value = cellspacing; | ||
| 333 | formObj.width.value = width; | ||
| 334 | formObj.height.value = height; | ||
| 335 | formObj.bordercolor.value = bordercolor; | ||
| 336 | formObj.bgcolor.value = bgcolor; | ||
| 337 | formObj.id.value = id; | ||
| 338 | formObj.summary.value = summary; | ||
| 339 | formObj.style.value = style; | ||
| 340 | formObj.dir.value = dir; | ||
| 341 | formObj.lang.value = lang; | ||
| 342 | formObj.backgroundimage.value = background; | ||
| 343 | |||
| 344 | updateColor('bordercolor_pick', 'bordercolor'); | ||
| 345 | updateColor('bgcolor_pick', 'bgcolor'); | ||
| 346 | |||
| 347 | // Resize some elements | ||
| 348 | if (isVisible('backgroundimagebrowser')) | ||
| 349 | document.getElementById('backgroundimage').style.width = '180px'; | ||
| 350 | |||
| 351 | // Disable some fields in update mode | ||
| 352 | if (action == "update") { | ||
| 353 | formObj.cols.disabled = true; | ||
| 354 | formObj.rows.disabled = true; | ||
| 355 | } | ||
| 356 | } | ||
| 357 | |||
| 358 | function changedSize() { | ||
| 359 | var formObj = document.forms[0]; | ||
| 360 | var st = dom.parseStyle(formObj.style.value); | ||
| 361 | |||
| 362 | /* var width = formObj.width.value; | ||
| 363 | if (width != "") | ||
| 364 | st['width'] = tinyMCEPopup.getParam("inline_styles") ? getCSSSize(width) : ""; | ||
| 365 | else | ||
| 366 | st['width'] = "";*/ | ||
| 367 | |||
| 368 | var height = formObj.height.value; | ||
| 369 | if (height != "") | ||
| 370 | st['height'] = getCSSSize(height); | ||
| 371 | else | ||
| 372 | st['height'] = ""; | ||
| 373 | |||
| 374 | formObj.style.value = dom.serializeStyle(st); | ||
| 375 | } | ||
| 376 | |||
| 377 | function changedBackgroundImage() { | ||
| 378 | var formObj = document.forms[0]; | ||
| 379 | var st = dom.parseStyle(formObj.style.value); | ||
| 380 | |||
| 381 | st['background-image'] = "url('" + formObj.backgroundimage.value + "')"; | ||
| 382 | |||
| 383 | formObj.style.value = dom.serializeStyle(st); | ||
| 384 | } | ||
| 385 | |||
| 386 | function changedBorder() { | ||
| 387 | var formObj = document.forms[0]; | ||
| 388 | var st = dom.parseStyle(formObj.style.value); | ||
| 389 | |||
| 390 | // Update border width if the element has a color | ||
| 391 | if (formObj.border.value != "" && formObj.bordercolor.value != "") | ||
| 392 | st['border-width'] = formObj.border.value + "px"; | ||
| 393 | |||
| 394 | formObj.style.value = dom.serializeStyle(st); | ||
| 395 | } | ||
| 396 | |||
| 397 | function changedColor() { | ||
| 398 | var formObj = document.forms[0]; | ||
| 399 | var st = dom.parseStyle(formObj.style.value); | ||
| 400 | |||
| 401 | st['background-color'] = formObj.bgcolor.value; | ||
| 402 | |||
| 403 | if (formObj.bordercolor.value != "") { | ||
| 404 | st['border-color'] = formObj.bordercolor.value; | ||
| 405 | |||
| 406 | // Add border-width if it's missing | ||
| 407 | if (!st['border-width']) | ||
| 408 | st['border-width'] = formObj.border.value == "" ? "1px" : formObj.border.value + "px"; | ||
| 409 | } | ||
| 410 | |||
| 411 | formObj.style.value = dom.serializeStyle(st); | ||
| 412 | } | ||
| 413 | |||
| 414 | function changedStyle() { | ||
| 415 | var formObj = document.forms[0]; | ||
| 416 | var st = dom.parseStyle(formObj.style.value); | ||
| 417 | |||
| 418 | if (st['background-image']) | ||
| 419 | formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"); | ||
| 420 | else | ||
| 421 | formObj.backgroundimage.value = ''; | ||
| 422 | |||
| 423 | if (st['width']) | ||
| 424 | formObj.width.value = trimSize(st['width']); | ||
| 425 | |||
| 426 | if (st['height']) | ||
| 427 | formObj.height.value = trimSize(st['height']); | ||
| 428 | |||
| 429 | if (st['background-color']) { | ||
| 430 | formObj.bgcolor.value = st['background-color']; | ||
| 431 | updateColor('bgcolor_pick','bgcolor'); | ||
| 432 | } | ||
| 433 | |||
| 434 | if (st['border-color']) { | ||
| 435 | formObj.bordercolor.value = st['border-color']; | ||
| 436 | updateColor('bordercolor_pick','bordercolor'); | ||
| 437 | } | ||
| 438 | } | ||
| 439 | |||
| 440 | tinyMCEPopup.onInit.add(init); | ||
diff --git a/public/javascripts/tiny_mce/plugins/table/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/table/langs/en_dlg.js deleted file mode 100644 index 000332a..0000000 --- a/public/javascripts/tiny_mce/plugins/table/langs/en_dlg.js +++ /dev/null | |||
| @@ -1,74 +0,0 @@ | |||
| 1 | tinyMCE.addI18n('en.table_dlg',{ | ||
| 2 | general_tab:"General", | ||
| 3 | advanced_tab:"Advanced", | ||
| 4 | general_props:"General properties", | ||
| 5 | advanced_props:"Advanced properties", | ||
| 6 | rowtype:"Row in table part", | ||
| 7 | title:"Insert/Modify table", | ||
| 8 | width:"Width", | ||
| 9 | height:"Height", | ||
| 10 | cols:"Cols", | ||
| 11 | rows:"Rows", | ||
| 12 | cellspacing:"Cellspacing", | ||
| 13 | cellpadding:"Cellpadding", | ||
| 14 | border:"Border", | ||
| 15 | align:"Alignment", | ||
| 16 | align_default:"Default", | ||
| 17 | align_left:"Left", | ||
| 18 | align_right:"Right", | ||
| 19 | align_middle:"Center", | ||
| 20 | row_title:"Table row properties", | ||
| 21 | cell_title:"Table cell properties", | ||
| 22 | cell_type:"Cell type", | ||
| 23 | valign:"Vertical alignment", | ||
| 24 | align_top:"Top", | ||
| 25 | align_bottom:"Bottom", | ||
| 26 | bordercolor:"Border color", | ||
| 27 | bgcolor:"Background color", | ||
| 28 | merge_cells_title:"Merge table cells", | ||
| 29 | id:"Id", | ||
| 30 | style:"Style", | ||
| 31 | langdir:"Language direction", | ||
| 32 | langcode:"Language code", | ||
| 33 | mime:"Target MIME type", | ||
| 34 | ltr:"Left to right", | ||
| 35 | rtl:"Right to left", | ||
| 36 | bgimage:"Background image", | ||
| 37 | summary:"Summary", | ||
| 38 | td:"Data", | ||
| 39 | th:"Header", | ||
| 40 | cell_cell:"Update current cell", | ||
| 41 | cell_row:"Update all cells in row", | ||
| 42 | cell_all:"Update all cells in table", | ||
| 43 | row_row:"Update current row", | ||
| 44 | row_odd:"Update odd rows in table", | ||
| 45 | row_even:"Update even rows in table", | ||
| 46 | row_all:"Update all rows in table", | ||
| 47 | thead:"Table Head", | ||
| 48 | tbody:"Table Body", | ||
| 49 | tfoot:"Table Foot", | ||
| 50 | scope:"Scope", | ||
| 51 | rowgroup:"Row Group", | ||
| 52 | colgroup:"Col Group", | ||
| 53 | col_limit:"You've exceeded the maximum number of columns of {$cols}.", | ||
| 54 | row_limit:"You've exceeded the maximum number of rows of {$rows}.", | ||
| 55 | cell_limit:"You've exceeded the maximum number of cells of {$cells}.", | ||
| 56 | missing_scope:"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.", | ||
| 57 | caption:"Table caption", | ||
| 58 | frame:"Frame", | ||
| 59 | frame_none:"none", | ||
| 60 | frame_groups:"groups", | ||
| 61 | frame_rows:"rows", | ||
| 62 | frame_cols:"cols", | ||
| 63 | frame_all:"all", | ||
| 64 | rules:"Rules", | ||
| 65 | rules_void:"void", | ||
| 66 | rules_above:"above", | ||
| 67 | rules_below:"below", | ||
| 68 | rules_hsides:"hsides", | ||
| 69 | rules_lhs:"lhs", | ||
| 70 | rules_rhs:"rhs", | ||
| 71 | rules_vsides:"vsides", | ||
| 72 | rules_box:"box", | ||
| 73 | rules_border:"border" | ||
| 74 | }); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/table/merge_cells.htm b/public/javascripts/tiny_mce/plugins/table/merge_cells.htm deleted file mode 100644 index 25d42eb..0000000 --- a/public/javascripts/tiny_mce/plugins/table/merge_cells.htm +++ /dev/null | |||
| @@ -1,37 +0,0 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title>{#table_dlg.merge_cells_title}</title> | ||
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 6 | <script type="text/javascript" src="../../utils/mctabs.js"></script> | ||
| 7 | <script type="text/javascript" src="../../utils/validate.js"></script> | ||
| 8 | <script type="text/javascript" src="js/merge_cells.js"></script> | ||
| 9 | </head> | ||
| 10 | <body style="margin: 8px"> | ||
| 11 | <form onsubmit="mergeCells();return false;" action="#"> | ||
| 12 | <fieldset> | ||
| 13 | <legend>{#table_dlg.merge_cells_title}</legend> | ||
| 14 | <table border="0" cellpadding="0" cellspacing="3" width="100%"> | ||
| 15 | <tr> | ||
| 16 | <td>{#table_dlg.cols}:</td> | ||
| 17 | <td align="right"><input type="text" name="numcols" value="" class="number min1 mceFocus" style="width: 30px" /></td> | ||
| 18 | </tr> | ||
| 19 | <tr> | ||
| 20 | <td>{#table_dlg.rows}:</td> | ||
| 21 | <td align="right"><input type="text" name="numrows" value="" class="number min1" style="width: 30px" /></td> | ||
| 22 | </tr> | ||
| 23 | </table> | ||
| 24 | </fieldset> | ||
| 25 | |||
| 26 | <div class="mceActionPanel"> | ||
| 27 | <div style="float: left"> | ||
| 28 | <input type="submit" id="insert" name="insert" value="{#update}" /> | ||
| 29 | </div> | ||
| 30 | |||
| 31 | <div style="float: right"> | ||
| 32 | <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" /> | ||
| 33 | </div> | ||
| 34 | </div> | ||
| 35 | </form> | ||
| 36 | </body> | ||
| 37 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/table/row.htm b/public/javascripts/tiny_mce/plugins/table/row.htm deleted file mode 100644 index 07ca13c..0000000 --- a/public/javascripts/tiny_mce/plugins/table/row.htm +++ /dev/null | |||
| @@ -1,160 +0,0 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title>{#table_dlg.row_title}</title> | ||
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 6 | <script type="text/javascript" src="../../utils/mctabs.js"></script> | ||
| 7 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | ||
| 8 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> | ||
| 9 | <script type="text/javascript" src="js/row.js"></script> | ||
| 10 | <link href="css/row.css" rel="stylesheet" type="text/css" /> | ||
| 11 | </head> | ||
| 12 | <body id="tablerow" style="display: none"> | ||
| 13 | <form onsubmit="updateAction();return false;" action="#"> | ||
| 14 | <div class="tabs"> | ||
| 15 | <ul> | ||
| 16 | <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li> | ||
| 17 | <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li> | ||
| 18 | </ul> | ||
| 19 | </div> | ||
| 20 | |||
| 21 | <div class="panel_wrapper"> | ||
| 22 | <div id="general_panel" class="panel current"> | ||
| 23 | <fieldset> | ||
| 24 | <legend>{#table_dlg.general_props}</legend> | ||
| 25 | |||
| 26 | <table border="0" cellpadding="4" cellspacing="0"> | ||
| 27 | <tr> | ||
| 28 | <td><label for="rowtype">{#table_dlg.rowtype}</label></td> | ||
| 29 | <td class="col2"> | ||
| 30 | <select id="rowtype" name="rowtype" class="mceFocus"> | ||
| 31 | <option value="thead">{#table_dlg.thead}</option> | ||
| 32 | <option value="tbody">{#table_dlg.tbody}</option> | ||
| 33 | <option value="tfoot">{#table_dlg.tfoot}</option> | ||
| 34 | </select> | ||
| 35 | </td> | ||
| 36 | </tr> | ||
| 37 | |||
| 38 | <tr> | ||
| 39 | <td><label for="align">{#table_dlg.align}</label></td> | ||
| 40 | <td class="col2"> | ||
| 41 | <select id="align" name="align"> | ||
| 42 | <option value="">{#not_set}</option> | ||
| 43 | <option value="center">{#table_dlg.align_middle}</option> | ||
| 44 | <option value="left">{#table_dlg.align_left}</option> | ||
| 45 | <option value="right">{#table_dlg.align_right}</option> | ||
| 46 | </select> | ||
| 47 | </td> | ||
| 48 | </tr> | ||
| 49 | |||
| 50 | <tr> | ||
| 51 | <td><label for="valign">{#table_dlg.valign}</label></td> | ||
| 52 | <td class="col2"> | ||
| 53 | <select id="valign" name="valign"> | ||
| 54 | <option value="">{#not_set}</option> | ||
| 55 | <option value="top">{#table_dlg.align_top}</option> | ||
| 56 | <option value="middle">{#table_dlg.align_middle}</option> | ||
| 57 | <option value="bottom">{#table_dlg.align_bottom}</option> | ||
| 58 | </select> | ||
| 59 | </td> | ||
| 60 | </tr> | ||
| 61 | |||
| 62 | <tr id="styleSelectRow"> | ||
| 63 | <td><label for="class">{#class_name}</label></td> | ||
| 64 | <td class="col2"> | ||
| 65 | <select id="class" name="class" class="mceEditableSelect"> | ||
| 66 | <option value="" selected="selected">{#not_set}</option> | ||
| 67 | </select> | ||
| 68 | </td> | ||
| 69 | </tr> | ||
| 70 | |||
| 71 | <tr> | ||
| 72 | <td><label for="height">{#table_dlg.height}</label></td> | ||
| 73 | <td class="col2"><input name="height" type="text" id="height" value="" size="4" maxlength="4" onchange="changedSize();" /></td> | ||
| 74 | </tr> | ||
| 75 | </table> | ||
| 76 | </fieldset> | ||
| 77 | </div> | ||
| 78 | |||
| 79 | <div id="advanced_panel" class="panel"> | ||
| 80 | <fieldset> | ||
| 81 | <legend>{#table_dlg.advanced_props}</legend> | ||
| 82 | |||
| 83 | <table border="0" cellpadding="0" cellspacing="4"> | ||
| 84 | <tr> | ||
| 85 | <td class="column1"><label for="id">{#table_dlg.id}</label></td> | ||
| 86 | <td><input id="id" name="id" type="text" value="" style="width: 200px" /></td> | ||
| 87 | </tr> | ||
| 88 | |||
| 89 | <tr> | ||
| 90 | <td><label for="style">{#table_dlg.style}</label></td> | ||
| 91 | <td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td> | ||
| 92 | </tr> | ||
| 93 | |||
| 94 | <tr> | ||
| 95 | <td class="column1"><label for="dir">{#table_dlg.langdir}</label></td> | ||
| 96 | <td> | ||
| 97 | <select id="dir" name="dir" style="width: 200px"> | ||
| 98 | <option value="">{#not_set}</option> | ||
| 99 | <option value="ltr">{#table_dlg.ltr}</option> | ||
| 100 | <option value="rtl">{#table_dlg.rtl}</option> | ||
| 101 | </select> | ||
| 102 | </td> | ||
| 103 | </tr> | ||
| 104 | |||
| 105 | <tr> | ||
| 106 | <td class="column1"><label for="lang">{#table_dlg.langcode}</label></td> | ||
| 107 | <td> | ||
| 108 | <input id="lang" name="lang" type="text" value="" style="width: 200px" /> | ||
| 109 | </td> | ||
| 110 | </tr> | ||
| 111 | |||
| 112 | <tr> | ||
| 113 | <td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td> | ||
| 114 | <td> | ||
| 115 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 116 | <tr> | ||
| 117 | <td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td> | ||
| 118 | <td id="backgroundimagebrowsercontainer"> </td> | ||
| 119 | </tr> | ||
| 120 | </table> | ||
| 121 | </td> | ||
| 122 | </tr> | ||
| 123 | |||
| 124 | <tr> | ||
| 125 | <td class="column1"><label for="bgcolor">{#table_dlg.bgcolor}</label></td> | ||
| 126 | <td> | ||
| 127 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 128 | <tr> | ||
| 129 | <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td> | ||
| 130 | <td id="bgcolor_pickcontainer"> </td> | ||
| 131 | </tr> | ||
| 132 | </table> | ||
| 133 | </td> | ||
| 134 | </tr> | ||
| 135 | </table> | ||
| 136 | </fieldset> | ||
| 137 | </div> | ||
| 138 | </div> | ||
| 139 | |||
| 140 | <div class="mceActionPanel"> | ||
| 141 | <div> | ||
| 142 | <select id="action" name="action"> | ||
| 143 | <option value="row">{#table_dlg.row_row}</option> | ||
| 144 | <option value="odd">{#table_dlg.row_odd}</option> | ||
| 145 | <option value="even">{#table_dlg.row_even}</option> | ||
| 146 | <option value="all">{#table_dlg.row_all}</option> | ||
| 147 | </select> | ||
| 148 | </div> | ||
| 149 | |||
| 150 | <div style="float: left"> | ||
| 151 | <div><input type="submit" id="insert" name="insert" value="{#update}" /></div> | ||
| 152 | </div> | ||
| 153 | |||
| 154 | <div style="float: right"> | ||
| 155 | <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" /> | ||
| 156 | </div> | ||
| 157 | </div> | ||
| 158 | </form> | ||
| 159 | </body> | ||
| 160 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/table/table.htm b/public/javascripts/tiny_mce/plugins/table/table.htm deleted file mode 100644 index 37e6159..0000000 --- a/public/javascripts/tiny_mce/plugins/table/table.htm +++ /dev/null | |||
| @@ -1,192 +0,0 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title>{#table_dlg.title}</title> | ||
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 6 | <script type="text/javascript" src="../../utils/mctabs.js"></script> | ||
| 7 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | ||
| 8 | <script type="text/javascript" src="../../utils/validate.js"></script> | ||
| 9 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> | ||
| 10 | <script type="text/javascript" src="js/table.js"></script> | ||
| 11 | <link href="css/table.css" rel="stylesheet" type="text/css" /> | ||
| 12 | </head> | ||
| 13 | <body id="table" style="display: none"> | ||
| 14 | <form onsubmit="insertTable();return false;" action="#"> | ||
| 15 | <div class="tabs"> | ||
| 16 | <ul> | ||
| 17 | <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li> | ||
| 18 | <li id="advanced_tab"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li> | ||
| 19 | </ul> | ||
| 20 | </div> | ||
| 21 | |||
| 22 | <div class="panel_wrapper"> | ||
| 23 | <div id="general_panel" class="panel current"> | ||
| 24 | <fieldset> | ||
| 25 | <legend>{#table_dlg.general_props}</legend> | ||
| 26 | <table border="0" cellpadding="4" cellspacing="0" width="100%"> | ||
| 27 | <tr> | ||
| 28 | <td><label id="colslabel" for="cols">{#table_dlg.cols}</label></td> | ||
| 29 | <td><input id="cols" name="cols" type="text" value="" size="3" maxlength="3" class="required number min1 mceFocus" /></td> | ||
| 30 | <td><label id="rowslabel" for="rows">{#table_dlg.rows}</label></td> | ||
| 31 | <td><input id="rows" name="rows" type="text" value="" size="3" maxlength="3" class="required number min1" /></td> | ||
| 32 | </tr> | ||
| 33 | <tr> | ||
| 34 | <td><label id="cellpaddinglabel" for="cellpadding">{#table_dlg.cellpadding}</label></td> | ||
| 35 | <td><input id="cellpadding" name="cellpadding" type="text" value="" size="3" maxlength="3" class="number" /></td> | ||
| 36 | <td><label id="cellspacinglabel" for="cellspacing">{#table_dlg.cellspacing}</label></td> | ||
| 37 | <td><input id="cellspacing" name="cellspacing" type="text" value="" size="3" maxlength="3" class="number" /></td> | ||
| 38 | </tr> | ||
| 39 | <tr> | ||
| 40 | <td><label id="alignlabel" for="align">{#table_dlg.align}</label></td> | ||
| 41 | <td><select id="align" name="align"> | ||
| 42 | <option value="">{#not_set}</option> | ||
| 43 | <option value="center">{#table_dlg.align_middle}</option> | ||
| 44 | <option value="left">{#table_dlg.align_left}</option> | ||
| 45 | <option value="right">{#table_dlg.align_right}</option> | ||
| 46 | </select></td> | ||
| 47 | <td><label id="borderlabel" for="border">{#table_dlg.border}</label></td> | ||
| 48 | <td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="changedBorder();" class="number" /></td> | ||
| 49 | </tr> | ||
| 50 | <tr id="width_row"> | ||
| 51 | <td><label id="widthlabel" for="width">{#table_dlg.width}</label></td> | ||
| 52 | <td><input name="width" type="text" id="width" value="" size="4" maxlength="4" onchange="changedSize();" class="size" /></td> | ||
| 53 | <td><label id="heightlabel" for="height">{#table_dlg.height}</label></td> | ||
| 54 | <td><input name="height" type="text" id="height" value="" size="4" maxlength="4" onchange="changedSize();" class="size" /></td> | ||
| 55 | </tr> | ||
| 56 | <tr id="styleSelectRow"> | ||
| 57 | <td><label id="classlabel" for="class">{#class_name}</label></td> | ||
| 58 | <td colspan="3"> | ||
| 59 | <select id="class" name="class" class="mceEditableSelect"> | ||
| 60 | <option value="" selected="selected">{#not_set}</option> | ||
| 61 | </select></td> | ||
| 62 | </tr> | ||
| 63 | <tr> | ||
| 64 | <td class="column1"><label for="caption">{#table_dlg.caption}</label></td> | ||
| 65 | <td><input id="caption" name="caption" type="checkbox" class="checkbox" value="true" /></td> | ||
| 66 | </tr> | ||
| 67 | </table> | ||
| 68 | </fieldset> | ||
| 69 | </div> | ||
| 70 | |||
| 71 | <div id="advanced_panel" class="panel"> | ||
| 72 | <fieldset> | ||
| 73 | <legend>{#table_dlg.advanced_props}</legend> | ||
| 74 | |||
| 75 | <table border="0" cellpadding="0" cellspacing="4"> | ||
| 76 | <tr> | ||
| 77 | <td class="column1"><label for="id">{#table_dlg.id}</label></td> | ||
| 78 | <td><input id="id" name="id" type="text" value="" class="advfield" /></td> | ||
| 79 | </tr> | ||
| 80 | |||
| 81 | <tr> | ||
| 82 | <td class="column1"><label for="summary">{#table_dlg.summary}</label></td> | ||
| 83 | <td><input id="summary" name="summary" type="text" value="" class="advfield" /></td> | ||
| 84 | </tr> | ||
| 85 | |||
| 86 | <tr> | ||
| 87 | <td><label for="style">{#table_dlg.style}</label></td> | ||
| 88 | <td><input type="text" id="style" name="style" value="" class="advfield" onchange="changedStyle();" /></td> | ||
| 89 | </tr> | ||
| 90 | |||
| 91 | <tr> | ||
| 92 | <td class="column1"><label id="langlabel" for="lang">{#table_dlg.langcode}</label></td> | ||
| 93 | <td> | ||
| 94 | <input id="lang" name="lang" type="text" value="" class="advfield" /> | ||
| 95 | </td> | ||
| 96 | </tr> | ||
| 97 | |||
| 98 | <tr> | ||
| 99 | <td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td> | ||
| 100 | <td> | ||
| 101 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 102 | <tr> | ||
| 103 | <td><input id="backgroundimage" name="backgroundimage" type="text" value="" class="advfield" onchange="changedBackgroundImage();" /></td> | ||
| 104 | <td id="backgroundimagebrowsercontainer"> </td> | ||
| 105 | </tr> | ||
| 106 | </table> | ||
| 107 | </td> | ||
| 108 | </tr> | ||
| 109 | |||
| 110 | <tr> | ||
| 111 | <td class="column1"><label for="tframe">{#table_dlg.frame}</label></td> | ||
| 112 | <td> | ||
| 113 | <select id="tframe" name="tframe" class="advfield"> | ||
| 114 | <option value="">{#not_set}</option> | ||
| 115 | <option value="void">{#table_dlg.rules_void}</option> | ||
| 116 | <option value="above">{#table_dlg.rules_above}</option> | ||
| 117 | <option value="below">{#table_dlg.rules_below}</option> | ||
| 118 | <option value="hsides">{#table_dlg.rules_hsides}</option> | ||
| 119 | <option value="lhs">{#table_dlg.rules_lhs}</option> | ||
| 120 | <option value="rhs">{#table_dlg.rules_rhs}</option> | ||
| 121 | <option value="vsides">{#table_dlg.rules_vsides}</option> | ||
| 122 | <option value="box">{#table_dlg.rules_box}</option> | ||
| 123 | <option value="border">{#table_dlg.rules_border}</option> | ||
| 124 | </select> | ||
| 125 | </td> | ||
| 126 | </tr> | ||
| 127 | |||
| 128 | <tr> | ||
| 129 | <td class="column1"><label for="rules">{#table_dlg.rules}</label></td> | ||
| 130 | <td> | ||
| 131 | <select id="rules" name="rules" class="advfield"> | ||
| 132 | <option value="">{#not_set}</option> | ||
| 133 | <option value="none">{#table_dlg.frame_none}</option> | ||
| 134 | <option value="groups">{#table_dlg.frame_groups}</option> | ||
| 135 | <option value="rows">{#table_dlg.frame_rows}</option> | ||
| 136 | <option value="cols">{#table_dlg.frame_cols}</option> | ||
| 137 | <option value="all">{#table_dlg.frame_all}</option> | ||
| 138 | </select> | ||
| 139 | </td> | ||
| 140 | </tr> | ||
| 141 | |||
| 142 | <tr> | ||
| 143 | <td class="column1"><label for="dir">{#table_dlg.langdir}</label></td> | ||
| 144 | <td> | ||
| 145 | <select id="dir" name="dir" class="advfield"> | ||
| 146 | <option value="">{#not_set}</option> | ||
| 147 | <option value="ltr">{#table_dlg.ltr}</option> | ||
| 148 | <option value="rtl">{#table_dlg.rtl}</option> | ||
| 149 | </select> | ||
| 150 | </td> | ||
| 151 | </tr> | ||
| 152 | |||
| 153 | <tr> | ||
| 154 | <td class="column1"><label for="bordercolor">{#table_dlg.bordercolor}</label></td> | ||
| 155 | <td> | ||
| 156 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 157 | <tr> | ||
| 158 | <td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td> | ||
| 159 | <td id="bordercolor_pickcontainer"> </td> | ||
| 160 | </tr> | ||
| 161 | </table> | ||
| 162 | </td> | ||
| 163 | </tr> | ||
| 164 | |||
| 165 | <tr> | ||
| 166 | <td class="column1"><label for="bgcolor">{#table_dlg.bgcolor}</label></td> | ||
| 167 | <td> | ||
| 168 | <table border="0" cellpadding="0" cellspacing="0"> | ||
| 169 | <tr> | ||
| 170 | <td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td> | ||
| 171 | <td id="bgcolor_pickcontainer"> </td> | ||
| 172 | </tr> | ||
| 173 | </table> | ||
| 174 | </td> | ||
| 175 | </tr> | ||
| 176 | </table> | ||
| 177 | </fieldset> | ||
| 178 | </div> | ||
| 179 | </div> | ||
| 180 | |||
| 181 | <div class="mceActionPanel"> | ||
| 182 | <div style="float: left"> | ||
| 183 | <input type="submit" id="insert" name="insert" value="{#insert}" /> | ||
| 184 | </div> | ||
| 185 | |||
| 186 | <div style="float: right"> | ||
| 187 | <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" /> | ||
| 188 | </div> | ||
| 189 | </div> | ||
| 190 | </form> | ||
| 191 | </body> | ||
| 192 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/template/blank.htm b/public/javascripts/tiny_mce/plugins/template/blank.htm deleted file mode 100644 index ecde53f..0000000 --- a/public/javascripts/tiny_mce/plugins/template/blank.htm +++ /dev/null | |||
| @@ -1,12 +0,0 @@ | |||
| 1 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 2 | <head> | ||
| 3 | <title>blank_page</title> | ||
| 4 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | ||
| 5 | <script type="text/javascript"> | ||
| 6 | parent.TemplateDialog.loadCSSFiles(document); | ||
| 7 | </script> | ||
| 8 | </head> | ||
| 9 | <body id="mceTemplatePreview" class="mceContentBody"> | ||
| 10 | |||
| 11 | </body> | ||
| 12 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/template/css/template.css b/public/javascripts/tiny_mce/plugins/template/css/template.css deleted file mode 100644 index 2d23a49..0000000 --- a/public/javascripts/tiny_mce/plugins/template/css/template.css +++ /dev/null | |||
| @@ -1,23 +0,0 @@ | |||
| 1 | #frmbody { | ||
| 2 | padding: 10px; | ||
| 3 | background-color: #FFF; | ||
| 4 | border: 1px solid #CCC; | ||
| 5 | } | ||
| 6 | |||
| 7 | .frmRow { | ||
| 8 | margin-bottom: 10px; | ||
| 9 | } | ||
| 10 | |||
| 11 | #templatesrc { | ||
| 12 | border: none; | ||
| 13 | width: 320px; | ||
| 14 | height: 240px; | ||
| 15 | } | ||
| 16 | |||
| 17 | .title { | ||
| 18 | padding-bottom: 5px; | ||
| 19 | } | ||
| 20 | |||
| 21 | .mceActionPanel { | ||
| 22 | padding-top: 5px; | ||
| 23 | } | ||
diff --git a/public/javascripts/tiny_mce/plugins/template/editor_plugin.js b/public/javascripts/tiny_mce/plugins/template/editor_plugin.js deleted file mode 100644 index ebe3c27..0000000 --- a/public/javascripts/tiny_mce/plugins/template/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){var a=tinymce.each;tinymce.create("tinymce.plugins.TemplatePlugin",{init:function(b,c){var d=this;d.editor=b;b.addCommand("mceTemplate",function(e){b.windowManager.open({file:c+"/template.htm",width:b.getParam("template_popup_width",750),height:b.getParam("template_popup_height",600),inline:1},{plugin_url:c})});b.addCommand("mceInsertTemplate",d._insertTemplate,d);b.addButton("template",{title:"template.desc",cmd:"mceTemplate"});b.onPreProcess.add(function(e,g){var f=e.dom;a(f.select("div",g.node),function(h){if(f.hasClass(h,"mceTmpl")){a(f.select("*",h),function(i){if(f.hasClass(i,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))){i.innerHTML=d._getDateTime(new Date(),e.getParam("template_mdate_format",e.getLang("template.mdate_format")))}});d._replaceVals(h)}})})},getInfo:function(){return{longname:"Template plugin",author:"Moxiecode Systems AB",authorurl:"http://www.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/template",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_insertTemplate:function(i,j){var k=this,g=k.editor,f,c,d=g.dom,b=g.selection.getContent();f=j.content;a(k.editor.getParam("template_replace_values"),function(l,h){if(typeof(l)!="function"){f=f.replace(new RegExp("\\{\\$"+h+"\\}","g"),l)}});c=d.create("div",null,f);n=d.select(".mceTmpl",c);if(n&&n.length>0){c=d.create("div",null);c.appendChild(n[0].cloneNode(true))}function e(l,h){return new RegExp("\\b"+h+"\\b","g").test(l.className)}a(d.select("*",c),function(h){if(e(h,g.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))){h.innerHTML=k._getDateTime(new Date(),g.getParam("template_cdate_format",g.getLang("template.cdate_format")))}if(e(h,g.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))){h.innerHTML=k._getDateTime(new Date(),g.getParam("template_mdate_format",g.getLang("template.mdate_format")))}if(e(h,g.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))){h.innerHTML=b}});k._replaceVals(c);g.execCommand("mceInsertContent",false,c.innerHTML);g.addVisual()},_replaceVals:function(c){var d=this.editor.dom,b=this.editor.getParam("template_replace_values");a(d.select("*",c),function(f){a(b,function(g,e){if(d.hasClass(f,e)){if(typeof(b[e])=="function"){b[e](f)}}})})},_getDateTime:function(e,b){if(!b){return""}function c(g,d){var f;g=""+g;if(g.length<d){for(f=0;f<(d-g.length);f++){g="0"+g}}return g}b=b.replace("%D","%m/%d/%y");b=b.replace("%r","%I:%M:%S %p");b=b.replace("%Y",""+e.getFullYear());b=b.replace("%y",""+e.getYear());b=b.replace("%m",c(e.getMonth()+1,2));b=b.replace("%d",c(e.getDate(),2));b=b.replace("%H",""+c(e.getHours(),2));b=b.replace("%M",""+c(e.getMinutes(),2));b=b.replace("%S",""+c(e.getSeconds(),2));b=b.replace("%I",""+((e.getHours()+11)%12+1));b=b.replace("%p",""+(e.getHours()<12?"AM":"PM"));b=b.replace("%B",""+this.editor.getLang("template_months_long").split(",")[e.getMonth()]);b=b.replace("%b",""+this.editor.getLang("template_months_short").split(",")[e.getMonth()]);b=b.replace("%A",""+this.editor.getLang("template_day_long").split(",")[e.getDay()]);b=b.replace("%a",""+this.editor.getLang("template_day_short").split(",")[e.getDay()]);b=b.replace("%%","%");return b}});tinymce.PluginManager.add("template",tinymce.plugins.TemplatePlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/template/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/template/editor_plugin_src.js deleted file mode 100644 index 09057ec..0000000 --- a/public/javascripts/tiny_mce/plugins/template/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,156 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | var each = tinymce.each; | ||
| 10 | |||
| 11 | tinymce.create('tinymce.plugins.TemplatePlugin', { | ||
| 12 | init : function(ed, url) { | ||
| 13 | var t = this; | ||
| 14 | |||
| 15 | t.editor = ed; | ||
| 16 | |||
| 17 | // Register commands | ||
| 18 | ed.addCommand('mceTemplate', function(ui) { | ||
| 19 | ed.windowManager.open({ | ||
| 20 | file : url + '/template.htm', | ||
| 21 | width : ed.getParam('template_popup_width', 750), | ||
| 22 | height : ed.getParam('template_popup_height', 600), | ||
| 23 | inline : 1 | ||
| 24 | }, { | ||
| 25 | plugin_url : url | ||
| 26 | }); | ||
| 27 | }); | ||
| 28 | |||
| 29 | ed.addCommand('mceInsertTemplate', t._insertTemplate, t); | ||
| 30 | |||
| 31 | // Register buttons | ||
| 32 | ed.addButton('template', {title : 'template.desc', cmd : 'mceTemplate'}); | ||
| 33 | |||
| 34 | ed.onPreProcess.add(function(ed, o) { | ||
| 35 | var dom = ed.dom; | ||
| 36 | |||
| 37 | each(dom.select('div', o.node), function(e) { | ||
| 38 | if (dom.hasClass(e, 'mceTmpl')) { | ||
| 39 | each(dom.select('*', e), function(e) { | ||
| 40 | if (dom.hasClass(e, ed.getParam('template_mdate_classes', 'mdate').replace(/\s+/g, '|'))) | ||
| 41 | e.innerHTML = t._getDateTime(new Date(), ed.getParam("template_mdate_format", ed.getLang("template.mdate_format"))); | ||
| 42 | }); | ||
| 43 | |||
| 44 | t._replaceVals(e); | ||
| 45 | } | ||
| 46 | }); | ||
| 47 | }); | ||
| 48 | }, | ||
| 49 | |||
| 50 | getInfo : function() { | ||
| 51 | return { | ||
| 52 | longname : 'Template plugin', | ||
| 53 | author : 'Moxiecode Systems AB', | ||
| 54 | authorurl : 'http://www.moxiecode.com', | ||
| 55 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/template', | ||
| 56 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 57 | }; | ||
| 58 | }, | ||
| 59 | |||
| 60 | _insertTemplate : function(ui, v) { | ||
| 61 | var t = this, ed = t.editor, h, el, dom = ed.dom, sel = ed.selection.getContent(); | ||
| 62 | |||
| 63 | h = v.content; | ||
| 64 | |||
| 65 | each(t.editor.getParam('template_replace_values'), function(v, k) { | ||
| 66 | if (typeof(v) != 'function') | ||
| 67 | h = h.replace(new RegExp('\\{\\$' + k + '\\}', 'g'), v); | ||
| 68 | }); | ||
| 69 | |||
| 70 | el = dom.create('div', null, h); | ||
| 71 | |||
| 72 | // Find template element within div | ||
| 73 | n = dom.select('.mceTmpl', el); | ||
| 74 | if (n && n.length > 0) { | ||
| 75 | el = dom.create('div', null); | ||
| 76 | el.appendChild(n[0].cloneNode(true)); | ||
| 77 | } | ||
| 78 | |||
| 79 | function hasClass(n, c) { | ||
| 80 | return new RegExp('\\b' + c + '\\b', 'g').test(n.className); | ||
| 81 | }; | ||
| 82 | |||
| 83 | each(dom.select('*', el), function(n) { | ||
| 84 | // Replace cdate | ||
| 85 | if (hasClass(n, ed.getParam('template_cdate_classes', 'cdate').replace(/\s+/g, '|'))) | ||
| 86 | n.innerHTML = t._getDateTime(new Date(), ed.getParam("template_cdate_format", ed.getLang("template.cdate_format"))); | ||
| 87 | |||
| 88 | // Replace mdate | ||
| 89 | if (hasClass(n, ed.getParam('template_mdate_classes', 'mdate').replace(/\s+/g, '|'))) | ||
| 90 | n.innerHTML = t._getDateTime(new Date(), ed.getParam("template_mdate_format", ed.getLang("template.mdate_format"))); | ||
| 91 | |||
| 92 | // Replace selection | ||
| 93 | if (hasClass(n, ed.getParam('template_selected_content_classes', 'selcontent').replace(/\s+/g, '|'))) | ||
| 94 | n.innerHTML = sel; | ||
| 95 | }); | ||
| 96 | |||
| 97 | t._replaceVals(el); | ||
| 98 | |||
| 99 | ed.execCommand('mceInsertContent', false, el.innerHTML); | ||
| 100 | ed.addVisual(); | ||
| 101 | }, | ||
| 102 | |||
| 103 | _replaceVals : function(e) { | ||
| 104 | var dom = this.editor.dom, vl = this.editor.getParam('template_replace_values'); | ||
| 105 | |||
| 106 | each(dom.select('*', e), function(e) { | ||
| 107 | each(vl, function(v, k) { | ||
| 108 | if (dom.hasClass(e, k)) { | ||
| 109 | if (typeof(vl[k]) == 'function') | ||
| 110 | vl[k](e); | ||
| 111 | } | ||
| 112 | }); | ||
| 113 | }); | ||
| 114 | }, | ||
| 115 | |||
| 116 | _getDateTime : function(d, fmt) { | ||
| 117 | if (!fmt) | ||
| 118 | return ""; | ||
| 119 | |||
| 120 | function addZeros(value, len) { | ||
| 121 | var i; | ||
| 122 | |||
| 123 | value = "" + value; | ||
| 124 | |||
| 125 | if (value.length < len) { | ||
| 126 | for (i=0; i<(len-value.length); i++) | ||
| 127 | value = "0" + value; | ||
| 128 | } | ||
| 129 | |||
| 130 | return value; | ||
| 131 | } | ||
| 132 | |||
| 133 | fmt = fmt.replace("%D", "%m/%d/%y"); | ||
| 134 | fmt = fmt.replace("%r", "%I:%M:%S %p"); | ||
| 135 | fmt = fmt.replace("%Y", "" + d.getFullYear()); | ||
| 136 | fmt = fmt.replace("%y", "" + d.getYear()); | ||
| 137 | fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2)); | ||
| 138 | fmt = fmt.replace("%d", addZeros(d.getDate(), 2)); | ||
| 139 | fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2)); | ||
| 140 | fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2)); | ||
| 141 | fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2)); | ||
| 142 | fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1)); | ||
| 143 | fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM")); | ||
| 144 | fmt = fmt.replace("%B", "" + this.editor.getLang("template_months_long").split(',')[d.getMonth()]); | ||
| 145 | fmt = fmt.replace("%b", "" + this.editor.getLang("template_months_short").split(',')[d.getMonth()]); | ||
| 146 | fmt = fmt.replace("%A", "" + this.editor.getLang("template_day_long").split(',')[d.getDay()]); | ||
| 147 | fmt = fmt.replace("%a", "" + this.editor.getLang("template_day_short").split(',')[d.getDay()]); | ||
| 148 | fmt = fmt.replace("%%", "%"); | ||
| 149 | |||
| 150 | return fmt; | ||
| 151 | } | ||
| 152 | }); | ||
| 153 | |||
| 154 | // Register plugin | ||
| 155 | tinymce.PluginManager.add('template', tinymce.plugins.TemplatePlugin); | ||
| 156 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/template/js/template.js b/public/javascripts/tiny_mce/plugins/template/js/template.js deleted file mode 100644 index 24045d7..0000000 --- a/public/javascripts/tiny_mce/plugins/template/js/template.js +++ /dev/null | |||
| @@ -1,106 +0,0 @@ | |||
| 1 | tinyMCEPopup.requireLangPack(); | ||
| 2 | |||
| 3 | var TemplateDialog = { | ||
| 4 | preInit : function() { | ||
| 5 | var url = tinyMCEPopup.getParam("template_external_list_url"); | ||
| 6 | |||
| 7 | if (url != null) | ||
| 8 | document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></sc'+'ript>'); | ||
| 9 | }, | ||
| 10 | |||
| 11 | init : function() { | ||
| 12 | var ed = tinyMCEPopup.editor, tsrc, sel, x, u; | ||
| 13 | |||
| 14 | tsrc = ed.getParam("template_templates", false); | ||
| 15 | sel = document.getElementById('tpath'); | ||
| 16 | |||
| 17 | // Setup external template list | ||
| 18 | if (!tsrc && typeof(tinyMCETemplateList) != 'undefined') { | ||
| 19 | for (x=0, tsrc = []; x<tinyMCETemplateList.length; x++) | ||
| 20 | tsrc.push({title : tinyMCETemplateList[x][0], src : tinyMCETemplateList[x][1], description : tinyMCETemplateList[x][2]}); | ||
| 21 | } | ||
| 22 | |||
| 23 | for (x=0; x<tsrc.length; x++) | ||
| 24 | sel.options[sel.options.length] = new Option(tsrc[x].title, tinyMCEPopup.editor.documentBaseURI.toAbsolute(tsrc[x].src)); | ||
| 25 | |||
| 26 | this.resize(); | ||
| 27 | this.tsrc = tsrc; | ||
| 28 | }, | ||
| 29 | |||
| 30 | resize : function() { | ||
| 31 | var w, h, e; | ||
| 32 | |||
| 33 | if (!self.innerWidth) { | ||
| 34 | w = document.body.clientWidth - 50; | ||
| 35 | h = document.body.clientHeight - 160; | ||
| 36 | } else { | ||
| 37 | w = self.innerWidth - 50; | ||
| 38 | h = self.innerHeight - 170; | ||
| 39 | } | ||
| 40 | |||
| 41 | e = document.getElementById('templatesrc'); | ||
| 42 | |||
| 43 | if (e) { | ||
| 44 | e.style.height = Math.abs(h) + 'px'; | ||
| 45 | e.style.width = Math.abs(w - 5) + 'px'; | ||
| 46 | } | ||
| 47 | }, | ||
| 48 | |||
| 49 | loadCSSFiles : function(d) { | ||
| 50 | var ed = tinyMCEPopup.editor; | ||
| 51 | |||
| 52 | tinymce.each(ed.getParam("content_css", '').split(','), function(u) { | ||
| 53 | d.write('<link href="' + ed.documentBaseURI.toAbsolute(u) + '" rel="stylesheet" type="text/css" />'); | ||
| 54 | }); | ||
| 55 | }, | ||
| 56 | |||
| 57 | selectTemplate : function(u, ti) { | ||
| 58 | var d = window.frames['templatesrc'].document, x, tsrc = this.tsrc; | ||
| 59 | |||
| 60 | if (!u) | ||
| 61 | return; | ||
| 62 | |||
| 63 | d.body.innerHTML = this.templateHTML = this.getFileContents(u); | ||
| 64 | |||
| 65 | for (x=0; x<tsrc.length; x++) { | ||
| 66 | if (tsrc[x].title == ti) | ||
| 67 | document.getElementById('tmpldesc').innerHTML = tsrc[x].description || ''; | ||
| 68 | } | ||
| 69 | }, | ||
| 70 | |||
| 71 | insert : function() { | ||
| 72 | tinyMCEPopup.execCommand('mceInsertTemplate', false, { | ||
| 73 | content : this.templateHTML, | ||
| 74 | selection : tinyMCEPopup.editor.selection.getContent() | ||
| 75 | }); | ||
| 76 | |||
| 77 | tinyMCEPopup.close(); | ||
| 78 | }, | ||
| 79 | |||
| 80 | getFileContents : function(u) { | ||
| 81 | var x, d, t = 'text/plain'; | ||
| 82 | |||
| 83 | function g(s) { | ||
| 84 | x = 0; | ||
| 85 | |||
| 86 | try { | ||
| 87 | x = new ActiveXObject(s); | ||
| 88 | } catch (s) { | ||
| 89 | } | ||
| 90 | |||
| 91 | return x; | ||
| 92 | }; | ||
| 93 | |||
| 94 | x = window.ActiveXObject ? g('Msxml2.XMLHTTP') || g('Microsoft.XMLHTTP') : new XMLHttpRequest(); | ||
| 95 | |||
| 96 | // Synchronous AJAX load file | ||
| 97 | x.overrideMimeType && x.overrideMimeType(t); | ||
| 98 | x.open("GET", u, false); | ||
| 99 | x.send(null); | ||
| 100 | |||
| 101 | return x.responseText; | ||
| 102 | } | ||
| 103 | }; | ||
| 104 | |||
| 105 | TemplateDialog.preInit(); | ||
| 106 | tinyMCEPopup.onInit.add(TemplateDialog.init, TemplateDialog); | ||
diff --git a/public/javascripts/tiny_mce/plugins/template/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/template/langs/en_dlg.js deleted file mode 100644 index 2471c3f..0000000 --- a/public/javascripts/tiny_mce/plugins/template/langs/en_dlg.js +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | tinyMCE.addI18n('en.template_dlg',{ | ||
| 2 | title:"Templates", | ||
| 3 | label:"Template", | ||
| 4 | desc_label:"Description", | ||
| 5 | desc:"Insert predefined template content", | ||
| 6 | select:"Select a template", | ||
| 7 | preview:"Preview", | ||
| 8 | warning:"Warning: Updating a template with a different one may cause data loss.", | ||
| 9 | mdate_format:"%Y-%m-%d %H:%M:%S", | ||
| 10 | cdate_format:"%Y-%m-%d %H:%M:%S", | ||
| 11 | months_long:"January,February,March,April,May,June,July,August,September,October,November,December", | ||
| 12 | months_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec", | ||
| 13 | day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday", | ||
| 14 | day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun" | ||
| 15 | }); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/template/template.htm b/public/javascripts/tiny_mce/plugins/template/template.htm deleted file mode 100644 index f7bb044..0000000 --- a/public/javascripts/tiny_mce/plugins/template/template.htm +++ /dev/null | |||
| @@ -1,38 +0,0 @@ | |||
| 1 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 2 | <head> | ||
| 3 | <title>{#template_dlg.title}</title> | ||
| 4 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 5 | <script type="text/javascript" src="js/template.js"></script> | ||
| 6 | <link href="css/template.css" rel="stylesheet" type="text/css" /> | ||
| 7 | </head> | ||
| 8 | <body onresize="TemplateDialog.resize();"> | ||
| 9 | <form onsubmit="TemplateDialog.insert();return false;"> | ||
| 10 | <div id="frmbody"> | ||
| 11 | <div class="title">{#template_dlg.desc}</div> | ||
| 12 | <div class="frmRow"><label for="tpath" title="{#template_dlg.select}">{#template_dlg.label}:</label> | ||
| 13 | <select id="tpath" name="tpath" onchange="TemplateDialog.selectTemplate(this.options[this.selectedIndex].value, this.options[this.selectedIndex].text);" class="mceFocus"> | ||
| 14 | <option value="">{#template_dlg.select}...</option> | ||
| 15 | </select> | ||
| 16 | <span id="warning"></span></div> | ||
| 17 | <div class="frmRow"><label for="tdesc">{#template_dlg.desc_label}:</label> | ||
| 18 | <span id="tmpldesc"></span></div> | ||
| 19 | <fieldset> | ||
| 20 | <legend>{#template_dlg.preview}</legend> | ||
| 21 | <iframe id="templatesrc" name="templatesrc" src="blank.htm" width="690" height="400" frameborder="0"></iframe> | ||
| 22 | </fieldset> | ||
| 23 | </div> | ||
| 24 | |||
| 25 | <div class="mceActionPanel"> | ||
| 26 | <div style="float: left"> | ||
| 27 | <input type="submit" id="insert" name="insert" value="{#insert}" /> | ||
| 28 | </div> | ||
| 29 | |||
| 30 | <div style="float: right"> | ||
| 31 | <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" /> | ||
| 32 | </div> | ||
| 33 | |||
| 34 | <br style="clear:both" /> | ||
| 35 | </div> | ||
| 36 | </form> | ||
| 37 | </body> | ||
| 38 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/visualchars/editor_plugin.js b/public/javascripts/tiny_mce/plugins/visualchars/editor_plugin.js deleted file mode 100644 index 53d31c4..0000000 --- a/public/javascripts/tiny_mce/plugins/visualchars/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.VisualChars",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceVisualChars",c._toggleVisualChars,c);a.addButton("visualchars",{title:"visualchars.desc",cmd:"mceVisualChars"});a.onBeforeGetContent.add(function(d,e){if(c.state){c.state=true;c._toggleVisualChars()}})},getInfo:function(){return{longname:"Visual characters",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_toggleVisualChars:function(){var m=this,g=m.editor,a,e,f,k=g.getDoc(),l=g.getBody(),j,n=g.selection,c;m.state=!m.state;g.controlManager.setActive("visualchars",m.state);if(m.state){a=[];tinymce.walk(l,function(b){if(b.nodeType==3&&b.nodeValue&&b.nodeValue.indexOf("\u00a0")!=-1){a.push(b)}},"childNodes");for(e=0;e<a.length;e++){j=a[e].nodeValue;j=j.replace(/(\u00a0+)/g,'<span class="mceItemHidden mceVisualNbsp">$1</span>');j=j.replace(/\u00a0/g,"\u00b7");g.dom.setOuterHTML(a[e],j,k)}}else{a=tinymce.grep(g.dom.select("span",l),function(b){return g.dom.hasClass(b,"mceVisualNbsp")});for(e=0;e<a.length;e++){g.dom.setOuterHTML(a[e],a[e].innerHTML.replace(/(·|\u00b7)/g," "),k)}}}});tinymce.PluginManager.add("visualchars",tinymce.plugins.VisualChars)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/visualchars/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/visualchars/editor_plugin_src.js deleted file mode 100644 index 02ec4e6..0000000 --- a/public/javascripts/tiny_mce/plugins/visualchars/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,73 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.VisualChars', { | ||
| 10 | init : function(ed, url) { | ||
| 11 | var t = this; | ||
| 12 | |||
| 13 | t.editor = ed; | ||
| 14 | |||
| 15 | // Register commands | ||
| 16 | ed.addCommand('mceVisualChars', t._toggleVisualChars, t); | ||
| 17 | |||
| 18 | // Register buttons | ||
| 19 | ed.addButton('visualchars', {title : 'visualchars.desc', cmd : 'mceVisualChars'}); | ||
| 20 | |||
| 21 | ed.onBeforeGetContent.add(function(ed, o) { | ||
| 22 | if (t.state) { | ||
| 23 | t.state = true; | ||
| 24 | t._toggleVisualChars(); | ||
| 25 | } | ||
| 26 | }); | ||
| 27 | }, | ||
| 28 | |||
| 29 | getInfo : function() { | ||
| 30 | return { | ||
| 31 | longname : 'Visual characters', | ||
| 32 | author : 'Moxiecode Systems AB', | ||
| 33 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 34 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars', | ||
| 35 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 36 | }; | ||
| 37 | }, | ||
| 38 | |||
| 39 | // Private methods | ||
| 40 | |||
| 41 | _toggleVisualChars : function() { | ||
| 42 | var t = this, ed = t.editor, nl, i, h, d = ed.getDoc(), b = ed.getBody(), nv, s = ed.selection, bo; | ||
| 43 | |||
| 44 | t.state = !t.state; | ||
| 45 | ed.controlManager.setActive('visualchars', t.state); | ||
| 46 | |||
| 47 | if (t.state) { | ||
| 48 | nl = []; | ||
| 49 | tinymce.walk(b, function(n) { | ||
| 50 | if (n.nodeType == 3 && n.nodeValue && n.nodeValue.indexOf('\u00a0') != -1) | ||
| 51 | nl.push(n); | ||
| 52 | }, 'childNodes'); | ||
| 53 | |||
| 54 | for (i=0; i<nl.length; i++) { | ||
| 55 | nv = nl[i].nodeValue; | ||
| 56 | nv = nv.replace(/(\u00a0+)/g, '<span class="mceItemHidden mceVisualNbsp">$1</span>'); | ||
| 57 | nv = nv.replace(/\u00a0/g, '\u00b7'); | ||
| 58 | ed.dom.setOuterHTML(nl[i], nv, d); | ||
| 59 | } | ||
| 60 | } else { | ||
| 61 | nl = tinymce.grep(ed.dom.select('span', b), function(n) { | ||
| 62 | return ed.dom.hasClass(n, 'mceVisualNbsp'); | ||
| 63 | }); | ||
| 64 | |||
| 65 | for (i=0; i<nl.length; i++) | ||
| 66 | ed.dom.setOuterHTML(nl[i], nl[i].innerHTML.replace(/(·|\u00b7)/g, ' '), d); | ||
| 67 | } | ||
| 68 | } | ||
| 69 | }); | ||
| 70 | |||
| 71 | // Register plugin | ||
| 72 | tinymce.PluginManager.add('visualchars', tinymce.plugins.VisualChars); | ||
| 73 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/wordcount/editor_plugin.js b/public/javascripts/tiny_mce/plugins/wordcount/editor_plugin.js deleted file mode 100644 index f192835..0000000 --- a/public/javascripts/tiny_mce/plugins/wordcount/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.WordCount",{block:0,id:null,countre:null,cleanre:null,init:function(a,b){var c=this,d=0;c.countre=a.getParam("wordcount_countregex",/\S\s+/g);c.cleanre=a.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$¿'"_+=\\/-]*/g);c.id=a.id+"-word-count";a.onPostRender.add(function(f,e){var g,h;h=f.getParam("wordcount_target_id");if(!h){g=tinymce.DOM.get(f.id+"_path_row");if(g){tinymce.DOM.add(g.parentNode,"div",{style:"float: right"},f.getLang("wordcount.words","Words: ")+'<span id="'+c.id+'">0</span>')}}else{tinymce.DOM.add(h,"span",{},'<span id="'+c.id+'">0</span>')}});a.onInit.add(function(e){e.selection.onSetContent.add(function(){c._count(e)});c._count(e)});a.onSetContent.add(function(e){c._count(e)});a.onKeyUp.add(function(f,g){if(g.keyCode==d){return}if(13==g.keyCode||8==d||46==d){c._count(f)}d=g.keyCode})},_count:function(b){var c=this,a=0;if(c.block){return}c.block=1;setTimeout(function(){var d=b.getContent({format:"raw"});if(d){d=d.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ");d=d.replace(c.cleanre,"");d.replace(c.countre,function(){a++})}tinymce.DOM.setHTML(c.id,a.toString());setTimeout(function(){c.block=0},2000)},1)},getInfo:function(){return{longname:"Word Count plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("wordcount",tinymce.plugins.WordCount)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/wordcount/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/wordcount/editor_plugin_src.js deleted file mode 100644 index 41b78a9..0000000 --- a/public/javascripts/tiny_mce/plugins/wordcount/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,95 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.WordCount', { | ||
| 10 | block : 0, | ||
| 11 | id : null, | ||
| 12 | countre : null, | ||
| 13 | cleanre : null, | ||
| 14 | |||
| 15 | init : function(ed, url) { | ||
| 16 | var t = this, last = 0; | ||
| 17 | |||
| 18 | t.countre = ed.getParam('wordcount_countregex', /\S\s+/g); | ||
| 19 | t.cleanre = ed.getParam('wordcount_cleanregex', /[0-9.(),;:!?%#$¿'"_+=\\/-]*/g); | ||
| 20 | t.id = ed.id + '-word-count'; | ||
| 21 | |||
| 22 | ed.onPostRender.add(function(ed, cm) { | ||
| 23 | var row, id; | ||
| 24 | |||
| 25 | // Add it to the specified id or the theme advanced path | ||
| 26 | id = ed.getParam('wordcount_target_id'); | ||
| 27 | if (!id) { | ||
| 28 | row = tinymce.DOM.get(ed.id + '_path_row'); | ||
| 29 | |||
| 30 | if (row) | ||
| 31 | tinymce.DOM.add(row.parentNode, 'div', {'style': 'float: right'}, ed.getLang('wordcount.words', 'Words: ') + '<span id="' + t.id + '">0</span>'); | ||
| 32 | } else | ||
| 33 | tinymce.DOM.add(id, 'span', {}, '<span id="' + t.id + '">0</span>'); | ||
| 34 | }); | ||
| 35 | |||
| 36 | ed.onInit.add(function(ed) { | ||
| 37 | ed.selection.onSetContent.add(function() { | ||
| 38 | t._count(ed); | ||
| 39 | }); | ||
| 40 | |||
| 41 | t._count(ed); | ||
| 42 | }); | ||
| 43 | |||
| 44 | ed.onSetContent.add(function(ed) { | ||
| 45 | t._count(ed); | ||
| 46 | }); | ||
| 47 | |||
| 48 | ed.onKeyUp.add(function(ed, e) { | ||
| 49 | if (e.keyCode == last) | ||
| 50 | return; | ||
| 51 | |||
| 52 | if (13 == e.keyCode || 8 == last || 46 == last) | ||
| 53 | t._count(ed); | ||
| 54 | |||
| 55 | last = e.keyCode; | ||
| 56 | }); | ||
| 57 | }, | ||
| 58 | |||
| 59 | _count : function(ed) { | ||
| 60 | var t = this, tc = 0; | ||
| 61 | |||
| 62 | // Keep multiple calls from happening at the same time | ||
| 63 | if (t.block) | ||
| 64 | return; | ||
| 65 | |||
| 66 | t.block = 1; | ||
| 67 | |||
| 68 | setTimeout(function() { | ||
| 69 | var tx = ed.getContent({format : 'raw'}); | ||
| 70 | |||
| 71 | if (tx) { | ||
| 72 | tx = tx.replace(/<.[^<>]*?>/g, ' ').replace(/ | /gi, ' '); // remove html tags and space chars | ||
| 73 | tx = tx.replace(t.cleanre, ''); // remove numbers and punctuation | ||
| 74 | tx.replace(t.countre, function() {tc++;}); // count the words | ||
| 75 | } | ||
| 76 | |||
| 77 | tinymce.DOM.setHTML(t.id, tc.toString()); | ||
| 78 | |||
| 79 | setTimeout(function() {t.block = 0;}, 2000); | ||
| 80 | }, 1); | ||
| 81 | }, | ||
| 82 | |||
| 83 | getInfo: function() { | ||
| 84 | return { | ||
| 85 | longname : 'Word Count plugin', | ||
| 86 | author : 'Moxiecode Systems AB', | ||
| 87 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 88 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/wordcount', | ||
| 89 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 90 | }; | ||
| 91 | } | ||
| 92 | }); | ||
| 93 | |||
| 94 | tinymce.PluginManager.add('wordcount', tinymce.plugins.WordCount); | ||
| 95 | })(); | ||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/abbr.htm b/public/javascripts/tiny_mce/plugins/xhtmlxtras/abbr.htm deleted file mode 100644 index 3928a17..0000000 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/abbr.htm +++ /dev/null | |||
| @@ -1,148 +0,0 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title>{#xhtmlxtras_dlg.title_abbr_element}</title> | ||
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 6 | <script type="text/javascript" src="../../utils/mctabs.js"></script> | ||
| 7 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | ||
| 8 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> | ||
| 9 | <script type="text/javascript" src="js/element_common.js"></script> | ||
| 10 | <script type="text/javascript" src="js/abbr.js"></script> | ||
| 11 | <link rel="stylesheet" type="text/css" href="css/popup.css" /> | ||
| 12 | </head> | ||
| 13 | <body style="display: none"> | ||
| 14 | <form onsubmit="insertAbbr();return false;" action="#"> | ||
| 15 | <div class="tabs"> | ||
| 16 | <ul> | ||
| 17 | <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li> | ||
| 18 | <!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> --> | ||
| 19 | </ul> | ||
| 20 | </div> | ||
| 21 | |||
| 22 | <div class="panel_wrapper"> | ||
| 23 | <div id="general_panel" class="panel current"> | ||
| 24 | <fieldset> | ||
| 25 | <legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend> | ||
| 26 | <table border="0" cellpadding="0" cellspacing="4"> | ||
| 27 | <tr> | ||
| 28 | <td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td> | ||
| 29 | <td><input id="title" name="title" type="text" value="" class="field mceFocus" /></td> | ||
| 30 | </tr> | ||
| 31 | <tr> | ||
| 32 | <td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td> | ||
| 33 | <td><input id="id" name="id" type="text" value="" class="field" /></td> | ||
| 34 | </tr> | ||
| 35 | <tr> | ||
| 36 | <td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td> | ||
| 37 | <td> | ||
| 38 | <select id="class" name="class" class="field mceEditableSelect"> | ||
| 39 | <option value="">{#not_set}</option> | ||
| 40 | </select> | ||
| 41 | </td> | ||
| 42 | </tr> | ||
| 43 | <tr> | ||
| 44 | <td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td> | ||
| 45 | <td><input id="style" name="style" type="text" value="" class="field" /></td> | ||
| 46 | </tr> | ||
| 47 | <tr> | ||
| 48 | <td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td> | ||
| 49 | <td> | ||
| 50 | <select id="dir" name="dir" class="field"> | ||
| 51 | <option value="">{#not_set}</option> | ||
| 52 | <option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option> | ||
| 53 | <option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option> | ||
| 54 | </select> | ||
| 55 | </td> | ||
| 56 | </tr> | ||
| 57 | <tr> | ||
| 58 | <td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td> | ||
| 59 | <td> | ||
| 60 | <input id="lang" name="lang" type="text" value="" class="field" /> | ||
| 61 | </td> | ||
| 62 | </tr> | ||
| 63 | </table> | ||
| 64 | </fieldset> | ||
| 65 | </div> | ||
| 66 | <div id="events_panel" class="panel"> | ||
| 67 | <fieldset> | ||
| 68 | <legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend> | ||
| 69 | |||
| 70 | <table border="0" cellpadding="0" cellspacing="4"> | ||
| 71 | <tr> | ||
| 72 | <td class="label"><label for="onfocus">onfocus</label>:</td> | ||
| 73 | <td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td> | ||
| 74 | </tr> | ||
| 75 | |||
| 76 | <tr> | ||
| 77 | <td class="label"><label for="onblur">onblur</label>:</td> | ||
| 78 | <td><input id="onblur" name="onblur" type="text" value="" class="field" /></td> | ||
| 79 | </tr> | ||
| 80 | |||
| 81 | <tr> | ||
| 82 | <td class="label"><label for="onclick">onclick</label>:</td> | ||
| 83 | <td><input id="onclick" name="onclick" type="text" value="" class="field" /></td> | ||
| 84 | </tr> | ||
| 85 | |||
| 86 | <tr> | ||
| 87 | <td class="label"><label for="ondblclick">ondblclick</label>:</td> | ||
| 88 | <td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td> | ||
| 89 | </tr> | ||
| 90 | |||
| 91 | <tr> | ||
| 92 | <td class="label"><label for="onmousedown">onmousedown</label>:</td> | ||
| 93 | <td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td> | ||
| 94 | </tr> | ||
| 95 | |||
| 96 | <tr> | ||
| 97 | <td class="label"><label for="onmouseup">onmouseup</label>:</td> | ||
| 98 | <td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td> | ||
| 99 | </tr> | ||
| 100 | |||
| 101 | <tr> | ||
| 102 | <td class="label"><label for="onmouseover">onmouseover</label>:</td> | ||
| 103 | <td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td> | ||
| 104 | </tr> | ||
| 105 | |||
| 106 | <tr> | ||
| 107 | <td class="label"><label for="onmousemove">onmousemove</label>:</td> | ||
| 108 | <td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td> | ||
| 109 | </tr> | ||
| 110 | |||
| 111 | <tr> | ||
| 112 | <td class="label"><label for="onmouseout">onmouseout</label>:</td> | ||
| 113 | <td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td> | ||
| 114 | </tr> | ||
| 115 | |||
| 116 | <tr> | ||
| 117 | <td class="label"><label for="onkeypress">onkeypress</label>:</td> | ||
| 118 | <td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td> | ||
| 119 | </tr> | ||
| 120 | |||
| 121 | <tr> | ||
| 122 | <td class="label"><label for="onkeydown">onkeydown</label>:</td> | ||
| 123 | <td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td> | ||
| 124 | </tr> | ||
| 125 | |||
| 126 | <tr> | ||
| 127 | <td class="label"><label for="onkeyup">onkeyup</label>:</td> | ||
| 128 | <td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td> | ||
| 129 | </tr> | ||
| 130 | </table> | ||
| 131 | </fieldset> | ||
| 132 | </div> | ||
| 133 | </div> | ||
| 134 | <div class="mceActionPanel"> | ||
| 135 | <div style="float: left"> | ||
| 136 | <input type="submit" id="insert" name="insert" value="{#update}" /> | ||
| 137 | </div> | ||
| 138 | <div style="float: left"> | ||
| 139 | <input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeAbbr();" style="display: none;" /> | ||
| 140 | </div> | ||
| 141 | <div style="float: right"> | ||
| 142 | <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" /> | ||
| 143 | </div> | ||
| 144 | </div> | ||
| 145 | |||
| 146 | </form> | ||
| 147 | </body> | ||
| 148 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/acronym.htm b/public/javascripts/tiny_mce/plugins/xhtmlxtras/acronym.htm deleted file mode 100644 index 4d4ebaa..0000000 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/acronym.htm +++ /dev/null | |||
| @@ -1,148 +0,0 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title>{#xhtmlxtras_dlg.title_acronym_element}</title> | ||
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 6 | <script type="text/javascript" src="../../utils/mctabs.js"></script> | ||
| 7 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | ||
| 8 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> | ||
| 9 | <script type="text/javascript" src="js/element_common.js"></script> | ||
| 10 | <script type="text/javascript" src="js/acronym.js"></script> | ||
| 11 | <link rel="stylesheet" type="text/css" href="css/popup.css" /> | ||
| 12 | </head> | ||
| 13 | <body style="display: none"> | ||
| 14 | <form onsubmit="insertAcronym();return false;" action="#"> | ||
| 15 | <div class="tabs"> | ||
| 16 | <ul> | ||
| 17 | <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li> | ||
| 18 | <!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> --> | ||
| 19 | </ul> | ||
| 20 | </div> | ||
| 21 | |||
| 22 | <div class="panel_wrapper"> | ||
| 23 | <div id="general_panel" class="panel current"> | ||
| 24 | <fieldset> | ||
| 25 | <legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend> | ||
| 26 | <table border="0" cellpadding="0" cellspacing="4"> | ||
| 27 | <tr> | ||
| 28 | <td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td> | ||
| 29 | <td><input id="title" name="title" type="text" value="" class="field mceFocus" /></td> | ||
| 30 | </tr> | ||
| 31 | <tr> | ||
| 32 | <td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td> | ||
| 33 | <td><input id="id" name="id" type="text" value="" class="field" /></td> | ||
| 34 | </tr> | ||
| 35 | <tr> | ||
| 36 | <td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td> | ||
| 37 | <td> | ||
| 38 | <select id="class" name="class" class="field mceEditableSelect"> | ||
| 39 | <option value="">{#not_set}</option> | ||
| 40 | </select> | ||
| 41 | </td> | ||
| 42 | </tr> | ||
| 43 | <tr> | ||
| 44 | <td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td> | ||
| 45 | <td><input id="style" name="style" type="text" value="" class="field" /></td> | ||
| 46 | </tr> | ||
| 47 | <tr> | ||
| 48 | <td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td> | ||
| 49 | <td> | ||
| 50 | <select id="dir" name="dir" class="field"> | ||
| 51 | <option value="">{#not_set}</option> | ||
| 52 | <option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option> | ||
| 53 | <option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option> | ||
| 54 | </select> | ||
| 55 | </td> | ||
| 56 | </tr> | ||
| 57 | <tr> | ||
| 58 | <td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td> | ||
| 59 | <td> | ||
| 60 | <input id="lang" name="lang" type="text" value="" class="field" /> | ||
| 61 | </td> | ||
| 62 | </tr> | ||
| 63 | </table> | ||
| 64 | </fieldset> | ||
| 65 | </div> | ||
| 66 | <div id="events_panel" class="panel"> | ||
| 67 | <fieldset> | ||
| 68 | <legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend> | ||
| 69 | |||
| 70 | <table border="0" cellpadding="0" cellspacing="4"> | ||
| 71 | <tr> | ||
| 72 | <td class="label"><label for="onfocus">onfocus</label>:</td> | ||
| 73 | <td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td> | ||
| 74 | </tr> | ||
| 75 | |||
| 76 | <tr> | ||
| 77 | <td class="label"><label for="onblur">onblur</label>:</td> | ||
| 78 | <td><input id="onblur" name="onblur" type="text" value="" class="field" /></td> | ||
| 79 | </tr> | ||
| 80 | |||
| 81 | <tr> | ||
| 82 | <td class="label"><label for="onclick">onclick</label>:</td> | ||
| 83 | <td><input id="onclick" name="onclick" type="text" value="" class="field" /></td> | ||
| 84 | </tr> | ||
| 85 | |||
| 86 | <tr> | ||
| 87 | <td class="label"><label for="ondblclick">ondblclick</label>:</td> | ||
| 88 | <td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td> | ||
| 89 | </tr> | ||
| 90 | |||
| 91 | <tr> | ||
| 92 | <td class="label"><label for="onmousedown">onmousedown</label>:</td> | ||
| 93 | <td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td> | ||
| 94 | </tr> | ||
| 95 | |||
| 96 | <tr> | ||
| 97 | <td class="label"><label for="onmouseup">onmouseup</label>:</td> | ||
| 98 | <td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td> | ||
| 99 | </tr> | ||
| 100 | |||
| 101 | <tr> | ||
| 102 | <td class="label"><label for="onmouseover">onmouseover</label>:</td> | ||
| 103 | <td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td> | ||
| 104 | </tr> | ||
| 105 | |||
| 106 | <tr> | ||
| 107 | <td class="label"><label for="onmousemove">onmousemove</label>:</td> | ||
| 108 | <td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td> | ||
| 109 | </tr> | ||
| 110 | |||
| 111 | <tr> | ||
| 112 | <td class="label"><label for="onmouseout">onmouseout</label>:</td> | ||
| 113 | <td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td> | ||
| 114 | </tr> | ||
| 115 | |||
| 116 | <tr> | ||
| 117 | <td class="label"><label for="onkeypress">onkeypress</label>:</td> | ||
| 118 | <td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td> | ||
| 119 | </tr> | ||
| 120 | |||
| 121 | <tr> | ||
| 122 | <td class="label"><label for="onkeydown">onkeydown</label>:</td> | ||
| 123 | <td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td> | ||
| 124 | </tr> | ||
| 125 | |||
| 126 | <tr> | ||
| 127 | <td class="label"><label for="onkeyup">onkeyup</label>:</td> | ||
| 128 | <td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td> | ||
| 129 | </tr> | ||
| 130 | </table> | ||
| 131 | </fieldset> | ||
| 132 | </div> | ||
| 133 | </div> | ||
| 134 | <div class="mceActionPanel"> | ||
| 135 | <div style="float: left"> | ||
| 136 | <input type="submit" id="insert" name="insert" value="{#update}" /> | ||
| 137 | </div> | ||
| 138 | <div style="float: left"> | ||
| 139 | <input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeAcronym();" style="display: none;" /> | ||
| 140 | </div> | ||
| 141 | <div style="float: right"> | ||
| 142 | <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" /> | ||
| 143 | </div> | ||
| 144 | </div> | ||
| 145 | |||
| 146 | </form> | ||
| 147 | </body> | ||
| 148 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/attributes.htm b/public/javascripts/tiny_mce/plugins/xhtmlxtras/attributes.htm deleted file mode 100644 index 322b468..0000000 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/attributes.htm +++ /dev/null | |||
| @@ -1,153 +0,0 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title>{#xhtmlxtras_dlg.attribs_title}</title> | ||
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 6 | <script type="text/javascript" src="../../utils/mctabs.js"></script> | ||
| 7 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> | ||
| 8 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | ||
| 9 | <script type="text/javascript" src="js/attributes.js"></script> | ||
| 10 | <link rel="stylesheet" type="text/css" href="css/attributes.css" /> | ||
| 11 | </head> | ||
| 12 | <body style="display: none"> | ||
| 13 | <form onsubmit="insertAction();return false;" action="#"> | ||
| 14 | <div class="tabs"> | ||
| 15 | <ul> | ||
| 16 | <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.attribute_attrib_tab}</a></span></li> | ||
| 17 | <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.attribute_events_tab}</a></span></li> | ||
| 18 | </ul> | ||
| 19 | </div> | ||
| 20 | |||
| 21 | <div class="panel_wrapper"> | ||
| 22 | <div id="general_panel" class="panel current"> | ||
| 23 | <fieldset> | ||
| 24 | <legend>{#xhtmlxtras_dlg.attribute_attrib_tab}</legend> | ||
| 25 | <table border="0" cellpadding="0" cellspacing="4"> | ||
| 26 | <tr> | ||
| 27 | <td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td> | ||
| 28 | <td><input id="title" name="title" type="text" value="" class="mceFocus" /></td> | ||
| 29 | </tr> | ||
| 30 | <tr> | ||
| 31 | <td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td> | ||
| 32 | <td><input id="id" name="id" type="text" value="" /></td> | ||
| 33 | </tr> | ||
| 34 | <tr> | ||
| 35 | <td><label id="classlabel" for="classlist">{#class_name}</label></td> | ||
| 36 | <td> | ||
| 37 | <select id="classlist" name="classlist" class="mceEditableSelect"> | ||
| 38 | <option value="" selected="selected">{#not_set}</option> | ||
| 39 | </select> | ||
| 40 | </td> | ||
| 41 | </tr> | ||
| 42 | <tr> | ||
| 43 | <td class="label"><label id="stylelabel" for="style">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td> | ||
| 44 | <td><input id="style" name="style" type="text" value="" /></td> | ||
| 45 | </tr> | ||
| 46 | <tr> | ||
| 47 | <td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td> | ||
| 48 | <td> | ||
| 49 | <select id="dir" name="dir"> | ||
| 50 | <option value="">{#not_set}</option> | ||
| 51 | <option value="ltr">{#xhtmlxtras_dlg.option_ltr}</option> | ||
| 52 | <option value="rtl">{#xhtmlxtras_dlg.option_rtl}</option> | ||
| 53 | </select> | ||
| 54 | </td> | ||
| 55 | </tr> | ||
| 56 | <tr> | ||
| 57 | <td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td> | ||
| 58 | <td> | ||
| 59 | <input id="lang" name="lang" type="text" value="" /> | ||
| 60 | </td> | ||
| 61 | </tr> | ||
| 62 | <tr> | ||
| 63 | <td><label id="tabindexlabel" for="tabindex">{#xhtmlxtras_dlg.attribute_label_tabindex}</label></td> | ||
| 64 | <td><input type="text" id="tabindex" name="tabindex" value="" /></td> | ||
| 65 | </tr> | ||
| 66 | |||
| 67 | <tr> | ||
| 68 | <td><label id="accesskeylabel" for="accesskey">{#xhtmlxtras_dlg.attribute_label_accesskey}</label></td> | ||
| 69 | <td><input type="text" id="accesskey" name="accesskey" value="" /></td> | ||
| 70 | </tr> | ||
| 71 | </table> | ||
| 72 | </fieldset> | ||
| 73 | </div> | ||
| 74 | <div id="events_panel" class="panel"> | ||
| 75 | <fieldset> | ||
| 76 | <legend>{#xhtmlxtras_dlg.attribute_events_tab}</legend> | ||
| 77 | |||
| 78 | <table border="0" cellpadding="0" cellspacing="4"> | ||
| 79 | <tr> | ||
| 80 | <td class="label"><label for="onfocus">onfocus</label>:</td> | ||
| 81 | <td><input id="onfocus" name="onfocus" type="text" value="" /></td> | ||
| 82 | </tr> | ||
| 83 | |||
| 84 | <tr> | ||
| 85 | <td class="label"><label for="onblur">onblur</label>:</td> | ||
| 86 | <td><input id="onblur" name="onblur" type="text" value="" /></td> | ||
| 87 | </tr> | ||
| 88 | |||
| 89 | <tr> | ||
| 90 | <td class="label"><label for="onclick">onclick</label>:</td> | ||
| 91 | <td><input id="onclick" name="onclick" type="text" value="" /></td> | ||
| 92 | </tr> | ||
| 93 | |||
| 94 | <tr> | ||
| 95 | <td class="label"><label for="ondblclick">ondblclick</label>:</td> | ||
| 96 | <td><input id="ondblclick" name="ondblclick" type="text" value="" /></td> | ||
| 97 | </tr> | ||
| 98 | |||
| 99 | <tr> | ||
| 100 | <td class="label"><label for="onmousedown">onmousedown</label>:</td> | ||
| 101 | <td><input id="onmousedown" name="onmousedown" type="text" value="" /></td> | ||
| 102 | </tr> | ||
| 103 | |||
| 104 | <tr> | ||
| 105 | <td class="label"><label for="onmouseup">onmouseup</label>:</td> | ||
| 106 | <td><input id="onmouseup" name="onmouseup" type="text" value="" /></td> | ||
| 107 | </tr> | ||
| 108 | |||
| 109 | <tr> | ||
| 110 | <td class="label"><label for="onmouseover">onmouseover</label>:</td> | ||
| 111 | <td><input id="onmouseover" name="onmouseover" type="text" value="" /></td> | ||
| 112 | </tr> | ||
| 113 | |||
| 114 | <tr> | ||
| 115 | <td class="label"><label for="onmousemove">onmousemove</label>:</td> | ||
| 116 | <td><input id="onmousemove" name="onmousemove" type="text" value="" /></td> | ||
| 117 | </tr> | ||
| 118 | |||
| 119 | <tr> | ||
| 120 | <td class="label"><label for="onmouseout">onmouseout</label>:</td> | ||
| 121 | <td><input id="onmouseout" name="onmouseout" type="text" value="" /></td> | ||
| 122 | </tr> | ||
| 123 | |||
| 124 | <tr> | ||
| 125 | <td class="label"><label for="onkeypress">onkeypress</label>:</td> | ||
| 126 | <td><input id="onkeypress" name="onkeypress" type="text" value="" /></td> | ||
| 127 | </tr> | ||
| 128 | |||
| 129 | <tr> | ||
| 130 | <td class="label"><label for="onkeydown">onkeydown</label>:</td> | ||
| 131 | <td><input id="onkeydown" name="onkeydown" type="text" value="" /></td> | ||
| 132 | </tr> | ||
| 133 | |||
| 134 | <tr> | ||
| 135 | <td class="label"><label for="onkeyup">onkeyup</label>:</td> | ||
| 136 | <td><input id="onkeyup" name="onkeyup" type="text" value="" /></td> | ||
| 137 | </tr> | ||
| 138 | </table> | ||
| 139 | </fieldset> | ||
| 140 | </div> | ||
| 141 | </div> | ||
| 142 | <div class="mceActionPanel"> | ||
| 143 | <div style="float: left"> | ||
| 144 | <input type="submit" id="insert" name="insert" value="{#insert}" /> | ||
| 145 | </div> | ||
| 146 | <div style="float: right"> | ||
| 147 | <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" /> | ||
| 148 | </div> | ||
| 149 | </div> | ||
| 150 | |||
| 151 | </form> | ||
| 152 | </body> | ||
| 153 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/cite.htm b/public/javascripts/tiny_mce/plugins/xhtmlxtras/cite.htm deleted file mode 100644 index cdfaf4e..0000000 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/cite.htm +++ /dev/null | |||
| @@ -1,148 +0,0 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title>{#xhtmlxtras_dlg.title_cite_element}</title> | ||
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 6 | <script type="text/javascript" src="../../utils/mctabs.js"></script> | ||
| 7 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | ||
| 8 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> | ||
| 9 | <script type="text/javascript" src="js/element_common.js"></script> | ||
| 10 | <script type="text/javascript" src="js/cite.js"></script> | ||
| 11 | <link rel="stylesheet" type="text/css" href="css/popup.css" /> | ||
| 12 | </head> | ||
| 13 | <body style="display: none"> | ||
| 14 | <form onsubmit="insertCite();return false;" action="#"> | ||
| 15 | <div class="tabs"> | ||
| 16 | <ul> | ||
| 17 | <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li> | ||
| 18 | <!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> --> | ||
| 19 | </ul> | ||
| 20 | </div> | ||
| 21 | |||
| 22 | <div class="panel_wrapper"> | ||
| 23 | <div id="general_panel" class="panel current"> | ||
| 24 | <fieldset> | ||
| 25 | <legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend> | ||
| 26 | <table border="0" cellpadding="0" cellspacing="4"> | ||
| 27 | <tr> | ||
| 28 | <td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td> | ||
| 29 | <td><input id="title" name="title" type="text" value="" class="field mceFocus" /></td> | ||
| 30 | </tr> | ||
| 31 | <tr> | ||
| 32 | <td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td> | ||
| 33 | <td><input id="id" name="id" type="text" value="" class="field" /></td> | ||
| 34 | </tr> | ||
| 35 | <tr> | ||
| 36 | <td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td> | ||
| 37 | <td> | ||
| 38 | <select id="class" name="class" class="field mceEditableSelect"> | ||
| 39 | <option value="">{#not_set}</option> | ||
| 40 | </select> | ||
| 41 | </td> | ||
| 42 | </tr> | ||
| 43 | <tr> | ||
| 44 | <td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td> | ||
| 45 | <td><input id="style" name="style" type="text" value="" class="field" /></td> | ||
| 46 | </tr> | ||
| 47 | <tr> | ||
| 48 | <td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td> | ||
| 49 | <td> | ||
| 50 | <select id="dir" name="dir" class="field"> | ||
| 51 | <option value="">{#not_set}</option> | ||
| 52 | <option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option> | ||
| 53 | <option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option> | ||
| 54 | </select> | ||
| 55 | </td> | ||
| 56 | </tr> | ||
| 57 | <tr> | ||
| 58 | <td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td> | ||
| 59 | <td> | ||
| 60 | <input id="lang" name="lang" type="text" value="" class="field" /> | ||
| 61 | </td> | ||
| 62 | </tr> | ||
| 63 | </table> | ||
| 64 | </fieldset> | ||
| 65 | </div> | ||
| 66 | <div id="events_panel" class="panel"> | ||
| 67 | <fieldset> | ||
| 68 | <legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend> | ||
| 69 | |||
| 70 | <table border="0" cellpadding="0" cellspacing="4"> | ||
| 71 | <tr> | ||
| 72 | <td class="label"><label for="onfocus">onfocus</label>:</td> | ||
| 73 | <td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td> | ||
| 74 | </tr> | ||
| 75 | |||
| 76 | <tr> | ||
| 77 | <td class="label"><label for="onblur">onblur</label>:</td> | ||
| 78 | <td><input id="onblur" name="onblur" type="text" value="" class="field" /></td> | ||
| 79 | </tr> | ||
| 80 | |||
| 81 | <tr> | ||
| 82 | <td class="label"><label for="onclick">onclick</label>:</td> | ||
| 83 | <td><input id="onclick" name="onclick" type="text" value="" class="field" /></td> | ||
| 84 | </tr> | ||
| 85 | |||
| 86 | <tr> | ||
| 87 | <td class="label"><label for="ondblclick">ondblclick</label>:</td> | ||
| 88 | <td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td> | ||
| 89 | </tr> | ||
| 90 | |||
| 91 | <tr> | ||
| 92 | <td class="label"><label for="onmousedown">onmousedown</label>:</td> | ||
| 93 | <td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td> | ||
| 94 | </tr> | ||
| 95 | |||
| 96 | <tr> | ||
| 97 | <td class="label"><label for="onmouseup">onmouseup</label>:</td> | ||
| 98 | <td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td> | ||
| 99 | </tr> | ||
| 100 | |||
| 101 | <tr> | ||
| 102 | <td class="label"><label for="onmouseover">onmouseover</label>:</td> | ||
| 103 | <td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td> | ||
| 104 | </tr> | ||
| 105 | |||
| 106 | <tr> | ||
| 107 | <td class="label"><label for="onmousemove">onmousemove</label>:</td> | ||
| 108 | <td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td> | ||
| 109 | </tr> | ||
| 110 | |||
| 111 | <tr> | ||
| 112 | <td class="label"><label for="onmouseout">onmouseout</label>:</td> | ||
| 113 | <td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td> | ||
| 114 | </tr> | ||
| 115 | |||
| 116 | <tr> | ||
| 117 | <td class="label"><label for="onkeypress">onkeypress</label>:</td> | ||
| 118 | <td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td> | ||
| 119 | </tr> | ||
| 120 | |||
| 121 | <tr> | ||
| 122 | <td class="label"><label for="onkeydown">onkeydown</label>:</td> | ||
| 123 | <td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td> | ||
| 124 | </tr> | ||
| 125 | |||
| 126 | <tr> | ||
| 127 | <td class="label"><label for="onkeyup">onkeyup</label>:</td> | ||
| 128 | <td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td> | ||
| 129 | </tr> | ||
| 130 | </table> | ||
| 131 | </fieldset> | ||
| 132 | </div> | ||
| 133 | </div> | ||
| 134 | <div class="mceActionPanel"> | ||
| 135 | <div style="float: left"> | ||
| 136 | <input type="submit" id="insert" name="insert" value="{#update}" /> | ||
| 137 | </div> | ||
| 138 | <div style="float: left"> | ||
| 139 | <input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeCite();" style="display: none;" /> | ||
| 140 | </div> | ||
| 141 | <div style="float: right"> | ||
| 142 | <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" /> | ||
| 143 | </div> | ||
| 144 | </div> | ||
| 145 | |||
| 146 | </form> | ||
| 147 | </body> | ||
| 148 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css b/public/javascripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css deleted file mode 100644 index 9a6a235..0000000 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css +++ /dev/null | |||
| @@ -1,11 +0,0 @@ | |||
| 1 | .panel_wrapper div.current { | ||
| 2 | height: 290px; | ||
| 3 | } | ||
| 4 | |||
| 5 | #id, #style, #title, #dir, #hreflang, #lang, #classlist, #tabindex, #accesskey { | ||
| 6 | width: 200px; | ||
| 7 | } | ||
| 8 | |||
| 9 | #events_panel input { | ||
| 10 | width: 200px; | ||
| 11 | } | ||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/css/popup.css b/public/javascripts/tiny_mce/plugins/xhtmlxtras/css/popup.css deleted file mode 100644 index e67114d..0000000 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/css/popup.css +++ /dev/null | |||
| @@ -1,9 +0,0 @@ | |||
| 1 | input.field, select.field {width:200px;} | ||
| 2 | input.picker {width:179px; margin-left: 5px;} | ||
| 3 | input.disabled {border-color:#F2F2F2;} | ||
| 4 | img.picker {vertical-align:text-bottom; cursor:pointer;} | ||
| 5 | h1 {padding: 0 0 5px 0;} | ||
| 6 | .panel_wrapper div.current {height:160px;} | ||
| 7 | #xhtmlxtrasdel .panel_wrapper div.current, #xhtmlxtrasins .panel_wrapper div.current {height: 230px;} | ||
| 8 | a.browse span {display:block; width:20px; height:20px; background:url('../../../themes/advanced/img/icons.gif') -140px -20px;} | ||
| 9 | #datetime {width:180px;} | ||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/del.htm b/public/javascripts/tiny_mce/plugins/xhtmlxtras/del.htm deleted file mode 100644 index f45676e..0000000 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/del.htm +++ /dev/null | |||
| @@ -1,169 +0,0 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title>{#xhtmlxtras_dlg.title_del_element}</title> | ||
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 6 | <script type="text/javascript" src="../../utils/mctabs.js"></script> | ||
| 7 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | ||
| 8 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> | ||
| 9 | <script type="text/javascript" src="js/element_common.js"></script> | ||
| 10 | <script type="text/javascript" src="js/del.js"></script> | ||
| 11 | <link rel="stylesheet" type="text/css" href="css/popup.css" /> | ||
| 12 | </head> | ||
| 13 | <body id="xhtmlxtrasins" style="display: none"> | ||
| 14 | <form onsubmit="insertDel();return false;" action="#"> | ||
| 15 | <div class="tabs"> | ||
| 16 | <ul> | ||
| 17 | <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li> | ||
| 18 | <!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> --> | ||
| 19 | </ul> | ||
| 20 | </div> | ||
| 21 | |||
| 22 | <div class="panel_wrapper"> | ||
| 23 | <div id="general_panel" class="panel current"> | ||
| 24 | <fieldset> | ||
| 25 | <legend>{#xhtmlxtras_dlg.fieldset_general_tab}</legend> | ||
| 26 | <table border="0" cellpadding="0" cellspacing="4"> | ||
| 27 | <tr> | ||
| 28 | <td class="label"><label id="datetimelabel" for="datetime">{#xhtmlxtras_dlg.attribute_label_datetime}</label>:</td> | ||
| 29 | <td> | ||
| 30 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 31 | <tr> | ||
| 32 | <td><input id="datetime" name="datetime" type="text" value="" maxlength="19" class="field mceFocus" /></td> | ||
| 33 | <td><a href="javascript:insertDateTime('datetime');" onmousedown="return false;" class="browse"><span class="datetime" title="{#xhtmlxtras_dlg.insert_date}"></span></a></td> | ||
| 34 | </tr> | ||
| 35 | </table> | ||
| 36 | </td> | ||
| 37 | </tr> | ||
| 38 | <tr> | ||
| 39 | <td class="label"><label id="citelabel" for="cite">{#xhtmlxtras_dlg.attribute_label_cite}</label>:</td> | ||
| 40 | <td><input id="cite" name="cite" type="text" value="" class="field" /></td> | ||
| 41 | </tr> | ||
| 42 | </table> | ||
| 43 | </fieldset> | ||
| 44 | <fieldset> | ||
| 45 | <legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend> | ||
| 46 | <table border="0" cellpadding="0" cellspacing="4"> | ||
| 47 | <tr> | ||
| 48 | <td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td> | ||
| 49 | <td><input id="title" name="title" type="text" value="" class="field" /></td> | ||
| 50 | </tr> | ||
| 51 | <tr> | ||
| 52 | <td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td> | ||
| 53 | <td><input id="id" name="id" type="text" value="" class="field" /></td> | ||
| 54 | </tr> | ||
| 55 | <tr> | ||
| 56 | <td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td> | ||
| 57 | <td> | ||
| 58 | <select id="class" name="class" class="field mceEditableSelect"> | ||
| 59 | <option value="">{#not_set}</option> | ||
| 60 | </select> | ||
| 61 | </td> | ||
| 62 | </tr> | ||
| 63 | <tr> | ||
| 64 | <td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td> | ||
| 65 | <td><input id="style" name="style" type="text" value="" class="field" /></td> | ||
| 66 | </tr> | ||
| 67 | <tr> | ||
| 68 | <td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td> | ||
| 69 | <td> | ||
| 70 | <select id="dir" name="dir" class="field"> | ||
| 71 | <option value="">{#not_set}</option> | ||
| 72 | <option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option> | ||
| 73 | <option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option> | ||
| 74 | </select> | ||
| 75 | </td> | ||
| 76 | </tr> | ||
| 77 | <tr> | ||
| 78 | <td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td> | ||
| 79 | <td> | ||
| 80 | <input id="lang" name="lang" type="text" value="" class="field" /> | ||
| 81 | </td> | ||
| 82 | </tr> | ||
| 83 | </table> | ||
| 84 | </fieldset> | ||
| 85 | </div> | ||
| 86 | <div id="events_panel" class="panel"> | ||
| 87 | <fieldset> | ||
| 88 | <legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend> | ||
| 89 | |||
| 90 | <table border="0" cellpadding="0" cellspacing="4"> | ||
| 91 | <tr> | ||
| 92 | <td class="label"><label for="onfocus">onfocus</label>:</td> | ||
| 93 | <td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td> | ||
| 94 | </tr> | ||
| 95 | |||
| 96 | <tr> | ||
| 97 | <td class="label"><label for="onblur">onblur</label>:</td> | ||
| 98 | <td><input id="onblur" name="onblur" type="text" value="" class="field" /></td> | ||
| 99 | </tr> | ||
| 100 | |||
| 101 | <tr> | ||
| 102 | <td class="label"><label for="onclick">onclick</label>:</td> | ||
| 103 | <td><input id="onclick" name="onclick" type="text" value="" class="field" /></td> | ||
| 104 | </tr> | ||
| 105 | |||
| 106 | <tr> | ||
| 107 | <td class="label"><label for="ondblclick">ondblclick</label>:</td> | ||
| 108 | <td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td> | ||
| 109 | </tr> | ||
| 110 | |||
| 111 | <tr> | ||
| 112 | <td class="label"><label for="onmousedown">onmousedown</label>:</td> | ||
| 113 | <td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td> | ||
| 114 | </tr> | ||
| 115 | |||
| 116 | <tr> | ||
| 117 | <td class="label"><label for="onmouseup">onmouseup</label>:</td> | ||
| 118 | <td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td> | ||
| 119 | </tr> | ||
| 120 | |||
| 121 | <tr> | ||
| 122 | <td class="label"><label for="onmouseover">onmouseover</label>:</td> | ||
| 123 | <td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td> | ||
| 124 | </tr> | ||
| 125 | |||
| 126 | <tr> | ||
| 127 | <td class="label"><label for="onmousemove">onmousemove</label>:</td> | ||
| 128 | <td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td> | ||
| 129 | </tr> | ||
| 130 | |||
| 131 | <tr> | ||
| 132 | <td class="label"><label for="onmouseout">onmouseout</label>:</td> | ||
| 133 | <td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td> | ||
| 134 | </tr> | ||
| 135 | |||
| 136 | <tr> | ||
| 137 | <td class="label"><label for="onkeypress">onkeypress</label>:</td> | ||
| 138 | <td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td> | ||
| 139 | </tr> | ||
| 140 | |||
| 141 | <tr> | ||
| 142 | <td class="label"><label for="onkeydown">onkeydown</label>:</td> | ||
| 143 | <td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td> | ||
| 144 | </tr> | ||
| 145 | |||
| 146 | <tr> | ||
| 147 | <td class="label"><label for="onkeyup">onkeyup</label>:</td> | ||
| 148 | <td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td> | ||
| 149 | </tr> | ||
| 150 | </table> | ||
| 151 | </fieldset> | ||
| 152 | </div> | ||
| 153 | </div> | ||
| 154 | <div class="mceActionPanel"> | ||
| 155 | <div style="float: left"> | ||
| 156 | <input type="submit" id="insert" name="insert" value="{#update}" /> | ||
| 157 | </div> | ||
| 158 | <div style="float: left"> | ||
| 159 | <input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeDel();" style="display: none;" /> | ||
| 160 | </div> | ||
| 161 | <div style="float: right"> | ||
| 162 | <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" /> | ||
| 163 | </div> | ||
| 164 | </div> | ||
| 165 | |||
| 166 | </form> | ||
| 167 | |||
| 168 | </body> | ||
| 169 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js b/public/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js deleted file mode 100644 index 8c7f48e..0000000 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){tinymce.create("tinymce.plugins.XHTMLXtrasPlugin",{init:function(b,c){b.addCommand("mceCite",function(){b.windowManager.open({file:c+"/cite.htm",width:350+parseInt(b.getLang("xhtmlxtras.cite_delta_width",0)),height:250+parseInt(b.getLang("xhtmlxtras.cite_delta_height",0)),inline:1},{plugin_url:c})});b.addCommand("mceAcronym",function(){b.windowManager.open({file:c+"/acronym.htm",width:350+parseInt(b.getLang("xhtmlxtras.acronym_delta_width",0)),height:250+parseInt(b.getLang("xhtmlxtras.acronym_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceAbbr",function(){b.windowManager.open({file:c+"/abbr.htm",width:350+parseInt(b.getLang("xhtmlxtras.abbr_delta_width",0)),height:250+parseInt(b.getLang("xhtmlxtras.abbr_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceDel",function(){b.windowManager.open({file:c+"/del.htm",width:340+parseInt(b.getLang("xhtmlxtras.del_delta_width",0)),height:310+parseInt(b.getLang("xhtmlxtras.del_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceIns",function(){b.windowManager.open({file:c+"/ins.htm",width:340+parseInt(b.getLang("xhtmlxtras.ins_delta_width",0)),height:310+parseInt(b.getLang("xhtmlxtras.ins_delta_width",0)),inline:1},{plugin_url:c})});b.addCommand("mceAttributes",function(){b.windowManager.open({file:c+"/attributes.htm",width:380,height:370,inline:1},{plugin_url:c})});b.addButton("cite",{title:"xhtmlxtras.cite_desc",cmd:"mceCite"});b.addButton("acronym",{title:"xhtmlxtras.acronym_desc",cmd:"mceAcronym"});b.addButton("abbr",{title:"xhtmlxtras.abbr_desc",cmd:"mceAbbr"});b.addButton("del",{title:"xhtmlxtras.del_desc",cmd:"mceDel"});b.addButton("ins",{title:"xhtmlxtras.ins_desc",cmd:"mceIns"});b.addButton("attribs",{title:"xhtmlxtras.attribs_desc",cmd:"mceAttributes"});if(tinymce.isIE){function a(d,e){if(e.set){e.content=e.content.replace(/<abbr([^>]+)>/gi,"<html:abbr $1>");e.content=e.content.replace(/<\/abbr>/gi,"</html:abbr>")}}b.onBeforeSetContent.add(a);b.onPostProcess.add(a)}b.onNodeChange.add(function(e,d,g,f){g=e.dom.getParent(g,"CITE,ACRONYM,ABBR,DEL,INS");d.setDisabled("cite",f);d.setDisabled("acronym",f);d.setDisabled("abbr",f);d.setDisabled("del",f);d.setDisabled("ins",f);d.setDisabled("attribs",g&&g.nodeName=="BODY");d.setActive("cite",0);d.setActive("acronym",0);d.setActive("abbr",0);d.setActive("del",0);d.setActive("ins",0);if(g){do{d.setDisabled(g.nodeName.toLowerCase(),0);d.setActive(g.nodeName.toLowerCase(),1)}while(g=g.parentNode)}})},getInfo:function(){return{longname:"XHTML Xtras Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("xhtmlxtras",tinymce.plugins.XHTMLXtrasPlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js deleted file mode 100644 index bef06f2..0000000 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,136 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | (function() { | ||
| 9 | tinymce.create('tinymce.plugins.XHTMLXtrasPlugin', { | ||
| 10 | init : function(ed, url) { | ||
| 11 | // Register commands | ||
| 12 | ed.addCommand('mceCite', function() { | ||
| 13 | ed.windowManager.open({ | ||
| 14 | file : url + '/cite.htm', | ||
| 15 | width : 350 + parseInt(ed.getLang('xhtmlxtras.cite_delta_width', 0)), | ||
| 16 | height : 250 + parseInt(ed.getLang('xhtmlxtras.cite_delta_height', 0)), | ||
| 17 | inline : 1 | ||
| 18 | }, { | ||
| 19 | plugin_url : url | ||
| 20 | }); | ||
| 21 | }); | ||
| 22 | |||
| 23 | ed.addCommand('mceAcronym', function() { | ||
| 24 | ed.windowManager.open({ | ||
| 25 | file : url + '/acronym.htm', | ||
| 26 | width : 350 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_width', 0)), | ||
| 27 | height : 250 + parseInt(ed.getLang('xhtmlxtras.acronym_delta_width', 0)), | ||
| 28 | inline : 1 | ||
| 29 | }, { | ||
| 30 | plugin_url : url | ||
| 31 | }); | ||
| 32 | }); | ||
| 33 | |||
| 34 | ed.addCommand('mceAbbr', function() { | ||
| 35 | ed.windowManager.open({ | ||
| 36 | file : url + '/abbr.htm', | ||
| 37 | width : 350 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_width', 0)), | ||
| 38 | height : 250 + parseInt(ed.getLang('xhtmlxtras.abbr_delta_width', 0)), | ||
| 39 | inline : 1 | ||
| 40 | }, { | ||
| 41 | plugin_url : url | ||
| 42 | }); | ||
| 43 | }); | ||
| 44 | |||
| 45 | ed.addCommand('mceDel', function() { | ||
| 46 | ed.windowManager.open({ | ||
| 47 | file : url + '/del.htm', | ||
| 48 | width : 340 + parseInt(ed.getLang('xhtmlxtras.del_delta_width', 0)), | ||
| 49 | height : 310 + parseInt(ed.getLang('xhtmlxtras.del_delta_width', 0)), | ||
| 50 | inline : 1 | ||
| 51 | }, { | ||
| 52 | plugin_url : url | ||
| 53 | }); | ||
| 54 | }); | ||
| 55 | |||
| 56 | ed.addCommand('mceIns', function() { | ||
| 57 | ed.windowManager.open({ | ||
| 58 | file : url + '/ins.htm', | ||
| 59 | width : 340 + parseInt(ed.getLang('xhtmlxtras.ins_delta_width', 0)), | ||
| 60 | height : 310 + parseInt(ed.getLang('xhtmlxtras.ins_delta_width', 0)), | ||
| 61 | inline : 1 | ||
| 62 | }, { | ||
| 63 | plugin_url : url | ||
| 64 | }); | ||
| 65 | }); | ||
| 66 | |||
| 67 | ed.addCommand('mceAttributes', function() { | ||
| 68 | ed.windowManager.open({ | ||
| 69 | file : url + '/attributes.htm', | ||
| 70 | width : 380, | ||
| 71 | height : 370, | ||
| 72 | inline : 1 | ||
| 73 | }, { | ||
| 74 | plugin_url : url | ||
| 75 | }); | ||
| 76 | }); | ||
| 77 | |||
| 78 | // Register buttons | ||
| 79 | ed.addButton('cite', {title : 'xhtmlxtras.cite_desc', cmd : 'mceCite'}); | ||
| 80 | ed.addButton('acronym', {title : 'xhtmlxtras.acronym_desc', cmd : 'mceAcronym'}); | ||
| 81 | ed.addButton('abbr', {title : 'xhtmlxtras.abbr_desc', cmd : 'mceAbbr'}); | ||
| 82 | ed.addButton('del', {title : 'xhtmlxtras.del_desc', cmd : 'mceDel'}); | ||
| 83 | ed.addButton('ins', {title : 'xhtmlxtras.ins_desc', cmd : 'mceIns'}); | ||
| 84 | ed.addButton('attribs', {title : 'xhtmlxtras.attribs_desc', cmd : 'mceAttributes'}); | ||
| 85 | |||
| 86 | if (tinymce.isIE) { | ||
| 87 | function fix(ed, o) { | ||
| 88 | if (o.set) { | ||
| 89 | o.content = o.content.replace(/<abbr([^>]+)>/gi, '<html:abbr $1>'); | ||
| 90 | o.content = o.content.replace(/<\/abbr>/gi, '</html:abbr>'); | ||
| 91 | } | ||
| 92 | }; | ||
| 93 | |||
| 94 | ed.onBeforeSetContent.add(fix); | ||
| 95 | ed.onPostProcess.add(fix); | ||
| 96 | } | ||
| 97 | |||
| 98 | ed.onNodeChange.add(function(ed, cm, n, co) { | ||
| 99 | n = ed.dom.getParent(n, 'CITE,ACRONYM,ABBR,DEL,INS'); | ||
| 100 | |||
| 101 | cm.setDisabled('cite', co); | ||
| 102 | cm.setDisabled('acronym', co); | ||
| 103 | cm.setDisabled('abbr', co); | ||
| 104 | cm.setDisabled('del', co); | ||
| 105 | cm.setDisabled('ins', co); | ||
| 106 | cm.setDisabled('attribs', n && n.nodeName == 'BODY'); | ||
| 107 | cm.setActive('cite', 0); | ||
| 108 | cm.setActive('acronym', 0); | ||
| 109 | cm.setActive('abbr', 0); | ||
| 110 | cm.setActive('del', 0); | ||
| 111 | cm.setActive('ins', 0); | ||
| 112 | |||
| 113 | // Activate all | ||
| 114 | if (n) { | ||
| 115 | do { | ||
| 116 | cm.setDisabled(n.nodeName.toLowerCase(), 0); | ||
| 117 | cm.setActive(n.nodeName.toLowerCase(), 1); | ||
| 118 | } while (n = n.parentNode); | ||
| 119 | } | ||
| 120 | }); | ||
| 121 | }, | ||
| 122 | |||
| 123 | getInfo : function() { | ||
| 124 | return { | ||
| 125 | longname : 'XHTML Xtras Plugin', | ||
| 126 | author : 'Moxiecode Systems AB', | ||
| 127 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 128 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras', | ||
| 129 | version : tinymce.majorVersion + "." + tinymce.minorVersion | ||
| 130 | }; | ||
| 131 | } | ||
| 132 | }); | ||
| 133 | |||
| 134 | // Register plugin | ||
| 135 | tinymce.PluginManager.add('xhtmlxtras', tinymce.plugins.XHTMLXtrasPlugin); | ||
| 136 | })(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/ins.htm b/public/javascripts/tiny_mce/plugins/xhtmlxtras/ins.htm deleted file mode 100644 index 9fa21c4..0000000 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/ins.htm +++ /dev/null | |||
| @@ -1,169 +0,0 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 3 | <head> | ||
| 4 | <title>{#xhtmlxtras_dlg.title_ins_element}</title> | ||
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | ||
| 6 | <script type="text/javascript" src="../../utils/mctabs.js"></script> | ||
| 7 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | ||
| 8 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> | ||
| 9 | <script type="text/javascript" src="js/element_common.js"></script> | ||
| 10 | <script type="text/javascript" src="js/ins.js"></script> | ||
| 11 | <link rel="stylesheet" type="text/css" href="css/popup.css" /> | ||
| 12 | </head> | ||
| 13 | <body id="xhtmlxtrasins" style="display: none"> | ||
| 14 | <form onsubmit="insertIns();return false;" action="#"> | ||
| 15 | <div class="tabs"> | ||
| 16 | <ul> | ||
| 17 | <li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.general_tab}</a></span></li> | ||
| 18 | <!-- <li id="events_tab"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#xhtmlxtras_dlg.events_tab}</a></span></li> --> | ||
| 19 | </ul> | ||
| 20 | </div> | ||
| 21 | |||
| 22 | <div class="panel_wrapper"> | ||
| 23 | <div id="general_panel" class="panel current"> | ||
| 24 | <fieldset> | ||
| 25 | <legend>{#xhtmlxtras_dlg.fieldset_general_tab}</legend> | ||
| 26 | <table border="0" cellpadding="0" cellspacing="4"> | ||
| 27 | <tr> | ||
| 28 | <td class="label"><label id="datetimelabel" for="datetime">{#xhtmlxtras_dlg.attribute_label_datetime}</label>:</td> | ||
| 29 | <td> | ||
| 30 | <table border="0" cellspacing="0" cellpadding="0"> | ||
| 31 | <tr> | ||
| 32 | <td><input id="datetime" name="datetime" type="text" value="" maxlength="19" class="field mceFocus" /></td> | ||
| 33 | <td><a href="javascript:insertDateTime('datetime');" onmousedown="return false;" class="browse"><span class="datetime" title="{#xhtmlxtras_dlg.insert_date}"></span></a></td> | ||
| 34 | </tr> | ||
| 35 | </table> | ||
| 36 | </td> | ||
| 37 | </tr> | ||
| 38 | <tr> | ||
| 39 | <td class="label"><label id="citelabel" for="cite">{#xhtmlxtras_dlg.attribute_label_cite}</label>:</td> | ||
| 40 | <td><input id="cite" name="cite" type="text" value="" class="field" /></td> | ||
| 41 | </tr> | ||
| 42 | </table> | ||
| 43 | </fieldset> | ||
| 44 | <fieldset> | ||
| 45 | <legend>{#xhtmlxtras_dlg.fieldset_attrib_tab}</legend> | ||
| 46 | <table border="0" cellpadding="0" cellspacing="4"> | ||
| 47 | <tr> | ||
| 48 | <td class="label"><label id="titlelabel" for="title">{#xhtmlxtras_dlg.attribute_label_title}</label>:</td> | ||
| 49 | <td><input id="title" name="title" type="text" value="" class="field" /></td> | ||
| 50 | </tr> | ||
| 51 | <tr> | ||
| 52 | <td class="label"><label id="idlabel" for="id">{#xhtmlxtras_dlg.attribute_label_id}</label>:</td> | ||
| 53 | <td><input id="id" name="id" type="text" value="" class="field" /></td> | ||
| 54 | </tr> | ||
| 55 | <tr> | ||
| 56 | <td class="label"><label id="classlabel" for="class">{#xhtmlxtras_dlg.attribute_label_class}</label>:</td> | ||
| 57 | <td> | ||
| 58 | <select id="class" name="class" class="field mceEditableSelect"> | ||
| 59 | <option value="">{#not_set}</option> | ||
| 60 | </select> | ||
| 61 | </td> | ||
| 62 | </tr> | ||
| 63 | <tr> | ||
| 64 | <td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td> | ||
| 65 | <td><input id="style" name="style" type="text" value="" class="field" /></td> | ||
| 66 | </tr> | ||
| 67 | <tr> | ||
| 68 | <td class="label"><label id="dirlabel" for="dir">{#xhtmlxtras_dlg.attribute_label_langdir}</label>:</td> | ||
| 69 | <td> | ||
| 70 | <select id="dir" name="dir" class="field"> | ||
| 71 | <option value="">{#not_set}</option> | ||
| 72 | <option value="ltr">{#xhtmlxtras_dlg.attribute_option_ltr}</option> | ||
| 73 | <option value="rtl">{#xhtmlxtras_dlg.attribute_option_rtl}</option> | ||
| 74 | </select> | ||
| 75 | </td> | ||
| 76 | </tr> | ||
| 77 | <tr> | ||
| 78 | <td class="label"><label id="langlabel" for="lang">{#xhtmlxtras_dlg.attribute_label_langcode}</label>:</td> | ||
| 79 | <td> | ||
| 80 | <input id="lang" name="lang" type="text" value="" class="field" /> | ||
| 81 | </td> | ||
| 82 | </tr> | ||
| 83 | </table> | ||
| 84 | </fieldset> | ||
| 85 | </div> | ||
| 86 | <div id="events_panel" class="panel"> | ||
| 87 | <fieldset> | ||
| 88 | <legend>{#xhtmlxtras_dlg.fieldset_events_tab}</legend> | ||
| 89 | |||
| 90 | <table border="0" cellpadding="0" cellspacing="4"> | ||
| 91 | <tr> | ||
| 92 | <td class="label"><label for="onfocus">onfocus</label>:</td> | ||
| 93 | <td><input id="onfocus" name="onfocus" type="text" value="" class="field" /></td> | ||
| 94 | </tr> | ||
| 95 | |||
| 96 | <tr> | ||
| 97 | <td class="label"><label for="onblur">onblur</label>:</td> | ||
| 98 | <td><input id="onblur" name="onblur" type="text" value="" class="field" /></td> | ||
| 99 | </tr> | ||
| 100 | |||
| 101 | <tr> | ||
| 102 | <td class="label"><label for="onclick">onclick</label>:</td> | ||
| 103 | <td><input id="onclick" name="onclick" type="text" value="" class="field" /></td> | ||
| 104 | </tr> | ||
| 105 | |||
| 106 | <tr> | ||
| 107 | <td class="label"><label for="ondblclick">ondblclick</label>:</td> | ||
| 108 | <td><input id="ondblclick" name="ondblclick" type="text" value="" class="field" /></td> | ||
| 109 | </tr> | ||
| 110 | |||
| 111 | <tr> | ||
| 112 | <td class="label"><label for="onmousedown">onmousedown</label>:</td> | ||
| 113 | <td><input id="onmousedown" name="onmousedown" type="text" value="" class="field" /></td> | ||
| 114 | </tr> | ||
| 115 | |||
| 116 | <tr> | ||
| 117 | <td class="label"><label for="onmouseup">onmouseup</label>:</td> | ||
| 118 | <td><input id="onmouseup" name="onmouseup" type="text" value="" class="field" /></td> | ||
| 119 | </tr> | ||
| 120 | |||
| 121 | <tr> | ||
| 122 | <td class="label"><label for="onmouseover">onmouseover</label>:</td> | ||
| 123 | <td><input id="onmouseover" name="onmouseover" type="text" value="" class="field" /></td> | ||
| 124 | </tr> | ||
| 125 | |||
| 126 | <tr> | ||
| 127 | <td class="label"><label for="onmousemove">onmousemove</label>:</td> | ||
| 128 | <td><input id="onmousemove" name="onmousemove" type="text" value="" class="field" /></td> | ||
| 129 | </tr> | ||
| 130 | |||
| 131 | <tr> | ||
| 132 | <td class="label"><label for="onmouseout">onmouseout</label>:</td> | ||
| 133 | <td><input id="onmouseout" name="onmouseout" type="text" value="" class="field" /></td> | ||
| 134 | </tr> | ||
| 135 | |||
| 136 | <tr> | ||
| 137 | <td class="label"><label for="onkeypress">onkeypress</label>:</td> | ||
| 138 | <td><input id="onkeypress" name="onkeypress" type="text" value="" class="field" /></td> | ||
| 139 | </tr> | ||
| 140 | |||
| 141 | <tr> | ||
| 142 | <td class="label"><label for="onkeydown">onkeydown</label>:</td> | ||
| 143 | <td><input id="onkeydown" name="onkeydown" type="text" value="" class="field" /></td> | ||
| 144 | </tr> | ||
| 145 | |||
| 146 | <tr> | ||
| 147 | <td class="label"><label for="onkeyup">onkeyup</label>:</td> | ||
| 148 | <td><input id="onkeyup" name="onkeyup" type="text" value="" class="field" /></td> | ||
| 149 | </tr> | ||
| 150 | </table> | ||
| 151 | </fieldset> | ||
| 152 | </div> | ||
| 153 | </div> | ||
| 154 | <div class="mceActionPanel"> | ||
| 155 | <div style="float: left"> | ||
| 156 | <input type="submit" id="insert" name="insert" value="{#update}" /> | ||
| 157 | </div> | ||
| 158 | <div style="float: left"> | ||
| 159 | <input type="button" id="remove" name="remove" class="button" value="{#xhtmlxtras_dlg.remove}" onclick="removeIns();" style="display: none;" /> | ||
| 160 | </div> | ||
| 161 | <div style="float: right"> | ||
| 162 | <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" /> | ||
| 163 | </div> | ||
| 164 | </div> | ||
| 165 | |||
| 166 | </form> | ||
| 167 | |||
| 168 | </body> | ||
| 169 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js b/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js deleted file mode 100644 index e84b6a8..0000000 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode - based on work by Andrew Tetlaw | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | function init() { | ||
| 9 | SXE.initElementDialog('abbr'); | ||
| 10 | if (SXE.currentAction == "update") { | ||
| 11 | SXE.showRemoveButton(); | ||
| 12 | } | ||
| 13 | } | ||
| 14 | |||
| 15 | function insertAbbr() { | ||
| 16 | SXE.insertElement(tinymce.isIE ? 'html:abbr' : 'abbr'); | ||
| 17 | tinyMCEPopup.close(); | ||
| 18 | } | ||
| 19 | |||
| 20 | function removeAbbr() { | ||
| 21 | SXE.removeElement('abbr'); | ||
| 22 | tinyMCEPopup.close(); | ||
| 23 | } | ||
| 24 | |||
| 25 | tinyMCEPopup.onInit.add(init); | ||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js b/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js deleted file mode 100644 index 933d122..0000000 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode - based on work by Andrew Tetlaw | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | function init() { | ||
| 9 | SXE.initElementDialog('acronym'); | ||
| 10 | if (SXE.currentAction == "update") { | ||
| 11 | SXE.showRemoveButton(); | ||
| 12 | } | ||
| 13 | } | ||
| 14 | |||
| 15 | function insertAcronym() { | ||
| 16 | SXE.insertElement('acronym'); | ||
| 17 | tinyMCEPopup.close(); | ||
| 18 | } | ||
| 19 | |||
| 20 | function removeAcronym() { | ||
| 21 | SXE.removeElement('acronym'); | ||
| 22 | tinyMCEPopup.close(); | ||
| 23 | } | ||
| 24 | |||
| 25 | tinyMCEPopup.onInit.add(init); | ||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js b/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js deleted file mode 100644 index 23c7fa4..0000000 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js +++ /dev/null | |||
| @@ -1,123 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode - based on work by Andrew Tetlaw | ||
| 5 | * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | function init() { | ||
| 9 | tinyMCEPopup.resizeToInnerSize(); | ||
| 10 | var inst = tinyMCEPopup.editor; | ||
| 11 | var dom = inst.dom; | ||
| 12 | var elm = inst.selection.getNode(); | ||
| 13 | var f = document.forms[0]; | ||
| 14 | var onclick = dom.getAttrib(elm, 'onclick'); | ||
| 15 | |||
| 16 | setFormValue('title', dom.getAttrib(elm, 'title')); | ||
| 17 | setFormValue('id', dom.getAttrib(elm, 'id')); | ||
| 18 | setFormValue('style', dom.getAttrib(elm, "style")); | ||
| 19 | setFormValue('dir', dom.getAttrib(elm, 'dir')); | ||
| 20 | setFormValue('lang', dom.getAttrib(elm, 'lang')); | ||
| 21 | setFormValue('tabindex', dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : "")); | ||
| 22 | setFormValue('accesskey', dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : "")); | ||
| 23 | setFormValue('onfocus', dom.getAttrib(elm, 'onfocus')); | ||
| 24 | setFormValue('onblur', dom.getAttrib(elm, 'onblur')); | ||
| 25 | setFormValue('onclick', onclick); | ||
| 26 | setFormValue('ondblclick', dom.getAttrib(elm, 'ondblclick')); | ||
| 27 | setFormValue('onmousedown', dom.getAttrib(elm, 'onmousedown')); | ||
| 28 | setFormValue('onmouseup', dom.getAttrib(elm, 'onmouseup')); | ||
| 29 | setFormValue('onmouseover', dom.getAttrib(elm, 'onmouseover')); | ||
| 30 | setFormValue('onmousemove', dom.getAttrib(elm, 'onmousemove')); | ||
| 31 | setFormValue('onmouseout', dom.getAttrib(elm, 'onmouseout')); | ||
| 32 | setFormValue('onkeypress', dom.getAttrib(elm, 'onkeypress')); | ||
| 33 | setFormValue('onkeydown', dom.getAttrib(elm, 'onkeydown')); | ||
| 34 | setFormValue('onkeyup', dom.getAttrib(elm, 'onkeyup')); | ||
| 35 | className = dom.getAttrib(elm, 'class'); | ||
| 36 | |||
| 37 | addClassesToList('classlist', 'advlink_styles'); | ||
| 38 | selectByValue(f, 'classlist', className, true); | ||
| 39 | |||
| 40 | TinyMCE_EditableSelects.init(); | ||
| 41 | } | ||
| 42 | |||
| 43 | function setFormValue(name, value) { | ||
| 44 | if(value && document.forms[0].elements[name]){ | ||
| 45 | document.forms[0].elements[name].value = value; | ||
| 46 | } | ||
| 47 | } | ||
| 48 | |||
| 49 | function insertAction() { | ||
| 50 | var inst = tinyMCEPopup.editor; | ||
| 51 | var elm = inst.selection.getNode(); | ||
| 52 | |||
| 53 | tinyMCEPopup.execCommand("mceBeginUndoLevel"); | ||
| 54 | setAllAttribs(elm); | ||
| 55 | tinyMCEPopup.execCommand("mceEndUndoLevel"); | ||
| 56 | tinyMCEPopup.close(); | ||
| 57 | } | ||
| 58 | |||
| 59 | function setAttrib(elm, attrib, value) { | ||
| 60 | var formObj = document.forms[0]; | ||
| 61 | var valueElm = formObj.elements[attrib.toLowerCase()]; | ||
| 62 | var inst = tinyMCEPopup.editor; | ||
| 63 | var dom = inst.dom; | ||
| 64 | |||
| 65 | if (typeof(value) == "undefined" || value == null) { | ||
| 66 | value = ""; | ||
| 67 | |||
| 68 | if (valueElm) | ||
| 69 | value = valueElm.value; | ||
| 70 | } | ||
| 71 | |||
| 72 | if (value != "") { | ||
| 73 | dom.setAttrib(elm, attrib.toLowerCase(), value); | ||
| 74 | |||
| 75 | if (attrib == "style") | ||
| 76 | attrib = "style.cssText"; | ||
| 77 | |||
| 78 | if (attrib.substring(0, 2) == 'on') | ||
| 79 | value = 'return true;' + value; | ||
| 80 | |||
| 81 | if (attrib == "class") | ||
| 82 | attrib = "className"; | ||
| 83 | |||
| 84 | elm[attrib]=value; | ||
| 85 | } else | ||
| 86 | elm.removeAttribute(attrib); | ||
| 87 | } | ||
| 88 | |||
| 89 | function setAllAttribs(elm) { | ||
| 90 | var f = document.forms[0]; | ||
| 91 | |||
| 92 | setAttrib(elm, 'title'); | ||
| 93 | setAttrib(elm, 'id'); | ||
| 94 | setAttrib(elm, 'style'); | ||
| 95 | setAttrib(elm, 'class', getSelectValue(f, 'classlist')); | ||
| 96 | setAttrib(elm, 'dir'); | ||
| 97 | setAttrib(elm, 'lang'); | ||
| 98 | setAttrib(elm, 'tabindex'); | ||
| 99 | setAttrib(elm, 'accesskey'); | ||
| 100 | setAttrib(elm, 'onfocus'); | ||
| 101 | setAttrib(elm, 'onblur'); | ||
| 102 | setAttrib(elm, 'onclick'); | ||
| 103 | setAttrib(elm, 'ondblclick'); | ||
| 104 | setAttrib(elm, 'onmousedown'); | ||
| 105 | setAttrib(elm, 'onmouseup'); | ||
| 106 | setAttrib(elm, 'onmouseover'); | ||
| 107 | setAttrib(elm, 'onmousemove'); | ||
| 108 | setAttrib(elm, 'onmouseout'); | ||
| 109 | setAttrib(elm, 'onkeypress'); | ||
| 110 | setAttrib(elm, 'onkeydown'); | ||
| 111 | setAttrib(elm, 'onkeyup'); | ||
| 112 | |||
| 113 | // Refresh in old MSIE | ||
| 114 | // if (tinyMCE.isMSIE5) | ||
| 115 | // elm.outerHTML = elm.outerHTML; | ||
| 116 | } | ||
| 117 | |||
| 118 | function insertAttribute() { | ||
| 119 | tinyMCEPopup.close(); | ||
| 120 | } | ||
| 121 | |||
| 122 | tinyMCEPopup.onInit.add(init); | ||
| 123 | tinyMCEPopup.requireLangPack(); | ||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/cite.js b/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/cite.js deleted file mode 100644 index c36f7fd..0000000 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/cite.js +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode - based on work by Andrew Tetlaw | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | function init() { | ||
| 9 | SXE.initElementDialog('cite'); | ||
| 10 | if (SXE.currentAction == "update") { | ||
| 11 | SXE.showRemoveButton(); | ||
| 12 | } | ||
| 13 | } | ||
| 14 | |||
| 15 | function insertCite() { | ||
| 16 | SXE.insertElement('cite'); | ||
| 17 | tinyMCEPopup.close(); | ||
| 18 | } | ||
| 19 | |||
| 20 | function removeCite() { | ||
| 21 | SXE.removeElement('cite'); | ||
| 22 | tinyMCEPopup.close(); | ||
| 23 | } | ||
| 24 | |||
| 25 | tinyMCEPopup.onInit.add(init); | ||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/del.js b/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/del.js deleted file mode 100644 index 7049f2b..0000000 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/del.js +++ /dev/null | |||
| @@ -1,60 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode - based on work by Andrew Tetlaw | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | function init() { | ||
| 9 | SXE.initElementDialog('del'); | ||
| 10 | if (SXE.currentAction == "update") { | ||
| 11 | setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime')); | ||
| 12 | setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite')); | ||
| 13 | SXE.showRemoveButton(); | ||
| 14 | } | ||
| 15 | } | ||
| 16 | |||
| 17 | function setElementAttribs(elm) { | ||
| 18 | setAllCommonAttribs(elm); | ||
| 19 | setAttrib(elm, 'datetime'); | ||
| 20 | setAttrib(elm, 'cite'); | ||
| 21 | } | ||
| 22 | |||
| 23 | function insertDel() { | ||
| 24 | var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'DEL'); | ||
| 25 | |||
| 26 | tinyMCEPopup.execCommand('mceBeginUndoLevel'); | ||
| 27 | if (elm == null) { | ||
| 28 | var s = SXE.inst.selection.getContent(); | ||
| 29 | if(s.length > 0) { | ||
| 30 | insertInlineElement('del'); | ||
| 31 | var elementArray = tinymce.grep(SXE.inst.dom.select('del'), function(n) {return n.id == '#sxe_temp_del#';}); | ||
| 32 | for (var i=0; i<elementArray.length; i++) { | ||
| 33 | var elm = elementArray[i]; | ||
| 34 | setElementAttribs(elm); | ||
| 35 | } | ||
| 36 | } | ||
| 37 | } else { | ||
| 38 | setElementAttribs(elm); | ||
| 39 | } | ||
| 40 | tinyMCEPopup.editor.nodeChanged(); | ||
| 41 | tinyMCEPopup.execCommand('mceEndUndoLevel'); | ||
| 42 | tinyMCEPopup.close(); | ||
| 43 | } | ||
| 44 | |||
| 45 | function insertInlineElement(en) { | ||
| 46 | var ed = tinyMCEPopup.editor, dom = ed.dom; | ||
| 47 | |||
| 48 | ed.getDoc().execCommand('FontName', false, 'mceinline'); | ||
| 49 | tinymce.each(dom.select(tinymce.isWebKit ? 'span' : 'font'), function(n) { | ||
| 50 | if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline') | ||
| 51 | dom.replace(dom.create(en), n, 1); | ||
| 52 | }); | ||
| 53 | } | ||
| 54 | |||
| 55 | function removeDel() { | ||
| 56 | SXE.removeElement('del'); | ||
| 57 | tinyMCEPopup.close(); | ||
| 58 | } | ||
| 59 | |||
| 60 | tinyMCEPopup.onInit.add(init); | ||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js b/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js deleted file mode 100644 index 70f168a..0000000 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js +++ /dev/null | |||
| @@ -1,231 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode - based on work by Andrew Tetlaw | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | tinyMCEPopup.requireLangPack(); | ||
| 9 | |||
| 10 | function initCommonAttributes(elm) { | ||
| 11 | var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom; | ||
| 12 | |||
| 13 | // Setup form data for common element attributes | ||
| 14 | setFormValue('title', dom.getAttrib(elm, 'title')); | ||
| 15 | setFormValue('id', dom.getAttrib(elm, 'id')); | ||
| 16 | selectByValue(formObj, 'class', dom.getAttrib(elm, 'class'), true); | ||
| 17 | setFormValue('style', dom.getAttrib(elm, 'style')); | ||
| 18 | selectByValue(formObj, 'dir', dom.getAttrib(elm, 'dir')); | ||
| 19 | setFormValue('lang', dom.getAttrib(elm, 'lang')); | ||
| 20 | setFormValue('onfocus', dom.getAttrib(elm, 'onfocus')); | ||
| 21 | setFormValue('onblur', dom.getAttrib(elm, 'onblur')); | ||
| 22 | setFormValue('onclick', dom.getAttrib(elm, 'onclick')); | ||
| 23 | setFormValue('ondblclick', dom.getAttrib(elm, 'ondblclick')); | ||
| 24 | setFormValue('onmousedown', dom.getAttrib(elm, 'onmousedown')); | ||
| 25 | setFormValue('onmouseup', dom.getAttrib(elm, 'onmouseup')); | ||
| 26 | setFormValue('onmouseover', dom.getAttrib(elm, 'onmouseover')); | ||
| 27 | setFormValue('onmousemove', dom.getAttrib(elm, 'onmousemove')); | ||
| 28 | setFormValue('onmouseout', dom.getAttrib(elm, 'onmouseout')); | ||
| 29 | setFormValue('onkeypress', dom.getAttrib(elm, 'onkeypress')); | ||
| 30 | setFormValue('onkeydown', dom.getAttrib(elm, 'onkeydown')); | ||
| 31 | setFormValue('onkeyup', dom.getAttrib(elm, 'onkeyup')); | ||
| 32 | } | ||
| 33 | |||
| 34 | function setFormValue(name, value) { | ||
| 35 | if(document.forms[0].elements[name]) document.forms[0].elements[name].value = value; | ||
| 36 | } | ||
| 37 | |||
| 38 | function insertDateTime(id) { | ||
| 39 | document.getElementById(id).value = getDateTime(new Date(), "%Y-%m-%dT%H:%M:%S"); | ||
| 40 | } | ||
| 41 | |||
| 42 | function getDateTime(d, fmt) { | ||
| 43 | fmt = fmt.replace("%D", "%m/%d/%y"); | ||
| 44 | fmt = fmt.replace("%r", "%I:%M:%S %p"); | ||
| 45 | fmt = fmt.replace("%Y", "" + d.getFullYear()); | ||
| 46 | fmt = fmt.replace("%y", "" + d.getYear()); | ||
| 47 | fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2)); | ||
| 48 | fmt = fmt.replace("%d", addZeros(d.getDate(), 2)); | ||
| 49 | fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2)); | ||
| 50 | fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2)); | ||
| 51 | fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2)); | ||
| 52 | fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1)); | ||
| 53 | fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM")); | ||
| 54 | fmt = fmt.replace("%%", "%"); | ||
| 55 | |||
| 56 | return fmt; | ||
| 57 | } | ||
| 58 | |||
| 59 | function addZeros(value, len) { | ||
| 60 | var i; | ||
| 61 | |||
| 62 | value = "" + value; | ||
| 63 | |||
| 64 | if (value.length < len) { | ||
| 65 | for (i=0; i<(len-value.length); i++) | ||
| 66 | value = "0" + value; | ||
| 67 | } | ||
| 68 | |||
| 69 | return value; | ||
| 70 | } | ||
| 71 | |||
| 72 | function selectByValue(form_obj, field_name, value, add_custom, ignore_case) { | ||
| 73 | if (!form_obj || !form_obj.elements[field_name]) | ||
| 74 | return; | ||
| 75 | |||
| 76 | var sel = form_obj.elements[field_name]; | ||
| 77 | |||
| 78 | var found = false; | ||
| 79 | for (var i=0; i<sel.options.length; i++) { | ||
| 80 | var option = sel.options[i]; | ||
| 81 | |||
| 82 | if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) { | ||
| 83 | option.selected = true; | ||
| 84 | found = true; | ||
| 85 | } else | ||
| 86 | option.selected = false; | ||
| 87 | } | ||
| 88 | |||
| 89 | if (!found && add_custom && value != '') { | ||
| 90 | var option = new Option('Value: ' + value, value); | ||
| 91 | option.selected = true; | ||
| 92 | sel.options[sel.options.length] = option; | ||
| 93 | } | ||
| 94 | |||
| 95 | return found; | ||
| 96 | } | ||
| 97 | |||
| 98 | function setAttrib(elm, attrib, value) { | ||
| 99 | var formObj = document.forms[0]; | ||
| 100 | var valueElm = formObj.elements[attrib.toLowerCase()]; | ||
| 101 | tinyMCEPopup.editor.dom.setAttrib(elm, attrib, value || valueElm.value); | ||
| 102 | } | ||
| 103 | |||
| 104 | function setAllCommonAttribs(elm) { | ||
| 105 | setAttrib(elm, 'title'); | ||
| 106 | setAttrib(elm, 'id'); | ||
| 107 | setAttrib(elm, 'class'); | ||
| 108 | setAttrib(elm, 'style'); | ||
| 109 | setAttrib(elm, 'dir'); | ||
| 110 | setAttrib(elm, 'lang'); | ||
| 111 | /*setAttrib(elm, 'onfocus'); | ||
| 112 | setAttrib(elm, 'onblur'); | ||
| 113 | setAttrib(elm, 'onclick'); | ||
| 114 | setAttrib(elm, 'ondblclick'); | ||
| 115 | setAttrib(elm, 'onmousedown'); | ||
| 116 | setAttrib(elm, 'onmouseup'); | ||
| 117 | setAttrib(elm, 'onmouseover'); | ||
| 118 | setAttrib(elm, 'onmousemove'); | ||
| 119 | setAttrib(elm, 'onmouseout'); | ||
| 120 | setAttrib(elm, 'onkeypress'); | ||
| 121 | setAttrib(elm, 'onkeydown'); | ||
| 122 | setAttrib(elm, 'onkeyup');*/ | ||
| 123 | } | ||
| 124 | |||
| 125 | SXE = { | ||
| 126 | currentAction : "insert", | ||
| 127 | inst : tinyMCEPopup.editor, | ||
| 128 | updateElement : null | ||
| 129 | } | ||
| 130 | |||
| 131 | SXE.focusElement = SXE.inst.selection.getNode(); | ||
| 132 | |||
| 133 | SXE.initElementDialog = function(element_name) { | ||
| 134 | addClassesToList('class', 'xhtmlxtras_styles'); | ||
| 135 | TinyMCE_EditableSelects.init(); | ||
| 136 | |||
| 137 | element_name = element_name.toLowerCase(); | ||
| 138 | var elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase()); | ||
| 139 | if (elm != null && elm.nodeName.toUpperCase() == element_name.toUpperCase()) { | ||
| 140 | SXE.currentAction = "update"; | ||
| 141 | } | ||
| 142 | |||
| 143 | if (SXE.currentAction == "update") { | ||
| 144 | initCommonAttributes(elm); | ||
| 145 | SXE.updateElement = elm; | ||
| 146 | } | ||
| 147 | |||
| 148 | document.forms[0].insert.value = tinyMCEPopup.getLang(SXE.currentAction, 'Insert', true); | ||
| 149 | } | ||
| 150 | |||
| 151 | SXE.insertElement = function(element_name) { | ||
| 152 | var elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase()), h, tagName; | ||
| 153 | |||
| 154 | tinyMCEPopup.execCommand('mceBeginUndoLevel'); | ||
| 155 | if (elm == null) { | ||
| 156 | var s = SXE.inst.selection.getContent(); | ||
| 157 | if(s.length > 0) { | ||
| 158 | tagName = element_name; | ||
| 159 | |||
| 160 | if (tinymce.isIE && element_name.indexOf('html:') == 0) | ||
| 161 | element_name = element_name.substring(5).toLowerCase(); | ||
| 162 | |||
| 163 | insertInlineElement(element_name); | ||
| 164 | var elementArray = tinymce.grep(SXE.inst.dom.select(element_name)); | ||
| 165 | for (var i=0; i<elementArray.length; i++) { | ||
| 166 | var elm = elementArray[i]; | ||
| 167 | |||
| 168 | if (SXE.inst.dom.getAttrib(elm, '_mce_new')) { | ||
| 169 | elm.id = ''; | ||
| 170 | elm.setAttribute('id', ''); | ||
| 171 | elm.removeAttribute('id'); | ||
| 172 | elm.removeAttribute('_mce_new'); | ||
| 173 | |||
| 174 | setAllCommonAttribs(elm); | ||
| 175 | } | ||
| 176 | } | ||
| 177 | } | ||
| 178 | } else { | ||
| 179 | setAllCommonAttribs(elm); | ||
| 180 | } | ||
| 181 | SXE.inst.nodeChanged(); | ||
| 182 | tinyMCEPopup.execCommand('mceEndUndoLevel'); | ||
| 183 | } | ||
| 184 | |||
| 185 | SXE.removeElement = function(element_name){ | ||
| 186 | element_name = element_name.toLowerCase(); | ||
| 187 | elm = SXE.inst.dom.getParent(SXE.focusElement, element_name.toUpperCase()); | ||
| 188 | if(elm && elm.nodeName.toUpperCase() == element_name.toUpperCase()){ | ||
| 189 | tinyMCEPopup.execCommand('mceBeginUndoLevel'); | ||
| 190 | tinyMCE.execCommand('mceRemoveNode', false, elm); | ||
| 191 | SXE.inst.nodeChanged(); | ||
| 192 | tinyMCEPopup.execCommand('mceEndUndoLevel'); | ||
| 193 | } | ||
| 194 | } | ||
| 195 | |||
| 196 | SXE.showRemoveButton = function() { | ||
| 197 | document.getElementById("remove").style.display = 'block'; | ||
| 198 | } | ||
| 199 | |||
| 200 | SXE.containsClass = function(elm,cl) { | ||
| 201 | return (elm.className.indexOf(cl) > -1) ? true : false; | ||
| 202 | } | ||
| 203 | |||
| 204 | SXE.removeClass = function(elm,cl) { | ||
| 205 | if(elm.className == null || elm.className == "" || !SXE.containsClass(elm,cl)) { | ||
| 206 | return true; | ||
| 207 | } | ||
| 208 | var classNames = elm.className.split(" "); | ||
| 209 | var newClassNames = ""; | ||
| 210 | for (var x = 0, cnl = classNames.length; x < cnl; x++) { | ||
| 211 | if (classNames[x] != cl) { | ||
| 212 | newClassNames += (classNames[x] + " "); | ||
| 213 | } | ||
| 214 | } | ||
| 215 | elm.className = newClassNames.substring(0,newClassNames.length-1); //removes extra space at the end | ||
| 216 | } | ||
| 217 | |||
| 218 | SXE.addClass = function(elm,cl) { | ||
| 219 | if(!SXE.containsClass(elm,cl)) elm.className ? elm.className += " " + cl : elm.className = cl; | ||
| 220 | return true; | ||
| 221 | } | ||
| 222 | |||
| 223 | function insertInlineElement(en) { | ||
| 224 | var ed = tinyMCEPopup.editor, dom = ed.dom; | ||
| 225 | |||
| 226 | ed.getDoc().execCommand('FontName', false, 'mceinline'); | ||
| 227 | tinymce.each(dom.select('span,font'), function(n) { | ||
| 228 | if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline') | ||
| 229 | dom.replace(dom.create(en, {_mce_new : 1}), n, 1); | ||
| 230 | }); | ||
| 231 | } | ||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/ins.js b/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/ins.js deleted file mode 100644 index 4fcc998..0000000 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/ins.js +++ /dev/null | |||
| @@ -1,59 +0,0 @@ | |||
| 1 | /** | ||
| 2 | * $Id: editor_plugin_src.js 42 2006-08-08 14:32:24Z spocke $ | ||
| 3 | * | ||
| 4 | * @author Moxiecode - based on work by Andrew Tetlaw | ||
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | ||
| 6 | */ | ||
| 7 | |||
| 8 | function init() { | ||
| 9 | SXE.initElementDialog('ins'); | ||
| 10 | if (SXE.currentAction == "update") { | ||
| 11 | setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime')); | ||
| 12 | setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite')); | ||
| 13 | SXE.showRemoveButton(); | ||
| 14 | } | ||
| 15 | } | ||
| 16 | |||
| 17 | function setElementAttribs(elm) { | ||
| 18 | setAllCommonAttribs(elm); | ||
| 19 | setAttrib(elm, 'datetime'); | ||
| 20 | setAttrib(elm, 'cite'); | ||
| 21 | } | ||
| 22 | |||
| 23 | function insertIns() { | ||
| 24 | var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'INS'); | ||
| 25 | tinyMCEPopup.execCommand('mceBeginUndoLevel'); | ||
| 26 | if (elm == null) { | ||
| 27 | var s = SXE.inst.selection.getContent(); | ||
| 28 | if(s.length > 0) { | ||
| 29 | insertInlineElement('INS'); | ||
| 30 | var elementArray = tinymce.grep(SXE.inst.dom.select('ins'), function(n) {return n.id == '#sxe_temp_ins#';}); | ||
| 31 | for (var i=0; i<elementArray.length; i++) { | ||
| 32 | var elm = elementArray[i]; | ||
| 33 | setElementAttribs(elm); | ||
| 34 | } | ||
| 35 | } | ||
| 36 | } else { | ||
| 37 | setElementAttribs(elm); | ||
| 38 | } | ||
| 39 | tinyMCEPopup.editor.nodeChanged(); | ||
| 40 | tinyMCEPopup.execCommand('mceEndUndoLevel'); | ||
| 41 | tinyMCEPopup.close(); | ||
| 42 | } | ||
| 43 | |||
| 44 | function removeIns() { | ||
| 45 | SXE.removeElement('ins'); | ||
| 46 | tinyMCEPopup.close(); | ||
| 47 | } | ||
| 48 | |||
| 49 | function insertInlineElement(en) { | ||
| 50 | var ed = tinyMCEPopup.editor, dom = ed.dom; | ||
| 51 | |||
| 52 | ed.getDoc().execCommand('FontName', false, 'mceinline'); | ||
| 53 | tinymce.each(dom.select(tinymce.isWebKit ? 'span' : 'font'), function(n) { | ||
| 54 | if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline') | ||
| 55 | dom.replace(dom.create(en), n, 1); | ||
| 56 | }); | ||
| 57 | } | ||
| 58 | |||
| 59 | tinyMCEPopup.onInit.add(init); | ||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js deleted file mode 100644 index 45b6b26..0000000 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | tinyMCE.addI18n('en.xhtmlxtras_dlg',{ | ||
| 2 | attribute_label_title:"Title", | ||
| 3 | attribute_label_id:"ID", | ||
| 4 | attribute_label_class:"Class", | ||
| 5 | attribute_label_style:"Style", | ||
| 6 | attribute_label_cite:"Cite", | ||
| 7 | attribute_label_datetime:"Date/Time", | ||
| 8 | attribute_label_langdir:"Text Direction", | ||
| 9 | attribute_option_ltr:"Left to right", | ||
| 10 | attribute_option_rtl:"Right to left", | ||
| 11 | attribute_label_langcode:"Language", | ||
| 12 | attribute_label_tabindex:"TabIndex", | ||
| 13 | attribute_label_accesskey:"AccessKey", | ||
| 14 | attribute_events_tab:"Events", | ||
| 15 | attribute_attrib_tab:"Attributes", | ||
| 16 | general_tab:"General", | ||
| 17 | attrib_tab:"Attributes", | ||
| 18 | events_tab:"Events", | ||
| 19 | fieldset_general_tab:"General Settings", | ||
| 20 | fieldset_attrib_tab:"Element Attributes", | ||
| 21 | fieldset_events_tab:"Element Events", | ||
| 22 | title_ins_element:"Insertion Element", | ||
| 23 | title_del_element:"Deletion Element", | ||
| 24 | title_acronym_element:"Acronym Element", | ||
| 25 | title_abbr_element:"Abbreviation Element", | ||
| 26 | title_cite_element:"Citation Element", | ||
| 27 | remove:"Remove", | ||
| 28 | insert_date:"Insert current date/time", | ||
| 29 | option_ltr:"Left to right", | ||
| 30 | option_rtl:"Right to left", | ||
| 31 | attribs_title:"Insert/Edit Attributes" | ||
| 32 | }); \ No newline at end of file | ||
