Index: /CKEditor/trunk/_source/plugins/smiley/dialogs/smiley.js
===================================================================
--- /CKEditor/trunk/_source/plugins/smiley/dialogs/smiley.js (revision 3663)
+++ /CKEditor/trunk/_source/plugins/smiley/dialogs/smiley.js (revision 3664)
@@ -45,5 +45,5 @@
dialog.hide();
- }
+ };
var onKeydown = CKEDITOR.tools.addFunction( function( ev, element )
@@ -160,5 +160,5 @@
html.push(
'
' +
- '',
+ '',
'');
- html.push( chars[i] );
+ ' | ' +
+ '' +
+ '' +
+ chars[i] +
+ '');
}
else
@@ -96,40 +292,29 @@
id : 'charContainer',
html : '',
- onMouseover : function( evt )
+ onMouseover : onFocus,
+ onMouseout : onBlur,
+ onClick : onChoice,
+ focus : function()
{
- var target = evt.data.getTarget(),
- value;
- if ( target.getName() == 'td' && ( value = target.getAttribute( 'value' ) ) )
+ var firstChar = this.getElement().getChild( [0, 0, 0, 0, 0] );
+ setTimeout(function()
{
- var dialog = this.getDialog(),
- htmlPreview = dialog.getContentElement( 'info', 'htmlPreview' ).getElement();
-
- dialog.getContentElement( 'info', 'charPreview' ).getElement().setHtml( value );
- htmlPreview.setHtml( CKEDITOR.tools.htmlEncode( value ) );
- target.addClass( "cke_light_background" );
- }
+ firstChar.focus();
+ onFocus( null, firstChar );
+ });
},
- onMouseout : function( evt )
+ // Needed only for webkit.
+ onShow : function()
{
- var target = evt.data.getTarget();
- if ( target.getName() == 'td' )
+ var firstChar = this.getElement().getChild( [0, 0, 0, 0, 0] );
+ setTimeout(function()
{
- var dialog = this.getDialog();
- dialog.getContentElement( 'info', 'charPreview' ).getElement().setHtml( ' ' );
- dialog.getContentElement( 'info', 'htmlPreview' ).getElement().setHtml( ' ' );
- target.removeClass( "cke_light_background" );
- }
+ firstChar.focus();
+ onFocus( null, firstChar );
+ });
},
- onClick : function( evt )
+ onLoad : function( event )
{
- var target = evt.data.getTarget(),
- value;
- if ( target.getName() == 'td' && ( value = target.$.getAttribute( 'value' )) )
- {
- var dialog = this.getDialog();
- target.removeClass( "cke_light_background" );
- dialog.getParentEditor().insertHtml( value );
- dialog.hide();
- }
+ dialog = event.sender;
}
},
|