Mercurial > lada > lada-client
annotate resources/datetime/UX_DateTimeField.js @ 425:2ff236e5d2d0
Added layout to the Viewport (root panel) to fix some layout issues.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 08 Nov 2013 12:31:58 +0100 |
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.form.DateTimeField', { |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
2 extend: 'Ext.form.field.Date', |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
3 alias: 'widget.datetimefield', |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
4 requires: ['Ext.ux.DateTimePicker'], |
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 initComponent: function() { |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
7 this.format = this.format + ' ' + 'H:i:s'; |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
8 this.callParent(); |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
9 }, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
10 // overwrite |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
11 createPicker: 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 format = Ext.String.format; |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
14 |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
15 return Ext.create('Ext.ux.DateTimePicker', { |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
16 ownerCt: me.ownerCt, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
17 renderTo: document.body, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
18 floating: true, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
19 hidden: true, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
20 focusOnShow: true, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
21 minDate: me.minValue, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
22 maxDate: me.maxValue, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
23 disabledDatesRE: me.disabledDatesRE, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
24 disabledDatesText: me.disabledDatesText, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
25 disabledDays: me.disabledDays, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
26 disabledDaysText: me.disabledDaysText, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
27 format: me.format, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
28 showToday: me.showToday, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
29 startDay: me.startDay, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
30 minText: format(me.minText, me.formatDate(me.minValue)), |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
31 maxText: format(me.maxText, me.formatDate(me.maxValue)), |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
32 listeners: { |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
33 scope: me, |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
34 select: me.onSelect |
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 keyNavConfig: { |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
37 esc: function() { |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
38 me.collapse(); |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
39 } |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
40 } |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
41 }); |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
42 } |
a282da79cfaa
Added datetimepicker from
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
43 }); |