torsten@273: Ext.define('Ext.ux.DateTimeMenu', { torsten@273: extend: 'Ext.menu.Menu', torsten@273: torsten@273: alias: 'widget.datetimemenu', torsten@273: torsten@273: requires: ['Ext.ux.DateTimePicker'], torsten@273: torsten@273: hideOnClick: true, torsten@273: pickerId: null, torsten@273: torsten@273: initComponent: function() { torsten@273: var me = this; torsten@273: torsten@273: Ext.apply(me, { torsten@273: showSeparator: false, torsten@273: plain: true, torsten@273: border: false, torsten@273: bodyPadding: 0, torsten@273: items: Ext.applyIf({ torsten@273: cls: Ext.baseCSSPrefix + 'menu-date-item', torsten@273: id: me.pickerId, torsten@273: xtype: 'datetimepicker' torsten@273: }, me.initialConfig) torsten@273: }); torsten@273: torsten@273: me.callParent(arguments); torsten@273: torsten@273: me.picker = me.down('datetimepicker'); torsten@273: me.relayEvents(me.picker, ['select']); torsten@273: torsten@273: if (me.hideOnClick) { torsten@273: me.on('select', me.hidePickerOnSelect, me); torsten@273: } torsten@273: }, torsten@273: torsten@273: hidePickerOnSelect: function() { torsten@273: Ext.menu.Manager.hideAll(); torsten@273: } torsten@273: });