dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20281
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9191: Add css for fields with type as optionset and date in data entry form; Error display into active ...
------------------------------------------------------------
revno: 9191
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-12-06 20:33:33 +0700
message:
Add css for fields with type as optionset and date in data entry form; Error display into active program div when to enroll a person into program without stage.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultDataEntryForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramEnrollment.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sectionDataEntryForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/validationResult.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-caseentry/src/main/webapp/dhis-web-caseentry/defaultDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultDataEntryForm.vm 2012-10-12 02:52:00 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultDataEntryForm.vm 2012-12-06 13:33:33 +0000
@@ -54,12 +54,12 @@
#elseif( $programStageDataElement.dataElement.type == "trueOnly" )
<input name="entryfield" type="checkbox" data="{compulsory: $programStageDataElement.compulsory, deType:'$programStageDataElement.dataElement.getType()'}" id="$id" name="entryfield" #if($patientDataValue.value=="true") checked #end onchange="saveVal( $programStageDataElement.dataElement.id )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" >
#elseif( $programStageDataElement.dataElement.type == "date" )
- <input name="entryfield" type="text" data="{compulsory: $programStageDataElement.compulsory }" id="$id" name="entryfield" value="$!encoder.htmlEncode( $patientDataValue.value )" onchange="saveVal( $programStageDataElement.dataElement.id )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" >
+ <input name="entryfield" type="text" data="{compulsory: $programStageDataElement.compulsory }" id="$id" name="entryfield" value="$!encoder.htmlEncode( $patientDataValue.value )" onchange="saveVal( $programStageDataElement.dataElement.id )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" class="date-field" />
<script type="text/javascript">
datePicker($programStageDataElement.programStage.id + '-' + $programStageDataElement.dataElement.id + '-val', false);
</script>
#elseif($hasOptionSet=='true')
- <input name="entryfield" options='$hasOptionSet' #if($hasOptionSet == 'true') #end dataElementId='$programStageDataElement.dataElement.id' data="{compulsory: $programStageDataElement.compulsory, deName:'$programStageDataElement.dataElement.name', deType:'$programStageDataElement.dataElement.getDetailedNumberType()' }" id="$id" type="text" value="$!encoder.htmlEncode( $patientDataValue.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" />
+ <input name="entryfield" options='$hasOptionSet' #if($hasOptionSet == 'true') #end dataElementId='$programStageDataElement.dataElement.id' data="{compulsory: $programStageDataElement.compulsory, deName:'$programStageDataElement.dataElement.name', deType:'$programStageDataElement.dataElement.getDetailedNumberType()' }" id="$id" type="text" value="$!encoder.htmlEncode( $patientDataValue.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" class="optionset" />
#else
<input name="entryfield" dataElementId='$programStageDataElement.dataElement.id'
data="{compulsory: $programStageDataElement.compulsory, deName:'$programStageDataElement.dataElement.name', deType:'$programStageDataElement.dataElement.getDetailedNumberType()' }" onkeypress="return keyPress(event, this)" tabindex="$tabIndex"
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2012-12-05 16:46:25 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2012-12-06 13:33:33 +0000
@@ -1317,7 +1317,10 @@
var dueDate = json.dueDate;
var type = jQuery('#enrollmentDiv [id=programId] option:selected').attr('programType');
- var activedRow = "<tr id='tr1_" + programInstanceId
+ var activedRow = "";
+ if(programStageInstanceId != '')
+ {
+ activedRow = "<tr id='tr1_" + programInstanceId
+ "' type='" + type +"'"
+ " programStageInstanceId='" + programStageInstanceId + "'>"
+ " <td id='td_" + programInstanceId + "'>"
@@ -1326,10 +1329,21 @@
+ programName + " (" + enrollmentDate + ")</span></a></td>"
+ "</tr>";
- activedRow += "<tr id='tr2_" + programInstanceId +"'"+
- + " onclick='javascript:loadActiveProgramStageRecords(" + programInstanceId + "," + programStageInstanceId + ")' style='cursor:pointer;'>"
- + "<td colspan='2'><a>• " + programStageName + " (" + dueDate + ")</a></td></tr>";
-
+ activedRow += "<tr id='tr2_" + programInstanceId +"'"+
+ + " onclick='javascript:loadActiveProgramStageRecords(" + programInstanceId + "," + programStageInstanceId + ")' style='cursor:pointer;'>"
+ + "<td colspan='2'><a>• " + programStageName + " (" + dueDate + ")</a></td></tr>";
+ }
+ else
+ {
+ activedRow = "<tr id='tr1_" + programInstanceId
+ + "' type='" + type +"'>"
+ + " <td id='td_" + programInstanceId + "'>"
+ + " <a href='javascript:loadActiveProgramStageRecords(" + programInstanceId + ")'>"
+ + "<span id='infor_" + programInstanceId + "' class='selected bold'>"
+ + programName + " (" + enrollmentDate + ")</span></a></td>"
+ + "</tr>";
+ }
+
jQuery('#activeTB' ).prepend(activedRow);
jQuery('#enrollmentDiv').dialog("close");
saveIdentifierAndAttribute( patientId, programId,'identifierAndAttributeDiv' );
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramEnrollment.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramEnrollment.vm 2012-10-22 04:40:11 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonProgramEnrollment.vm 2012-12-06 13:33:33 +0000
@@ -1,7 +1,7 @@
{
"programInstanceId": "${programInstance.id}",
- "activeProgramStageInstanceId": "${activeProgramStageInstance.id}",
- "programStageId": "${activeProgramStageInstance.programStage.id}",
+ "activeProgramStageInstanceId": "$!activeProgramStageInstance.id",
+ "programStageId": "$!activeProgramStageInstance.programStage.id",
"activeProgramStageName": "$!encoder.jsonEncode( ${activeProgramStageInstance.programStage.name} )",
"dueDate": "$!format.formatDate( ${activeProgramStageInstance.dueDate} )"
}
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm 2012-11-23 03:02:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm 2012-12-06 13:33:33 +0000
@@ -114,7 +114,7 @@
#if($programInstance.program.type==1)
<tr>
<td id='tr2_$programInstance.id' onclick='javascript:loadActiveProgramStageRecords("$programInstance.id", "$programStageInstance.id")' style='cursor:pointer;'>
- <a>>> $programStageInstance.programStage.name ($format.formatDate($programStageInstance.dueDate))</a>
+ <a>• $programStageInstance.programStage.name ($format.formatDate($programStageInstance.dueDate))</a>
</td>
</tr>
#end
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sectionDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sectionDataEntryForm.vm 2012-10-18 03:43:05 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sectionDataEntryForm.vm 2012-12-06 13:33:33 +0000
@@ -64,12 +64,12 @@
#elseif( $programStageDataElement.dataElement.type == "trueOnly" )
<input name="entryfield" type="checkbox" data="{compulsory: $programStageDataElement.compulsory, deType:'$programStageDataElement.dataElement.getType()'}" id="$id" name="entryfield" #if($patientDataValue.value=="true") checked #end onchange="saveVal( $programStageDataElement.dataElement.id )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" >
#elseif( $programStageDataElement.dataElement.type == "date" )
- <input name="entryfield" type="text" data="{compulsory: $programStageDataElement.compulsory }" id="$id" name="entryfield" value="$!encoder.htmlEncode( $patientDataValue.value )" onchange="saveVal( $programStageDataElement.dataElement.id )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" >
+ <input name="entryfield" type="text" data="{compulsory: $programStageDataElement.compulsory }" id="$id" name="entryfield" value="$!encoder.htmlEncode( $patientDataValue.value )" onchange="saveVal( $programStageDataElement.dataElement.id )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" class="date-field" >
<script type="text/javascript">
datePicker($programStageDataElement.programStage.id + '-' + $programStageDataElement.dataElement.id + '-val', false);
</script>
#elseif($hasOptionSet=='true')
- <input name="entryfield" options='$hasOptionSet' #if($hasOptionSet == 'true') #end dataElementId='$programStageDataElement.dataElement.id' data="{compulsory: $programStageDataElement.compulsory, deName:'$programStageDataElement.dataElement.name', deType:'$programStageDataElement.dataElement.getDetailedNumberType()' }" id="$id" type="text" value="$!encoder.htmlEncode( $patientDataValue.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex"/>
+ <input name="entryfield" options='$hasOptionSet' #if($hasOptionSet == 'true') #end dataElementId='$programStageDataElement.dataElement.id' data="{compulsory: $programStageDataElement.compulsory, deName:'$programStageDataElement.dataElement.name', deType:'$programStageDataElement.dataElement.getDetailedNumberType()' }" id="$id" type="text" value="$!encoder.htmlEncode( $patientDataValue.value )" onkeypress="return keyPress(event, this)" tabindex="$tabIndex" class="optionset" />
#else
<input name="entryfield" dataElementId='$programStageDataElement.dataElement.id'
data="{compulsory: $programStageDataElement.compulsory, deName:'$programStageDataElement.dataElement.name', deType:'$programStageDataElement.dataElement.getDetailedNumberType()' }" onkeypress="return keyPress(event, this)" tabindex="$tabIndex"
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css 2012-11-26 03:11:12 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css 2012-12-06 13:33:33 +0000
@@ -182,7 +182,13 @@
input.optionset[type="text"]
{
- width:222px;
+ width:235px;
+}
+
+
+input.date-field[type="text"]
+{
+ width:235px;
}
div.provided-elsewhere
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/validationResult.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/validationResult.vm 2012-12-05 16:33:38 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/validationResult.vm 2012-12-06 13:33:33 +0000
@@ -26,14 +26,12 @@
</thead>
#set( $mark = false )
<tbody>
- #set($validate = "")
#foreach( $result in $programValidationResults )
<tr #alternate( $mark )>
#set ( $id = $result.programValidation.id )
#set ( $leftFormula = $leftsideFormulaMap.get( $id ) )
#set ( $rightFormula = $rightsideFormulaMap.get( $id ) )
<tr>
- <input type="hidden" name='validateFormulas' value="$result.programValidation.leftSide $result.programValidation.rightSide" name="$!encoder.htmlEncode($result.programValidation.name)">
#set($leftsideValue = "NULL")
#if($result.leftsideValue) #set($leftsideValue = $result.leftsideValue) #end
#set($rightsideValue = "NULL")