diff options
Diffstat (limited to 'plugins/jetpack/_inc/build/after-the-deadline/tinymce/editor_plugin.min.js')
-rw-r--r-- | plugins/jetpack/_inc/build/after-the-deadline/tinymce/editor_plugin.min.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/jetpack/_inc/build/after-the-deadline/tinymce/editor_plugin.min.js b/plugins/jetpack/_inc/build/after-the-deadline/tinymce/editor_plugin.min.js index 6b45b7b8..a1b24765 100644 --- a/plugins/jetpack/_inc/build/after-the-deadline/tinymce/editor_plugin.min.js +++ b/plugins/jetpack/_inc/build/after-the-deadline/tinymce/editor_plugin.min.js @@ -15,4 +15,4 @@ * * Moxiecode Spell Checker plugin released under the LGPL with TinyMCE */ -!function(){function e(e,t){return window.AtD_l10n_r0ar&&window.AtD_l10n_r0ar[e]||t}var t,n=tinymce.each,o=tinymce.DOM;tinymce.create("tinymce.plugins.AfterTheDeadlinePlugin",{getInfo:function(){return{longname:"After The Deadline",author:"Raphael Mudge",authorurl:"http://blog.afterthedeadline.com",infourl:"http://www.afterthedeadline.com",version:tinymce.majorVersion+"."+tinymce.minorVersion}},initAtDCore:function(e){var t=new AtDCore;return t.map=n,t.getAttrib=function(t,n){return e.dom.getAttrib(t,n)},t.findSpans=function(t){return t?e.dom.select("span",t):e.dom.select("span")},t.hasClass=function(t,n){return e.dom.hasClass(t,n)},t.contents=function(e){return e.childNodes},t.replaceWith=function(t,n){return e.dom.replace(n,t)},t.create=function(t){return e.dom.create("span",{class:"mceItemHidden"},t)},t.removeParent=function(t){return e.dom.remove(t,1),t},t.remove=function(t){e.dom.remove(t)},t.setIgnoreStrings(e.getParam("atd_ignore_strings",[]).join(",")),t.showTypes(e.getParam("atd_show_types","")),t},init:function(o,r){if("undefined"!=typeof AtDCore){var i=this,a=o;this.url=r,this.editor=o,t=o.core=this.initAtDCore(a,i);var s=tinymce.util.Cookie.getHash("atd_ignore");s||(s={}),a.addCommand("mceWritingImprovementTool",function(n){"undefined"!=typeof AtD_proofread_click_count&&AtD_proofread_click_count++,i.editor.setProgressState(1),i._removeWords(),i.sendRequest("checkDocument",o.getContent({format:"raw"}),function(r,a){if(i.editor.setProgressState(0),200!==a.status||"html"===a.responseText.substr(1,4)||!a.responseXML)return void o.windowManager.alert(e("message_server_error","There was a problem communicating with the Proofreading service. Try again in one minute."),n?function(){n(0)}:function(){});if(null!=a.responseXML.getElementsByTagName("message").item(0))return void o.windowManager.alert(a.responseXML.getElementsByTagName("message").item(0).firstChild.data,n?function(){n(0)}:function(){});var s=t.processXML(a.responseXML),d=0;s.count>0&&(d=i.markMyWords(s.errors),o.suggestions=s.suggestions),0!==d||n&&void 0!==n?n&&n(d):o.windowManager.alert(e("message_no_errors_found","No writing errors were found."))})}),a.onInit.add(function(){!1!==a.settings.content_css&&a.dom.loadCSS(a.getParam("atd_css_url",r+"/css/content.css"))}),a.onClick.add(i._showMenu,i),a.onContextMenu.add(i._showMenu,i),a.onPreProcess.add(function(e,t){var o=e.dom;n(o.select("span",t.node).reverse(),function(e){!e||!(o.hasClass(e,"hiddenGrammarError")||o.hasClass(e,"hiddenSpellError")||o.hasClass(e,"hiddenSuggestion")||o.hasClass(e,"mceItemHidden"))&&(o.getAttrib(e,"class")||o.getAttrib(e,"style")||o.getAttrib(e,"id")||o.hasClass(e,"Apple-style-span")||o.getAttrib(e,"mce_name"))||o.remove(e,1)})}),a.onBeforeExecCommand.add(function(e,t){"mceCodeEditor"===t?i._removeWords():"mceFullScreen"===t&&i._done()}),o.addButton("AtD",{title:e("button_proofread_tooltip","Proofread Writing"),image:o.getParam("atd_button_url",r+"/atdbuttontr.gif"),cmd:"mceWritingImprovementTool"})}},_removeWords:function(e){var t=this.editor,n=t.dom,o=t.selection,r=o.getBookmark();t.core.removeWords(void 0,e),n.setHTML(n.getRoot(),n.getRoot().innerHTML),o.moveToBookmark(r)},markMyWords:function(e){var t=this.editor,n=t.selection,o=n.getBookmark(),r=t.core.markMyWords(t.core.contents(this.editor.getBody()),e);return n.moveToBookmark(o),r},_showMenu:function(t,n){var r=this;t=r.editor;var i,a=r._menu,s=t.dom,d=s.getViewPort(t.getWin());if(a||(i=o.getPos(t.getContentAreaContainer()),a=t.controlManager.createDropMenu("spellcheckermenu",{offset_x:i.x,offset_y:i.y,class:"mceNoIcons"}),r._menu=a),t.core.isMarkedNode(n.target)){a.removeAll();var c=t.core.findSuggestion(n.target);if(c)if(0===c.suggestions.length)a.add({title:c.description,class:"mceMenuItemTitle"}).setDisabled(1);else{a.add({title:c.description,class:"mceMenuItemTitle"}).setDisabled(1);for(var u=0;u<c.suggestions.length;u++)!function(e){a.add({title:e,onclick:function(){t.core.applySuggestion(n.target,e),r._checkDone()}})}(c.suggestions[u]);a.addSeparator()}else a.add({title:e("menu_title_no_suggestions","No suggestions"),class:"mceMenuItemTitle"}).setDisabled(1);return c&&c.moreinfo&&(!function(n){a.add({title:e("menu_option_explain","Explain..."),onclick:function(){t.windowManager.open({url:n,width:480,height:380,inline:!0},{theme_url:this.url})}})}(c.moreinfo),a.addSeparator()),a.add({title:e("menu_option_ignore_once","Ignore suggestion"),onclick:function(){s.remove(n.target,1),r._checkDone()}}),"true"===String(this.editor.getParam("atd_ignore_enable","false"))?a.add({title:e("menu_option_ignore_always","Ignore always"),onclick:function(){var e=r.editor.getParam("atd_ignore_rpc_url","{backend}");if("{backend}"===e){var t=tinymce.util.Cookie.getHash("atd_ignore");t||(t={}),t[n.target.innerHTML]=1,tinymce.util.Cookie.setHash("atd_ignore",t,new Date((new Date).getTime()+15768e7))}else{var o=r.editor.getParam("atd_rpc_id","12345678");tinymce.util.XHR.send({url:e+encodeURI(n.target.innerHTML).replace(/&/g,"%26")+"&key="+o,content_type:"text/xml",async:!0,type:"GET",success:function(){},error:function(e,t,n){alert("Ignore preference save failed\n"+e+"\n"+t.status+"\nAt: "+n.url)}}),r.editor.core.setIgnoreStrings(n.target.innerHTML)}r._removeWords(n.target.innerHTML),r._checkDone()}}):a.add({title:e("menu_option_ignore_all","Ignore all"),onclick:function(){r._removeWords(n.target.innerHTML),r._checkDone()}}),t.selection.select(n.target),i=s.getPos(n.target),a.showMenu(i.x,i.y+n.target.offsetHeight-d.y),tinymce.dom.Event.cancel(n)}a.hideMenu()},_checkDone:function(){var e,t=this,o=t.editor,r=o.dom;n(r.select("span"),function(t){if(t&&r.hasClass(t,"mceItemHidden"))return e=!0,!1}),e||t._done()},_done:function(){var e=this;e._removeWords(),e._menu&&e._menu.hideMenu(),e.editor.nodeChanged()},sendRequest:function(e,t,n){var o=this.editor.getParam("atd_rpc_id","12345678"),r=this.editor.getParam("atd_rpc_url","{backend}"),i=this;if("{backend}"===r||"12345678"===o)return this.editor.setProgressState(0),void alert("Please specify: atd_rpc_url and atd_rpc_id");tinymce.util.XHR.send({url:r+"/"+e,content_type:"text/xml",type:"POST",data:"data="+encodeURI(t).replace(/&/g,"%26")+"&key="+o,async:!0,success:n,error:function(e,t,n){i.editor.setProgressState(0),alert(e+"\n"+t.status+"\nAt: "+n.url)}})}}),tinymce.PluginManager.add("AtD",tinymce.plugins.AfterTheDeadlinePlugin)}();
\ No newline at end of file +!function(){var e,t=tinymce.each,n=tinymce.DOM;function o(e,t){return window.AtD_l10n_r0ar&&window.AtD_l10n_r0ar[e]||t}tinymce.create("tinymce.plugins.AfterTheDeadlinePlugin",{getInfo:function(){return{longname:"After The Deadline",author:"Raphael Mudge",authorurl:"http://blog.afterthedeadline.com",infourl:"http://www.afterthedeadline.com",version:tinymce.majorVersion+"."+tinymce.minorVersion}},initAtDCore:function(e){var n=new AtDCore;return n.map=t,n.getAttrib=function(t,n){return e.dom.getAttrib(t,n)},n.findSpans=function(t){return t?e.dom.select("span",t):e.dom.select("span")},n.hasClass=function(t,n){return e.dom.hasClass(t,n)},n.contents=function(e){return e.childNodes},n.replaceWith=function(t,n){return e.dom.replace(n,t)},n.create=function(t){return e.dom.create("span",{class:"mceItemHidden"},t)},n.removeParent=function(t){return e.dom.remove(t,1),t},n.remove=function(t){e.dom.remove(t)},n.setIgnoreStrings(e.getParam("atd_ignore_strings",[]).join(",")),n.showTypes(e.getParam("atd_show_types","")),n},init:function(n,r){if("undefined"!=typeof AtDCore){var i=this,s=n;this.url=r,this.editor=n,e=n.core=this.initAtDCore(s,i);var a=tinymce.util.Cookie.getHash("atd_ignore");a||(a={}),s.addCommand("mceWritingImprovementTool",function(t){"undefined"!=typeof AtD_proofread_click_count&&AtD_proofread_click_count++,i.editor.setProgressState(1),i._removeWords(),i.sendRequest("checkDocument",n.getContent({format:"raw"}),function(r,s){if(i.editor.setProgressState(0),200===s.status&&"html"!==s.responseText.substr(1,4)&&s.responseXML)if(null==s.responseXML.getElementsByTagName("message").item(0)){var a=e.processXML(s.responseXML),d=0;a.count>0&&(d=i.markMyWords(a.errors),n.suggestions=a.suggestions),0!==d||t&&void 0!==t?t&&t(d):n.windowManager.alert(o("message_no_errors_found","No writing errors were found."))}else n.windowManager.alert(s.responseXML.getElementsByTagName("message").item(0).firstChild.data,t?function(){t(0)}:function(){});else n.windowManager.alert(o("message_server_error","There was a problem communicating with the Proofreading service. Try again in one minute."),t?function(){t(0)}:function(){})})}),s.onInit.add(function(){!1!==s.settings.content_css&&s.dom.loadCSS(s.getParam("atd_css_url",r+"/css/content.css"))}),s.onClick.add(i._showMenu,i),s.onContextMenu.add(i._showMenu,i),s.onPreProcess.add(function(e,n){var o=e.dom;t(o.select("span",n.node).reverse(),function(e){!e||!(o.hasClass(e,"hiddenGrammarError")||o.hasClass(e,"hiddenSpellError")||o.hasClass(e,"hiddenSuggestion")||o.hasClass(e,"mceItemHidden"))&&(o.getAttrib(e,"class")||o.getAttrib(e,"style")||o.getAttrib(e,"id")||o.hasClass(e,"Apple-style-span")||o.getAttrib(e,"mce_name"))||o.remove(e,1)})}),s.onBeforeExecCommand.add(function(e,t){"mceCodeEditor"===t?i._removeWords():"mceFullScreen"===t&&i._done()}),n.addButton("AtD",{title:o("button_proofread_tooltip","Proofread Writing"),image:n.getParam("atd_button_url",r+"/atdbuttontr.gif"),cmd:"mceWritingImprovementTool"})}},_removeWords:function(e){var t=this.editor,n=t.dom,o=t.selection,r=o.getBookmark();t.core.removeWords(void 0,e),n.setHTML(n.getRoot(),n.getRoot().innerHTML),o.moveToBookmark(r)},markMyWords:function(e){var t=this.editor,n=t.selection,o=n.getBookmark(),r=t.core.markMyWords(t.core.contents(this.editor.getBody()),e);return n.moveToBookmark(o),r},_showMenu:function(e,t){var r=this;e=r.editor;var i,s,a=r._menu,d=e.dom,c=d.getViewPort(e.getWin());if(a||(i=n.getPos(e.getContentAreaContainer()),a=e.controlManager.createDropMenu("spellcheckermenu",{offset_x:i.x,offset_y:i.y,class:"mceNoIcons"}),r._menu=a),e.core.isMarkedNode(t.target)){a.removeAll();var l=e.core.findSuggestion(t.target);if(l)if(0===l.suggestions.length)a.add({title:l.description,class:"mceMenuItemTitle"}).setDisabled(1);else{a.add({title:l.description,class:"mceMenuItemTitle"}).setDisabled(1);for(var u=0;u<l.suggestions.length;u++)!function(n){a.add({title:n,onclick:function(){e.core.applySuggestion(t.target,n),r._checkDone()}})}(l.suggestions[u]);a.addSeparator()}else a.add({title:o("menu_title_no_suggestions","No suggestions"),class:"mceMenuItemTitle"}).setDisabled(1);return l&&l.moreinfo&&(s=l.moreinfo,a.add({title:o("menu_option_explain","Explain..."),onclick:function(){e.windowManager.open({url:s,width:480,height:380,inline:!0},{theme_url:this.url})}}),a.addSeparator()),a.add({title:o("menu_option_ignore_once","Ignore suggestion"),onclick:function(){d.remove(t.target,1),r._checkDone()}}),"true"===String(this.editor.getParam("atd_ignore_enable","false"))?a.add({title:o("menu_option_ignore_always","Ignore always"),onclick:function(){var e=r.editor.getParam("atd_ignore_rpc_url","{backend}");if("{backend}"===e){var n=tinymce.util.Cookie.getHash("atd_ignore");n||(n={}),n[t.target.innerHTML]=1,tinymce.util.Cookie.setHash("atd_ignore",n,new Date((new Date).getTime()+15768e7))}else{var o=r.editor.getParam("atd_rpc_id","12345678");tinymce.util.XHR.send({url:e+encodeURI(t.target.innerHTML).replace(/&/g,"%26")+"&key="+o,content_type:"text/xml",async:!0,type:"GET",success:function(){},error:function(e,t,n){alert("Ignore preference save failed\n"+e+"\n"+t.status+"\nAt: "+n.url)}}),r.editor.core.setIgnoreStrings(t.target.innerHTML)}r._removeWords(t.target.innerHTML),r._checkDone()}}):a.add({title:o("menu_option_ignore_all","Ignore all"),onclick:function(){r._removeWords(t.target.innerHTML),r._checkDone()}}),e.selection.select(t.target),i=d.getPos(t.target),a.showMenu(i.x,i.y+t.target.offsetHeight-c.y),tinymce.dom.Event.cancel(t)}a.hideMenu()},_checkDone:function(){var e,n=this.editor.dom;t(n.select("span"),function(t){if(t&&n.hasClass(t,"mceItemHidden"))return e=!0,!1}),e||this._done()},_done:function(){this._removeWords(),this._menu&&this._menu.hideMenu(),this.editor.nodeChanged()},sendRequest:function(e,t,n){var o=this.editor.getParam("atd_rpc_id","12345678"),r=this.editor.getParam("atd_rpc_url","{backend}"),i=this;if("{backend}"===r||"12345678"===o)return this.editor.setProgressState(0),void alert("Please specify: atd_rpc_url and atd_rpc_id");tinymce.util.XHR.send({url:r+"/"+e,content_type:"text/xml",type:"POST",data:"data="+encodeURI(t).replace(/&/g,"%26")+"&key="+o,async:!0,success:n,error:function(e,t,n){i.editor.setProgressState(0),alert(e+"\n"+t.status+"\nAt: "+n.url)}})}}),tinymce.PluginManager.add("AtD",tinymce.plugins.AfterTheDeadlinePlugin)}();
\ No newline at end of file |