← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3104: Reverted r 3103

 

------------------------------------------------------------
revno: 3104
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2011-03-20 22:45:37 +0100
message:
  Reverted r 3103
modified:
  dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SelectAction.java
  dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/defaultForm.vm
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm


--
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/SelectAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SelectAction.java	2011-03-20 19:16:57 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/SelectAction.java	2011-03-20 21:45:37 +0000
@@ -27,13 +27,10 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.Collection;
 import java.util.Date;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.hisp.dhis.dataelement.CalculatedDataElement;
-import org.hisp.dhis.dataelement.DataElementService;
 import org.hisp.dhis.datalock.DataSetLock;
 import org.hisp.dhis.datalock.DataSetLockService;
 import org.hisp.dhis.dataset.CompleteDataSetRegistration;
@@ -58,13 +55,6 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private DataElementService dataElementService;
-
-    public void setDataElementService( DataElementService dataElementService )
-    {
-        this.dataElementService = dataElementService;
-    }
-    
     private DataSetLockService dataSetLockService;
 
     public void setDataSetLockService( DataSetLockService dataSetLockService )
@@ -142,13 +132,6 @@
     {
         return registrationDate;
     }
-    
-    private Collection<CalculatedDataElement> calculatedDataElements;
-
-    public Collection<CalculatedDataElement> getCalculatedDataElements()
-    {
-        return calculatedDataElements;
-    }
 
     // -------------------------------------------------------------------------
     // Action implementation
@@ -202,13 +185,6 @@
         }
         
         // ---------------------------------------------------------------------
-        // Get CalculatedDataElement info
-        // ---------------------------------------------------------------------
-
-        calculatedDataElements = dataElementService.getCalculatedDataElementsByDataElements( selectedDataSet.getDataElements() );       
-
-        
-        // ---------------------------------------------------------------------
         // Get data set completeness info
         // ---------------------------------------------------------------------
 

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/META-INF/dhis/beans.xml	2011-03-20 19:16:57 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/META-INF/dhis/beans.xml	2011-03-20 21:45:37 +0000
@@ -50,7 +50,6 @@
 	</bean>
 
 	<bean id="org.hisp.dhis.de.action.SelectAction" class="org.hisp.dhis.de.action.SelectAction" scope="prototype">
-	    <property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
 		<property name="dataSetLockService" ref="org.hisp.dhis.datalock.DataSetLockService" />
 		<property name="selectedStateManager" ref="org.hisp.dhis.de.state.SelectedStateManager" />
 		<property name="registrationService" ref="org.hisp.dhis.dataset.CompleteDataSetRegistrationService" />

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/defaultForm.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/defaultForm.vm	2011-03-20 19:16:57 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/defaultForm.vm	2011-03-20 21:45:37 +0000
@@ -33,9 +33,8 @@
   #set( $mark = 0 )
   #else
   #set( $mark = 1 )
-  #end  
-  #set( $calculated = false )
-  #set( $calculated = ( $calculatedDataElements.contains( $dataElement ) ) )
+  #end
+
   #set( $count = $count + 1 )
   <tr>
     <td  style="#if( $mark == 1 )background-color:#e0e0e0;#end padding-right:50px;">
@@ -63,12 +62,8 @@
       <option value="false" #if( $dataValue.value == "false" ) selected="selected" #end>$i18n.getString( "no" )</option>
     </select>
     #else
-        #if ( $calculated )
-            <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" disabled="disabled" onkeyup="return keyPress(event,this)" class="entryField" tabindex="$tabIndex">
-        #else    
-            <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue") ) onchange="saveVal(${dataElement.id},${optionCombo.id})" ondblclick="viewHist(${dataElement.id},${optionCombo.id})" #else disabled="disabled"#end onkeyup="return keyPress(event,this)" class="entryField #if( $minMaxError ) minmax#end" tabindex="$tabIndex" #if( $locked )disabled="disabled"#end>
-        #end
-    #end    
+    <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue") ) onchange="saveVal(${dataElement.id},${optionCombo.id})" ondblclick="viewHist(${dataElement.id},${optionCombo.id})" #else disabled="disabled"#end onkeyup="return keyPress(event,this)" class="entryField #if( $minMaxError ) minmax#end" tabindex="$tabIndex" #if( $locked )disabled="disabled"#end>
+    #end
     </td>
     #set( $tabIndex = $tabIndex + 1 )
     #end

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm	2011-03-20 19:16:57 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm	2011-03-20 21:45:37 +0000
@@ -52,8 +52,6 @@
       #else
       #set( $mark = 1 )
       #end
-      #set( $calculated = false )
-      #set( $calculated = ( $calculatedDataElements.contains( $dataElement ) ) )
       #set( $count = $count + 1 )
       <tr>
         <td  style="#if( $mark == 1 )background-color:#e0e0e0;#end padding-right:50px;">
@@ -83,11 +81,7 @@
           <option value="false" #if( $dataValue.value == "false" ) selected="selected" #end>$i18n.getString( "no" )</option>
         </select>
         #else
-            #if ( $calculated )
-                <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" disabled="disabled" onkeyup="return keyPress(event,this)" class="entryField" tabindex="$tabIndex">
-            #else
-                <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue") ) onchange="saveVal(${dataElement.id},${optionCombo.id})" ondblclick="viewHist(${dataElement.id},${optionCombo.id})" #else disabled="disabled"#end onkeyup="return keyPress(event,this)" class="entryField #if( $minMaxError ) minmax#elseif( $locked || $greyedField ) grey#end" tabindex="$tabIndex" #if( $locked || $greyedField )disabled="disabled"#end>
-            #end                
+        <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue") ) onchange="saveVal(${dataElement.id},${optionCombo.id})" ondblclick="viewHist(${dataElement.id},${optionCombo.id})" #else disabled="disabled"#end onkeyup="return keyPress(event,this)" class="entryField #if( $minMaxError ) minmax#elseif( $locked || $greyedField ) grey#end" tabindex="$tabIndex" #if( $locked || $greyedField )disabled="disabled"#end>
         #end
       </td>
       #set( $tabIndex = $tabIndex + 1 )