dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32275
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16469: GIS start/end date init values.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 16469 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-08-21 15:59:09 +0200
message:
GIS start/end date init values.
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/app/scripts/app.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/app/scripts/app.js 2014-08-15 10:50:41 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/app/scripts/app.js 2014-08-21 13:57:51 +0000
@@ -4539,6 +4539,13 @@
labelSeparator: '',
columnWidth: 0.5,
height: 41,
+ value: function() {
+ var greg = $.calendars.instance('gregorian'),
+ date = greg.parseDate('yyyy-mm-dd', (new Date( (new Date()).setMonth( (new Date()).getMonth() - 3))).toJSON().slice(0,10));
+
+ date = gis.init.calendar.fromJD(date.toJD());
+ return gis.init.calendar.formatDate(gis.init.dateFormat, date);
+ }(),
listeners: {
render: function(c) {
onDateFieldRender(c);
@@ -4554,6 +4561,7 @@
columnWidth: 0.5,
height: 41,
style: 'margin-left: 1px',
+ value: gis.init.calendar.today().toString(),
listeners: {
render: function(c) {
onDateFieldRender(c);
@@ -4561,18 +4569,6 @@
}
});
- //endDate = Ext.create('Ext.form.field.Date', {
- //fieldLabel: 'End date',
- //labelAlign: 'top',
- //labelCls: 'gis-form-item-label-top',
- ////labelStyle: 'font-weight: bold',
- //labelSeparator: '',
- //columnWidth: 0.5,
- //style: 'margin-left: 1px',
- //format: 'Y-m-d',
- //value: new Date()
- //});
-
period = Ext.create('Ext.panel.Panel', {
title: '<div class="gis-panel-title-period">Periods</div>',
bodyStyle: 'padding:4px 1px 2px',