← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13230: Data value controller/data entry, changed from cc to co as option combo parameter name for consis...

 

------------------------------------------------------------
revno: 13230
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2013-12-14 14:35:23 +0100
message:
  Data value controller/data entry, changed from cc to co as option combo parameter name for consistency
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataValueController.java
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js
  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-api/src/main/java/org/hisp/dhis/api/controller/DataValueController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataValueController.java	2013-09-17 18:23:30 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/DataValueController.java	2013-12-14 13:35:23 +0000
@@ -81,7 +81,7 @@
     private DataSetService dataSetService;
 
     @RequestMapping( method = RequestMethod.POST, produces = "text/plain" )
-    public void saveDataValue( @RequestParam String de, @RequestParam String cc, 
+    public void saveDataValue( @RequestParam String de, @RequestParam String co, 
         @RequestParam String pe, @RequestParam String ou, @RequestParam String value,
         HttpServletResponse response )
     {
@@ -93,11 +93,11 @@
             return;
         }
         
-        DataElementCategoryOptionCombo categoryOptionCombo = categoryService.getDataElementCategoryOptionCombo( cc );
+        DataElementCategoryOptionCombo categoryOptionCombo = categoryService.getDataElementCategoryOptionCombo( co );
         
         if ( categoryOptionCombo == null )
         {
-            ContextUtils.conflictResponse( response, "Illegal category option combo identifier: " + cc );
+            ContextUtils.conflictResponse( response, "Illegal category option combo identifier: " + co );
             return;
         }
         

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js	2013-12-13 16:14:17 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js	2013-12-14 13:35:23 +0000
@@ -272,11 +272,11 @@
 // Saver objects
 // -----------------------------------------------------------------------------
 
-function ValueSaver( de, cc, ou, pe, value, fieldId, resultColor )
+function ValueSaver( de, co, ou, pe, value, fieldId, resultColor )
 {
     var dataValue = {
         'de' : de,
-        'cc' : cc,
+        'co' : co,
         'ou' : ou,
         'pe' : pe,
         'value' : value

=== 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	2013-12-13 16:14:17 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2013-12-14 13:35:23 +0000
@@ -1137,7 +1137,7 @@
 		var dataValue = dataValues[i];
 		
 		json.dataValues.push( { 
-			'id': dataValue.de + '-' + dataValue.cc,
+			'id': dataValue.de + '-' + dataValue.co,
 			'val': dataValue.value
 		} );
 	}
@@ -1987,7 +1987,7 @@
     this.saveDataValue = function( dataValue )
     {
         var id = this.getDataValueIdentifier( dataValue.de, 
-        		dataValue.cc, dataValue.pe, dataValue.ou );
+        		dataValue.co, dataValue.pe, dataValue.ou );
 
         var dataValues = {};
 
@@ -2015,15 +2015,15 @@
      * does not exist.
      *
      * @param de the data element identifier.
-     * @param cc the category option combo identifier.
+     * @param co the category option combo identifier.
      * @param pe the period identifier.
      * @param ou the organisation unit identifier.
      * @return the value for the data value with the given arguments, null if
      *         non-existing.
      */
-    this.getDataValue = function( de, cc, pe, ou )
+    this.getDataValue = function( de, co, pe, ou )
     {
-        var id = this.getDataValueIdentifier( de, cc, pe, ou );
+        var id = this.getDataValueIdentifier( de, co, pe, ou );
 
         if ( localStorage[KEY_DATAVALUES] != null )
         {
@@ -2066,7 +2066,7 @@
      */
     this.clearDataValueJSON = function( dataValue )
     {
-        this.clearDataValue( dataValue.de, dataValue.cc, dataValue.pe,
+        this.clearDataValue( dataValue.de, dataValue.co, dataValue.pe,
                 dataValue.ou );
     };
 
@@ -2074,13 +2074,13 @@
      * Removes the given dataValue from localStorage.
      *
      * @param de the data element identifier.
-     * @param cc the category option combo identifier.
+     * @param co the category option combo identifier.
      * @param pe the period identifier.
      * @param ou the organisation unit identifier.
      */
-    this.clearDataValue = function( de, cc, pe, ou )
+    this.clearDataValue = function( de, co, pe, ou )
     {
-        var id = this.getDataValueIdentifier( de, cc, pe, ou );
+        var id = this.getDataValueIdentifier( de, co, pe, ou );
         var dataValues = this.getAllDataValues();
 
         if ( dataValues != null && dataValues[id] != null )
@@ -2130,9 +2130,9 @@
     /**
      * Generates an identifier.
      */
-    this.getDataValueIdentifier = function( de, cc, pe, ou )
+    this.getDataValueIdentifier = function( de, co, pe, ou )
     {
-        return de + '-' + cc + '-' + pe + '-' + ou;
+        return de + '-' + co + '-' + pe + '-' + ou;
     };
 
     /**