JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
2b7dc002a51c2086438974b9e7ecfcc8ba6559a1
[ckeditor.git] / _source / plugins / uicolor / plugin.js
1 /*\r
2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
3 For licensing, see LICENSE.html or http://ckeditor.com/license\r
4 */\r
5 \r
6 CKEDITOR.plugins.add( 'uicolor',\r
7 {\r
8         requires : [ 'dialog' ],\r
9         lang : [ 'en' ],\r
10 \r
11         init : function( editor )\r
12         {\r
13                 if ( CKEDITOR.env.ie6Compat )\r
14                         return;\r
15 \r
16                 editor.addCommand( 'uicolor', new CKEDITOR.dialogCommand( 'uicolor' ) );\r
17                 editor.ui.addButton( 'UIColor',\r
18                         {\r
19                                 label : editor.lang.uicolor.title,\r
20                                 command : 'uicolor',\r
21                                 icon : this.path + 'uicolor.gif'\r
22                         });\r
23                 CKEDITOR.dialog.add( 'uicolor', this.path + 'dialogs/uicolor.js' );\r
24 \r
25                 // Load YUI js files.\r
26                 CKEDITOR.scriptLoader.load( CKEDITOR.getUrl(\r
27                         'plugins/uicolor/yui/yui.js'\r
28                 ));\r
29 \r
30                 // Load YUI css files.\r
31                 editor.element.getDocument().appendStyleSheet( CKEDITOR.getUrl(\r
32                                 'plugins/uicolor/yui/assets/yui.css'\r
33                 ));\r
34         }\r
35 } );\r