Index: /CKEditor/branches/versions/3.1.x/CHANGES.html =================================================================== --- /CKEditor/branches/versions/3.1.x/CHANGES.html (revision 4576) +++ /CKEditor/branches/versions/3.1.x/CHANGES.html (revision 4577) @@ -41,4 +41,5 @@
Index: /CKEditor/branches/versions/3.1.x/_source/plugins/colorbutton/plugin.js =================================================================== --- /CKEditor/branches/versions/3.1.x/_source/plugins/colorbutton/plugin.js (revision 4576) +++ /CKEditor/branches/versions/3.1.x/_source/plugins/colorbutton/plugin.js (revision 4577) @@ -62,6 +62,19 @@ if ( color == '?' ) { - // TODO : Implement the colors dialog. - // editor.openDialog( '' ); + var applyColorStyle = arguments.callee; + function onColorDialogClose( evt ) + { + this.removeListener( 'ok', onColorDialogClose ); + this.removeListener( 'cancel', onColorDialogClose ); + + evt.name == 'ok' && applyColorStyle( this.getContentElement( 'picker', 'selectedColor' ).getValue(), type ); + } + + editor.openDialog( 'colordialog', function() + { + this.on( 'ok', onColorDialogClose ); + this.on( 'cancel', onColorDialogClose ); + } ); + return; } @@ -149,5 +162,5 @@ * config.colorButton_enableMore = false; */ -CKEDITOR.config.colorButton_enableMore = false; +CKEDITOR.config.colorButton_enableMore = true; /** Index: /CKEditor/branches/versions/3.1.x/_source/plugins/dialog/plugin.js =================================================================== --- /CKEditor/branches/versions/3.1.x/_source/plugins/dialog/plugin.js (revision 4576) +++ /CKEditor/branches/versions/3.1.x/_source/plugins/dialog/plugin.js (revision 4577) @@ -2712,4 +2712,5 @@ * Loads and opens a registered dialog. * @param {String} dialogName The registered name of the dialog. + * @param {Function} callback The function to be invoked after dialog instance created. * @see CKEDITOR.dialog.add * @example @@ -2717,5 +2718,5 @@ * @returns {CKEDITOR.dialog} The dialog object corresponding to the dialog displayed. null if the dialog name is not registered. */ - openDialog : function( dialogName ) + openDialog : function( dialogName, callback ) { var dialogDefinitions = CKEDITOR.dialog._.dialogDefinitions[ dialogName ]; @@ -2730,4 +2731,5 @@ ( storedDialogs[ dialogName ] = new CKEDITOR.dialog( this, dialogName ) ); + callback && callback.call( dialog, dialog ); dialog.show(); @@ -2748,5 +2750,5 @@ if ( typeof CKEDITOR.dialog._.dialogDefinitions[ dialogName ] != 'function' ) CKEDITOR.dialog._.dialogDefinitions[ dialogName ] = 'failed'; - me.openDialog( dialogName ); + me.openDialog( dialogName, callback ); body.setStyle( 'cursor', cursor ); } );