source: trunk/web/addons/job_monarch/lib/extjs/source/widgets/menu/ColorMenu.js @ 619

Last change on this file since 619 was 619, checked in by ramonb, 15 years ago

lib/:

  • added new AJAX dependancies: ExtJS, pChart, Lightbox2
File size: 1.0 KB
Line 
1/*
2 * Ext JS Library 2.2.1
3 * Copyright(c) 2006-2009, Ext JS, LLC.
4 * licensing@extjs.com
5 *
6 * http://extjs.com/license
7 */
8
9/**
10 * @class Ext.menu.ColorMenu
11 * @extends Ext.menu.Menu
12 * A menu containing a {@link Ext.menu.ColorItem} component (which provides a basic color picker).
13 * @constructor
14 * Creates a new ColorMenu
15 * @param {Object} config Configuration options
16 */
17Ext.menu.ColorMenu = function(config){
18    Ext.menu.ColorMenu.superclass.constructor.call(this, config);
19    this.plain = true;
20    var ci = new Ext.menu.ColorItem(config);
21    this.add(ci);
22    /**
23     * The {@link Ext.ColorPalette} instance for this ColorMenu
24     * @type ColorPalette
25     */
26    this.palette = ci.palette;
27    /**
28     * @event select
29     * @param {ColorPalette} palette
30     * @param {String} color
31     */
32    this.relayEvents(ci, ["select"]);
33};
34Ext.extend(Ext.menu.ColorMenu, Ext.menu.Menu, {
35    //private
36    beforeDestroy: function(){
37        this.palette.destroy();
38    }
39});
Note: See TracBrowser for help on using the repository browser.