annotate resources/lib/datetime/UX_DateTimeField.js @ 580:fe074c2250b4

added MessungGrid Controller
author Dustin Demuth <dustin@intevation.de>
date Tue, 10 Mar 2015 15:59:53 +0100
parents b6875e900e3a
children
rev   line source
550
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
1 Ext.define('Ext.ux.form.DateTimeField', {
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
2 extend: 'Ext.form.field.Date',
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
3 alias: 'widget.datetimefield',
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
4 requires: ['Ext.ux.DateTimePicker'],
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
5
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
6 initComponent: function() {
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
7 this.format = this.format + ' ' + 'H:i:s';
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
8 this.callParent();
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
9 },
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
10 // overwrite
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
11 createPicker: function() {
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
12 var me = this,
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
13 format = Ext.String.format;
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
14
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
15 return Ext.create('Ext.ux.DateTimePicker', {
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
16 ownerCt: me.ownerCt,
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
17 renderTo: document.body,
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
18 floating: true,
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
19 hidden: true,
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
20 focusOnShow: true,
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
21 minDate: me.minValue,
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
22 maxDate: me.maxValue,
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
23 disabledDatesRE: me.disabledDatesRE,
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
24 disabledDatesText: me.disabledDatesText,
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
25 disabledDays: me.disabledDays,
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
26 disabledDaysText: me.disabledDaysText,
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
27 format: me.format,
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
28 showToday: me.showToday,
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
29 startDay: me.startDay,
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
30 minText: format(me.minText, me.formatDate(me.minValue)),
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
31 maxText: format(me.maxText, me.formatDate(me.maxValue)),
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
32 listeners: {
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
33 scope: me,
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
34 select: me.onSelect
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
35 },
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
36 keyNavConfig: {
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
37 esc: function() {
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
38 me.collapse();
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
39 }
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
40 }
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
41 });
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
42 }
b6875e900e3a Added datetime library.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
43 });

http://lada.wald.intevation.org