JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
52adecfbe846395c285e3995d5fbe9827c7c796c
[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                         '_source/' + // @Packager.RemoveLine\r
28                         'plugins/uicolor/yui/yui.js'\r
29                 ));\r
30 \r
31                 // Load YUI css files.\r
32                 editor.element.getDocument().appendStyleSheet( CKEDITOR.getUrl(\r
33                                 '_source/' + // @Packager.RemoveLine\r
34                                 'plugins/uicolor/yui/assets/yui.css'\r
35                 ));\r
36         }\r
37 } );\r