X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=plugins%2Fscayt%2Fdialogs%2Foptions.js;h=e0834a78c6254addc979e6da1662a06b271e0bb9;hp=5dafe9fcb2dcc17337a2b69ce4c38b728738e6d4;hb=4e90e78dc97789709ee7404359a5517540c27553;hpb=8f6c203fdaa543c3bca40baea6ae4ddcdf1a77f5 diff --git a/plugins/scayt/dialogs/options.js b/plugins/scayt/dialogs/options.js index 5dafe9f..e0834a7 100644 --- a/plugins/scayt/dialogs/options.js +++ b/plugins/scayt/dialogs/options.js @@ -3,6 +3,6 @@ Copyright (c) 2003-2011, 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=0,i=['dic_create,dic_restore','dic_rename,dic_delete'],j=['mixedCase','mixedWithDigits','allCaps','ignoreDomainNames'];function k(){return document.forms.optionsbar.options;};function l(){return document.forms.languagesbar.scayt_lang;};function m(y,z){if(!y)return;var A=y.length;if(A==undefined){y.checked=y.value==z.toString();return;}for(var B=0;B
\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:n.languagesTab,elements:[{type:'html',id:'langs',html:'
\t
\t
'}]},{id:'dictionaries',label:n.dictionariesTab,elements:[{type:'html',style:'',id:'dictionaries',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:n.aboutTab,elements:[{type:'html',id:'about',style:'margin: 5px 5px;',html:'
'}]}],p={title:n.title,minWidth:360,minHeight:220,onShow:function(){var y=this; -y.data=a.fire('scaytDialog',{});y.options=y.data.scayt_control.option();y.sLang=y.data.scayt_control.sLang;if(!y.data||!y.data.scayt||!y.data.scayt_control){alert('Error loading application service');y.hide();return;}var z=0;if(b)y.data.scayt.getCaption(a.langCode||'en',function(A){if(z++>0)return;c=A;r.apply(y);s.apply(y);b=false;});else s.apply(y);y.selectPage(y.data.tab);},onOk:function(){var y=this.data.scayt_control;y.option(this.options);var z=this.chosed_lang;y.setLang(z);y.refresh();},onCancel:function(){var y=k();for(var z in y)y[z].checked=false;m(l(),'');},contents:g},q=CKEDITOR.plugins.scayt.getScayt(a);e=CKEDITOR.plugins.scayt.uiTabs;for(f in e){if(e[f]==1)g[g.length]=o[f];}if(e[2]==1)h=1;var r=function(){var y=this,z=y.data.scayt.getLangList(),A=['dic_create','dic_delete','dic_rename','dic_restore'],B=j,C;if(h){for(C=0;C'+c['button_'+D]+'');}d.getById('dic_info').setHtml(c.dic_info);}if(e[0]==1)for(C in B){var E='label_'+B[C],F=d.getById(E);if('undefined'!=typeof F&&'undefined'!=typeof c[E]&&'undefined'!=typeof y.options[B[C]]){F.setHtml(c[E]);var G=F.getParent();G.$.style.display='block';}}var H='

'+'

'+c.version+window.scayt.getAboutInfo().version.toString()+'

'+'

'+c.about_throwt_copy+'

';d.getById('scayt_about').setHtml(H);var I=function(S,T){var U=d.createElement('label');U.setAttribute('for','cke_option'+S);U.setHtml(T[S]);if(y.sLang==S)y.chosed_lang=S;var V=d.createElement('div'),W=CKEDITOR.dom.element.createFromHtml('');W.on('click',function(){this.$.checked=true;y.chosed_lang=S;});V.append(W);V.append(U);return{lang:T[S],code:S,radio:V};},J=[];if(e[1]==1){for(C in z.rtl)J[J.length]=I(C,z.ltr);for(C in z.ltr)J[J.length]=I(C,z.ltr);J.sort(function(S,T){return T.lang>S.lang?-1:1;});var K=d.getById('scayt_lcol'),L=d.getById('scayt_rcol');for(C=0;C'+y+'');};function u(y){d.getById('dic_message').setHtml(''+y+'');};function v(y){y=String(y);var z=y.split(',');for(var A=0,B=z.length;A
'+'\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:o.languagesTab,elements:[{type:'html',id:'langs',html:'
'+'\t
\t'+'
'+'
'+'
'}]},{id:'dictionaries',label:o.dictionariesTab,elements:[{type:'html',style:'',id:'dictionaries',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:o.aboutTab,elements:[{type:'html',id:'about',style:'margin: 5px 5px;',html:'
'}]}],q={title:o.title,minWidth:360,minHeight:220,onShow:function(){var z=this; +z.data=a.fire('scaytDialog',{});z.options=z.data.scayt_control.option();z.chosed_lang=z.sLang=z.data.scayt_control.sLang;if(!z.data||!z.data.scayt||!z.data.scayt_control){alert('Error loading application service');z.hide();return;}var A=0;if(b)z.data.scayt.getCaption(a.langCode||'en',function(B){if(A++>0)return;c=B;s.apply(z);t.apply(z);b=false;});else t.apply(z);z.selectPage(z.data.tab);},onOk:function(){var z=this.data.scayt_control;z.option(this.options);var A=this.chosed_lang;z.setLang(A);z.refresh();},onCancel:function(){var z=l();for(var A in z)z[A].checked=false;n(m(),'');},contents:h},r=CKEDITOR.plugins.scayt.getScayt(a);for(g=0;g'+c['button_'+B[F]]+'');}d.getById('dic_info_'+e).setHtml(c.dic_info);}if(f[0]==1)for(F in E){var G='label_'+E[F],H=G+'_'+e,I=d.getById(H);if('undefined'!=typeof I&&'undefined'!=typeof c[G]&&'undefined'!=typeof z.options[E[F]]){I.setHtml(c[G]);var J=I.getParent();J.$.style.display='block';}}var K='

'+'

'+c.version+window.scayt.getAboutInfo().version.toString()+'

'+'

'+c.about_throwt_copy+'

';d.getById('scayt_about_'+e).setHtml(K);var L=function(U,V){var W=d.createElement('label');W.setAttribute('for','cke_option'+U);W.setHtml(V[U]);if(z.sLang==U)z.chosed_lang=U;var X=d.createElement('div'),Y=CKEDITOR.dom.element.createFromHtml('');Y.on('click',function(){this.$.checked=true;z.chosed_lang=U;});X.append(Y);X.append(W);return{lang:V[U],code:U,radio:X};};if(f[1]==1){for(F in A.rtl)D[D.length]=L(F,A.ltr);for(F in A.ltr)D[D.length]=L(F,A.ltr);D.sort(function(U,V){return V.lang>U.lang?-1:1;});var M=d.getById('scayt_lcol_'+e),N=d.getById('scayt_rcol_'+e);for(F=0;F'+z+'');};function v(z){d.getById('dic_message_'+e).setHtml(''+z+'');};function w(z){z=String(z);var A=z.split(',');for(var B=0,C=A.length;B