dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #07509
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2146: merge with 2.0.5 branch
------------------------------------------------------------
revno: 2146
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: trunk
timestamp: Fri 2010-09-17 09:21:45 +0200
message:
merge with 2.0.5 branch
modified:
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/section/dataElement.vm
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/form.vm
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/multiDimensionalDataElement.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 2010-07-21 10:31:21 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/multidimensional/form.vm 2010-09-17 07:21:45 +0000
@@ -43,7 +43,7 @@
#foreach( $categoryCombo in $orderedCategoryCombos )
<div style="border:1px solid #808080;width:98%">
- <table class="listTable">
+ <table class="mainPageTable" cellpadding="0">
#set( $colCount = $numberOfTotalColumns.get( $categoryCombo.id ) )
#set( $categories = $orderedCategories.get( $categoryCombo.id ) )
#set( $optionsMap = $orderedOptionsMap.get( $categoryCombo.id ) )
@@ -58,7 +58,8 @@
#set( $cols = $colRepeat.get( $category.id ) )
#foreach( $col in $cols )
#foreach( $categoryOption in $categoryOptions )
- <th colspan="$colCount"> <div align="center"> $categoryOption.name</div> </th>
+ #set( $optionName = $categoryOption.name )
+ <th colspan="$colCount"> <div align="center"> #if( $optionName != "default" ) $optionName #end </div> </th>
#end
#end
</tr>
@@ -69,7 +70,14 @@
#set( $dataElements = $orderedDataElements.get( $categoryCombo ) )
#set( $optionCombos = $orderdCategoryOptionCombos.get( $categoryCombo.id ) )
+ #set( $mark = 0 )
#foreach( $dataElement in $dataElements )
+ #if( $mark == 1 )
+ #set( $mark = 0 )
+ #else
+ #set( $mark = 1 )
+ #end
+
#set( $count = $count + 1 )
#set( $calculatedValue = false )
#set( $calculatedValue = $calculatedValueMap.get( $dataElement ) )
@@ -78,7 +86,7 @@
#set( $calculated = ($calculatedDataElementIds.contains($dataElement.id)) )
<tr>
##data element name
- <td>
+ <td #if( $mark == 1 ) style="background-color:#dddddd" #end>
<span id="value[$dataElement.id].name" title="$!encoder.htmlEncode( $dataElement.description )">
#if( $useShortName )
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/dataElement.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/dataElement.vm 2010-08-19 07:52:44 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/dataElement.vm 2010-09-17 07:21:45 +0000
@@ -42,12 +42,12 @@
#set( $minMax = $minMaxMap.get( "$dataElement.id:$defaultOptionComboId" ) )
#set( $calculated = false )
#set( $calculated = ($calculatedDataElementIds.contains($dataElement.id)) )
- <tr #if( $mark == 0 ) style="background-color:#dddddd" #end>
+ <tr>
##count
<td style="text-align:right">$count</td>
##data element name
- <td>
+ <td #if( $mark == 0 ) style="background-color:#dddddd" #end>
<span id="value[$dataElement.id].name" title="$!encoder.htmlEncode( $dataElement.description )">
#if( $dataElement.type == "int" && $auth.hasAccess( "dhis-web-dataentry", "viewHistory" ) )
<a href="javascript:viewHistory( $dataElement.id )">
@@ -76,20 +76,20 @@
##entry
<td>
- #set( $greyedField = "false" )
+ #set( $greyedField = false )
#set( $greyedField = $greyedFields.get( "$dataElement.id:$defaultOptionComboId" ) )
#set( $dataEntryId = "value[$dataElement.id].value:value[$defaultOptionComboId].value" )
##Data Entry
#if( $dataElement.type == "bool" )
- <select name="entryselect" id="$dataEntryId" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue" )) onchange="saveBoolean( $dataElement.id, $defaultOptionComboId, this )" #else disabled="disabled" #end style="width:100%" tabindex="$tabIndex" #if( $greyedField == "true" ) disabled="disabled"#end>
+ <select name="entryselect" id="$dataEntryId" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue" )) onchange="saveBoolean( $dataElement.id, $defaultOptionComboId, this )" #else disabled="disabled" #end style="width:100% #if( $greyedField ) ;background-color:#000000 #end " tabindex="$tabIndex" #if( $greyedField ) disabled="disabled" #end>
<option value="">[$i18n.getString( "no_value" )]</option>
<option value="true" #if( $datavalue && $dataValue.value == "true" ) selected="selected" #end>$i18n.getString( "yes" )</option>
<option value="false" #if( $datavalue && $dataValue.value == "false" ) selected="selected" #end>$i18n.getString( "no" )</option>
</select>
#elseif( $dataElement.type == "date" )
- <input name="entryfield" id="value[$dataElement.id].date" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue") ) onchange="saveDate( $dataElement.id, '$encoder.jsEncode( $dataElement.name )' )" #else disabled="disabled" #end>
+ <input name="entryfield" id="value[$dataElement.id].date" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue") ) onchange="saveDate( $dataElement.id, '$encoder.jsEncode( $dataElement.name )' )" #else disabled="disabled" #end #if( $greyedField ) disabled="disabled" #end>
<img src="../images/calendar_icon.gif" width="16" height="16" id="getValueDate" style="cursor: pointer;" title="$i18n.getString("date_selector")" onmouseover="this.style.background='orange';" onmouseout="this.style.background=''" alt="$i18n.getString( "value_date" )">
<script type="text/javascript">
Calendar.setup({
@@ -108,7 +108,7 @@
#end
#end
#if($coun>0)
- <select name="entryselect" id="$dataEntryId" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue" )) onchange="saveBoolean( $dataElement.id, $defaultOptionComboId, this )" #else disabled="disabled" #end style="width:100%" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end #if( $greyedField == "true" ) disabled="disabled"#end>
+ <select name="entryselect" id="$dataEntryId" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue" )) onchange="saveBoolean( $dataElement.id, $defaultOptionComboId, this )" #else disabled="disabled" #end style="width:100% style="width:100% #if( $greyedField ) ;background-color:#000000 #end " tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end #if( $greyedField ) disabled="disabled" #end>
<option value="">[$i18n.getString( "please_select" )] </option>
#foreach($customValue in $customValues)
#if($dataElement.id == $customValue.dataElement.id && $dataValue.optionCombo.id == $customValue.optionCombo.id)
@@ -118,7 +118,7 @@
</select>
#else
#set( $zeroValueSaveMode = true )
- <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue") ) onchange="saveValue( $dataElement.id, $defaultOptionComboId, '$encoder.jsEncode( $dataElement.name )', $zeroValueSaveMode )" ondblclick="viewHistory( $dataElement.id, $defaultOptionComboId, 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 #if( $greyedField == "true" ) disabled="disabled"#end>
+ <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue") ) onchange="saveValue( $dataElement.id, $defaultOptionComboId, '$encoder.jsEncode( $dataElement.name )', $zeroValueSaveMode )" ondblclick="viewHistory( $dataElement.id, $defaultOptionComboId, true )" #else disabled="disabled" #end onkeypress="return keyPress(event, this)" style="width:100% #if( $minMaxError ) ;background-color:#ffcccc #end style="width:100% #if( $greyedField ) ;background-color:#000000 #end #if( $dataElement.type == "int" ) ;text-align:center #end" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end #if( $greyedField ) disabled="disabled" #end>
#end
#end
@@ -129,10 +129,10 @@
#end
#end
#if ( $calculated && $dataElement.type != "string")
- <input name="entryfield" id="$dataEntryId" class="calculated" type="text" value="#if($dataValue) $!encoder.htmlEncode( $dataValue.value ) #elseif( $calculatedValue )$!encoder.htmlEncode( $calculatedValue ) #end" disabled="disabled" onkeypress="return keyPress(event, this)" style="width:100% #if( $minMaxError ) ;background-color:#ffcccc #end #if( $dataElement.type == "int" ) ;text-align:center #end" #if( $greyedField == "true" ) disabled="disabled"#end>
+ <input name="entryfield" id="$dataEntryId" class="calculated" type="text" value="#if($dataValue) $!encoder.htmlEncode( $dataValue.value ) #elseif( $calculatedValue )$!encoder.htmlEncode( $calculatedValue ) #end" disabled="disabled" onkeypress="return keyPress(event, this)" style="width:100% #if( $minMaxError ) ;background-color:#ffcccc #end #if( $greyedField ) ;background-color:#000000 #end #if( $dataElement.type == "int" ) ;text-align:center #end" #if( $greyedField ) disabled="disabled" #end>
#else
#if ( $dataElement.type != "string")
- <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue") ) onchange="saveValue( $dataElement.id, $defaultOptionComboId, '$encoder.jsEncode( $dataElement.name )' )" #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( $greyedField == "true" ) disabled="disabled"#end>
+ <input name="entryfield" id="$dataEntryId" type="text" value="$!encoder.htmlEncode( $dataValue.value )" #if( $auth.hasAccess( "dhis-web-dataentry", "saveValue") ) onchange="saveValue( $dataElement.id, $defaultOptionComboId, '$encoder.jsEncode( $dataElement.name )' )" #else disabled="disabled" #end onkeypress="return keyPress(event, this)" style="width:100% #if( $greyedField ) ;background-color:#000000 #end #if( $minMaxError ) ;background-color:#ffcccc #end #if( $dataElement.type == "int" ) ;text-align:center #end" tabindex="$tabIndex" #if( $greyedField ) disabled="disabled" #end>
#end
#end
#end
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/form.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/form.vm 2010-09-01 16:55:23 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/form.vm 2010-09-17 07:21:45 +0000
@@ -1,3 +1,4 @@
+
#parse( "/dhis-web-dataentry/select.vm" )
#set( $marker = 0 )
@@ -13,11 +14,11 @@
#set( $marker = 1 )
#end
- <div style="border:thin solid; #if( $marker == 0 ) background-color:#ebf0f6 #end">
+ <div style="border:thin solid; ">
<table class="mainPageTable">
<tr>
- <td onclick="openCloseSection( $section.id )" onmouseover="style.backgroundColor='#baffbc';" onmouseout="#if( $marker == 0 ) style.backgroundColor='#ebf0f6' #else style.backgroundColor='#FFFFFF' #end">
- <div id="$section.id:name" style="text-align:center"><h3>$encoder.htmlEncode( $section.name )</h3></div>
+ <td onclick="openCloseSection( $section.id )" onmouseover="style.backgroundColor='#ebf0f6';" onmouseout="style.backgroundColor='#FFFFFF'">
+ <div id="$section.id:title" style="text-align:center"><h3>$encoder.htmlEncode( $section.title )</h3></div>
</td>
</tr>
<tr>
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/multiDimensionalDataElement.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/multiDimensionalDataElement.vm 2010-08-19 07:52:44 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/section/multiDimensionalDataElement.vm 2010-09-17 07:21:45 +0000
@@ -16,7 +16,8 @@
#set( $cols = $colRepeat.get( $category.id ) )
#foreach( $col in $cols )
#foreach( $categoryOption in $categoryOptions )
- <th colspan="$colCount"> <div align="center"> $categoryOption.name </div> </th>
+ #set( $optionName = $categoryOption.name )
+ <th colspan="$colCount"> <div align="center"> #if( $optionName != "default" ) $optionName #end </div> </th>
#end
#end
</tr>
@@ -39,9 +40,9 @@
#set( $calculated = false )
#set( $calculated = ($calculatedDataElementIds.contains($dataElement.id)) )
- <tr #if( $mark == 1 ) style="background-color:#dddddd" #end>
+ <tr>
##data element name
- <td>
+ <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 )
@@ -69,12 +70,12 @@
##Data Entry
<td>
- #set( $greyedField = "false" )
+ #set( $greyedField = false )
#set( $greyedField = $greyedFields.get( "$dataElement.id:$optionCombo.id" ) )
#if( $dataElement.type == "bool" )
<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 #if( $greyedField == "true" ) disabled="disabled"#end>
+ <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% #if( $greyedField ) ;background-color:#000000 #end " tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end #if( $greyedField ) disabled="disabled" #end>
<option value="">[$i18n.getString( "no_value" )]</option>
<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>
@@ -88,7 +89,7 @@
#end
#end
#if($coun>0)
- <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 #if( $greyedField == "true" ) disabled="disabled"#end>
+ <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% #if( $greyedField ) ;background-color:#000000 #end " tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end #if( $greyedField ) disabled="disabled" #end>
<option value="">[$i18n.getString( "please_select" )] </option>
#foreach($customValue in $customValues)
#if($dataElement.id == $customValue.dataElement.id && $optionCombo.id == $customValue.optionCombo.id)
@@ -97,7 +98,7 @@
#end
</select>
#else
- <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 #if( $greyedField == "true" ) disabled="disabled"#end>
+ <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( $greyedField ) ;background-color:#000000 #end #if( $dataElement.type == "int" ) ;text-align:center #end" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end #if( $greyedField ) disabled="disabled" #end>
#end
#end
#end
@@ -115,9 +116,9 @@
<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", "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 #if( $greyedField == "true" ) disabled="disabled"#end>
+ <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( $greyedField ) ;background-color:#000000 #end #if( $dataElement.type == "int" ) ;text-align:center #end" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end #if( $greyedField ) 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", "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 #if( $greyedField == "true" ) disabled="disabled"#end>
+ <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( $greyedField ) ;background-color:#000000 #end #if( $dataElement.type == "int" ) ;text-align:center #end" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end #if( $greyedField ) disabled="disabled" #end>
#end
</td>
#set( $tabIndex = $tabIndex + 1 )