← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4306: Removed redundant code

 

------------------------------------------------------------
revno: 4306
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-08-15 17:58:37 +0200
message:
  Removed redundant code
modified:
  dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.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-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java	2011-08-13 13:55:24 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java	2011-08-15 15:58:37 +0000
@@ -52,7 +52,6 @@
 import org.hisp.dhis.dataset.comparator.SectionOrderComparator;
 import org.hisp.dhis.i18n.I18n;
 import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
 
 import com.opensymphony.xwork2.Action;
 
@@ -159,13 +158,6 @@
         return this.customDataEntryFormCode;
     }
 
-    private OrganisationUnit organisationUnit;
-
-    public OrganisationUnit getOrganisationUnit()
-    {
-        return organisationUnit;
-    }
-
     private List<Section> sections;
 
     public List<Section> getSections()
@@ -208,13 +200,6 @@
         return orderdCategoryOptionCombos;
     }
 
-    private List<DataElementCategoryOptionCombo> allOptionCombos = new ArrayList<DataElementCategoryOptionCombo>();
-
-    public List<DataElementCategoryOptionCombo> getAllOptionCombos()
-    {
-        return allOptionCombos;
-    }
-
     private List<DataElementCategoryCombo> orderedCategoryCombos = new ArrayList<DataElementCategoryCombo>();
 
     public List<DataElementCategoryCombo> getOrderedCategoryCombos()
@@ -222,13 +207,6 @@
         return orderedCategoryCombos;
     }
 
-    private Map<Integer, Boolean> sectionIsMultiDimensional = new HashMap<Integer, Boolean>();
-
-    public Map<Integer, Boolean> getSectionIsMultiDimensional()
-    {
-        return sectionIsMultiDimensional;
-    }
-
     private Map<Integer, Integer> sectionCombos = new HashMap<Integer, Integer>();
 
     public Map<Integer, Integer> getSectionCombos()
@@ -275,8 +253,6 @@
         {
             Collection<DataElementCategoryOptionCombo> optionCombos = categoryService.sortOptionCombos( categoryCombo );
 
-            allOptionCombos.addAll( optionCombos );
-
             orderdCategoryOptionCombos.put( categoryCombo.getId(), optionCombos );
 
             // -----------------------------------------------------------------
@@ -370,11 +346,6 @@
                 sectionCombos.put( section.getId(), sectionCategoryCombo.getId() );
             }
 
-            if ( section.hasMultiDimensionalDataElement() )
-            {
-                sectionIsMultiDimensional.put( section.getId(), true );
-            }
-
             for ( DataElementOperand operand : section.getGreyedFields() )
             {
                 greyedFields.put( operand.getDataElement().getId() + ":" + operand.getCategoryOptionCombo().getId(),

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2011-08-15 14:09:44 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2011-08-15 15:58:37 +0000
@@ -855,6 +855,7 @@
 			return false;
 		}
 		
+		/*
 		if ( MAX_SIZE_FORMS < this.totalFormSize() )
 		{
 			this.deleteForm( dataSetId );
@@ -862,6 +863,7 @@
 			console.log( 'Max local storage quota for forms reached, ignored form: ' + dataSetId );
 			return false;
 		}
+		* */
 		
 		return true;
 	}
@@ -1079,7 +1081,8 @@
 	    var id = this.getDataValueIdentifier( dataElementId, categoryOptionComboId, periodId, organisationUnitId );
 	    var dataValues = this.getAllDataValues();
 
-	    if(dataValues[id] != null) {
+	    if( dataValues[id] != null ) 
+	    {
 	        delete dataValues[id];
 	        localStorage[KEY_DATAVALUES] = JSON.stringify( dataValues );
 	    }