/* Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.dialog.add('scaytcheck',function(a){var b=true,c,d=CKEDITOR.document,e=[],f,g=[],h=false,i=['dic_create,dic_restore','dic_rename,dic_delete'],j=[{id:'options',label:a.lang.scayt.optionsTab,elements:[{type:'html',id:'options',html:'
\t
\t
\t\t\t\t\t
\t
\t\t\t\t\t
\t
\t\t\t\t
\t
\t\t\t\t\t
'}]},{id:'langs',label:a.lang.scayt.languagesTab,elements:[{type:'html',id:'langs',html:'
\t
\t
'}]},{id:'dictionaries',label:a.lang.scayt.dictionariesTab,elements:[{type:'html',style:'',id:'dic',html:'
\t
\t
Dictionary name
\t\t\t\t\t
\t\t\t\t\t\t
\t\t
\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t
'}]},{id:'about',label:a.lang.scayt.aboutTab,elements:[{type:'html',id:'about',style:'margin: 10px 40px;',html:'
'}]}],k={title:a.lang.scayt.title,minWidth:340,minHeight:200,onShow:function(){var u=this; u.data=a.fire('scaytDialog',{});u.options=u.data.scayt_control.option();u.sLang=u.data.scayt_control.sLang;if(!u.data||!u.data.scayt||!u.data.scayt_control){alert('Error loading application service');u.hide();return;}var v=0;if(b)u.data.scayt.getCaption('en',function(w){if(v++>0)return;c=w;n.apply(u);o.apply(u);b=false;});else o.apply(u);u.selectPage(u.data.tab);},onOk:function(){var z=this;var u=z.data.scayt_control,v=u.option(),w=0;for(var x in z.options)if(v[x]!=z.options[x]&&w===0){u.option(z.options);w++;}var y=z.chosed_lang;if(y&&z.data.sLang!=y){u.setLang(y);w++;}if(w>0)u.refresh();},contents:g},l=CKEDITOR.plugins.scayt.getScayt(a);if(l)e=l.uiTags;for(f in e)if(e[f]==1)g[g.length]=j[f];if(e[2]==1)h=true;function m(){var u=d.getById('dic_name').getValue();if(!u){p(' Dictionary name should not be empty. ');return false;}window.dic[this.getId()].apply(null,[this,u,i]);return true;};var n=function(){var u=this,v=u.data.scayt.getLangList(),w=['dic_create','dic_delete','dic_rename','dic_restore'],x=['mixedCase','mixedWithDigits','allCaps','ignoreDomainNames'],y;if(h){for(y in w){var z=w[y];d.getById(z).setHtml(''+c['button_'+z]+'');}d.getById('dic_info').setHtml(c.dic_info);}for(y in x){var A='label_'+x[y],B=d.getById(A);if('undefined'!=typeof B&&'undefined'!=typeof c[A]&&'undefined'!=typeof u.options[x[y]]){B.setHtml(c[A]);var C=B.getParent();C.$.style.display='block';}}var D='

'+c.about_throwt_image+'

'+'

'+c.version+u.data.scayt.version.toString()+'

'+'

'+c.about_throwt_copy+'

';d.getById('scayt_about').setHtml(D);var E=function(N,O){var P=d.createElement('label');P.setAttribute('for','cke_option'+N);P.setHtml(O[N]);if(u.sLang==N)u.chosed_lang=N;var Q=d.createElement('div'),R=CKEDITOR.dom.element.createFromHtml('');R.on('click',function(){this.$.checked=true;u.chosed_lang=N;});Q.append(R);Q.append(P);return{lang:O[N],code:N,radio:Q};},F=[];for(y in v.rtl)F[F.length]=E(y,v.ltr);for(y in v.ltr)F[F.length]=E(y,v.ltr);F.sort(function(N,O){return O.lang>N.lang?-1:1;});var G=d.getById('scayt_lcol'),H=d.getById('scayt_rcol');for(y=0;y'+u+'');};function q(u){d.getById('dic_message').setHtml(''+u+'');};function r(u){u=String(u);var v=u.split(',');for(var w=0,x=v.length;w