← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2119: Removed pointless velocity clause

 

------------------------------------------------------------
revno: 2119
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2010-11-20 13:11:30 +0100
message:
  Removed pointless velocity clause
modified:
  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/webapp/dhis-web-dataentry/defaultForm.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/defaultForm.vm	2010-11-17 18:26:47 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/defaultForm.vm	2010-11-20 12:11:30 +0000
@@ -41,8 +41,7 @@
   #set( $calculatedValue = $calculatedValueMap.get( $dataElement ) )                        
   #set( $calculated = false )
   #set( $calculated = ($calculatedDataElementIds.contains($dataElement.id)) )
-  <tr>            
-    ## Data element name
+  <tr>
     <td #if( $mark == 1 ) style="background-color:#dddddd" #end>
       <span id="value[$dataElement.id].name" title="$!encoder.htmlEncode( $dataElement.description )">
       #if( $useShortName )
@@ -52,21 +51,18 @@
       #end           
       </span>
     </td>    
-                    
-    ## Type      
+
     <td style="display:none">
-      $dataElementTypeMap.get( $dataElement.type )
       <span id="value[$dataElement.id].type" style="display:none">$dataElement.getDetailedNumberType()</span>
     </td>                                  
 
-    #foreach( $optionCombo in $optionCombos )                       
+    #foreach( $optionCombo in $optionCombos )
     #set( $minMax = false )
     #set( $minMax = $minMaxMap.get( "$dataElement.id:$optionCombo.id" ) )
     #set( $dataValue = false )
     #set( $dataValue = $dataValueMap.get( "$dataElement.id:$optionCombo.id" ) )
     #set( $dataEntryId = "value[$dataElement.id].value:value[$optionCombo.id].value" )
-    
-    ## Data entry
+
     <td>
       #if( $dataElement.type == "bool" )
       <span id="value[option$optionCombo.id].name" style="display:none">$optionCombo.name</span>
@@ -75,7 +71,6 @@
         <option value="true" #if( $dataValue.value == "true" ) selected="selected" #end>$i18n.getString( "yes" )</option>
         <option value="false" #if( $dataValue.value == "false" ) selected="selected" #end>$i18n.getString( "no" )</option>
       </select>
-      
       #else
       #if( $dataElement.type == "string" )
       #set( $coun = 0 )
@@ -92,13 +87,12 @@
         #end
       #end
       </select>
-
       #else
       <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveMultiDimensionalValue") ) onchange="saveValue( $dataElement.id, $optionCombo.id, '$encoder.jsEncode( $dataElement.name )', $zeroValueSaveMode )" ondblclick="viewHistory( $dataElement.id, $optionCombo.id, true  )" #else disabled="disabled" #end onkeypress="return keyPress(event, this)" style="width:100% #if( $minMaxError ) ;background-color:#ffcccc #end #if( $dataElement.type == "int" ) ;text-align:center #end" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end>                                
       #end
       #end
       #end
-      
+
       #set( $minMaxError = false )
       #if( $dataElement.type == "int" && $dataValue && $minMax )
         #if( $integer.parseInt( $dataValue.value ) < $minMax.min || $integer.parseInt( $dataValue.value ) > $minMax.max )
@@ -110,14 +104,13 @@
       <span id="value[$dataElement.id].name" style="display:none">$encoder.htmlEncode( $dataElement.shortName )</span>
       <div id="value[$dataElement.id:$optionCombo.id].min" style="display:none">$!minMax.min</div>
       <div id="value[$dataElement.id:$optionCombo.id].max" style="display:none">$!minMax.max</div>
-                    
+
       #if( $dataElement.aggregationOperator == "sum" && $dataElement.type != "string")
       <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveMultiDimensionalValue") ) onchange="saveValue( $dataElement.id, $optionCombo.id, '$encoder.jsEncode( $dataElement.name )', $zeroValueSaveMode )" ondblclick="viewHistory( $dataElement.id, $optionCombo.id, true  )" #else disabled="disabled" #end onkeypress="return keyPress(event, this)" style="width:100% #if( $minMaxError ) ;background-color:#ffcccc #end #if( $dataElement.type == "int" ) ;text-align:center #end" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end>
       #elseif( $dataElement.type != "string")
       <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveMultiDimensionalValue") ) onchange="saveValue( $dataElement.id, $optionCombo.id, '$encoder.jsEncode( $dataElement.name )', $zeroValueSaveMode )" ondblclick="viewHistory( $dataElement.id, $optionCombo.id, true  )" #else disabled="disabled" #end onkeypress="return keyPress(event, this)" style="width:100% #if( $minMaxError ) ;background-color:#ffcccc #end #if( $dataElement.type == "int" ) ;text-align:center #end" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end>
       #end
     </td>
-
     #set( $tabIndex = $tabIndex + 1 )
     #end
   </tr>

=== 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	2010-11-17 18:26:47 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm	2010-11-20 12:11:30 +0000
@@ -60,33 +60,27 @@
       #set( $calculated = false )
       #set( $calculated = ($calculatedDataElementIds.contains($dataElement.id)) )
       <tr>
-      
-        ## Data element name
         <td #if( $mark == 1 ) style="background-color:#dddddd" #end>
-        <span id="value[$dataElement.id].name" title="$!encoder.htmlEncode( $dataElement.description )">
-        #if( $useShortName )
-        $encoder.htmlEncode( $dataElement.shortName )
-        #else
-        $encoder.htmlEncode( $dataElement.name )
-        #end
-        </span>
+          <span id="value[$dataElement.id].name" title="$!encoder.htmlEncode( $dataElement.description )">
+          #if( $useShortName )
+          $encoder.htmlEncode( $dataElement.shortName )
+          #else
+          $encoder.htmlEncode( $dataElement.name )
+          #end
+          </span>
         </td>
-
-        ## Type      
+    
         <td style="display:none">
-        $dataElementTypeMap.get( $dataElement.type )
-        <span id="value[$dataElement.id].type" style="display:none">$dataElement.getDetailedNumberType()</span>
+          <span id="value[$dataElement.id].type" style="display:none">$dataElement.getDetailedNumberType()</span>
         </td>
-                                          
-        #foreach( $optionCombo in $optionCombos )                       
+
+        #foreach( $optionCombo in $optionCombos )
         #set( $minMax = false )
         #set( $minMax = $minMaxMap.get( "$dataElement.id:$optionCombo.id" ) )
         #set( $dataValue = false )
         #set( $dataValue = $dataValueMap.get( "$dataElement.id:$optionCombo.id" ) )
         #set( $dataEntryId = "value[$dataElement.id].value:value[$optionCombo.id].value" )
-
-        ## Data Entry
-        <td>	                
+        <td>
         #set( $greyedField = false )
         #set( $greyedField = $greyedFields.get( "$dataElement.id:$optionCombo.id" ) )
         #if( $dataElement.type == "bool" )
@@ -118,7 +112,6 @@
           #end
         #end
         #end
-        
         #set( $minMaxError = false )
         #if( $dataElement.type == "int" && $dataValue && $minMax )
           #if( $integer.parseInt( $dataValue.value ) < $minMax.min || $integer.parseInt( $dataValue.value ) > $minMax.max )