dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #08762
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2187: Compacted dataentryscreen markup
------------------------------------------------------------
revno: 2187
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2010-11-26 18:10:45 +0100
message:
Compacted dataentryscreen markup
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-24 20:34:35 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/defaultForm.vm 2010-11-26 17:10:45 +0000
@@ -42,13 +42,7 @@
#set( $calculated = ($calculatedDataElementIds.contains($dataElement.id)) )
<tr>
<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 )">$encoder.htmlEncode( $dataElement.name )</span><span id="value[$dataElement.id].type" class="hidden">$dataElement.getDetailedNumberType()</span>
</td>
#foreach( $optionCombo in $optionCombos )
#set( $minMax = false )
@@ -62,7 +56,7 @@
#set( $minMaxError = true )
#end
#end
- <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>
+ <span id="value[option$optionCombo.id].name" class="hidden">$optionCombo.name</span><span id="value[$dataElement.id:$optionCombo.id].min" class="hidden">$!minMax.min</span><span id="value[$dataElement.id:$optionCombo.id].max" class="hidden">$!minMax.max</span>
<td>
#if( $dataElement.type == "bool" )
<span id="value[option$optionCombo.id].name" style="display:none">$optionCombo.name</span>
@@ -87,10 +81,10 @@
#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%; text-align:center; #if( $minMaxError )background-color:#ffcccc#end" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end>
+ <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)" class="entryField" #if( $minMaxError )style="background-color:#ffcccc"#end tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end>
#end
#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%; text-align:center; #if( $minMaxError )background-color:#ffcccc#end" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end>
+ <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)" class="entryField" #if( $minMaxError )style="background-color:#ffcccc"#end tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end>
#end
</td>
#set( $tabIndex = $tabIndex + 1 )
=== 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-24 20:34:35 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm 2010-11-26 17:10:45 +0000
@@ -59,13 +59,7 @@
#set( $calculated = ($calculatedDataElementIds.contains($dataElement.id)) )
<tr>
<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 )">$encoder.htmlEncode( $dataElement.name )</span><span id="value[$dataElement.id].type" class="hidden">$dataElement.getDetailedNumberType()</span>
</td>
#foreach( $optionCombo in $optionCombos )
#set( $minMax = false )
@@ -81,7 +75,7 @@
#set( $minMaxError = true )
#end
#end
- <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>
+ <span id="value[option$optionCombo.id].name" class="hidden">$optionCombo.name</span><span id="value[$dataElement.id:$optionCombo.id].min" class="hidden">$!minMax.min</span><span id="value[$dataElement.id:$optionCombo.id].max" class="hidden">$!minMax.max</span>
<td>
#if( $dataElement.type == "bool" )
<span id="value[option$optionCombo.id].name" style="display:none">$optionCombo.name</span>
@@ -107,10 +101,10 @@
#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" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end #if( $greyedField )class="gray" disabled="disabled"#end>
+ <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)" class="entryField" #if( $minMaxError )style="background-color:#ffcccc"#end tabindex="$tabIndex" #if( $locked )disabled="disabled"#end #if( $greyedField )class="gray" disabled="disabled"#end>
#end
#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%; text-align:center; #if( $minMaxError )background-color:#ffcccc;#end" tabindex="$tabIndex" #if( $locked ) disabled="disabled"#end #if( $greyedField )class="gray" disabled="disabled" #end>
+ <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)" class="entryField" #if( $minMaxError )style="background-color:#ffcccc"#end tabindex="$tabIndex" #if( $locked )disabled="disabled"#end #if( $greyedField )class="gray" disabled="disabled"#end>
#end
</td>
#set( $tabIndex = $tabIndex + 1 )
=== 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-21 16:38:52 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/style/dhis-web-dataentry.css 2010-11-26 17:10:45 +0000
@@ -31,6 +31,12 @@
background-color: #000000;
}
+.entryField
+{
+ width: 100%;
+ text-align: center;
+}
+
@media print
{
#mainHeader, #topMenu, #leftBar, #currentSelection, #actions, input[type=button]