dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10684
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2928: View history bug fixed.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 2928 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-02-28 16:00:58 +0100
message:
View history bug fixed.
modified:
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.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-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js 2011-02-26 12:19:23 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js 2011-02-28 13:24:56 +0000
@@ -2356,9 +2356,9 @@
mapView.widget = scope;
mapView.timestamp = new Date();
mapView.label = G.date.getNowHMS(mapView.timestamp) + ' ' + mapView.parentOrganisationUnitName + ' (' + mapView. organisationUnitLevelName + ')' + ' ' + (mapView.mapValueType == G.conf.map_value_type_indicator ? mapView.indicatorName : mapView.dataElementName);
-
+
for (var i = 0; i < this.menu.items.items.length; i++) {
- if (G.util.compareObjToObj(this.menu.items.items[i].mapView, mapView, ['longitude','latitude','zoom','widget','timestamp','label'])) {
+ if (G.util.compareObjToObj(mapView, this.menu.items.items[i].mapView, ['startdate','longitude','latitude','zoom','widget','timestamp','label'])) {
this.menu.items.items[i].destroy();
}
}
@@ -2366,7 +2366,7 @@
this.menu.addMenuItem({
html: mapView.label,
mapView: mapView
- });
+ });
}
});
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js 2011-02-26 12:19:23 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js 2011-02-28 13:51:42 +0000
@@ -1366,17 +1366,17 @@
return {
featureType: G.conf.map_feature_type_multipolygon,
mapValueType: this.form.findField('mapvaluetype').getValue(),
- indicatorGroupId: this.form.findField('indicatorgroup').getValue(),
- indicatorId: this.form.findField('indicator').getValue(),
- indicatorName: this.form.findField('indicator').getRawValue(),
- dataElementGroupId: this.form.findField('dataelementgroup').getValue(),
- dataElementId: this.form.findField('dataelement').getValue(),
- dataElementName: this.form.findField('dataelement').getRawValue(),
+ indicatorGroupId: this.valueType.isIndicator() ? this.form.findField('indicatorgroup').getValue() : null,
+ indicatorId: this.valueType.isIndicator() ? this.form.findField('indicator').getValue() : null,
+ indicatorName: this.valueType.isIndicator() ? this.form.findField('indicator').getRawValue() : null,
+ dataElementGroupId: this.valueType.isDataElement() ? this.form.findField('dataelementgroup').getValue() : null,
+ dataElementId: this.valueType.isDataElement() ? this.form.findField('dataelement').getValue() : null,
+ dataElementName: this.valueType.isDataElement() ? this.form.findField('dataelement').getRawValue() : null,
mapDateType: G.vars.mapDateType.value,
- periodTypeId: this.form.findField('periodtype').getValue(),
- periodId: this.form.findField('period').getValue(),
- startDate: this.form.findField('startdate').getValue(),
- endDate: this.form.findField('enddate').getValue(),
+ periodTypeId: G.vars.mapDateType.isFixed() ? this.form.findField('periodtype').getValue() : null,
+ periodId: G.vars.mapDateType.isFixed() ? this.form.findField('period').getValue() : null,
+ startDate: G.vars.mapDateType.isStartEnd() ? this.form.findField('startdate').getRawValue() : null,
+ endDate: G.vars.mapDateType.isStartEnd() ? this.form.findField('enddate').getRawValue() : null,
parentOrganisationUnitId: this.organisationUnitSelection.parent.id,
parentOrganisationUnitLevel: this.organisationUnitSelection.parent.level,
parentOrganisationUnitName: this.organisationUnitSelection.parent.name,
@@ -1388,7 +1388,7 @@
bounds: this.legend.value == G.conf.map_legend_type_automatic && this.legend.method == G.conf.classify_with_bounds ? this.form.findField('bounds').getValue() : null,
colorLow: this.legend.value == G.conf.map_legend_type_automatic ? this.form.findField('startcolor').getValue() : null,
colorHigh: this.legend.value == G.conf.map_legend_type_automatic ? this.form.findField('endcolor').getValue() : null,
- mapLegendSetId: this.form.findField('maplegendset').getValue(),
+ mapLegendSetId: this.legend.value == G.conf.map_legend_type_predefined ? this.form.findField('maplegendset').getValue() : null,
radiusLow: null,
radiusHigh: null,
longitude: G.vars.map.getCenter().lon,
@@ -1396,8 +1396,8 @@
zoom: parseFloat(G.vars.map.getZoom())
};
},
-
- getImageExportValues: function() {
+
+ getImageExportValues: function() {
return {
mapValueTypeValue: this.form.findField('mapvaluetype').getValue() == G.conf.map_value_type_indicator ?
this.form.findField('indicator').getRawValue() : this.form.findField('dataelement').getRawValue(),
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js 2011-02-26 12:19:23 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js 2011-02-28 13:51:42 +0000
@@ -1355,17 +1355,17 @@
return {
featureType: G.conf.map_feature_type_point,
mapValueType: this.form.findField('mapvaluetype').getValue(),
- indicatorGroupId: this.form.findField('indicatorgroup').getValue(),
- indicatorId: this.form.findField('indicator').getValue(),
- indicatorName: this.form.findField('indicator').getRawValue(),
- dataElementGroupId: this.form.findField('dataelementgroup').getValue(),
- dataElementId: this.form.findField('dataelement').getValue(),
- dataElementName: this.form.findField('dataelement').getRawValue(),
+ indicatorGroupId: this.valueType.isIndicator() ? this.form.findField('indicatorgroup').getValue() : null,
+ indicatorId: this.valueType.isIndicator() ? this.form.findField('indicator').getValue() : null,
+ indicatorName: this.valueType.isIndicator() ? this.form.findField('indicator').getRawValue() : null,
+ dataElementGroupId: this.valueType.isDataElement() ? this.form.findField('dataelementgroup').getValue() : null,
+ dataElementId: this.valueType.isDataElement() ? this.form.findField('dataelement').getValue() : null,
+ dataElementName: this.valueType.isDataElement() ? this.form.findField('dataelement').getRawValue() : null,
mapDateType: G.vars.mapDateType.value,
- periodTypeId: this.form.findField('periodtype').getValue(),
- periodId: this.form.findField('period').getValue(),
- startDate: this.form.findField('startdate').getValue(),
- endDate: this.form.findField('enddate').getValue(),
+ periodTypeId: G.vars.mapDateType.isFixed() ? this.form.findField('periodtype').getValue() : null,
+ periodId: G.vars.mapDateType.isFixed() ? this.form.findField('period').getValue() : null,
+ startDate: G.vars.mapDateType.isStartEnd() ? this.form.findField('startdate').getRawValue() : null,
+ endDate: G.vars.mapDateType.isStartEnd() ? this.form.findField('enddate').getRawValue() : null,
parentOrganisationUnitId: this.organisationUnitSelection.parent.id,
parentOrganisationUnitLevel: this.organisationUnitSelection.parent.level,
parentOrganisationUnitName: this.organisationUnitSelection.parent.name,
@@ -1377,7 +1377,7 @@
bounds: this.legend.value == G.conf.map_legend_type_automatic && this.legend.method == G.conf.classify_with_bounds ? this.form.findField('bounds').getValue() : null,
colorLow: this.legend.value == G.conf.map_legend_type_automatic ? this.form.findField('startcolor').getValue() : null,
colorHigh: this.legend.value == G.conf.map_legend_type_automatic ? this.form.findField('endcolor').getValue() : null,
- mapLegendSetId: this.form.findField('maplegendset').getValue(),
+ mapLegendSetId: this.legend.value == G.conf.map_legend_type_predefined ? this.form.findField('maplegendset').getValue() : null,
radiusLow: this.form.findField('radiuslow').getValue(),
radiusHigh: this.form.findField('radiushigh').getValue(),
longitude: G.vars.map.getCenter().lon,
@@ -1385,8 +1385,8 @@
zoom: parseFloat(G.vars.map.getZoom())
};
},
-
- getImageExportValues: function() {
+
+ getImageExportValues: function() {
return {
mapValueTypeValue: this.form.findField('mapvaluetype').getValue() == G.conf.map_value_type_indicator ?
this.form.findField('indicator').getRawValue() : this.form.findField('dataelement').getRawValue(),