X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fcolorbutton%2Fplugin.js;h=b49e5f84da27970f70db0ed83f26f2b5a4cc122b;hp=747716e753ef11b762419808e288a29e9471e4bb;hb=941b0a9ba4e673e292510d80a5a86806994b8ea6;hpb=7cd80714081a8ffdf4a1a8d2c72f120ed5ef3d6d diff --git a/_source/plugins/colorbutton/plugin.js b/_source/plugins/colorbutton/plugin.js index 747716e..b49e5f8 100644 --- a/_source/plugins/colorbutton/plugin.js +++ b/_source/plugins/colorbutton/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -31,7 +31,7 @@ CKEDITOR.plugins.add( 'colorbutton', panel : { - css : [ CKEDITOR.getUrl( editor.skinPath + 'editor.css' ) ] + css : editor.skin.editor.css }, onBlock : function( panel, blockName ) @@ -61,8 +61,21 @@ CKEDITOR.plugins.add( 'colorbutton', { 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; } @@ -148,7 +161,7 @@ CKEDITOR.plugins.add( 'colorbutton', * @example * config.colorButton_enableMore = false; */ -CKEDITOR.config.colorButton_enableMore = false; +CKEDITOR.config.colorButton_enableMore = true; /** * Defines the colors to be displayed in the color selectors. It's a string