Properties Methods Events Config Options Direct Link

# Class Ext.ensible.cal.ColorPalette

Package: | Ext.ensible.cal
Defined In: | ColorPalette.js
Class: | ColorPalette
Extends: | Object

Simple color palette class for choosing colors specifically for calendars. This is a lightly modified version of the default Ext ColorPalette that is based on calendar ids rather than hex color codes so that the colors can be easily modified via CSS and automatically applied to calendars. The specific colors used by default are also chosen to provide good color contrast when displayed in calendars.

## Config Options

Config Options | Defined By
--- | ---
| handler : Function Optional. A function that will handle the select event of this color palette. The handler is passed the following par... Optional. A function that will handle the select event of this color palette. The handler is passed the following parameters: `palette` : ColorPalette The Ext.ensible.cal.ColorPalette instance. `colorId` : String The id that identifies the selected color and relates it to a calendar. | ColorPalette

## Public Properties

This class has no public properties.

## Public Methods

Method | Defined By
--- | ---
| ColorPalette( `Object config` ) Create a new ColorPalette Create a new ColorPalette Parameters: `config` : Object The config object Returns: void | ColorPalette
| select( `Number colorId`, [`Boolean suppressEvent`] ) : void Selects the specified color in the palette (fires the select event) Selects the specified color in the palette (fires the select event) Parameters: `colorId` : Number The id that identifies the selected color and relates it to a calendar `suppressEvent` : Boolean (optional) True to stop the select event from firing. Defaults to `false`. Returns: void | ColorPalette

## Public Events

This class has no public events.