← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 27: Rolling back some changes.

 

------------------------------------------------------------
revno: 27
committer: Lars Helge Oeverland larshelge@xxxxxxxxx
branch nick: trunk
timestamp: Tue 2009-03-10 08:12:50 +0100
message:
  Rolling back some changes.
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/UpdateDataElementGroupAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/AddIndicatorGroupAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/UpdateIndicatorGroupAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/xwork.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/menu/MainMenu.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseIndicatorGroup.vm

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/UpdateDataElementGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/UpdateDataElementGroupAction.java	2009-03-10 04:36:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelementgroup/UpdateDataElementGroupAction.java	2009-03-10 07:12:50 +0000
@@ -88,15 +88,6 @@
     {
         this.selectedDataElements = selectedDataElements;
     }
-    
-    private String mode;
-
-    public void setMode( String mode )
-    {
-        this.mode = mode;
-    }
-    
-    
 
     // -------------------------------------------------------------------------
     // Output
@@ -117,27 +108,16 @@
         throws Exception
     {
         dataElementGroup = dataElementService.getDataElementGroup( id );
-        
-        if(mode!=null){
-            if(mode.equalsIgnoreCase( "editor" )){
-             
-                if ( name != null )
-                {
-                    if ( name.trim().length() > 0 )
-                    {
-                        dataElementGroup.setName( CodecUtils.unescape( name ) );
-                    }
-                }
-                
-            }else{
-                dataElementGroup.setName( name );
+
+        if ( name != null )
+        {
+            if ( name.trim().length() > 0 )
+            {
+                dataElementGroup.setName( CodecUtils.unescape( name ) );
             }
-        }else{
-            dataElementGroup.setName( name ); 
+
         }
 
-        
-
         Set<DataElement> members = new HashSet<DataElement>();
 
         if ( groupMembers != null )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/AddIndicatorGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/AddIndicatorGroupAction.java	2009-03-10 04:36:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/AddIndicatorGroupAction.java	2009-03-10 07:12:50 +0000
@@ -34,14 +34,12 @@
 import org.hisp.dhis.indicator.Indicator;
 import org.hisp.dhis.indicator.IndicatorGroup;
 import org.hisp.dhis.indicator.IndicatorService;
-import org.hisp.dhis.system.util.CodecUtils;
 
 import com.opensymphony.xwork.ActionSupport;
 
 /**
  * @author Torgeir Lorange Ostby
- * @version $Id: AddIndicatorGroupAction.java 3305 2007-05-14 18:55:52Z larshelg
- *          $
+ * @version $Id: AddIndicatorGroupAction.java 3305 2007-05-14 18:55:52Z larshelg $
  */
 public class AddIndicatorGroupAction
     extends ActionSupport
@@ -56,7 +54,7 @@
     {
         this.indicatorService = indicatorService;
     }
-
+    
     // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
@@ -75,41 +73,13 @@
         this.groupMembers = groupMembers;
     }
 
-    private String mode;
-
-    public void setMode( String mode )
-    {
-        this.mode = mode;
-    }
-    
-    private IndicatorGroup indicatorGroup;
-    
-    public IndicatorGroup getIndicatorGroup()
-    {
-        return indicatorGroup;
-    }
-    
-
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
 
-
-
-    public String execute()
-        throws Exception
+    public String execute() throws Exception
     {
-        indicatorGroup = new IndicatorGroup( name );
-        
-        if ( mode != null )
-        {
-            if ( mode.equalsIgnoreCase( "editor" ) )
-            {
-
-                indicatorGroup.setName( CodecUtils.unescape( name ) );
-
-            }
-        }
+        IndicatorGroup indicatorGroup = new IndicatorGroup( name );
         
         Set<Indicator> members = new HashSet<Indicator>();
 
@@ -118,14 +88,14 @@
             for ( String id : groupMembers )
             {
                 Indicator indicator = indicatorService.getIndicator( Integer.parseInt( id ) );
-
+                
                 members.add( indicator );
             }
         }
-
+        
         indicatorGroup.setMembers( members );
-
-        indicatorService.addIndicatorGroup( indicatorGroup );
+        
+        indicatorService.addIndicatorGroup( indicatorGroup );        
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/UpdateIndicatorGroupAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/UpdateIndicatorGroupAction.java	2009-03-10 04:36:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicatorgroup/UpdateIndicatorGroupAction.java	2009-03-10 07:12:50 +0000
@@ -34,14 +34,12 @@
 import org.hisp.dhis.indicator.Indicator;
 import org.hisp.dhis.indicator.IndicatorGroup;
 import org.hisp.dhis.indicator.IndicatorService;
-import org.hisp.dhis.system.util.CodecUtils;
 
 import com.opensymphony.xwork.ActionSupport;
 
 /**
  * @author Torgeir Lorange Ostby
- * @version $Id: UpdateIndicatorGroupAction.java 3305 2007-05-14 18:55:52Z
- *          larshelg $
+ * @version $Id: UpdateIndicatorGroupAction.java 3305 2007-05-14 18:55:52Z larshelg $
  */
 public class UpdateIndicatorGroupAction
     extends ActionSupport
@@ -56,7 +54,7 @@
     {
         this.indicatorService = indicatorService;
     }
-
+    
     // -------------------------------------------------------------------------
     // Input
     // -------------------------------------------------------------------------
@@ -75,10 +73,6 @@
         this.name = name;
     }
 
-    /*
-     * This property use when using submit
-     */
-
     private Collection<String> groupMembers;
 
     public void setGroupMembers( Collection<String> groupMembers )
@@ -86,95 +80,29 @@
         this.groupMembers = groupMembers;
     }
 
