Alien-Web-ExtJS-V3
view release on metacpan or search on metacpan
share/ext-all-debug-w-comments.js view on Meta::CPAN
tag: 'div',
cls: this.itemCls
};
Ext.ColorPalette.superclass.onRender.call(this, container, position);
var t = this.tpl || new Ext.XTemplate(
'<tpl for="."><a href="#" class="color-{.}" hidefocus="on"><em><span style="background:#{.}" class="x-unselectable" unselectable="on"> </span></em></a></tpl>'
);
t.overwrite(this.el, this.colors);
this.mon(this.el, this.clickEvent, this.handleClick, this, {delegate: 'a'});
if(this.clickEvent != 'click'){
this.mon(this.el, 'click', Ext.emptyFn, this, {delegate: 'a', preventDefault: true});
}
},
// private
afterRender : function(){
Ext.ColorPalette.superclass.afterRender.call(this);
if(this.value){
var s = this.value;
this.value = null;
this.select(s, true);
}
},
// private
handleClick : function(e, t){
e.preventDefault();
if(!this.disabled){
var c = t.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1];
this.select(c.toUpperCase());
}
},
/**
* Selects the specified color in the palette (fires the {@link #select} event)
* @param {String} color A valid 6-digit color hex code (# will be stripped if included)
* @param {Boolean} suppressEvent (optional) True to stop the select event from firing. Defaults to <tt>false</tt>.
*/
select : function(color, suppressEvent){
color = color.replace('#', '');
if(color != this.value || this.allowReselect){
var el = this.el;
if(this.value){
el.child('a.color-'+this.value).removeClass('x-color-palette-sel');
}
el.child('a.color-'+color).addClass('x-color-palette-sel');
this.value = color;
if(suppressEvent !== true){
this.fireEvent('select', this, color);
}
}
}
/**
* @cfg {String} autoEl @hide
*/
});
Ext.reg('colorpalette', Ext.ColorPalette);/**
* @class Ext.DatePicker
* @extends Ext.Component
* <p>A popup date picker. This class is used by the {@link Ext.form.DateField DateField} class
* to allow browsing and selection of valid dates.</p>
* <p>All the string values documented below may be overridden by including an Ext locale file in
* your page.</p>
* @constructor
* Create a new DatePicker
* @param {Object} config The config object
* @xtype datepicker
*/
Ext.DatePicker = Ext.extend(Ext.BoxComponent, {
/**
* @cfg {String} todayText
* The text to display on the button that selects the current date (defaults to <code>'Today'</code>)
*/
todayText : 'Today',
/**
* @cfg {String} okText
* The text to display on the ok button (defaults to <code>' OK '</code> to give the user extra clicking room)
*/
okText : ' OK ',
/**
* @cfg {String} cancelText
* The text to display on the cancel button (defaults to <code>'Cancel'</code>)
*/
cancelText : 'Cancel',
/**
* @cfg {Function} handler
* Optional. A function that will handle the select event of this picker.
* The handler is passed the following parameters:<div class="mdetail-params"><ul>
* <li><code>picker</code> : DatePicker<div class="sub-desc">This DatePicker.</div></li>
* <li><code>date</code> : Date<div class="sub-desc">The selected date.</div></li>
* </ul></div>
*/
/**
* @cfg {Object} scope
* The scope (<code><b>this</b></code> reference) in which the <code>{@link #handler}</code>
* function will be called. Defaults to this DatePicker instance.
*/
/**
* @cfg {String} todayTip
* A string used to format the message for displaying in a tooltip over the button that
* selects the current date. Defaults to <code>'{0} (Spacebar)'</code> where
* the <code>{0}</code> token is replaced by today's date.
*/
todayTip : '{0} (Spacebar)',
/**
* @cfg {String} minText
* The error text to display if the minDate validation fails (defaults to <code>'This date is before the minimum date'</code>)
*/
minText : 'This date is before the minimum date',
/**
* @cfg {String} maxText
* The error text to display if the maxDate validation fails (defaults to <code>'This date is after the maximum date'</code>)
*/
maxText : 'This date is after the maximum date',
/**
* @cfg {String} format
* The default date format string which can be overriden for localization support. The format must be
* valid according to {@link Date#parseDate} (defaults to <code>'m/d/y'</code>).
*/
format : 'm/d/y',
share/ext-all-debug-w-comments.js view on Meta::CPAN
*/
Ext.menu.Menu = Ext.extend(Ext.Container, {
/**
* @cfg {Object} defaults
* A config object that will be applied to all items added to this container either via the {@link #items}
* config or via the {@link #add} method. The defaults config can contain any number of
* name/value property pairs to be added to each item, and should be valid for the types of items
* being added to the menu.
*/
/**
* @cfg {Mixed} items
* An array of items to be added to this menu. Menus may contain either {@link Ext.menu.Item menu items},
* or general {@link Ext.Component Component}s.
*/
/**
* @cfg {Number} minWidth The minimum width of the menu in pixels (defaults to 120)
*/
minWidth : 120,
/**
* @cfg {Boolean/String} shadow True or 'sides' for the default effect, 'frame' for 4-way shadow, and 'drop'
* for bottom-right shadow (defaults to 'sides')
*/
shadow : 'sides',
/**
* @cfg {String} subMenuAlign The {@link Ext.Element#alignTo} anchor position value to use for submenus of
* this menu (defaults to 'tl-tr?')
*/
subMenuAlign : 'tl-tr?',
/**
* @cfg {String} defaultAlign The default {@link Ext.Element#alignTo} anchor position value for this menu
* relative to its element of origin (defaults to 'tl-bl?')
*/
defaultAlign : 'tl-bl?',
/**
* @cfg {Boolean} allowOtherMenus True to allow multiple menus to be displayed at the same time (defaults to false)
*/
allowOtherMenus : false,
/**
* @cfg {Boolean} ignoreParentClicks True to ignore clicks on any item in this menu that is a parent item (displays
* a submenu) so that the submenu is not dismissed when clicking the parent item (defaults to false).
*/
ignoreParentClicks : false,
/**
* @cfg {Boolean} enableScrolling True to allow the menu container to have scroller controls if the menu is too long (defaults to true).
*/
enableScrolling : true,
/**
* @cfg {Number} maxHeight The maximum height of the menu. Only applies when enableScrolling is set to True (defaults to null).
*/
maxHeight : null,
/**
* @cfg {Number} scrollIncrement The amount to scroll the menu. Only applies when enableScrolling is set to True (defaults to 24).
*/
scrollIncrement : 24,
/**
* @cfg {Boolean} showSeparator True to show the icon separator. (defaults to true).
*/
showSeparator : true,
/**
* @cfg {Array} defaultOffsets An array specifying the [x, y] offset in pixels by which to
* change the default Menu popup position after aligning according to the {@link #defaultAlign}
* configuration. Defaults to <tt>[0, 0]</tt>.
*/
defaultOffsets : [0, 0],
/**
* @cfg {Boolean} plain
* True to remove the incised line down the left side of the menu. Defaults to <tt>false</tt>.
*/
plain : false,
/**
* @cfg {Boolean} floating
* <p>By default, a Menu configured as <b><code>floating:true</code></b>
* will be rendered as an {@link Ext.Layer} (an absolutely positioned,
* floating Component with zindex=15000).
* If configured as <b><code>floating:false</code></b>, the Menu may be
* used as child item of another Container instead of a free-floating
* {@link Ext.Layer Layer}.
*/
floating : true,
/**
* @cfg {Number} zIndex
* zIndex to use when the menu is floating.
*/
zIndex: 15000,
// private
hidden : true,
/**
* @cfg {String/Object} layout
* This class assigns a default layout (<code>layout:'<b>menu</b>'</code>).
* Developers <i>may</i> override this configuration option if another layout is required.
* See {@link Ext.Container#layout} for additional information.
*/
layout : 'menu',
hideMode : 'offsets', // Important for laying out Components
scrollerHeight : 8,
autoLayout : true, // Provided for backwards compat
defaultType : 'menuitem',
bufferResize : false,
initComponent : function(){
if(Ext.isArray(this.initialConfig)){
Ext.apply(this, {items:this.initialConfig});
}
this.addEvents(
/**
* @event click
* Fires when this menu is clicked (or when the enter key is pressed while it is active)
* @param {Ext.menu.Menu} this
* @param {Ext.menu.Item} menuItem The menu item that was clicked
* @param {Ext.EventObject} e
*/
'click',
/**
* @event mouseover
* Fires when the mouse is hovering over this menu
share/ext-all-debug-w-comments.js view on Meta::CPAN
* @cfg {Mixed} value A value to initialize this field with (defaults to undefined).
*/
/**
* @cfg {String} name The field's HTML name attribute (defaults to '').
* <b>Note</b>: this property must be set if this field is to be automatically included with
* {@link Ext.form.BasicForm#submit form submit()}.
*/
/**
* @cfg {String} cls A custom CSS class to apply to the field's underlying element (defaults to '').
*/
/**
* @cfg {String} invalidClass The CSS class to use when marking a field invalid (defaults to 'x-form-invalid')
*/
invalidClass : 'x-form-invalid',
/**
* @cfg {String} invalidText The error text to use when marking a field invalid and no message is provided
* (defaults to 'The value in this field is invalid')
*/
invalidText : 'The value in this field is invalid',
/**
* @cfg {String} focusClass The CSS class to use when the field receives focus (defaults to 'x-form-focus')
*/
focusClass : 'x-form-focus',
/**
* @cfg {Boolean} preventMark
* <tt>true</tt> to disable {@link #markInvalid marking the field invalid}.
* Defaults to <tt>false</tt>.
*/
/**
* @cfg {String/Boolean} validationEvent The event that should initiate field validation. Set to false to disable
automatic validation (defaults to 'keyup').
*/
validationEvent : 'keyup',
/**
* @cfg {Boolean} validateOnBlur Whether the field should validate when it loses focus (defaults to true).
*/
validateOnBlur : true,
/**
* @cfg {Number} validationDelay The length of time in milliseconds after user input begins until validation
* is initiated (defaults to 250)
*/
validationDelay : 250,
/**
* @cfg {String/Object} autoCreate <p>A {@link Ext.DomHelper DomHelper} element spec, or true for a default
* element spec. Used to create the {@link Ext.Component#getEl Element} which will encapsulate this Component.
* See <tt>{@link Ext.Component#autoEl autoEl}</tt> for details. Defaults to:</p>
* <pre><code>{tag: 'input', type: 'text', size: '20', autocomplete: 'off'}</code></pre>
*/
defaultAutoCreate : {tag: 'input', type: 'text', size: '20', autocomplete: 'off'},
/**
* @cfg {String} fieldClass The default CSS class for the field (defaults to 'x-form-field')
*/
fieldClass : 'x-form-field',
/**
* @cfg {String} msgTarget <p>The location where the message text set through {@link #markInvalid} should display.
* Must be one of the following values:</p>
* <div class="mdetail-params"><ul>
* <li><code>qtip</code> Display a quick tip containing the message when the user hovers over the field. This is the default.
* <div class="subdesc"><b>{@link Ext.QuickTips#init Ext.QuickTips.init} must have been called for this setting to work.</b></div</li>
* <li><code>title</code> Display the message in a default browser title attribute popup.</li>
* <li><code>under</code> Add a block div beneath the field containing the error message.</li>
* <li><code>side</code> Add an error icon to the right of the field, displaying the message in a popup on hover.</li>
* <li><code>[element id]</code> Add the error message directly to the innerHTML of the specified element.</li>
* </ul></div>
*/
msgTarget : 'qtip',
/**
* @cfg {String} msgFx <b>Experimental</b> The effect used when displaying a validation message under the field
* (defaults to 'normal').
*/
msgFx : 'normal',
/**
* @cfg {Boolean} readOnly <tt>true</tt> to mark the field as readOnly in HTML
* (defaults to <tt>false</tt>).
* <br><p><b>Note</b>: this only sets the element's readOnly DOM attribute.
* Setting <code>readOnly=true</code>, for example, will not disable triggering a
* ComboBox or DateField; it gives you the option of forcing the user to choose
* via the trigger without typing in the text box. To hide the trigger use
* <code>{@link Ext.form.TriggerField#hideTrigger hideTrigger}</code>.</p>
*/
readOnly : false,
/**
* @cfg {Boolean} disabled True to disable the field (defaults to false).
* <p>Be aware that conformant with the <a href="http://www.w3.org/TR/html401/interact/forms.html#h-17.12.1">HTML specification</a>,
* disabled Fields will not be {@link Ext.form.BasicForm#submit submitted}.</p>
*/
disabled : false,
/**
* @cfg {Boolean} submitValue False to clear the name attribute on the field so that it is not submitted during a form post.
* Defaults to <tt>true</tt>.
*/
submitValue: true,
// private
isFormField : true,
// private
msgDisplay: '',
// private
hasFocus : false,
// private
initComponent : function(){
Ext.form.Field.superclass.initComponent.call(this);
this.addEvents(
/**
* @event focus
* Fires when this field receives input focus.
* @param {Ext.form.Field} this
*/
'focus',
/**
* @event blur
* Fires when this field loses input focus.
* @param {Ext.form.Field} this
*/
'blur',
/**
* @event specialkey
* Fires when any key related to navigation (arrows, tab, enter, esc, etc.) is pressed.
* To handle other keys see {@link Ext.Panel#keys} or {@link Ext.KeyMap}.
( run in 1.504 second using v1.01-cache-2.11-cpan-364913b4093 )