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

'+c.about_throwt_image+'

'+'

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

'+'

'+c.about_throwt_copy+'

';d.getById('scayt_about').setHtml(G);var H=function(R,S){var T=d.createElement('label');T.setAttribute('for','cke_option'+R);T.setHtml(S[R]);if(x.sLang==R)x.chosed_lang=R;var U=d.createElement('div'),V=CKEDITOR.dom.element.createFromHtml('');V.on('click',function(){this.$.checked=true;x.chosed_lang=R;});U.append(V);U.append(T);return{lang:S[R],code:R,radio:U};},I=[];if(e[1]==1){for(B in y.rtl)I[I.length]=H(B,y.ltr);for(B in y.ltr)I[I.length]=H(B,y.ltr);I.sort(function(R,S){return S.lang>R.lang?-1:1;});var J=d.getById('scayt_lcol'),K=d.getById('scayt_rcol');for(B=0;B'+x+'');};function t(x){d.getById('dic_message').setHtml(''+x+'');};function u(x){x=String(x);var y=x.split(',');for(var z=0,A=y.length;z
'+'\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