comparison resources/lib/datetime/UX_DateTimeMenu.js @ 550:b6875e900e3a

Added datetime library.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 06 Mar 2015 12:44:44 +0100
parents
children
comparison
equal deleted inserted replaced
549:3aa74630d403 550:b6875e900e3a
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 });

http://lada.wald.intevation.org