/* Copyright (c) 2003-2009, 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=b.smiley_images,d=8,e,f,g=function(k){var l=k.data.getTarget(),m=l.getName();if(m=='td')l=l.getChild([0,0]);else if(m=='a')l=l.getChild(0);else if(m!='img')return;var n=l.getAttribute('cke_src'),o=l.getAttribute('title'),p=a.document.createElement('img',{attributes:{src:n,_cke_saved_src:n,title:o,alt:o}});a.insertElement(p);f.hide();},h=CKEDITOR.tools.addFunction(function(k,l){k=new CKEDITOR.dom.event(k);l=new CKEDITOR.dom.element(l);var m,n,o=k.getKeystroke();switch(o){case 39:if(m=l.getParent().getNext()){n=m.getChild(0);n.focus();}k.preventDefault();break;case 37:if(m=l.getParent().getPrevious()){n=m.getChild(0);n.focus();}k.preventDefault();break;case 38:if(m=l.getParent().getParent().getPrevious()){n=m.getChild([l.getParent().getIndex(),0]);n.focus();}k.preventDefault();break;case 40:if(m=l.getParent().getParent().getNext()){n=m.getChild([l.getParent().getIndex(),0]);if(n)n.focus();}k.preventDefault();break;case 32:g({data:k});k.preventDefault();break;case 9:if(m=l.getParent().getNext()){n=m.getChild(0);n.focus();k.preventDefault(true);}else if(m=l.getParent().getParent().getNext()){n=m.getChild([0,0]);if(n)n.focus();k.preventDefault(true);}break;case CKEDITOR.SHIFT+9:if(m=l.getParent().getPrevious()){n=m.getChild(0);n.focus();k.preventDefault(true);}else if(m=l.getParent().getParent().getPrevious()){n=m.getLast().getChild(0);n.focus();k.preventDefault(true);}break;default:return;}}),i=[''];for(e=0;e');i.push('');if(e%d==d-1)i.push('');}if(e');i.push('');}i.push('
','',b.smiley_descriptions[e],'','
');var j={type:'html',html:i.join(''),onLoad:function(k){f=k.sender;},focus:function(){var k=this.getElement().getChild([0,0,0,0]);k.focus();},onClick:g,style:'width: 100%; height: 100%; border-collapse: separate;'}; return{title:a.lang.smiley.title,minWidth:270,minHeight:120,contents:[{id:'tab1',label:'',title:'',expand:true,padding:0,elements:[j]}],buttons:[CKEDITOR.dialog.cancelButton]};});