← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1742: (GIS, Merged from 2.0.4 branch) Export to image/Excel options set to checked as default.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
  Lars <larshelg@larshelg-laptop>
------------------------------------------------------------
revno: 1742 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2010-04-07 13:24:18 +0200
message:
  (GIS, Merged from 2.0.4 branch) Export to image/Excel options set to checked as default.
modified:
  dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/MapViewDeletionHandler.java
  dhis-2/dhis-services/dhis-service-mapping/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-services/dhis-service-mapping/src/main/resources/org/hisp/dhis/mapping/hibernate/MapLegendSet.hbm.xml
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.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-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/MapViewDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/MapViewDeletionHandler.java	2009-07-13 20:00:15 +0000
+++ dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/MapViewDeletionHandler.java	2010-04-07 10:19:08 +0000
@@ -73,7 +73,7 @@
         
         return true;
     }
-    
+        
     @Override
     public void deleteIndicatorGroup( IndicatorGroup indicatorGroup )
     {
@@ -109,4 +109,16 @@
             }
         }
     }
+    
+    @Override
+    public void deleteMapLegendSet( MapLegendSet mapLegendSet )
+    {
+        for ( MapView mapView : mappingService.getAllMapViews() )
+        {
+            if ( mapView.getMapLegendSet().equals( mapLegendSet ) )
+            {
+                mappingService.deleteMapView( mapView );
+            }
+        }
+    }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-mapping/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-mapping/src/main/resources/META-INF/dhis/beans.xml	2009-09-11 10:36:37 +0000
+++ dhis-2/dhis-services/dhis-service-mapping/src/main/resources/META-INF/dhis/beans.xml	2010-04-07 10:19:08 +0000
@@ -80,6 +80,7 @@
   
     <aop:aspect ref="deletionInterceptor">      
       <aop:before pointcut="execution( * org.hisp.dhis.mapping.MappingService.deleteMap(..) )" method="intercept"/>
+      <aop:before pointcut="execution( * org.hisp.dhis.mapping.MappingService.deleteMapLegend(..) )" method="intercept"/>
       <aop:before pointcut="execution( * org.hisp.dhis.mapping.MappingService.deleteMapLegendSet(..) )" method="intercept"/>
       <aop:before pointcut="execution( * org.hisp.dhis.mapping.MappingService.deleteMapOrganisationUnitRelation(..) )" method="intercept"/>
       <aop:before pointcut="execution( * org.hisp.dhis.mapping.MappingService.deleteMapView(..) )" method="intercept"/>

=== modified file 'dhis-2/dhis-services/dhis-service-mapping/src/main/resources/org/hisp/dhis/mapping/hibernate/MapLegendSet.hbm.xml'
--- dhis-2/dhis-services/dhis-service-mapping/src/main/resources/org/hisp/dhis/mapping/hibernate/MapLegendSet.hbm.xml	2010-03-25 15:27:40 +0000
+++ dhis-2/dhis-services/dhis-service-mapping/src/main/resources/org/hisp/dhis/mapping/hibernate/MapLegendSet.hbm.xml	2010-04-07 10:19:08 +0000
@@ -25,12 +25,14 @@
         
         <set name="mapLegends" table="maplegendsetmaplegend">
             <key column="legendsetid"/>
-            <many-to-many column="maplegendid" class="org.hisp.dhis.mapping.MapLegend"/>
+            <many-to-many column="maplegendid" 
+				class="org.hisp.dhis.mapping.MapLegend" foreign-key="fk_maplegendset_maplegend"/>
         </set>
             
         <set name="indicators" table="maplegendsetindicator">
             <key column="legendsetid"/>
-            <many-to-many column="indicatorid" class="org.hisp.dhis.indicator.Indicator"/>
+            <many-to-many column="indicatorid" 
+				class="org.hisp.dhis.indicator.Indicator" foreign-key="fk_maplegendset_indicator"/>
         </set>
       
     </class>

=== 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	2010-04-07 11:02:26 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js	2010-04-07 11:24:18 +0000
@@ -632,7 +632,8 @@
 				id: 'export_image_include_legend',
 				fieldLabel: 'Include legend',
 				labelSeparator: '',				
-				isFormField: true		
+				isFormField: true,
+				checked: true
 			},
 			{
 				xtype: 'button',
@@ -707,14 +708,16 @@
 				id: 'export_excel_include_legend',
 				fieldLabel: 'Include legend',
 				labelSeparator: '',
-				isFormField: true
+				isFormField: true,
+				checked: true
 			},	
 			{
 				xtype: 'checkbox',
 				id: 'export_excel_include_value',
 				fieldLabel: 'Include values',
 				labelSeparator: '',
-				isFormField: true
+				isFormField: true,
+				checked: true
 			},
 			{
 				xtype: 'button',