Mercurial > lada > lada-client
annotate resources/datetime/UX_DateTimeMenu.js @ 357:94884cd8f8c0
Added logic to upload a file to the server.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Tue, 13 Aug 2013 16:21:08 +0200 |
parents | a282da79cfaa |
children |
rev | line source |
---|---|
273
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
1 Ext.define('Ext.ux.DateTimeMenu', { |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
2 extend: 'Ext.menu.Menu', |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
3 |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
4 alias: 'widget.datetimemenu', |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
5 |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
6 requires: ['Ext.ux.DateTimePicker'], |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
7 |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
8 hideOnClick: true, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
9 pickerId: null, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
10 |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
11 initComponent: function() { |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
12 var me = this; |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
13 |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
14 Ext.apply(me, { |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
15 showSeparator: false, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
16 plain: true, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
17 border: false, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
18 bodyPadding: 0, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
19 items: Ext.applyIf({ |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
20 cls: Ext.baseCSSPrefix + 'menu-date-item', |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
21 id: me.pickerId, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
22 xtype: 'datetimepicker' |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
23 }, me.initialConfig) |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
24 }); |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
25 |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
26 me.callParent(arguments); |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
27 |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
28 me.picker = me.down('datetimepicker'); |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
29 me.relayEvents(me.picker, ['select']); |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
30 |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
31 if (me.hideOnClick) { |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
32 me.on('select', me.hidePickerOnSelect, me); |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
33 } |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
34 }, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
35 |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
36 hidePickerOnSelect: function() { |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
37 Ext.menu.Manager.hideAll(); |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
38 } |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
39 }); |