← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3530: Removed remains of save mode in CDE

 

------------------------------------------------------------
revno: 3530
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2011-05-07 16:07:03 +0200
message:
  Removed remains of save mode in CDE
modified:
  dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/screen/DefaultDataEntryScreenManager.java
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.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/screen/DefaultDataEntryScreenManager.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/screen/DefaultDataEntryScreenManager.java	2011-02-10 15:59:50 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/screen/DefaultDataEntryScreenManager.java	2011-05-07 14:07:03 +0000
@@ -66,7 +66,7 @@
         // Inline Javascript to add to HTML before outputting
         // ---------------------------------------------------------------------
         int i = 1;
-        final String jsCodeForInputs = " name=\"entryfield\" $DISABLED onchange=\"saveValue( $DATAELEMENTID, $OPTIONCOMBOID, '$DATAELEMENTNAME', $SAVEMODE )\" style=\"text-align:center\" onkeyup=\"return keyPress(event, this)\" ";
+        final String jsCodeForInputs = " name=\"entryfield\" $DISABLED onchange=\"saveValue( $DATAELEMENTID, $OPTIONCOMBOID, '$DATAELEMENTNAME' )\" style=\"text-align:center\" onkeyup=\"return keyPress(event, this)\" ";
         final String jsCodeForCombos = " name=\"entryfield\" $DISABLED onchange=\"saveBoolean( $DATAELEMENTID, $OPTIONCOMBOID, this )\" onkeyup=\"return keyPress(event, this)\" >";
         final String historyCode = " ondblclick='javascript:viewHistory( $DATAELEMENTID, $OPTIONCOMBOID, true )' ";
         
@@ -123,9 +123,7 @@
 
                 if ( dataElement == null )
                 {
-                    //throw new RuntimeException( "Data Element Id: " + dataElementId + " not found" );
-                	
-                	log.error( "Data Element Id: " + dataElementId + " not found in this data set" );
+                    log.error( "Data Element Id: " + dataElementId + " not found in this data set" );
                     
                     return "Data Element Id :" + dataElementId + " not found in this data set";
                 }
@@ -252,7 +250,6 @@
                 appendCode = appendCode.replace( "$DATAELEMENTNAME", dataElement.getName() );
                 appendCode = appendCode.replace( "$DATAELEMENTTYPE", dataElementValueType );
                 appendCode = appendCode.replace( "$OPTIONCOMBOID", String.valueOf( optionComboId ) );
-                appendCode = appendCode.replace( "$SAVEMODE", "false" ); // TODO backwards compatibility, save mode removed
                 appendCode = appendCode.replace( "$DISABLED", disabled );
 
                 if ( minMaxDataElement == null )

=== 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	2011-03-18 09:47:06 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js	2011-05-07 14:07:03 +0000
@@ -14,7 +14,7 @@
 	saveValue( dataElementId, optionComboId, dataElementName, null );
 }
 
-function saveValue( dataElementId, optionComboId, dataElementName, zeroValueSaveMode ) // ZeroValueSaveMode kept for CDE backwards compatibility
+function saveValue( dataElementId, optionComboId, dataElementName )
 {
     var field = document.getElementById( 'value[' + dataElementId + '].value' + ':' +  'value[' + optionComboId + '].value');
     var type = document.getElementById( 'value[' + dataElementId + '].type' ).innerHTML;