X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6e39d509471fe9b4e2660e0d1631b350d0c66f40..f5240829880f87e0cf581c6a296e436fdef0ef80:/src/widgets/menu/ColorMenu.js diff --git a/src/widgets/menu/ColorMenu.js b/src/widgets/menu/ColorMenu.js index 15aa4020..28069fd3 100644 --- a/src/widgets/menu/ColorMenu.js +++ b/src/widgets/menu/ColorMenu.js @@ -1,109 +1,109 @@ /*! - * Ext JS Library 3.1.0 - * Copyright(c) 2006-2009 Ext JS, LLC + * Ext JS Library 3.3.0 + * Copyright(c) 2006-2010 Ext JS, Inc. * licensing@extjs.com * http://www.extjs.com/license */ -/** - * @class Ext.menu.ColorMenu - * @extends Ext.menu.Menu - *
A menu containing a {@link Ext.ColorPalette} Component.
- *Notes:
palette
: ColorPalettecolor
: String{@link #handler}
- * function will be called. Defaults to this ColorMenu instance.
- */
-
- /**
- * @cfg {Boolean} hideOnClick
- * False to continue showing the menu after a color is selected, defaults to true.
- */
- hideOnClick : true,
-
- cls : 'x-color-menu',
-
- /**
- * @cfg {String} paletteId
- * An id to assign to the underlying color palette. Defaults to null.
- */
- paletteId : null,
-
- /**
- * @cfg {Number} maxHeight
- * @hide
- */
- /**
- * @cfg {Number} scrollIncrement
- * @hide
- */
- /**
- * @property palette
- * @type ColorPalette
- * The {@link Ext.ColorPalette} instance for this ColorMenu
- */
-
-
- /**
- * @event click
- * @hide
- */
-
- /**
- * @event itemclick
- * @hide
- */
-
- initComponent : function(){
- Ext.apply(this, {
- plain: true,
- showSeparator: false,
- items: this.palette = new Ext.ColorPalette(Ext.applyIf({
- id: this.paletteId
- }, this.initialConfig))
- });
- this.palette.purgeListeners();
- Ext.menu.ColorMenu.superclass.initComponent.call(this);
- /**
- * @event select
- * Fires when a color is selected from the {@link #palette Ext.ColorPalette}
- * @param {Ext.ColorPalette} palette The {@link #palette Ext.ColorPalette}
- * @param {String} color The 6-digit color hex code (without the # symbol)
- */
- this.relayEvents(this.palette, ['select']);
- this.on('select', this.menuHide, this);
- if(this.handler){
- this.on('select', this.handler, this.scope || this);
- }
- },
-
- menuHide : function(){
- if(this.hideOnClick){
- this.hide(true);
- }
- }
-});
-Ext.reg('colormenu', Ext.menu.ColorMenu);
+/**
+ * @class Ext.menu.ColorMenu
+ * @extends Ext.menu.Menu
+ * A menu containing a {@link Ext.ColorPalette} Component.
+ *Notes:
palette
: ColorPalettecolor
: String{@link #handler}
+ * function will be called. Defaults to this ColorMenu instance.
+ */
+
+ /**
+ * @cfg {Boolean} hideOnClick
+ * False to continue showing the menu after a color is selected, defaults to true.
+ */
+ hideOnClick : true,
+
+ cls : 'x-color-menu',
+
+ /**
+ * @cfg {String} paletteId
+ * An id to assign to the underlying color palette. Defaults to null.
+ */
+ paletteId : null,
+
+ /**
+ * @cfg {Number} maxHeight
+ * @hide
+ */
+ /**
+ * @cfg {Number} scrollIncrement
+ * @hide
+ */
+ /**
+ * @property palette
+ * @type ColorPalette
+ * The {@link Ext.ColorPalette} instance for this ColorMenu
+ */
+
+
+ /**
+ * @event click
+ * @hide
+ */
+
+ /**
+ * @event itemclick
+ * @hide
+ */
+
+ initComponent : function(){
+ Ext.apply(this, {
+ plain: true,
+ showSeparator: false,
+ items: this.palette = new Ext.ColorPalette(Ext.applyIf({
+ id: this.paletteId
+ }, this.initialConfig))
+ });
+ this.palette.purgeListeners();
+ Ext.menu.ColorMenu.superclass.initComponent.call(this);
+ /**
+ * @event select
+ * Fires when a color is selected from the {@link #palette Ext.ColorPalette}
+ * @param {Ext.ColorPalette} palette The {@link #palette Ext.ColorPalette}
+ * @param {String} color The 6-digit color hex code (without the # symbol)
+ */
+ this.relayEvents(this.palette, ['select']);
+ this.on('select', this.menuHide, this);
+ if(this.handler){
+ this.on('select', this.handler, this.scope || this);
+ }
+ },
+
+ menuHide : function(){
+ if(this.hideOnClick){
+ this.hide(true);
+ }
+ }
+});
+Ext.reg('colormenu', Ext.menu.ColorMenu);