X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=inline;f=plugins%2Fsmiley%2Fdialogs%2Fsmiley.js;h=21ab252d3b1b159fc1c08a07797f88bef6fae80a;hb=refs%2Ftags%2Fv4.0.3_full;hp=6f8a40d79ec3c7ab9b9bad6074ea3eb03770a99f;hpb=e7789c1ad838194d45eeee6ac2eb6e55f5cf35a1;p=ckeditor.git
diff --git a/plugins/smiley/dialogs/smiley.js b/plugins/smiley/dialogs/smiley.js
index 6f8a40d..21ab252 100644
--- a/plugins/smiley/dialogs/smiley.js
+++ b/plugins/smiley/dialogs/smiley.js
@@ -1,7 +1,10 @@
-/*
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
-For licensing, see LICENSE.html or http://ckeditor.com/license
-*/
-
-CKEDITOR.dialog.add('smiley',function(a){var b=a.config,c=a.lang.smiley,d=b.smiley_images,e=8,f,g,h=function(m){var n=m.data.getTarget(),o=n.getName();if(o=='td')n=n.getChild([0,0]);else if(o=='a')n=n.getChild(0);else if(o!='img')return;var p=n.getAttribute('cke_src'),q=n.getAttribute('title'),r=a.document.createElement('img',{attributes:{src:p,_cke_saved_src:p,title:q,alt:q}});a.insertElement(r);g.hide();m.data.preventDefault();},i=CKEDITOR.tools.addFunction(function(m,n){m=new CKEDITOR.dom.event(m);n=new CKEDITOR.dom.element(n);var o,p,q=m.getKeystroke(),r=a.lang.dir=='rtl';switch(q){case 38:if(o=n.getParent().getParent().getPrevious()){p=o.getChild([n.getParent().getIndex(),0]);p.focus();}m.preventDefault();break;case 40:if(o=n.getParent().getParent().getNext()){p=o.getChild([n.getParent().getIndex(),0]);if(p)p.focus();}m.preventDefault();break;case 32:h({data:m});m.preventDefault();break;case r?37:39:case 9:if(o=n.getParent().getNext()){p=o.getChild(0);p.focus();m.preventDefault(true);}else if(o=n.getParent().getParent().getNext()){p=o.getChild([0,0]);if(p)p.focus();m.preventDefault(true);}break;case r?39:37:case CKEDITOR.SHIFT+9:if(o=n.getParent().getPrevious()){p=o.getChild(0);p.focus();m.preventDefault(true);}else if(o=n.getParent().getParent().getPrevious()){p=o.getLast().getChild(0);p.focus();m.preventDefault(true);}break;default:return;}}),j=['
');var l={type:'html',html:j.join(''),onLoad:function(m){g=m.sender;},focus:function(){var m=this.getElement().getElementsByTag('a').getItem(0);m.focus();},onClick:h,style:'width: 100%; border-collapse: separate;'};return{title:a.lang.smiley.title,minWidth:270,minHeight:120,contents:[{id:'tab1',label:'',title:'',expand:true,padding:0,elements:[l]}],buttons:[CKEDITOR.dialog.cancelButton]};});
+/*
+ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
+ For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+CKEDITOR.dialog.add("smiley",function(f){for(var e=f.config,a=f.lang.smiley,h=e.smiley_images,g=e.smiley_columns||8,i,k=function(j){var c=j.data.getTarget(),b=c.getName();if("a"==b)c=c.getChild(0);else if("img"!=b)return;var b=c.getAttribute("cke_src"),a=c.getAttribute("title"),c=f.document.createElement("img",{attributes:{src:b,"data-cke-saved-src":b,title:a,alt:a,width:c.$.width,height:c.$.height}});f.insertElement(c);i.hide();j.data.preventDefault()},n=CKEDITOR.tools.addFunction(function(a,c){var a=
+new CKEDITOR.dom.event(a),c=new CKEDITOR.dom.element(c),b;b=a.getKeystroke();var d="rtl"==f.lang.dir;switch(b){case 38:if(b=c.getParent().getParent().getPrevious())b=b.getChild([c.getParent().getIndex(),0]),b.focus();a.preventDefault();break;case 40:if(b=c.getParent().getParent().getNext())(b=b.getChild([c.getParent().getIndex(),0]))&&b.focus();a.preventDefault();break;case 32:k({data:a});a.preventDefault();break;case d?37:39:if(b=c.getParent().getNext())b=b.getChild(0),b.focus(),a.preventDefault(!0);
+else if(b=c.getParent().getParent().getNext())(b=b.getChild([0,0]))&&b.focus(),a.preventDefault(!0);break;case d?39:37:if(b=c.getParent().getPrevious())b=b.getChild(0),b.focus(),a.preventDefault(!0);else if(b=c.getParent().getParent().getPrevious())b=b.getLast().getChild(0),b.focus(),a.preventDefault(!0)}}),d=CKEDITOR.tools.getNextId()+"_smiley_emtions_label",d=[''+a.options+"",'
"],l=h.length,a=0;a');var m="cke_smile_label_"+a+"_"+CKEDITOR.tools.getNextNumber();d.push('',' '+e.smiley_descriptions[a]+""," | ");a%g==g-1&&d.push("")}if(a");d.push("")}d.push("
");
+e={type:"html",id:"smileySelector",html:d.join(""),onLoad:function(a){i=a.sender},focus:function(){var a=this;setTimeout(function(){a.getElement().getElementsByTag("a").getItem(0).focus()},0)},onClick:k,style:"width: 100%; border-collapse: separate;"};return{title:f.lang.smiley.title,minWidth:270,minHeight:120,contents:[{id:"tab1",label:"",title:"",expand:!0,padding:0,elements:[e]}],buttons:[CKEDITOR.dialog.cancelButton]}});
\ No newline at end of file