initial import
[roojs1] / Roo / menu / ColorItem.js
1 /*
2  * Based on:
3  * Ext JS Library 1.1.1
4  * Copyright(c) 2006-2007, Ext JS, LLC.
5  *
6  * Originally Released Under LGPL - original licence link has changed is not relivant.
7  *
8  * Fork - LGPL
9  * <script type="text/javascript">
10  */
11  
12 /**
13  * @class Roo.menu.ColorItem
14  * @extends Roo.menu.Adapter
15  * A menu item that wraps the {@link Roo.ColorPalette} component.
16  * @constructor
17  * Creates a new ColorItem
18  * @param {Object} config Configuration options
19  */
20 Roo.menu.ColorItem = function(config){
21     Roo.menu.ColorItem.superclass.constructor.call(this, new Roo.ColorPalette(config), config);
22     /** The Roo.ColorPalette object @type Roo.ColorPalette */
23     this.palette = this.component;
24     this.relayEvents(this.palette, ["select"]);
25     if(this.selectHandler){
26         this.on('select', this.selectHandler, this.scope);
27     }
28 };
29 Roo.extend(Roo.menu.ColorItem, Roo.menu.Adapter);