dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16884
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6552: ExtJS lib moved to commons.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 6552 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-04-12 16:15:37 +0200
message:
ExtJS lib moved to commons.
removed:
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/lib/
added:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/drilldown.png
renamed:
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/lib/ext/ => dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/ext/
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/lib/ext-ux/ => dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/ext-ux/
modified:
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/geojsonminValues.vm
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/css/style.css
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/Point.js
dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/GetAggregatedValuesAction.java
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/index.html
--
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
=== renamed directory 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/lib/ext' => 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/ext'
=== renamed directory 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/lib/ext-ux' => 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/ext-ux'
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/drilldown.png'
Binary files dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/drilldown.png 1970-01-01 00:00:00 +0000 and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/drilldown.png 2012-03-29 15:24:07 +0000 differ
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/geojsonminValues.vm'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/geojsonminValues.vm 2012-02-08 15:15:18 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/geojsonminValues.vm 2012-03-29 15:24:07 +0000
@@ -1,1 +1,1 @@
-#set($size=$object.size())[#foreach($unit in $object){"t":#if(${unit.featureType}=="Point")"2"#else"1"#end,"c":$!encoder.jsonEncode($!{unit.validCoordinates}),"i":"$!{unit.id}","n":"$!encoder.jsonEncode(${unit.name})","v":"$!{unit.value}"#if($!{unit.featureType}!="Point"),"h":$!{unit.hasChildrenWithCoordinates()}#end}#if($velocityCount<$size),#end#end]
\ No newline at end of file
+#set($size=$object.size())[#foreach($unit in $object){"t":#if(${unit.featureType}=="Point")"2"#else"1"#end,"c":$!encoder.jsonEncode($!{unit.validCoordinates}),"i":"$!{unit.id}","n":"$!encoder.jsonEncode(${unit.name})","v":"$!{unit.value}","h":$!{unit.hasChildrenWithCoordinates()}}#if($velocityCount<$size),#end#end]
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/css/style.css'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/css/style.css 2012-03-26 15:08:13 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/css/style.css 2012-03-29 15:24:07 +0000
@@ -169,6 +169,9 @@
.menu-featureoptions-relocate {
background-image:url('../../../images/relocate.png');
}
+.menu-featureoptions-drilldown {
+ background-image:url('../../../images/drilldown.png');
+}
.menu-mapview {
background-image:url('../../../images/favorite.png');
}
=== 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 2012-03-26 15:08:13 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js 2012-03-29 15:24:07 +0000
@@ -1063,13 +1063,46 @@
};
var onClickSelect = function onClickSelect(feature) {
+
+ function drill() {
+ if (G.vars.locateFeatureWindow) {
+ G.vars.locateFeatureWindow.destroy();
+ }
+
+ scope.updateValues = true;
+ scope.isDrillDown = true;
+
+ function organisationUnitLevelCallback() {
+ this.organisationUnitSelection.setValuesOnDrillDown(feature.attributes.id, feature.attributes.name);
+
+ this.cmp.parent.reset();
+ this.cmp.parent.selectedNode = {attributes: {
+ id: this.organisationUnitSelection.parent.id,
+ text: this.organisationUnitSelection.parent.name,
+ level: this.organisationUnitSelection.parent.level
+ }};
+
+ this.cmp.level.setValue(this.organisationUnitSelection.level.level);
+ this.loadGeoJson();
+ }
+
+ if (G.stores.organisationUnitLevel.isLoaded) {
+ organisationUnitLevelCallback.call(scope);
+ }
+ else {
+ G.stores.organisationUnitLevel.load({scope: scope, callback: function() {
+ organisationUnitLevelCallback.call(this);
+ }});
+ }
+ }
+
if (feature.geometry.CLASS_NAME == G.conf.map_feature_type_point_class_name) {
if (scope.featureOptions.menu) {
scope.featureOptions.menu.destroy();
}
scope.featureOptions.menu = new Ext.menu.Menu({
- showInfo: function() {
+ showInfo: function() {
Ext.Ajax.request({
url: G.conf.path_mapping + 'getFacilityInfo' + G.conf.type,
params: {id: feature.attributes.id},
@@ -1245,39 +1278,23 @@
}
]
});
+
+ if (feature.attributes.hcwc) {
+ scope.featureOptions.menu.add({
+ text: 'Drill down',
+ iconCls: 'menu-featureoptions-drilldown',
+ scope: this,
+ handler: function() {
+ drill.call(this);
+ }
+ });
+ }
+
scope.featureOptions.menu.showAt([G.vars.mouseMove.x, G.vars.mouseMove.y]);
}
else {
if (feature.attributes.hcwc) {
- if (G.vars.locateFeatureWindow) {
- G.vars.locateFeatureWindow.destroy();
- }
-
- scope.updateValues = true;
- scope.isDrillDown = true;
-
- function organisationUnitLevelCallback() {
- this.organisationUnitSelection.setValuesOnDrillDown(feature.attributes.id, feature.attributes.name);
-
- this.cmp.parent.reset();
- this.cmp.parent.selectedNode = {attributes: {
- id: this.organisationUnitSelection.parent.id,
- text: this.organisationUnitSelection.parent.name,
- level: this.organisationUnitSelection.parent.level
- }};
-
- this.cmp.level.setValue(this.organisationUnitSelection.level.level);
- this.loadGeoJson();
- }
-
- if (G.stores.organisationUnitLevel.isLoaded) {
- organisationUnitLevelCallback.call(scope);
- }
- else {
- G.stores.organisationUnitLevel.load({scope: scope, callback: function() {
- organisationUnitLevelCallback.call(this);
- }});
- }
+ drill.call(this);
}
else {
Ext.message.msg(false, G.i18n.no_coordinates_found);
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js 2012-03-26 15:08:13 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js 2012-03-29 15:24:07 +0000
@@ -1062,13 +1062,46 @@
};
var onClickSelect = function onClickSelect(feature) {
+
+ function drill() {
+ if (G.vars.locateFeatureWindow) {
+ G.vars.locateFeatureWindow.destroy();
+ }
+
+ scope.updateValues = true;
+ scope.isDrillDown = true;
+
+ function organisationUnitLevelCallback() {
+ this.organisationUnitSelection.setValuesOnDrillDown(feature.attributes.id, feature.attributes.name);
+
+ this.cmp.parent.reset();
+ this.cmp.parent.selectedNode = {attributes: {
+ id: this.organisationUnitSelection.parent.id,
+ text: this.organisationUnitSelection.parent.name,
+ level: this.organisationUnitSelection.parent.level
+ }};
+
+ this.cmp.level.setValue(this.organisationUnitSelection.level.level);
+ this.loadGeoJson();
+ }
+
+ if (G.stores.organisationUnitLevel.isLoaded) {
+ organisationUnitLevelCallback.call(scope);
+ }
+ else {
+ G.stores.organisationUnitLevel.load({scope: scope, callback: function() {
+ organisationUnitLevelCallback.call(this);
+ }});
+ }
+ }
+
if (feature.geometry.CLASS_NAME == G.conf.map_feature_type_point_class_name) {
if (scope.featureOptions.menu) {
scope.featureOptions.menu.destroy();
}
scope.featureOptions.menu = new Ext.menu.Menu({
- showInfo: function() {
+ showInfo: function() {
Ext.Ajax.request({
url: G.conf.path_mapping + 'getFacilityInfo' + G.conf.type,
params: {id: feature.attributes.id},
@@ -1244,39 +1277,23 @@
}
]
});
+
+ if (feature.attributes.hcwc) {
+ scope.featureOptions.menu.add({
+ text: 'Drill down',
+ iconCls: 'menu-featureoptions-drilldown',
+ scope: this,
+ handler: function() {
+ drill.call(this);
+ }
+ });
+ }
+
scope.featureOptions.menu.showAt([G.vars.mouseMove.x, G.vars.mouseMove.y]);
}
else {
if (feature.attributes.hcwc) {
- if (G.vars.locateFeatureWindow) {
- G.vars.locateFeatureWindow.destroy();
- }
-
- scope.updateValues = true;
- scope.isDrillDown = true;
-
- function organisationUnitLevelCallback() {
- this.organisationUnitSelection.setValuesOnDrillDown(feature.attributes.id, feature.attributes.name);
-
- this.cmp.parent.reset();
- this.cmp.parent.selectedNode = {attributes: {
- id: this.organisationUnitSelection.parent.id,
- text: this.organisationUnitSelection.parent.name,
- level: this.organisationUnitSelection.parent.level
- }};
-
- this.cmp.level.setValue(this.organisationUnitSelection.level.level);
- this.loadGeoJson();
- }
-
- if (G.stores.organisationUnitLevel.isLoaded) {
- organisationUnitLevelCallback.call(scope);
- }
- else {
- G.stores.organisationUnitLevel.load({scope: scope, callback: function() {
- organisationUnitLevelCallback.call(this);
- }});
- }
+ drill.call(this);
}
else {
Ext.message.msg(false, G.i18n.no_coordinates_found);
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/GetAggregatedValuesAction.java'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/GetAggregatedValuesAction.java 2012-04-06 14:30:50 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/GetAggregatedValuesAction.java 2012-04-11 11:05:59 +0000
@@ -64,21 +64,22 @@
{
this.aggregatedDataValueService = aggregatedDataValueService;
}
-
+
private AggregatedOrgUnitDataValueService aggregatedOrgUnitDataValueService;
- public void setAggregatedOrgUnitDataValueService( AggregatedOrgUnitDataValueService aggregatedOrgUnitDataValueService )
+ public void setAggregatedOrgUnitDataValueService(
+ AggregatedOrgUnitDataValueService aggregatedOrgUnitDataValueService )
{
this.aggregatedOrgUnitDataValueService = aggregatedOrgUnitDataValueService;
}
-
+
private OrganisationUnitGroupService organisationUnitGroupService;
public void setOrganisationUnitGroupService( OrganisationUnitGroupService organisationUnitGroupService )
{
this.organisationUnitGroupService = organisationUnitGroupService;
}
-
+
@Autowired
private ContextUtils contextUtils;
@@ -92,14 +93,14 @@
{
this.indicatorIds = indicatorIds;
}
-
+
private Collection<Integer> dataElementIds;
public void setDataElementIds( Collection<Integer> dataElementIds )
{
this.dataElementIds = dataElementIds;
}
-
+
private Collection<Integer> dataSetIds;
public void setDataSetIds( Collection<Integer> dataSetIds )
@@ -120,7 +121,7 @@
{
this.organisationUnitIds = organisationUnitIds;
}
-
+
private Integer organisationUnitGroupSetId;
public void setOrganisationUnitGroupSetId( Integer organisationUnitGroupSetId )
@@ -133,14 +134,14 @@
// -------------------------------------------------------------------------
private Collection<AggregatedIndicatorValue> indicatorValues = new HashSet<AggregatedIndicatorValue>();
-
+
public Collection<AggregatedIndicatorValue> getIndicatorValues()
{
return indicatorValues;
}
private Collection<AggregatedDataValue> dataElementValues = new HashSet<AggregatedDataValue>();
-
+
public Collection<AggregatedDataValue> getDataElementValues()
{
return dataElementValues;
@@ -164,29 +165,34 @@
// Org unit group set data
// ---------------------------------------------------------------------
- if ( organisationUnitGroupSetId != null && periodIds != null && organisationUnitIds != null && organisationUnitIds.size() > 0 )
+ if ( organisationUnitGroupSetId != null && periodIds != null && organisationUnitIds != null
+ && organisationUnitIds.size() > 0 )
{
Integer organisationUnitId = organisationUnitIds.iterator().next();
-
- OrganisationUnitGroupSet groupSet = organisationUnitGroupService.getOrganisationUnitGroupSet( organisationUnitGroupSetId );
-
+
+ OrganisationUnitGroupSet groupSet = organisationUnitGroupService
+ .getOrganisationUnitGroupSet( organisationUnitGroupSetId );
+
if ( organisationUnitId == null || groupSet == null )
{
return SUCCESS;
}
-
- Collection<Integer> groupIds = ConversionUtils.getIdentifiers( OrganisationUnitGroup.class, groupSet.getOrganisationUnitGroups() );
-
+
+ Collection<Integer> groupIds = ConversionUtils.getIdentifiers( OrganisationUnitGroup.class,
+ groupSet.getOrganisationUnitGroups() );
+
if ( indicatorIds != null )
{
- indicatorValues = aggregatedOrgUnitDataValueService.getAggregatedIndicatorValues( indicatorIds, periodIds, organisationUnitId, groupIds );
+ indicatorValues = aggregatedOrgUnitDataValueService.getAggregatedIndicatorValues( indicatorIds,
+ periodIds, organisationUnitId, groupIds );
}
-
+
if ( dataElementIds != null )
{
- dataElementValues = aggregatedOrgUnitDataValueService.getAggregatedDataValueTotals( dataElementIds, periodIds, organisationUnitId, groupIds );
+ dataElementValues = aggregatedOrgUnitDataValueService.getAggregatedDataValueTotals( dataElementIds,
+ periodIds, organisationUnitId, groupIds );
}
-
+
if ( dataSetIds != null )
{
// FIXME will be implemented soon
@@ -201,22 +207,26 @@
{
if ( indicatorIds != null )
{
- indicatorValues = aggregatedDataValueService.getAggregatedIndicatorValues( indicatorIds, periodIds, organisationUnitIds );
+ indicatorValues = aggregatedDataValueService.getAggregatedIndicatorValues( indicatorIds, periodIds,
+ organisationUnitIds );
}
-
+
if ( dataElementIds != null )
{
- dataElementValues = aggregatedDataValueService.getAggregatedDataValueTotals( dataElementIds, periodIds, organisationUnitIds );
+ dataElementValues = aggregatedDataValueService.getAggregatedDataValueTotals( dataElementIds, periodIds,
+ organisationUnitIds );
}
-
+
if ( dataSetIds != null )
{
- dataSetValues = aggregatedDataValueService.getAggregatedDataSetCompleteness( dataSetIds, periodIds, organisationUnitIds );
+ dataSetValues = aggregatedDataValueService.getAggregatedDataSetCompleteness( dataSetIds, periodIds,
+ organisationUnitIds );
}
}
- contextUtils.configureResponse( ServletActionContext.getResponse(), CONTENT_TYPE_JSON, CacheStrategy.RESPECT_SYSTEM_SETTING, null, false );
-
+ contextUtils.configureResponse( ServletActionContext.getResponse(), CONTENT_TYPE_JSON,
+ CacheStrategy.RESPECT_SYSTEM_SETTING, null, false );
+
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js 2012-04-06 14:30:50 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js 2012-04-12 14:13:15 +0000
@@ -81,6 +81,7 @@
path_api: '../../api/',
path_portal: '../../dhis-web-portal/',
path_images: 'images/',
+ path_lib: '../../dhis-web-commons/javascripts/',
initialize: 'initialize.action',
redirect: 'redirect.action',
data_get: 'getAggregatedValues.action',
@@ -213,7 +214,7 @@
};
Ext.Loader.setConfig({enabled: true});
-Ext.Loader.setPath('Ext.ux', 'lib/ext-ux');
+Ext.Loader.setPath('Ext.ux', DV.conf.finals.ajax.path_lib + 'ext-ux');
Ext.require('Ext.ux.form.MultiSelect');
Ext.onReady( function() {
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/index.html'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/index.html 2012-02-15 13:26:17 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/index.html 2012-04-12 13:05:39 +0000
@@ -1,7 +1,7 @@
<html>
<head>
<title>DHIS 2 Data Visualizer</title>
- <link rel="stylesheet" type="text/css" href="lib/ext/resources/css/ext-all-gray.css" />
+ <link rel="stylesheet" type="text/css" href="../../dhis-web-commons/javascripts/ext/resources/css/ext-all-gray.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
@@ -14,7 +14,7 @@
<script type="text/javascript">DV = {};</script>
<script type="text/javascript" src="i18n.action"></script>
- <script type="text/javascript" src="lib/ext/ext-all.js"></script>
+ <script type="text/javascript" src="../../dhis-web-commons/javascripts/ext/ext-all.js"></script>
<script type="text/javascript" src="../../dhis-web-commons/javascripts/simpleRegression.js"></script>
<script type="text/javascript" src="app.js"></script>
</body>
=== removed directory 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/lib'