← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1216: Big fix for proper ordering of using tab in multidimensional dataentry

 

------------------------------------------------------------
revno: 1216
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: trunk
timestamp: Fri 2009-12-11 13:18:35 +0100
message:
  Big fix for proper ordering of using tab in multidimensional dataentry
modified:
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/multidimensional/form.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/multidimensional/form.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/multidimensional/form.vm	2009-12-11 02:18:27 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/multidimensional/form.vm	2009-12-11 12:18:35 +0000
@@ -38,6 +38,8 @@
 
     #else
         
+        #set( $tabIndex = 1 )
+        
         #foreach( $categoryCombo in $orderedCategoryCombos )
         	
         	<div style="border:1px solid #808080;">            
@@ -63,8 +65,7 @@
                     #end
     
                     #set( $count = 0 )
-                    #set( $mark = 0 )
-                    #set( $tabIndex = 1 )
+                    #set( $mark = 0 )                    
                     
                     #set( $dataElements = $orderedDataElements.get( $categoryCombo )  )
                     #set( $optionCombos = $orderdCategoryOptionCombos.get( $categoryCombo.id )  )
@@ -92,7 +93,8 @@
                                         $encoder.htmlEncode( $dataElement.name )
                                     #end           
                                 </span>
-                            </td>                
+                            </td>         
+                                            
                             #foreach( $optionCombo in $optionCombos )                       
                                 #set( $minMax = false )
                                 #set( $minMax = $minMaxMap.get( "$dataElement.id:$optionCombo.id" ) )
@@ -104,7 +106,7 @@
                                 ##Data Entry
                                 <td>
                                     #if( $dataElement.type == "bool" )
-                                        <span id="value[option$optionCombo.id].name" style="display:none">$optionComboNames.get( $optionCombo.id )</span>
+                                        <span id="value[option$optionCombo.id].name" style="display:none">$optionCombo.name</span>
                                         <select name="entryselect" id="$dataEntryId" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue" )) onchange="saveBoolean($dataElement.id,$optionCombo.id, this )"  #else disabled="disabled" #end style="width:100%" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end>
                                             <option value="">[$i18n.getString( "no_value" )]</option>
                                             <option value="true" #if( $dataValue.value == "true" ) selected="selected" #end>$i18n.getString( "yes" )</option>
@@ -151,13 +153,13 @@
                                         <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue") ) 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>
                         <tr style="display:none">
                             ##type      
                             <td>$dataElementTypeMap.get( $dataElement.type )<span id="value[$dataElement.id].type" style="display:none">$dataElement.type</span></td>       
-                        </tr>
-                        #set( $tabIndex = $tabIndex + 1 )
+                        </tr>                        
                     #end
                 </table>                
             </div>