Index: /CKEditor/trunk/_source/lang/en.js
===================================================================
--- /CKEditor/trunk/_source/lang/en.js (revision 3174)
+++ /CKEditor/trunk/_source/lang/en.js (revision 3175)
@@ -536,4 +536,6 @@
colorButton :
{
+ textColorTitle : 'Text Color',
+ bgColorTitle : 'Background Color',
auto : 'Automatic',
more : 'More Colors...'
Index: /CKEditor/trunk/_source/plugins/colorbutton/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/colorbutton/plugin.js (revision 3174)
+++ /CKEditor/trunk/_source/plugins/colorbutton/plugin.js (revision 3175)
@@ -16,13 +16,13 @@
clickFn;
- addButton( 'TextColor', 'fore' );
- addButton( 'BGColor', 'back' );
+ addButton( 'TextColor', 'fore', lang.textColorTitle );
+ addButton( 'BGColor', 'back', lang.bgColorTitle );
- function addButton( name, type )
+ function addButton( name, type, title )
{
editor.ui.add( name, CKEDITOR.UI_PANELBUTTON,
{
label : lang.label,
- title : lang.panelTitle,
+ title : title,
className : 'cke_button_' + name.toLowerCase(),
Index: /CKEditor/trunk/_source/plugins/panelbutton/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/panelbutton/plugin.js (revision 3174)
+++ /CKEditor/trunk/_source/plugins/panelbutton/plugin.js (revision 3175)
@@ -91,4 +91,22 @@
},
this );
+ var keyDownFn = CKEDITOR.tools.addFunction( function( ev, element ){
+
+ ev = new CKEDITOR.dom.event( ev );
+ var keystroke = ev.getKeystroke();
+ switch ( keystroke )
+ {
+ case 13 : // ENTER
+ case 32 : // SPACE
+ // Show panel
+ CKEDITOR.tools.callFunction( clickFn, element );
+ break;
+ default :
+ // Delegate the default behavior to toolbar button key handling.
+ instance.onkey( instance, keystroke );
+ }
+ // Avoid subsequent focus grab on editor document.
+ ev.preventDefault();
+ });
var label = this.label || '';
@@ -127,5 +145,5 @@
output.push(
-// ' onkeydown="return CKEDITOR.ui.button._.keydown(', index, ', event);"' +
+ ' onkeydown="CKEDITOR.tools.callFunction( ', keyDownFn, ', event, this );"' +
' onclick="CKEDITOR.tools.callFunction(', clickFn, ', this);">' +
'' +
Index: /CKEditor/trunk/_source/plugins/richcombo/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/richcombo/plugin.js (revision 3174)
+++ /CKEditor/trunk/_source/plugins/richcombo/plugin.js (revision 3175)
@@ -83,5 +83,4 @@
{
var id = 'cke_' + this.id;
-
var clickFn = CKEDITOR.tools.addFunction( function( $element )
{
@@ -111,4 +110,35 @@
},
this );
+
+ var instance = {
+ id : id,
+ combo : this,
+ focus : function()
+ {
+ var element = CKEDITOR.document.getById( id ).getChild( 1 );
+ element.focus();
+ },
+ execute : clickFn
+ };
+
+ var keyDownFn = CKEDITOR.tools.addFunction( function( ev, element ){
+
+ ev = new CKEDITOR.dom.event( ev );
+ var keystroke = ev.getKeystroke();
+ switch ( keystroke )
+ {
+ case 13 : // ENTER
+ case 32 : // SPACE
+ // Show panel
+ CKEDITOR.tools.callFunction( clickFn, element );
+ break;
+ default :
+ // Delegate the default behavior to toolbar button key handling.
+ instance.onkey( instance, keystroke );
+ }
+
+ // Avoid subsequent focus grab on editor document.
+ ev.preventDefault();
+ });
output.push(
@@ -119,5 +149,5 @@
output.push(
- '">' +
+ '">' +
'', this.label, '' +
'' +
' ' +
@@ -150,15 +180,6 @@
if ( this.onRender )
this.onRender();
-
- return {
- id : id,
- combo : this,
- focus : function()
- {
- var element = CKEDITOR.document.getById( id ).getChild( 1 );
- element.focus();
- },
- execute : clickFn
- };
+
+ return instance;
},