tvheadend/vendor/ext-3.4.1/docs/source/DateMenu.html
Adam Sutton bafcfff42d webui: restructure webui/extjs source files
I want to keep the 3rd-party packages away from the main source
where possible.
2013-06-03 17:11:01 +01:00

138 lines
5.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The source code</title>
<link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../resources/prettify/prettify.js"></script>
<style type="text/css">
.highlight { display: block; background-color: #ddd; }
</style>
<script type="text/javascript">
function highlight() {
document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
}
</script>
</head>
<body onload="prettyPrint(); highlight();">
<pre class="prettyprint lang-js"><span id='Ext-menu-DateMenu'>/**
</span> * @class Ext.menu.DateMenu
* @extends Ext.menu.Menu
* &lt;p&gt;A menu containing an {@link Ext.DatePicker} Component.&lt;/p&gt;
* &lt;p&gt;Notes:&lt;/p&gt;&lt;div class=&quot;mdetail-params&quot;&gt;&lt;ul&gt;
* &lt;li&gt;Although not listed here, the &lt;b&gt;constructor&lt;/b&gt; for this class
* accepts all of the configuration options of &lt;b&gt;{@link Ext.DatePicker}&lt;/b&gt;.&lt;/li&gt;
* &lt;li&gt;If subclassing DateMenu, any configuration options for the DatePicker must be
* applied to the &lt;tt&gt;&lt;b&gt;initialConfig&lt;/b&gt;&lt;/tt&gt; property of the DateMenu.
* Applying {@link Ext.DatePicker DatePicker} configuration settings to
* &lt;b&gt;&lt;tt&gt;this&lt;/tt&gt;&lt;/b&gt; will &lt;b&gt;not&lt;/b&gt; affect the DatePicker's configuration.&lt;/li&gt;
* &lt;/ul&gt;&lt;/div&gt;
* @xtype datemenu
*/
Ext.menu.DateMenu = Ext.extend(Ext.menu.Menu, {
<span id='Ext-menu-DateMenu-cfg-enableScrolling'> /**
</span> * @cfg {Boolean} enableScrolling
* @hide
*/
enableScrolling : false,
<span id='Ext-menu-DateMenu-cfg-handler'> /**
</span> * @cfg {Function} handler
* Optional. A function that will handle the select event of this menu.
* The handler is passed the following parameters:&lt;div class=&quot;mdetail-params&quot;&gt;&lt;ul&gt;
* &lt;li&gt;&lt;code&gt;picker&lt;/code&gt; : DatePicker&lt;div class=&quot;sub-desc&quot;&gt;The Ext.DatePicker.&lt;/div&gt;&lt;/li&gt;
* &lt;li&gt;&lt;code&gt;date&lt;/code&gt; : Date&lt;div class=&quot;sub-desc&quot;&gt;The selected date.&lt;/div&gt;&lt;/li&gt;
* &lt;/ul&gt;&lt;/div&gt;
*/
<span id='Ext-menu-DateMenu-cfg-scope'> /**
</span> * @cfg {Object} scope
* The scope (&lt;tt&gt;&lt;b&gt;this&lt;/b&gt;&lt;/tt&gt; reference) in which the &lt;code&gt;{@link #handler}&lt;/code&gt;
* function will be called. Defaults to this DateMenu instance.
*/
<span id='Ext-menu-DateMenu-cfg-hideOnClick'> /**
</span> * @cfg {Boolean} hideOnClick
* False to continue showing the menu after a date is selected, defaults to true.
*/
hideOnClick : true,
<span id='Ext-menu-DateMenu-cfg-pickerId'> /**
</span> * @cfg {String} pickerId
* An id to assign to the underlying date picker. Defaults to &lt;tt&gt;null&lt;/tt&gt;.
*/
pickerId : null,
<span id='Ext-menu-DateMenu-cfg-maxHeight'> /**
</span> * @cfg {Number} maxHeight
* @hide
*/
<span id='Ext-menu-DateMenu-cfg-scrollIncrement'> /**
</span> * @cfg {Number} scrollIncrement
* @hide
*/
<span id='Ext-menu-DateMenu-property-picker'> /**
</span> * The {@link Ext.DatePicker} instance for this DateMenu
* @property picker
* @type DatePicker
*/
cls : 'x-date-menu',
<span id='Ext-menu-DateMenu-event-click'> /**
</span> * @event click
* @hide
*/
<span id='Ext-menu-DateMenu-event-itemclick'> /**
</span> * @event itemclick
* @hide
*/
initComponent : function(){
this.on('beforeshow', this.onBeforeShow, this);
if(this.strict = (Ext.isIE7 &amp;&amp; Ext.isStrict)){
this.on('show', this.onShow, this, {single: true, delay: 20});
}
Ext.apply(this, {
plain: true,
showSeparator: false,
items: this.picker = new Ext.DatePicker(Ext.applyIf({
internalRender: this.strict || !Ext.isIE9m,
ctCls: 'x-menu-date-item',
id: this.pickerId
}, this.initialConfig))
});
this.picker.purgeListeners();
Ext.menu.DateMenu.superclass.initComponent.call(this);
<span id='Ext-menu-DateMenu-event-select'> /**
</span> * @event select
* Fires when a date is selected from the {@link #picker Ext.DatePicker}
* @param {DatePicker} picker The {@link #picker Ext.DatePicker}
* @param {Date} date The selected date
*/
this.relayEvents(this.picker, ['select']);
this.on('show', this.picker.focus, this.picker);
this.on('select', this.menuHide, this);
if(this.handler){
this.on('select', this.handler, this.scope || this);
}
},
<span id='Ext-menu-DateMenu-method-menuHide'> menuHide : function() {
</span> if(this.hideOnClick){
this.hide(true);
}
},
<span id='Ext-menu-DateMenu-method-onBeforeShow'> onBeforeShow : function(){
</span> if(this.picker){
this.picker.hideMonthPicker(true);
}
},
<span id='Ext-menu-DateMenu-method-onShow'> onShow : function(){
</span> var el = this.picker.getEl();
el.setWidth(el.getWidth()); //nasty hack for IE7 strict mode
}
});
Ext.reg('datemenu', Ext.menu.DateMenu);
</pre>
</body>
</html>