+ var applyColorStyle = arguments.callee;\r
+ function onColorDialogClose( evt )\r
+ {\r
+ this.removeListener( 'ok', onColorDialogClose );\r
+ this.removeListener( 'cancel', onColorDialogClose );\r
+\r
+ evt.name == 'ok' && applyColorStyle( this.getContentElement( 'picker', 'selectedColor' ).getValue(), type );\r
+ }\r
+\r
+ editor.openDialog( 'colordialog', function()\r
+ {\r
+ this.on( 'ok', onColorDialogClose );\r
+ this.on( 'cancel', onColorDialogClose );\r
+ } );\r
+\r