Mercurial > lada > lada-client
comparison resources/datetime/UX_DateTimeMenu.js @ 273:a282da79cfaa
Added datetimepicker from
http://www.sencha.com/forum/showthread.php?137242-Ext.ux.DateTimeField-DateTimePicker-for-ext4-also-DateTimeMenu-TimePickerField
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Wed, 07 Aug 2013 11:59:50 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
272:852dc338894e | 273:a282da79cfaa |
---|---|
1 Ext.define('Ext.ux.DateTimeMenu', { | |
2 extend: 'Ext.menu.Menu', | |
3 | |
4 alias: 'widget.datetimemenu', | |
5 | |
6 requires: ['Ext.ux.DateTimePicker'], | |
7 | |
8 hideOnClick: true, | |
9 pickerId: null, | |
10 | |
11 initComponent: function() { | |
12 var me = this; | |
13 | |
14 Ext.apply(me, { | |
15 showSeparator: false, | |
16 plain: true, | |
17 border: false, | |
18 bodyPadding: 0, | |
19 items: Ext.applyIf({ | |
20 cls: Ext.baseCSSPrefix + 'menu-date-item', | |
21 id: me.pickerId, | |
22 xtype: 'datetimepicker' | |
23 }, me.initialConfig) | |
24 }); | |
25 | |
26 me.callParent(arguments); | |
27 | |
28 me.picker = me.down('datetimepicker'); | |
29 me.relayEvents(me.picker, ['select']); | |
30 | |
31 if (me.hideOnClick) { | |
32 me.on('select', me.hidePickerOnSelect, me); | |
33 } | |
34 }, | |
35 | |
36 hidePickerOnSelect: function() { | |
37 Ext.menu.Manager.hideAll(); | |
38 } | |
39 }); |