dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #08651
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2121: Compacted dataentryform html
------------------------------------------------------------
revno: 2121
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2010-11-20 13:29:17 +0100
message:
Compacted dataentryform html
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
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css
--
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-20 12:11:30 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/defaultForm.vm 2010-11-20 12:29:17 +0000
@@ -1,4 +1,3 @@
-
<input type="hidden" value="$organisationUnit.id" id="organisationUnitId"/>
#set( $tabIndex = 1 )
@@ -50,19 +49,13 @@
$encoder.htmlEncode( $dataElement.name )
#end
</span>
- </td>
-
- <td style="display:none">
- <span id="value[$dataElement.id].type" style="display:none">$dataElement.getDetailedNumberType()</span>
- </td>
-
+ </td>
#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" )
-
<td>
#if( $dataElement.type == "bool" )
<span id="value[option$optionCombo.id].name" style="display:none">$optionCombo.name</span>
@@ -99,12 +92,7 @@
#set( $minMaxError = true )
#end
#end
-
- <span id="value[option$optionCombo.id].name" style="display:none">$optionCombo.name</span>
- <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>
-
+ <span id="value[$dataElement.id].type" class="hidden">$dataElement.getDetailedNumberType()</span><span id="value[option$optionCombo.id].name" class="hidden">$optionCombo.name</span><span id="value[$dataElement.id].name" class="hidden">$encoder.htmlEncode( $dataElement.shortName )</span><div id="value[$dataElement.id:$optionCombo.id].min" class="hidden">$!minMax.min</div><div id="value[$dataElement.id:$optionCombo.id].max" class="hidden">$!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")
=== 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-20 12:11:30 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm 2010-11-20 12:29:17 +0000
@@ -1,6 +1,4 @@
-
<input type="hidden" value="$organisationUnit.id" id="organisationUnitId"/>
-
#set( $marker = 0 )
#set( $tabIndex = 1 )
@@ -69,11 +67,6 @@
#end
</span>
</td>
-
- <td style="display:none">
- <span id="value[$dataElement.id].type" style="display:none">$dataElement.getDetailedNumberType()</span>
- </td>
-
#foreach( $optionCombo in $optionCombos )
#set( $minMax = false )
#set( $minMax = $minMaxMap.get( "$dataElement.id:$optionCombo.id" ) )
@@ -118,12 +111,7 @@
#set( $minMaxError = true )
#end
#end
-
- <span id="value[option$optionCombo.id].name" style="display:none">$optionCombo.name</span>
- <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>
-
+ <span id="value[$dataElement.id].type" class="hidden">$dataElement.getDetailedNumberType()</span><span id="value[option$optionCombo.id].name" class="hidden">$optionCombo.name</span><span id="value[$dataElement.id].name" class="hidden">$encoder.htmlEncode( $dataElement.shortName )</span><div id="value[$dataElement.id:$optionCombo.id].min" class="hidden">$!minMax.min</div><div id="value[$dataElement.id:$optionCombo.id].max" class="hidden">$!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( $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")
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css 2010-11-17 18:26:47 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css 2010-11-20 12:29:17 +0000
@@ -53,3 +53,7 @@
visibility: collapse;
}
}
+
+.hidden {
+ display: none;
+}