-    /*
-     * This property use when using ajax
-     */
-
-    private String selectedIndicators[] = new String[0];
-
-    public void setSelectedIndicators( String[] selectedIndicators )
-    {
-        this.selectedIndicators = selectedIndicators;
-    }
-
-    /*
-     * This property is mode of user interface (normal or editor)
-     */
-
-    private String mode;
-
-    public void setMode( String mode )
-    {
-        this.mode = mode;
-    }
-
-    private IndicatorGroup indicatorGroup;
-
-    public IndicatorGroup getIndicatorGroup()
-    {
-        return indicatorGroup;
-    }
-
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
 
-    public String execute()
-        throws Exception
+    public String execute() throws Exception
     {
-        indicatorGroup = indicatorService.getIndicatorGroup( id );
-
-        if ( mode != null )
-        {
-            if ( mode.equalsIgnoreCase( "editor" ) )
-            {
-                if(name!=null){
-                    if(name.length() > 0){
-                        indicatorGroup.setName( CodecUtils.unescape( name ) );
-                    }
-                }                
-
-            }
-            else
-            {
-                indicatorGroup.setName( name );
-            }
-        }
-        else
-        {
-
-            indicatorGroup.setName( name );
-
-        }
+        IndicatorGroup indicatorGroup = indicatorService.getIndicatorGroup( id );
 
         Set<Indicator> members = new HashSet<Indicator>();
-
+        
         if ( groupMembers != null )
         {
             for ( String memberId : groupMembers )
             {
-                members.add( indicatorService.getIndicator( Integer.parseInt( memberId ) ) );
-            }
-        }
-
-        if ( selectedIndicators != null )
-        {
-            if ( selectedIndicators.length > 0 )
-            {
-                for ( int i = 0; i < selectedIndicators.length; i++ )
-                {
-                    Indicator indicator = indicatorService.getIndicator( Integer.parseInt( selectedIndicators[i] ) );
-                    members.add( indicator );                   
-                }
-
-            }
-
-        }
-
+                members.add( indicatorService.getIndicator( Integer.parseInt( memberId ) ) );            
+            }
+        }
+        
+        indicatorGroup.setName( name );
         indicatorGroup.setMembers( members );
-
+        
         indicatorService.updateIndicatorGroup( indicatorGroup );
-
+        
         return SUCCESS;
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties	2009-03-10 04:36:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/org/hisp/dhis/dd/i18n_module.properties	2009-03-10 07:12:50 +0000
@@ -84,7 +84,6 @@
 available_data_elements							= Available data elements
 filters											= Filters
 create_new_indicator							= Create new indicator
-indicator_type									= Indicator type
 select											= Select
 create_new_indicator_group						= Create new indicator group
 available_indicators							= Available indicators

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/xwork.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/xwork.xml	2009-03-10 04:36:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/xwork.xml	2009-03-10 07:12:50 +0000
@@ -224,7 +224,7 @@
     </action>
     
     <!-- Indicator Group Editor -->
-    
+    <!-- 
     <action name="indicatorGroupEditor"
       class="org.hisp.dhis.dd.action.indicator.GetIndicatorListAction">
       <result name="success" type="velocity">/main.vm</result>
@@ -268,7 +268,7 @@
       <interceptor-ref name="transactionStack"/>
 	  <param name="requiredAuthorities">F_INDICATORGROUP_UPDATE</param>
     </action>
-      
+    -->
     
     <!-- IndicatorGroup -->
     

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/menu/MainMenu.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/menu/MainMenu.vm	2009-03-10 04:36:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/menu/MainMenu.vm	2009-03-10 07:12:50 +0000
@@ -11,7 +11,7 @@
 	<li><a href="indicator.action">$i18n.getString( "indicator" )&nbsp;</a></li>
  	<li><a href="indicatorType.action">$i18n.getString( "indicator_type" )&nbsp;</a></li>	
 	<li><a href="indicatorGroup.action">$i18n.getString( "indicator_group" )&nbsp;</a></li>
-	<li><a href="indicatorGroupEditor.action">$i18n.getString( "indicator_group_editor" )&nbsp;</a></li>
+	##<li><a href="indicatorGroupEditor.action">$i18n.getString( "indicator_group_editor" )&nbsp;</a></li>
   </ul>
  
 <h2><a href="dataDictionary.action">$i18n.getString( "data_dictionary" )&nbsp;</a></h2>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseIndicatorGroup.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseIndicatorGroup.vm	2009-03-10 04:36:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/responseIndicatorGroup.vm	2009-03-10 07:12:50 +0000
@@ -3,12 +3,4 @@
 	<id>$indicatorGroup.id</id>
 	<name>$encoder.xmlEncode( $indicatorGroup.name )</name>
 	<memberCount>$memberCount</memberCount>
-	<indicators>
-	#foreach( $member in $!indicatorGroup.members )
-		<indicator>
-			<id>$member.id</id>
-			<name>$encoder.xmlEncode( $member.name )</name>
-		</indicator>
-	#end	
-	</indicators>
 </indicatorGroup>



--

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.