NMandapaty/ArcticVoice

View on GitHub
public/assets/ckeditor/plugins/wsc/dialogs/wsc_ie-d5aa2f079a82604698063d1fda880c93a9cb88354b1eed4688d753b97ec51aec.js

Summary

Maintainability
A
0 mins
Test Coverage
CKEDITOR.dialog.add("checkspell",function(e){function t(e,t){var i=0;return function(){"function"==typeof window.doSpell?("undefined"!=typeof o&&window.clearInterval(o),n(e)):180==i++&&window._cancelOnError(t)}}function n(t){var n=new window._SP_FCK_LangCompare,o=CKEDITOR.getUrl(e.plugins.wsc.path+"dialogs/"),i=o+"tmpFrameset.html";window.gFCKPluginName="wsc",n.setDefaulLangCode(e.config.defaultLanguage),window.doSpell({ctrl:c,lang:e.config.wsc_lang||n.getSPLangCode(e.langCode),intLang:e.config.wsc_uiLang||n.getSPLangCode(e.langCode),winType:a,onCancel:function(){t.hide()},onFinish:function(n){e.focus(),t.getParentEditor().setData(n.value),t.hide()},staticFrame:i,framesetPath:i,iframePath:o+"ciframe.html",schemaURI:o+"wsc.css",userDictionaryName:e.config.wsc_userDictionaryName,customDictionaryName:e.config.wsc_customDictionaryIds&&e.config.wsc_customDictionaryIds.split(","),domainName:e.config.wsc_domainName}),CKEDITOR.document.getById(d).setStyle("display","none"),CKEDITOR.document.getById(a).setStyle("display","block")}var o,i=CKEDITOR.tools.getNextNumber(),a="cke_frame_"+i,c="cke_data_"+i,d="cke_error_"+i,i=document.location.protocol||"http:",l=e.lang.wsc.notAvailable,s='<textarea style="display: none" id="'+c+'" rows="10" cols="40"> </textarea><div id="'+d+'" style="display:none;color:red;font-size:16px;font-weight:bold;padding-top:160px;text-align:center;z-index:11;"></div><iframe src="" style="width:100%;background-color:#f1f1e3;" frameborder="0" name="'+a+'" id="'+a+'" allowtransparency="1"></iframe>',r=e.config.wsc_customLoaderScript||i+"//loader.webspellchecker.net/sproxy_fck/sproxy.php?plugin=fck2&customerid="+e.config.wsc_customerId+"&cmd=script&doc=wsc&schema=22";return e.config.wsc_customLoaderScript&&(l+='<p style="color:#000;font-size:11px;font-weight: normal;text-align:center;padding-top:10px">'+e.lang.wsc.errorLoading.replace(/%s/g,e.config.wsc_customLoaderScript)+"</p>"),window._cancelOnError=function(t){if("undefined"==typeof window.WSC_Error){CKEDITOR.document.getById(a).setStyle("display","none");var n=CKEDITOR.document.getById(d);n.setStyle("display","block"),n.setHtml(t||e.lang.wsc.notAvailable)}},{title:e.config.wsc_dialogTitle||e.lang.wsc.title,minWidth:485,minHeight:380,buttons:[CKEDITOR.dialog.cancelButton],onShow:function(){var n=this.getContentElement("general","content").getElement();n.setHtml(s),n.getChild(2).setStyle("height",this._.contentSize.height+"px"),"function"!=typeof window.doSpell&&CKEDITOR.document.getHead().append(CKEDITOR.document.createElement("script",{attributes:{type:"text/javascript",src:r}})),n=e.getData(),CKEDITOR.document.getById(c).setValue(n),o=window.setInterval(t(this,l),250)},onHide:function(){window.ooo=void 0,window.int_framsetLoaded=void 0,window.framesetLoaded=void 0,window.is_window_opened=!1},contents:[{id:"general",label:e.config.wsc_dialogTitle||e.lang.wsc.title,padding:0,elements:[{type:"html",id:"content",html:""}]}]}}),CKEDITOR.dialog.on("resize",function(e){e=e.data;var t=e.dialog;"checkspell"==t._.name&&((t=(t=t.getContentElement("general","content").getElement())&&t.getChild(2))&&t.setSize("height",e.height),t&&t.setSize("width",e.width))});