-/*!
- * Ext JS Library 3.0.0
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-/**\r
- * @class Ext.menu.DateMenu\r
- * @extends Ext.menu.Menu\r
- * A menu containing a {@link Ext.DatePicker} Component.\r
- * @xtype datemenu\r
- */\r
- Ext.menu.DateMenu = Ext.extend(Ext.menu.Menu, {\r
- /** \r
- * @cfg {Boolean} enableScrolling\r
- * @hide \r
- */\r
- enableScrolling: false,\r
- \r
- /** \r
- * @cfg {Boolean} hideOnClick\r
- * False to continue showing the menu after a date is selected, defaults to true.\r
- */\r
- hideOnClick: true,\r
- \r
- /** \r
- * @cfg {Number} maxHeight\r
- * @hide \r
- */\r
- /** \r
- * @cfg {Number} scrollIncrement\r
- * @hide \r
- */\r
- /**\r
- * @property picker\r
- * @type DatePicker\r
- * The {@link Ext.DatePicker} instance for this DateMenu\r
- */\r
- cls: 'x-date-menu',\r
- \r
- /**\r
- * @event click\r
- * @hide\r
- */\r
- \r
- /**\r
- * @event itemclick\r
- * @hide\r
- */\r
-\r
- initComponent: function(){\r
- this.on('beforeshow', this.onBeforeShow, this);\r
- if(this.strict = (Ext.isIE7 && Ext.isStrict)){\r
- this.on('show', this.onShow, this, {single: true, delay: 20});\r
- }\r
- Ext.apply(this, {\r
- plain: true,\r
- showSeparator: false,\r
- items: this.picker = new Ext.DatePicker(Ext.apply({\r
- internalRender: this.strict || !Ext.isIE,\r
- ctCls: 'x-menu-date-item'\r
- }, this.initialConfig))\r
- });\r
- this.picker.purgeListeners();\r
- Ext.menu.DateMenu.superclass.initComponent.call(this);\r
- this.relayEvents(this.picker, ["select"]);\r
- this.on('select', this.menuHide, this);\r
- if(this.handler){\r
- this.on('select', this.handler, this.scope || this);\r
- }\r
- },\r
-\r
- menuHide: function() {\r
- if(this.hideOnClick){\r
- this.hide(true);\r
- }\r
- },\r
-\r
- onBeforeShow: function(){\r
- if(this.picker){\r
- this.picker.hideMonthPicker(true);\r
- }\r
- },\r
-\r
- onShow: function(){\r
- var el = this.picker.getEl();\r
- el.setWidth(el.getWidth()); //nasty hack for IE7 strict mode\r
- }\r
- });\r
- Ext.reg('datemenu', Ext.menu.DateMenu);
\ No newline at end of file