annotate resources/datetime/UX_DateTimeMenu.js @ 413:e1af66012ef0 0.6

Reverse displayFields Array before configuring the columns of the result list. Now the displayed columns are in the same order as defined in the query configuration file.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Mon, 23 Sep 2013 14:26:09 +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 });

http://lada.wald.intevation.org