diff options
Diffstat (limited to 'public/javascripts/tiny_mce/plugins')
192 files changed, 1022 insertions, 1289 deletions
diff --git a/public/javascripts/tiny_mce/plugins/advhr/css/advhr.css b/public/javascripts/tiny_mce/plugins/advhr/css/advhr.css index 0e22834..0e22834 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advhr/css/advhr.css +++ b/public/javascripts/tiny_mce/plugins/advhr/css/advhr.css | |||
diff --git a/public/javascripts/tiny_mce/plugins/advhr/editor_plugin.js b/public/javascripts/tiny_mce/plugins/advhr/editor_plugin.js index f335004..4d3b062 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advhr/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/advhr/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.create('tinymce.plugins.AdvancedHRPlugin',{init:function(ed,url){ed.addCommand('mceAdvancedHr',function(){ed.windowManager.open({file:url+'/rule.htm',width:250+parseInt(ed.getLang('advhr.delta_width',0)),height:160+parseInt(ed.getLang('advhr.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('advhr',{title:'advhr.advhr_desc',cmd:'mceAdvancedHr'});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('advhr',n.nodeName=='HR');});ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName==='HR')ed.selection.select(e);});},getInfo:function(){return{longname:'Advanced HR',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('advhr',tinymce.plugins.AdvancedHRPlugin);})(); \ No newline at end of file | (function(){tinymce.create("tinymce.plugins.AdvancedHRPlugin",{init:function(a,b){a.addCommand("mceAdvancedHr",function(){a.windowManager.open({file:b+"/rule.htm",width:250+parseInt(a.getLang("advhr.delta_width",0)),height:160+parseInt(a.getLang("advhr.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("advhr",{title:"advhr.advhr_desc",cmd:"mceAdvancedHr"});a.onNodeChange.add(function(d,c,e){c.setActive("advhr",e.nodeName=="HR")});a.onClick.add(function(c,d){d=d.target;if(d.nodeName==="HR"){c.selection.select(d)}})},getInfo:function(){return{longname:"Advanced HR",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advhr",tinymce.plugins.AdvancedHRPlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/advhr/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/advhr/editor_plugin_src.js index 8a84753..8a84753 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advhr/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/advhr/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/advhr/js/rule.js b/public/javascripts/tiny_mce/plugins/advhr/js/rule.js index b6cbd66..b6cbd66 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advhr/js/rule.js +++ b/public/javascripts/tiny_mce/plugins/advhr/js/rule.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/advhr/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/advhr/langs/en_dlg.js index 873bfd8..873bfd8 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advhr/langs/en_dlg.js +++ b/public/javascripts/tiny_mce/plugins/advhr/langs/en_dlg.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/advhr/rule.htm b/public/javascripts/tiny_mce/plugins/advhr/rule.htm index 8f20f7f..75ca339 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advhr/rule.htm +++ b/public/javascripts/tiny_mce/plugins/advhr/rule.htm | |||
| @@ -7,7 +7,6 @@ | |||
| 7 | <script type="text/javascript" src="../../utils/mctabs.js"></script> | 7 | <script type="text/javascript" src="../../utils/mctabs.js"></script> |
| 8 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | 8 | <script type="text/javascript" src="../../utils/form_utils.js"></script> |
| 9 | <link href="css/advhr.css" rel="stylesheet" type="text/css" /> | 9 | <link href="css/advhr.css" rel="stylesheet" type="text/css" /> |
| 10 | <base target="_self" /> | ||
| 11 | </head> | 10 | </head> |
| 12 | <body> | 11 | <body> |
| 13 | <form onsubmit="AdvHRDialog.update();return false;" action="#"> | 12 | <form onsubmit="AdvHRDialog.update();return false;" action="#"> |
| @@ -22,7 +21,7 @@ | |||
| 22 | <table border="0" cellpadding="4" cellspacing="0"> | 21 | <table border="0" cellpadding="4" cellspacing="0"> |
| 23 | <tr> | 22 | <tr> |
| 24 | <td><label for="width">{#advhr_dlg.width}</label></td> | 23 | <td><label for="width">{#advhr_dlg.width}</label></td> |
| 25 | <td nowrap="nowrap"> | 24 | <td class="nowrap"> |
| 26 | <input id="width" name="width" type="text" value="" class="mceFocus" /> | 25 | <input id="width" name="width" type="text" value="" class="mceFocus" /> |
| 27 | <select name="width2" id="width2"> | 26 | <select name="width2" id="width2"> |
| 28 | <option value="">px</option> | 27 | <option value="">px</option> |
diff --git a/public/javascripts/tiny_mce/plugins/advimage/css/advimage.css b/public/javascripts/tiny_mce/plugins/advimage/css/advimage.css index 0a6251a..0a6251a 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advimage/css/advimage.css +++ b/public/javascripts/tiny_mce/plugins/advimage/css/advimage.css | |||
diff --git a/public/javascripts/tiny_mce/plugins/advimage/editor_plugin.js b/public/javascripts/tiny_mce/plugins/advimage/editor_plugin.js index 3af5057..4c7a9c3 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advimage/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/advimage/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.create('tinymce.plugins.AdvancedImagePlugin',{init:function(ed,url){ed.addCommand('mceAdvImage',function(){if(ed.dom.getAttrib(ed.selection.getNode(),'class').indexOf('mceItem')!=-1)return;ed.windowManager.open({file:url+'/image.htm',width:480+parseInt(ed.getLang('advimage.delta_width',0)),height:385+parseInt(ed.getLang('advimage.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('image',{title:'advimage.image_desc',cmd:'mceAdvImage'});},getInfo:function(){return{longname:'Advanced image',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('advimage',tinymce.plugins.AdvancedImagePlugin);})(); \ No newline at end of file | (function(){tinymce.create("tinymce.plugins.AdvancedImagePlugin",{init:function(a,b){a.addCommand("mceAdvImage",function(){if(a.dom.getAttrib(a.selection.getNode(),"class").indexOf("mceItem")!=-1){return}a.windowManager.open({file:b+"/image.htm",width:480+parseInt(a.getLang("advimage.delta_width",0)),height:385+parseInt(a.getLang("advimage.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("image",{title:"advimage.image_desc",cmd:"mceAdvImage"})},getInfo:function(){return{longname:"Advanced image",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advimage",tinymce.plugins.AdvancedImagePlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js index f526842..f526842 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/advimage/image.htm b/public/javascripts/tiny_mce/plugins/advimage/image.htm index dd84083..5d26150 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advimage/image.htm +++ b/public/javascripts/tiny_mce/plugins/advimage/image.htm | |||
| @@ -9,7 +9,6 @@ | |||
| 9 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> | 9 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> |
| 10 | <script type="text/javascript" src="js/image.js"></script> | 10 | <script type="text/javascript" src="js/image.js"></script> |
| 11 | <link href="css/advimage.css" rel="stylesheet" type="text/css" /> | 11 | <link href="css/advimage.css" rel="stylesheet" type="text/css" /> |
| 12 | <base target="_self" /> | ||
| 13 | </head> | 12 | </head> |
| 14 | <body id="advimage" style="display: none"> | 13 | <body id="advimage" style="display: none"> |
| 15 | <form onsubmit="ImageDialog.insert();return false;" action="#"> | 14 | <form onsubmit="ImageDialog.insert();return false;" action="#"> |
| @@ -38,7 +37,7 @@ | |||
| 38 | </tr> | 37 | </tr> |
| 39 | <tr> | 38 | <tr> |
| 40 | <td><label for="src_list">{#advimage_dlg.image_list}</label></td> | 39 | <td><label for="src_list">{#advimage_dlg.image_list}</label></td> |
| 41 | <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);"></select></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> |
| 42 | </tr> | 41 | </tr> |
| 43 | <tr> | 42 | <tr> |
| 44 | <td class="column1"><label id="altlabel" for="alt">{#advimage_dlg.alt}</label></td> | 43 | <td class="column1"><label id="altlabel" for="alt">{#advimage_dlg.alt}</label></td> |
| @@ -89,7 +88,7 @@ | |||
| 89 | 88 | ||
| 90 | <tr> | 89 | <tr> |
| 91 | <td class="column1"><label id="widthlabel" for="width">{#advimage_dlg.dimensions}</label></td> | 90 | <td class="column1"><label id="widthlabel" for="width">{#advimage_dlg.dimensions}</label></td> |
| 92 | <td nowrap="nowrap"> | 91 | <td class="nowrap"> |
| 93 | <input name="width" type="text" id="width" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeHeight();" /> x | 92 | <input name="width" type="text" id="width" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeHeight();" /> x |
| 94 | <input name="height" type="text" id="height" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeWidth();" /> px | 93 | <input name="height" type="text" id="height" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeWidth();" /> px |
| 95 | </td> | 94 | </td> |
| @@ -123,7 +122,7 @@ | |||
| 123 | 122 | ||
| 124 | <tr> | 123 | <tr> |
| 125 | <td><label for="class_list">{#class_name}</label></td> | 124 | <td><label for="class_list">{#class_name}</label></td> |
| 126 | <td colspan="2"><select id="class_list" name="class_list" class="mceEditableSelect"></select></td> | 125 | <td colspan="2"><select id="class_list" name="class_list" class="mceEditableSelect"><option value=""></option></select></td> |
| 127 | </tr> | 126 | </tr> |
| 128 | 127 | ||
| 129 | <tr> | 128 | <tr> |
| @@ -158,7 +157,7 @@ | |||
| 158 | </tr> | 157 | </tr> |
| 159 | <tr> | 158 | <tr> |
| 160 | <td><label for="over_list">{#advimage_dlg.image_list}</label></td> | 159 | <td><label for="over_list">{#advimage_dlg.image_list}</label></td> |
| 161 | <td><select id="over_list" name="over_list" onchange="document.getElementById('onmouseoversrc').value=this.options[this.selectedIndex].value;"></select></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> |
| 162 | </tr> | 161 | </tr> |
| 163 | <tr> | 162 | <tr> |
| 164 | <td class="column1"><label id="onmouseoutsrclabel" for="onmouseoutsrc">{#advimage_dlg.mouseout}</label></td> | 163 | <td class="column1"><label id="onmouseoutsrclabel" for="onmouseoutsrc">{#advimage_dlg.mouseout}</label></td> |
| @@ -171,7 +170,7 @@ | |||
| 171 | </tr> | 170 | </tr> |
| 172 | <tr> | 171 | <tr> |
| 173 | <td><label for="out_list">{#advimage_dlg.image_list}</label></td> | 172 | <td><label for="out_list">{#advimage_dlg.image_list}</label></td> |
| 174 | <td><select id="out_list" name="out_list" onchange="document.getElementById('onmouseoutsrc').value=this.options[this.selectedIndex].value;"></select></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> |
| 175 | </tr> | 174 | </tr> |
| 176 | </table> | 175 | </table> |
| 177 | </fieldset> | 176 | </fieldset> |
diff --git a/public/javascripts/tiny_mce/plugins/advimage/img/sample.gif b/public/javascripts/tiny_mce/plugins/advimage/img/sample.gif index 53bf689..53bf689 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advimage/img/sample.gif +++ b/public/javascripts/tiny_mce/plugins/advimage/img/sample.gif | |||
| 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 index 64fc6f6..3477226 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advimage/js/image.js +++ b/public/javascripts/tiny_mce/plugins/advimage/js/image.js | |||
| @@ -272,6 +272,7 @@ var ImageDialog = { | |||
| 272 | cl = tinyMCEPopup.editor.dom.getClasses(); | 272 | cl = tinyMCEPopup.editor.dom.getClasses(); |
| 273 | 273 | ||
| 274 | if (cl.length > 0) { | 274 | if (cl.length > 0) { |
| 275 | lst.options.length = 0; | ||
| 275 | lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); | 276 | lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), ''); |
| 276 | 277 | ||
| 277 | tinymce.each(cl, function(o) { | 278 | tinymce.each(cl, function(o) { |
| @@ -285,6 +286,7 @@ var ImageDialog = { | |||
| 285 | var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; | 286 | var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl; |
| 286 | 287 | ||
| 287 | l = window[l]; | 288 | l = window[l]; |
| 289 | lst.options.length = 0; | ||
| 288 | 290 | ||
| 289 | if (l && l.length > 0) { | 291 | if (l && l.length > 0) { |
| 290 | lst.options[lst.options.length] = new Option('', ''); | 292 | lst.options[lst.options.length] = new Option('', ''); |
diff --git a/public/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js index f493d19..f493d19 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js +++ b/public/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/advlink/css/advlink.css b/public/javascripts/tiny_mce/plugins/advlink/css/advlink.css index 1436431..1436431 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advlink/css/advlink.css +++ b/public/javascripts/tiny_mce/plugins/advlink/css/advlink.css | |||
diff --git a/public/javascripts/tiny_mce/plugins/advlink/editor_plugin.js b/public/javascripts/tiny_mce/plugins/advlink/editor_plugin.js index 4899f7b..983fe5a 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advlink/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/advlink/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.create('tinymce.plugins.AdvancedLinkPlugin',{init:function(ed,url){this.editor=ed;ed.addCommand('mceAdvLink',function(){var se=ed.selection;if(se.isCollapsed()&&!ed.dom.getParent(se.getNode(),'A'))return;ed.windowManager.open({file:url+'/link.htm',width:480+parseInt(ed.getLang('advlink.delta_width',0)),height:400+parseInt(ed.getLang('advlink.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('link',{title:'advlink.link_desc',cmd:'mceAdvLink'});ed.addShortcut('ctrl+k','advlink.advlink_desc','mceAdvLink');ed.onNodeChange.add(function(ed,cm,n,co){cm.setDisabled('link',co&&n.nodeName!='A');cm.setActive('link',n.nodeName=='A'&&!n.name);});},getInfo:function(){return{longname:'Advanced link',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('advlink',tinymce.plugins.AdvancedLinkPlugin);})(); \ No newline at end of file | (function(){tinymce.create("tinymce.plugins.AdvancedLinkPlugin",{init:function(a,b){this.editor=a;a.addCommand("mceAdvLink",function(){var c=a.selection;if(c.isCollapsed()&&!a.dom.getParent(c.getNode(),"A")){return}a.windowManager.open({file:b+"/link.htm",width:480+parseInt(a.getLang("advlink.delta_width",0)),height:400+parseInt(a.getLang("advlink.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("link",{title:"advlink.link_desc",cmd:"mceAdvLink"});a.addShortcut("ctrl+k","advlink.advlink_desc","mceAdvLink");a.onNodeChange.add(function(d,c,f,e){c.setDisabled("link",e&&f.nodeName!="A");c.setActive("link",f.nodeName=="A"&&!f.name)})},getInfo:function(){return{longname:"Advanced link",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlink",tinymce.plugins.AdvancedLinkPlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js index fc5325a..fc5325a 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/advlink/js/advlink.js b/public/javascripts/tiny_mce/plugins/advlink/js/advlink.js index a896250..bb7922a 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advlink/js/advlink.js +++ b/public/javascripts/tiny_mce/plugins/advlink/js/advlink.js | |||
| @@ -116,7 +116,7 @@ function checkPrefix(n) { | |||
| 116 | if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email'))) | 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; | 117 | n.value = 'mailto:' + n.value; |
| 118 | 118 | ||
| 119 | if (/^\s*www./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external'))) | 119 | if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external'))) |
| 120 | n.value = 'http://' + n.value; | 120 | n.value = 'http://' + n.value; |
| 121 | } | 121 | } |
| 122 | 122 | ||
| @@ -402,6 +402,7 @@ function insertAction() { | |||
| 402 | 402 | ||
| 403 | // Create new anchor elements | 403 | // Create new anchor elements |
| 404 | if (elm == null) { | 404 | if (elm == null) { |
| 405 | inst.getDoc().execCommand("unlink", false, null); | ||
| 405 | tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); | 406 | tinyMCEPopup.execCommand("CreateLink", false, "#mce_temp_url#", {skip_undo : 1}); |
| 406 | 407 | ||
| 407 | elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';}); | 408 | elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';}); |
diff --git a/public/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js index c71ffbd..c71ffbd 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js +++ b/public/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/advlink/link.htm b/public/javascripts/tiny_mce/plugins/advlink/link.htm index f46e8f8..cc8b0b8 100755..100644 --- a/public/javascripts/tiny_mce/plugins/advlink/link.htm +++ b/public/javascripts/tiny_mce/plugins/advlink/link.htm | |||
| @@ -8,7 +8,6 @@ | |||
| 8 | <script type="text/javascript" src="../../utils/validate.js"></script> | 8 | <script type="text/javascript" src="../../utils/validate.js"></script> |
| 9 | <script type="text/javascript" src="js/advlink.js"></script> | 9 | <script type="text/javascript" src="js/advlink.js"></script> |
| 10 | <link href="css/advlink.css" rel="stylesheet" type="text/css" /> | 10 | <link href="css/advlink.css" rel="stylesheet" type="text/css" /> |
| 11 | <base target="_self" /> | ||
| 12 | </head> | 11 | </head> |
| 13 | <body id="advlink" style="display: none"> | 12 | <body id="advlink" style="display: none"> |
| 14 | <form onsubmit="insertAction();return false;" action="#"> | 13 | <form onsubmit="insertAction();return false;" action="#"> |
| @@ -28,7 +27,7 @@ | |||
| 28 | 27 | ||
| 29 | <table border="0" cellpadding="4" cellspacing="0"> | 28 | <table border="0" cellpadding="4" cellspacing="0"> |
| 30 | <tr> | 29 | <tr> |
| 31 | <td nowrap="nowrap"><label id="hreflabel" for="href">{#advlink_dlg.url}</label></td> | 30 | <td class="nowrap"><label id="hreflabel" for="href">{#advlink_dlg.url}</label></td> |
| 32 | <td><table border="0" cellspacing="0" cellpadding="0"> | 31 | <td><table border="0" cellspacing="0" cellpadding="0"> |
| 33 | <tr> | 32 | <tr> |
| 34 | <td><input id="href" name="href" type="text" class="mceFocus" value="" onchange="selectByValue(this.form,'linklisthref',this.value);" /></td> | 33 | <td><input id="href" name="href" type="text" class="mceFocus" value="" onchange="selectByValue(this.form,'linklisthref',this.value);" /></td> |
| @@ -38,25 +37,25 @@ | |||
| 38 | </tr> | 37 | </tr> |
| 39 | <tr id="linklisthrefrow"> | 38 | <tr id="linklisthrefrow"> |
| 40 | <td class="column1"><label for="linklisthref">{#advlink_dlg.list}</label></td> | 39 | <td class="column1"><label for="linklisthref">{#advlink_dlg.list}</label></td> |
| 41 | <td colspan="2" id="linklisthrefcontainer"> </td> | 40 | <td colspan="2" id="linklisthrefcontainer"><select id="linklisthref"><option value=""></option></select></td> |
| 42 | </tr> | 41 | </tr> |
| 43 | <tr> | 42 | <tr> |
| 44 | <td class="column1"><label for="anchorlist">{#advlink_dlg.anchor_names}</label></td> | 43 | <td class="column1"><label for="anchorlist">{#advlink_dlg.anchor_names}</label></td> |
| 45 | <td colspan="2" id="anchorlistcontainer"> </td> | 44 | <td colspan="2" id="anchorlistcontainer"><select id="anchorlist"><option value=""></option></select></td> |
| 46 | </tr> | 45 | </tr> |
| 47 | <tr> | 46 | <tr> |
| 48 | <td><label id="targetlistlabel" for="targetlist">{#advlink_dlg.target}</label></td> | 47 | <td><label id="targetlistlabel" for="targetlist">{#advlink_dlg.target}</label></td> |
| 49 | <td id="targetlistcontainer"> </td> | 48 | <td id="targetlistcontainer"><select id="targetlist"><option value=""></option></select></td> |
| 50 | </tr> | 49 | </tr> |
| 51 | <tr> | 50 | <tr> |
| 52 | <td nowrap="nowrap"><label id="titlelabel" for="title">{#advlink_dlg.titlefield}</label></td> | 51 | <td class="nowrap"><label id="titlelabel" for="title">{#advlink_dlg.titlefield}</label></td> |
| 53 | <td><input id="title" name="title" type="text" value="" /></td> | 52 | <td><input id="title" name="title" type="text" value="" /></td> |
| 54 | </tr> | 53 | </tr> |
| 55 | <tr> | 54 | <tr> |
| 56 | <td><label id="classlabel" for="classlist">{#class_name}</label></td> | 55 | <td><label id="classlabel" for="classlist">{#class_name}</label></td> |
| 57 | <td> | 56 | <td> |
| 58 | <select id="classlist" name="classlist" onchange="changeClass();"> | 57 | <select id="classlist" name="classlist" onchange="changeClass();"> |
| 59 | <option value="" selected>{#not_set}</option> | 58 | <option value="" selected="selected">{#not_set}</option> |
| 60 | </select> | 59 | </select> |
| 61 | </td> | 60 | </td> |
| 62 | </tr> | 61 | </tr> |
| @@ -73,7 +72,7 @@ | |||
| 73 | 72 | ||
| 74 | <table border="0" cellpadding="0" cellspacing="4"> | 73 | <table border="0" cellpadding="0" cellspacing="4"> |
| 75 | <tr> | 74 | <tr> |
| 76 | <td nowrap="nowrap"><label for="popupurl">{#advlink_dlg.popup_url}</label> </td> | 75 | <td class="nowrap"><label for="popupurl">{#advlink_dlg.popup_url}</label> </td> |
| 77 | <td> | 76 | <td> |
| 78 | <table border="0" cellspacing="0" cellpadding="0"> | 77 | <table border="0" cellspacing="0" cellpadding="0"> |
| 79 | <tr> | 78 | <tr> |
| @@ -84,19 +83,19 @@ | |||
| 84 | </td> | 83 | </td> |
| 85 | </tr> | 84 | </tr> |
| 86 | <tr> | 85 | <tr> |
| 87 | <td nowrap="nowrap"><label for="popupname">{#advlink_dlg.popup_name}</label> </td> | 86 | <td class="nowrap"><label for="popupname">{#advlink_dlg.popup_name}</label> </td> |
| 88 | <td><input type="text" name="popupname" id="popupname" value="" onchange="buildOnClick();" /></td> | 87 | <td><input type="text" name="popupname" id="popupname" value="" onchange="buildOnClick();" /></td> |
| 89 | </tr> | 88 | </tr> |
| 90 | <tr> | 89 | <tr> |
| 91 | <td nowrap="nowrap"><label>{#advlink_dlg.popup_size}</label> </td> | 90 | <td class="nowrap"><label>{#advlink_dlg.popup_size}</label> </td> |
| 92 | <td nowrap="nowrap"> | 91 | <td class="nowrap"> |
| 93 | <input type="text" id="popupwidth" name="popupwidth" value="" onchange="buildOnClick();" /> x | 92 | <input type="text" id="popupwidth" name="popupwidth" value="" onchange="buildOnClick();" /> x |
| 94 | <input type="text" id="popupheight" name="popupheight" value="" onchange="buildOnClick();" /> px | 93 | <input type="text" id="popupheight" name="popupheight" value="" onchange="buildOnClick();" /> px |
| 95 | </td> | 94 | </td> |
| 96 | </tr> | 95 | </tr> |
| 97 | <tr> | 96 | <tr> |
| 98 | <td nowrap="nowrap" id="labelleft"><label>{#advlink_dlg.popup_position}</label> </td> | 97 | <td class="nowrap" id="labelleft"><label>{#advlink_dlg.popup_position}</label> </td> |
| 99 | <td nowrap="nowrap"> | 98 | <td class="nowrap"> |
| 100 | <input type="text" id="popupleft" name="popupleft" value="" onchange="buildOnClick();" /> / | 99 | <input type="text" id="popupleft" name="popupleft" value="" onchange="buildOnClick();" /> / |
| 101 | <input type="text" id="popuptop" name="popuptop" value="" onchange="buildOnClick();" /> (c /c = center) | 100 | <input type="text" id="popuptop" name="popuptop" value="" onchange="buildOnClick();" /> (c /c = center) |
| 102 | </td> | 101 | </td> |
| @@ -109,27 +108,27 @@ | |||
| 109 | <table border="0" cellpadding="0" cellspacing="4"> | 108 | <table border="0" cellpadding="0" cellspacing="4"> |
| 110 | <tr> | 109 | <tr> |
| 111 | <td><input type="checkbox" id="popuplocation" name="popuplocation" class="checkbox" onchange="buildOnClick();" /></td> | 110 | <td><input type="checkbox" id="popuplocation" name="popuplocation" class="checkbox" onchange="buildOnClick();" /></td> |
| 112 | <td nowrap="nowrap"><label id="popuplocationlabel" for="popuplocation">{#advlink_dlg.popup_location}</label></td> | 111 | <td class="nowrap"><label id="popuplocationlabel" for="popuplocation">{#advlink_dlg.popup_location}</label></td> |
| 113 | <td><input type="checkbox" id="popupscrollbars" name="popupscrollbars" class="checkbox" onchange="buildOnClick();" /></td> | 112 | <td><input type="checkbox" id="popupscrollbars" name="popupscrollbars" class="checkbox" onchange="buildOnClick();" /></td> |
| 114 | <td nowrap="nowrap"><label id="popupscrollbarslabel" for="popupscrollbars">{#advlink_dlg.popup_scrollbars}</label></td> | 113 | <td class="nowrap"><label id="popupscrollbarslabel" for="popupscrollbars">{#advlink_dlg.popup_scrollbars}</label></td> |
| 115 | </tr> | 114 | </tr> |
| 116 | <tr> | 115 | <tr> |
| 117 | <td><input type="checkbox" id="popupmenubar" name="popupmenubar" class="checkbox" onchange="buildOnClick();" /></td> | 116 | <td><input type="checkbox" id="popupmenubar" name="popupmenubar" class="checkbox" onchange="buildOnClick();" /></td> |
| 118 | <td nowrap="nowrap"><label id="popupmenubarlabel" for="popupmenubar">{#advlink_dlg.popup_menubar}</label></td> | 117 | <td class="nowrap"><label id="popupmenubarlabel" for="popupmenubar">{#advlink_dlg.popup_menubar}</label></td> |
| 119 | <td><input type="checkbox" id="popupresizable" name="popupresizable" class="checkbox" onchange="buildOnClick();" /></td> | 118 | <td><input type="checkbox" id="popupresizable" name="popupresizable" class="checkbox" onchange="buildOnClick();" /></td> |
| 120 | <td nowrap="nowrap"><label id="popupresizablelabel" for="popupresizable">{#advlink_dlg.popup_resizable}</label></td> | 119 | <td class="nowrap"><label id="popupresizablelabel" for="popupresizable">{#advlink_dlg.popup_resizable}</label></td> |
| 121 | </tr> | 120 | </tr> |
| 122 | <tr> | 121 | <tr> |
| 123 | <td><input type="checkbox" id="popuptoolbar" name="popuptoolbar" class="checkbox" onchange="buildOnClick();" /></td> | 122 | <td><input type="checkbox" id="popuptoolbar" name="popuptoolbar" class="checkbox" onchange="buildOnClick();" /></td> |
| 124 | <td nowrap="nowrap"><label id="popuptoolbarlabel" for="popuptoolbar">{#advlink_dlg.popup_toolbar}</label></td> | 123 | <td class="nowrap"><label id="popuptoolbarlabel" for="popuptoolbar">{#advlink_dlg.popup_toolbar}</label></td> |
| 125 | <td><input type="checkbox" id="popupdependent" name="popupdependent" class="checkbox" onchange="buildOnClick();" /></td> | 124 | <td><input type="checkbox" id="popupdependent" name="popupdependent" class="checkbox" onchange="buildOnClick();" /></td> |
| 126 | <td nowrap="nowrap"><label id="popupdependentlabel" for="popupdependent">{#advlink_dlg.popup_dependent}</label></td> | 125 | <td class="nowrap"><label id="popupdependentlabel" for="popupdependent">{#advlink_dlg.popup_dependent}</label></td> |
| 127 | </tr> | 126 | </tr> |
| 128 | <tr> | 127 | <tr> |
| 129 | <td><input type="checkbox" id="popupstatus" name="popupstatus" class="checkbox" onchange="buildOnClick();" /></td> | 128 | <td><input type="checkbox" id="popupstatus" name="popupstatus" class="checkbox" onchange="buildOnClick();" /></td> |
| 130 | <td nowrap="nowrap"><label id="popupstatuslabel" for="popupstatus">{#advlink_dlg.popup_statusbar}</label></td> | 129 | <td class="nowrap"><label id="popupstatuslabel" for="popupstatus">{#advlink_dlg.popup_statusbar}</label></td> |
| 131 | <td><input type="checkbox" id="popupreturn" name="popupreturn" class="checkbox" onchange="buildOnClick();" checked="checked" /></td> | 130 | <td><input type="checkbox" id="popupreturn" name="popupreturn" class="checkbox" onchange="buildOnClick();" checked="checked" /></td> |
| 132 | <td nowrap="nowrap"><label id="popupreturnlabel" for="popupreturn">{#advlink_dlg.popup_return}</label></td> | 131 | <td class="nowrap"><label id="popupreturnlabel" for="popupreturn">{#advlink_dlg.popup_return}</label></td> |
| 133 | </tr> | 132 | </tr> |
| 134 | </table> | 133 | </table> |
| 135 | </fieldset> | 134 | </fieldset> |
diff --git a/public/javascripts/tiny_mce/plugins/autoresize/editor_plugin.js b/public/javascripts/tiny_mce/plugins/autoresize/editor_plugin.js new file mode 100644 index 0000000..220b84a --- /dev/null +++ b/public/javascripts/tiny_mce/plugins/autoresize/editor_plugin.js | |||
| @@ -0,0 +1 @@ | |||
| (function(){tinymce.create("tinymce.plugins.AutoResizePlugin",{init:function(a,c){var d=this;if(a.getParam("fullscreen_is_enabled")){return}function b(){var h=a.getDoc(),e=h.body,j=h.documentElement,g=tinymce.DOM,i=d.autoresize_min_height,f;f=tinymce.isIE?e.scrollHeight:j.offsetHeight;if(f>d.autoresize_min_height){i=f}g.setStyle(g.get(a.id+"_ifr"),"height",i+"px");if(d.throbbing){a.setProgressState(false);a.setProgressState(true)}}d.editor=a;d.autoresize_min_height=a.getElement().offsetHeight;a.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 new file mode 100644 index 0000000..89a9b89 --- /dev/null +++ b/public/javascripts/tiny_mce/plugins/autoresize/editor_plugin_src.js | |||
| @@ -0,0 +1,114 @@ | |||
| 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 index 01a994e..091a063 100755..100644 --- a/public/javascripts/tiny_mce/plugins/autosave/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/autosave/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.create('tinymce.plugins.AutoSavePlugin',{init:function(ed,url){var t=this;t.editor=ed;window.onbeforeunload=tinymce.plugins.AutoSavePlugin._beforeUnloadHandler;},getInfo:function(){return{longname:'Auto save',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave',version:tinymce.majorVersion+"."+tinymce.minorVersion};},'static':{_beforeUnloadHandler:function(){var msg;tinymce.each(tinyMCE.editors,function(ed){if(ed.getParam("fullscreen_is_enabled"))return;if(ed.isDirty()){msg=ed.getLang("autosave.unload_msg");return false;}});return msg;}}});tinymce.PluginManager.add('autosave',tinymce.plugins.AutoSavePlugin);})(); \ No newline at end of file | (function(){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 index 3c4325a..3c4325a 100755..100644 --- a/public/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/bbcode/editor_plugin.js b/public/javascripts/tiny_mce/plugins/bbcode/editor_plugin.js index 88f7ea6..930fdff 100755..100644 --- a/public/javascripts/tiny_mce/plugins/bbcode/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/bbcode/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.create('tinymce.plugins.BBCodePlugin',{init:function(ed,url){var t=this,dialect=ed.getParam('bbcode_dialect','punbb').toLowerCase();ed.onBeforeSetContent.add(function(ed,o){o.content=t['_'+dialect+'_bbcode2html'](o.content);});ed.onPostProcess.add(function(ed,o){if(o.set)o.content=t['_'+dialect+'_bbcode2html'](o.content);if(o.get)o.content=t['_'+dialect+'_html2bbcode'](o.content);});},getInfo:function(){return{longname:'BBCode Plugin',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_punbb_html2bbcode:function(s){s=tinymce.trim(s);function rep(re,str){s=s.replace(re,str);};rep(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]");rep(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");rep(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");rep(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");rep(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");rep(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]");rep(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]");rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");rep(/<font>(.*?)<\/font>/gi,"$1");rep(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");rep(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]");rep(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]");rep(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");rep(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");rep(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");rep(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");rep(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");rep(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");rep(/<\/(strong|b)>/gi,"[/b]");rep(/<(strong|b)>/gi,"[b]");rep(/<\/(em|i)>/gi,"[/i]");rep(/<(em|i)>/gi,"[i]");rep(/<\/u>/gi,"[/u]");rep(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]");rep(/<u>/gi,"[u]");rep(/<blockquote[^>]*>/gi,"[quote]");rep(/<\/blockquote>/gi,"[/quote]");rep(/<br \/>/gi,"\n");rep(/<br\/>/gi,"\n");rep(/<br>/gi,"\n");rep(/<p>/gi,"");rep(/<\/p>/gi,"\n");rep(/ /gi," ");rep(/"/gi,"\"");rep(/</gi,"<");rep(/>/gi,">");rep(/&/gi,"&");return s;},_punbb_bbcode2html:function(s){s=tinymce.trim(s);function rep(re,str){s=s.replace(re,str);};rep(/\n/gi,"<br />");rep(/\[b\]/gi,"<strong>");rep(/\[\/b\]/gi,"</strong>");rep(/\[i\]/gi,"<em>");rep(/\[\/i\]/gi,"</em>");rep(/\[u\]/gi,"<u>");rep(/\[\/u\]/gi,"</u>");rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"<a href=\"$1\">$2</a>");rep(/\[url\](.*?)\[\/url\]/gi,"<a href=\"$1\">$1</a>");rep(/\[img\](.*?)\[\/img\]/gi,"<img src=\"$1\" />");rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"<font color=\"$1\">$2</font>");rep(/\[code\](.*?)\[\/code\]/gi,"<span class=\"codeStyle\">$1</span> ");rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"<span class=\"quoteStyle\">$1</span> ");return s;}});tinymce.PluginManager.add('bbcode',tinymce.plugins.BBCodePlugin);})(); \ No newline at end of file | (function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a,b){var d=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.onBeforeSetContent.add(function(e,f){f.content=d["_"+c+"_bbcode2html"](f.content)});a.onPostProcess.add(function(e,f){if(f.set){f.content=d["_"+c+"_bbcode2html"](f.content)}if(f.get){f.content=d["_"+c+"_html2bbcode"](f.content)}})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_punbb_html2bbcode:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/<a.*?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 index 1d7493e..1d7493e 100755..100644 --- a/public/javascripts/tiny_mce/plugins/bbcode/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/bbcode/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/compat2x/editor_plugin.js b/public/javascripts/tiny_mce/plugins/compat2x/editor_plugin.js deleted file mode 100755 index 02a1da8..0000000 --- a/public/javascripts/tiny_mce/plugins/compat2x/editor_plugin.js +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (function(){var DOM=tinymce.DOM,Event=tinymce.dom.Event,each=tinymce.each,is=tinymce.is;tinymce.create('tinymce.plugins.Compat2x',{getInfo:function(){return{longname:'Compat2x',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/compat2x',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};}});(function(){tinymce.extend(tinyMCE,{addToLang:function(p,l){each(l,function(v,k){tinyMCE.i18n[(tinyMCE.settings.language||'en')+'.'+(p?p+'_':'')+k]=v;});},getInstanceById:function(n){return this.get(n);}});})();(function(){var EditorManager=tinymce.EditorManager;tinyMCE.instances={};tinyMCE.plugins={};tinymce.PluginManager.onAdd.add(function(pm,n,p){tinyMCE.plugins[n]=p;});tinyMCE.majorVersion=tinymce.majorVersion;tinyMCE.minorVersion=tinymce.minorVersion;tinyMCE.releaseDate=tinymce.releaseDate;tinyMCE.baseURL=tinymce.baseURL;tinyMCE.isIE=tinyMCE.isMSIE=tinymce.isIE||tinymce.isOpera;tinyMCE.isMSIE5=tinymce.isIE;tinyMCE.isMSIE5_0=tinymce.isIE;tinyMCE.isMSIE7=tinymce.isIE;tinyMCE.isGecko=tinymce.isGecko;tinyMCE.isSafari=tinymce.isWebKit;tinyMCE.isOpera=tinymce.isOpera;tinyMCE.isMac=false;tinyMCE.isNS7=false;tinyMCE.isNS71=false;tinyMCE.compat=true;TinyMCE_Engine=tinyMCE;tinymce.extend(tinyMCE,{getParam:function(n,dv){return this.activeEditor.getParam(n,dv);},addEvent:function(e,na,f,sc){tinymce.dom.Event.add(e,na,f,sc||this);},getControlHTML:function(n){return EditorManager.activeEditor.controlManager.createControl(n);},loadCSS:function(u){tinymce.DOM.loadCSS(u);},importCSS:function(doc,u){if(doc==document)this.loadCSS(u);else new tinymce.dom.DOMUtils(doc).loadCSS(u);},log:function(){console.debug.apply(console,arguments);},getLang:function(n,dv){var v=EditorManager.activeEditor.getLang(n.replace(/^lang_/g,''),dv);if(/^[0-9\-.]+$/g.test(v))return parseInt(v);return v;},isInstance:function(o){return o!=null&&typeof(o)=="object"&&o.execCommand;},triggerNodeChange:function(){EditorManager.activeEditor.nodeChanged();},regexpReplace:function(in_str,reg_exp,replace_str,opts){var re;if(in_str==null)return in_str;if(typeof(opts)=="undefined")opts='g';re=new RegExp(reg_exp,opts);return in_str.replace(re,replace_str);},trim:function(s){return tinymce.trim(s);},xmlEncode:function(s){return tinymce.DOM.encode(s);},explode:function(s,d){var o=[];tinymce.each(s.split(d),function(v){if(v!='')o.push(v);});return o;},switchClass:function(id,cls){var b;if(/^mceButton/.test(cls)){b=EditorManager.activeEditor.controlManager.get(id);if(!b)return;switch(cls){case"mceButtonNormal":b.setDisabled(false);b.setActive(false);return;case"mceButtonDisabled":b.setDisabled(true);return;case"mceButtonSelected":b.setActive(true);b.setDisabled(false);return;}}},addCSSClass:function(e,n,b){return tinymce.DOM.addClass(e,n,b);},hasCSSClass:function(e,n){return tinymce.DOM.hasClass(e,n);},removeCSSClass:function(e,n){return tinymce.DOM.removeClass(e,n);},getCSSClasses:function(){var cl=EditorManager.activeEditor.dom.getClasses(),o=[];each(cl,function(c){o.push(c['class']);});return o;},setWindowArg:function(n,v){EditorManager.activeEditor.windowManager.params[n]=v;},getWindowArg:function(n,dv){var wm=EditorManager.activeEditor.windowManager,v;v=wm.getParam(n);if(v==='')return'';return v||wm.getFeature(n)||dv;},getParentNode:function(n,f){return this._getDOM().getParent(n,f);},selectElements:function(n,na,f){var i,a=[],nl,x;for(x=0,na=na.split(',');x<na.length;x++)for(i=0,nl=n.getElementsByTagName(na[x]);i<nl.length;i++)(!f||f(nl[i]))&&a.push(nl[i]);return a;},getNodeTree:function(n,na,t,nn){return this.selectNodes(n,function(n){return(!t||n.nodeType==t)&&(!nn||n.nodeName==nn);},na?na:[]);},getAttrib:function(e,n,dv){return this._getDOM().getAttrib(e,n,dv);},setAttrib:function(e,n,v){return this._getDOM().setAttrib(e,n,v);},getElementsByAttributeValue:function(n,e,a,v){var i,nl=n.getElementsByTagName(e),o=[];for(i=0;i<nl.length;i++){if(tinyMCE.getAttrib(nl[i],a).indexOf(v)!=-1)o[o.length]=nl[i];}return o;},selectNodes:function(n,f,a){var i;if(!a)a=[];if(f(n))a[a.length]=n;if(n.hasChildNodes()){for(i=0;i<n.childNodes.length;i++)tinyMCE.selectNodes(n.childNodes[i],f,a);}return a;},getContent:function(){return EditorManager.activeEditor.getContent();},getParentElement:function(n,na,f){if(na)na=new RegExp('^('+na.toUpperCase().replace(/,/g,'|')+')$','g');return this._getDOM().getParent(n,function(n){return n.nodeType==1&&(!na||na.test(n.nodeName))&&(!f||f(n));},this.activeEditor.getBody());},importPluginLanguagePack:function(n){tinymce.PluginManager.requireLangPack(n);},getButtonHTML:function(cn,lang,img,c,u,v){var ed=EditorManager.activeEditor;img=img.replace(/\{\$pluginurl\}/g,tinyMCE.pluginURL);img=img.replace(/\{\$themeurl\}/g,tinyMCE.themeURL);lang=lang.replace(/^lang_/g,'');return ed.controlManager.createButton(cn,{title:lang,command:c,ui:u,value:v,scope:this,'class':'compat',image:img});},addSelectAccessibility:function(e,s,w){if(!s._isAccessible){s.onkeydown=tinyMCE.accessibleEventHandler;s.onblur=tinyMCE.accessibleEventHandler;s._isAccessible=true;s._win=w;}return false;},accessibleEventHandler:function(e){var elm,win=this._win;e=tinymce.isIE?win.event:e;elm=tinymce.isIE?e.srcElement:e.target;if(e.type=="blur"){if(elm.oldonchange){elm.onchange=elm.oldonchange;elm.oldonchange=null;}return true;}if(elm.nodeName=="SELECT"&&!elm.oldonchange){elm.oldonchange=elm.onchange;elm.onchange=null;}if(e.keyCode==13||e.keyCode==32){elm.onchange=elm.oldonchange;elm.onchange();elm.oldonchange=null;tinyMCE.cancelEvent(e);return false;}return true;},cancelEvent:function(e){return tinymce.dom.Event.cancel(e);},handleVisualAid:function(e){EditorManager.activeEditor.addVisual(e);},getAbsPosition:function(n,r){return tinymce.DOM.getPos(n,r);},cleanupEventStr:function(s){s=""+s;s=s.replace('function anonymous()\n{\n','');s=s.replace('\n}','');s=s.replace(/^return true;/gi,'');return s;},getVisualAidClass:function(s){return s;},parseStyle:function(s){return this._getDOM().parseStyle(s);},serializeStyle:function(s){return this._getDOM().serializeStyle(s);},openWindow:function(tpl,args){var ed=EditorManager.activeEditor,o={},n;for(n in tpl)o[n]=tpl[n];tpl=o;args=args||{};tpl.url=new tinymce.util.URI(tinymce.ThemeManager.themeURLs[ed.settings.theme]).toAbsolute(tpl.file);tpl.inline=tpl.inline||args.inline;ed.windowManager.open(tpl,args);},closeWindow:function(win){EditorManager.activeEditor.windowManager.close(win);},getOuterHTML:function(e){return tinymce.DOM.getOuterHTML(e);},setOuterHTML:function(e,h,d){return tinymce.DOM.setOuterHTML(e,h,d);},hasPlugin:function(n){return tinymce.PluginManager.get(n)!=null;},_setEventsEnabled:function(){},addPlugin:function(pn,f){var t=this;function PluginWrapper(ed){tinyMCE.selectedInstance=ed;ed.onInit.add(function(){t.settings=ed.settings;t.settings['base_href']=tinyMCE.documentBasePath;tinyMCE.settings=t.settings;tinyMCE.documentBasePath=ed.documentBasePath;if(f.initInstance)f.initInstance(ed);ed.contentDocument=ed.getDoc();ed.contentWindow=ed.getWin();ed.undoRedo=ed.undoManager;ed.startContent=ed.getContent({format:'raw'});tinyMCE.instances[ed.id]=ed;tinyMCE.loadedFiles=[];});ed.onActivate.add(function(){tinyMCE.settings=ed.settings;tinyMCE.selectedInstance=ed;});if(f.handleNodeChange){ed.onNodeChange.add(function(ed,cm,n){f.handleNodeChange(ed.id,n,0,0,false,!ed.selection.isCollapsed());});}if(f.onChange){ed.onChange.add(function(ed,n){return f.onChange(ed);});}if(f.cleanup){ed.onGetContent.add(function(){});}this.getInfo=function(){return f.getInfo();};this.createControl=function(n){tinyMCE.pluginURL=tinymce.baseURL+'/plugins/'+pn;tinyMCE.themeURL=tinymce.baseURL+'/themes/'+tinyMCE.activeEditor.settings.theme;if(f.getControlHTML)return f.getControlHTML(n);return null;};this.execCommand=function(cmd,ui,val){if(f.execCommand)return f.execCommand(ed.id,ed.getBody(),cmd,ui,val);return false;};};tinymce.PluginManager.add(pn,PluginWrapper);},_getDOM:function(){return tinyMCE.activeEditor?tinyMCE.activeEditor.dom:tinymce.DOM;},convertRelativeToAbsoluteURL:function(b,u){return new tinymce.util.URI(b).toAbsolute(u);},convertAbsoluteURLToRelativeURL:function(b,u){return new tinymce.util.URI(b).toRelative(u);}});tinymce.extend(tinymce.Editor.prototype,{getFocusElement:function(){return this.selection.getNode();},getData:function(n){if(!this.data)this.data=[];if(!this.data[n])this.data[n]=[];return this.data[n];},hasPlugin:function(n){return this.plugins[n]!=null;},getContainerWin:function(){return window;},getHTML:function(raw){return this.getContent({format:raw?'raw':'html'});},setHTML:function(h){this.setContent(h);},getSel:function(){return this.selection.getSel();},getRng:function(){return this.selection.getRng();},isHidden:function(){var s;if(!tinymce.isGecko)return false;s=this.getSel();return(!s||!s.rangeCount||s.rangeCount==0);},translate:function(s){var c=this.settings.language,o;if(!s)return s;o=tinymce.EditorManager.i18n[c+'.'+s]||s.replace(/{\#([^}]+)\}/g,function(a,b){return tinymce.EditorManager.i18n[c+'.'+b]||'{#'+b+'}';});o=o.replace(/{\$lang_([^}]+)\}/g,function(a,b){return tinymce.EditorManager.i18n[c+'.'+b]||'{$lang_'+b+'}';});return o;},repaint:function(){this.execCommand('mceRepaint');}});tinymce.extend(tinymce.dom.Selection.prototype,{getSelectedText:function(){return this.getContent({format:'text'});},getSelectedHTML:function(){return this.getContent({format:'html'});},getFocusElement:function(){return this.getNode();},selectNode:function(node,collapse,select_text_node,to_start){var t=this;t.select(node,select_text_node||0);if(!is(collapse))collapse=true;if(collapse){if(!is(to_start))to_start=true;t.collapse(to_start);}}});}).call(this);tinymce.PluginManager.add('compat2x',tinymce.plugins.Compat2x);})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/compat2x/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/compat2x/editor_plugin_src.js deleted file mode 100755 index 60d4f2d..0000000 --- a/public/javascripts/tiny_mce/plugins/compat2x/editor_plugin_src.js +++ /dev/null | |||
| @@ -1,616 +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 DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, is = tinymce.is; | ||
| 10 | |||
| 11 | tinymce.create('tinymce.plugins.Compat2x', { | ||
| 12 | getInfo : function() { | ||
| 13 | return { | ||
| 14 | longname : 'Compat2x', | ||
| 15 | author : 'Moxiecode Systems AB', | ||
| 16 | authorurl : 'http://tinymce.moxiecode.com', | ||
| 17 | infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/compat2x', | ||
| 18 | version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion | ||
| 19 | }; | ||
| 20 | } | ||
| 21 | }); | ||
| 22 | |||
| 23 | (function() { | ||
| 24 | // Extend tinyMCE/EditorManager | ||
| 25 | tinymce.extend(tinyMCE, { | ||
| 26 | addToLang : function(p, l) { | ||
| 27 | each(l, function(v, k) { | ||
| 28 | tinyMCE.i18n[(tinyMCE.settings.language || 'en') + '.' + (p ? p + '_' : '') + k] = v; | ||
| 29 | }); | ||
| 30 | }, | ||
| 31 | |||
| 32 | getInstanceById : function(n) { | ||
| 33 | return this.get(n); | ||
| 34 | } | ||
| 35 | }); | ||
| 36 | })(); | ||
| 37 | |||
| 38 | (function() { | ||
| 39 | var EditorManager = tinymce.EditorManager; | ||
| 40 | |||
| 41 | tinyMCE.instances = {}; | ||
| 42 | tinyMCE.plugins = {}; | ||
| 43 | tinymce.PluginManager.onAdd.add(function(pm, n, p) { | ||
| 44 | tinyMCE.plugins[n] = p; | ||
| 45 | }); | ||
| 46 | |||
| 47 | tinyMCE.majorVersion = tinymce.majorVersion; | ||
| 48 | tinyMCE.minorVersion = tinymce.minorVersion; | ||
| 49 | tinyMCE.releaseDate = tinymce.releaseDate; | ||
| 50 | tinyMCE.baseURL = tinymce.baseURL; | ||
| 51 | tinyMCE.isIE = tinyMCE.isMSIE = tinymce.isIE || tinymce.isOpera; | ||
| 52 | tinyMCE.isMSIE5 = tinymce.isIE; | ||
| 53 | tinyMCE.isMSIE5_0 = tinymce.isIE; | ||
| 54 | tinyMCE.isMSIE7 = tinymce.isIE; | ||
| 55 | tinyMCE.isGecko = tinymce.isGecko; | ||
| 56 | tinyMCE.isSafari = tinymce.isWebKit; | ||
| 57 | tinyMCE.isOpera = tinymce.isOpera; | ||
| 58 | tinyMCE.isMac = false; | ||
| 59 | tinyMCE.isNS7 = false; | ||
| 60 | tinyMCE.isNS71 = false; | ||
| 61 | tinyMCE.compat = true; | ||
| 62 | |||
| 63 | // Extend tinyMCE class | ||
| 64 | TinyMCE_Engine = tinyMCE; | ||
| 65 | tinymce.extend(tinyMCE, { | ||
| 66 | getParam : function(n, dv) { | ||
| 67 | return this.activeEditor.getParam(n, dv); | ||
| 68 | }, | ||
| 69 | |||
| 70 | addEvent : function(e, na, f, sc) { | ||
| 71 | tinymce.dom.Event.add(e, na, f, sc || this); | ||
| 72 | }, | ||
| 73 | |||
| 74 | getControlHTML : function(n) { | ||
| 75 | return EditorManager.activeEditor.controlManager.createControl(n); | ||
| 76 | }, | ||
| 77 | |||
| 78 | loadCSS : function(u) { | ||
| 79 | tinymce.DOM.loadCSS(u); | ||
| 80 | }, | ||
| 81 | |||
| 82 | importCSS : function(doc, u) { | ||
| 83 | if (doc == document) | ||
| 84 | this.loadCSS(u); | ||
| 85 | else | ||
| 86 | new tinymce.dom.DOMUtils(doc).loadCSS(u); | ||
| 87 | }, | ||
| 88 | |||
| 89 | log : function() { | ||
| 90 | console.debug.apply(console, arguments); | ||
| 91 | }, | ||
| 92 | |||
| 93 | getLang : function(n, dv) { | ||
| 94 | var v = EditorManager.activeEditor.getLang(n.replace(/^lang_/g, ''), dv); | ||
| 95 | |||
| 96 | // Is number | ||
| 97 | if (/^[0-9\-.]+$/g.test(v)) | ||
| 98 | return parseInt(v); | ||
| 99 | |||
| 100 | return v; | ||
| 101 | }, | ||
| 102 | |||
| 103 | isInstance : function(o) { | ||
| 104 | return o != null && typeof(o) == "object" && o.execCommand; | ||
| 105 | }, | ||
| 106 | |||
| 107 | triggerNodeChange : function() { | ||
| 108 | EditorManager.activeEditor.nodeChanged(); | ||
| 109 | }, | ||
| 110 | |||
| 111 | regexpReplace : function(in_str, reg_exp, replace_str, opts) { | ||
| 112 | var re; | ||
| 113 | |||
| 114 | if (in_str == null) | ||
| 115 | return in_str; | ||
| 116 | |||
| 117 | if (typeof(opts) == "undefined") | ||
| 118 | opts = 'g'; | ||
| 119 | |||
| 120 | re = new RegExp(reg_exp, opts); | ||
| 121 | |||
| 122 | return in_str.replace(re, replace_str); | ||
| 123 | }, | ||
| 124 | |||
| 125 | trim : function(s) { | ||
| 126 | return tinymce.trim(s); | ||
| 127 | }, | ||
| 128 | |||
| 129 | xmlEncode : function(s) { | ||
| 130 | return tinymce.DOM.encode(s); | ||
| 131 | }, | ||
| 132 | |||
| 133 | explode : function(s, d) { | ||
| 134 | var o = []; | ||
| 135 | |||
| 136 | tinymce.each(s.split(d), function(v) { | ||
| 137 | if (v != '') | ||
| 138 | o.push(v); | ||
| 139 | }); | ||
| 140 | |||
| 141 | return o; | ||
| 142 | }, | ||
| 143 | |||
| 144 | switchClass : function(id, cls) { | ||
| 145 | var b; | ||
| 146 | |||
| 147 | if (/^mceButton/.test(cls)) { | ||
| 148 | b = EditorManager.activeEditor.controlManager.get(id); | ||
| 149 | |||
| 150 | if (!b) | ||
| 151 | return; | ||
| 152 | |||
| 153 | switch (cls) { | ||
| 154 | case "mceButtonNormal": | ||
| 155 | b.setDisabled(false); | ||
| 156 | b.setActive(false); | ||
| 157 | return; | ||
| 158 | |||
| 159 | case "mceButtonDisabled": | ||
| 160 | b.setDisabled(true); | ||
| 161 | return; | ||
| 162 | |||
| 163 | case "mceButtonSelected": | ||
| 164 | b.setActive(true); | ||
| 165 | b.setDisabled(false); | ||
| 166 | return; | ||
| 167 | } | ||
| 168 | } | ||
| 169 | }, | ||
| 170 | |||
| 171 | addCSSClass : function(e, n, b) { | ||
| 172 | return tinymce.DOM.addClass(e, n, b); | ||
| 173 | }, | ||
| 174 | |||
| 175 | hasCSSClass : function(e, n) { | ||
| 176 | return tinymce.DOM.hasClass(e, n); | ||
| 177 | }, | ||
| 178 | |||
| 179 | removeCSSClass : function(e, n) { | ||
| 180 | return tinymce.DOM.removeClass(e, n); | ||
| 181 | }, | ||
| 182 | |||
| 183 | getCSSClasses : function() { | ||
| 184 | var cl = EditorManager.activeEditor.dom.getClasses(), o = []; | ||
| 185 | |||
| 186 | each(cl, function(c) { | ||
| 187 | o.push(c['class']); | ||
| 188 | }); | ||
| 189 | |||
| 190 | return o; | ||
| 191 | }, | ||
| 192 | |||
| 193 | setWindowArg : function(n, v) { | ||
| 194 | EditorManager.activeEditor.windowManager.params[n] = v; | ||
| 195 | }, | ||
| 196 | |||
| 197 | getWindowArg : function(n, dv) { | ||
| 198 | var wm = EditorManager.activeEditor.windowManager, v; | ||
| 199 | |||
| 200 | v = wm.getParam(n); | ||
| 201 | if (v === '') | ||
| 202 | return ''; | ||
| 203 | |||
| 204 | return v || wm.getFeature(n) || dv; | ||
| 205 | }, | ||
| 206 | |||
| 207 | getParentNode : function(n, f) { | ||
| 208 | return this._getDOM().getParent(n, f); | ||
| 209 | }, | ||
| 210 | |||
| 211 | selectElements : function(n, na, f) { | ||
| 212 | var i, a = [], nl, x; | ||
| 213 | |||
| 214 | for (x=0, na = na.split(','); x<na.length; x++) | ||
| 215 | for (i=0, nl = n.getElementsByTagName(na[x]); i<nl.length; i++) | ||
| 216 | (!f || f(nl[i])) && a.push(nl[i]); | ||
| 217 | |||
| 218 | return a; | ||
| 219 | }, | ||
| 220 | |||
| 221 | getNodeTree : function(n, na, t, nn) { | ||
| 222 | return this.selectNodes(n, function(n) { | ||
| 223 | return (!t || n.nodeType == t) && (!nn || n.nodeName == nn); | ||
| 224 | }, na ? na : []); | ||
| 225 | }, | ||
| 226 | |||
| 227 | getAttrib : function(e, n, dv) { | ||
| 228 | return this._getDOM().getAttrib(e, n, dv); | ||
| 229 | }, | ||
| 230 | |||
| 231 | setAttrib : function(e, n, v) { | ||
| 232 | return this._getDOM().setAttrib(e, n, v); | ||
| 233 | }, | ||
| 234 | |||
| 235 | getElementsByAttributeValue : function(n, e, a, v) { | ||
| 236 | var i, nl = n.getElementsByTagName(e), o = []; | ||
| 237 | |||
| 238 | for (i=0; i<nl.length; i++) { | ||
| 239 | if (tinyMCE.getAttrib(nl[i], a).indexOf(v) != -1) | ||
| 240 | o[o.length] = nl[i]; | ||
| 241 | } | ||
| 242 | |||
| 243 | return o; | ||
| 244 | }, | ||
| 245 | |||
| 246 | selectNodes : function(n, f, a) { | ||
| 247 | var i; | ||
| 248 | |||
| 249 | if (!a) | ||
| 250 | a = []; | ||
| 251 | |||
| 252 | if (f(n)) | ||
| 253 | a[a.length] = n; | ||
| 254 | |||
| 255 | if (n.hasChildNodes()) { | ||
| 256 | for (i=0; i<n.childNodes.length; i++) | ||
| 257 | tinyMCE.selectNodes(n.childNodes[i], f, a); | ||
| 258 | } | ||
| 259 | |||
| 260 | return a; | ||
| 261 | }, | ||
| 262 | |||
| 263 | getContent : function() { | ||
| 264 | return EditorManager.activeEditor.getContent(); | ||
| 265 | }, | ||
| 266 | |||
| 267 | getParentElement : function(n, na, f) { | ||
| 268 | if (na) | ||
| 269 | na = new RegExp('^(' + na.toUpperCase().replace(/,/g, '|') + ')$', 'g'); | ||
| 270 | |||
| 271 | return this._getDOM().getParent(n, function(n) { | ||
| 272 | return n.nodeType == 1 && (!na || na.test(n.nodeName)) && (!f || f(n)); | ||
| 273 | }, this.activeEditor.getBody()); | ||
| 274 | }, | ||
| 275 | |||
| 276 | importPluginLanguagePack : function(n) { | ||
| 277 | tinymce.PluginManager.requireLangPack(n); | ||
| 278 | }, | ||
| 279 | |||
| 280 | getButtonHTML : function(cn, lang, img, c, u, v) { | ||
| 281 | var ed = EditorManager.activeEditor; | ||
| 282 | |||
| 283 | img = img.replace(/\{\$pluginurl\}/g, tinyMCE.pluginURL); | ||
| 284 | img = img.replace(/\{\$themeurl\}/g, tinyMCE.themeURL); | ||
| 285 | lang = lang.replace(/^lang_/g, ''); | ||
| 286 | |||
| 287 | return ed.controlManager.createButton(cn, { | ||
| 288 | title : lang, | ||
| 289 | command : c, | ||
| 290 | ui : u, | ||
| 291 | value : v, | ||
| 292 | scope : this, | ||
| 293 | 'class' : 'compat', | ||
| 294 | image : img | ||
| 295 | }); | ||
| 296 | }, | ||
| 297 | |||
| 298 | addSelectAccessibility : function(e, s, w) { | ||
| 299 | // Add event handlers | ||
| 300 | if (!s._isAccessible) { | ||
| 301 | s.onkeydown = tinyMCE.accessibleEventHandler; | ||
| 302 | s.onblur = tinyMCE.accessibleEventHandler; | ||
| 303 | s._isAccessible = true; | ||
| 304 | s._win = w; | ||
| 305 | } | ||
| 306 | |||
| 307 | return false; | ||
| 308 | }, | ||
| 309 | |||
| 310 | accessibleEventHandler : function(e) { | ||
| 311 | var elm, win = this._win; | ||
| 312 | |||
| 313 | e = tinymce.isIE ? win.event : e; | ||
| 314 | elm = tinymce.isIE ? e.srcElement : e.target; | ||
| 315 | |||
| 316 | // Unpiggyback onchange on blur | ||
| 317 | if (e.type == "blur") { | ||
| 318 | if (elm.oldonchange) { | ||
| 319 | elm.onchange = elm.oldonchange; | ||
| 320 | elm.oldonchange = null; | ||
| 321 | } | ||
| 322 | |||
| 323 | return true; | ||
| 324 | } | ||
| 325 | |||
| 326 | // Piggyback onchange | ||
| 327 | if (elm.nodeName == "SELECT" && !elm.oldonchange) { | ||
| 328 | elm.oldonchange = elm.onchange; | ||
| 329 | elm.onchange = null; | ||
| 330 | } | ||
| 331 | |||
| 332 | // Execute onchange and remove piggyback | ||
| 333 | if (e.keyCode == 13 || e.keyCode == 32) { | ||
| 334 | elm.onchange = elm.oldonchange; | ||
| 335 | elm.onchange(); | ||
| 336 | elm.oldonchange = null; | ||
| 337 | |||
| 338 | tinyMCE.cancelEvent(e); | ||
| 339 | return false; | ||
| 340 | } | ||
| 341 | |||
| 342 | return true; | ||
| 343 | }, | ||
| 344 | |||
| 345 | cancelEvent : function(e) { | ||
| 346 | return tinymce.dom.Event.cancel(e); | ||
| 347 | }, | ||
| 348 | |||
| 349 | handleVisualAid : function(e) { | ||
| 350 | EditorManager.activeEditor.addVisual(e); | ||
| 351 | }, | ||
| 352 | |||
| 353 | getAbsPosition : function(n, r) { | ||
| 354 | return tinymce.DOM.getPos(n, r); | ||
| 355 | }, | ||
| 356 | |||
| 357 | cleanupEventStr : function(s) { | ||
| 358 | s = "" + s; | ||
| 359 | s = s.replace('function anonymous()\n{\n', ''); | ||
| 360 | s = s.replace('\n}', ''); | ||
| 361 | s = s.replace(/^return true;/gi, ''); // Remove event blocker | ||
| 362 | |||
| 363 | return s; | ||
| 364 | }, | ||
| 365 | |||
| 366 | getVisualAidClass : function(s) { | ||
| 367 | // TODO: Implement | ||
| 368 | return s; | ||
| 369 | }, | ||
| 370 | |||
| 371 | parseStyle : function(s) { | ||
| 372 | return this._getDOM().parseStyle(s); | ||
| 373 | }, | ||
| 374 | |||
| 375 | serializeStyle : function(s) { | ||
| 376 | return this._getDOM().serializeStyle(s); | ||
| 377 | }, | ||
| 378 | |||
| 379 | openWindow : function(tpl, args) { | ||
| 380 | var ed = EditorManager.activeEditor, o = {}, n; | ||
| 381 | |||
| 382 | // Convert name/value array to object | ||
| 383 | for (n in tpl) | ||
| 384 | o[n] = tpl[n]; | ||
| 385 | |||
| 386 | tpl = o; | ||
| 387 | |||
| 388 | args = args || {}; | ||
| 389 | tpl.url = new tinymce.util.URI(tinymce.ThemeManager.themeURLs[ed.settings.theme]).toAbsolute(tpl.file); | ||
| 390 | tpl.inline = tpl.inline || args.inline; | ||
| 391 | |||
| 392 | ed.windowManager.open(tpl, args); | ||
| 393 | }, | ||
| 394 | |||
| 395 | closeWindow : function(win) { | ||
| 396 | EditorManager.activeEditor.windowManager.close(win); | ||
| 397 | }, | ||
| 398 | |||
| 399 | getOuterHTML : function(e) { | ||
| 400 | return tinymce.DOM.getOuterHTML(e); | ||
| 401 | }, | ||
| 402 | |||
| 403 | setOuterHTML : function(e, h, d) { | ||
| 404 | return tinymce.DOM.setOuterHTML(e, h, d); | ||
| 405 | }, | ||
| 406 | |||
| 407 | hasPlugin : function(n) { | ||
| 408 | return tinymce.PluginManager.get(n) != null; | ||
| 409 | }, | ||
| 410 | |||
| 411 | _setEventsEnabled : function() { | ||
| 412 | // Ignore it!! | ||
| 413 | }, | ||
| 414 | |||
| 415 | addPlugin : function(pn, f) { | ||
| 416 | var t = this; | ||
| 417 | |||
| 418 | function PluginWrapper(ed) { | ||
| 419 | tinyMCE.selectedInstance = ed; | ||
| 420 | |||
| 421 | ed.onInit.add(function() { | ||
| 422 | t.settings = ed.settings; | ||
| 423 | t.settings['base_href'] = tinyMCE.documentBasePath; | ||
| 424 | tinyMCE.settings = t.settings; | ||
| 425 | tinyMCE.documentBasePath = ed.documentBasePath; | ||
| 426 | //ed.formElement = DOM.get(ed.id); | ||
| 427 | |||
| 428 | if (f.initInstance) | ||
| 429 | f.initInstance(ed); | ||
| 430 | |||
| 431 | ed.contentDocument = ed.getDoc(); | ||
| 432 | ed.contentWindow = ed.getWin(); | ||
| 433 | ed.undoRedo = ed.undoManager; | ||
| 434 | ed.startContent = ed.getContent({format : 'raw'}); | ||
| 435 | |||
| 436 | tinyMCE.instances[ed.id] = ed; | ||
| 437 | tinyMCE.loadedFiles = []; | ||
| 438 | }); | ||
| 439 | |||
| 440 | ed.onActivate.add(function() { | ||
| 441 | tinyMCE.settings = ed.settings; | ||
| 442 | tinyMCE.selectedInstance = ed; | ||
| 443 | }); | ||
| 444 | |||
| 445 | /* if (f.removeInstance) { | ||
| 446 | ed.onDestroy.add(function() { | ||
| 447 | return f.removeInstance(ed.id); | ||
| 448 | }); | ||
| 449 | }*/ | ||
| 450 | |||
| 451 | if (f.handleNodeChange) { | ||
| 452 | ed.onNodeChange.add(function(ed, cm, n) { | ||
| 453 | f.handleNodeChange(ed.id, n, 0, 0, false, !ed.selection.isCollapsed()); | ||
| 454 | }); | ||
| 455 | } | ||
| 456 | |||
| 457 | if (f.onChange) { | ||
| 458 | ed.onChange.add(function(ed, n) { | ||
| 459 | return f.onChange(ed); | ||
| 460 | }); | ||
| 461 | } | ||
| 462 | |||
| 463 | if (f.cleanup) { | ||
| 464 | ed.onGetContent.add(function() { | ||
| 465 | //f.cleanup(type, content, inst); | ||
| 466 | }); | ||
| 467 | } | ||
| 468 | |||
| 469 | this.getInfo = function() { | ||
| 470 | return f.getInfo(); | ||
| 471 | }; | ||
| 472 | |||
| 473 | this.createControl = function(n) { | ||
| 474 | tinyMCE.pluginURL = tinymce.baseURL + '/plugins/' + pn; | ||
| 475 | tinyMCE.themeURL = tinymce.baseURL + '/themes/' + tinyMCE.activeEditor.settings.theme; | ||
| 476 | |||
| 477 | if (f.getControlHTML) | ||
| 478 | return f.getControlHTML(n); | ||
| 479 | |||
| 480 | return null; | ||
| 481 | }; | ||
| 482 | |||
| 483 | this.execCommand = function(cmd, ui, val) { | ||
| 484 | if (f.execCommand) | ||
| 485 | return f.execCommand(ed.id, ed.getBody(), cmd, ui, val); | ||
| 486 | |||
| 487 | return false; | ||
| 488 | }; | ||
| 489 | }; | ||
| 490 | |||
| 491 | tinymce.PluginManager.add(pn, PluginWrapper); | ||
| 492 | }, | ||
| 493 | |||
| 494 | _getDOM : function() { | ||
| 495 | return tinyMCE.activeEditor ? tinyMCE.activeEditor.dom : tinymce.DOM; | ||
| 496 | }, | ||
| 497 | |||
| 498 | convertRelativeToAbsoluteURL : function(b, u) { | ||
| 499 | return new tinymce.util.URI(b).toAbsolute(u); | ||
| 500 | }, | ||
| 501 | |||
| 502 | convertAbsoluteURLToRelativeURL : function(b, u) { | ||
| 503 | return new tinymce.util.URI(b).toRelative(u); | ||
| 504 | } | ||
| 505 | }); | ||
| 506 | |||
| 507 | // Extend Editor class | ||
| 508 | tinymce.extend(tinymce.Editor.prototype, { | ||
| 509 | getFocusElement : function() { | ||
| 510 | return this.selection.getNode(); | ||
| 511 | }, | ||
| 512 | |||
| 513 | getData : function(n) { | ||
| 514 | if (!this.data) | ||
| 515 | this.data = []; | ||
| 516 | |||
| 517 | if (!this.data[n]) | ||
| 518 | this.data[n] = []; | ||
| 519 | |||
| 520 | return this.data[n]; | ||
| 521 | }, | ||
| 522 | |||
| 523 | hasPlugin : function(n) { | ||
| 524 | return this.plugins[n] != null; | ||
| 525 | }, | ||
| 526 | |||
| 527 | getContainerWin : function() { | ||
| 528 | return window; | ||
| 529 | }, | ||
| 530 | |||
| 531 | getHTML : function(raw) { | ||
| 532 | return this.getContent({ format : raw ? 'raw' : 'html'}); | ||
| 533 | }, | ||
| 534 | |||
| 535 | setHTML : function(h) { | ||
| 536 | this.setContent(h); | ||
| 537 | }, | ||
| 538 | |||
| 539 | getSel : function() { | ||
| 540 | return this.selection.getSel(); | ||
| 541 | }, | ||
| 542 | |||
| 543 | getRng : function() { | ||
| 544 | return this.selection.getRng(); | ||
| 545 | }, | ||
| 546 | |||
| 547 | isHidden : function() { | ||
| 548 | var s; | ||
| 549 | |||
| 550 | if (!tinymce.isGecko) | ||
| 551 | return false; | ||
| 552 | |||
| 553 | s = this.getSel(); | ||
| 554 | |||
| 555 | // Weird, wheres that cursor selection? | ||
| 556 | return (!s || !s.rangeCount || s.rangeCount == 0); | ||
| 557 | }, | ||
| 558 | |||
| 559 | translate : function(s) { | ||
| 560 | var c = this.settings.language, o; | ||
| 561 | |||
| 562 | if (!s) | ||
| 563 | return s; | ||
| 564 | |||
| 565 | o = tinymce.EditorManager.i18n[c + '.' + s] || s.replace(/{\#([^}]+)\}/g, function(a, b) { | ||
| 566 | return tinymce.EditorManager.i18n[c + '.' + b] || '{#' + b + '}'; | ||
| 567 | }); | ||
| 568 | |||
| 569 | o = o.replace(/{\$lang_([^}]+)\}/g, function(a, b) { | ||
| 570 | return tinymce.EditorManager.i18n[c + '.' + b] || '{$lang_' + b + '}'; | ||
| 571 | }); | ||
| 572 | |||
| 573 | return o; | ||
| 574 | }, | ||
| 575 | |||
| 576 | repaint : function() { | ||
| 577 | this.execCommand('mceRepaint'); | ||
| 578 | } | ||
| 579 | }); | ||
| 580 | |||
| 581 | // Extend selection | ||
| 582 | tinymce.extend(tinymce.dom.Selection.prototype, { | ||
| 583 | getSelectedText : function() { | ||
| 584 | return this.getContent({format : 'text'}); | ||
| 585 | }, | ||
| 586 | |||
| 587 | getSelectedHTML : function() { | ||
| 588 | return this.getContent({format : 'html'}); | ||
| 589 | }, | ||
| 590 | |||
| 591 | getFocusElement : function() { | ||
| 592 | return this.getNode(); | ||
| 593 | }, | ||
| 594 | |||
| 595 | selectNode : function(node, collapse, select_text_node, to_start) { | ||
| 596 | var t = this; | ||
| 597 | |||
| 598 | t.select(node, select_text_node || 0); | ||
| 599 | |||
| 600 | if (!is(collapse)) | ||
| 601 | collapse = true; | ||
| 602 | |||
| 603 | if (collapse) { | ||
| 604 | if (!is(to_start)) | ||
| 605 | to_start = true; | ||
| 606 | |||
| 607 | t.collapse(to_start); | ||
| 608 | } | ||
| 609 | } | ||
| 610 | }); | ||
| 611 | }).call(this); | ||
| 612 | |||
| 613 | // Register plugin | ||
| 614 | tinymce.PluginManager.add('compat2x', tinymce.plugins.Compat2x); | ||
| 615 | })(); | ||
| 616 | |||
diff --git a/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js b/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js index f68744d..24ee2eb 100755..100644 --- a/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){var Event=tinymce.dom.Event,each=tinymce.each,DOM=tinymce.DOM;tinymce.create('tinymce.plugins.ContextMenu',{init:function(ed){var t=this;t.editor=ed;t.onContextMenu=new tinymce.util.Dispatcher(this);ed.onContextMenu.add(function(ed,e){if(!e.ctrlKey){t._getMenu(ed).showMenu(e.clientX,e.clientY);Event.add(ed.getDoc(),'click',hide);Event.cancel(e);}});function hide(){if(t._menu){t._menu.removeAll();t._menu.destroy();Event.remove(ed.getDoc(),'click',hide);}};ed.onMouseDown.add(hide);ed.onKeyDown.add(hide);},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(ed){var t=this,m=t._menu,se=ed.selection,col=se.isCollapsed(),el=se.getNode()||ed.getBody(),am,p1,p2;if(m){m.removeAll();m.destroy();}p1=DOM.getPos(ed.getContentAreaContainer());p2=DOM.getPos(ed.getContainer());m=ed.controlManager.createDropMenu('contextmenu',{offset_x:p1.x+ed.getParam('contextmenu_offset_x',0),offset_y:p1.y+ed.getParam('contextmenu_offset_y',0),constrain:1});t._menu=m;m.add({title:'advanced.cut_desc',icon:'cut',cmd:'Cut'}).setDisabled(col);m.add({title:'advanced.copy_desc',icon:'copy',cmd:'Copy'}).setDisabled(col);m.add({title:'advanced.paste_desc',icon:'paste',cmd:'Paste'});if((el.nodeName=='A'&&!ed.dom.getAttrib(el,'name'))||!col){m.addSeparator();m.add({title:'advanced.link_desc',icon:'link',cmd:ed.plugins.advlink?'mceAdvLink':'mceLink',ui:true});m.add({title:'advanced.unlink_desc',icon:'unlink',cmd:'UnLink'});}m.addSeparator();m.add({title:'advanced.image_desc',icon:'image',cmd:ed.plugins.advimage?'mceAdvImage':'mceImage',ui:true});m.addSeparator();am=m.addMenu({title:'contextmenu.align'});am.add({title:'contextmenu.left',icon:'justifyleft',cmd:'JustifyLeft'});am.add({title:'contextmenu.center',icon:'justifycenter',cmd:'JustifyCenter'});am.add({title:'contextmenu.right',icon:'justifyright',cmd:'JustifyRight'});am.add({title:'contextmenu.full',icon:'justifyfull',cmd:'JustifyFull'});t.onContextMenu.dispatch(t,m,el,col);return m;}});tinymce.PluginManager.add('contextmenu',tinymce.plugins.ContextMenu);})(); \ No newline at end of file | (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 index a2c1866..a2c1866 100755..100644 --- a/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/directionality/editor_plugin.js b/public/javascripts/tiny_mce/plugins/directionality/editor_plugin.js index 6966d80..bce8e73 100755..100644 --- a/public/javascripts/tiny_mce/plugins/directionality/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/directionality/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.create('tinymce.plugins.Directionality',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceDirectionLTR',function(){var e=ed.dom.getParent(ed.selection.getNode(),ed.dom.isBlock);if(e){if(ed.dom.getAttrib(e,"dir")!="ltr")ed.dom.setAttrib(e,"dir","ltr");else ed.dom.setAttrib(e,"dir","");}ed.nodeChanged();});ed.addCommand('mceDirectionRTL',function(){var e=ed.dom.getParent(ed.selection.getNode(),ed.dom.isBlock);if(e){if(ed.dom.getAttrib(e,"dir")!="rtl")ed.dom.setAttrib(e,"dir","rtl");else ed.dom.setAttrib(e,"dir","");}ed.nodeChanged();});ed.addButton('ltr',{title:'directionality.ltr_desc',cmd:'mceDirectionLTR'});ed.addButton('rtl',{title:'directionality.rtl_desc',cmd:'mceDirectionRTL'});ed.onNodeChange.add(t._nodeChange,t);},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(ed,cm,n){var dom=ed.dom,dir;n=dom.getParent(n,dom.isBlock);if(!n){cm.setDisabled('ltr',1);cm.setDisabled('rtl',1);return;}dir=dom.getAttrib(n,'dir');cm.setActive('ltr',dir=="ltr");cm.setDisabled('ltr',0);cm.setActive('rtl',dir=="rtl");cm.setDisabled('rtl',0);}});tinymce.PluginManager.add('directionality',tinymce.plugins.Directionality);})(); \ No newline at end of file | (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 index 81818e3..81818e3 100755..100644 --- a/public/javascripts/tiny_mce/plugins/directionality/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/directionality/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/editor_plugin.js b/public/javascripts/tiny_mce/plugins/emotions/editor_plugin.js index 87fac10..4783bc3 100755..100644 --- a/public/javascripts/tiny_mce/plugins/emotions/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/emotions/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.create('tinymce.plugins.EmotionsPlugin',{init:function(ed,url){ed.addCommand('mceEmotion',function(){ed.windowManager.open({file:url+'/emotions.htm',width:250+parseInt(ed.getLang('emotions.delta_width',0)),height:160+parseInt(ed.getLang('emotions.delta_height',0)),inline:1},{plugin_url:url});});ed.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 | (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 index df0d370..df0d370 100755..100644 --- a/public/javascripts/tiny_mce/plugins/emotions/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/emotions/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/emotions.htm b/public/javascripts/tiny_mce/plugins/emotions/emotions.htm index 8110ee0..55a1d72 100755..100644 --- a/public/javascripts/tiny_mce/plugins/emotions/emotions.htm +++ b/public/javascripts/tiny_mce/plugins/emotions/emotions.htm | |||
| @@ -1,10 +1,9 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | 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"> | 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 | <head> | 3 | <head> |
| 4 | <title>{#emotions_dlg.title}</title> | 4 | <title>{#emotions_dlg.title}</title> |
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> |
| 6 | <script type="text/javascript" src="js/emotions.js"></script> | 6 | <script type="text/javascript" src="js/emotions.js"></script> |
| 7 | <base target="_self" /> | ||
| 8 | </head> | 7 | </head> |
| 9 | <body style="display: none"> | 8 | <body style="display: none"> |
| 10 | <div align="center"> | 9 | <div align="center"> |
diff --git a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif index ba90cc3..ba90cc3 100755..100644 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif +++ b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif | |||
| 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 index 74d897a..74d897a 100755..100644 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cry.gif +++ b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-cry.gif | |||
| 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 index 963a96b..963a96b 100755..100644 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +++ b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif | |||
| 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 index 16f68cc..16f68cc 100755..100644 --- 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 | |||
| 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 index 716f55e..716f55e 100755..100644 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-frown.gif +++ b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-frown.gif | |||
| 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 index 334d49e..334d49e 100755..100644 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif +++ b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif | |||
| 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 index 4efd549..4efd549 100755..100644 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif +++ b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif | |||
| 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 index 1606c11..1606c11 100755..100644 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif +++ b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif | |||
| 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 index ca2451e..ca2451e 100755..100644 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +++ b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif | |||
| 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 index b33d3cc..b33d3cc 100755..100644 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif +++ b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif | |||
| 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 index e6a9e60..e6a9e60 100755..100644 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-smile.gif +++ b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-smile.gif | |||
| 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 index cb99cdd..cb99cdd 100755..100644 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif +++ b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif | |||
| 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 index 2075dc1..2075dc1 100755..100644 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +++ b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif | |||
| 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 index bef7e25..bef7e25 100755..100644 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif +++ b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif | |||
| 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 index 9faf1af..9faf1af 100755..100644 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-wink.gif +++ b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-wink.gif | |||
| 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 index 648e6e8..648e6e8 100755..100644 --- a/public/javascripts/tiny_mce/plugins/emotions/img/smiley-yell.gif +++ b/public/javascripts/tiny_mce/plugins/emotions/img/smiley-yell.gif | |||
| 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 index c549367..c549367 100755..100644 --- a/public/javascripts/tiny_mce/plugins/emotions/js/emotions.js +++ b/public/javascripts/tiny_mce/plugins/emotions/js/emotions.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js index 3b57ad9..3b57ad9 100755..100644 --- a/public/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js +++ b/public/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/example/dialog.htm b/public/javascripts/tiny_mce/plugins/example/dialog.htm index b4c6284..b4c6284 100755..100644 --- a/public/javascripts/tiny_mce/plugins/example/dialog.htm +++ b/public/javascripts/tiny_mce/plugins/example/dialog.htm | |||
diff --git a/public/javascripts/tiny_mce/plugins/example/editor_plugin.js b/public/javascripts/tiny_mce/plugins/example/editor_plugin.js index cb7010d..ec1f81e 100755..100644 --- a/public/javascripts/tiny_mce/plugins/example/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/example/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.PluginManager.requireLangPack('example');tinymce.create('tinymce.plugins.ExamplePlugin',{init:function(ed,url){ed.addCommand('mceExample',function(){ed.windowManager.open({file:url+'/dialog.htm',width:320+parseInt(ed.getLang('example.delta_width',0)),height:120+parseInt(ed.getLang('example.delta_height',0)),inline:1},{plugin_url:url,some_custom_arg:'custom arg'});});ed.addButton('example',{title:'example.desc',cmd:'mceExample',image:url+'/img/example.gif'});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('example',n.nodeName=='IMG');});},createControl:function(n,cm){return null;},getInfo:function(){return{longname:'Example plugin',author:'Some author',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example',version:"1.0"};}});tinymce.PluginManager.add('example',tinymce.plugins.ExamplePlugin);})(); \ No newline at end of file | (function(){tinymce.PluginManager.requireLangPack("example");tinymce.create("tinymce.plugins.ExamplePlugin",{init:function(a,b){a.addCommand("mceExample",function(){a.windowManager.open({file:b+"/dialog.htm",width:320+parseInt(a.getLang("example.delta_width",0)),height:120+parseInt(a.getLang("example.delta_height",0)),inline:1},{plugin_url:b,some_custom_arg:"custom arg"})});a.addButton("example",{title:"example.desc",cmd:"mceExample",image:b+"/img/example.gif"});a.onNodeChange.add(function(d,c,e){c.setActive("example",e.nodeName=="IMG")})},createControl:function(b,a){return null},getInfo:function(){return{longname:"Example plugin",author:"Some author",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example",version:"1.0"}}});tinymce.PluginManager.add("example",tinymce.plugins.ExamplePlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/example/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/example/editor_plugin_src.js index 5050550..5050550 100755..100644 --- a/public/javascripts/tiny_mce/plugins/example/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/example/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/example/img/example.gif b/public/javascripts/tiny_mce/plugins/example/img/example.gif index 1ab5da4..1ab5da4 100755..100644 --- a/public/javascripts/tiny_mce/plugins/example/img/example.gif +++ b/public/javascripts/tiny_mce/plugins/example/img/example.gif | |||
| 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 index fa83411..fa83411 100755..100644 --- a/public/javascripts/tiny_mce/plugins/example/js/dialog.js +++ b/public/javascripts/tiny_mce/plugins/example/js/dialog.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/example/langs/en.js b/public/javascripts/tiny_mce/plugins/example/langs/en.js index e0784f8..e0784f8 100755..100644 --- a/public/javascripts/tiny_mce/plugins/example/langs/en.js +++ b/public/javascripts/tiny_mce/plugins/example/langs/en.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/example/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/example/langs/en_dlg.js index ebcf948..ebcf948 100755..100644 --- a/public/javascripts/tiny_mce/plugins/example/langs/en_dlg.js +++ b/public/javascripts/tiny_mce/plugins/example/langs/en_dlg.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css b/public/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css index 7a3334f..7a3334f 100755..100644 --- a/public/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css +++ b/public/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css | |||
diff --git a/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js b/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js index 727beb5..8e11bfc 100755..100644 --- a/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.create('tinymce.plugins.FullPagePlugin',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceFullPageProperties',function(){ed.windowManager.open({file:url+'/fullpage.htm',width:430+parseInt(ed.getLang('fullpage.delta_width',0)),height:495+parseInt(ed.getLang('fullpage.delta_height',0)),inline:1},{plugin_url:url,head_html:t.head});});ed.addButton('fullpage',{title:'fullpage.desc',cmd:'mceFullPageProperties'});ed.onBeforeSetContent.add(t._setContent,t);ed.onSetContent.add(t._setBodyAttribs,t);ed.onGetContent.add(t._getContent,t);},getInfo:function(){return{longname:'Fullpage',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_setBodyAttribs:function(ed,o){var bdattr,i,len,kv,k,v,t,attr=this.head.match(/body(.*?)>/i);if(attr&&attr[1]){bdattr=attr[1].match(/\s*(\w+\s*=\s*".*?"|\w+\s*=\s*'.*?'|\w+\s*=\s*\w+|\w+)\s*/g);if(bdattr){for(i=0,len=bdattr.length;i<len;i++){kv=bdattr[i].split('=');k=kv[0].replace(/\s/,'');v=kv[1];if(v){v=v.replace(/^\s+/,'').replace(/\s+$/,'');t=v.match(/^["'](.*)["']$/);if(t)v=t[1];}else v=k;ed.dom.setAttrib(ed.getBody(),'style',v);}}}},_createSerializer:function(){return new tinymce.dom.Serializer({dom:this.editor.dom,apply_source_formatting:true});},_setContent:function(ed,o){var t=this,sp,ep,c=o.content,v,st='';c=c.replace(/<(\/?)BODY/gi,'<$1body');sp=c.indexOf('<body');if(sp!=-1){sp=c.indexOf('>',sp);t.head=c.substring(0,sp+1);ep=c.indexOf('</body',sp);if(ep==-1)ep=c.indexOf('</body',ep);o.content=c.substring(sp+1,ep);t.foot=c.substring(ep);function low(s){return s.replace(/<\/?[A-Z]+/g,function(a){return a.toLowerCase();})};t.head=low(t.head);t.foot=low(t.foot);}else{t.head='';if(ed.getParam('fullpage_default_xml_pi'))t.head+='<?xml version="1.0" encoding="'+ed.getParam('fullpage_default_encoding','ISO-8859-1')+'" ?>\n';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">');t.head+='\n<html>\n<head>\n<title>'+ed.getParam('fullpage_default_title','Untitled document')+'</title>\n';if(v=ed.getParam('fullpage_default_encoding'))t.head+='<meta http-equiv="Content-Type" content="'+v+'" />\n';if(v=ed.getParam('fullpage_default_font_family'))st+='font-family: '+v+';';if(v=ed.getParam('fullpage_default_font_size'))st+='font-size: '+v+';';if(v=ed.getParam('fullpage_default_text_color'))st+='color: '+v+';';t.head+='</head>\n<body'+(st?' style="'+st+'"':'')+'>\n';t.foot='\n</body>\n</html>';}},_getContent:function(ed,o){var t=this;o.content=tinymce.trim(t.head)+'\n'+tinymce.trim(o.content)+'\n'+tinymce.trim(t.foot);}});tinymce.PluginManager.add('fullpage',tinymce.plugins.FullPagePlugin);})(); \ No newline at end of file | (function(){tinymce.create("tinymce.plugins.FullPagePlugin",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceFullPageProperties",function(){a.windowManager.open({file:b+"/fullpage.htm",width:430+parseInt(a.getLang("fullpage.delta_width",0)),height:495+parseInt(a.getLang("fullpage.delta_height",0)),inline:1},{plugin_url:b,head_html:c.head})});a.addButton("fullpage",{title:"fullpage.desc",cmd:"mceFullPageProperties"});a.onBeforeSetContent.add(c._setContent,c);a.onSetContent.add(c._setBodyAttribs,c);a.onGetContent.add(c._getContent,c)},getInfo:function(){return{longname:"Fullpage",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_setBodyAttribs:function(d,a){var l,c,e,g,b,h,j,f=this.head.match(/body(.*?)>/i);if(f&&f[1]){l=f[1].match(/\s*(\w+\s*=\s*".*?"|\w+\s*=\s*'.*?'|\w+\s*=\s*\w+|\w+)\s*/g);if(l){for(c=0,e=l.length;c<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 index 019682d..c7d5aca 100755..100644 --- a/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /** | 1 | /** |
| 2 | * $Id: editor_plugin_src.js 920 2008-09-09 14:05:33Z spocke $ | 2 | * $Id: editor_plugin_src.js 1029 2009-02-24 22:32:21Z spocke $ |
| 3 | * | 3 | * |
| 4 | * @author Moxiecode | 4 | * @author Moxiecode |
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. |
| @@ -82,6 +82,9 @@ | |||
| 82 | _setContent : function(ed, o) { | 82 | _setContent : function(ed, o) { |
| 83 | var t = this, sp, ep, c = o.content, v, st = ''; | 83 | var t = this, sp, ep, c = o.content, v, st = ''; |
| 84 | 84 | ||
| 85 | if (o.source_view && ed.getParam('fullpage_hide_in_source_view')) | ||
| 86 | return; | ||
| 87 | |||
| 85 | // Parse out head, body and footer | 88 | // Parse out head, body and footer |
| 86 | c = c.replace(/<(\/?)BODY/gi, '<$1body'); | 89 | c = c.replace(/<(\/?)BODY/gi, '<$1body'); |
| 87 | sp = c.indexOf('<body'); | 90 | sp = c.indexOf('<body'); |
| @@ -133,7 +136,8 @@ | |||
| 133 | _getContent : function(ed, o) { | 136 | _getContent : function(ed, o) { |
| 134 | var t = this; | 137 | var t = this; |
| 135 | 138 | ||
| 136 | o.content = tinymce.trim(t.head) + '\n' + tinymce.trim(o.content) + '\n' + tinymce.trim(t.foot); | 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); | ||
| 137 | } | 141 | } |
| 138 | }); | 142 | }); |
| 139 | 143 | ||
diff --git a/public/javascripts/tiny_mce/plugins/fullpage/fullpage.htm b/public/javascripts/tiny_mce/plugins/fullpage/fullpage.htm index d74da0d..3ea4081 100755..100644 --- a/public/javascripts/tiny_mce/plugins/fullpage/fullpage.htm +++ b/public/javascripts/tiny_mce/plugins/fullpage/fullpage.htm | |||
| @@ -7,7 +7,6 @@ | |||
| 7 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | 7 | <script type="text/javascript" src="../../utils/form_utils.js"></script> |
| 8 | <script type="text/javascript" src="js/fullpage.js"></script> | 8 | <script type="text/javascript" src="js/fullpage.js"></script> |
| 9 | <link href="css/fullpage.css" rel="stylesheet" type="text/css" /> | 9 | <link href="css/fullpage.css" rel="stylesheet" type="text/css" /> |
| 10 | <base target="_self" /> | ||
| 11 | </head> | 10 | </head> |
| 12 | <body id="advlink" style="display: none"> | 11 | <body id="advlink" style="display: none"> |
| 13 | <form onsubmit="updateAction();return false;" name="fullpage" action="#"> | 12 | <form onsubmit="updateAction();return false;" name="fullpage" action="#"> |
| @@ -26,27 +25,27 @@ | |||
| 26 | 25 | ||
| 27 | <table border="0" cellpadding="4" cellspacing="0"> | 26 | <table border="0" cellpadding="4" cellspacing="0"> |
| 28 | <tr> | 27 | <tr> |
| 29 | <td nowrap="nowrap"><label for="metatitle">{#fullpage_dlg.meta_title}</label> </td> | 28 | <td class="nowrap"><label for="metatitle">{#fullpage_dlg.meta_title}</label> </td> |
| 30 | <td><input type="text" id="metatitle" name="metatitle" value="" class="mceFocus" /></td> | 29 | <td><input type="text" id="metatitle" name="metatitle" value="" class="mceFocus" /></td> |
| 31 | </tr> | 30 | </tr> |
| 32 | <tr> | 31 | <tr> |
| 33 | <td nowrap="nowrap"><label for="metakeywords">{#fullpage_dlg.meta_keywords}</label> </td> | 32 | <td class="nowrap"><label for="metakeywords">{#fullpage_dlg.meta_keywords}</label> </td> |
| 34 | <td><textarea id="metakeywords" name="metakeywords" rows="4"></textarea></td> | 33 | <td><textarea id="metakeywords" name="metakeywords" rows="4"></textarea></td> |
| 35 | </tr> | 34 | </tr> |
| 36 | <tr> | 35 | <tr> |
| 37 | <td nowrap="nowrap"><label for="metadescription">{#fullpage_dlg.meta_description}</label> </td> | 36 | <td class="nowrap"><label for="metadescription">{#fullpage_dlg.meta_description}</label> </td> |
| 38 | <td><textarea id="metadescription" name="metadescription" rows="4"></textarea></td> | 37 | <td><textarea id="metadescription" name="metadescription" rows="4"></textarea></td> |
| 39 | </tr> | 38 | </tr> |
| 40 | <tr> | 39 | <tr> |
| 41 | <td nowrap="nowrap"><label for="metaauthor">{#fullpage_dlg.author}</label> </td> | 40 | <td class="nowrap"><label for="metaauthor">{#fullpage_dlg.author}</label> </td> |
| 42 | <td><input type="text" id="metaauthor" name="metaauthor" value="" /></td> | 41 | <td><input type="text" id="metaauthor" name="metaauthor" value="" /></td> |
| 43 | </tr> | 42 | </tr> |
| 44 | <tr> | 43 | <tr> |
| 45 | <td nowrap="nowrap"><label for="metacopyright">{#fullpage_dlg.copyright}</label> </td> | 44 | <td class="nowrap"><label for="metacopyright">{#fullpage_dlg.copyright}</label> </td> |
| 46 | <td><input type="text" id="metacopyright" name="metacopyright" value="" /></td> | 45 | <td><input type="text" id="metacopyright" name="metacopyright" value="" /></td> |
| 47 | </tr> | 46 | </tr> |
| 48 | <tr> | 47 | <tr> |
| 49 | <td nowrap="nowrap"><label for="metarobots">{#fullpage_dlg.meta_robots}</label> </td> | 48 | <td class="nowrap"><label for="metarobots">{#fullpage_dlg.meta_robots}</label> </td> |
| 50 | <td> | 49 | <td> |
| 51 | <select id="metarobots" name="metarobots"> | 50 | <select id="metarobots" name="metarobots"> |
| 52 | <option value="">{#not_set}</option> | 51 | <option value="">{#not_set}</option> |
| @@ -73,7 +72,7 @@ | |||
| 73 | </td> | 72 | </td> |
| 74 | </tr> | 73 | </tr> |
| 75 | <tr> | 74 | <tr> |
| 76 | <td nowrap="nowrap"><label for="doctypes">{#fullpage_dlg.doctypes}</label> </td> | 75 | <td class="nowrap"><label for="doctypes">{#fullpage_dlg.doctypes}</label> </td> |
| 77 | <td> | 76 | <td> |
| 78 | <select id="doctypes" name="doctypes"> | 77 | <select id="doctypes" name="doctypes"> |
| 79 | <option value="">{#not_set}</option> | 78 | <option value="">{#not_set}</option> |
| @@ -81,7 +80,7 @@ | |||
| 81 | </td> | 80 | </td> |
| 82 | </tr> | 81 | </tr> |
| 83 | <tr> | 82 | <tr> |
| 84 | <td nowrap="nowrap"><label for="langcode">{#fullpage_dlg.langcode}</label> </td> | 83 | <td class="nowrap"><label for="langcode">{#fullpage_dlg.langcode}</label> </td> |
| 85 | <td><input type="text" id="langcode" name="langcode" value="" /></td> | 84 | <td><input type="text" id="langcode" name="langcode" value="" /></td> |
| 86 | </tr> | 85 | </tr> |
| 87 | <tr> | 86 | <tr> |
| @@ -95,7 +94,7 @@ | |||
| 95 | </td> | 94 | </td> |
| 96 | </tr> | 95 | </tr> |
| 97 | <tr> | 96 | <tr> |
| 98 | <td nowrap="nowrap"><label for="xml_pi">{#fullpage_dlg.xml_pi}</label> </td> | 97 | <td class="nowrap"><label for="xml_pi">{#fullpage_dlg.xml_pi}</label> </td> |
| 99 | <td><input type="checkbox" id="xml_pi" name="xml_pi" class="checkbox" /></td> | 98 | <td><input type="checkbox" id="xml_pi" name="xml_pi" class="checkbox" /></td> |
| 100 | </tr> | 99 | </tr> |
| 101 | </table> | 100 | </table> |
diff --git a/public/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js b/public/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js index 89059ef..dd3a29c 100755..100644 --- a/public/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js +++ b/public/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js | |||
| @@ -123,7 +123,7 @@ function init() { | |||
| 123 | // Parse xml and doctype | 123 | // Parse xml and doctype |
| 124 | xmlVer = getReItem(/<\?\s*?xml.*?version\s*?=\s*?"(.*?)".*?\?>/gi, h, 1); | 124 | xmlVer = getReItem(/<\?\s*?xml.*?version\s*?=\s*?"(.*?)".*?\?>/gi, h, 1); |
| 125 | xmlEnc = getReItem(/<\?\s*?xml.*?encoding\s*?=\s*?"(.*?)".*?\?>/gi, h, 1); | 125 | xmlEnc = getReItem(/<\?\s*?xml.*?encoding\s*?=\s*?"(.*?)".*?\?>/gi, h, 1); |
| 126 | docType = getReItem(/<\!DOCTYPE.*?>/gi, h, 0); | 126 | docType = getReItem(/<\!DOCTYPE.*?>/gi, h.replace(/\n/g, ''), 0).replace(/ +/g, ' '); |
| 127 | f.langcode.value = getReItem(/lang="(.*?)"/gi, h, 1); | 127 | f.langcode.value = getReItem(/lang="(.*?)"/gi, h, 1); |
| 128 | 128 | ||
| 129 | // Parse title | 129 | // Parse title |
diff --git a/public/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js index f5801b8..f5801b8 100755..100644 --- a/public/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js +++ b/public/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/fullscreen/editor_plugin.js b/public/javascripts/tiny_mce/plugins/fullscreen/editor_plugin.js index fbcec59..dfb3f16 100755..100644 --- a/public/javascripts/tiny_mce/plugins/fullscreen/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/fullscreen/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){var DOM=tinymce.DOM;tinymce.create('tinymce.plugins.FullScreenPlugin',{init:function(ed,url){var t=this,s={},vp;t.editor=ed;ed.addCommand('mceFullScreen',function(){var win,de=DOM.doc.documentElement;if(ed.getParam('fullscreen_is_enabled')){if(ed.getParam('fullscreen_new_window'))closeFullscreen();else{DOM.win.setTimeout(function(){tinymce.dom.Event.remove(DOM.win,'resize',t.resizeFunc);tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent({format:'raw'}),{format:'raw'});tinyMCE.remove(ed);DOM.remove('mce_fullscreen_container');de.style.overflow=ed.getParam('fullscreen_html_overflow');DOM.setStyle(DOM.doc.body,'overflow',ed.getParam('fullscreen_overflow'));DOM.win.scrollTo(ed.getParam('fullscreen_scrollx'),ed.getParam('fullscreen_scrolly'));tinyMCE.settings=tinyMCE.oldSettings;},10);}return;}if(ed.getParam('fullscreen_new_window')){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);try{win.resizeTo(screen.availWidth,screen.availHeight);}catch(e){}}else{tinyMCE.oldSettings=tinyMCE.settings;s.fullscreen_overflow=DOM.getStyle(DOM.doc.body,'overflow',1)||'auto';s.fullscreen_html_overflow=DOM.getStyle(de,'overflow',1);vp=DOM.getViewPort();s.fullscreen_scrollx=vp.x;s.fullscreen_scrolly=vp.y;if(tinymce.isOpera&&s.fullscreen_overflow=='visible')s.fullscreen_overflow='auto';if(tinymce.isIE&&s.fullscreen_overflow=='scroll')s.fullscreen_overflow='auto';if(tinymce.isIE&&(s.fullscreen_html_overflow=='visible'||s.fullscreen_html_overflow=='scroll'))s.fullscreen_html_overflow='auto';if(s.fullscreen_overflow=='0px')s.fullscreen_overflow='';DOM.setStyle(DOM.doc.body,'overflow','hidden');de.style.overflow='hidden';vp=DOM.getViewPort();DOM.win.scrollTo(0,0);if(tinymce.isIE)vp.h-=1;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;'});DOM.add(n,'div',{id:'mce_fullscreen'});tinymce.each(ed.settings,function(v,n){s[n]=v;});s.id='mce_fullscreen';s.width=n.clientWidth;s.height=n.clientHeight-15;s.fullscreen_is_enabled=true;s.fullscreen_editor_id=ed.id;s.theme_advanced_resizing=false;s.save_onsavecallback=function(){ed.setContent(tinyMCE.get(s.id).getContent({format:'raw'}),{format:'raw'});ed.execCommand('mceSave');};tinymce.each(ed.getParam('fullscreen_settings'),function(v,k){s[k]=v;});if(s.theme_advanced_toolbar_location==='external')s.theme_advanced_toolbar_location='top';t.fullscreenEditor=new tinymce.Editor('mce_fullscreen',s);t.fullscreenEditor.onInit.add(function(){t.fullscreenEditor.setContent(ed.getContent());t.fullscreenEditor.focus();});t.fullscreenEditor.render();tinyMCE.add(t.fullscreenEditor);t.fullscreenElement=new tinymce.dom.Element('mce_fullscreen_container');t.fullscreenElement.update();t.resizeFunc=tinymce.dom.Event.add(DOM.win,'resize',function(){var vp=tinymce.DOM.getViewPort();t.fullscreenEditor.theme.resizeTo(vp.w,vp.h);});}});ed.addButton('fullscreen',{title:'fullscreen.desc',cmd:'mceFullScreen'});ed.onNodeChange.add(function(ed,cm){cm.setActive('fullscreen',ed.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 | (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 index 77a8c3b..77a8c3b 100755..100644 --- a/public/javascripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/fullscreen/fullscreen.htm b/public/javascripts/tiny_mce/plugins/fullscreen/fullscreen.htm index 4b081ca..6ec4f26 100755..100644 --- a/public/javascripts/tiny_mce/plugins/fullscreen/fullscreen.htm +++ b/public/javascripts/tiny_mce/plugins/fullscreen/fullscreen.htm | |||
| @@ -96,7 +96,6 @@ | |||
| 96 | // Add onunload | 96 | // Add onunload |
| 97 | tinymce.dom.Event.add(window, "beforeunload", unloadHandler); | 97 | tinymce.dom.Event.add(window, "beforeunload", unloadHandler); |
| 98 | </script> | 98 | </script> |
| 99 | <base target="_self" /> | ||
| 100 | </head> | 99 | </head> |
| 101 | <body style="margin:0;overflow:hidden;width:100%;height:100%" scrolling="no" scroll="no"> | 100 | <body style="margin:0;overflow:hidden;width:100%;height:100%" scrolling="no" scroll="no"> |
| 102 | <form onsubmit="doParentSubmit();"> | 101 | <form onsubmit="doParentSubmit();"> |
diff --git a/public/javascripts/tiny_mce/plugins/iespell/editor_plugin.js b/public/javascripts/tiny_mce/plugins/iespell/editor_plugin.js index 06dae75..e9cba10 100755..100644 --- a/public/javascripts/tiny_mce/plugins/iespell/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/iespell/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.create('tinymce.plugins.IESpell',{init:function(ed,url){var t=this,sp;if(!tinymce.isIE)return;t.editor=ed;ed.addCommand('mceIESpell',function(){try{sp=new ActiveXObject("ieSpell.ieSpellExtension");sp.CheckDocumentNode(ed.getDoc().documentElement);}catch(e){if(e.number==-2146827859){ed.windowManager.confirm(ed.getLang("iespell.download"),function(s){if(s)window.open('http://www.iespell.com/download.php','ieSpellDownload','');});}else ed.windowManager.alert("Error Loading ieSpell: Exception "+e.number);}});ed.addButton('iespell',{title:'iespell.iespell_desc',cmd:'mceIESpell'});},getInfo:function(){return{longname:'IESpell (IE Only)',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('iespell',tinymce.plugins.IESpell);})(); \ No newline at end of file | (function(){tinymce.create("tinymce.plugins.IESpell",{init:function(a,b){var c=this,d;if(!tinymce.isIE){return}c.editor=a;a.addCommand("mceIESpell",function(){try{d=new ActiveXObject("ieSpell.ieSpellExtension");d.CheckDocumentNode(a.getDoc().documentElement)}catch(f){if(f.number==-2146827859){a.windowManager.confirm(a.getLang("iespell.download"),function(e){if(e){window.open("http://www.iespell.com/download.php","ieSpellDownload","")}})}else{a.windowManager.alert("Error Loading ieSpell: Exception "+f.number)}}});a.addButton("iespell",{title:"iespell.iespell_desc",cmd:"mceIESpell"})},getInfo:function(){return{longname:"IESpell (IE Only)",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("iespell",tinymce.plugins.IESpell)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/iespell/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/iespell/editor_plugin_src.js index a68f69a..a68f69a 100755..100644 --- a/public/javascripts/tiny_mce/plugins/iespell/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/iespell/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin.js b/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin.js index 5560b6b..07ea477 100755..100644 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){var DOM=tinymce.DOM,Element=tinymce.dom.Element,Event=tinymce.dom.Event,each=tinymce.each,is=tinymce.is;tinymce.create('tinymce.plugins.InlinePopups',{init:function(ed,url){ed.onBeforeRenderUI.add(function(){ed.windowManager=new tinymce.InlineWindowManager(ed);DOM.loadCSS(url+'/skins/'+(ed.settings.inlinepopups_skin||'clearlooks2')+"/window.css");});},getInfo:function(){return{longname:'InlinePopups',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager',{InlineWindowManager:function(ed){var t=this;t.parent(ed);t.zIndex=300000;t.count=0;t.windows={};},open:function(f,p){var t=this,id,opt='',ed=t.editor,dw=0,dh=0,vp,po,mdf,clf,we,w,u;f=f||{};p=p||{};if(!f.inline)return t.parent(f,p);if(!f.type)t.bookmark=ed.selection.getBookmark('simple');id=DOM.uniqueId();vp=DOM.getViewPort();f.width=parseInt(f.width||320);f.height=parseInt(f.height||240)+(tinymce.isIE?8:0);f.min_width=parseInt(f.min_width||150);f.min_height=parseInt(f.min_height||100);f.max_width=parseInt(f.max_width||2000);f.max_height=parseInt(f.max_height||2000);f.left=f.left||Math.round(Math.max(vp.x,vp.x+(vp.w/ 2.0) - (f.width /2.0)));f.top=f.top||Math.round(Math.max(vp.y,vp.y+(vp.h/ 2.0) - (f.height /2.0)));f.movable=f.resizable=true;p.mce_width=f.width;p.mce_height=f.height;p.mce_inline=true;p.mce_window_id=id;p.mce_auto_focus=f.auto_focus;t.features=f;t.params=p;t.onOpen.dispatch(t,f,p);if(f.type){opt+=' mceModal';if(f.type)opt+=' mce'+f.type.substring(0,1).toUpperCase()+f.type.substring(1);f.resizable=false;}if(f.statusbar)opt+=' mceStatusbar';if(f.resizable)opt+=' mceResizable';if(f.minimizable)opt+=' mceMinimizable';if(f.maximizable)opt+=' mceMaximizable';if(f.movable)opt+=' mceMovable';t._addAll(DOM.doc.body,['div',{id:id,'class':ed.settings.inlinepopups_skin||'clearlooks2',style:'width:100px;height:100px'},['div',{id:id+'_wrapper','class':'mceWrapper'+opt},['div',{id:id+'_top','class':'mceTop'},['div',{'class':'mceLeft'}],['div',{'class':'mceCenter'}],['div',{'class':'mceRight'}],['span',{id:id+'_title'},f.title||'']],['div',{id:id+'_middle','class':'mceMiddle'},['div',{id:id+'_left','class':'mceLeft'}],['span',{id:id+'_content'}],['div',{id:id+'_right','class':'mceRight'}]],['div',{id:id+'_bottom','class':'mceBottom'},['div',{'class':'mceLeft'}],['div',{'class':'mceCenter'}],['div',{'class':'mceRight'}],['span',{id:id+'_status'},'Content']],['a',{'class':'mceMove',tabindex:'-1',href:'javascript:;'}],['a',{'class':'mceMin',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{'class':'mceMax',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{'class':'mceMed',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{'class':'mceClose',tabindex:'-1',href:'javascript:;',onmousedown:'return false;'}],['a',{id:id+'_resize_n','class':'mceResize mceResizeN',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_s','class':'mceResize mceResizeS',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_w','class':'mceResize mceResizeW',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_e','class':'mceResize mceResizeE',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_nw','class':'mceResize mceResizeNW',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_ne','class':'mceResize mceResizeNE',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_sw','class':'mceResize mceResizeSW',tabindex:'-1',href:'javascript:;'}],['a',{id:id+'_resize_se','class':'mceResize mceResizeSE',tabindex:'-1',href:'javascript:;'}]]]);DOM.setStyles(id,{top:-10000,left:-10000});if(tinymce.isGecko)DOM.setStyle(id,'overflow','auto');if(!f.type){dw+=DOM.get(id+'_left').clientWidth;dw+=DOM.get(id+'_right').clientWidth;dh+=DOM.get(id+'_top').clientHeight;dh+=DOM.get(id+'_bottom').clientHeight;}DOM.setStyles(id,{top:f.top,left:f.left,width:f.width+dw,height:f.height+dh});u=f.url||f.file;if(u){if(tinymce.relaxedDomain)u+=(u.indexOf('?')==-1?'?':'&')+'mce_rdomain='+tinymce.relaxedDomain;u=tinymce._addVer(u);}if(!f.type){DOM.add(id+'_content','iframe',{id:id+'_ifr',src:'javascript:""',frameBorder:0,style:'border:0;width:10px;height:10px'});DOM.setStyles(id+'_ifr',{width:f.width,height:f.height});DOM.setAttrib(id+'_ifr','src',u);}else{DOM.add(id+'_wrapper','a',{id:id+'_ok','class':'mceButton mceOk',href:'javascript:;',onmousedown:'return false;'},'Ok');if(f.type=='confirm')DOM.add(id+'_wrapper','a',{'class':'mceButton mceCancel',href:'javascript:;',onmousedown:'return false;'},'Cancel');DOM.add(id+'_middle','div',{'class':'mceIcon'});DOM.setHTML(id+'_content',f.content.replace('\n','<br />'));}mdf=Event.add(id,'mousedown',function(e){var n=e.target,w,vp;w=t.windows[id];t.focus(id);if(n.nodeName=='A'||n.nodeName=='a'){if(n.className=='mceMax'){w.oldPos=w.element.getXY();w.oldSize=w.element.getSize();vp=DOM.getViewPort();vp.w-=2;vp.h-=2;w.element.moveTo(vp.x,vp.y);w.element.resizeTo(vp.w,vp.h);DOM.setStyles(id+'_ifr',{width:vp.w-w.deltaWidth,height:vp.h-w.deltaHeight});DOM.addClass(id+'_wrapper','mceMaximized');}else if(n.className=='mceMed'){w.element.moveTo(w.oldPos.x,w.oldPos.y);w.element.resizeTo(w.oldSize.w,w.oldSize.h);w.iframeElement.resizeTo(w.oldSize.w-w.deltaWidth,w.oldSize.h-w.deltaHeight);DOM.removeClass(id+'_wrapper','mceMaximized');}else if(n.className=='mceMove')return t._startDrag(id,e,n.className);else if(DOM.hasClass(n,'mceResize'))return t._startDrag(id,e,n.className.substring(13));}});clf=Event.add(id,'click',function(e){var n=e.target;t.focus(id);if(n.nodeName=='A'||n.nodeName=='a'){switch(n.className){case'mceClose':t.close(null,id);return Event.cancel(e);case'mceButton mceOk':case'mceButton mceCancel':f.button_func(n.className=='mceButton mceOk');return Event.cancel(e);}}});w=t.windows[id]={id:id,mousedown_func:mdf,click_func:clf,element:new Element(id,{blocker:1,container:ed.getContainer()}),iframeElement:new Element(id+'_ifr'),features:f,deltaWidth:dw,deltaHeight:dh};w.iframeElement.on('focus',function(){t.focus(id);});if(t.count==0&&t.editor.getParam('dialog_type','modal')=='modal'){DOM.add(DOM.doc.body,'div',{id:'mceModalBlocker','class':(t.editor.settings.inlinepopups_skin||'clearlooks2')+'_modalBlocker',style:{zIndex:t.zIndex-1}});DOM.show('mceModalBlocker');}else DOM.setStyle('mceModalBlocker','z-index',t.zIndex-1);if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!DOM.boxModel))DOM.setStyles('mceModalBlocker',{position:'absolute',width:vp.w-2,height:vp.h-2});t.focus(id);t._fixIELayout(id,1);if(DOM.get(id+'_ok'))DOM.get(id+'_ok').focus();t.count++;return w;},focus:function(id){var t=this,w;if(w=t.windows[id]){w.zIndex=this.zIndex++;w.element.setStyle('zIndex',w.zIndex);w.element.update();id=id+'_wrapper';DOM.removeClass(t.lastId,'mceFocus');DOM.addClass(id,'mceFocus');t.lastId=id;}},_addAll:function(te,ne){var i,n,t=this,dom=tinymce.DOM;if(is(ne,'string'))te.appendChild(dom.doc.createTextNode(ne));else if(ne.length){te=te.appendChild(dom.create(ne[0],ne[1]));for(i=2;i<ne.length;i++)t._addAll(te,ne[i]);}},_startDrag:function(id,se,ac){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;cp={x:0,y:0};vp=DOM.getViewPort();vp.w-=2;vp.h-=2;sex=se.screenX;sey=se.screenY;dx=dy=dw=dh=0;mu=Event.add(d,'mouseup',function(e){Event.remove(d,'mouseup',mu);Event.remove(d,'mousemove',mm);if(eb)eb.remove();we.moveBy(dx,dy);we.resizeBy(dw,dh);sz=we.getSize();DOM.setStyles(id+'_ifr',{width:sz.w-w.deltaWidth,height:sz.h-w.deltaHeight});t._fixIELayout(id,1);return Event.cancel(e);});if(ac!='Move')startMove();function startMove(){if(eb)return;t._fixIELayout(id,0);DOM.add(d.body,'div',{id:'mceEventBlocker','class':'mceEventBlocker '+(t.editor.settings.inlinepopups_skin||'clearlooks2'),style:{zIndex:t.zIndex+1}});if(tinymce.isIE6||(tinymce.isIE&&!DOM.boxModel))DOM.setStyles('mceEventBlocker',{position:'absolute',width:vp.w-2,height:vp.h-2});eb=new Element('mceEventBlocker');eb.update();p=we.getXY();sz=we.getSize();sx=cp.x+p.x-vp.x;sy=cp.y+p.y-vp.y;DOM.add(eb.get(),'div',{id:'mcePlaceHolder','class':'mcePlaceHolder',style:{left:sx,top:sy,width:sz.w,height:sz.h}});ph=new Element('mcePlaceHolder');};mm=Event.add(d,'mousemove',function(e){var x,y,v;startMove();x=e.screenX-sex;y=e.screenY-sey;switch(ac){case'ResizeW':dx=x;dw=0-x;break;case'ResizeE':dw=x;break;case'ResizeN':case'ResizeNW':case'ResizeNE':if(ac=="ResizeNW"){dx=x;dw=0-x;}else if(ac=="ResizeNE")dw=x;dy=y;dh=0-y;break;case'ResizeS':case'ResizeSW':case'ResizeSE':if(ac=="ResizeSW"){dx=x;dw=0-x;}else if(ac=="ResizeSE")dw=x;dh=y;break;case'mceMove':dx=x;dy=y;break;}if(dw<(v=w.features.min_width-sz.w)){if(dx!==0)dx+=dw-v;dw=v;}if(dh<(v=w.features.min_height-sz.h)){if(dy!==0)dy+=dh-v;dh=v;}dw=Math.min(dw,w.features.max_width-sz.w);dh=Math.min(dh,w.features.max_height-sz.h);dx=Math.max(dx,vp.x-(sx+vp.x));dy=Math.max(dy,vp.y-(sy+vp.y));dx=Math.min(dx,(vp.w+vp.x)-(sx+sz.w+vp.x));dy=Math.min(dy,(vp.h+vp.y)-(sy+sz.h+vp.y));if(dx+dy!==0){if(sx+dx<0)dx=0;if(sy+dy<0)dy=0;ph.moveTo(sx+dx,sy+dy);}if(dw+dh!==0)ph.resizeTo(sz.w+dw,sz.h+dh);return Event.cancel(e);});return Event.cancel(se);},resizeBy:function(dw,dh,id){var w=this.windows[id];if(w){w.element.resizeBy(dw,dh);w.iframeElement.resizeBy(dw,dh);}},close:function(win,id){var t=this,w,d=DOM.doc,ix=0,fw,id;id=t._findId(id||win);if(!t.windows[id]){t.parent(win);return;}t.count--;if(t.count==0)DOM.remove('mceModalBlocker');if(w=t.windows[id]){t.onClose.dispatch(t);Event.remove(d,'mousedown',w.mousedownFunc);Event.remove(d,'click',w.clickFunc);Event.clear(id);Event.clear(id+'_ifr');DOM.setAttrib(id+'_ifr','src','javascript:""');w.element.remove();delete t.windows[id];each(t.windows,function(w){if(w.zIndex>ix){fw=w;ix=w.zIndex;}});if(fw)t.focus(fw.id);}},setTitle:function(w,ti){var e;w=this._findId(w);if(e=DOM.get(w+'_title'))e.innerHTML=DOM.encode(ti);},alert:function(txt,cb,s){var t=this,w;w=t.open({title:t,type:'alert',button_func:function(s){if(cb)cb.call(s||t,s);t.close(null,w.id);},content:DOM.encode(t.editor.getLang(txt,txt)),inline:1,width:400,height:130});},confirm:function(txt,cb,s){var t=this,w;w=t.open({title:t,type:'confirm',button_func:function(s){if(cb)cb.call(s||t,s);t.close(null,w.id);},content:DOM.encode(t.editor.getLang(txt,txt)),inline:1,width:400,height:130});},_findId:function(w){var t=this;if(typeof(w)=='string')return w;each(t.windows,function(wo){var ifr=DOM.get(wo.id+'_ifr');if(ifr&&w==ifr.contentWindow){w=wo.id;return false;}});return w;},_fixIELayout:function(id,s){var w,img;if(!tinymce.isIE6)return;each(['n','s','w','e','nw','ne','sw','se'],function(v){var e=DOM.get(id+'_resize_'+v);DOM.setStyles(e,{width:s?e.clientWidth:'',height:s?e.clientHeight:'',cursor:DOM.getStyle(e,'cursor',1)});DOM.setStyle(id+"_bottom",'bottom','-1px');e=0;});if(w=this.windows[id]){w.element.hide();w.element.show();each(DOM.select('div,a',id),function(e,i){if(e.currentStyle.backgroundImage!='none'){img=new Image();img.src=e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,'$1');}});DOM.get(id).style.filter='';}}});tinymce.PluginManager.add('inlinepopups',tinymce.plugins.InlinePopups);})(); \ No newline at end of file | (function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(r,j){var y=this,i,k="",q=y.editor,g=0,s=0,h,m,n,o,l,v,x;r=r||{};j=j||{};if(!r.inline){return y.parent(r,j)}if(!r.type){y.bookmark=q.selection.getBookmark(1)}i=d.uniqueId();h=d.getViewPort();r.width=parseInt(r.width||320);r.height=parseInt(r.height||240)+(tinymce.isIE?8:0);r.min_width=parseInt(r.min_width||150);r.min_height=parseInt(r.min_height||100);r.max_width=parseInt(r.max_width||2000);r.max_height=parseInt(r.max_height||2000);r.left=r.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(r.width/2)));r.top=r.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(r.height/2)));r.movable=r.resizable=true;j.mce_width=r.width;j.mce_height=r.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=r.auto_focus;y.features=r;y.params=j;y.onOpen.dispatch(y,r,j);if(r.type){k+=" mceModal";if(r.type){k+=" mce"+r.type.substring(0,1).toUpperCase()+r.type.substring(1)}r.resizable=false}if(r.statusbar){k+=" mceStatusbar"}if(r.resizable){k+=" mceResizable"}if(r.minimizable){k+=" mceMinimizable"}if(r.maximizable){k+=" mceMaximizable"}if(r.movable){k+=" mceMovable"}y._addAll(d.doc.body,["div",{id:i,"class":q.settings.inlinepopups_skin||"clearlooks2",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 index 027a23c..fffca5a 100755..100644 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /** | 1 | /** |
| 2 | * $Id: editor_plugin_src.js 961 2008-11-14 10:31:07Z spocke $ | 2 | * $Id: editor_plugin_src.js 1150 2009-06-01 11:50:46Z spocke $ |
| 3 | * | 3 | * |
| 4 | * @author Moxiecode | 4 | * @author Moxiecode |
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. |
| @@ -50,7 +50,7 @@ | |||
| 50 | 50 | ||
| 51 | // Only store selection if the type is a normal window | 51 | // Only store selection if the type is a normal window |
| 52 | if (!f.type) | 52 | if (!f.type) |
| 53 | t.bookmark = ed.selection.getBookmark('simple'); | 53 | t.bookmark = ed.selection.getBookmark(1); |
| 54 | 54 | ||
| 55 | id = DOM.uniqueId(); | 55 | id = DOM.uniqueId(); |
| 56 | vp = DOM.getViewPort(); | 56 | vp = DOM.getViewPort(); |
| @@ -266,7 +266,7 @@ | |||
| 266 | DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1); | 266 | DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1); |
| 267 | 267 | ||
| 268 | if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel)) | 268 | if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel)) |
| 269 | DOM.setStyles('mceModalBlocker', {position : 'absolute', width : vp.w - 2, height : vp.h - 2}); | 269 | DOM.setStyles('mceModalBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2}); |
| 270 | 270 | ||
| 271 | t.focus(id); | 271 | t.focus(id); |
| 272 | t._fixIELayout(id, 1); | 272 | t._fixIELayout(id, 1); |
| @@ -358,7 +358,7 @@ | |||
| 358 | }); | 358 | }); |
| 359 | 359 | ||
| 360 | if (tinymce.isIE6 || (tinymce.isIE && !DOM.boxModel)) | 360 | if (tinymce.isIE6 || (tinymce.isIE && !DOM.boxModel)) |
| 361 | DOM.setStyles('mceEventBlocker', {position : 'absolute', width : vp.w - 2, height : vp.h - 2}); | 361 | DOM.setStyles('mceEventBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2}); |
| 362 | 362 | ||
| 363 | eb = new Element('mceEventBlocker'); | 363 | eb = new Element('mceEventBlocker'); |
| 364 | eb.update(); | 364 | eb.update(); |
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 index 94abd08..94abd08 100755..100644 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +++ b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif | |||
| 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 index e671094..e671094 100755..100644 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +++ b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif | |||
| 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 index 6baf64a..6baf64a 100755..100644 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +++ b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif | |||
| 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 index 497307a..497307a 100755..100644 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +++ b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif | |||
| 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 index c894b2e..c894b2e 100755..100644 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +++ b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif | |||
| 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 index c2a2ad4..c2a2ad4 100755..100644 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +++ b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif | |||
| 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 index 43a735f..43a735f 100755..100644 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +++ b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif | |||
| 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 index 5e6fd7d..5e6fd7d 100755..100644 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +++ b/public/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css | |||
diff --git a/public/javascripts/tiny_mce/plugins/inlinepopups/template.htm b/public/javascripts/tiny_mce/plugins/inlinepopups/template.htm index f9ec642..f9ec642 100755..100644 --- a/public/javascripts/tiny_mce/plugins/inlinepopups/template.htm +++ b/public/javascripts/tiny_mce/plugins/inlinepopups/template.htm | |||
diff --git a/public/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin.js b/public/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin.js index 34d4cec..938ce6b 100755..100644 --- a/public/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.create('tinymce.plugins.InsertDateTime',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceInsertDate',function(){var str=t._getDateTime(new Date(),ed.getParam("plugin_insertdate_dateFormat",ed.getLang('insertdatetime.date_fmt')));ed.execCommand('mceInsertContent',false,str);});ed.addCommand('mceInsertTime',function(){var str=t._getDateTime(new Date(),ed.getParam("plugin_insertdate_timeFormat",ed.getLang('insertdatetime.time_fmt')));ed.execCommand('mceInsertContent',false,str);});ed.addButton('insertdate',{title:'insertdatetime.insertdate_desc',cmd:'mceInsertDate'});ed.addButton('inserttime',{title:'insertdatetime.inserttime_desc',cmd:'mceInsertTime'});},getInfo:function(){return{longname:'Insert date/time',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_getDateTime:function(d,fmt){var ed=this.editor;function addZeros(value,len){value=""+value;if(value.length<len){for(var i=0;i<(len-value.length);i++)value="0"+value;}return value;};fmt=fmt.replace("%D","%m/%d/%y");fmt=fmt.replace("%r","%I:%M:%S %p");fmt=fmt.replace("%Y",""+d.getFullYear());fmt=fmt.replace("%y",""+d.getYear());fmt=fmt.replace("%m",addZeros(d.getMonth()+1,2));fmt=fmt.replace("%d",addZeros(d.getDate(),2));fmt=fmt.replace("%H",""+addZeros(d.getHours(),2));fmt=fmt.replace("%M",""+addZeros(d.getMinutes(),2));fmt=fmt.replace("%S",""+addZeros(d.getSeconds(),2));fmt=fmt.replace("%I",""+((d.getHours()+11)%12+1));fmt=fmt.replace("%p",""+(d.getHours()<12?"AM":"PM"));fmt=fmt.replace("%B",""+ed.getLang("insertdatetime.months_long").split(',')[d.getMonth()]);fmt=fmt.replace("%b",""+ed.getLang("insertdatetime.months_short").split(',')[d.getMonth()]);fmt=fmt.replace("%A",""+ed.getLang("insertdatetime.day_long").split(',')[d.getDay()]);fmt=fmt.replace("%a",""+ed.getLang("insertdatetime.day_short").split(',')[d.getDay()]);fmt=fmt.replace("%%","%");return fmt;}});tinymce.PluginManager.add('insertdatetime',tinymce.plugins.InsertDateTime);})(); \ No newline at end of file | (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 index 9ab3135..9ab3135 100755..100644 --- a/public/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/layer/editor_plugin.js b/public/javascripts/tiny_mce/plugins/layer/editor_plugin.js index 4cd9427..f88a6dd 100755..100644 --- a/public/javascripts/tiny_mce/plugins/layer/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/layer/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.create('tinymce.plugins.Layer',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceInsertLayer',t._insertLayer,t);ed.addCommand('mceMoveForward',function(){t._move(1);});ed.addCommand('mceMoveBackward',function(){t._move(-1);});ed.addCommand('mceMakeAbsolute',function(){t._toggleAbsolute();});ed.addButton('moveforward',{title:'layer.forward_desc',cmd:'mceMoveForward'});ed.addButton('movebackward',{title:'layer.backward_desc',cmd:'mceMoveBackward'});ed.addButton('absolute',{title:'layer.absolute_desc',cmd:'mceMakeAbsolute'});ed.addButton('insertlayer',{title:'layer.insertlayer_desc',cmd:'mceInsertLayer'});ed.onInit.add(function(){if(tinymce.isIE)ed.getDoc().execCommand('2D-Position',false,true);});ed.onNodeChange.add(t._nodeChange,t);ed.onVisualAid.add(t._visualAid,t);},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(ed,cm,n){var le,p;le=this._getParentLayer(n);p=ed.dom.getParent(n,'DIV,P,IMG');if(!p){cm.setDisabled('absolute',1);cm.setDisabled('moveforward',1);cm.setDisabled('movebackward',1);}else{cm.setDisabled('absolute',0);cm.setDisabled('moveforward',!le);cm.setDisabled('movebackward',!le);cm.setActive('absolute',le&&le.style.position.toLowerCase()=="absolute");}},_visualAid:function(ed,e,s){var dom=ed.dom;tinymce.each(dom.select('div,p',e),function(e){if(/^(absolute|relative|static)$/i.test(e.style.position)){if(s)dom.addClass(e,'mceItemVisualAid');else dom.removeClass(e,'mceItemVisualAid');}});},_move:function(d){var ed=this.editor,i,z=[],le=this._getParentLayer(ed.selection.getNode()),ci=-1,fi=-1,nl;nl=[];tinymce.walk(ed.getBody(),function(n){if(n.nodeType==1&&/^(absolute|relative|static)$/i.test(n.style.position))nl.push(n);},'childNodes');for(i=0;i<nl.length;i++){z[i]=nl[i].style.zIndex?parseInt(nl[i].style.zIndex):0;if(ci<0&&nl[i]==le)ci=i;}if(d<0){for(i=0;i<z.length;i++){if(z[i]<z[ci]){fi=i;break;}}if(fi>-1){nl[ci].style.zIndex=z[fi];nl[fi].style.zIndex=z[ci];}else{if(z[ci]>0)nl[ci].style.zIndex=z[ci]-1;}}else{for(i=0;i<z.length;i++){if(z[i]>z[ci]){fi=i;break;}}if(fi>-1){nl[ci].style.zIndex=z[fi];nl[fi].style.zIndex=z[ci];}else nl[ci].style.zIndex=z[ci]+1;}ed.execCommand('mceRepaint');},_getParentLayer:function(n){return this.editor.dom.getParent(n,function(n){return n.nodeType==1&&/^(absolute|relative|static)$/i.test(n.style.position);});},_insertLayer:function(){var ed=this.editor,p=ed.dom.getPos(ed.dom.getParent(ed.selection.getNode(),'*'));ed.dom.add(ed.getBody(),'div',{style:{position:'absolute',left:p.x,top:(p.y>20?p.y:20),width:100,height:100},'class':'mceItemVisualAid'},ed.selection.getContent()||ed.getLang('layer.content'));},_toggleAbsolute:function(){var ed=this.editor,le=this._getParentLayer(ed.selection.getNode());if(!le)le=ed.dom.getParent(ed.selection.getNode(),'DIV,P,IMG');if(le){if(le.style.position.toLowerCase()=="absolute"){ed.dom.setStyles(le,{position:'',left:'',top:'',width:'',height:''});ed.dom.removeClass(le,'mceItemVisualAid');}else{if(le.style.left=="")le.style.left=20+'px';if(le.style.top=="")le.style.top=20+'px';if(le.style.width=="")le.style.width=le.width?(le.width+'px'):'100px';if(le.style.height=="")le.style.height=le.height?(le.height+'px'):'100px';le.style.position="absolute";ed.addVisual(ed.getBody());}ed.execCommand('mceRepaint');ed.nodeChanged();}}});tinymce.PluginManager.add('layer',tinymce.plugins.Layer);})(); \ No newline at end of file | (function(){tinymce.create("tinymce.plugins.Layer",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceInsertLayer",c._insertLayer,c);a.addCommand("mceMoveForward",function(){c._move(1)});a.addCommand("mceMoveBackward",function(){c._move(-1)});a.addCommand("mceMakeAbsolute",function(){c._toggleAbsolute()});a.addButton("moveforward",{title:"layer.forward_desc",cmd:"mceMoveForward"});a.addButton("movebackward",{title:"layer.backward_desc",cmd:"mceMoveBackward"});a.addButton("absolute",{title:"layer.absolute_desc",cmd:"mceMakeAbsolute"});a.addButton("insertlayer",{title:"layer.insertlayer_desc",cmd:"mceInsertLayer"});a.onInit.add(function(){if(tinymce.isIE){a.getDoc().execCommand("2D-Position",false,true)}});a.onNodeChange.add(c._nodeChange,c);a.onVisualAid.add(c._visualAid,c)},getInfo:function(){return{longname:"Layer",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var c,d;c=this._getParentLayer(e);d=b.dom.getParent(e,"DIV,P,IMG");if(!d){a.setDisabled("absolute",1);a.setDisabled("moveforward",1);a.setDisabled("movebackward",1)}else{a.setDisabled("absolute",0);a.setDisabled("moveforward",!c);a.setDisabled("movebackward",!c);a.setActive("absolute",c&&c.style.position.toLowerCase()=="absolute")}},_visualAid:function(a,c,b){var d=a.dom;tinymce.each(d.select("div,p",c),function(f){if(/^(absolute|relative|static)$/i.test(f.style.position)){if(b){d.addClass(f,"mceItemVisualAid")}else{d.removeClass(f,"mceItemVisualAid")}}})},_move:function(h){var b=this.editor,f,g=[],e=this._getParentLayer(b.selection.getNode()),c=-1,j=-1,a;a=[];tinymce.walk(b.getBody(),function(d){if(d.nodeType==1&&/^(absolute|relative|static)$/i.test(d.style.position)){a.push(d)}},"childNodes");for(f=0;f<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 index a72f6c3..a72f6c3 100755..100644 --- a/public/javascripts/tiny_mce/plugins/layer/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/layer/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/media/css/content.css b/public/javascripts/tiny_mce/plugins/media/css/content.css index 1bf6a75..1bf6a75 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/css/content.css +++ b/public/javascripts/tiny_mce/plugins/media/css/content.css | |||
diff --git a/public/javascripts/tiny_mce/plugins/media/css/media.css b/public/javascripts/tiny_mce/plugins/media/css/media.css index 2d08794..2d08794 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/css/media.css +++ b/public/javascripts/tiny_mce/plugins/media/css/media.css | |||
diff --git a/public/javascripts/tiny_mce/plugins/media/editor_plugin.js b/public/javascripts/tiny_mce/plugins/media/editor_plugin.js index b226b00..951d1e4 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/media/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){var each=tinymce.each;tinymce.create('tinymce.plugins.MediaPlugin',{init:function(ed,url){var t=this;t.editor=ed;t.url=url;function isMediaElm(n){return/^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(n.className);};ed.onPreInit.add(function(){ed.serializer.addRules('param[name|value|_mce_value]');});ed.addCommand('mceMedia',function(){ed.windowManager.open({file:url+'/media.htm',width:430+parseInt(ed.getLang('media.delta_width',0)),height:470+parseInt(ed.getLang('media.delta_height',0)),inline:1},{plugin_url:url});});ed.addButton('media',{title:'media.desc',cmd:'mceMedia'});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('media',n.nodeName=='IMG'&&isMediaElm(n));});ed.onInit.add(function(){var lo={mceItemFlash:'flash',mceItemShockWave:'shockwave',mceItemWindowsMedia:'windowsmedia',mceItemQuickTime:'quicktime',mceItemRealMedia:'realmedia'};ed.selection.onSetContent.add(function(){t._spansToImgs(ed.getBody());});ed.selection.onBeforeSetContent.add(t._objectsToSpans,t);if(ed.settings.content_css!==false)ed.dom.loadCSS(url+"/css/content.css");if(ed.theme.onResolveName){ed.theme.onResolveName.add(function(th,o){if(o.name=='img'){each(lo,function(v,k){if(ed.dom.hasClass(o.node,k)){o.name=v;o.title=ed.dom.getAttrib(o.node,'title');return false;}});}});}if(ed&&ed.plugins.contextmenu){ed.plugins.contextmenu.onContextMenu.add(function(th,m,e){if(e.nodeName=='IMG'&&/mceItem(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)/.test(e.className)){m.add({title:'media.edit',icon:'media',cmd:'mceMedia'});}});}});ed.onBeforeSetContent.add(t._objectsToSpans,t);ed.onSetContent.add(function(){t._spansToImgs(ed.getBody());});ed.onPreProcess.add(function(ed,o){var dom=ed.dom;if(o.set){t._spansToImgs(o.node);each(dom.select('IMG',o.node),function(n){var p;if(isMediaElm(n)){p=t._parse(n.title);dom.setAttrib(n,'width',dom.getAttrib(n,'width',p.width||100));dom.setAttrib(n,'height',dom.getAttrib(n,'height',p.height||100));}});}if(o.get){each(dom.select('IMG',o.node),function(n){var ci,cb,mt;if(ed.getParam('media_use_script')){if(isMediaElm(n))n.className=n.className.replace(/mceItem/g,'mceTemp');return;}switch(n.className){case'mceItemFlash':ci='d27cdb6e-ae6d-11cf-96b8-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='application/x-shockwave-flash';break;case'mceItemShockWave':ci='166b1bca-3f9c-11cf-8075-444553540000';cb='http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0';mt='application/x-director';break;case'mceItemWindowsMedia':ci=ed.getParam('media_wmp6_compatible')?'05589fa1-c356-11ce-bf01-00aa0055595a':'6bf52a52-394a-11d3-b153-00c04f79faa6';cb='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701';mt='application/x-mplayer2';break;case'mceItemQuickTime':ci='02bf25d5-8c17-4b23-bc80-d3488abddc6b';cb='http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0';mt='video/quicktime';break;case'mceItemRealMedia':ci='cfcdaa03-8be4-11cf-b84b-0020afbbccfa';cb='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0';mt='audio/x-pn-realaudio-plugin';break;}if(ci){dom.replace(t._buildObj({classid:ci,codebase:cb,type:mt},n),n);}});}});ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/_mce_value=/g,'value=');});if(ed.getParam('media_use_script')){function getAttr(s,n){n=new RegExp(n+'=\"([^\"]+)\"','g').exec(s);return n?ed.dom.decode(n[1]):'';};ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/<img[^>]+>/g,function(im){var cl=getAttr(im,'class');if(/^(mceTempFlash|mceTempShockWave|mceTempWindowsMedia|mceTempQuickTime|mceTempRealMedia)$/.test(cl)){at=t._parse(getAttr(im,'title'));at.width=getAttr(im,'width');at.height=getAttr(im,'height');im='<script type="text/javascript">write'+cl.substring(7)+'({'+t._serialize(at)+'});</script>';}return im;});});}},getInfo:function(){return{longname:'Media',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_objectsToSpans:function(ed,o){var t=this,h=o.content;h=h.replace(/<script[^>]*>\s*write(Flash|ShockWave|WindowsMedia|QuickTime|RealMedia)\(\{([^\)]*)\}\);\s*<\/script>/gi,function(a,b,c){var o=t._parse(c);return'<img class="mceItem'+b+'" title="'+ed.dom.encode(c)+'" src="'+t.url+'/img/trans.gif" width="'+o.width+'" height="'+o.height+'" />'});h=h.replace(/<object([^>]*)>/gi,'<span class="mceItemObject" $1>');h=h.replace(/<embed([^>]*)\/?>/gi,'<span class="mceItemEmbed" $1></span>');h=h.replace(/<embed([^>]*)>/gi,'<span class="mceItemEmbed" $1>');h=h.replace(/<\/(object)([^>]*)>/gi,'</span>');h=h.replace(/<\/embed>/gi,'');h=h.replace(/<param([^>]*)>/gi,function(a,b){return'<span '+b.replace(/value=/gi,'_mce_value=')+' class="mceItemParam"></span>'});h=h.replace(/\/ class=\"mceItemParam\"><\/span>/gi,'class="mceItemParam"></span>');o.content=h;},_buildObj:function(o,n){var ob,ed=this.editor,dom=ed.dom,p=this._parse(n.title),stc;stc=ed.getParam('media_strict',true)&&o.type=='application/x-shockwave-flash';p.width=o.width=dom.getAttrib(n,'width')||100;p.height=o.height=dom.getAttrib(n,'height')||100;if(p.src)p.src=ed.convertURL(p.src,'src',n);if(stc){ob=dom.create('span',{mce_name:'object',type:'application/x-shockwave-flash',data:p.src,width:o.width,height:o.height});}else{ob=dom.create('span',{mce_name:'object',classid:"clsid:"+o.classid,codebase:o.codebase,width:o.width,height:o.height});}each(p,function(v,k){if(!/^(width|height|codebase|classid|_cx|_cy)$/.test(k)){if(o.type=='application/x-mplayer2'&&k=='src')k='url';if(v)dom.add(ob,'span',{mce_name:'param',name:k,'_mce_value':v});}});if(!stc)dom.add(ob,'span',tinymce.extend({mce_name:'embed',type:o.type},p));return ob;},_spansToImgs:function(p){var t=this,dom=t.editor.dom,im,ci;each(dom.select('span',p),function(n){if(dom.getAttrib(n,'class')=='mceItemObject'){ci=dom.getAttrib(n,"classid").toLowerCase().replace(/\s+/g,'');switch(ci){case'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000':dom.replace(t._createImg('mceItemFlash',n),n);break;case'clsid:166b1bca-3f9c-11cf-8075-444553540000':dom.replace(t._createImg('mceItemShockWave',n),n);break;case'clsid:6bf52a52-394a-11d3-b153-00c04f79faa6':case'clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95':case'clsid:05589fa1-c356-11ce-bf01-00aa0055595a':dom.replace(t._createImg('mceItemWindowsMedia',n),n);break;case'clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b':dom.replace(t._createImg('mceItemQuickTime',n),n);break;case'clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa':dom.replace(t._createImg('mceItemRealMedia',n),n);break;default:dom.replace(t._createImg('mceItemFlash',n),n);}return;}if(dom.getAttrib(n,'class')=='mceItemEmbed'){switch(dom.getAttrib(n,'type')){case'application/x-shockwave-flash':dom.replace(t._createImg('mceItemFlash',n),n);break;case'application/x-director':dom.replace(t._createImg('mceItemShockWave',n),n);break;case'application/x-mplayer2':dom.replace(t._createImg('mceItemWindowsMedia',n),n);break;case'video/quicktime':dom.replace(t._createImg('mceItemQuickTime',n),n);break;case'audio/x-pn-realaudio-plugin':dom.replace(t._createImg('mceItemRealMedia',n),n);break;default:dom.replace(t._createImg('mceItemFlash',n),n);}}});},_createImg:function(cl,n){var im,dom=this.editor.dom,pa={},ti='',args;args=['id','name','width','height','bgcolor','align','flashvars','src','wmode','allowfullscreen','quality'];im=dom.create('img',{src:this.url+'/img/trans.gif',width:dom.getAttrib(n,'width')||100,height:dom.getAttrib(n,'height')||100,'class':cl});each(args,function(na){var v=dom.getAttrib(n,na);if(v)pa[na]=v;});each(dom.select('span',n),function(n){if(dom.hasClass(n,'mceItemParam'))pa[dom.getAttrib(n,'name')]=dom.getAttrib(n,'_mce_value');});if(pa.movie){pa.src=pa.movie;delete pa.movie;}n=dom.select('.mceItemEmbed',n)[0];if(n){each(args,function(na){var v=dom.getAttrib(n,na);if(v&&!pa[na])pa[na]=v;});}delete pa.width;delete pa.height;im.title=this._serialize(pa);return im;},_parse:function(s){return tinymce.util.JSON.parse('{'+s+'}');},_serialize:function(o){return tinymce.util.JSON.serialize(o).replace(/[{}]/g,'');}});tinymce.PluginManager.add('media',tinymce.plugins.MediaPlugin);})(); \ No newline at end of file | (function(){var a=tinymce.each;tinymce.create("tinymce.plugins.MediaPlugin",{init:function(b,c){var e=this;e.editor=b;e.url=c;function f(g){return/^(mceItemFlash|mceItemShockWave|mceItemWindowsMedia|mceItemQuickTime|mceItemRealMedia)$/.test(g.className)}b.onPreInit.add(function(){b.serializer.addRules("param[name|value|_mce_value]")});b.addCommand("mceMedia",function(){b.windowManager.open({file:c+"/media.htm",width:430+parseInt(b.getLang("media.delta_width",0)),height:470+parseInt(b.getLang("media.delta_height",0)),inline:1},{plugin_url:c})});b.addButton("media",{title:"media.desc",cmd:"mceMedia"});b.onNodeChange.add(function(h,g,i){g.setActive("media",i.nodeName=="IMG"&&f(i))});b.onInit.add(function(){var g={mceItemFlash:"flash",mceItemShockWave:"shockwave",mceItemWindowsMedia:"windowsmedia",mceItemQuickTime:"quicktime",mceItemRealMedia:"realmedia"};b.selection.onSetContent.add(function(){e._spansToImgs(b.getBody())});b.selection.onBeforeSetContent.add(e._objectsToSpans,e);if(b.settings.content_css!==false){b.dom.loadCSS(c+"/css/content.css")}if(b.theme.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"];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}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 index beec3bf..faa0cf7 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/media/editor_plugin_src.js | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /** | 1 | /** |
| 2 | * $Id: editor_plugin_src.js 952 2008-11-03 17:56:04Z spocke $ | 2 | * $Id: editor_plugin_src.js 1037 2009-03-02 16:41:15Z spocke $ |
| 3 | * | 3 | * |
| 4 | * @author Moxiecode | 4 | * @author Moxiecode |
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. |
| @@ -165,14 +165,14 @@ | |||
| 165 | o.content = o.content.replace(/_mce_value=/g, 'value='); | 165 | o.content = o.content.replace(/_mce_value=/g, 'value='); |
| 166 | }); | 166 | }); |
| 167 | 167 | ||
| 168 | if (ed.getParam('media_use_script')) { | 168 | function getAttr(s, n) { |
| 169 | function getAttr(s, n) { | 169 | n = new RegExp(n + '=\"([^\"]+)\"', 'g').exec(s); |
| 170 | n = new RegExp(n + '=\"([^\"]+)\"', 'g').exec(s); | ||
| 171 | 170 | ||
| 172 | return n ? ed.dom.decode(n[1]) : ''; | 171 | return n ? ed.dom.decode(n[1]) : ''; |
| 173 | }; | 172 | }; |
| 174 | 173 | ||
| 175 | ed.onPostProcess.add(function(ed, o) { | 174 | ed.onPostProcess.add(function(ed, o) { |
| 175 | if (ed.getParam('media_use_script')) { | ||
| 176 | o.content = o.content.replace(/<img[^>]+>/g, function(im) { | 176 | o.content = o.content.replace(/<img[^>]+>/g, function(im) { |
| 177 | var cl = getAttr(im, 'class'); | 177 | var cl = getAttr(im, 'class'); |
| 178 | 178 | ||
| @@ -185,8 +185,8 @@ | |||
| 185 | 185 | ||
| 186 | return im; | 186 | return im; |
| 187 | }); | 187 | }); |
| 188 | }); | 188 | } |
| 189 | } | 189 | }); |
| 190 | }, | 190 | }, |
| 191 | 191 | ||
| 192 | getInfo : function() { | 192 | getInfo : function() { |
| @@ -233,16 +233,20 @@ | |||
| 233 | 233 | ||
| 234 | if (stc) { | 234 | if (stc) { |
| 235 | ob = dom.create('span', { | 235 | ob = dom.create('span', { |
| 236 | id : p.id, | ||
| 236 | mce_name : 'object', | 237 | mce_name : 'object', |
| 237 | type : 'application/x-shockwave-flash', | 238 | type : 'application/x-shockwave-flash', |
| 238 | data : p.src, | 239 | data : p.src, |
| 240 | style : dom.getAttrib(n, 'style'), | ||
| 239 | width : o.width, | 241 | width : o.width, |
| 240 | height : o.height | 242 | height : o.height |
| 241 | }); | 243 | }); |
| 242 | } else { | 244 | } else { |
| 243 | ob = dom.create('span', { | 245 | ob = dom.create('span', { |
| 246 | id : p.id, | ||
| 244 | mce_name : 'object', | 247 | mce_name : 'object', |
| 245 | classid : "clsid:" + o.classid, | 248 | classid : "clsid:" + o.classid, |
| 249 | style : dom.getAttrib(n, 'style'), | ||
| 246 | codebase : o.codebase, | 250 | codebase : o.codebase, |
| 247 | width : o.width, | 251 | width : o.width, |
| 248 | height : o.height | 252 | height : o.height |
| @@ -250,9 +254,9 @@ | |||
| 250 | } | 254 | } |
| 251 | 255 | ||
| 252 | each (p, function(v, k) { | 256 | each (p, function(v, k) { |
| 253 | if (!/^(width|height|codebase|classid|_cx|_cy)$/.test(k)) { | 257 | if (!/^(width|height|codebase|classid|id|_cx|_cy)$/.test(k)) { |
| 254 | // Use url instead of src in IE for Windows media | 258 | // Use url instead of src in IE for Windows media |
| 255 | if (o.type == 'application/x-mplayer2' && k == 'src') | 259 | if (o.type == 'application/x-mplayer2' && k == 'src' && !p.url) |
| 256 | k = 'url'; | 260 | k = 'url'; |
| 257 | 261 | ||
| 258 | if (v) | 262 | if (v) |
| @@ -261,7 +265,7 @@ | |||
| 261 | }); | 265 | }); |
| 262 | 266 | ||
| 263 | if (!stc) | 267 | if (!stc) |
| 264 | dom.add(ob, 'span', tinymce.extend({mce_name : 'embed', type : o.type}, p)); | 268 | dom.add(ob, 'span', tinymce.extend({mce_name : 'embed', type : o.type, style : dom.getAttrib(n, 'style')}, p)); |
| 265 | 269 | ||
| 266 | return ob; | 270 | return ob; |
| 267 | }, | 271 | }, |
| @@ -344,6 +348,7 @@ | |||
| 344 | src : this.url + '/img/trans.gif', | 348 | src : this.url + '/img/trans.gif', |
| 345 | width : dom.getAttrib(n, 'width') || 100, | 349 | width : dom.getAttrib(n, 'width') || 100, |
| 346 | height : dom.getAttrib(n, 'height') || 100, | 350 | height : dom.getAttrib(n, 'height') || 100, |
| 351 | style : dom.getAttrib(n, 'style'), | ||
| 347 | 'class' : cl | 352 | 'class' : cl |
| 348 | }); | 353 | }); |
| 349 | 354 | ||
diff --git a/public/javascripts/tiny_mce/plugins/media/img/flash.gif b/public/javascripts/tiny_mce/plugins/media/img/flash.gif index cb192e6..cb192e6 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/img/flash.gif +++ b/public/javascripts/tiny_mce/plugins/media/img/flash.gif | |||
| 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 index 042c2ab..042c2ab 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/img/flv_player.swf +++ b/public/javascripts/tiny_mce/plugins/media/img/flv_player.swf | |||
| 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 index 3b04991..3b04991 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/img/quicktime.gif +++ b/public/javascripts/tiny_mce/plugins/media/img/quicktime.gif | |||
| 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 index fdfe0b9..fdfe0b9 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/img/realmedia.gif +++ b/public/javascripts/tiny_mce/plugins/media/img/realmedia.gif | |||
| 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 index 5f235df..5f235df 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/img/shockwave.gif +++ b/public/javascripts/tiny_mce/plugins/media/img/shockwave.gif | |||
| 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 index 3884865..3884865 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/img/trans.gif +++ b/public/javascripts/tiny_mce/plugins/media/img/trans.gif | |||
| 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 index ab50f2d..ab50f2d 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/img/windowsmedia.gif +++ b/public/javascripts/tiny_mce/plugins/media/img/windowsmedia.gif | |||
| 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 index f8dc810..f8dc810 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/js/embed.js +++ b/public/javascripts/tiny_mce/plugins/media/js/embed.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/media/js/media.js b/public/javascripts/tiny_mce/plugins/media/js/media.js index fa8e142..86cfa98 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/js/media.js +++ b/public/javascripts/tiny_mce/plugins/media/js/media.js | |||
| @@ -218,7 +218,7 @@ function insertMedia() { | |||
| 218 | break; | 218 | break; |
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | if (fe.width != f.width.value || fe.height != f.height.height) | 221 | if (fe.width != f.width.value || fe.height != f.height.value) |
| 222 | ed.execCommand('mceRepaint'); | 222 | ed.execCommand('mceRepaint'); |
| 223 | 223 | ||
| 224 | fe.title = serializeParameters(); | 224 | fe.title = serializeParameters(); |
| @@ -469,7 +469,7 @@ function setBool(pl, p, n) { | |||
| 469 | if (typeof(pl[n]) == "undefined") | 469 | if (typeof(pl[n]) == "undefined") |
| 470 | return; | 470 | return; |
| 471 | 471 | ||
| 472 | document.forms[0].elements[p + "_" + n].checked = pl[n]; | 472 | document.forms[0].elements[p + "_" + n].checked = pl[n] != 'false'; |
| 473 | } | 473 | } |
| 474 | 474 | ||
| 475 | function setStr(pl, p, n) { | 475 | function setStr(pl, p, n) { |
| @@ -490,7 +490,7 @@ function getBool(p, n, d, tv, fv) { | |||
| 490 | tv = typeof(tv) == 'undefined' ? 'true' : "'" + jsEncode(tv) + "'"; | 490 | tv = typeof(tv) == 'undefined' ? 'true' : "'" + jsEncode(tv) + "'"; |
| 491 | fv = typeof(fv) == 'undefined' ? 'false' : "'" + jsEncode(fv) + "'"; | 491 | fv = typeof(fv) == 'undefined' ? 'false' : "'" + jsEncode(fv) + "'"; |
| 492 | 492 | ||
| 493 | return (v == d) ? '' : n + (v ? ':' + tv + ',' : ':' + fv + ','); | 493 | return (v == d) ? '' : n + (v ? ':' + tv + ',' : ":\'" + fv + "\',"); |
| 494 | } | 494 | } |
| 495 | 495 | ||
| 496 | function getStr(p, n, d) { | 496 | function getStr(p, n, d) { |
diff --git a/public/javascripts/tiny_mce/plugins/media/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/media/langs/en_dlg.js index 6d0a996..6d0a996 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/langs/en_dlg.js +++ b/public/javascripts/tiny_mce/plugins/media/langs/en_dlg.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/media/media.htm b/public/javascripts/tiny_mce/plugins/media/media.htm index 8b3bc1d..911c03d 100755..100644 --- a/public/javascripts/tiny_mce/plugins/media/media.htm +++ b/public/javascripts/tiny_mce/plugins/media/media.htm | |||
| @@ -9,7 +9,6 @@ | |||
| 9 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | 9 | <script type="text/javascript" src="../../utils/form_utils.js"></script> |
| 10 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> | 10 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> |
| 11 | <link href="css/media.css" rel="stylesheet" type="text/css" /> | 11 | <link href="css/media.css" rel="stylesheet" type="text/css" /> |
| 12 | <base target="_self" /> | ||
| 13 | </head> | 12 | </head> |
| 14 | <body style="display: none"> | 13 | <body style="display: none"> |
| 15 | <form onsubmit="insertMedia();return false;" action="#"> | 14 | <form onsubmit="insertMedia();return false;" action="#"> |
| @@ -52,7 +51,7 @@ | |||
| 52 | </tr> | 51 | </tr> |
| 53 | <tr id="linklistrow"> | 52 | <tr id="linklistrow"> |
| 54 | <td><label for="linklist">{#media_dlg.list}</label></td> | 53 | <td><label for="linklist">{#media_dlg.list}</label></td> |
| 55 | <td id="linklistcontainer"> </td> | 54 | <td id="linklistcontainer"><select id="linklist"><option value=""></option></select></td> |
| 56 | </tr> | 55 | </tr> |
| 57 | <tr> | 56 | <tr> |
| 58 | <td><label for="width">{#media_dlg.size}</label></td> | 57 | <td><label for="width">{#media_dlg.size}</label></td> |
| @@ -260,8 +259,7 @@ | |||
| 260 | <td><label for="flv_defaultvolume">{#media_dlg.flv_defaultvolume}</label></td> | 259 | <td><label for="flv_defaultvolume">{#media_dlg.flv_defaultvolume}</label></td> |
| 261 | <td><input type="text" id="flv_defaultvolume" name="flv_defaultvolume" onchange="generatePreview();" /></td> | 260 | <td><input type="text" id="flv_defaultvolume" name="flv_defaultvolume" onchange="generatePreview();" /></td> |
| 262 | 261 | ||
| 263 | <td><label for="flv_starttime">{#media_dlg.flv_starttime}</label></td> | 262 | |
| 264 | <td><input type="text" id="flv_starttime" name="flv_starttime" onchange="generatePreview();" /></td> | ||
| 265 | </tr> | 263 | </tr> |
| 266 | 264 | ||
| 267 | <tr> | 265 | <tr> |
diff --git a/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js b/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js index 4fce503..f2dbbff 100755..100644 --- a/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.create('tinymce.plugins.Nonbreaking',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceNonBreaking',function(){ed.execCommand('mceInsertContent',false,(ed.plugins.visualchars&&ed.plugins.visualchars.state)?'<span class="mceItemHidden mceVisualNbsp">·</span>':' ');});ed.addButton('nonbreaking',{title:'nonbreaking.nonbreaking_desc',cmd:'mceNonBreaking'});if(ed.getParam('nonbreaking_force_tab')){ed.onKeyDown.add(function(ed,e){if(tinymce.isIE&&e.keyCode==9){ed.execCommand('mceNonBreaking');ed.execCommand('mceNonBreaking');ed.execCommand('mceNonBreaking');tinymce.dom.Event.cancel(e);}});}},getInfo:function(){return{longname:'Nonbreaking space',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('nonbreaking',tinymce.plugins.Nonbreaking);})(); \ No newline at end of file | (function(){tinymce.create("tinymce.plugins.Nonbreaking",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceNonBreaking",function(){a.execCommand("mceInsertContent",false,(a.plugins.visualchars&&a.plugins.visualchars.state)?'<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 index b723756..b723756 100755..100644 --- a/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/noneditable/editor_plugin.js b/public/javascripts/tiny_mce/plugins/noneditable/editor_plugin.js index 8a1b8f0..9945cd8 100755..100644 --- a/public/javascripts/tiny_mce/plugins/noneditable/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/noneditable/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){var Event=tinymce.dom.Event;tinymce.create('tinymce.plugins.NonEditablePlugin',{init:function(ed,url){var t=this,editClass,nonEditClass;t.editor=ed;editClass=ed.getParam("noneditable_editable_class","mceEditable");nonEditClass=ed.getParam("noneditable_noneditable_class","mceNonEditable");ed.onNodeChange.addToTop(function(ed,cm,n){var sc,ec;sc=ed.dom.getParent(ed.selection.getStart(),function(n){return ed.dom.hasClass(n,nonEditClass);});ec=ed.dom.getParent(ed.selection.getEnd(),function(n){return ed.dom.hasClass(n,nonEditClass);});if(sc||ec){t._setDisabled(1);return false;}else t._setDisabled(0);});},getInfo:function(){return{longname:'Non editable elements',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_block:function(ed,e){var k=e.keyCode;if((k>32&&k<41)||(k>111&&k<124))return;return Event.cancel(e);},_setDisabled:function(s){var t=this,ed=t.editor;tinymce.each(ed.controlManager.controls,function(c){c.setDisabled(s);});if(s!==t.disabled){if(s){ed.onKeyDown.addToTop(t._block);ed.onKeyPress.addToTop(t._block);ed.onKeyUp.addToTop(t._block);ed.onPaste.addToTop(t._block);}else{ed.onKeyDown.remove(t._block);ed.onKeyPress.remove(t._block);ed.onKeyUp.remove(t._block);ed.onPaste.remove(t._block);}t.disabled=s;}}});tinymce.PluginManager.add('noneditable',tinymce.plugins.NonEditablePlugin);})(); \ No newline at end of file | (function(){var a=tinymce.dom.Event;tinymce.create("tinymce.plugins.NonEditablePlugin",{init:function(d,e){var f=this,c,b;f.editor=d;c=d.getParam("noneditable_editable_class","mceEditable");b=d.getParam("noneditable_noneditable_class","mceNonEditable");d.onNodeChange.addToTop(function(h,g,k){var j,i;j=h.dom.getParent(h.selection.getStart(),function(l){return h.dom.hasClass(l,b)});i=h.dom.getParent(h.selection.getEnd(),function(l){return h.dom.hasClass(l,b)});if(j||i){f._setDisabled(1);return false}else{f._setDisabled(0)}})},getInfo:function(){return{longname:"Non editable elements",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_block:function(c,d){var b=d.keyCode;if((b>32&&b<41)||(b>111&&b<124)){return}return a.cancel(d)},_setDisabled:function(d){var c=this,b=c.editor;tinymce.each(b.controlManager.controls,function(e){e.setDisabled(d)});if(d!==c.disabled){if(d){b.onKeyDown.addToTop(c._block);b.onKeyPress.addToTop(c._block);b.onKeyUp.addToTop(c._block);b.onPaste.addToTop(c._block)}else{b.onKeyDown.remove(c._block);b.onKeyPress.remove(c._block);b.onKeyUp.remove(c._block);b.onPaste.remove(c._block)}c.disabled=d}}});tinymce.PluginManager.add("noneditable",tinymce.plugins.NonEditablePlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/noneditable/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/noneditable/editor_plugin_src.js index 77db577..77db577 100755..100644 --- a/public/javascripts/tiny_mce/plugins/noneditable/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/noneditable/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/pagebreak/css/content.css b/public/javascripts/tiny_mce/plugins/pagebreak/css/content.css index c949d58..c949d58 100755..100644 --- a/public/javascripts/tiny_mce/plugins/pagebreak/css/content.css +++ b/public/javascripts/tiny_mce/plugins/pagebreak/css/content.css | |||
diff --git a/public/javascripts/tiny_mce/plugins/pagebreak/editor_plugin.js b/public/javascripts/tiny_mce/plugins/pagebreak/editor_plugin.js index 177ea95..a212f69 100755..100644 --- a/public/javascripts/tiny_mce/plugins/pagebreak/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/pagebreak/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.create('tinymce.plugins.PageBreakPlugin',{init:function(ed,url){var pb='<img src="'+url+'/img/trans.gif" class="mcePageBreak mceItemNoResize" />',cls='mcePageBreak',sep=ed.getParam('pagebreak_separator','<!-- pagebreak -->'),pbRE;pbRE=new RegExp(sep.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(a){return'\\'+a;}),'g');ed.addCommand('mcePageBreak',function(){ed.execCommand('mceInsertContent',0,pb);});ed.addButton('pagebreak',{title:'pagebreak.desc',cmd:cls});ed.onInit.add(function(){if(ed.settings.content_css!==false)ed.dom.loadCSS(url+"/css/content.css");if(ed.theme.onResolveName){ed.theme.onResolveName.add(function(th,o){if(o.node.nodeName=='IMG'&&ed.dom.hasClass(o.node,cls))o.name='pagebreak';});}});ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName==='IMG'&&ed.dom.hasClass(e,cls))ed.selection.select(e);});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('pagebreak',n.nodeName==='IMG'&&ed.dom.hasClass(n,cls));});ed.onBeforeSetContent.add(function(ed,o){o.content=o.content.replace(pbRE,pb);});ed.onPostProcess.add(function(ed,o){if(o.get)o.content=o.content.replace(/<img[^>]+>/g,function(im){if(im.indexOf('class="mcePageBreak')!==-1)im=sep;return im;});});},getInfo:function(){return{longname:'PageBreak',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('pagebreak',tinymce.plugins.PageBreakPlugin);})(); \ No newline at end of file | (function(){tinymce.create("tinymce.plugins.PageBreakPlugin",{init:function(b,d){var f='<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 index 16f5748..16f5748 100755..100644 --- a/public/javascripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/pagebreak/img/pagebreak.gif b/public/javascripts/tiny_mce/plugins/pagebreak/img/pagebreak.gif index acdf408..acdf408 100755..100644 --- a/public/javascripts/tiny_mce/plugins/pagebreak/img/pagebreak.gif +++ b/public/javascripts/tiny_mce/plugins/pagebreak/img/pagebreak.gif | |||
| 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 index 3884865..3884865 100755..100644 --- a/public/javascripts/tiny_mce/plugins/pagebreak/img/trans.gif +++ b/public/javascripts/tiny_mce/plugins/pagebreak/img/trans.gif | |||
| Binary files differ | |||
diff --git a/public/javascripts/tiny_mce/plugins/paste/blank.htm b/public/javascripts/tiny_mce/plugins/paste/blank.htm deleted file mode 100755 index 7ba26bd..0000000 --- a/public/javascripts/tiny_mce/plugins/paste/blank.htm +++ /dev/null | |||
| @@ -1,22 +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 | <link href="css/blank.css" rel="stylesheet" type="text/css" /> | ||
| 6 | <base target="_self" /> | ||
| 7 | <script type="text/javascript"> | ||
| 8 | function init() { | ||
| 9 | if (parent.tinymce.isIE) | ||
| 10 | document.body.contentEditable = true; | ||
| 11 | else | ||
| 12 | document.designMode = 'on'; | ||
| 13 | |||
| 14 | parent.initIframe(document); | ||
| 15 | window.focus(); | ||
| 16 | } | ||
| 17 | </script> | ||
| 18 | </head> | ||
| 19 | <body onload="init();"> | ||
| 20 | |||
| 21 | </body> | ||
| 22 | </html> | ||
diff --git a/public/javascripts/tiny_mce/plugins/paste/css/blank.css b/public/javascripts/tiny_mce/plugins/paste/css/blank.css deleted file mode 100755 index 6b16bac..0000000 --- a/public/javascripts/tiny_mce/plugins/paste/css/blank.css +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | html, body {height:98%} | ||
| 2 | body { | ||
| 3 | background-color: #FFFFFF; | ||
| 4 | font-family: Verdana, Arial, Helvetica, sans-serif; | ||
| 5 | font-size: 10px; | ||
| 6 | scrollbar-3dlight-color: #F0F0EE; | ||
| 7 | scrollbar-arrow-color: #676662; | ||
| 8 | scrollbar-base-color: #F0F0EE; | ||
| 9 | scrollbar-darkshadow-color: #DDDDDD; | ||
| 10 | scrollbar-face-color: #E0E0DD; | ||
| 11 | scrollbar-highlight-color: #F0F0EE; | ||
| 12 | scrollbar-shadow-color: #F0F0EE; | ||
| 13 | scrollbar-track-color: #F5F5F5; | ||
| 14 | } | ||
diff --git a/public/javascripts/tiny_mce/plugins/paste/css/pasteword.css b/public/javascripts/tiny_mce/plugins/paste/css/pasteword.css deleted file mode 100755 index b3be627..0000000 --- a/public/javascripts/tiny_mce/plugins/paste/css/pasteword.css +++ /dev/null | |||
| @@ -1,3 +0,0 @@ | |||
| 1 | .sourceIframe { | ||
| 2 | border: 1px solid #808080; | ||
| 3 | } | ||
diff --git a/public/javascripts/tiny_mce/plugins/paste/editor_plugin.js b/public/javascripts/tiny_mce/plugins/paste/editor_plugin.js index eeeebd5..473bb85 100755..100644 --- a/public/javascripts/tiny_mce/plugins/paste/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/paste/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){var Event=tinymce.dom.Event;tinymce.create('tinymce.plugins.PastePlugin',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mcePasteText',function(ui,v){if(ui){if((ed.getParam('paste_use_dialog',true))||(!tinymce.isIE)){ed.windowManager.open({file:url+'/pastetext.htm',width:450,height:400,inline:1},{plugin_url:url});}else t._insertText(clipboardData.getData("Text"),true);}else t._insertText(v.html,v.linebreaks);});ed.addCommand('mcePasteWord',function(ui,v){if(ui){if((ed.getParam('paste_use_dialog',true))||(!tinymce.isIE)){ed.windowManager.open({file:url+'/pasteword.htm',width:450,height:400,inline:1},{plugin_url:url});}else t._insertText(t._clipboardHTML());}else t._insertWordContent(v);});ed.addCommand('mceSelectAll',function(){ed.execCommand('selectall');});ed.addButton('pastetext',{title:'paste.paste_text_desc',cmd:'mcePasteText',ui:true});ed.addButton('pasteword',{title:'paste.paste_word_desc',cmd:'mcePasteWord',ui:true});ed.addButton('selectall',{title:'paste.selectall_desc',cmd:'mceSelectAll'});if(ed.getParam("paste_auto_cleanup_on_paste",false)){ed.onPaste.add(function(ed,e){return t._handlePasteEvent(e)});}if(!tinymce.isIE&&ed.getParam("paste_auto_cleanup_on_paste",false)){ed.onKeyDown.add(function(ed,e){if(e.ctrlKey&&e.keyCode==86){window.setTimeout(function(){ed.execCommand("mcePasteText",true);},1);Event.cancel(e);}});}},getInfo:function(){return{longname:'Paste text/word',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_handlePasteEvent:function(e){var html=this._clipboardHTML(),ed=this.editor,sel=ed.selection,r;if(ed&&(r=sel.getRng())&&r.text.length>0)ed.execCommand('delete');if(html&&html.length>0)ed.execCommand('mcePasteWord',false,html);return Event.cancel(e);},_insertText:function(content,bLinebreaks){content=this.editor.dom.encode(content);if(content&&content.length>0){if(!this.editor.selection.isCollapsed())this.editor.execCommand("Delete");if(bLinebreaks){if(this.editor.getParam("paste_create_paragraphs",true)){var rl=this.editor.getParam("paste_replace_list",'\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');for(var i=0;i<rl.length;i+=2)content=content.replace(new RegExp(rl[i],'gi'),rl[i+1]);content=content.replace(/\r\n\r\n/g,'</p><p>');content=content.replace(/\r\r/g,'</p><p>');content=content.replace(/\n\n/g,'</p><p>');if((pos=content.indexOf('</p><p>'))!=-1){this.editor.execCommand("Delete");var node=this.editor.selection.getNode();var breakElms=[];do{if(node.nodeType==1){if(node.nodeName=="TD"||node.nodeName=="BODY")break;breakElms[breakElms.length]=node;}}while(node=node.parentNode);var before="",after="</p>";before+=content.substring(0,pos);for(var i=0;i<breakElms.length;i++){before+="</"+breakElms[i].nodeName+">";after+="<"+breakElms[(breakElms.length-1)-i].nodeName+">";}before+="<p>";content=before+content.substring(pos+7)+after;}}if(this.editor.getParam("paste_create_linebreaks",true)){content=content.replace(/\r\n/g,'<br />');content=content.replace(/\r/g,'<br />');content=content.replace(/\n/g,'<br />');}}this.editor.execCommand("mceInsertRawHTML",false,content);}},_insertWordContent:function(content){var t=this,ed=t.editor;if(content&&content.length>0){var bull=String.fromCharCode(8226);var middot=String.fromCharCode(183);if(ed.getParam('paste_insert_word_content_callback'))content=ed.execCallback('paste_insert_word_content_callback','before',content);var rl=ed.getParam("paste_replace_list",'\u2122,<sup>TM</sup>,\u2026,...,\x93|\x94|\u201c|\u201d,",\x60|\x91|\x92|\u2018|\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');for(var i=0;i<rl.length;i+=2)content=content.replace(new RegExp(rl[i],'gi'),rl[i+1]);if(this.editor.getParam("paste_convert_headers_to_strong",false)){content=content.replace(new RegExp('<p class=MsoHeading.*?>(.*?)<\/p>','gi'),'<p><b>$1</b></p>');}content=content.replace(new RegExp('tab-stops: list [0-9]+.0pt">','gi'),'">'+"--list--");content=content.replace(new RegExp(bull+"(.*?)<BR>","gi"),"<p>"+middot+"$1</p>");content=content.replace(new RegExp('<SPAN style="mso-list: Ignore">','gi'),"<span>"+bull);content=content.replace(/<o:p><\/o:p>/gi,"");content=content.replace(new RegExp('<br style="page-break-before: always;.*>','gi'),'-- page break --');content=content.replace(/<!--([\s\S]*?)-->|<style>[\s\S]*?<\/style>/g,"");content=content.replace(/<(meta|link)[^>]+>/g,"");if(this.editor.getParam("paste_remove_spans",true))content=content.replace(/<\/?span[^>]*>/gi,"");if(this.editor.getParam("paste_remove_styles",true))content=content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)','gi'),"<$1$3");content=content.replace(/<\/?font[^>]*>/gi,"");switch(this.editor.getParam("paste_strip_class_attributes","all")){case"all":content=content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");break;case"mso":content=content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)','gi'),"<$1$3");break;}content=content.replace(new RegExp('href="?'+this._reEscape(""+document.location)+'','gi'),'href="'+this.editor.documentBaseURI.getURI());content=content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");content=content.replace(/<\\?\?xml[^>]*>/gi,"");content=content.replace(/<\/?\w+:[^>]*>/gi,"");content=content.replace(/-- page break --\s*<p> <\/p>/gi,"");content=content.replace(/-- page break --/gi,"");if(!this.editor.getParam('force_p_newlines')){content=content.replace('','','gi');content=content.replace('</p>','<br /><br />','gi');}if(!tinymce.isIE&&!this.editor.getParam('force_p_newlines')){content=content.replace(/<\/?p[^>]*>/gi,"");}content=content.replace(/<\/?div[^>]*>/gi,"");if(this.editor.getParam("paste_convert_middot_lists",true)){var div=ed.dom.create("div",null,content);var className=this.editor.getParam("paste_unindented_list_class","unIndentedList");while(this._convertMiddots(div,"--list--"));while(this._convertMiddots(div,middot,className));while(this._convertMiddots(div,bull));content=div.innerHTML;}if(this.editor.getParam("paste_convert_headers_to_strong",false)){content=content.replace(/<h[1-6]> <\/h[1-6]>/gi,'<p> </p>');content=content.replace(/<h[1-6]>/gi,'<p><b>');content=content.replace(/<\/h[1-6]>/gi,'</b></p>');content=content.replace(/<b> <\/b>/gi,'<b> </b>');content=content.replace(/^( )*/gi,'');}content=content.replace(/--list--/gi,"");if(ed.getParam('paste_insert_word_content_callback'))content=ed.execCallback('paste_insert_word_content_callback','after',content);this.editor.execCommand("mceInsertContent",false,content);if(this.editor.getParam('paste_force_cleanup_wordpaste',true)){var ed=this.editor;window.setTimeout(function(){ed.execCommand("mceCleanup");},1);}}},_reEscape:function(s){var l="?.\\*[](){}+^$:";var o="";for(var i=0;i<s.length;i++){var c=s.charAt(i);if(l.indexOf(c)!=-1)o+='\\'+c;else o+=c;}return o;},_convertMiddots:function(div,search,class_name){var ed=this.editor,mdot=String.fromCharCode(183),bull=String.fromCharCode(8226);var nodes,prevul,i,p,ul,li,np,cp,li;nodes=div.getElementsByTagName("p");for(i=0;i<nodes.length;i++){p=nodes[i];if(p.innerHTML.indexOf(search)==0){ul=ed.dom.create("ul");if(class_name)ul.className=class_name;li=ed.dom.create("li");li.innerHTML=p.innerHTML.replace(new RegExp(''+mdot+'|'+bull+'|--list--| ',"gi"),'');ul.appendChild(li);np=p.nextSibling;while(np){if(np.nodeType==3&&new RegExp('^\\s$','m').test(np.nodeValue)){np=np.nextSibling;continue;}if(search==mdot){if(np.nodeType==1&&new RegExp('^o(\\s+| )').test(np.innerHTML)){if(!prevul){prevul=ul;ul=ed.dom.create("ul");prevul.appendChild(ul);}np.innerHTML=np.innerHTML.replace(/^o/,'');}else{if(prevul){ul=prevul;prevul=null;}if(np.nodeType!=1||np.innerHTML.indexOf(search)!=0)break;}}else{if(np.nodeType!=1||np.innerHTML.indexOf(search)!=0)break;}cp=np.nextSibling;li=ed.dom.create("li");li.innerHTML=np.innerHTML.replace(new RegExp(''+mdot+'|'+bull+'|--list--| ',"gi"),'');np.parentNode.removeChild(np);ul.appendChild(li);np=cp;}p.parentNode.replaceChild(ul,p);return true;}}return false;},_clipboardHTML:function(){var div=document.getElementById('_TinyMCE_clipboardHTML');if(!div){var div=document.createElement('DIV');div.id='_TinyMCE_clipboardHTML';with(div.style){visibility='hidden';overflow='hidden';position='absolute';width=1;height=1;}document.body.appendChild(div);}div.innerHTML='';var rng=document.body.createTextRange();rng.moveToElementText(div);rng.execCommand('Paste');var html=div.innerHTML;div.innerHTML='';return html;}});tinymce.PluginManager.add('paste',tinymce.plugins.PastePlugin);})(); \ No newline at end of file | (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"}," ");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===" "){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 n="";a(o.select("div[id=_mcePaste]").reverse(),function(q){n+=(o.select("> span.Apple-style-span div",q)[0]||o.select("> span.Apple-style-span",q)[0]||q).innerHTML;o.remove(q)});if(k){j.setRng(k)}g({content:n})},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,g){var b=this.editor,c=g.content,f,e;function f(h){a(h,function(i){if(i.constructor==RegExp){c=c.replace(i,"")}else{c=c.replace(i[0],i[1])}})}if(/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(c)||g.wordContent){g.wordContent=true;f([/^\s*( )+/g,/( |<br[^>]*>)+\s*$/g]);if(b.getParam("paste_convert_middot_lists",true)){f([[/<!--\[if !supportLists\]-->/gi,"$&__MCE_ITEM__"],[/(<span[^>]+:\s*symbol[^>]+>)/gi,"$1__MCE_ITEM__"],[/(<span[^>]+mso-list:[^>]+>)/gi,"$1__MCE_ITEM__"]])}f([/<!--[\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")){f([/<\/?(span)[^>]*>/gi])}}e=b.getParam("paste_strip_class_attributes","all");if(e!="none"){if(e=="all"){f([/ class=\"([^\"]*)\"/gi,/ class=(\w+)/gi])}else{f([/ class=\"(mso[^\"]*)\"/gi,/ class=(mso\w+)/gi])}}if(b.getParam("paste_remove_spans")){f([/<\/?(span)[^>]*>/gi])}g.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 index bb5f5aa..8641519 100755..100644 --- a/public/javascripts/tiny_mce/plugins/paste/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/paste/editor_plugin_src.js | |||
| @@ -1,81 +1,172 @@ | |||
| 1 | /** | 1 | /** |
| 2 | * $Id: editor_plugin_src.js 919 2008-09-08 20:31:23Z spocke $ | 2 | * $Id: editor_plugin_src.js 1199 2009-08-18 11:55:59Z spocke $ |
| 3 | * | 3 | * |
| 4 | * @author Moxiecode | 4 | * @author Moxiecode |
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. |
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | (function() { | 8 | (function() { |
| 9 | var Event = tinymce.dom.Event; | 9 | var each = tinymce.each; |
| 10 | 10 | ||
| 11 | tinymce.create('tinymce.plugins.PastePlugin', { | 11 | tinymce.create('tinymce.plugins.PastePlugin', { |
| 12 | init : function(ed, url) { | 12 | init : function(ed, url) { |
| 13 | var t = this; | 13 | var t = this, cb; |
| 14 | 14 | ||
| 15 | t.editor = ed; | 15 | t.editor = ed; |
| 16 | t.url = url; | ||
| 16 | 17 | ||
| 17 | // Register commands | 18 | // Setup plugin events |
| 18 | ed.addCommand('mcePasteText', function(ui, v) { | 19 | t.onPreProcess = new tinymce.util.Dispatcher(t); |
| 19 | if (ui) { | 20 | t.onPostProcess = new tinymce.util.Dispatcher(t); |
| 20 | if ((ed.getParam('paste_use_dialog', true)) || (!tinymce.isIE)) { | 21 | |
| 21 | ed.windowManager.open({ | 22 | // Register default handlers |
| 22 | file : url + '/pastetext.htm', | 23 | t.onPreProcess.add(t._preProcess); |
| 23 | width : 450, | 24 | t.onPostProcess.add(t._postProcess); |
| 24 | height : 400, | 25 | |
| 25 | inline : 1 | 26 | // Register optional preprocess handler |
| 26 | }, { | 27 | t.onPreProcess.add(function(pl, o) { |
| 27 | plugin_url : url | 28 | ed.execCallback('paste_preprocess', pl, o); |
| 28 | }); | ||
| 29 | } else | ||
| 30 | t._insertText(clipboardData.getData("Text"), true); | ||
| 31 | } else | ||
| 32 | t._insertText(v.html, v.linebreaks); | ||
| 33 | }); | 29 | }); |
| 34 | 30 | ||
| 35 | ed.addCommand('mcePasteWord', function(ui, v) { | 31 | // Register optional postprocess |
| 36 | if (ui) { | 32 | t.onPostProcess.add(function(pl, o) { |
| 37 | if ((ed.getParam('paste_use_dialog', true)) || (!tinymce.isIE)) { | 33 | ed.execCallback('paste_postprocess', pl, o); |
| 38 | ed.windowManager.open({ | ||
| 39 | file : url + '/pasteword.htm', | ||
| 40 | width : 450, | ||
| 41 | height : 400, | ||
| 42 | inline : 1 | ||
| 43 | }, { | ||
| 44 | plugin_url : url | ||
| 45 | }); | ||
| 46 | } else | ||
| 47 | t._insertText(t._clipboardHTML()); | ||
| 48 | } else | ||
| 49 | t._insertWordContent(v); | ||
| 50 | }); | 34 | }); |
| 51 | 35 | ||
| 52 | ed.addCommand('mceSelectAll', function() { | 36 | // This function executes the process handlers and inserts the contents |
| 53 | ed.execCommand('selectall'); | 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); | ||
| 54 | }); | 62 | }); |
| 55 | 63 | ||
| 56 | // Register buttons | 64 | // This function grabs the contents from the clipboard by adding a |
| 57 | ed.addButton('pastetext', {title : 'paste.paste_text_desc', cmd : 'mcePasteText', ui : true}); | 65 | // hidden div and placing the caret inside it and after the browser paste |
| 58 | ed.addButton('pasteword', {title : 'paste.paste_word_desc', cmd : 'mcePasteWord', ui : true}); | 66 | // is done it grabs that contents and processes that |
| 59 | ed.addButton('selectall', {title : 'paste.selectall_desc', cmd : 'mceSelectAll'}); | 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'}, ' '); | ||
| 60 | 75 | ||
| 61 | if (ed.getParam("paste_auto_cleanup_on_paste", false)) { | 76 | // If contentEditable mode we need to find out the position of the closest element |
| 62 | ed.onPaste.add(function(ed, e) { | 77 | if (body != ed.getDoc().body) |
| 63 | return t._handlePasteEvent(e) | 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' | ||
| 64 | }); | 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 === ' ') | ||
| 104 | return; | ||
| 105 | |||
| 106 | // Process contents | ||
| 107 | process({content : n.innerHTML}); | ||
| 108 | |||
| 109 | // Block the real paste event | ||
| 110 | return tinymce.dom.Event.cancel(e); | ||
| 111 | } else { | ||
| 112 | or = ed.selection.getRng(); | ||
| 113 | |||
| 114 | // Move caret into hidden div | ||
| 115 | n = n.firstChild; | ||
| 116 | rng = ed.getDoc().createRange(); | ||
| 117 | rng.setStart(n, 0); | ||
| 118 | rng.setEnd(n, 1); | ||
| 119 | sel.setRng(rng); | ||
| 120 | |||
| 121 | // Wait a while and grab the pasted contents | ||
| 122 | window.setTimeout(function() { | ||
| 123 | var h = ''; | ||
| 124 | |||
| 125 | // WebKit will split the div into multiple ones so this will loop through then all and join them to get the whole HTML string | ||
| 126 | each(dom.select('div[id=_mcePaste]').reverse(), function(n) { | ||
| 127 | h += (dom.select('> span.Apple-style-span div', n)[0] || dom.select('> span.Apple-style-span', n)[0] || n).innerHTML; | ||
| 128 | dom.remove(n); | ||
| 129 | }); | ||
| 130 | |||
| 131 | // Restore the old selection | ||
| 132 | if (or) | ||
| 133 | sel.setRng(or); | ||
| 134 | |||
| 135 | process({content : h}); | ||
| 136 | }, 0); | ||
| 137 | } | ||
| 138 | }; | ||
| 139 | |||
| 140 | // Check if we should use the new auto process method | ||
| 141 | if (ed.getParam('paste_auto_cleanup_on_paste', true)) { | ||
| 142 | // Is it's Opera or older FF use key handler | ||
| 143 | if (tinymce.isOpera || /Firefox\/2/.test(navigator.userAgent)) { | ||
| 144 | ed.onKeyDown.add(function(ed, e) { | ||
| 145 | if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45)) | ||
| 146 | grabContent(e); | ||
| 147 | }); | ||
| 148 | } else { | ||
| 149 | // Grab contents on paste event on Gecko and WebKit | ||
| 150 | ed.onPaste.addToTop(function(ed, e) { | ||
| 151 | return grabContent(e); | ||
| 152 | }); | ||
| 153 | } | ||
| 65 | } | 154 | } |
| 66 | 155 | ||
| 67 | if (!tinymce.isIE && ed.getParam("paste_auto_cleanup_on_paste", false)) { | 156 | // Block all drag/drop events |
| 68 | // Force paste dialog if non IE browser | 157 | if (ed.getParam('paste_block_drop')) { |
| 69 | ed.onKeyDown.add(function(ed, e) { | 158 | ed.onInit.add(function() { |
| 70 | if (e.ctrlKey && e.keyCode == 86) { | 159 | ed.dom.bind(ed.getBody(), ['dragend', 'dragover', 'draggesture', 'dragdrop', 'drop', 'drag'], function(e) { |
| 71 | window.setTimeout(function() { | 160 | e.preventDefault(); |
| 72 | ed.execCommand("mcePasteText", true); | 161 | e.stopPropagation(); |
| 73 | }, 1); | ||
| 74 | 162 | ||
| 75 | Event.cancel(e); | 163 | return false; |
| 76 | } | 164 | }); |
| 77 | }); | 165 | }); |
| 78 | } | 166 | } |
| 167 | |||
| 168 | // Add legacy support | ||
| 169 | t._legacySupport(); | ||
| 79 | }, | 170 | }, |
| 80 | 171 | ||
| 81 | getInfo : function() { | 172 | getInfo : function() { |
| @@ -88,304 +179,331 @@ | |||
| 88 | }; | 179 | }; |
| 89 | }, | 180 | }, |
| 90 | 181 | ||
| 91 | // Private methods | 182 | _preProcess : function(pl, o) { |
| 92 | 183 | var ed = this.editor, h = o.content, process, stripClass; | |
| 93 | _handlePasteEvent : function(e) { | ||
| 94 | var html = this._clipboardHTML(), ed = this.editor, sel = ed.selection, r; | ||
| 95 | |||
| 96 | // Removes italic, strong etc, the if was needed due to bug #1437114 | ||
| 97 | if (ed && (r = sel.getRng()) && r.text.length > 0) | ||
| 98 | ed.execCommand('delete'); | ||
| 99 | |||
| 100 | if (html && html.length > 0) | ||
| 101 | ed.execCommand('mcePasteWord', false, html); | ||
| 102 | |||
| 103 | return Event.cancel(e); | ||
| 104 | }, | ||
| 105 | |||
| 106 | _insertText : function(content, bLinebreaks) { | ||
| 107 | content = this.editor.dom.encode(content); | ||
| 108 | |||
| 109 | if (content && content.length > 0) { | ||
| 110 | // Delete any highlighted text before pasting | ||
| 111 | if (!this.editor.selection.isCollapsed()) | ||
| 112 | this.editor.execCommand("Delete"); | ||
| 113 | 184 | ||
| 114 | if (bLinebreaks) { | 185 | //console.log('Before preprocess:' + o.content); |
| 115 | // Special paragraph treatment | ||
| 116 | if (this.editor.getParam("paste_create_paragraphs", true)) { | ||
| 117 | var rl = this.editor.getParam("paste_replace_list", '\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(','); | ||
| 118 | for (var i=0; i<rl.length; i+=2) | ||
| 119 | content = content.replace(new RegExp(rl[i], 'gi'), rl[i+1]); | ||
| 120 | 186 | ||
| 121 | content = content.replace(/\r\n\r\n/g, '</p><p>'); | 187 | function process(items) { |
| 122 | content = content.replace(/\r\r/g, '</p><p>'); | 188 | each(items, function(v) { |
| 123 | content = content.replace(/\n\n/g, '</p><p>'); | 189 | // Remove or replace |
| 124 | 190 | if (v.constructor == RegExp) | |
| 125 | // Has paragraphs | 191 | h = h.replace(v, ''); |
| 126 | if ((pos = content.indexOf('</p><p>')) != -1) { | 192 | else |
| 127 | this.editor.execCommand("Delete"); | 193 | h = h.replace(v[0], v[1]); |
| 128 | 194 | }); | |
| 129 | var node = this.editor.selection.getNode(); | 195 | }; |
| 130 | |||
| 131 | // Get list of elements to break | ||
| 132 | var breakElms = []; | ||
| 133 | 196 | ||
| 134 | do { | 197 | // Detect Word content and process it more aggressive |
| 135 | if (node.nodeType == 1) { | 198 | if (/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(h) || o.wordContent) { |
| 136 | // Don't break tables and break at body | 199 | o.wordContent = true; // Mark the pasted contents as word specific content |
| 137 | if (node.nodeName == "TD" || node.nodeName == "BODY") | 200 | //console.log('Word contents detected.'); |
| 138 | break; | ||
| 139 | |||
| 140 | breakElms[breakElms.length] = node; | ||
| 141 | } | ||
| 142 | } while(node = node.parentNode); | ||
| 143 | 201 | ||
| 144 | var before = "", after = "</p>"; | 202 | // Process away some basic content |
| 145 | before += content.substring(0, pos); | 203 | process([ |
| 204 | /^\s*( )+/g, // nbsp entities at the start of contents | ||
| 205 | /( |<br[^>]*>)+\s*$/g // nbsp entities at the end of contents | ||
| 206 | ]); | ||
| 146 | 207 | ||
| 147 | for (var i=0; i<breakElms.length; i++) { | 208 | if (ed.getParam('paste_convert_middot_lists', true)) { |
| 148 | before += "</" + breakElms[i].nodeName + ">"; | 209 | process([ |
| 149 | after += "<" + breakElms[(breakElms.length-1)-i].nodeName + ">"; | 210 | [/<!--\[if !supportLists\]-->/gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker |
| 150 | } | 211 | [/(<span[^>]+:\s*symbol[^>]+>)/gi, '$1__MCE_ITEM__'], // Convert symbol spans to list items |
| 212 | [/(<span[^>]+mso-list:[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list to item marker | ||
| 213 | ]); | ||
| 214 | } | ||
| 151 | 215 | ||
| 152 | before += "<p>"; | 216 | process([ |
| 153 | content = before + content.substring(pos+7) + after; | 217 | /<!--[\s\S]+?-->/gi, // Word comments |
| 154 | } | 218 | /<\/?(img|font|meta|link|style|div|v:\w+)[^>]*>/gi, // Remove some tags including VML content |
| 155 | } | 219 | /<\\?\?xml[^>]*>/gi, // XML namespace declarations |
| 220 | /<\/?o:[^>]*>/gi, // MS namespaced elements <o:tag> | ||
| 221 | / (id|name|language|type|on\w+|v:\w+)=\"([^\"]*)\"/gi, // on.., class, style and language attributes with quotes | ||
| 222 | / (id|name|language|type|on\w+|v:\w+)=(\w+)/gi, // on.., class, style and language attributes without quotes (IE) | ||
| 223 | [/<(\/?)s>/gi, '<$1strike>'], // Convert <s> into <strike> for line-though | ||
| 224 | /<script[^>]+>[\s\S]*?<\/script>/gi, // All scripts elements for msoShowComment for example | ||
| 225 | [/ /g, '\u00a0'] // Replace nsbp entites to char since it's easier to handle | ||
| 226 | ]); | ||
| 156 | 227 | ||
| 157 | if (this.editor.getParam("paste_create_linebreaks", true)) { | 228 | // Remove all spans if no styles is to be retained |
| 158 | content = content.replace(/\r\n/g, '<br />'); | 229 | if (!ed.getParam('paste_retain_style_properties')) { |
| 159 | content = content.replace(/\r/g, '<br />'); | 230 | process([ |
| 160 | content = content.replace(/\n/g, '<br />'); | 231 | /<\/?(span)[^>]*>/gi |
| 161 | } | 232 | ]); |
| 162 | } | 233 | } |
| 234 | } | ||
| 163 | 235 | ||
| 164 | this.editor.execCommand("mceInsertRawHTML", false, content); | 236 | // Allow for class names to be retained if desired; either all, or just the ones from Word |
| 237 | // Note that the paste_strip_class_attributes: 'none, verify_css_classes: true is also a good variation. | ||
| 238 | stripClass = ed.getParam('paste_strip_class_attributes', 'all'); | ||
| 239 | if (stripClass != 'none') { | ||
| 240 | if (stripClass == 'all') { | ||
| 241 | process([ | ||
| 242 | / class=\"([^\"]*)\"/gi, // class attributes with quotes | ||
| 243 | / class=(\w+)/gi // class attributes without quotes (IE) | ||
| 244 | ]); | ||
| 245 | } else { // Only strip the 'mso*' classes | ||
| 246 | process([ | ||
| 247 | / class=\"(mso[^\"]*)\"/gi, // class attributes with quotes | ||
| 248 | / class=(mso\w+)/gi // class attributes without quotes (IE) | ||
| 249 | ]); | ||
| 250 | } | ||
| 165 | } | 251 | } |
| 166 | }, | ||
| 167 | 252 | ||
| 168 | _insertWordContent : function(content) { | 253 | // Remove spans option |
| 169 | var t = this, ed = t.editor; | 254 | if (ed.getParam('paste_remove_spans')) { |
| 255 | process([ | ||
| 256 | /<\/?(span)[^>]*>/gi | ||
| 257 | ]); | ||
| 258 | } | ||
| 170 | 259 | ||
| 171 | if (content && content.length > 0) { | 260 | //console.log('After preprocess:' + h); |
| 172 | // Cleanup Word content | ||
| 173 | var bull = String.fromCharCode(8226); | ||
| 174 | var middot = String.fromCharCode(183); | ||
| 175 | 261 | ||
| 176 | if (ed.getParam('paste_insert_word_content_callback')) | 262 | o.content = h; |
| 177 | content = ed.execCallback('paste_insert_word_content_callback', 'before', content); | 263 | }, |
| 178 | 264 | ||
| 179 | var rl = ed.getParam("paste_replace_list", '\u2122,<sup>TM</sup>,\u2026,...,\x93|\x94|\u201c|\u201d,",\x60|\x91|\x92|\u2018|\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(','); | 265 | /** |
| 180 | for (var i=0; i<rl.length; i+=2) | 266 | * Various post process items. |
| 181 | content = content.replace(new RegExp(rl[i], 'gi'), rl[i+1]); | 267 | */ |
| 268 | _postProcess : function(pl, o) { | ||
| 269 | var t = this, ed = t.editor, dom = ed.dom, styleProps; | ||
| 182 | 270 | ||
| 183 | if (this.editor.getParam("paste_convert_headers_to_strong", false)) { | 271 | if (o.wordContent) { |
| 184 | content = content.replace(new RegExp('<p class=MsoHeading.*?>(.*?)<\/p>', 'gi'), '<p><b>$1</b></p>'); | 272 | // Remove named anchors or TOC links |
| 185 | } | 273 | each(dom.select('a', o.node), function(a) { |
| 274 | if (!a.href || a.href.indexOf('#_Toc') != -1) | ||
| 275 | dom.remove(a, 1); | ||
| 276 | }); | ||
| 186 | 277 | ||
| 187 | content = content.replace(new RegExp('tab-stops: list [0-9]+.0pt">', 'gi'), '">' + "--list--"); | 278 | if (t.editor.getParam('paste_convert_middot_lists', true)) |
| 188 | content = content.replace(new RegExp(bull + "(.*?)<BR>", "gi"), "<p>" + middot + "$1</p>"); | 279 | t._convertLists(pl, o); |
| 189 | content = content.replace(new RegExp('<SPAN style="mso-list: Ignore">', 'gi'), "<span>" + bull); // Covert to bull list | ||
| 190 | content = content.replace(/<o:p><\/o:p>/gi, ""); | ||
| 191 | content = content.replace(new RegExp('<br style="page-break-before: always;.*>', 'gi'), '-- page break --'); // Replace pagebreaks | ||
| 192 | content = content.replace(/<!--([\s\S]*?)-->|<style>[\s\S]*?<\/style>/g, ""); // Word comments | ||
| 193 | content = content.replace(/<(meta|link)[^>]+>/g, ""); // Header elements | ||
| 194 | 280 | ||
| 195 | if (this.editor.getParam("paste_remove_spans", true)) | 281 | // Process styles |
| 196 | content = content.replace(/<\/?span[^>]*>/gi, ""); | 282 | styleProps = ed.getParam('paste_retain_style_properties'); // retained properties |
| 197 | 283 | ||
| 198 | if (this.editor.getParam("paste_remove_styles", true)) | 284 | // If string property then split it |
| 199 | content = content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)', 'gi'), "<$1$3"); | 285 | if (tinymce.is(styleProps, 'string')) |
| 286 | styleProps = tinymce.explode(styleProps); | ||
| 200 | 287 | ||
| 201 | content = content.replace(/<\/?font[^>]*>/gi, ""); | 288 | // Retains some style properties |
| 289 | each(dom.select('*', o.node), function(el) { | ||
| 290 | var newStyle = {}, npc = 0, i, sp, sv; | ||
| 202 | 291 | ||
| 203 | // Strips class attributes. | 292 | // Store a subset of the existing styles |
| 204 | switch (this.editor.getParam("paste_strip_class_attributes", "all")) { | 293 | if (styleProps) { |
| 205 | case "all": | 294 | for (i = 0; i < styleProps.length; i++) { |
| 206 | content = content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3"); | 295 | sp = styleProps[i]; |
| 207 | break; | 296 | sv = dom.getStyle(el, sp); |
| 208 | 297 | ||
| 209 | case "mso": | 298 | if (sv) { |
| 210 | content = content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)', 'gi'), "<$1$3"); | 299 | newStyle[sp] = sv; |
| 211 | break; | 300 | npc++; |
| 212 | } | 301 | } |
| 302 | } | ||
| 303 | } | ||
| 213 | 304 | ||
| 214 | content = content.replace(new RegExp('href="?' + this._reEscape("" + document.location) + '', 'gi'), 'href="' + this.editor.documentBaseURI.getURI()); | 305 | // Remove all of the existing styles |
| 215 | content = content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3"); | 306 | dom.setAttrib(el, 'style', ''); |
| 216 | content = content.replace(/<\\?\?xml[^>]*>/gi, ""); | ||
| 217 | content = content.replace(/<\/?\w+:[^>]*>/gi, ""); | ||
| 218 | content = content.replace(/-- page break --\s*<p> <\/p>/gi, ""); // Remove pagebreaks | ||
| 219 | content = content.replace(/-- page break --/gi, ""); // Remove pagebreaks | ||
| 220 | 307 | ||
| 221 | // content = content.replace(/\/? */gi, ""); | 308 | if (styleProps && npc > 0) |
| 222 | // content = content.replace(/<p> <\/p>/gi, ''); | 309 | dom.setStyles(el, newStyle); // Add back the stored subset of styles |
| 310 | else // Remove empty span tags that do not have class attributes | ||
| 311 | if (el.nodeName == 'SPAN' && !el.className) | ||
| 312 | dom.remove(el, true); | ||
| 313 | }); | ||
| 314 | } | ||
| 223 | 315 | ||
| 224 | if (!this.editor.getParam('force_p_newlines')) { | 316 | // Remove all style information or only specifically on WebKit to avoid the style bug on that browser |
| 225 | content = content.replace('', '' ,'gi'); | 317 | if (ed.getParam("paste_remove_styles") || (ed.getParam("paste_remove_styles_if_webkit") && tinymce.isWebKit)) { |
| 226 | content = content.replace('</p>', '<br /><br />' ,'gi'); | 318 | each(dom.select('*[style]', o.node), function(el) { |
| 319 | el.removeAttribute('style'); | ||
| 320 | el.removeAttribute('mce_style'); | ||
| 321 | }); | ||
| 322 | } else { | ||
| 323 | if (tinymce.isWebKit) { | ||
| 324 | // 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 ..." /> | ||
| 325 | // Removing the mce_style that contains the real value will force the Serializer engine to compress the styles | ||
| 326 | each(dom.select('*', o.node), function(el) { | ||
| 327 | el.removeAttribute('mce_style'); | ||
| 328 | }); | ||
| 227 | } | 329 | } |
| 330 | } | ||
| 331 | }, | ||
| 228 | 332 | ||
| 229 | if (!tinymce.isIE && !this.editor.getParam('force_p_newlines')) { | 333 | /** |
| 230 | content = content.replace(/<\/?p[^>]*>/gi, ""); | 334 | * Converts the most common bullet and number formats in Office into a real semantic UL/LI list. |
| 231 | } | 335 | */ |
| 336 | _convertLists : function(pl, o) { | ||
| 337 | var dom = pl.editor.dom, listElm, li, lastMargin = -1, margin, levels = [], lastType, html; | ||
| 232 | 338 | ||
| 233 | content = content.replace(/<\/?div[^>]*>/gi, ""); | 339 | // Convert middot lists into real semantic lists |
| 340 | each(dom.select('p', o.node), function(p) { | ||
| 341 | var sib, val = '', type, html, idx, parents; | ||
| 234 | 342 | ||
| 235 | // Convert all middlot lists to UL lists | 343 | // Get text node value at beginning of paragraph |
| 236 | if (this.editor.getParam("paste_convert_middot_lists", true)) { | 344 | for (sib = p.firstChild; sib && sib.nodeType == 3; sib = sib.nextSibling) |
| 237 | var div = ed.dom.create("div", null, content); | 345 | val += sib.nodeValue; |
| 238 | 346 | ||
| 239 | // Convert all middot paragraphs to li elements | 347 | val = p.innerHTML.replace(/<\/?\w+[^>]*>/gi, '').replace(/ /g, '\u00a0'); |
| 240 | var className = this.editor.getParam("paste_unindented_list_class", "unIndentedList"); | ||
| 241 | 348 | ||
| 242 | while (this._convertMiddots(div, "--list--")) ; // bull | 349 | // Detect unordered lists look for bullets |
| 243 | while (this._convertMiddots(div, middot, className)) ; // Middot | 350 | if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o]\s*\u00a0*/.test(val)) |
| 244 | while (this._convertMiddots(div, bull)) ; // bull | 351 | type = 'ul'; |
| 245 | 352 | ||
| 246 | content = div.innerHTML; | 353 | // Detect ordered lists 1., a. or ixv. |
| 247 | } | 354 | if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0{2,}/.test(val)) |
| 355 | type = 'ol'; | ||
| 248 | 356 | ||
| 249 | // Replace all headers with strong and fix some other issues | 357 | // Check if node value matches the list pattern: o |
| 250 | if (this.editor.getParam("paste_convert_headers_to_strong", false)) { | 358 | if (type) { |
| 251 | content = content.replace(/<h[1-6]> <\/h[1-6]>/gi, '<p> </p>'); | 359 | margin = parseFloat(p.style.marginLeft || 0); |
| 252 | content = content.replace(/<h[1-6]>/gi, '<p><b>'); | ||
| 253 | content = content.replace(/<\/h[1-6]>/gi, '</b></p>'); | ||
| 254 | content = content.replace(/<b> <\/b>/gi, '<b> </b>'); | ||
| 255 | content = content.replace(/^( )*/gi, ''); | ||
| 256 | } | ||
| 257 | 360 | ||
| 258 | content = content.replace(/--list--/gi, ""); // Remove --list-- | 361 | if (margin > lastMargin) |
| 362 | levels.push(margin); | ||
| 259 | 363 | ||
| 260 | if (ed.getParam('paste_insert_word_content_callback')) | 364 | if (!listElm || type != lastType) { |
| 261 | content = ed.execCallback('paste_insert_word_content_callback', 'after', content); | 365 | listElm = dom.create(type); |
| 366 | dom.insertAfter(listElm, p); | ||
| 367 | } else { | ||
| 368 | // Nested list element | ||
| 369 | if (margin > lastMargin) { | ||
| 370 | listElm = li.appendChild(dom.create(type)); | ||
| 371 | } else if (margin < lastMargin) { | ||
| 372 | // Find parent level based on margin value | ||
| 373 | idx = tinymce.inArray(levels, margin); | ||
| 374 | parents = dom.getParents(listElm.parentNode, type); | ||
| 375 | listElm = parents[parents.length - 1 - idx] || listElm; | ||
| 376 | } | ||
| 377 | } | ||
| 262 | 378 | ||
| 263 | // Insert cleaned content | 379 | // Remove middot or number spans if they exists |
| 264 | this.editor.execCommand("mceInsertContent", false, content); | 380 | each(dom.select('span', p), function(span) { |
| 381 | var html = span.innerHTML.replace(/<\/?\w+[^>]*>/gi, ''); | ||
| 265 | 382 | ||
| 266 | if (this.editor.getParam('paste_force_cleanup_wordpaste', true)) { | 383 | // Remove span with the middot or the number |
| 267 | var ed = this.editor; | 384 | if (type == 'ul' && /^[\u2022\u00b7\u00a7\u00d8o]/.test(html)) |
| 385 | dom.remove(span); | ||
| 386 | else if (/^[\s\S]*\w+\.( |\u00a0)*\s*/.test(html)) | ||
| 387 | dom.remove(span); | ||
| 388 | }); | ||
| 268 | 389 | ||
| 269 | window.setTimeout(function() { | 390 | html = p.innerHTML; |
| 270 | ed.execCommand("mceCleanup"); | ||
| 271 | }, 1); // Do normal cleanup detached from this thread | ||
| 272 | } | ||
| 273 | } | ||
| 274 | }, | ||
| 275 | 391 | ||
| 276 | _reEscape : function(s) { | 392 | // Remove middot/list items |
| 277 | var l = "?.\\*[](){}+^$:"; | 393 | if (type == 'ul') |
| 278 | var o = ""; | 394 | html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o]\s*( |\u00a0)+\s*/, ''); |
| 395 | else | ||
| 396 | html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.( |\u00a0)+\s*/, ''); | ||
| 279 | 397 | ||
| 280 | for (var i=0; i<s.length; i++) { | 398 | // Create li and add paragraph data into the new li |
| 281 | var c = s.charAt(i); | 399 | li = listElm.appendChild(dom.create('li', 0, html)); |
| 400 | dom.remove(p); | ||
| 282 | 401 | ||
| 283 | if (l.indexOf(c) != -1) | 402 | lastMargin = margin; |
| 284 | o += '\\' + c; | 403 | lastType = type; |
| 285 | else | 404 | } else |
| 286 | o += c; | 405 | listElm = lastMargin = 0; // End list element |
| 287 | } | 406 | }); |
| 288 | 407 | ||
| 289 | return o; | 408 | // Remove any left over makers |
| 409 | html = o.node.innerHTML; | ||
| 410 | if (html.indexOf('__MCE_ITEM__') != -1) | ||
| 411 | o.node.innerHTML = html.replace(/__MCE_ITEM__/g, ''); | ||
| 290 | }, | 412 | }, |
| 291 | 413 | ||
| 292 | _convertMiddots : function(div, search, class_name) { | 414 | /** |
| 293 | var ed = this.editor, mdot = String.fromCharCode(183), bull = String.fromCharCode(8226); | 415 | * This method will split the current block parent and insert the contents inside the split position. |
| 294 | var nodes, prevul, i, p, ul, li, np, cp, li; | 416 | * This logic can be improved so text nodes at the start/end remain in the start/end block elements |
| 295 | 417 | */ | |
| 296 | nodes = div.getElementsByTagName("p"); | 418 | _insertBlockContent : function(ed, dom, content) { |
| 297 | for (i=0; i<nodes.length; i++) { | 419 | var parentBlock, marker, sel = ed.selection, last, elm, vp, y, elmHeight; |
| 298 | p = nodes[i]; | ||
| 299 | 420 | ||
| 300 | // Is middot | 421 | function select(n) { |
| 301 | if (p.innerHTML.indexOf(search) == 0) { | 422 | var r; |
| 302 | ul = ed.dom.create("ul"); | ||
| 303 | 423 | ||
| 304 | if (class_name) | 424 | if (tinymce.isIE) { |
| 305 | ul.className = class_name; | 425 | r = ed.getDoc().body.createTextRange(); |
| 426 | r.moveToElementText(n); | ||
| 427 | r.collapse(false); | ||
| 428 | r.select(); | ||
| 429 | } else { | ||
| 430 | sel.select(n, 1); | ||
| 431 | sel.collapse(false); | ||
| 432 | } | ||
| 433 | }; | ||
| 306 | 434 | ||
| 307 | // Add the first one | 435 | // Insert a marker for the caret position |
| 308 | li = ed.dom.create("li"); | 436 | this._insert('<span id="_marker"> </span>', 1); |
| 309 | li.innerHTML = p.innerHTML.replace(new RegExp('' + mdot + '|' + bull + '|--list--| ', "gi"), ''); | 437 | marker = dom.get('_marker'); |
| 310 | ul.appendChild(li); | 438 | parentBlock = dom.getParent(marker, 'p,h1,h2,h3,h4,h5,h6,ul,ol,th,td'); |
| 311 | 439 | ||
| 312 | // Add the rest | 440 | // If it's a parent block but not a table cell |
| 313 | np = p.nextSibling; | 441 | if (parentBlock && !/TD|TH/.test(parentBlock.nodeName)) { |
| 314 | while (np) { | 442 | // Split parent block |
| 315 | // If the node is whitespace, then | 443 | marker = dom.split(parentBlock, marker); |
| 316 | // ignore it and continue on. | ||
| 317 | if (np.nodeType == 3 && new RegExp('^\\s$', 'm').test(np.nodeValue)) { | ||
| 318 | np = np.nextSibling; | ||
| 319 | continue; | ||
| 320 | } | ||
| 321 | 444 | ||
| 322 | if (search == mdot) { | 445 | // Insert nodes before the marker |
| 323 | if (np.nodeType == 1 && new RegExp('^o(\\s+| )').test(np.innerHTML)) { | 446 | each(dom.create('div', 0, content).childNodes, function(n) { |
| 324 | // Second level of nesting | 447 | last = marker.parentNode.insertBefore(n.cloneNode(true), marker); |
| 325 | if (!prevul) { | 448 | }); |
| 326 | prevul = ul; | ||
| 327 | ul = ed.dom.create("ul"); | ||
| 328 | prevul.appendChild(ul); | ||
| 329 | } | ||
| 330 | np.innerHTML = np.innerHTML.replace(/^o/, ''); | ||
| 331 | } else { | ||
| 332 | // Pop the stack if we're going back up to the first level | ||
| 333 | if (prevul) { | ||
| 334 | ul = prevul; | ||
| 335 | prevul = null; | ||
| 336 | } | ||
| 337 | // Not element or middot paragraph | ||
| 338 | if (np.nodeType != 1 || np.innerHTML.indexOf(search) != 0) | ||
| 339 | break; | ||
| 340 | } | ||
| 341 | } else { | ||
| 342 | // Not element or middot paragraph | ||
| 343 | if (np.nodeType != 1 || np.innerHTML.indexOf(search) != 0) | ||
| 344 | break; | ||
| 345 | } | ||
| 346 | 449 | ||
| 347 | cp = np.nextSibling; | 450 | // Move caret after marker |
| 348 | li = ed.dom.create("li"); | 451 | select(last); |
| 349 | li.innerHTML = np.innerHTML.replace(new RegExp('' + mdot + '|' + bull + '|--list--| ', "gi"), ''); | 452 | } else { |
| 350 | np.parentNode.removeChild(np); | 453 | dom.setOuterHTML(marker, content); |
| 351 | ul.appendChild(li); | 454 | sel.select(ed.getBody(), 1); |
| 352 | np = cp; | 455 | sel.collapse(0); |
| 353 | } | 456 | } |
| 354 | 457 | ||
| 355 | p.parentNode.replaceChild(ul, p); | 458 | dom.remove('_marker'); // Remove marker if it's left |
| 356 | 459 | ||
| 357 | return true; | 460 | // Get element, position and height |
| 358 | } | 461 | elm = sel.getStart(); |
| 359 | } | 462 | vp = dom.getViewPort(ed.getWin()); |
| 463 | y = ed.dom.getPos(elm).y; | ||
| 464 | elmHeight = elm.clientHeight; | ||
| 360 | 465 | ||
| 361 | return false; | 466 | // Is element within viewport if not then scroll it into view |
| 467 | if (y < vp.y || y + elmHeight > vp.y + vp.h) | ||
| 468 | ed.getDoc().body.scrollTop = y < vp.y ? y : y - vp.h + 25; | ||
| 362 | }, | 469 | }, |
| 363 | 470 | ||
| 364 | _clipboardHTML : function() { | 471 | /** |
| 365 | var div = document.getElementById('_TinyMCE_clipboardHTML'); | 472 | * Inserts the specified contents at the caret position. |
| 473 | */ | ||
| 474 | _insert : function(h, skip_undo) { | ||
| 475 | var ed = this.editor; | ||
| 366 | 476 | ||
| 367 | if (!div) { | 477 | // First delete the contents seems to work better on WebKit |
| 368 | var div = document.createElement('DIV'); | 478 | if (!ed.selection.isCollapsed()) |
| 369 | div.id = '_TinyMCE_clipboardHTML'; | 479 | ed.getDoc().execCommand('Delete', false, null); |
| 370 | 480 | ||
| 371 | with (div.style) { | 481 | // It's better to use the insertHTML method on Gecko since it will combine paragraphs correctly before inserting the contents |
| 372 | visibility = 'hidden'; | 482 | ed.execCommand(tinymce.isGecko ? 'insertHTML' : 'mceInsertContent', false, h, {skip_undo : skip_undo}); |
| 373 | overflow = 'hidden'; | 483 | }, |
| 374 | position = 'absolute'; | ||
| 375 | width = 1; | ||
| 376 | height = 1; | ||
| 377 | } | ||
| 378 | 484 | ||
| 379 | document.body.appendChild(div); | 485 | /** |
| 380 | } | 486 | * This method will open the old style paste dialogs. Some users might want the old behavior but still use the new cleanup engine. |
| 487 | */ | ||
| 488 | _legacySupport : function() { | ||
| 489 | var t = this, ed = t.editor; | ||
| 490 | |||
| 491 | // Register commands for backwards compatibility | ||
| 492 | each(['mcePasteText', 'mcePasteWord'], function(cmd) { | ||
| 493 | ed.addCommand(cmd, function() { | ||
| 494 | ed.windowManager.open({ | ||
| 495 | file : t.url + (cmd == 'mcePasteText' ? '/pastetext.htm' : '/pasteword.htm'), | ||
| 496 | width : parseInt(ed.getParam("paste_dialog_width", "450")), | ||
| 497 | height : parseInt(ed.getParam("paste_dialog_height", "400")), | ||
| 498 | inline : 1 | ||
| 499 | }); | ||
| 500 | }); | ||
| 501 | }); | ||
| 381 | 502 | ||
| 382 | div.innerHTML = ''; | 503 | // Register buttons for backwards compatibility |
| 383 | var rng = document.body.createTextRange(); | 504 | ed.addButton('pastetext', {title : 'paste.paste_text_desc', cmd : 'mcePasteText'}); |
| 384 | rng.moveToElementText(div); | 505 | ed.addButton('pasteword', {title : 'paste.paste_word_desc', cmd : 'mcePasteWord'}); |
| 385 | rng.execCommand('Paste'); | 506 | ed.addButton('selectall', {title : 'paste.selectall_desc', cmd : 'selectall'}); |
| 386 | var html = div.innerHTML; | ||
| 387 | div.innerHTML = ''; | ||
| 388 | return html; | ||
| 389 | } | 507 | } |
| 390 | }); | 508 | }); |
| 391 | 509 | ||
diff --git a/public/javascripts/tiny_mce/plugins/paste/js/pastetext.js b/public/javascripts/tiny_mce/plugins/paste/js/pastetext.js index 326bb16..c524f9e 100755..100644 --- a/public/javascripts/tiny_mce/plugins/paste/js/pastetext.js +++ b/public/javascripts/tiny_mce/plugins/paste/js/pastetext.js | |||
| @@ -1,42 +1,36 @@ | |||
| 1 | tinyMCEPopup.requireLangPack(); | 1 | tinyMCEPopup.requireLangPack(); |
| 2 | 2 | ||
| 3 | function saveContent() { | 3 | var PasteTextDialog = { |
| 4 | if (document.forms[0].htmlSource.value == '') { | 4 | init : function() { |
| 5 | tinyMCEPopup.close(); | 5 | this.resize(); |
| 6 | return false; | 6 | }, |
| 7 | } | ||
| 8 | |||
| 9 | tinyMCEPopup.execCommand('mcePasteText', false, { | ||
| 10 | html : document.forms[0].htmlSource.value, | ||
| 11 | linebreaks : document.forms[0].linebreaks.checked | ||
| 12 | }); | ||
| 13 | 7 | ||
| 14 | tinyMCEPopup.close(); | 8 | insert : function() { |
| 15 | } | 9 | var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines; |
| 16 | 10 | ||
| 17 | function onLoadInit() { | 11 | // Convert linebreaks into paragraphs |
| 18 | tinyMCEPopup.resizeToInnerSize(); | 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 | } | ||
| 19 | 21 | ||
| 20 | // Remove Gecko spellchecking | 22 | tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h}); |
| 21 | if (tinymce.isGecko) | 23 | tinyMCEPopup.close(); |
| 22 | document.body.spellcheck = tinyMCEPopup.getParam("gecko_spellcheck"); | 24 | }, |
| 23 | 25 | ||
| 24 | resizeInputs(); | 26 | resize : function() { |
| 25 | } | 27 | var vp = tinyMCEPopup.dom.getViewPort(window), el; |
| 26 | 28 | ||
| 27 | var wHeight=0, wWidth=0, owHeight=0, owWidth=0; | 29 | el = document.getElementById('content'); |
| 28 | 30 | ||
| 29 | function resizeInputs() { | 31 | el.style.width = (vp.w - 20) + 'px'; |
| 30 | if (!tinymce.isIE) { | 32 | el.style.height = (vp.h - 90) + 'px'; |
| 31 | wHeight = self.innerHeight-80; | ||
| 32 | wWidth = self.innerWidth-17; | ||
| 33 | } else { | ||
| 34 | wHeight = document.body.clientHeight-80; | ||
| 35 | wWidth = document.body.clientWidth-17; | ||
| 36 | } | 33 | } |
| 34 | }; | ||
| 37 | 35 | ||
| 38 | document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px'; | 36 | tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog); |
| 39 | document.forms[0].htmlSource.style.width = Math.abs(wWidth) + 'px'; | ||
| 40 | } | ||
| 41 | |||
| 42 | tinyMCEPopup.onInit.add(onLoadInit); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/paste/js/pasteword.js b/public/javascripts/tiny_mce/plugins/paste/js/pasteword.js index 6701b99..a52731c 100755..100644 --- a/public/javascripts/tiny_mce/plugins/paste/js/pasteword.js +++ b/public/javascripts/tiny_mce/plugins/paste/js/pasteword.js | |||
| @@ -1,56 +1,51 @@ | |||
| 1 | tinyMCEPopup.requireLangPack(); | 1 | tinyMCEPopup.requireLangPack(); |
| 2 | 2 | ||
| 3 | function saveContent() { | 3 | var PasteWordDialog = { |
| 4 | var html = document.getElementById("frmData").contentWindow.document.body.innerHTML; | 4 | init : function() { |
| 5 | var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = ''; | ||
| 5 | 6 | ||
| 6 | if (html == ''){ | 7 | // Create iframe |
| 7 | tinyMCEPopup.close(); | 8 | el.innerHTML = '<iframe id="iframe" src="javascript:\'\';" frameBorder="0" style="border: 1px solid gray"></iframe>'; |
| 8 | return false; | 9 | ifr = document.getElementById('iframe'); |
| 9 | } | 10 | doc = ifr.contentWindow.document; |
| 10 | |||
| 11 | tinyMCEPopup.execCommand('mcePasteWord', false, html); | ||
| 12 | tinyMCEPopup.close(); | ||
| 13 | } | ||
| 14 | 11 | ||
| 15 | function onLoadInit() { | 12 | // Force absolute CSS urls |
| 16 | tinyMCEPopup.resizeToInnerSize(); | 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 | }); | ||
| 17 | 18 | ||
| 18 | // Fix for endless reloading in FF | 19 | // Write content into iframe |
| 19 | window.setTimeout(createIFrame, 10); | 20 | doc.open(); |
| 20 | } | 21 | doc.write('<html><head>' + cssHTML + '</head><body class="mceContentBody" spellcheck="false"></body></html>'); |
| 22 | doc.close(); | ||
| 21 | 23 | ||
| 22 | function createIFrame() { | 24 | doc.designMode = 'on'; |
| 23 | document.getElementById('iframecontainer').innerHTML = '<iframe id="frmData" name="frmData" class="sourceIframe" src="blank.htm" height="280" width="400" frameborder="0" style="background-color:#FFFFFF; width:100%;" dir="ltr" wrap="soft"></iframe>'; | 25 | this.resize(); |
| 24 | } | ||
| 25 | 26 | ||
| 26 | var wHeight=0, wWidth=0, owHeight=0, owWidth=0; | 27 | window.setTimeout(function() { |
| 28 | ifr.contentWindow.focus(); | ||
| 29 | }, 10); | ||
| 30 | }, | ||
| 27 | 31 | ||
| 28 | function initIframe(doc) { | 32 | insert : function() { |
| 29 | var dir = tinyMCEPopup.editor.settings.directionality; | 33 | var h = document.getElementById('iframe').contentWindow.document.body.innerHTML; |
| 30 | 34 | ||
| 31 | doc.body.dir = dir; | 35 | tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h, wordContent : true}); |
| 32 | 36 | tinyMCEPopup.close(); | |
| 33 | // Remove Gecko spellchecking | 37 | }, |
| 34 | if (tinymce.isGecko) | ||
| 35 | doc.body.spellcheck = tinyMCEPopup.getParam("gecko_spellcheck"); | ||
| 36 | 38 | ||
| 37 | resizeInputs(); | 39 | resize : function() { |
| 38 | } | 40 | var vp = tinyMCEPopup.dom.getViewPort(window), el; |
| 39 | 41 | ||
| 40 | function resizeInputs() { | 42 | el = document.getElementById('iframe'); |
| 41 | if (!tinymce.isIE) { | ||
| 42 | wHeight = self.innerHeight - 80; | ||
| 43 | wWidth = self.innerWidth - 18; | ||
| 44 | } else { | ||
| 45 | wHeight = document.body.clientHeight - 80; | ||
| 46 | wWidth = document.body.clientWidth - 18; | ||
| 47 | } | ||
| 48 | 43 | ||
| 49 | var elm = document.getElementById('frmData'); | 44 | if (el) { |
| 50 | if (elm) { | 45 | el.style.width = (vp.w - 20) + 'px'; |
| 51 | elm.style.height = Math.abs(wHeight) + 'px'; | 46 | el.style.height = (vp.h - 90) + 'px'; |
| 52 | elm.style.width = Math.abs(wWidth) + 'px'; | 47 | } |
| 53 | } | 48 | } |
| 54 | } | 49 | }; |
| 55 | 50 | ||
| 56 | tinyMCEPopup.onInit.add(onLoadInit); | 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 index eeac778..eeac778 100755..100644 --- a/public/javascripts/tiny_mce/plugins/paste/langs/en_dlg.js +++ b/public/javascripts/tiny_mce/plugins/paste/langs/en_dlg.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/paste/pastetext.htm b/public/javascripts/tiny_mce/plugins/paste/pastetext.htm index 2f2b341..42c3d9c 100755..100644 --- a/public/javascripts/tiny_mce/plugins/paste/pastetext.htm +++ b/public/javascripts/tiny_mce/plugins/paste/pastetext.htm | |||
| @@ -4,31 +4,30 @@ | |||
| 4 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | 4 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> |
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> |
| 6 | <script type="text/javascript" src="js/pastetext.js"></script> | 6 | <script type="text/javascript" src="js/pastetext.js"></script> |
| 7 | <base target="_self" /> | ||
| 8 | </head> | 7 | </head> |
| 9 | <body onresize="resizeInputs();" style="display:none; overflow:hidden;"> | 8 | <body onresize="PasteTextDialog.resize();" style="display:none; overflow:hidden;"> |
| 10 | <form name="source" onsubmit="saveContent();return false;" action="#"> | 9 | <form name="source" onsubmit="return PasteTextDialog.insert();" action="#"> |
| 11 | <div style="float: left" class="title">{#paste.paste_text_desc}</div> | 10 | <div style="float: left" class="title">{#paste.paste_text_desc}</div> |
| 12 | 11 | ||
| 13 | <div style="float: right"> | 12 | <div style="float: right"> |
| 14 | <input type="checkbox" name="linebreaks" id="linebreaks" class="wordWrapCode" checked="checked" /><label for="linebreaks">{#paste_dlg.text_linebreaks}</label> | 13 | <input type="checkbox" name="linebreaks" id="linebreaks" class="wordWrapCode" checked="checked" /><label for="linebreaks">{#paste_dlg.text_linebreaks}</label> |
| 15 | </div> | 14 | </div> |
| 16 | 15 | ||
| 17 | <br style="clear: both" /> | 16 | <br style="clear: both" /> |
| 18 | 17 | ||
| 19 | <div>{#paste_dlg.text_title}</div> | 18 | <div>{#paste_dlg.text_title}</div> |
| 20 | 19 | ||
| 21 | <textarea name="htmlSource" id="htmlSource" 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> | 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> |
| 22 | 21 | ||
| 23 | <div class="mceActionPanel"> | 22 | <div class="mceActionPanel"> |
| 24 | <div style="float: left"> | 23 | <div style="float: left"> |
| 25 | <input type="submit" name="insert" value="{#insert}" id="insert" /> | 24 | <input type="submit" name="insert" value="{#insert}" id="insert" /> |
| 26 | </div> | 25 | </div> |
| 27 | 26 | ||
| 28 | <div style="float: right"> | 27 | <div style="float: right"> |
| 29 | <input type="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" /> | 28 | <input type="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" /> |
| 29 | </div> | ||
| 30 | </div> | 30 | </div> |
| 31 | </div> | 31 | </form> |
| 32 | </form> | ||
| 33 | </body> | 32 | </body> |
| 34 | </html> \ No newline at end of file | 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 index 9e5ab1b..f4a9b3d 100755..100644 --- a/public/javascripts/tiny_mce/plugins/paste/pasteword.htm +++ b/public/javascripts/tiny_mce/plugins/paste/pasteword.htm | |||
| @@ -4,11 +4,9 @@ | |||
| 4 | <title>{#paste.paste_word_desc}</title> | 4 | <title>{#paste.paste_word_desc}</title> |
| 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | 5 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> |
| 6 | <script type="text/javascript" src="js/pasteword.js"></script> | 6 | <script type="text/javascript" src="js/pasteword.js"></script> |
| 7 | <link href="css/pasteword.css" rel="stylesheet" type="text/css" /> | ||
| 8 | <base target="_self" /> | ||
| 9 | </head> | 7 | </head> |
| 10 | <body onresize="resizeInputs();" style="display:none; overflow:hidden;"> | 8 | <body onresize="PasteWordDialog.resize();" style="display:none; overflow:hidden;"> |
| 11 | <form name="source" onsubmit="saveContent();" action="#"> | 9 | <form name="source" onsubmit="return PasteWordDialog.insert();" action="#"> |
| 12 | <div class="title">{#paste.paste_word_desc}</div> | 10 | <div class="title">{#paste.paste_word_desc}</div> |
| 13 | 11 | ||
| 14 | <div>{#paste_dlg.word_title}</div> | 12 | <div>{#paste_dlg.word_title}</div> |
| @@ -17,7 +15,7 @@ | |||
| 17 | 15 | ||
| 18 | <div class="mceActionPanel"> | 16 | <div class="mceActionPanel"> |
| 19 | <div style="float: left"> | 17 | <div style="float: left"> |
| 20 | <input type="button" id="insert" name="insert" value="{#insert}" onclick="saveContent();" /> | 18 | <input type="submit" id="insert" name="insert" value="{#insert}" /> |
| 21 | </div> | 19 | </div> |
| 22 | 20 | ||
| 23 | <div style="float: right"> | 21 | <div style="float: right"> |
diff --git a/public/javascripts/tiny_mce/plugins/preview/editor_plugin.js b/public/javascripts/tiny_mce/plugins/preview/editor_plugin.js index deb4bce..507909c 100755..100644 --- a/public/javascripts/tiny_mce/plugins/preview/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/preview/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.create('tinymce.plugins.Preview',{init:function(ed,url){var t=this,css=tinymce.explode(ed.settings.content_css);t.editor=ed;tinymce.each(css,function(u,k){css[k]=ed.documentBaseURI.toAbsolute(u);});ed.addCommand('mcePreview',function(){ed.windowManager.open({file:ed.getParam("plugin_preview_pageurl",url+"/preview.html"),width:parseInt(ed.getParam("plugin_preview_width","550")),height:parseInt(ed.getParam("plugin_preview_height","600")),resizable:"yes",scrollbars:"yes",popup_css:css.join(','),inline:ed.getParam("plugin_preview_inline",1)},{base:ed.documentBaseURI.getURI()});});ed.addButton('preview',{title:'preview.preview_desc',cmd:'mcePreview'});},getInfo:function(){return{longname:'Preview',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('preview',tinymce.plugins.Preview);})(); \ No newline at end of file | (function(){tinymce.create("tinymce.plugins.Preview",{init:function(a,b){var d=this,c=tinymce.explode(a.settings.content_css);d.editor=a;tinymce.each(c,function(f,e){c[e]=a.documentBaseURI.toAbsolute(f)});a.addCommand("mcePreview",function(){a.windowManager.open({file:a.getParam("plugin_preview_pageurl",b+"/preview.html"),width:parseInt(a.getParam("plugin_preview_width","550")),height:parseInt(a.getParam("plugin_preview_height","600")),resizable:"yes",scrollbars:"yes",popup_css:c?c.join(","):a.baseURI.toAbsolute("themes/"+a.settings.theme+"/skins/"+a.settings.skin+"/content.css"),inline:a.getParam("plugin_preview_inline",1)},{base:a.documentBaseURI.getURI()})});a.addButton("preview",{title:"preview.preview_desc",cmd:"mcePreview"})},getInfo:function(){return{longname:"Preview",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("preview",tinymce.plugins.Preview)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/preview/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/preview/editor_plugin_src.js index b2d27f7..0582ab8 100755..100644 --- a/public/javascripts/tiny_mce/plugins/preview/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/preview/editor_plugin_src.js | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /** | 1 | /** |
| 2 | * $Id: editor_plugin_src.js 895 2008-07-10 14:34:23Z spocke $ | 2 | * $Id: editor_plugin_src.js 1056 2009-03-13 12:47:03Z spocke $ |
| 3 | * | 3 | * |
| 4 | * @author Moxiecode | 4 | * @author Moxiecode |
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. |
| @@ -24,7 +24,7 @@ | |||
| 24 | height : parseInt(ed.getParam("plugin_preview_height", "600")), | 24 | height : parseInt(ed.getParam("plugin_preview_height", "600")), |
| 25 | resizable : "yes", | 25 | resizable : "yes", |
| 26 | scrollbars : "yes", | 26 | scrollbars : "yes", |
| 27 | popup_css : css.join(','), | 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) | 28 | inline : ed.getParam("plugin_preview_inline", 1) |
| 29 | }, { | 29 | }, { |
| 30 | base : ed.documentBaseURI.getURI() | 30 | base : ed.documentBaseURI.getURI() |
diff --git a/public/javascripts/tiny_mce/plugins/preview/example.html b/public/javascripts/tiny_mce/plugins/preview/example.html index b2c3d90..b2c3d90 100755..100644 --- a/public/javascripts/tiny_mce/plugins/preview/example.html +++ b/public/javascripts/tiny_mce/plugins/preview/example.html | |||
diff --git a/public/javascripts/tiny_mce/plugins/preview/jscripts/embed.js b/public/javascripts/tiny_mce/plugins/preview/jscripts/embed.js index f8dc810..f8dc810 100755..100644 --- a/public/javascripts/tiny_mce/plugins/preview/jscripts/embed.js +++ b/public/javascripts/tiny_mce/plugins/preview/jscripts/embed.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/preview/preview.html b/public/javascripts/tiny_mce/plugins/preview/preview.html index 7960f78..67e7b14 100755..100644 --- a/public/javascripts/tiny_mce/plugins/preview/preview.html +++ b/public/javascripts/tiny_mce/plugins/preview/preview.html | |||
| @@ -1,19 +1,17 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
| 1 | <html xmlns="http://www.w3.org/1999/xhtml"> | 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 2 | <head> | 3 | <head> |
| 3 | <script language="javascript" src="../../tiny_mce_popup.js"></script> | 4 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> |
| 4 | <script type="text/javascript" src="jscripts/embed.js"></script> | 5 | <script type="text/javascript" src="jscripts/embed.js"></script> |
| 5 | <script type="text/javascript"> | 6 | <script type="text/javascript"><!-- |
| 6 | tinyMCEPopup.onInit.add(function(ed) { | ||
| 7 | var dom = tinyMCEPopup.dom; | ||
| 8 | |||
| 9 | dom.setHTML('content', ed.getContent()); | ||
| 10 | }); | ||
| 11 | |||
| 12 | document.write('<base href="' + tinyMCEPopup.getWindowArg("base") + '">'); | 7 | document.write('<base href="' + tinyMCEPopup.getWindowArg("base") + '">'); |
| 8 | // --> | ||
| 13 | </script> | 9 | </script> |
| 14 | <title>{#preview.preview_desc}</title> | 10 | <title>{#preview.preview_desc}</title> |
| 15 | </head> | 11 | </head> |
| 16 | <body id="content"> | 12 | <body id="content"> |
| 17 | <!-- Gets filled with editor contents --> | 13 | <script type="text/javascript"> |
| 14 | document.write(tinyMCEPopup.editor.getContent()); | ||
| 15 | </script> | ||
| 18 | </body> | 16 | </body> |
| 19 | </html> | 17 | </html> |
diff --git a/public/javascripts/tiny_mce/plugins/print/editor_plugin.js b/public/javascripts/tiny_mce/plugins/print/editor_plugin.js index 7d09a87..b5b3a55 100755..100644 --- a/public/javascripts/tiny_mce/plugins/print/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/print/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.create('tinymce.plugins.Print',{init:function(ed,url){ed.addCommand('mcePrint',function(){ed.getWin().print();});ed.addButton('print',{title:'print.print_desc',cmd:'mcePrint'});},getInfo:function(){return{longname:'Print',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('print',tinymce.plugins.Print);})(); \ No newline at end of file | (function(){tinymce.create("tinymce.plugins.Print",{init:function(a,b){a.addCommand("mcePrint",function(){a.getWin().print()});a.addButton("print",{title:"print.print_desc",cmd:"mcePrint"})},getInfo:function(){return{longname:"Print",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("print",tinymce.plugins.Print)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/print/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/print/editor_plugin_src.js index 51fe156..51fe156 100755..100644 --- a/public/javascripts/tiny_mce/plugins/print/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/print/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/safari/blank.htm b/public/javascripts/tiny_mce/plugins/safari/blank.htm index 266808c..266808c 100755..100644 --- a/public/javascripts/tiny_mce/plugins/safari/blank.htm +++ b/public/javascripts/tiny_mce/plugins/safari/blank.htm | |||
diff --git a/public/javascripts/tiny_mce/plugins/safari/editor_plugin.js b/public/javascripts/tiny_mce/plugins/safari/editor_plugin.js index 4daac19..794477c 100755..100644 --- a/public/javascripts/tiny_mce/plugins/safari/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/safari/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){var Event=tinymce.dom.Event,grep=tinymce.grep,each=tinymce.each,inArray=tinymce.inArray,isOldWebKit=tinymce.isOldWebKit;function isEmpty(d,e,f){var w,n;w=d.createTreeWalker(e,NodeFilter.SHOW_ALL,null,false);while(n=w.nextNode()){if(f){if(!f(n))return false;}if(n.nodeType==3&&n.nodeValue&&/[^\s\u00a0]+/.test(n.nodeValue))return false;if(n.nodeType==1&&/^(HR|IMG|TABLE)$/.test(n.nodeName))return false;}return true;};tinymce.create('tinymce.plugins.Safari',{init:function(ed){var t=this,dom;if(!tinymce.isWebKit)return;t.editor=ed;t.webKitFontSizes=['x-small','small','medium','large','x-large','xx-large','-webkit-xxx-large'];t.namedFontSizes=['xx-small','x-small','small','medium','large','x-large','xx-large'];ed.addCommand('CreateLink',function(u,v){var n=ed.selection.getNode(),dom=ed.dom,a;if(n&&(/^(left|right)$/i.test(dom.getStyle(n,'float',1))||/^(left|right)$/i.test(dom.getAttrib(n,'align')))){a=dom.create('a',{href:v},n.cloneNode());n.parentNode.replaceChild(a,n);ed.selection.select(a);}else ed.getDoc().execCommand("CreateLink",false,v);});ed.onPaste.add(function(ed,e){function removeStyles(e){e=e.target;if(e.nodeType==1){e.style.cssText='';each(ed.dom.select('*',e),function(e){e.style.cssText='';});}};Event.add(ed.getDoc(),'DOMNodeInserted',removeStyles);window.setTimeout(function(){Event.remove(ed.getDoc(),'DOMNodeInserted',removeStyles);},0);});ed.onKeyUp.add(function(ed,e){var h,b,r,n,s;if(e.keyCode==46||e.keyCode==8){b=ed.getBody();h=b.innerHTML;s=ed.selection;if(b.childNodes.length==1&&!/<(img|hr)/.test(h)&&tinymce.trim(h.replace(/<[^>]+>/g,'')).length==0){ed.setContent('<p><br mce_bogus="1" /></p>',{format:'raw'});n=b.firstChild;r=s.getRng();r.setStart(n,0);r.setEnd(n,0);s.setRng(r);}}});ed.addCommand('FormatBlock',function(u,v){var dom=ed.dom,e=dom.getParent(ed.selection.getNode(),dom.isBlock);if(e)dom.replace(dom.create(v),e,1);else ed.getDoc().execCommand("FormatBlock",false,v);});ed.addCommand('mceInsertContent',function(u,v){ed.getDoc().execCommand("InsertText",false,'mce_marker');ed.getBody().innerHTML=ed.getBody().innerHTML.replace(/mce_marker/g,ed.dom.processHTML(v)+'<span id="_mce_tmp">XX</span>');ed.selection.select(ed.dom.get('_mce_tmp'));ed.getDoc().execCommand("Delete",false,' ');});ed.onKeyPress.add(function(ed,e){var se,li,lic,r1,r2,n,sel,doc,be,af,pa;if(e.keyCode==13){sel=ed.selection;se=sel.getNode();if(e.shiftKey||ed.settings.force_br_newlines&&se.nodeName!='LI'){t._insertBR(ed);Event.cancel(e);}if(li=dom.getParent(se,'LI')){lic=dom.getParent(li,'OL,UL');doc=ed.getDoc();pa=dom.create('p');dom.add(pa,'br',{mce_bogus:"1"});if(isEmpty(doc,li)){if(n=dom.getParent(lic.parentNode,'LI,OL,UL'))return;n=dom.getParent(lic,'p,h1,h2,h3,h4,h5,h6,div')||lic;r1=doc.createRange();r1.setStartBefore(n);r1.setEndBefore(li);r2=doc.createRange();r2.setStartAfter(li);r2.setEndAfter(n);be=r1.cloneContents();af=r2.cloneContents();if(!isEmpty(doc,af))dom.insertAfter(af,n);dom.insertAfter(pa,n);if(!isEmpty(doc,be))dom.insertAfter(be,n);dom.remove(n);n=pa.firstChild;r1=doc.createRange();r1.setStartBefore(n);r1.setEndBefore(n);sel.setRng(r1);return Event.cancel(e);}}}});ed.onExecCommand.add(function(ed,cmd){var sel,dom,bl,bm;if(cmd=='InsertUnorderedList'||cmd=='InsertOrderedList'){sel=ed.selection;dom=ed.dom;if(bl=dom.getParent(sel.getNode(),function(n){return/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName);})){bm=sel.getBookmark();dom.remove(bl,1);sel.moveToBookmark(bm);}}});ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName=='IMG'){t.selElm=e;ed.selection.select(e);}else t.selElm=null;});ed.onInit.add(function(){t._fixWebKitSpans();if(isOldWebKit)t._patchSafari2x(ed);});ed.onSetContent.add(function(){dom=ed.dom;each(['strong','b','em','u','strike','sub','sup','a'],function(v){each(grep(dom.select(v)).reverse(),function(n){var nn=n.nodeName.toLowerCase(),st;if(nn=='a'){if(n.name)dom.replace(dom.create('img',{mce_name:'a',name:n.name,'class':'mceItemAnchor'}),n);return;}switch(nn){case'b':case'strong':if(nn=='b')nn='strong';st='font-weight: bold;';break;case'em':st='font-style: italic;';break;case'u':st='text-decoration: underline;';break;case'sub':st='vertical-align: sub;';break;case'sup':st='vertical-align: super;';break;case'strike':st='text-decoration: line-through;';break;}dom.replace(dom.create('span',{mce_name:nn,style:st,'class':'Apple-style-span'}),n,1);});});});ed.onPreProcess.add(function(ed,o){dom=ed.dom;each(grep(o.node.getElementsByTagName('span')).reverse(),function(n){var v,bg;if(o.get){if(dom.hasClass(n,'Apple-style-span')){bg=n.style.backgroundColor;switch(dom.getAttrib(n,'mce_name')){case'font':if(!ed.settings.convert_fonts_to_spans)dom.setAttrib(n,'style','');break;case'strong':case'em':case'sub':case'sup':dom.setAttrib(n,'style','');break;case'strike':case'u':if(!ed.settings.inline_styles)dom.setAttrib(n,'style','');else dom.setAttrib(n,'mce_name','');break;default:if(!ed.settings.inline_styles)dom.setAttrib(n,'style','');}if(bg)n.style.backgroundColor=bg;}}if(dom.hasClass(n,'mceItemRemoved'))dom.remove(n,1);});});ed.onPostProcess.add(function(ed,o){o.content=o.content.replace(/<br \/><\/(h[1-6]|div|p|address|pre)>/g,'</$1>');o.content=o.content.replace(/ id=\"undefined\"/g,'');});},getInfo:function(){return{longname:'Safari compatibility',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/safari',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_fixWebKitSpans:function(){var t=this,ed=t.editor;if(!isOldWebKit){Event.add(ed.getDoc(),'DOMNodeInserted',function(e){e=e.target;if(e&&e.nodeType==1)t._fixAppleSpan(e);});}else{ed.onExecCommand.add(function(){each(ed.dom.select('span'),function(n){t._fixAppleSpan(n);});ed.nodeChanged();});}},_fixAppleSpan:function(e){var ed=this.editor,dom=ed.dom,fz=this.webKitFontSizes,fzn=this.namedFontSizes,s=ed.settings,st,p;if(dom.getAttrib(e,'mce_fixed'))return;if(e.nodeName=='SPAN'&&e.className=='Apple-style-span'){st=e.style;if(!s.convert_fonts_to_spans){if(st.fontSize){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'size',inArray(fz,st.fontSize)+1);}if(st.fontFamily){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'face',st.fontFamily);}if(st.color){dom.setAttrib(e,'mce_name','font');dom.setAttrib(e,'color',dom.toHex(st.color));}if(st.backgroundColor){dom.setAttrib(e,'mce_name','font');dom.setStyle(e,'background-color',st.backgroundColor);}}else{if(st.fontSize)dom.setStyle(e,'fontSize',fzn[inArray(fz,st.fontSize)]);}if(st.fontWeight=='bold')dom.setAttrib(e,'mce_name','strong');if(st.fontStyle=='italic')dom.setAttrib(e,'mce_name','em');if(st.textDecoration=='underline')dom.setAttrib(e,'mce_name','u');if(st.textDecoration=='line-through')dom.setAttrib(e,'mce_name','strike');if(st.verticalAlign=='super')dom.setAttrib(e,'mce_name','sup');if(st.verticalAlign=='sub')dom.setAttrib(e,'mce_name','sub');dom.setAttrib(e,'mce_fixed','1');}},_patchSafari2x:function(ed){var t=this,setContent,getNode,dom=ed.dom,lr;if(ed.windowManager.onBeforeOpen){ed.windowManager.onBeforeOpen.add(function(){r=ed.selection.getRng();});}ed.selection.select=function(n){this.getSel().setBaseAndExtent(n,0,n,1);};getNode=ed.selection.getNode;ed.selection.getNode=function(){return t.selElm||getNode.call(this);};ed.selection.getRng=function(){var t=this,s=t.getSel(),d=ed.getDoc(),r,rb,ra,di;if(s.anchorNode){r=d.createRange();try{rb=d.createRange();rb.setStart(s.anchorNode,s.anchorOffset);rb.collapse(1);ra=d.createRange();ra.setStart(s.focusNode,s.focusOffset);ra.collapse(1);di=rb.compareBoundaryPoints(rb.START_TO_END,ra)<0;r.setStart(di?s.anchorNode:s.focusNode,di?s.anchorOffset:s.focusOffset);r.setEnd(di?s.focusNode:s.anchorNode,di?s.focusOffset:s.anchorOffset);lr=r;}catch(ex){}}return r||lr;};setContent=ed.selection.setContent;ed.selection.setContent=function(h,s){var r=this.getRng(),b;try{setContent.call(this,h,s);}catch(ex){b=dom.create('body');b.innerHTML=h;each(b.childNodes,function(n){r.insertNode(n.cloneNode(true));});}};},_insertBR:function(ed){var dom=ed.dom,s=ed.selection,r=s.getRng(),br;r.insertNode(br=dom.create('br'));r.setStartAfter(br);r.setEndAfter(br);s.setRng(r);if(s.getSel().focusNode==br.previousSibling){s.select(dom.insertAfter(dom.doc.createTextNode('\u00a0'),br));s.collapse(1);}ed.getWin().scrollTo(0,dom.getPos(s.getRng().startContainer).y);}});tinymce.PluginManager.add('safari',tinymce.plugins.Safari);})(); \ No newline at end of file | (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 index 642d659..6667b7c 100755..100644 --- a/public/javascripts/tiny_mce/plugins/safari/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/safari/editor_plugin_src.js | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | (function() { | 8 | (function() { |
| 9 | var Event = tinymce.dom.Event, grep = tinymce.grep, each = tinymce.each, inArray = tinymce.inArray, isOldWebKit = tinymce.isOldWebKit; | 9 | var Event = tinymce.dom.Event, grep = tinymce.grep, each = tinymce.each, inArray = tinymce.inArray; |
| 10 | 10 | ||
| 11 | function isEmpty(d, e, f) { | 11 | function isEmpty(d, e, f) { |
| 12 | var w, n; | 12 | var w, n; |
| @@ -55,6 +55,8 @@ | |||
| 55 | ed.getDoc().execCommand("CreateLink", false, v); | 55 | ed.getDoc().execCommand("CreateLink", false, v); |
| 56 | }); | 56 | }); |
| 57 | 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 | ||
| 58 | ed.onPaste.add(function(ed, e) { | 60 | ed.onPaste.add(function(ed, e) { |
| 59 | function removeStyles(e) { | 61 | function removeStyles(e) { |
| 60 | e = e.target; | 62 | e = e.target; |
| @@ -74,7 +76,7 @@ | |||
| 74 | Event.remove(ed.getDoc(), 'DOMNodeInserted', removeStyles); | 76 | Event.remove(ed.getDoc(), 'DOMNodeInserted', removeStyles); |
| 75 | }, 0); | 77 | }, 0); |
| 76 | }); | 78 | }); |
| 77 | 79 | */ | |
| 78 | ed.onKeyUp.add(function(ed, e) { | 80 | ed.onKeyUp.add(function(ed, e) { |
| 79 | var h, b, r, n, s; | 81 | var h, b, r, n, s; |
| 80 | 82 | ||
| @@ -116,6 +118,14 @@ | |||
| 116 | ed.selection.select(ed.dom.get('_mce_tmp')); | 118 | ed.selection.select(ed.dom.get('_mce_tmp')); |
| 117 | ed.getDoc().execCommand("Delete", false, ' '); | 119 | ed.getDoc().execCommand("Delete", false, ' '); |
| 118 | }); | 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 | });*/ | ||
| 119 | 129 | ||
| 120 | ed.onKeyPress.add(function(ed, e) { | 130 | ed.onKeyPress.add(function(ed, e) { |
| 121 | var se, li, lic, r1, r2, n, sel, doc, be, af, pa; | 131 | var se, li, lic, r1, r2, n, sel, doc, be, af, pa; |
| @@ -209,9 +219,6 @@ | |||
| 209 | 219 | ||
| 210 | ed.onInit.add(function() { | 220 | ed.onInit.add(function() { |
| 211 | t._fixWebKitSpans(); | 221 | t._fixWebKitSpans(); |
| 212 | |||
| 213 | if (isOldWebKit) | ||
| 214 | t._patchSafari2x(ed); | ||
| 215 | }); | 222 | }); |
| 216 | 223 | ||
| 217 | ed.onSetContent.add(function() { | 224 | ed.onSetContent.add(function() { |
| @@ -337,24 +344,13 @@ | |||
| 337 | _fixWebKitSpans : function() { | 344 | _fixWebKitSpans : function() { |
| 338 | var t = this, ed = t.editor; | 345 | var t = this, ed = t.editor; |
| 339 | 346 | ||
| 340 | if (!isOldWebKit) { | 347 | // Use mutator events on new WebKit |
| 341 | // Use mutator events on new WebKit | 348 | Event.add(ed.getDoc(), 'DOMNodeInserted', function(e) { |
| 342 | Event.add(ed.getDoc(), 'DOMNodeInserted', function(e) { | 349 | e = e.target; |
| 343 | e = e.target; | ||
| 344 | |||
| 345 | if (e && e.nodeType == 1) | ||
| 346 | t._fixAppleSpan(e); | ||
| 347 | }); | ||
| 348 | } else { | ||
| 349 | // Do post command processing in old WebKit since the browser crashes on Mutator events :( | ||
| 350 | ed.onExecCommand.add(function() { | ||
| 351 | each(ed.dom.select('span'), function(n) { | ||
| 352 | t._fixAppleSpan(n); | ||
| 353 | }); | ||
| 354 | 350 | ||
| 355 | ed.nodeChanged(); | 351 | if (e && e.nodeType == 1) |
| 356 | }); | 352 | t._fixAppleSpan(e); |
| 357 | } | 353 | }); |
| 358 | }, | 354 | }, |
| 359 | 355 | ||
| 360 | _fixAppleSpan : function(e) { | 356 | _fixAppleSpan : function(e) { |
| @@ -414,78 +410,6 @@ | |||
| 414 | } | 410 | } |
| 415 | }, | 411 | }, |
| 416 | 412 | ||
| 417 | _patchSafari2x : function(ed) { | ||
| 418 | var t = this, setContent, getNode, dom = ed.dom, lr; | ||
| 419 | |||
| 420 | // Inline dialogs | ||
| 421 | if (ed.windowManager.onBeforeOpen) { | ||
| 422 | ed.windowManager.onBeforeOpen.add(function() { | ||
| 423 | r = ed.selection.getRng(); | ||
| 424 | }); | ||
| 425 | } | ||
| 426 | |||
| 427 | // Fake select on 2.x | ||
| 428 | ed.selection.select = function(n) { | ||
| 429 | this.getSel().setBaseAndExtent(n, 0, n, 1); | ||
| 430 | }; | ||
| 431 | |||
| 432 | getNode = ed.selection.getNode; | ||
| 433 | ed.selection.getNode = function() { | ||
| 434 | return t.selElm || getNode.call(this); | ||
| 435 | }; | ||
| 436 | |||
| 437 | // Fake range on Safari 2.x | ||
| 438 | ed.selection.getRng = function() { | ||
| 439 | var t = this, s = t.getSel(), d = ed.getDoc(), r, rb, ra, di; | ||
| 440 | |||
| 441 | // Fake range on Safari 2.x | ||
| 442 | if (s.anchorNode) { | ||
| 443 | r = d.createRange(); | ||
| 444 | |||
| 445 | try { | ||
| 446 | // Setup before range | ||
| 447 | rb = d.createRange(); | ||
| 448 | rb.setStart(s.anchorNode, s.anchorOffset); | ||
| 449 | rb.collapse(1); | ||
| 450 | |||
| 451 | // Setup after range | ||
| 452 | ra = d.createRange(); | ||
| 453 | ra.setStart(s.focusNode, s.focusOffset); | ||
| 454 | ra.collapse(1); | ||
| 455 | |||
| 456 | // Setup start/end points by comparing locations | ||
| 457 | di = rb.compareBoundaryPoints(rb.START_TO_END, ra) < 0; | ||
| 458 | r.setStart(di ? s.anchorNode : s.focusNode, di ? s.anchorOffset : s.focusOffset); | ||
| 459 | r.setEnd(di ? s.focusNode : s.anchorNode, di ? s.focusOffset : s.anchorOffset); | ||
| 460 | |||
| 461 | lr = r; | ||
| 462 | } catch (ex) { | ||
| 463 | // Sometimes fails, at least we tried to do it by the book. I hope Safari 2.x will go disappear soooon!!! | ||
| 464 | } | ||
| 465 | } | ||
| 466 | |||
| 467 | return r || lr; | ||
| 468 | }; | ||
| 469 | |||
| 470 | // Fix setContent so it works | ||
| 471 | setContent = ed.selection.setContent; | ||
| 472 | ed.selection.setContent = function(h, s) { | ||
| 473 | var r = this.getRng(), b; | ||
| 474 | |||
| 475 | try { | ||
| 476 | setContent.call(this, h, s); | ||
| 477 | } catch (ex) { | ||
| 478 | // Workaround for Safari 2.x | ||
| 479 | b = dom.create('body'); | ||
| 480 | b.innerHTML = h; | ||
| 481 | |||
| 482 | each(b.childNodes, function(n) { | ||
| 483 | r.insertNode(n.cloneNode(true)); | ||
| 484 | }); | ||
| 485 | } | ||
| 486 | }; | ||
| 487 | }, | ||
| 488 | |||
| 489 | _insertBR : function(ed) { | 413 | _insertBR : function(ed) { |
| 490 | var dom = ed.dom, s = ed.selection, r = s.getRng(), br; | 414 | var dom = ed.dom, s = ed.selection, r = s.getRng(), br; |
| 491 | 415 | ||
diff --git a/public/javascripts/tiny_mce/plugins/save/editor_plugin.js b/public/javascripts/tiny_mce/plugins/save/editor_plugin.js index 8a13e7d..8e93996 100755..100644 --- a/public/javascripts/tiny_mce/plugins/save/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/save/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.create('tinymce.plugins.Save',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceSave',t._save,t);ed.addCommand('mceCancel',t._cancel,t);ed.addButton('save',{title:'save.save_desc',cmd:'mceSave'});ed.addButton('cancel',{title:'save.cancel_desc',cmd:'mceCancel'});ed.onNodeChange.add(t._nodeChange,t);ed.addShortcut('ctrl+s',ed.getLang('save.save_desc'),'mceSave');},getInfo:function(){return{longname:'Save',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_nodeChange:function(ed,cm,n){var ed=this.editor;if(ed.getParam('save_enablewhendirty')){cm.setDisabled('save',!ed.isDirty());cm.setDisabled('cancel',!ed.isDirty());}},_save:function(){var ed=this.editor,formObj,os,i,elementId;formObj=tinymce.DOM.get(ed.id).form||tinymce.DOM.getParent(ed.id,'form');if(ed.getParam("save_enablewhendirty")&&!ed.isDirty())return;tinyMCE.triggerSave();if(os=ed.getParam("save_onsavecallback")){if(ed.execCallback('save_onsavecallback',ed)){ed.startContent=tinymce.trim(ed.getContent({format:'raw'}));ed.nodeChanged();}return;}if(formObj){ed.isNotDirty=true;if(formObj.onsubmit==null||formObj.onsubmit()!=false)formObj.submit();ed.nodeChanged();}else ed.windowManager.alert("Error: No form element found.");},_cancel:function(){var ed=this.editor,os,h=tinymce.trim(ed.startContent);if(os=ed.getParam("save_oncancelcallback")){ed.execCallback('save_oncancelcallback',ed);return;}ed.setContent(h);ed.undoManager.clear();ed.nodeChanged();}});tinymce.PluginManager.add('save',tinymce.plugins.Save);})(); \ No newline at end of file | (function(){tinymce.create("tinymce.plugins.Save",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceSave",c._save,c);a.addCommand("mceCancel",c._cancel,c);a.addButton("save",{title:"save.save_desc",cmd:"mceSave"});a.addButton("cancel",{title:"save.cancel_desc",cmd:"mceCancel"});a.onNodeChange.add(c._nodeChange,c);a.addShortcut("ctrl+s",a.getLang("save.save_desc"),"mceSave")},getInfo:function(){return{longname:"Save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,c){var b=this.editor;if(b.getParam("save_enablewhendirty")){a.setDisabled("save",!b.isDirty());a.setDisabled("cancel",!b.isDirty())}},_save:function(){var c=this.editor,a,e,d,b;a=tinymce.DOM.get(c.id).form||tinymce.DOM.getParent(c.id,"form");if(c.getParam("save_enablewhendirty")&&!c.isDirty()){return}tinyMCE.triggerSave();if(e=c.getParam("save_onsavecallback")){if(c.execCallback("save_onsavecallback",c)){c.startContent=tinymce.trim(c.getContent({format:"raw"}));c.nodeChanged()}return}if(a){c.isNotDirty=true;if(a.onsubmit==null||a.onsubmit()!=false){a.submit()}c.nodeChanged()}else{c.windowManager.alert("Error: No form element found.")}},_cancel:function(){var a=this.editor,c,b=tinymce.trim(a.startContent);if(c=a.getParam("save_oncancelcallback")){a.execCallback("save_oncancelcallback",a);return}a.setContent(b);a.undoManager.clear();a.nodeChanged()}});tinymce.PluginManager.add("save",tinymce.plugins.Save)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/save/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/save/editor_plugin_src.js index b38be4d..b38be4d 100755..100644 --- a/public/javascripts/tiny_mce/plugins/save/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/save/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css b/public/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css index ecdf58c..ecdf58c 100755..100644 --- a/public/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css +++ b/public/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css | |||
diff --git a/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js b/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js index 7fd913b..c3f8358 100755..100644 --- a/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.create('tinymce.plugins.SearchReplacePlugin',{init:function(ed,url){function open(m){ed.windowManager.open({file:url+'/searchreplace.htm',width:420+parseInt(ed.getLang('searchreplace.delta_width',0)),height:160+parseInt(ed.getLang('searchreplace.delta_height',0)),inline:1,auto_focus:0},{mode:m,search_string:ed.selection.getContent({format:'text'}),plugin_url:url});};ed.addCommand('mceSearch',function(){open('search');});ed.addCommand('mceReplace',function(){open('replace');});ed.addButton('search',{title:'searchreplace.search_desc',cmd:'mceSearch'});ed.addButton('replace',{title:'searchreplace.replace_desc',cmd:'mceReplace'});ed.addShortcut('ctrl+f','searchreplace.search_desc','mceSearch');},getInfo:function(){return{longname:'Search/Replace',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('searchreplace',tinymce.plugins.SearchReplacePlugin);})(); \ No newline at end of file | (function(){tinymce.create("tinymce.plugins.SearchReplacePlugin",{init:function(a,c){function b(d){a.windowManager.open({file:c+"/searchreplace.htm",width:420+parseInt(a.getLang("searchreplace.delta_width",0)),height: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 index 59edc3b..59edc3b 100755..100644 --- a/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js b/public/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js index a8585cc..a8585cc 100755..100644 --- a/public/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js +++ b/public/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js index 370959a..370959a 100755..100644 --- a/public/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js +++ b/public/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm b/public/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm index 9c95a6a..0b42486 100755..100644 --- a/public/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm +++ b/public/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm | |||
| @@ -7,7 +7,6 @@ | |||
| 7 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | 7 | <script type="text/javascript" src="../../utils/form_utils.js"></script> |
| 8 | <script type="text/javascript" src="js/searchreplace.js"></script> | 8 | <script type="text/javascript" src="js/searchreplace.js"></script> |
| 9 | <link rel="stylesheet" type="text/css" href="css/searchreplace.css" /> | 9 | <link rel="stylesheet" type="text/css" href="css/searchreplace.css" /> |
| 10 | <base target="_self" /> | ||
| 11 | </head> | 10 | </head> |
| 12 | <body style="display:none;"> | 11 | <body style="display:none;"> |
| 13 | <form onsubmit="SearchReplaceDialog.searchNext('none');return false;" action="#"> | 12 | <form onsubmit="SearchReplaceDialog.searchNext('none');return false;" action="#"> |
diff --git a/public/javascripts/tiny_mce/plugins/spellchecker/css/content.css b/public/javascripts/tiny_mce/plugins/spellchecker/css/content.css index 24efa02..24efa02 100755..100644 --- a/public/javascripts/tiny_mce/plugins/spellchecker/css/content.css +++ b/public/javascripts/tiny_mce/plugins/spellchecker/css/content.css | |||
diff --git a/public/javascripts/tiny_mce/plugins/spellchecker/editor_plugin.js b/public/javascripts/tiny_mce/plugins/spellchecker/editor_plugin.js index 9cb6799..377e4e8 100755..100644 --- a/public/javascripts/tiny_mce/plugins/spellchecker/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/spellchecker/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){var JSONRequest=tinymce.util.JSONRequest,each=tinymce.each,DOM=tinymce.DOM;tinymce.create('tinymce.plugins.SpellcheckerPlugin',{getInfo:function(){return{longname:'Spellchecker',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker',version:tinymce.majorVersion+"."+tinymce.minorVersion};},init:function(ed,url){var t=this,cm;t.url=url;t.editor=ed;ed.addCommand('mceSpellCheck',function(){if(!t.active){ed.setProgressState(1);t._sendRPC('checkWords',[t.selectedLang,t._getWords()],function(r){if(r.length>0){t.active=1;t._markWords(r);ed.setProgressState(0);ed.nodeChanged();}else{ed.setProgressState(0);ed.windowManager.alert('spellchecker.no_mpell');}});}else t._done();});ed.onInit.add(function(){if(ed.settings.content_css!==false)ed.dom.loadCSS(url+'/css/content.css');});ed.onClick.add(t._showMenu,t);ed.onContextMenu.add(t._showMenu,t);ed.onBeforeGetContent.add(function(){if(t.active)t._removeWords();});ed.onNodeChange.add(function(ed,cm){cm.setActive('spellchecker',t.active);});ed.onSetContent.add(function(){t._done();});ed.onBeforeGetContent.add(function(){t._done();});ed.onBeforeExecCommand.add(function(ed,cmd){if(cmd=='mceFullScreen')t._done();});t.languages={};each(ed.getParam('spellchecker_languages','+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv','hash'),function(v,k){if(k.indexOf('+')===0){k=k.substring(1);t.selectedLang=v;}t.languages[k]=v;});},createControl:function(n,cm){var t=this,c,ed=t.editor;if(n=='spellchecker'){c=cm.createSplitButton(n,{title:'spellchecker.desc',cmd:'mceSpellCheck',scope:t});c.onRenderMenu.add(function(c,m){m.add({title:'spellchecker.langs','class':'mceMenuItemTitle'}).setDisabled(1);each(t.languages,function(v,k){var o={icon:1},mi;o.onclick=function(){mi.setSelected(1);t.selectedItem.setSelected(0);t.selectedItem=mi;t.selectedLang=v;};o.title=k;mi=m.add(o);mi.setSelected(v==t.selectedLang);if(v==t.selectedLang)t.selectedItem=mi;})});return c;}},_walk:function(n,f){var d=this.editor.getDoc(),w;if(d.createTreeWalker){w=d.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,false);while((n=w.nextNode())!=null)f.call(this,n);}else tinymce.walk(n,f,'childNodes');},_getSeparators:function(){var re='',i,str=this.editor.getParam('spellchecker_word_separator_chars','\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}����������������\u201d\u201c');for(i=0;i<str.length;i++)re+='\\'+str.charAt(i);return re;},_getWords:function(){var ed=this.editor,wl=[],tx='',lo={};this._walk(ed.getBody(),function(n){if(n.nodeType==3)tx+=n.nodeValue+' ';});tx=tx.replace(new RegExp('([0-9]|['+this._getSeparators()+'])','g'),' ');tx=tinymce.trim(tx.replace(/(\s+)/g,' '));each(tx.split(' '),function(v){if(!lo[v]){wl.push(v);lo[v]=1;}});return wl;},_removeWords:function(w){var ed=this.editor,dom=ed.dom,se=ed.selection,b=se.getBookmark();each(dom.select('span').reverse(),function(n){if(n&&(dom.hasClass(n,'mceItemHiddenSpellWord')||dom.hasClass(n,'mceItemHidden'))){if(!w||dom.decode(n.innerHTML)==w)dom.remove(n,1);}});se.moveToBookmark(b);},_markWords:function(wl){var r1,r2,r3,r4,r5,w='',ed=this.editor,re=this._getSeparators(),dom=ed.dom,nl=[];var se=ed.selection,b=se.getBookmark();each(wl,function(v){w+=(w?'|':'')+v;});r1=new RegExp('(['+re+'])('+w+')(['+re+'])','g');r2=new RegExp('^('+w+')','g');r3=new RegExp('('+w+')(['+re+']?)$','g');r4=new RegExp('^('+w+')(['+re+']?)$','g');r5=new RegExp('('+w+')(['+re+'])','g');this._walk(this.editor.getBody(),function(n){if(n.nodeType==3){nl.push(n);}});each(nl,function(n){var v;if(n.nodeType==3){v=n.nodeValue;if(r1.test(v)||r2.test(v)||r3.test(v)||r4.test(v)){v=dom.encode(v);v=v.replace(r5,'<span class="mceItemHiddenSpellWord">$1</span>$2');v=v.replace(r3,'<span class="mceItemHiddenSpellWord">$1</span>$2');dom.replace(dom.create('span',{'class':'mceItemHidden'},v),n);}}});se.moveToBookmark(b);},_showMenu:function(ed,e){var t=this,ed=t.editor,m=t._menu,p1,dom=ed.dom,vp=dom.getViewPort(ed.getWin());if(!m){p1=DOM.getPos(ed.getContentAreaContainer());m=ed.controlManager.createDropMenu('spellcheckermenu',{offset_x:p1.x,offset_y:p1.y,'class':'mceNoIcons'});t._menu=m;}if(dom.hasClass(e.target,'mceItemHiddenSpellWord')){m.removeAll();m.add({title:'spellchecker.wait','class':'mceMenuItemTitle'}).setDisabled(1);t._sendRPC('getSuggestions',[t.selectedLang,dom.decode(e.target.innerHTML)],function(r){m.removeAll();if(r.length>0){m.add({title:'spellchecker.sug','class':'mceMenuItemTitle'}).setDisabled(1);each(r,function(v){m.add({title:v,onclick:function(){dom.replace(ed.getDoc().createTextNode(v),e.target);t._checkDone();}});});m.addSeparator();}else m.add({title:'spellchecker.no_sug','class':'mceMenuItemTitle'}).setDisabled(1);m.add({title:'spellchecker.ignore_word',onclick:function(){dom.remove(e.target,1);t._checkDone();}});m.add({title:'spellchecker.ignore_words',onclick:function(){t._removeWords(dom.decode(e.target.innerHTML));t._checkDone();}});m.update();});ed.selection.select(e.target);p1=dom.getPos(e.target);m.showMenu(p1.x,p1.y+e.target.offsetHeight-vp.y);return tinymce.dom.Event.cancel(e);}else m.hideMenu();},_checkDone:function(){var t=this,ed=t.editor,dom=ed.dom,o;each(dom.select('span'),function(n){if(n&&dom.hasClass(n,'mceItemHiddenSpellWord')){o=true;return false;}});if(!o)t._done();},_done:function(){var t=this,la=t.active;if(t.active){t.active=0;t._removeWords();if(t._menu)t._menu.hideMenu();if(la)t.editor.nodeChanged();}},_sendRPC:function(m,p,cb){var t=this,url=t.editor.getParam("spellchecker_rpc_url","{backend}");if(url=='{backend}'){t.editor.setProgressState(0);alert('Please specify: spellchecker_rpc_url');return;}JSONRequest.sendRPC({url:url,method:m,params:p,success:cb,error:function(e,x){t.editor.setProgressState(0);t.editor.windowManager.alert(e.errstr||('Error response: '+x.responseText));}});}});tinymce.PluginManager.add('spellchecker',tinymce.plugins.SpellcheckerPlugin);})(); \ No newline at end of file | (function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;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 index c913c46..c913c46 100755..100644 --- a/public/javascripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/spellchecker/img/wline.gif b/public/javascripts/tiny_mce/plugins/spellchecker/img/wline.gif index 7d0a4db..7d0a4db 100755..100644 --- a/public/javascripts/tiny_mce/plugins/spellchecker/img/wline.gif +++ b/public/javascripts/tiny_mce/plugins/spellchecker/img/wline.gif | |||
| 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 index eb1f264..eb1f264 100755..100644 --- a/public/javascripts/tiny_mce/plugins/style/css/props.css +++ b/public/javascripts/tiny_mce/plugins/style/css/props.css | |||
diff --git a/public/javascripts/tiny_mce/plugins/style/editor_plugin.js b/public/javascripts/tiny_mce/plugins/style/editor_plugin.js index 6ebaa91..cab2153 100755..100644 --- a/public/javascripts/tiny_mce/plugins/style/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/style/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.create('tinymce.plugins.StylePlugin',{init:function(ed,url){ed.addCommand('mceStyleProps',function(){ed.windowManager.open({file:url+'/props.htm',width:480+parseInt(ed.getLang('style.delta_width',0)),height:320+parseInt(ed.getLang('style.delta_height',0)),inline:1},{plugin_url:url,style_text:ed.selection.getNode().style.cssText});});ed.addCommand('mceSetElementStyle',function(ui,v){if(e=ed.selection.getNode()){ed.dom.setAttrib(e,'style',v);ed.execCommand('mceRepaint');}});ed.onNodeChange.add(function(ed,cm,n){cm.setDisabled('styleprops',n.nodeName==='BODY');});ed.addButton('styleprops',{title:'style.desc',cmd:'mceStyleProps'});},getInfo:function(){return{longname:'Style',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('style',tinymce.plugins.StylePlugin);})(); \ No newline at end of file | (function(){tinymce.create("tinymce.plugins.StylePlugin",{init:function(a,b){a.addCommand("mceStyleProps",function(){a.windowManager.open({file:b+"/props.htm",width:480+parseInt(a.getLang("style.delta_width",0)),height:320+parseInt(a.getLang("style.delta_height",0)),inline:1},{plugin_url:b,style_text:a.selection.getNode().style.cssText})});a.addCommand("mceSetElementStyle",function(d,c){if(e=a.selection.getNode()){a.dom.setAttrib(e,"style",c);a.execCommand("mceRepaint")}});a.onNodeChange.add(function(d,c,f){c.setDisabled("styleprops",f.nodeName==="BODY")});a.addButton("styleprops",{title:"style.desc",cmd:"mceStyleProps"})},getInfo:function(){return{longname:"Style",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("style",tinymce.plugins.StylePlugin)})(); \ No newline at end of file | ||
diff --git a/public/javascripts/tiny_mce/plugins/style/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/style/editor_plugin_src.js index 6c817ce..6c817ce 100755..100644 --- a/public/javascripts/tiny_mce/plugins/style/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/style/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/style/js/props.js b/public/javascripts/tiny_mce/plugins/style/js/props.js index cafd6b1..a8dd93d 100755..100644 --- a/public/javascripts/tiny_mce/plugins/style/js/props.js +++ b/public/javascripts/tiny_mce/plugins/style/js/props.js | |||
| @@ -10,9 +10,9 @@ var defaultFonts = "" + | |||
| 10 | "Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif"; | 10 | "Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif"; |
| 11 | 11 | ||
| 12 | var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger"; | 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;em;in;cm;mm;picas;ems;exs;%"; | 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;in;cm;mm;picas;+ems;exs;%"; | 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;in;cm;mm;picas;ems;exs;%"; | 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"; | 16 | var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900"; |
| 17 | var defaultTextStyle = "normal;italic;oblique"; | 17 | var defaultTextStyle = "normal;italic;oblique"; |
| 18 | var defaultVariant = "normal;small-caps"; | 18 | var defaultVariant = "normal;small-caps"; |
| @@ -247,12 +247,12 @@ function setupFormData() { | |||
| 247 | } | 247 | } |
| 248 | 248 | ||
| 249 | function getMeasurement(s) { | 249 | function getMeasurement(s) { |
| 250 | return s.replace(/^([0-9]+)(.*)$/, "$2"); | 250 | return s.replace(/^([0-9.]+)(.*)$/, "$2"); |
| 251 | } | 251 | } |
| 252 | 252 | ||
| 253 | function getNum(s) { | 253 | function getNum(s) { |
| 254 | if (new RegExp('^[0-9]+[a-z%]+$', 'gi').test(s)) | 254 | if (new RegExp('^(?:[0-9.]+)(?:[a-z%]+)$', 'gi').test(s)) |
| 255 | return s.replace(/[^0-9]/g, ''); | 255 | return s.replace(/[^0-9.]/g, ''); |
| 256 | 256 | ||
| 257 | return s; | 257 | return s; |
| 258 | } | 258 | } |
| @@ -478,7 +478,7 @@ function generateCSS() { | |||
| 478 | ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_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 : ""); | 479 | ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : ""); |
| 480 | } else | 480 | } else |
| 481 | ce.style.borderWidth = f.border_width_top.value; | 481 | ce.style.borderWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : ""); |
| 482 | 482 | ||
| 483 | if (!f.border_color_same.checked) { | 483 | if (!f.border_color_same.checked) { |
| 484 | ce.style.borderTopColor = f.border_color_top.value; | 484 | ce.style.borderTopColor = f.border_color_top.value; |
diff --git a/public/javascripts/tiny_mce/plugins/style/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/style/langs/en_dlg.js index 5026313..5026313 100755..100644 --- a/public/javascripts/tiny_mce/plugins/style/langs/en_dlg.js +++ b/public/javascripts/tiny_mce/plugins/style/langs/en_dlg.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/style/props.htm b/public/javascripts/tiny_mce/plugins/style/props.htm index 54538e3..3a1582c 100755..100644 --- a/public/javascripts/tiny_mce/plugins/style/props.htm +++ b/public/javascripts/tiny_mce/plugins/style/props.htm | |||
| @@ -8,7 +8,6 @@ | |||
| 8 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | 8 | <script type="text/javascript" src="../../utils/form_utils.js"></script> |
| 9 | <script type="text/javascript" src="js/props.js"></script> | 9 | <script type="text/javascript" src="js/props.js"></script> |
| 10 | <link href="css/props.css" rel="stylesheet" type="text/css" /> | 10 | <link href="css/props.css" rel="stylesheet" type="text/css" /> |
| 11 | <base target="_self" /> | ||
| 12 | </head> | 11 | </head> |
| 13 | 12 | ||
| 14 | <body id="styleprops" style="display: none"> | 13 | <body id="styleprops" style="display: none"> |
diff --git a/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin.js b/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin.js new file mode 100644 index 0000000..7f1fe26 --- /dev/null +++ b/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin.js | |||
| @@ -0,0 +1 @@ | |||
| (function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(i){o=c.getParent(l.id,"form");n=o.elements;if(o){d(n,function(s,r){if(s.id==l.id){j=r;return false}});if(i>0){for(m=j+1;m<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 new file mode 100644 index 0000000..0fa8d81 --- /dev/null +++ b/public/javascripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js | |||
| @@ -0,0 +1,109 @@ | |||
| 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 index 60264db..1fabc8d 100755..100644 --- a/public/javascripts/tiny_mce/plugins/table/cell.htm +++ b/public/javascripts/tiny_mce/plugins/table/cell.htm | |||
| @@ -8,7 +8,6 @@ | |||
| 8 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> | 8 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> |
| 9 | <script type="text/javascript" src="js/cell.js"></script> | 9 | <script type="text/javascript" src="js/cell.js"></script> |
| 10 | <link href="css/cell.css" rel="stylesheet" type="text/css" /> | 10 | <link href="css/cell.css" rel="stylesheet" type="text/css" /> |
| 11 | <base target="_self" /> | ||
| 12 | </head> | 11 | </head> |
| 13 | <body id="tablecell" style="display: none"> | 12 | <body id="tablecell" style="display: none"> |
| 14 | <form onsubmit="updateAction();return false;" action="#"> | 13 | <form onsubmit="updateAction();return false;" action="#"> |
diff --git a/public/javascripts/tiny_mce/plugins/table/css/cell.css b/public/javascripts/tiny_mce/plugins/table/css/cell.css index a067ecd..a067ecd 100755..100644 --- a/public/javascripts/tiny_mce/plugins/table/css/cell.css +++ b/public/javascripts/tiny_mce/plugins/table/css/cell.css | |||
diff --git a/public/javascripts/tiny_mce/plugins/table/css/row.css b/public/javascripts/tiny_mce/plugins/table/css/row.css index 1f7755d..1f7755d 100755..100644 --- a/public/javascripts/tiny_mce/plugins/table/css/row.css +++ b/public/javascripts/tiny_mce/plugins/table/css/row.css | |||
diff --git a/public/javascripts/tiny_mce/plugins/table/css/table.css b/public/javascripts/tiny_mce/plugins/table/css/table.css index d11c3f6..d11c3f6 100755..100644 --- a/public/javascripts/tiny_mce/plugins/table/css/table.css +++ b/public/javascripts/tiny_mce/plugins/table/css/table.css | |||
diff --git a/public/javascripts/tiny_mce/plugins/table/editor_plugin.js b/public/javascripts/tiny_mce/plugins/table/editor_plugin.js index 97a9d25..ab10538 100755..100644 --- a/public/javascripts/tiny_mce/plugins/table/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/table/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){var each=tinymce.each;tinymce.create('tinymce.plugins.TablePlugin',{init:function(ed,url){var t=this;t.editor=ed;t.url=url;each([['table','table.desc','mceInsertTable',true],['delete_table','table.del','mceTableDelete'],['delete_col','table.delete_col_desc','mceTableDeleteCol'],['delete_row','table.delete_row_desc','mceTableDeleteRow'],['col_after','table.col_after_desc','mceTableInsertColAfter'],['col_before','table.col_before_desc','mceTableInsertColBefore'],['row_after','table.row_after_desc','mceTableInsertRowAfter'],['row_before','table.row_before_desc','mceTableInsertRowBefore'],['row_props','table.row_desc','mceTableRowProps',true],['cell_props','table.cell_desc','mceTableCellProps',true],['split_cells','table.split_cells_desc','mceTableSplitCells',true],['merge_cells','table.merge_cells_desc','mceTableMergeCells',true]],function(c){ed.addButton(c[0],{title:c[1],cmd:c[2],ui:c[3]});});if(ed.getParam('inline_styles')){ed.onPreProcess.add(function(ed,o){var dom=ed.dom;each(dom.select('table',o.node),function(n){var v;if(v=dom.getAttrib(n,'width')){dom.setStyle(n,'width',v);dom.setAttrib(n,'width');}if(v=dom.getAttrib(n,'height')){dom.setStyle(n,'height',v);dom.setAttrib(n,'height');}});});}ed.onInit.add(function(){if(ed&&ed.plugins.contextmenu){ed.plugins.contextmenu.onContextMenu.add(function(th,m,e){var sm,se=ed.selection,el=se.getNode()||ed.getBody();if(ed.dom.getParent(e,'td')||ed.dom.getParent(e,'th')){m.removeAll();if(el.nodeName=='A'&&!ed.dom.getAttrib(el,'name')){m.add({title:'advanced.link_desc',icon:'link',cmd:ed.plugins.advlink?'mceAdvLink':'mceLink',ui:true});m.add({title:'advanced.unlink_desc',icon:'unlink',cmd:'UnLink'});m.addSeparator();}if(el.nodeName=='IMG'&&el.className.indexOf('mceItem')==-1){m.add({title:'advanced.image_desc',icon:'image',cmd:ed.plugins.advimage?'mceAdvImage':'mceImage',ui:true});m.addSeparator();}m.add({title:'table.desc',icon:'table',cmd:'mceInsertTable',ui:true,value:{action:'insert'}});m.add({title:'table.props_desc',icon:'table_props',cmd:'mceInsertTable',ui:true});m.add({title:'table.del',icon:'delete_table',cmd:'mceTableDelete',ui:true});m.addSeparator();sm=m.addMenu({title:'table.cell'});sm.add({title:'table.cell_desc',icon:'cell_props',cmd:'mceTableCellProps',ui:true});sm.add({title:'table.split_cells_desc',icon:'split_cells',cmd:'mceTableSplitCells',ui:true});sm.add({title:'table.merge_cells_desc',icon:'merge_cells',cmd:'mceTableMergeCells',ui:true});sm=m.addMenu({title:'table.row'});sm.add({title:'table.row_desc',icon:'row_props',cmd:'mceTableRowProps',ui:true});sm.add({title:'table.row_before_desc',icon:'row_before',cmd:'mceTableInsertRowBefore'});sm.add({title:'table.row_after_desc',icon:'row_after',cmd:'mceTableInsertRowAfter'});sm.add({title:'table.delete_row_desc',icon:'delete_row',cmd:'mceTableDeleteRow'});sm.addSeparator();sm.add({title:'table.cut_row_desc',icon:'cut',cmd:'mceTableCutRow'});sm.add({title:'table.copy_row_desc',icon:'copy',cmd:'mceTableCopyRow'});sm.add({title:'table.paste_row_before_desc',icon:'paste',cmd:'mceTablePasteRowBefore'});sm.add({title:'table.paste_row_after_desc',icon:'paste',cmd:'mceTablePasteRowAfter'});sm=m.addMenu({title:'table.col'});sm.add({title:'table.col_before_desc',icon:'col_before',cmd:'mceTableInsertColBefore'});sm.add({title:'table.col_after_desc',icon:'col_after',cmd:'mceTableInsertColAfter'});sm.add({title:'table.delete_col_desc',icon:'delete_col',cmd:'mceTableDeleteCol'});}else m.add({title:'table.desc',icon:'table',cmd:'mceInsertTable',ui:true});});}});ed.onKeyDown.add(function(ed,e){if(e.keyCode==9&&ed.dom.getParent(ed.selection.getNode(),'TABLE')){if(!tinymce.isGecko&&!tinymce.isOpera){tinyMCE.execInstanceCommand(ed.editorId,"mceTableMoveToNextRow",true);return tinymce.dom.Event.cancel(e);}ed.undoManager.add();}});if(!tinymce.isIE){if(ed.getParam('table_selection',true)){ed.onClick.add(function(ed,e){e=e.target;if(e.nodeName==='TABLE')ed.selection.select(e);});}}ed.onNodeChange.add(function(ed,cm,n){var p=ed.dom.getParent(n,'td,th,caption');cm.setActive('table',n.nodeName==='TABLE'||!!p);if(p&&p.nodeName==='CAPTION')p=null;cm.setDisabled('delete_table',!p);cm.setDisabled('delete_col',!p);cm.setDisabled('delete_table',!p);cm.setDisabled('delete_row',!p);cm.setDisabled('col_after',!p);cm.setDisabled('col_before',!p);cm.setDisabled('row_after',!p);cm.setDisabled('row_before',!p);cm.setDisabled('row_props',!p);cm.setDisabled('cell_props',!p);cm.setDisabled('split_cells',!p||(parseInt(ed.dom.getAttrib(p,'colspan','1'))<2&&parseInt(ed.dom.getAttrib(p,'rowspan','1'))<2));cm.setDisabled('merge_cells',!p);});if(!tinymce.isIE){ed.onBeforeSetContent.add(function(ed,o){if(o.initial)o.content=o.content.replace(/<(td|th)([^>]+|)>\s*<\/(td|th)>/g,tinymce.isOpera?'<$1$2> </$1>':'<$1$2><br mce_bogus="1" /></$1>');});}},execCommand:function(cmd,ui,val){var ed=this.editor,b;switch(cmd){case"mceTableMoveToNextRow":case"mceInsertTable":case"mceTableRowProps":case"mceTableCellProps":case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":case"mceTableDelete":ed.execCommand('mceBeginUndoLevel');this._doExecCommand(cmd,ui,val);ed.execCommand('mceEndUndoLevel');return true;}return false;},getInfo:function(){return{longname:'Tables',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/table',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_doExecCommand:function(command,user_interface,value){var inst=this.editor,ed=inst,url=this.url;var focusElm=inst.selection.getNode();var trElm=inst.dom.getParent(focusElm,"tr");var tdElm=inst.dom.getParent(focusElm,"td,th");var tableElm=inst.dom.getParent(focusElm,"table");var doc=inst.contentWindow.document;var tableBorder=tableElm?tableElm.getAttribute("border"):"";if(trElm&&tdElm==null)tdElm=trElm.cells[0];function inArray(ar,v){for(var i=0;i<ar.length;i++){if(ar[i].length>0&&inArray(ar[i],v))return true;if(ar[i]==v)return true;}return false;}function select(dx,dy){var td;grid=getTableGrid(tableElm);dx=dx||0;dy=dy||0;dx=Math.max(cpos.cellindex+dx,0);dy=Math.max(cpos.rowindex+dy,0);inst.execCommand('mceRepaint');td=getCell(grid,dy,dx);if(td){inst.selection.select(td.firstChild||td);inst.selection.collapse(1);}};function makeTD(){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';}function getColRowSpan(td){var colspan=inst.dom.getAttrib(td,"colspan");var rowspan=inst.dom.getAttrib(td,"rowspan");colspan=colspan==""?1:parseInt(colspan);rowspan=rowspan==""?1:parseInt(rowspan);return{colspan:colspan,rowspan:rowspan};}function getCellPos(grid,td){var x,y;for(y=0;y<grid.length;y++){for(x=0;x<grid[y].length;x++){if(grid[y][x]==td)return{cellindex:x,rowindex:y};}}return null;}function getCell(grid,row,col){if(grid[row]&&grid[row][col])return grid[row][col];return null;}function getNextCell(table,cell){var cells=[],x=0,i,j,cell,nextCell;for(i=0;i<table.rows.length;i++)for(j=0;j<table.rows[i].cells.length;j++,x++)cells[x]=table.rows[i].cells[j];for(i=0;i<cells.length;i++)if(cells[i]==cell)if(nextCell=cells[i+1])return nextCell;}function getTableGrid(table){var grid=[],rows=table.rows,x,y,td,sd,xstart,x2,y2;for(y=0;y<rows.length;y++){for(x=0;x<rows[y].cells.length;x++){td=rows[y].cells[x];sd=getColRowSpan(td);for(xstart=x;grid[y]&&grid[y][xstart];xstart++);for(y2=y;y2<y+sd['rowspan'];y2++){if(!grid[y2])grid[y2]=[];for(x2=xstart;x2<xstart+sd['colspan'];x2++)grid[y2][x2]=td;}}}return grid;}function trimRow(table,tr,td,new_tr){var grid=getTableGrid(table),cpos=getCellPos(grid,td);var cells,lastElm;if(new_tr.cells.length!=tr.childNodes.length){cells=tr.childNodes;lastElm=null;for(var x=0;td=getCell(grid,cpos.rowindex,x);x++){var remove=true;var sd=getColRowSpan(td);if(inArray(cells,td)){new_tr.childNodes[x]._delete=true;}else if((lastElm==null||td!=lastElm)&&sd.colspan>1){for(var i=x;i<x+td.colSpan;i++)new_tr.childNodes[i]._delete=true;}if((lastElm==null||td!=lastElm)&&sd.rowspan>1)td.rowSpan=sd.rowspan+1;lastElm=td;}deleteMarked(tableElm);}}function prevElm(node,name){while((node=node.previousSibling)!=null){if(node.nodeName==name)return node;}return null;}function nextElm(node,names){var namesAr=names.split(',');while((node=node.nextSibling)!=null){for(var i=0;i<namesAr.length;i++){if(node.nodeName.toLowerCase()==namesAr[i].toLowerCase())return node;}}return null;}function deleteMarked(tbl){if(tbl.rows==0)return;var tr=tbl.rows[0];do{var next=nextElm(tr,"TR");if(tr._delete){tr.parentNode.removeChild(tr);continue;}var td=tr.cells[0];if(td.cells>1){do{var nexttd=nextElm(td,"TD,TH");if(td._delete)td.parentNode.removeChild(td);}while((td=nexttd)!=null);}}while((tr=next)!=null);}function addRows(td_elm,tr_elm,rowspan){td_elm.rowSpan=1;var trNext=nextElm(tr_elm,"TR");for(var i=1;i<rowspan&&trNext;i++){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';if(tinymce.isIE)trNext.insertBefore(newTD,trNext.cells(td_elm.cellIndex));else trNext.insertBefore(newTD,trNext.cells[td_elm.cellIndex]);trNext=nextElm(trNext,"TR");}}function copyRow(doc,table,tr){var grid=getTableGrid(table);var newTR=tr.cloneNode(false);var cpos=getCellPos(grid,tr.cells[0]);var lastCell=null;var tableBorder=inst.dom.getAttrib(table,"border");var tdElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){var newTD=null;if(lastCell!=tdElm){for(var i=0;i<tr.cells.length;i++){if(tdElm==tr.cells[i]){newTD=tdElm.cloneNode(true);break;}}}if(newTD==null){newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';}newTD.colSpan=1;newTD.rowSpan=1;newTR.appendChild(newTD);lastCell=tdElm;}return newTR;}switch(command){case"mceTableMoveToNextRow":var nextCell=getNextCell(tableElm,tdElm);if(!nextCell){inst.execCommand("mceTableInsertRowAfter",tdElm);nextCell=getNextCell(tableElm,tdElm);}inst.selection.select(nextCell);inst.selection.collapse(true);return true;case"mceTableRowProps":if(trElm==null)return true;if(user_interface){inst.windowManager.open({url:url+'/row.htm',width:400+parseInt(inst.getLang('table.rowprops_delta_width',0)),height:295+parseInt(inst.getLang('table.rowprops_delta_height',0)),inline:1},{plugin_url:url});}return true;case"mceTableCellProps":if(tdElm==null)return true;if(user_interface){inst.windowManager.open({url:url+'/cell.htm',width:400+parseInt(inst.getLang('table.cellprops_delta_width',0)),height:295+parseInt(inst.getLang('table.cellprops_delta_height',0)),inline:1},{plugin_url:url});}return true;case"mceInsertTable":if(user_interface){inst.windowManager.open({url:url+'/table.htm',width:400+parseInt(inst.getLang('table.table_delta_width',0)),height:320+parseInt(inst.getLang('table.table_delta_height',0)),inline:1},{plugin_url:url,action:value?value.action:0});}return true;case"mceTableDelete":var table=inst.dom.getParent(inst.selection.getNode(),"table");if(table){table.parentNode.removeChild(table);inst.execCommand('mceRepaint');}return true;case"mceTableSplitCells":case"mceTableMergeCells":case"mceTableInsertRowBefore":case"mceTableInsertRowAfter":case"mceTableDeleteRow":case"mceTableInsertColBefore":case"mceTableInsertColAfter":case"mceTableDeleteCol":case"mceTableCutRow":case"mceTableCopyRow":case"mceTablePasteRowBefore":case"mceTablePasteRowAfter":if(!tableElm)return true;if(trElm&&tableElm!=trElm.parentNode)tableElm=trElm.parentNode;if(tableElm&&trElm){switch(command){case"mceTableCutRow":if(!trElm||!tdElm)return true;inst.tableRowClipboard=copyRow(doc,tableElm,trElm);inst.execCommand("mceTableDeleteRow");break;case"mceTableCopyRow":if(!trElm||!tdElm)return true;inst.tableRowClipboard=copyRow(doc,tableElm,trElm);break;case"mceTablePasteRowBefore":if(!trElm||!tdElm)return true;var newTR=inst.tableRowClipboard.cloneNode(true);var prevTR=prevElm(trElm,"TR");if(prevTR!=null)trimRow(tableElm,prevTR,prevTR.cells[0],newTR);trElm.parentNode.insertBefore(newTR,trElm);break;case"mceTablePasteRowAfter":if(!trElm||!tdElm)return true;var nextTR=nextElm(trElm,"TR");var newTR=inst.tableRowClipboard.cloneNode(true);trimRow(tableElm,trElm,tdElm,newTR);if(nextTR==null)trElm.parentNode.appendChild(newTR);else nextTR.parentNode.insertBefore(newTR,nextTR);break;case"mceTableInsertRowBefore":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var newTR=doc.createElement("tr");var lastTDElm=null;cpos.rowindex--;if(cpos.rowindex<0)cpos.rowindex=0;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['rowspan']==1){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';newTD.colSpan=tdElm.colSpan;newTR.appendChild(newTD);}else tdElm.rowSpan=sd['rowspan']+1;lastTDElm=tdElm;}}trElm.parentNode.insertBefore(newTR,trElm);select(0,1);break;case"mceTableInsertRowAfter":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var newTR=doc.createElement("tr");var lastTDElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['rowspan']==1){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';newTD.colSpan=tdElm.colSpan;newTR.appendChild(newTD);}else tdElm.rowSpan=sd['rowspan']+1;lastTDElm=tdElm;}}if(newTR.hasChildNodes()){var nextTR=nextElm(trElm,"TR");if(nextTR)nextTR.parentNode.insertBefore(newTR,nextTR);else tableElm.appendChild(newTR);}select(0,1);break;case"mceTableDeleteRow":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);if(grid.length==1&&tableElm.nodeName=='TBODY'){inst.dom.remove(inst.dom.getParent(tableElm,"table"));return true;}var cells=trElm.cells;var nextTR=nextElm(trElm,"TR");for(var x=0;x<cells.length;x++){if(cells[x].rowSpan>1){var newTD=cells[x].cloneNode(true);var sd=getColRowSpan(cells[x]);newTD.rowSpan=sd.rowspan-1;var nextTD=nextTR.cells[x];if(nextTD==null)nextTR.appendChild(newTD);else nextTR.insertBefore(newTD,nextTD);}}var lastTDElm=null;for(var x=0;tdElm=getCell(grid,cpos.rowindex,x);x++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd.rowspan>1){tdElm.rowSpan=sd.rowspan-1;}else{trElm=tdElm.parentNode;if(trElm.parentNode)trElm._delete=true;}lastTDElm=tdElm;}}deleteMarked(tableElm);select(0,-1);break;case"mceTableInsertColBefore":if(!trElm||!tdElm)return true;var grid=getTableGrid(inst.dom.getParent(tableElm,"table"));var cpos=getCellPos(grid,tdElm);var lastTDElm=null;for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']==1){var newTD=doc.createElement(tdElm.nodeName);if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';newTD.rowSpan=tdElm.rowSpan;tdElm.parentNode.insertBefore(newTD,tdElm);}else tdElm.colSpan++;lastTDElm=tdElm;}}select();break;case"mceTableInsertColAfter":if(!trElm||!tdElm)return true;var grid=getTableGrid(inst.dom.getParent(tableElm,"table"));var cpos=getCellPos(grid,tdElm);var lastTDElm=null;for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']==1){var newTD=doc.createElement(tdElm.nodeName);if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';newTD.rowSpan=tdElm.rowSpan;var nextTD=nextElm(tdElm,"TD,TH");if(nextTD==null)tdElm.parentNode.appendChild(newTD);else nextTD.parentNode.insertBefore(newTD,nextTD);}else tdElm.colSpan++;lastTDElm=tdElm;}}select(1);break;case"mceTableDeleteCol":if(!trElm||!tdElm)return true;var grid=getTableGrid(tableElm);var cpos=getCellPos(grid,tdElm);var lastTDElm=null;if((grid.length>1&&grid[0].length<=1)&&tableElm.nodeName=='TBODY'){inst.dom.remove(inst.dom.getParent(tableElm,"table"));return true;}for(var y=0;tdElm=getCell(grid,y,cpos.cellindex);y++){if(tdElm!=lastTDElm){var sd=getColRowSpan(tdElm);if(sd['colspan']>1)tdElm.colSpan=sd['colspan']-1;else{if(tdElm.parentNode)tdElm.parentNode.removeChild(tdElm);}lastTDElm=tdElm;}}select(-1);break;case"mceTableSplitCells":if(!trElm||!tdElm)return true;var spandata=getColRowSpan(tdElm);var colspan=spandata["colspan"];var rowspan=spandata["rowspan"];if(colspan>1||rowspan>1){tdElm.colSpan=1;for(var i=1;i<colspan;i++){var newTD=doc.createElement("td");if(!tinymce.isIE)newTD.innerHTML='<br mce_bogus="1"/>';trElm.insertBefore(newTD,nextElm(tdElm,"TD,TH"));if(rowspan>1)addRows(newTD,trElm,rowspan);}addRows(tdElm,trElm,rowspan);}tableElm=inst.dom.getParent(inst.selection.getNode(),"table");break;case"mceTableMergeCells":var rows=[];var sel=inst.selection.getSel();var grid=getTableGrid(tableElm);if(tinymce.isIE||sel.rangeCount==1){if(user_interface){var sp=getColRowSpan(tdElm);inst.windowManager.open({url:url+'/merge_cells.htm',width:240+parseInt(inst.getLang('table.merge_cells_delta_width',0)),height:110+parseInt(inst.getLang('table.merge_cells_delta_height',0)),inline:1},{action:"update",numcols:sp.colspan,numrows:sp.rowspan,plugin_url:url});return true;}else{var numRows=parseInt(value['numrows']);var numCols=parseInt(value['numcols']);var cpos=getCellPos(grid,tdElm);if((""+numRows)=="NaN")numRows=1;if((""+numCols)=="NaN")numCols=1;var tRows=tableElm.rows;for(var y=cpos.rowindex;y<grid.length;y++){var rowCells=[];for(var x=cpos.cellindex;x<grid[y].length;x++){var td=getCell(grid,y,x);if(td&&!inArray(rows,td)&&!inArray(rowCells,td)){var cp=getCellPos(grid,td);if(cp.cellindex<cpos.cellindex+numCols&&cp.rowindex<cpos.rowindex+numRows)rowCells[rowCells.length]=td;}}if(rowCells.length>0)rows[rows.length]=rowCells;var td=getCell(grid,cpos.rowindex,cpos.cellindex);each(ed.dom.select('br',td),function(e,i){if(i>0&&ed.dom.getAttrib('mce_bogus'))ed.dom.remove(e);});}}}else{var cells=[];var sel=inst.selection.getSel();var lastTR=null;var curRow=null;var x1=-1,y1=-1,x2,y2;if(sel.rangeCount<2)return true;for(var i=0;i<sel.rangeCount;i++){var rng=sel.getRangeAt(i);var tdElm=rng.startContainer.childNodes[rng.startOffset];if(!tdElm)break;if(tdElm.nodeName=="TD"||tdElm.nodeName=="TH")cells[cells.length]=tdElm;}var tRows=tableElm.rows;for(var y=0;y<tRows.length;y++){var rowCells=[];for(var x=0;x<tRows[y].cells.length;x++){var td=tRows[y].cells[x];for(var i=0;i<cells.length;i++){if(td==cells[i]){rowCells[rowCells.length]=td;}}}if(rowCells.length>0)rows[rows.length]=rowCells;}var curRow=[];var lastTR=null;for(var y=0;y<grid.length;y++){for(var x=0;x<grid[y].length;x++){grid[y][x]._selected=false;for(var i=0;i<cells.length;i++){if(grid[y][x]==cells[i]){if(x1==-1){x1=x;y1=y;}x2=x;y2=y;grid[y][x]._selected=true;}}}}for(var y=y1;y<=y2;y++){for(var x=x1;x<=x2;x++){if(!grid[y][x]._selected){alert("Invalid selection for merge.");return true;}}}}var rowSpan=1,colSpan=1;var lastRowSpan=-1;for(var y=0;y<rows.length;y++){var rowColSpan=0;for(var x=0;x<rows[y].length;x++){var sd=getColRowSpan(rows[y][x]);rowColSpan+=sd['colspan'];if(lastRowSpan!=-1&&sd['rowspan']!=lastRowSpan){alert("Invalid selection for merge.");return true;}lastRowSpan=sd['rowspan'];}if(rowColSpan>colSpan)colSpan=rowColSpan;lastRowSpan=-1;}var lastColSpan=-1;for(var x=0;x<rows[0].length;x++){var colRowSpan=0;for(var y=0;y<rows.length;y++){var sd=getColRowSpan(rows[y][x]);colRowSpan+=sd['rowspan'];if(lastColSpan!=-1&&sd['colspan']!=lastColSpan){alert("Invalid selection for merge.");return true;}lastColSpan=sd['colspan'];}if(colRowSpan>rowSpan)rowSpan=colRowSpan;lastColSpan=-1;}tdElm=rows[0][0];tdElm.rowSpan=rowSpan;tdElm.colSpan=colSpan;for(var y=0;y<rows.length;y++){for(var x=0;x<rows[y].length;x++){var html=rows[y][x].innerHTML;var chk=html.replace(/[ \t\r\n]/g,"");if(chk!="<br/>"&&chk!="<br>"&&chk!='<br mce_bogus="1"/>'&&(x+y>0))tdElm.innerHTML+=html;if(rows[y][x]!=tdElm&&!rows[y][x]._deleted){var cpos=getCellPos(grid,rows[y][x]);var tr=rows[y][x].parentNode;tr.removeChild(rows[y][x]);rows[y][x]._deleted=true;if(!tr.hasChildNodes()){tr.parentNode.removeChild(tr);var lastCell=null;for(var x=0;cellElm=getCell(grid,cpos.rowindex,x);x++){if(cellElm!=lastCell&&cellElm.rowSpan>1)cellElm.rowSpan--;lastCell=cellElm;}if(tdElm.rowSpan>1)tdElm.rowSpan--;}}}}each(ed.dom.select('br',tdElm),function(e,i){if(i>0&&ed.dom.getAttrib(e,'mce_bogus'))ed.dom.remove(e);});break;}tableElm=inst.dom.getParent(inst.selection.getNode(),"table");inst.addVisual(tableElm);inst.nodeChanged();}return true;}return false;}});tinymce.PluginManager.add('table',tinymce.plugins.TablePlugin);})(); \ No newline at end of file | (function(){var a=tinymce.each;tinymce.create("tinymce.plugins.TablePlugin",{init:function(b,c){var d=this;d.editor=b;d.url=c;a([["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(e){b.addButton(e[0],{title:e[1],cmd:e[2],ui:e[3]})});if(b.getParam("inline_styles")){b.onPreProcess.add(function(e,g){var f=e.dom;a(f.select("table",g.node),function(i){var h;if(h=f.getAttrib(i,"width")){f.setStyle(i,"width",h);f.setAttrib(i,"width")}if(h=f.getAttrib(i,"height")){f.setStyle(i,"height",h);f.setAttrib(i,"height")}})})}b.onInit.add(function(){if(!tinymce.isIE&&b.getParam("forced_root_block")){function e(){var f=b.getBody().lastChild;if(f&&f.nodeName=="TABLE"){b.dom.add(b.getBody(),"p",null,'<br mce_bogus="1" />')}}b.onKeyUp.add(e);b.onSetContent.add(e);b.onVisualAid.add(e);b.onPreProcess.add(function(f,h){var g=h.node.lastChild;if(g&&g.childNodes.length==1&&g.firstChild.nodeName=="BR"){f.dom.remove(g)}});e()}if(b&&b.plugins.contextmenu){b.plugins.contextmenu.onContextMenu.add(function(h,f,j){var k,i=b.selection,g=i.getNode()||b.getBody();if(b.dom.getParent(j,"td")||b.dom.getParent(j,"th")){f.removeAll();if(g.nodeName=="A"&&!b.dom.getAttrib(g,"name")){f.add({title:"advanced.link_desc",icon:"link",cmd:b.plugins.advlink?"mceAdvLink":"mceLink",ui:true});f.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});f.addSeparator()}if(g.nodeName=="IMG"&&g.className.indexOf("mceItem")==-1){f.add({title:"advanced.image_desc",icon:"image",cmd:b.plugins.advimage?"mceAdvImage":"mceImage",ui:true});f.addSeparator()}f.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",ui:true,value:{action:"insert"}});f.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable",ui:true});f.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete",ui:true});f.addSeparator();k=f.addMenu({title:"table.cell"});k.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps",ui:true});k.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells",ui:true});k.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells",ui:true});k=f.addMenu({title:"table.row"});k.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps",ui:true});k.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});k.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});k.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});k.addSeparator();k.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});k.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});k.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"});k.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"});k=f.addMenu({title:"table.col"});k.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});k.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});k.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{f.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",ui:true})}})}});b.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(b.getParam("table_selection",true)){b.onClick.add(function(f,g){g=g.target;if(g.nodeName==="TABLE"){f.selection.select(g)}})}}b.onNodeChange.add(function(f,e,h){var g=f.dom.getParent(h,"td,th,caption");e.setActive("table",h.nodeName==="TABLE"||!!g);if(g&&g.nodeName==="CAPTION"){g=null}e.setDisabled("delete_table",!g);e.setDisabled("delete_col",!g);e.setDisabled("delete_table",!g);e.setDisabled("delete_row",!g);e.setDisabled("col_after",!g);e.setDisabled("col_before",!g);e.setDisabled("row_after",!g);e.setDisabled("row_before",!g);e.setDisabled("row_props",!g);e.setDisabled("cell_props",!g);e.setDisabled("split_cells",!g||(parseInt(f.dom.getAttrib(g,"colspan","1"))<2&&parseInt(f.dom.getAttrib(g,"rowspan","1"))<2));e.setDisabled("merge_cells",!g)});if(!tinymce.isIE){b.onBeforeSetContent.add(function(e,f){if(f.initial){f.content=f.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(r,Z,ae){var V=this.editor,au=V,g=this.url;var n=V.selection.getNode();var W=V.dom.getParent(n,"tr");var aq=V.dom.getParent(n,"td,th");var F=V.dom.getParent(n,"table");var k=V.contentWindow.document;var av=F?F.getAttribute("border"):"";if(W&&aq==null){aq=W.cells[0]}function ap(y,x){for(var ax=0;ax<y.length;ax++){if(y[ax].length>0&&ap(y[ax],x)){return true}if(y[ax]==x){return true}}return false}function aj(x,i){var y;ad=e(F);x=x||0;i=i||0;x=Math.max(o.cellindex+x,0);i=Math.max(o.rowindex+i,0);V.execCommand("mceRepaint");y=d(ad,i,x);if(y){V.selection.select(y.firstChild||y);V.selection.collapse(1)}}function ah(){var i=k.createElement("td");if(!tinymce.isIE){i.innerHTML='<br mce_bogus="1"/>'}}function j(y){var x=V.dom.getAttrib(y,"colspan");var i=V.dom.getAttrib(y,"rowspan");x=x==""?1:parseInt(x);i=i==""?1:parseInt(i);return{colspan:x,rowspan:i}}function al(ax,az){var i,ay;for(ay=0;ay<ax.length;ay++){for(i=0;i<ax[ay].length;i++){if(ax[ay][i]==az){return{cellindex:i,rowindex:ay}}}}return null}function d(x,y,i){if(x[y]&&x[y][i]){return x[y][i]}return null}function A(aC,ax){var az=[],y=0,aA,ay,ax,aB;for(aA=0;aA<aC.rows.length;aA++){for(ay=0;ay<aC.rows[aA].cells.length;ay++,y++){az[y]=aC.rows[aA].cells[ay]}}for(aA=0;aA<az.length;aA++){if(az[aA]==ax){if(aB=az[aA+1]){return aB}}}}function e(aE){var i=[],aF=aE.rows,aC,aB,ay,az,aD,ax,aA;for(aB=0;aB<aF.length;aB++){for(aC=0;aC<aF[aB].cells.length;aC++){ay=aF[aB].cells[aC];az=j(ay);for(aD=aC;i[aB]&&i[aB][aD];aD++){}for(aA=aB;aA<aB+az.rowspan;aA++){if(!i[aA]){i[aA]=[]}for(ax=aD;ax<aD+az.colspan;ax++){i[aA][ax]=ay}}}}return i}function m(aG,aD,ay,ax){var y=e(aG),aF=al(y,ay);var aH,aC;if(ax.cells.length!=aD.childNodes.length){aH=aD.childNodes;aC=null;for(var aE=0;ay=d(y,aF.rowindex,aE);aE++){var aA=true;var aB=j(ay);if(ap(aH,ay)){ax.childNodes[aE]._delete=true}else{if((aC==null||ay!=aC)&&aB.colspan>1){for(var az=aE;az<aE+ay.colSpan;az++){ax.childNodes[az]._delete=true}}}if((aC==null||ay!=aC)&&aB.rowspan>1){ay.rowSpan=aB.rowspan+1}aC=ay}B(F)}}function O(x,i){while((x=x.previousSibling)!=null){if(x.nodeName==i){return x}}return null}function af(ax,ay){var x=ay.split(",");while((ax=ax.nextSibling)!=null){for(var y=0;y<x.length;y++){if(ax.nodeName.toLowerCase()==x[y].toLowerCase()){return ax}}}return null}function B(ax){if(ax.rows==0){return}var y=ax.rows[0];do{var x=af(y,"TR");if(y._delete){y.parentNode.removeChild(y);continue}var ay=y.cells[0];if(ay.cells>1){do{var i=af(ay,"TD,TH");if(ay._delete){ay.parentNode.removeChild(ay)}}while((ay=i)!=null)}}while((y=x)!=null)}function p(ax,aA,az){ax.rowSpan=1;var x=af(aA,"TR");for(var ay=1;ay<az&&x;ay++){var y=k.createElement("td");if(!tinymce.isIE){y.innerHTML='<br mce_bogus="1"/>'}if(tinymce.isIE){x.insertBefore(y,x.cells(ax.cellIndex))}else{x.insertBefore(y,x.cells[ax.cellIndex])}x=af(x,"TR")}}function S(aF,aH,aB){var y=e(aH);var ax=aB.cloneNode(false);var aG=al(y,aB.cells[0]);var aC=null;var aA=V.dom.getAttrib(aH,"border");var az=null;for(var aE=0;az=d(y,aG.rowindex,aE);aE++){var aD=null;if(aC!=az){for(var ay=0;ay<aB.cells.length;ay++){if(az==aB.cells[ay]){aD=az.cloneNode(true);break}}}if(aD==null){aD=aF.createElement("td");if(!tinymce.isIE){aD.innerHTML='<br mce_bogus="1"/>'}}aD.colSpan=1;aD.rowSpan=1;ax.appendChild(aD);aC=az}return ax}switch(r){case"mceTableMoveToNextRow":var L=A(F,aq);if(!L){V.execCommand("mceTableInsertRowAfter",aq);L=A(F,aq)}V.selection.select(L);V.selection.collapse(true);return true;case"mceTableRowProps":if(W==null){return true}if(Z){V.windowManager.open({url:g+"/row.htm",width:400+parseInt(V.getLang("table.rowprops_delta_width",0)),height:295+parseInt(V.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:g})}return true;case"mceTableCellProps":if(aq==null){return true}if(Z){V.windowManager.open({url:g+"/cell.htm",width:400+parseInt(V.getLang("table.cellprops_delta_width",0)),height:295+parseInt(V.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:g})}return true;case"mceInsertTable":if(Z){V.windowManager.open({url:g+"/table.htm",width:400+parseInt(V.getLang("table.table_delta_width",0)),height:320+parseInt(V.getLang("table.table_delta_height",0)),inline:1},{plugin_url:g,action:ae?ae.action:0})}return true;case"mceTableDelete":var G=V.dom.getParent(V.selection.getNode(),"table");if(G){G.parentNode.removeChild(G);V.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(!F){return true}if(W&&F!=W.parentNode){F=W.parentNode}if(F&&W){switch(r){case"mceTableCutRow":if(!W||!aq){return true}V.tableRowClipboard=S(k,F,W);V.execCommand("mceTableDeleteRow");break;case"mceTableCopyRow":if(!W||!aq){return true}V.tableRowClipboard=S(k,F,W);break;case"mceTablePasteRowBefore":if(!W||!aq){return true}var v=V.tableRowClipboard.cloneNode(true);var h=O(W,"TR");if(h!=null){m(F,h,h.cells[0],v)}W.parentNode.insertBefore(v,W);break;case"mceTablePasteRowAfter":if(!W||!aq){return true}var X=af(W,"TR");var v=V.tableRowClipboard.cloneNode(true);m(F,W,aq,v);if(X==null){W.parentNode.appendChild(v)}else{X.parentNode.insertBefore(v,X)}break;case"mceTableInsertRowBefore":if(!W||!aq){return true}var ad=e(F);var o=al(ad,aq);var v=k.createElement("tr");var u=null;o.rowindex--;if(o.rowindex<0){o.rowindex=0}for(var ac=0;aq=d(ad,o.rowindex,ac);ac++){if(aq!=u){var E=j(aq);if(E.rowspan==1){var J=k.createElement("td");if(!tinymce.isIE){J.innerHTML='<br mce_bogus="1"/>'}J.colSpan=aq.colSpan;v.appendChild(J)}else{aq.rowSpan=E.rowspan+1}u=aq}}W.parentNode.insertBefore(v,W);aj(0,1);break;case"mceTableInsertRowAfter":if(!W||!aq){return true}var ad=e(F);var o=al(ad,aq);var v=k.createElement("tr");var u=null;for(var ac=0;aq=d(ad,o.rowindex,ac);ac++){if(aq!=u){var E=j(aq);if(E.rowspan==1){var J=k.createElement("td");if(!tinymce.isIE){J.innerHTML='<br mce_bogus="1"/>'}J.colSpan=aq.colSpan;v.appendChild(J)}else{aq.rowSpan=E.rowspan+1}u=aq}}if(v.hasChildNodes()){var X=af(W,"TR");if(X){X.parentNode.insertBefore(v,X)}else{F.appendChild(v)}}aj(0,1);break;case"mceTableDeleteRow":if(!W||!aq){return true}var ad=e(F);var o=al(ad,aq);if(ad.length==1&&F.nodeName=="TBODY"){V.dom.remove(V.dom.getParent(F,"table"));return true}var D=W.cells;var X=af(W,"TR");for(var ac=0;ac<D.length;ac++){if(D[ac].rowSpan>1){var J=D[ac].cloneNode(true);var E=j(D[ac]);J.rowSpan=E.rowspan-1;var ak=X.cells[ac];if(ak==null){X.appendChild(J)}else{X.insertBefore(J,ak)}}}var u=null;for(var ac=0;aq=d(ad,o.rowindex,ac);ac++){if(aq!=u){var E=j(aq);if(E.rowspan>1){aq.rowSpan=E.rowspan-1}else{W=aq.parentNode;if(W.parentNode){W._delete=true}}u=aq}}B(F);aj(0,-1);break;case"mceTableInsertColBefore":if(!W||!aq){return true}var ad=e(V.dom.getParent(F,"table"));var o=al(ad,aq);var u=null;for(var aa=0;aq=d(ad,aa,o.cellindex);aa++){if(aq!=u){var E=j(aq);if(E.colspan==1){var J=k.createElement(aq.nodeName);if(!tinymce.isIE){J.innerHTML='<br mce_bogus="1"/>'}J.rowSpan=aq.rowSpan;aq.parentNode.insertBefore(J,aq)}else{aq.colSpan++}u=aq}}aj();break;case"mceTableInsertColAfter":if(!W||!aq){return true}var ad=e(V.dom.getParent(F,"table"));var o=al(ad,aq);var u=null;for(var aa=0;aq=d(ad,aa,o.cellindex);aa++){if(aq!=u){var E=j(aq);if(E.colspan==1){var J=k.createElement(aq.nodeName);if(!tinymce.isIE){J.innerHTML='<br mce_bogus="1"/>'}J.rowSpan=aq.rowSpan;var ak=af(aq,"TD,TH");if(ak==null){aq.parentNode.appendChild(J)}else{ak.parentNode.insertBefore(J,ak)}}else{aq.colSpan++}u=aq}}aj(1);break;case"mceTableDeleteCol":if(!W||!aq){return true}var ad=e(F);var o=al(ad,aq);var u=null;if((ad.length>1&&ad[0].length<=1)&&F.nodeName=="TBODY"){V.dom.remove(V.dom.getParent(F,"table"));return true}for(var aa=0;aq=d(ad,aa,o.cellindex);aa++){if(aq!=u){var E=j(aq);if(E.colspan>1){aq.colSpan=E.colspan-1}else{if(aq.parentNode){aq.parentNode.removeChild(aq)}}u=aq}}aj(-1);break;case"mceTableSplitCells":if(!W||!aq){return true}var l=j(aq);var C=l.colspan;var H=l.rowspan;if(C>1||H>1){aq.colSpan=1;for(var am=1;am<C;am++){var J=k.createElement("td");if(!tinymce.isIE){J.innerHTML='<br mce_bogus="1"/>'}W.insertBefore(J,af(aq,"TD,TH"));if(H>1){p(J,W,H)}}p(aq,W,H)}F=V.dom.getParent(V.selection.getNode(),"table");break;case"mceTableMergeCells":var ao=[];var R=V.selection.getSel();var ad=e(F);if(tinymce.isIE||R.rangeCount==1){if(Z){var t=j(aq);V.windowManager.open({url:g+"/merge_cells.htm",width:240+parseInt(V.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(V.getLang("table.merge_cells_delta_height",0)),inline:1},{action:"update",numcols:t.colspan,numrows:t.rowspan,plugin_url:g});return true}else{var U=parseInt(ae.numrows);var c=parseInt(ae.numcols);var o=al(ad,aq);if((""+U)=="NaN"){U=1}if((""+c)=="NaN"){c=1}var b=F.rows;for(var aa=o.rowindex;aa<ad.length;aa++){var ag=[];for(var ac=o.cellindex;ac<ad[aa].length;ac++){var f=d(ad,aa,ac);if(f&&!ap(ao,f)&&!ap(ag,f)){var N=al(ad,f);if(N.cellindex<o.cellindex+c&&N.rowindex<o.rowindex+U){ag[ag.length]=f}}}if(ag.length>0){ao[ao.length]=ag}var f=d(ad,o.rowindex,o.cellindex);a(au.dom.select("br",f),function(y,x){if(x>0&&au.dom.getAttrib("mce_bogus")){au.dom.remove(y)}})}}}else{var D=[];var R=V.selection.getSel();var Y=null;var an=null;var z=-1,aw=-1,w,at;if(R.rangeCount<2){return true}for(var am=0;am<R.rangeCount;am++){var ai=R.getRangeAt(am);var aq=ai.startContainer.childNodes[ai.startOffset];if(!aq){break}if(aq.nodeName=="TD"||aq.nodeName=="TH"){D[D.length]=aq}}var b=F.rows;for(var aa=0;aa<b.length;aa++){var ag=[];for(var ac=0;ac<b[aa].cells.length;ac++){var f=b[aa].cells[ac];for(var am=0;am<D.length;am++){if(f==D[am]){ag[ag.length]=f}}}if(ag.length>0){ao[ao.length]=ag}}var an=[];var Y=null;for(var aa=0;aa<ad.length;aa++){for(var ac=0;ac<ad[aa].length;ac++){ad[aa][ac]._selected=false;for(var am=0;am<D.length;am++){if(ad[aa][ac]==D[am]){if(z==-1){z=ac;aw=aa}w=ac;at=aa;ad[aa][ac]._selected=true}}}}for(var aa=aw;aa<=at;aa++){for(var ac=z;ac<=w;ac++){if(!ad[aa][ac]._selected){alert("Invalid selection for merge.");return true}}}}var s=1,q=1;var T=-1;for(var aa=0;aa<ao.length;aa++){var I=0;for(var ac=0;ac<ao[aa].length;ac++){var E=j(ao[aa][ac]);I+=E.colspan;if(T!=-1&&E.rowspan!=T){alert("Invalid selection for merge.");return true}T=E.rowspan}if(I>q){q=I}T=-1}var Q=-1;for(var ac=0;ac<ao[0].length;ac++){var M=0;for(var aa=0;aa<ao.length;aa++){var E=j(ao[aa][ac]);M+=E.rowspan;if(Q!=-1&&E.colspan!=Q){alert("Invalid selection for merge.");return true}Q=E.colspan}if(M>s){s=M}Q=-1}aq=ao[0][0];aq.rowSpan=s;aq.colSpan=q;for(var aa=0;aa<ao.length;aa++){for(var ac=0;ac<ao[aa].length;ac++){var P=ao[aa][ac].innerHTML;var K=P.replace(/[ \t\r\n]/g,"");if(K!="<br/>"&&K!="<br>"&&K!='<br mce_bogus="1"/>'&&(ac+aa>0)){aq.innerHTML+=P}if(ao[aa][ac]!=aq&&!ao[aa][ac]._deleted){var o=al(ad,ao[aa][ac]);var ar=ao[aa][ac].parentNode;ar.removeChild(ao[aa][ac]);ao[aa][ac]._deleted=true;if(!ar.hasChildNodes()){ar.parentNode.removeChild(ar);var ab=null;for(var ac=0;cellElm=d(ad,o.rowindex,ac);ac++){if(cellElm!=ab&&cellElm.rowSpan>1){cellElm.rowSpan--}ab=cellElm}if(aq.rowSpan>1){aq.rowSpan--}}}}}a(au.dom.select("br",aq),function(y,x){if(x>0&&au.dom.getAttrib(y,"mce_bogus")){au.dom.remove(y)}});break}F=V.dom.getParent(V.selection.getNode(),"table");V.addVisual(F);V.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 index 80cf748..5e64998 100755..100644 --- a/public/javascripts/tiny_mce/plugins/table/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/table/editor_plugin_src.js | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /** | 1 | /** |
| 2 | * $Id: editor_plugin_src.js 953 2008-11-04 10:16:50Z spocke $ | 2 | * $Id: editor_plugin_src.js 1206 2009-08-19 12:30:52Z spocke $ |
| 3 | * | 3 | * |
| 4 | * @author Moxiecode | 4 | * @author Moxiecode |
| 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. | 5 | * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. |
| @@ -55,6 +55,30 @@ | |||
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | ed.onInit.add(function() { | 57 | ed.onInit.add(function() { |
| 58 | // Fixes an issue on Gecko where it's impossible to place the caret behind a table | ||
| 59 | // This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled | ||
| 60 | if (!tinymce.isIE && ed.getParam('forced_root_block')) { | ||
| 61 | function fixTableCaretPos() { | ||
| 62 | var last = ed.getBody().lastChild; | ||
| 63 | |||
| 64 | if (last && last.nodeName == 'TABLE') | ||
| 65 | ed.dom.add(ed.getBody(), 'p', null, '<br mce_bogus="1" />'); | ||
| 66 | }; | ||
| 67 | |||
| 68 | ed.onKeyUp.add(fixTableCaretPos); | ||
| 69 | ed.onSetContent.add(fixTableCaretPos); | ||
| 70 | ed.onVisualAid.add(fixTableCaretPos); | ||
| 71 | |||
| 72 | ed.onPreProcess.add(function(ed, o) { | ||
| 73 | var last = o.node.lastChild; | ||
| 74 | |||
| 75 | if (last && last.childNodes.length == 1 && last.firstChild.nodeName == 'BR') | ||
| 76 | ed.dom.remove(last); | ||
| 77 | }); | ||
| 78 | |||
| 79 | fixTableCaretPos(); | ||
| 80 | } | ||
| 81 | |||
| 58 | if (ed && ed.plugins.contextmenu) { | 82 | if (ed && ed.plugins.contextmenu) { |
| 59 | ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) { | 83 | ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) { |
| 60 | var sm, se = ed.selection, el = se.getNode() || ed.getBody(); | 84 | var sm, se = ed.selection, el = se.getNode() || ed.getBody(); |
diff --git a/public/javascripts/tiny_mce/plugins/table/js/cell.js b/public/javascripts/tiny_mce/plugins/table/js/cell.js index f23b067..f23b067 100755..100644 --- a/public/javascripts/tiny_mce/plugins/table/js/cell.js +++ b/public/javascripts/tiny_mce/plugins/table/js/cell.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/table/js/merge_cells.js b/public/javascripts/tiny_mce/plugins/table/js/merge_cells.js index 31d6df0..31d6df0 100755..100644 --- a/public/javascripts/tiny_mce/plugins/table/js/merge_cells.js +++ b/public/javascripts/tiny_mce/plugins/table/js/merge_cells.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/table/js/row.js b/public/javascripts/tiny_mce/plugins/table/js/row.js index d25f635..d25f635 100755..100644 --- a/public/javascripts/tiny_mce/plugins/table/js/row.js +++ b/public/javascripts/tiny_mce/plugins/table/js/row.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/table/js/table.js b/public/javascripts/tiny_mce/plugins/table/js/table.js index a7f3c3a..182589d 100755..100644 --- a/public/javascripts/tiny_mce/plugins/table/js/table.js +++ b/public/javascripts/tiny_mce/plugins/table/js/table.js | |||
| @@ -24,14 +24,14 @@ function insertTable() { | |||
| 24 | border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0; | 24 | border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0; |
| 25 | cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : ""; | 25 | cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : ""; |
| 26 | cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : ""; | 26 | cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : ""; |
| 27 | align = formObj.elements['align'].options[formObj.elements['align'].selectedIndex].value; | 27 | align = getSelectValue(formObj, "align"); |
| 28 | frame = formObj.elements['frame'].options[formObj.elements['frame'].selectedIndex].value; | 28 | frame = getSelectValue(formObj, "tframe"); |
| 29 | rules = formObj.elements['rules'].options[formObj.elements['rules'].selectedIndex].value; | 29 | rules = getSelectValue(formObj, "rules"); |
| 30 | width = formObj.elements['width'].value; | 30 | width = formObj.elements['width'].value; |
| 31 | height = formObj.elements['height'].value; | 31 | height = formObj.elements['height'].value; |
| 32 | bordercolor = formObj.elements['bordercolor'].value; | 32 | bordercolor = formObj.elements['bordercolor'].value; |
| 33 | bgcolor = formObj.elements['bgcolor'].value; | 33 | bgcolor = formObj.elements['bgcolor'].value; |
| 34 | className = formObj.elements['class'].options[formObj.elements['class'].selectedIndex].value; | 34 | className = getSelectValue(formObj, "class"); |
| 35 | id = formObj.elements['id'].value; | 35 | id = formObj.elements['id'].value; |
| 36 | summary = formObj.elements['summary'].value; | 36 | summary = formObj.elements['summary'].value; |
| 37 | style = formObj.elements['style'].value; | 37 | style = formObj.elements['style'].value; |
| @@ -156,6 +156,10 @@ function insertTable() { | |||
| 156 | if (style) | 156 | if (style) |
| 157 | style += '; '; | 157 | style += '; '; |
| 158 | 158 | ||
| 159 | // Force px | ||
| 160 | if (/^[0-9\.]+$/.test(width)) | ||
| 161 | width += 'px'; | ||
| 162 | |||
| 159 | style += 'width: ' + width; | 163 | style += 'width: ' + width; |
| 160 | } else | 164 | } else |
| 161 | html += makeAttrib('width', width); | 165 | html += makeAttrib('width', width); |
| @@ -203,7 +207,30 @@ function insertTable() { | |||
| 203 | html += "</table>"; | 207 | html += "</table>"; |
| 204 | 208 | ||
| 205 | inst.execCommand('mceBeginUndoLevel'); | 209 | inst.execCommand('mceBeginUndoLevel'); |
| 206 | inst.execCommand('mceInsertContent', false, html); | 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 | |||
| 207 | inst.addVisual(); | 234 | inst.addVisual(); |
| 208 | inst.execCommand('mceEndUndoLevel'); | 235 | inst.execCommand('mceEndUndoLevel'); |
| 209 | 236 | ||
| @@ -295,7 +322,7 @@ function init() { | |||
| 295 | 322 | ||
| 296 | // Update form | 323 | // Update form |
| 297 | selectByValue(formObj, 'align', align); | 324 | selectByValue(formObj, 'align', align); |
| 298 | selectByValue(formObj, 'frame', frame); | 325 | selectByValue(formObj, 'tframe', frame); |
| 299 | selectByValue(formObj, 'rules', rules); | 326 | selectByValue(formObj, 'rules', rules); |
| 300 | selectByValue(formObj, 'class', className, true, true); | 327 | selectByValue(formObj, 'class', className, true, true); |
| 301 | formObj.cols.value = cols; | 328 | formObj.cols.value = cols; |
diff --git a/public/javascripts/tiny_mce/plugins/table/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/table/langs/en_dlg.js index 000332a..000332a 100755..100644 --- a/public/javascripts/tiny_mce/plugins/table/langs/en_dlg.js +++ b/public/javascripts/tiny_mce/plugins/table/langs/en_dlg.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/table/merge_cells.htm b/public/javascripts/tiny_mce/plugins/table/merge_cells.htm index 9d34a88..25d42eb 100755..100644 --- a/public/javascripts/tiny_mce/plugins/table/merge_cells.htm +++ b/public/javascripts/tiny_mce/plugins/table/merge_cells.htm | |||
| @@ -6,9 +6,8 @@ | |||
| 6 | <script type="text/javascript" src="../../utils/mctabs.js"></script> | 6 | <script type="text/javascript" src="../../utils/mctabs.js"></script> |
| 7 | <script type="text/javascript" src="../../utils/validate.js"></script> | 7 | <script type="text/javascript" src="../../utils/validate.js"></script> |
| 8 | <script type="text/javascript" src="js/merge_cells.js"></script> | 8 | <script type="text/javascript" src="js/merge_cells.js"></script> |
| 9 | <base target="_self" /> | ||
| 10 | </head> | 9 | </head> |
| 11 | <body style="margin: 8px" style="display: none"> | 10 | <body style="margin: 8px"> |
| 12 | <form onsubmit="mergeCells();return false;" action="#"> | 11 | <form onsubmit="mergeCells();return false;" action="#"> |
| 13 | <fieldset> | 12 | <fieldset> |
| 14 | <legend>{#table_dlg.merge_cells_title}</legend> | 13 | <legend>{#table_dlg.merge_cells_title}</legend> |
diff --git a/public/javascripts/tiny_mce/plugins/table/row.htm b/public/javascripts/tiny_mce/plugins/table/row.htm index fe75bf6..07ca13c 100755..100644 --- a/public/javascripts/tiny_mce/plugins/table/row.htm +++ b/public/javascripts/tiny_mce/plugins/table/row.htm | |||
| @@ -8,10 +8,9 @@ | |||
| 8 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> | 8 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> |
| 9 | <script type="text/javascript" src="js/row.js"></script> | 9 | <script type="text/javascript" src="js/row.js"></script> |
| 10 | <link href="css/row.css" rel="stylesheet" type="text/css" /> | 10 | <link href="css/row.css" rel="stylesheet" type="text/css" /> |
| 11 | <base target="_self" /> | ||
| 12 | </head> | 11 | </head> |
| 13 | <body id="tablerow" style="display: none"> | 12 | <body id="tablerow" style="display: none"> |
| 14 | <form onsubmit="updateAction();return false;"> | 13 | <form onsubmit="updateAction();return false;" action="#"> |
| 15 | <div class="tabs"> | 14 | <div class="tabs"> |
| 16 | <ul> | 15 | <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> | 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> |
diff --git a/public/javascripts/tiny_mce/plugins/table/table.htm b/public/javascripts/tiny_mce/plugins/table/table.htm index 75136e6..37e6159 100755..100644 --- a/public/javascripts/tiny_mce/plugins/table/table.htm +++ b/public/javascripts/tiny_mce/plugins/table/table.htm | |||
| @@ -9,7 +9,6 @@ | |||
| 9 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> | 9 | <script type="text/javascript" src="../../utils/editable_selects.js"></script> |
| 10 | <script type="text/javascript" src="js/table.js"></script> | 10 | <script type="text/javascript" src="js/table.js"></script> |
| 11 | <link href="css/table.css" rel="stylesheet" type="text/css" /> | 11 | <link href="css/table.css" rel="stylesheet" type="text/css" /> |
| 12 | <base target="_self" /> | ||
| 13 | </head> | 12 | </head> |
| 14 | <body id="table" style="display: none"> | 13 | <body id="table" style="display: none"> |
| 15 | <form onsubmit="insertTable();return false;" action="#"> | 14 | <form onsubmit="insertTable();return false;" action="#"> |
| @@ -58,7 +57,7 @@ | |||
| 58 | <td><label id="classlabel" for="class">{#class_name}</label></td> | 57 | <td><label id="classlabel" for="class">{#class_name}</label></td> |
| 59 | <td colspan="3"> | 58 | <td colspan="3"> |
| 60 | <select id="class" name="class" class="mceEditableSelect"> | 59 | <select id="class" name="class" class="mceEditableSelect"> |
| 61 | <option value="" selected>{#not_set}</option> | 60 | <option value="" selected="selected">{#not_set}</option> |
| 62 | </select></td> | 61 | </select></td> |
| 63 | </tr> | 62 | </tr> |
| 64 | <tr> | 63 | <tr> |
| @@ -109,9 +108,9 @@ | |||
| 109 | </tr> | 108 | </tr> |
| 110 | 109 | ||
| 111 | <tr> | 110 | <tr> |
| 112 | <td class="column1"><label for="frame">{#table_dlg.frame}</label></td> | 111 | <td class="column1"><label for="tframe">{#table_dlg.frame}</label></td> |
| 113 | <td> | 112 | <td> |
| 114 | <select id="frame" name="frame" class="advfield"> | 113 | <select id="tframe" name="tframe" class="advfield"> |
| 115 | <option value="">{#not_set}</option> | 114 | <option value="">{#not_set}</option> |
| 116 | <option value="void">{#table_dlg.rules_void}</option> | 115 | <option value="void">{#table_dlg.rules_void}</option> |
| 117 | <option value="above">{#table_dlg.rules_above}</option> | 116 | <option value="above">{#table_dlg.rules_above}</option> |
diff --git a/public/javascripts/tiny_mce/plugins/template/blank.htm b/public/javascripts/tiny_mce/plugins/template/blank.htm index ecde53f..ecde53f 100755..100644 --- a/public/javascripts/tiny_mce/plugins/template/blank.htm +++ b/public/javascripts/tiny_mce/plugins/template/blank.htm | |||
diff --git a/public/javascripts/tiny_mce/plugins/template/css/template.css b/public/javascripts/tiny_mce/plugins/template/css/template.css index 2d23a49..2d23a49 100755..100644 --- a/public/javascripts/tiny_mce/plugins/template/css/template.css +++ b/public/javascripts/tiny_mce/plugins/template/css/template.css | |||
diff --git a/public/javascripts/tiny_mce/plugins/template/editor_plugin.js b/public/javascripts/tiny_mce/plugins/template/editor_plugin.js index 0f7fb01..11ee592 100755..100644 --- a/public/javascripts/tiny_mce/plugins/template/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/template/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){var each=tinymce.each;tinymce.create('tinymce.plugins.TemplatePlugin',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceTemplate',function(ui){ed.windowManager.open({file:url+'/template.htm',width:ed.getParam('template_popup_width',750),height:ed.getParam('template_popup_height',600),inline:1},{plugin_url:url});});ed.addCommand('mceInsertTemplate',t._insertTemplate,t);ed.addButton('template',{title:'template.desc',cmd:'mceTemplate'});ed.onPreProcess.add(function(ed,o){var dom=ed.dom;each(dom.select('div',o.node),function(e){if(dom.hasClass(e,'mceTmpl')){each(dom.select('*',e),function(e){if(dom.hasClass(e,ed.getParam('template_mdate_classes','mdate').replace(/\s+/g,'|')))e.innerHTML=t._getDateTime(new Date(),ed.getParam("template_mdate_format",ed.getLang("template.mdate_format")));});t._replaceVals(e);}});});},getInfo:function(){return{longname:'Template plugin',author:'Moxiecode Systems AB',authorurl:'http://www.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/template',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_insertTemplate:function(ui,v){var t=this,ed=t.editor,h,el,dom=ed.dom,sel=ed.selection.getContent();h=v.content;each(t.editor.getParam('template_replace_values'),function(v,k){if(typeof(v)!='function')h=h.replace(new RegExp('\\{\\$'+k+'\\}','g'),v);});el=dom.create('div',null,h);n=dom.select('.mceTmpl',el);if(n&&n.length>0){el=dom.create('div',null);el.appendChild(n[0].cloneNode(true));}function hasClass(n,c){return new RegExp('\\b'+c+'\\b','g').test(n.className);};each(dom.select('*',el),function(n){if(hasClass(n,ed.getParam('template_cdate_classes','cdate').replace(/\s+/g,'|')))n.innerHTML=t._getDateTime(new Date(),ed.getParam("template_cdate_format",ed.getLang("template.cdate_format")));if(hasClass(n,ed.getParam('template_mdate_classes','mdate').replace(/\s+/g,'|')))n.innerHTML=t._getDateTime(new Date(),ed.getParam("template_mdate_format",ed.getLang("template.mdate_format")));if(hasClass(n,ed.getParam('template_selected_content_classes','selcontent').replace(/\s+/g,'|')))n.innerHTML=sel;});t._replaceVals(el);ed.execCommand('mceInsertContent',false,el.innerHTML);ed.addVisual();},_replaceVals:function(e){var dom=this.editor.dom,vl=this.editor.getParam('template_replace_values');each(dom.select('*',e),function(e){each(vl,function(v,k){if(dom.hasClass(e,k)){if(typeof(vl[k])=='function')vl[k](e);}});});},_getDateTime:function(d,fmt){if(!fmt)return"";function addZeros(value,len){var i;value=""+value;if(value.length<len){for(i=0;i<(len-value.length);i++)value="0"+value;}return value;}fmt=fmt.replace("%D","%m/%d/%y");fmt=fmt.replace("%r","%I:%M:%S %p");fmt=fmt.replace("%Y",""+d.getFullYear());fmt=fmt.replace("%y",""+d.getYear());fmt=fmt.replace("%m",addZeros(d.getMonth()+1,2));fmt=fmt.replace("%d",addZeros(d.getDate(),2));fmt=fmt.replace("%H",""+addZeros(d.getHours(),2));fmt=fmt.replace("%M",""+addZeros(d.getMinutes(),2));fmt=fmt.replace("%S",""+addZeros(d.getSeconds(),2));fmt=fmt.replace("%I",""+((d.getHours()+11)%12+1));fmt=fmt.replace("%p",""+(d.getHours()<12?"AM":"PM"));fmt=fmt.replace("%B",""+tinyMCE.getLang("template_months_long").split(',')[d.getMonth()]);fmt=fmt.replace("%b",""+tinyMCE.getLang("template_months_short").split(',')[d.getMonth()]);fmt=fmt.replace("%A",""+tinyMCE.getLang("template_day_long").split(',')[d.getDay()]);fmt=fmt.replace("%a",""+tinyMCE.getLang("template_day_short").split(',')[d.getDay()]);fmt=fmt.replace("%%","%");return fmt;}});tinymce.PluginManager.add('template',tinymce.plugins.TemplatePlugin);})(); \ No newline at end of file | (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",""+tinyMCE.getLang("template_months_long").split(",")[e.getMonth()]);b=b.replace("%b",""+tinyMCE.getLang("template_months_short").split(",")[e.getMonth()]);b=b.replace("%A",""+tinyMCE.getLang("template_day_long").split(",")[e.getDay()]);b=b.replace("%a",""+tinyMCE.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 index 73ab39e..73ab39e 100755..100644 --- a/public/javascripts/tiny_mce/plugins/template/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/template/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/template/js/template.js b/public/javascripts/tiny_mce/plugins/template/js/template.js index 24045d7..24045d7 100755..100644 --- a/public/javascripts/tiny_mce/plugins/template/js/template.js +++ b/public/javascripts/tiny_mce/plugins/template/js/template.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/template/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/template/langs/en_dlg.js index 2471c3f..2471c3f 100755..100644 --- a/public/javascripts/tiny_mce/plugins/template/langs/en_dlg.js +++ b/public/javascripts/tiny_mce/plugins/template/langs/en_dlg.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/template/template.htm b/public/javascripts/tiny_mce/plugins/template/template.htm index 2b71c6e..f7bb044 100755..100644 --- a/public/javascripts/tiny_mce/plugins/template/template.htm +++ b/public/javascripts/tiny_mce/plugins/template/template.htm | |||
| @@ -4,7 +4,6 @@ | |||
| 4 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> | 4 | <script type="text/javascript" src="../../tiny_mce_popup.js"></script> |
| 5 | <script type="text/javascript" src="js/template.js"></script> | 5 | <script type="text/javascript" src="js/template.js"></script> |
| 6 | <link href="css/template.css" rel="stylesheet" type="text/css" /> | 6 | <link href="css/template.css" rel="stylesheet" type="text/css" /> |
| 7 | <base target="_self" /> | ||
| 8 | </head> | 7 | </head> |
| 9 | <body onresize="TemplateDialog.resize();"> | 8 | <body onresize="TemplateDialog.resize();"> |
| 10 | <form onsubmit="TemplateDialog.insert();return false;"> | 9 | <form onsubmit="TemplateDialog.insert();return false;"> |
diff --git a/public/javascripts/tiny_mce/plugins/visualchars/editor_plugin.js b/public/javascripts/tiny_mce/plugins/visualchars/editor_plugin.js index e1e4238..53d31c4 100755..100644 --- a/public/javascripts/tiny_mce/plugins/visualchars/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/visualchars/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.create('tinymce.plugins.VisualChars',{init:function(ed,url){var t=this;t.editor=ed;ed.addCommand('mceVisualChars',t._toggleVisualChars,t);ed.addButton('visualchars',{title:'visualchars.desc',cmd:'mceVisualChars'});ed.onBeforeGetContent.add(function(ed,o){if(t.state){t.state=true;t._toggleVisualChars();}});},getInfo:function(){return{longname:'Visual characters',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars',version:tinymce.majorVersion+"."+tinymce.minorVersion};},_toggleVisualChars:function(){var t=this,ed=t.editor,nl,i,h,d=ed.getDoc(),b=ed.getBody(),nv,s=ed.selection,bo;t.state=!t.state;ed.controlManager.setActive('visualchars',t.state);if(t.state){nl=[];tinymce.walk(b,function(n){if(n.nodeType==3&&n.nodeValue&&n.nodeValue.indexOf('\u00a0')!=-1)nl.push(n);},'childNodes');for(i=0;i<nl.length;i++){nv=nl[i].nodeValue;nv=nv.replace(/(\u00a0+)/g,'<span class="mceItemHidden mceVisualNbsp">$1</span>');nv=nv.replace(/\u00a0/g,'\u00b7');ed.dom.setOuterHTML(nl[i],nv,d);}}else{nl=tinymce.grep(ed.dom.select('span',b),function(n){return ed.dom.hasClass(n,'mceVisualNbsp');});for(i=0;i<nl.length;i++)ed.dom.setOuterHTML(nl[i],nl[i].innerHTML.replace(/(·|\u00b7)/g,' '),d);}}});tinymce.PluginManager.add('visualchars',tinymce.plugins.VisualChars);})(); \ No newline at end of file | (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 index 02ec4e6..02ec4e6 100755..100644 --- a/public/javascripts/tiny_mce/plugins/visualchars/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/visualchars/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/wordcount/editor_plugin.js b/public/javascripts/tiny_mce/plugins/wordcount/editor_plugin.js new file mode 100644 index 0000000..f192835 --- /dev/null +++ b/public/javascripts/tiny_mce/plugins/wordcount/editor_plugin.js | |||
| @@ -0,0 +1 @@ | |||
| (function(){tinymce.create("tinymce.plugins.WordCount",{block:0,id:null,countre:null,cleanre:null,init:function(a,b){var c=this,d=0;c.countre=a.getParam("wordcount_countregex",/\S\s+/g);c.cleanre=a.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$¿'"_+=\\/-]*/g);c.id=a.id+"-word-count";a.onPostRender.add(function(f,e){var g,h;h=f.getParam("wordcount_target_id");if(!h){g=tinymce.DOM.get(f.id+"_path_row");if(g){tinymce.DOM.add(g.parentNode,"div",{style:"float: right"},f.getLang("wordcount.words","Words: ")+'<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 new file mode 100644 index 0000000..41b78a9 --- /dev/null +++ b/public/javascripts/tiny_mce/plugins/wordcount/editor_plugin_src.js | |||
| @@ -0,0 +1,95 @@ | |||
| 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 index 5800284..3928a17 100755..100644 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/abbr.htm +++ b/public/javascripts/tiny_mce/plugins/xhtmlxtras/abbr.htm | |||
| @@ -9,7 +9,6 @@ | |||
| 9 | <script type="text/javascript" src="js/element_common.js"></script> | 9 | <script type="text/javascript" src="js/element_common.js"></script> |
| 10 | <script type="text/javascript" src="js/abbr.js"></script> | 10 | <script type="text/javascript" src="js/abbr.js"></script> |
| 11 | <link rel="stylesheet" type="text/css" href="css/popup.css" /> | 11 | <link rel="stylesheet" type="text/css" href="css/popup.css" /> |
| 12 | <base target="_self" /> | ||
| 13 | </head> | 12 | </head> |
| 14 | <body style="display: none"> | 13 | <body style="display: none"> |
| 15 | <form onsubmit="insertAbbr();return false;" action="#"> | 14 | <form onsubmit="insertAbbr();return false;" action="#"> |
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/acronym.htm b/public/javascripts/tiny_mce/plugins/xhtmlxtras/acronym.htm index 54e4c9d..4d4ebaa 100755..100644 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/acronym.htm +++ b/public/javascripts/tiny_mce/plugins/xhtmlxtras/acronym.htm | |||
| @@ -9,7 +9,6 @@ | |||
| 9 | <script type="text/javascript" src="js/element_common.js"></script> | 9 | <script type="text/javascript" src="js/element_common.js"></script> |
| 10 | <script type="text/javascript" src="js/acronym.js"></script> | 10 | <script type="text/javascript" src="js/acronym.js"></script> |
| 11 | <link rel="stylesheet" type="text/css" href="css/popup.css" /> | 11 | <link rel="stylesheet" type="text/css" href="css/popup.css" /> |
| 12 | <base target="_self" /> | ||
| 13 | </head> | 12 | </head> |
| 14 | <body style="display: none"> | 13 | <body style="display: none"> |
| 15 | <form onsubmit="insertAcronym();return false;" action="#"> | 14 | <form onsubmit="insertAcronym();return false;" action="#"> |
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/attributes.htm b/public/javascripts/tiny_mce/plugins/xhtmlxtras/attributes.htm index cfbb409..322b468 100755..100644 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/attributes.htm +++ b/public/javascripts/tiny_mce/plugins/xhtmlxtras/attributes.htm | |||
| @@ -8,7 +8,6 @@ | |||
| 8 | <script type="text/javascript" src="../../utils/form_utils.js"></script> | 8 | <script type="text/javascript" src="../../utils/form_utils.js"></script> |
| 9 | <script type="text/javascript" src="js/attributes.js"></script> | 9 | <script type="text/javascript" src="js/attributes.js"></script> |
| 10 | <link rel="stylesheet" type="text/css" href="css/attributes.css" /> | 10 | <link rel="stylesheet" type="text/css" href="css/attributes.css" /> |
| 11 | <base target="_self" /> | ||
| 12 | </head> | 11 | </head> |
| 13 | <body style="display: none"> | 12 | <body style="display: none"> |
| 14 | <form onsubmit="insertAction();return false;" action="#"> | 13 | <form onsubmit="insertAction();return false;" action="#"> |
| @@ -36,12 +35,12 @@ | |||
| 36 | <td><label id="classlabel" for="classlist">{#class_name}</label></td> | 35 | <td><label id="classlabel" for="classlist">{#class_name}</label></td> |
| 37 | <td> | 36 | <td> |
| 38 | <select id="classlist" name="classlist" class="mceEditableSelect"> | 37 | <select id="classlist" name="classlist" class="mceEditableSelect"> |
| 39 | <option value="" selected>{#not_set}</option> | 38 | <option value="" selected="selected">{#not_set}</option> |
| 40 | </select> | 39 | </select> |
| 41 | </td> | 40 | </td> |
| 42 | </tr> | 41 | </tr> |
| 43 | <tr> | 42 | <tr> |
| 44 | <td class="label"><label id="stylelabel" for="class">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td> | 43 | <td class="label"><label id="stylelabel" for="style">{#xhtmlxtras_dlg.attribute_label_style}</label>:</td> |
| 45 | <td><input id="style" name="style" type="text" value="" /></td> | 44 | <td><input id="style" name="style" type="text" value="" /></td> |
| 46 | </tr> | 45 | </tr> |
| 47 | <tr> | 46 | <tr> |
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/cite.htm b/public/javascripts/tiny_mce/plugins/xhtmlxtras/cite.htm index 7d9eaba..cdfaf4e 100755..100644 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/cite.htm +++ b/public/javascripts/tiny_mce/plugins/xhtmlxtras/cite.htm | |||
| @@ -9,7 +9,6 @@ | |||
| 9 | <script type="text/javascript" src="js/element_common.js"></script> | 9 | <script type="text/javascript" src="js/element_common.js"></script> |
| 10 | <script type="text/javascript" src="js/cite.js"></script> | 10 | <script type="text/javascript" src="js/cite.js"></script> |
| 11 | <link rel="stylesheet" type="text/css" href="css/popup.css" /> | 11 | <link rel="stylesheet" type="text/css" href="css/popup.css" /> |
| 12 | <base target="_self" /> | ||
| 13 | </head> | 12 | </head> |
| 14 | <body style="display: none"> | 13 | <body style="display: none"> |
| 15 | <form onsubmit="insertCite();return false;" action="#"> | 14 | <form onsubmit="insertCite();return false;" action="#"> |
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css b/public/javascripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css index 9a6a235..9a6a235 100755..100644 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css +++ b/public/javascripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css | |||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/css/popup.css b/public/javascripts/tiny_mce/plugins/xhtmlxtras/css/popup.css index e67114d..e67114d 100755..100644 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/css/popup.css +++ b/public/javascripts/tiny_mce/plugins/xhtmlxtras/css/popup.css | |||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/del.htm b/public/javascripts/tiny_mce/plugins/xhtmlxtras/del.htm index d03c456..f45676e 100755..100644 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/del.htm +++ b/public/javascripts/tiny_mce/plugins/xhtmlxtras/del.htm | |||
| @@ -9,7 +9,6 @@ | |||
| 9 | <script type="text/javascript" src="js/element_common.js"></script> | 9 | <script type="text/javascript" src="js/element_common.js"></script> |
| 10 | <script type="text/javascript" src="js/del.js"></script> | 10 | <script type="text/javascript" src="js/del.js"></script> |
| 11 | <link rel="stylesheet" type="text/css" href="css/popup.css" /> | 11 | <link rel="stylesheet" type="text/css" href="css/popup.css" /> |
| 12 | <base target="_self" /> | ||
| 13 | </head> | 12 | </head> |
| 14 | <body id="xhtmlxtrasins" style="display: none"> | 13 | <body id="xhtmlxtrasins" style="display: none"> |
| 15 | <form onsubmit="insertDel();return false;" action="#"> | 14 | <form onsubmit="insertDel();return false;" action="#"> |
| @@ -31,7 +30,7 @@ | |||
| 31 | <table border="0" cellspacing="0" cellpadding="0"> | 30 | <table border="0" cellspacing="0" cellpadding="0"> |
| 32 | <tr> | 31 | <tr> |
| 33 | <td><input id="datetime" name="datetime" type="text" value="" maxlength="19" class="field mceFocus" /></td> | 32 | <td><input id="datetime" name="datetime" type="text" value="" maxlength="19" class="field mceFocus" /></td> |
| 34 | <td><a href="javascript:insertDateTime('datetime');" onmousedown="return false;" class="browse"><span class="datetime" alt="{#xhtmlxtras_dlg.insert_date}" title="{#xhtmlxtras_dlg.insert_date}"></span></a></td> | 33 | <td><a href="javascript:insertDateTime('datetime');" onmousedown="return false;" class="browse"><span class="datetime" title="{#xhtmlxtras_dlg.insert_date}"></span></a></td> |
| 35 | </tr> | 34 | </tr> |
| 36 | </table> | 35 | </table> |
| 37 | </td> | 36 | </td> |
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js b/public/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js index 00c178e..8c7f48e 100755..100644 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +++ b/public/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js | |||
| @@ -1 +1 @@ | |||
| (function(){tinymce.create('tinymce.plugins.XHTMLXtrasPlugin',{init:function(ed,url){ed.addCommand('mceCite',function(){ed.windowManager.open({file:url+'/cite.htm',width:350+parseInt(ed.getLang('xhtmlxtras.cite_delta_width',0)),height:250+parseInt(ed.getLang('xhtmlxtras.cite_delta_height',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAcronym',function(){ed.windowManager.open({file:url+'/acronym.htm',width:350+parseInt(ed.getLang('xhtmlxtras.acronym_delta_width',0)),height:250+parseInt(ed.getLang('xhtmlxtras.acronym_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAbbr',function(){ed.windowManager.open({file:url+'/abbr.htm',width:350+parseInt(ed.getLang('xhtmlxtras.abbr_delta_width',0)),height:250+parseInt(ed.getLang('xhtmlxtras.abbr_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceDel',function(){ed.windowManager.open({file:url+'/del.htm',width:340+parseInt(ed.getLang('xhtmlxtras.del_delta_width',0)),height:310+parseInt(ed.getLang('xhtmlxtras.del_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceIns',function(){ed.windowManager.open({file:url+'/ins.htm',width:340+parseInt(ed.getLang('xhtmlxtras.ins_delta_width',0)),height:310+parseInt(ed.getLang('xhtmlxtras.ins_delta_width',0)),inline:1},{plugin_url:url});});ed.addCommand('mceAttributes',function(){ed.windowManager.open({file:url+'/attributes.htm',width:380,height:370,inline:1},{plugin_url:url});});ed.addButton('cite',{title:'xhtmlxtras.cite_desc',cmd:'mceCite'});ed.addButton('acronym',{title:'xhtmlxtras.acronym_desc',cmd:'mceAcronym'});ed.addButton('abbr',{title:'xhtmlxtras.abbr_desc',cmd:'mceAbbr'});ed.addButton('del',{title:'xhtmlxtras.del_desc',cmd:'mceDel'});ed.addButton('ins',{title:'xhtmlxtras.ins_desc',cmd:'mceIns'});ed.addButton('attribs',{title:'xhtmlxtras.attribs_desc',cmd:'mceAttributes'});if(tinymce.isIE){function fix(ed,o){if(o.set){o.content=o.content.replace(/<abbr([^>]+)>/gi,'<html:abbr $1>');o.content=o.content.replace(/<\/abbr>/gi,'</html:abbr>');}};ed.onBeforeSetContent.add(fix);ed.onPostProcess.add(fix);}ed.onNodeChange.add(function(ed,cm,n,co){n=ed.dom.getParent(n,'CITE,ACRONYM,ABBR,DEL,INS');cm.setDisabled('cite',co);cm.setDisabled('acronym',co);cm.setDisabled('abbr',co);cm.setDisabled('del',co);cm.setDisabled('ins',co);cm.setDisabled('attribs',n&&n.nodeName=='BODY');cm.setActive('cite',0);cm.setActive('acronym',0);cm.setActive('abbr',0);cm.setActive('del',0);cm.setActive('ins',0);if(n){do{cm.setDisabled(n.nodeName.toLowerCase(),0);cm.setActive(n.nodeName.toLowerCase(),1);}while(n=n.parentNode);}});},getInfo:function(){return{longname:'XHTML Xtras Plugin',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/xhtmlxtras',version:tinymce.majorVersion+"."+tinymce.minorVersion};}});tinymce.PluginManager.add('xhtmlxtras',tinymce.plugins.XHTMLXtrasPlugin);})(); \ No newline at end of file | (function(){tinymce.create("tinymce.plugins.XHTMLXtrasPlugin",{init:function(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 index bef06f2..bef06f2 100755..100644 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +++ b/public/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/ins.htm b/public/javascripts/tiny_mce/plugins/xhtmlxtras/ins.htm index c0f056f..9fa21c4 100755..100644 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/ins.htm +++ b/public/javascripts/tiny_mce/plugins/xhtmlxtras/ins.htm | |||
| @@ -9,7 +9,6 @@ | |||
| 9 | <script type="text/javascript" src="js/element_common.js"></script> | 9 | <script type="text/javascript" src="js/element_common.js"></script> |
| 10 | <script type="text/javascript" src="js/ins.js"></script> | 10 | <script type="text/javascript" src="js/ins.js"></script> |
| 11 | <link rel="stylesheet" type="text/css" href="css/popup.css" /> | 11 | <link rel="stylesheet" type="text/css" href="css/popup.css" /> |
| 12 | <base target="_self" /> | ||
| 13 | </head> | 12 | </head> |
| 14 | <body id="xhtmlxtrasins" style="display: none"> | 13 | <body id="xhtmlxtrasins" style="display: none"> |
| 15 | <form onsubmit="insertIns();return false;" action="#"> | 14 | <form onsubmit="insertIns();return false;" action="#"> |
| @@ -31,7 +30,7 @@ | |||
| 31 | <table border="0" cellspacing="0" cellpadding="0"> | 30 | <table border="0" cellspacing="0" cellpadding="0"> |
| 32 | <tr> | 31 | <tr> |
| 33 | <td><input id="datetime" name="datetime" type="text" value="" maxlength="19" class="field mceFocus" /></td> | 32 | <td><input id="datetime" name="datetime" type="text" value="" maxlength="19" class="field mceFocus" /></td> |
| 34 | <td><a href="javascript:insertDateTime('datetime');" onmousedown="return false;" class="browse"><span class="datetime" alt="{#xhtmlxtras_dlg.insert_date}" title="{#xhtmlxtras_dlg.insert_date}"></span></a></td> | 33 | <td><a href="javascript:insertDateTime('datetime');" onmousedown="return false;" class="browse"><span class="datetime" title="{#xhtmlxtras_dlg.insert_date}"></span></a></td> |
| 35 | </tr> | 34 | </tr> |
| 36 | </table> | 35 | </table> |
| 37 | </td> | 36 | </td> |
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js b/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js index e84b6a8..e84b6a8 100755..100644 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js +++ b/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js b/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js index 933d122..933d122 100755..100644 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js +++ b/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js b/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js index 23c7fa4..23c7fa4 100755..100644 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js +++ b/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/cite.js b/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/cite.js index c36f7fd..c36f7fd 100755..100644 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/cite.js +++ b/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/cite.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/del.js b/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/del.js index 7049f2b..7049f2b 100755..100644 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/del.js +++ b/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/del.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js b/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js index 5cdeb21..70f168a 100755..100644 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js +++ b/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js | |||
| @@ -224,7 +224,7 @@ function insertInlineElement(en) { | |||
| 224 | var ed = tinyMCEPopup.editor, dom = ed.dom; | 224 | var ed = tinyMCEPopup.editor, dom = ed.dom; |
| 225 | 225 | ||
| 226 | ed.getDoc().execCommand('FontName', false, 'mceinline'); | 226 | ed.getDoc().execCommand('FontName', false, 'mceinline'); |
| 227 | tinymce.each(dom.select(tinymce.isWebKit ? 'span' : 'font'), function(n) { | 227 | tinymce.each(dom.select('span,font'), function(n) { |
| 228 | if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline') | 228 | if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline') |
| 229 | dom.replace(dom.create(en, {_mce_new : 1}), n, 1); | 229 | dom.replace(dom.create(en, {_mce_new : 1}), n, 1); |
| 230 | }); | 230 | }); |
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/ins.js b/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/ins.js index 4fcc998..4fcc998 100755..100644 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/ins.js +++ b/public/javascripts/tiny_mce/plugins/xhtmlxtras/js/ins.js | |||
diff --git a/public/javascripts/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js b/public/javascripts/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js index 45b6b26..45b6b26 100755..100644 --- a/public/javascripts/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +++ b/public/javascripts/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js | |||
