dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14310
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4821: Minor fix for showing details for program, program-validation, patient-chart.
------------------------------------------------------------
revno: 4821
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-10-04 15:53:41 +0700
message:
Minor fix for showing details for program, program-validation, patient-chart.
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientChart.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programValidation.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientChartList.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programValidationList.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.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-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm 2011-09-28 07:11:18 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonProgram.vm 2011-10-04 08:53:41 +0000
@@ -3,6 +3,9 @@
"id": "$program.id",
"name": "$!encoder.jsEncode( ${program.name} )",
"description": "$!encoder.jsEncode( ${program.description} )",
+ "singleEvent": "$!program.singleEvent",
+ "dateOfEnrollmentDescription": "$!encoder.jsEncode( ${program.dateOfEnrollmentDescription} )",
+ "dateOfIncidentDescription": "$!encoder.jsEncode( ${program.dateOfIncidentDescription} )",
"programStageCount": "${program.programStages.size()}",
"maxDay": "${program.maxDaysAllowedInputData}"
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2011-10-03 07:45:06 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2011-10-04 08:53:41 +0000
@@ -326,7 +326,7 @@
edit_single_program_validation = Edit single program validation
edit_multi_program_validation = Edit multi program validation
program_validation_details = Program Validation Details
-define_program_validation = Define Program Validation
+program_validation_management = Define program validation managenent
create_new_single_validation = Create new single validation
create_new_multi_validation = Create new multi validation
save_success = Save successfully
@@ -343,7 +343,7 @@
aggregation_data_element_in_use = Aggregation data element is in use
add_more_option_to_search = Add more option to search
delete_program_data_entry_confirm = Do you want to delete program data entry ?
-patient_chart_management = neneficiary chart management
+patient_chart_management = Bneneficiary chart management
create_new_patient_chart = Create new beneficiary Chart
edit_patient_chart = Edit beneficiary chart
chart_type = Chart type
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientChart.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientChart.js 2011-09-06 02:47:21 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientChart.js 2011-10-04 08:53:41 +0000
@@ -5,10 +5,28 @@
id:patientChartId
}, function(json){
setInnerHTML( 'idField', json.id );
- setInnerHTML( 'titleField', json.title );
- setInnerHTML( 'typeField', json.type );
- setInnerHTML( 'sizeField', json.size );
- setInnerHTML( 'regressionField', json.regression );
+ setInnerHTML( 'titleField', json.title );
+
+ var typeMap = {
+ 'bar' : i18n_bar_chart,
+ 'bar3d' : i18n_bar3d_chart,
+ 'line' : i18n_line_chart,
+ 'line3d' : i18n_line3d_chart
+ };
+ var type = json.type;
+ setInnerHTML( 'typeField', typeMap[type] );
+
+ var sizeMap = {
+ 'normal' : i18n_normal,
+ 'wide' : i18n_wide,
+ 'tall' : i18n_tall
+ };
+ var size = json.size;
+ setInnerHTML( 'sizeField', sizeMap[size] );
+
+ var regression = ( json.regression == 'true') ? i18n_yes : i18n_no;
+
+ setInnerHTML( 'regressionField', regression );
setInnerHTML( 'dataElementField', json.dataElement );
showDetails();
});
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js 2011-10-04 02:34:03 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/program.js 2011-10-04 08:53:41 +0000
@@ -9,7 +9,12 @@
}, function(json){
setInnerHTML( 'idField', json.program.id );
setInnerHTML( 'nameField', json.program.name );
- setInnerHTML( 'descriptionField', json.program.description );
+ setInnerHTML( 'descriptionField', json.program.description );
+ var singleEvent = ( json.program.singleEvent == 'true') ? i18n_yes : i18n_no;
+
+ setInnerHTML( 'singleEventField', singleEvent );
+ setInnerHTML( 'dateOfEnrollmentDescriptionField', json.program.dateOfEnrollmentDescription );
+ setInnerHTML( 'dateOfIncidentDescriptionField', json.program.dateOfIncidentDescription );
setInnerHTML( 'programStageCountField', json.program.programStageCount );
setInnerHTML( 'maxDaysFromStartField', json.program.maxDay );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programValidation.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programValidation.js 2011-09-28 07:11:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programValidation.js 2011-10-04 08:53:41 +0000
@@ -15,7 +15,17 @@
setInnerHTML( 'idField', json.validation.id );
setInnerHTML( 'descriptionField', json.validation.description );
setInnerHTML( 'leftSideField', json.validation.leftSide );
- setInnerHTML( 'rightSideField', json.validation.rightSide );
+ if( json.validation.rightSide != '1==1')
+ {
+ setInnerHTML( 'leftSideTitle', i18n_left_side );
+ setInnerHTML( 'rightSideField', json.validation.rightSide );
+ showById('rightSideDiv');
+ }
+ else
+ {
+ setInnerHTML( 'leftSideTitle', i18n_condition );
+ hideById('rightSideDiv');
+ }
setInnerHTML( 'programField', json.validation.program );
showDetails();
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientChartList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientChartList.vm 2011-10-03 07:45:06 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientChartList.vm 2011-10-04 08:53:41 +0000
@@ -2,7 +2,10 @@
<table class="mainPageTable">
<tr>
- <td align="right"><input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddPatientChart.action?programId=$programId'" style="width:70px"></td>
+ <td align="right">
+ <input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddPatientChart.action?programId=$programId'" style="width:100px"><br>
+ <input type="button" value="$i18n.getString( "cancel" )" onclick="window.location.href='program.action'" style="width:100px">
+ </td>
</tr>
<tr>
<td style="vertical-align:top">
@@ -42,10 +45,10 @@
</div>
<p><label class="bold">$i18n.getString( "id" ):</label><br><span id="idField"></span></p>
<p><label class="bold">$i18n.getString( "title" ):</label><br><span id="titleField"></span></p>
- <p><label class="bold">$i18n.getString( "type" ):</label><br><span id="typeField"></span></p>
- <p><label class="bold">$i18n.getString( "size" ):</label><br><span id="sizeField"></span></p>
- <p><label class="bold">$i18n.getString( "regression" ):</label><br><span id="regressionField"></span></p>
- <p><label class="bold">$i18n.getString( "dataElement" ):</label><br><span id="dataElementField"></span></p>
+ <p><label class="bold">$i18n.getString( "chart_type" ):</label><br><span id="typeField"></span></p>
+ <p><label class="bold">$i18n.getString( "chart_size" ):</label><br><span id="sizeField"></span></p>
+ <p><label class="bold">$i18n.getString( "include_regression_line" ):</label><br><span id="regressionField"></span></p>
+ <p><label class="bold">$i18n.getString( "value_x_dataelements" ):</label><br><span id="dataElementField"></span></p>
</div>
</td>
@@ -54,7 +57,16 @@
<script type="text/javascript">
var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_prorgam" ) , "'" )';
-
+ var i18n_bar_chart = '$encoder.jsEscape( $i18n.getString( "bar_chart" ) , "'" )';
+ var i18n_bar3d_chart = '$encoder.jsEscape( $i18n.getString( "bar3d_chart" ) , "'" )';
+ var i18n_line_chart = '$encoder.jsEscape( $i18n.getString( "line_chart" ) , "'" )';
+ var i18n_line3d_chart = '$encoder.jsEscape( $i18n.getString( "line3d_chart" ) , "'" )';
+ var i18n_normal = '$encoder.jsEscape( $i18n.getString( "normal" ) , "'" )';
+ var i18n_wide = '$encoder.jsEscape( $i18n.getString( "wide" ) , "'" )';
+ var i18n_tall = '$encoder.jsEscape( $i18n.getString( "tall" ) , "'" )';
+ var i18n_yes = '$encoder.jsEscape( $i18n.getString( "yes" ) , "'")';
+ var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ) , "'")';
+
jQuery(document).ready(function(){
tableSorter( 'listTable' );
});
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm 2011-10-03 07:45:06 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programList.vm 2011-10-04 08:53:41 +0000
@@ -24,7 +24,7 @@
<td style="text-align:center">
<a href="defineProgramAssociationsForm.action?id=$program.id" title="$i18n.getString( 'define_associations' )"><img src="../images/assign.png" alt="$i18n.getString( 'define_associations' )"></a>
- <a href="programValidation.action?programId=$program.id" title="$i18n.getString( 'define_program_validation' )"><img src="../images/assign_b.png" alt="$i18n.getString( 'define_program_validation' )"></a>
+ <a href="programValidation.action?programId=$program.id" title="$i18n.getString( 'program_validation_management' )"><img src="../images/assign_b.png" alt="$i18n.getString( 'define_program_validation' )"></a>
<a href="showUpdateProgramForm.action?id=$program.id" title="$i18n.getString( 'edit' )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"></a>
<a href="programStage.action?id=$program.id" title="$i18n.getString( 'view_program_stages' )"><img src="../images/add_section.png" alt="$i18n.getString( 'view_stage_management' )"></a>
<a href="patientChartList.action?programId=$program.id" title="$i18n.getString( 'patient_chart_management' )"><img src="../images/add_to_dashboard.png" alt="$i18n.getString( 'remove' )"></a>
@@ -47,6 +47,9 @@
<p><label class="bold">$i18n.getString( "id" ):</label><br><span id="idField"></span></p>
<p><label class="bold">$i18n.getString( "name" ):</label><br><span id="nameField"></span></p>
<p><label class="bold">$i18n.getString( "description" ):</label><br><span id="descriptionField"></span></p>
+ <p><label class="bold">$i18n.getString( "single_event" ):</label><br><span id="singleEventField"></span></p>
+ <p><label class="bold">$i18n.getString( "date_of_enrollment_description" ):</label><br><span id="dateOfEnrollmentDescriptionField"></span></p>
+ <p><label class="bold">$i18n.getString( "date_of_incident_description" ):</label><br><span id="dateOfIncidentDescriptionField"></span></p>
<p><label class="bold">$i18n.getString( "stage_in_program" ):</label><br><span id="programStageCountField"></span></p>
<p><label class="bold">$i18n.getString( "max_days_from_start" ):</label><br><span id="maxDaysFromStartField"></span></p>
</div>
@@ -58,7 +61,9 @@
<script type="text/javascript">
var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_prorgam" ) , "'" )';
var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ), "'")';
-
+ var i18n_yes = '$encoder.jsEscape( $i18n.getString( "yes" ) , "'")';
+ var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ) , "'")';
+
jQuery(document).ready(function(){
tableSorter( 'listTable' );
});
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programValidationList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programValidationList.vm 2011-10-03 07:45:06 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programValidationList.vm 2011-10-04 08:53:41 +0000
@@ -1,4 +1,4 @@
-<h3>$i18n.getString( "define_program_validation" )</h3>
+<h3>$i18n.getString( "program_validation_management" )</h3>
<table class="mainPageTable">
<tr>
@@ -49,8 +49,8 @@
</div>
<p><label class="bold">$i18n.getString( "id" ):</label><br><span id="idField"></span></p>
<p><label class="bold">$i18n.getString( "name" ):</label><br><span id="descriptionField"></span></p>
- <p><label class="bold">$i18n.getString( "left_side" ):</label><br><span id="leftSideField"></span></p>
- <p><label class="bold">$i18n.getString( "right_side" ):</label><br><span id="rightSideField"></span></p>
+ <p><label class="bold" id='leftSideTitle'>$i18n.getString( "left_side" ):</label><br><span id="leftSideField"></span></p>
+ <p id='rightSideDiv'><label class="bold">$i18n.getString( "right_side" ):</label><br><span id="rightSideField"></span></p>
</div>
</td>
@@ -70,4 +70,6 @@
var i18n_combo = '$encoder.jsEscape( $i18n.getString( "combo" ) , "'")';
var i18n_processing = '$encoder.jsEscape( $i18n.getString( "processing" ) , "'")';
var i18n_done = '$encoder.jsEscape( $i18n.getString( "done" ) , "'")';
+ var i18n_left_side = '$encoder.jsEscape( $i18n.getString( "left_side" ) , "'")';
+ var i18n_condition = '$encoder.jsEscape( $i18n.getString( "condition" ) , "'")';
</script>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm 2011-09-29 04:17:34 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm 2011-10-04 08:53:41 +0000
@@ -39,7 +39,7 @@
<tr>
<td><label for="mandatory">$i18n.getString( "mandatory" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
<td>
- <select id="mandatory" name="mandatory" style="min-width:20em">
+ <select id="mandatory" name="mandatory" style="min-width:30.2em">
<option value="true" #if( $patientIdentifierType.mandatory ) selected="selected" #end>$i18n.getString( "yes" )</option>
<option value="false" #if( !$patientIdentifierType.mandatory ) selected="selected" #end>$i18n.getString( "no" )</option>
</select>
@@ -50,7 +50,7 @@
<tr>
<td><label for="related">$i18n.getString( "related" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
<td>
- <select id="related" name="related" style="min-width:20em" class="{validate:{required:true}}">
+ <select id="related" name="related" style="min-width:30.2em" class="{validate:{required:true}}">
<option value="true" #if( $patientIdentifierType.related ) selected="selected" #end>$i18n.getString( "yes" )</option>
<option value="false" #if( !$patientIdentifierType.related ) selected="selected" #end>$i18n.getString( "no" )</option>
</select>