dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19442
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8474: Add program-stage with auto generated property as false into Create new event in data entry form.
------------------------------------------------------------
revno: 8474
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-10-11 14:33:59 +0700
message:
Add program-stage with auto generated property as false into Create new event in data entry form.
modified:
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/programStageInstanceFlow.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/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2012-10-11 06:52:44 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2012-10-11 07:33:59 +0000
@@ -524,14 +524,14 @@
if( programStageId != undefined )
{
- jQuery('#repeatableProgramStageId').val(programStageId);
+ jQuery('#repeatableProgramStage_' + programInstanceId).val(programStageId);
}
setSuggestedDueDate( programInstanceId );
}
function setSuggestedDueDate( programInstanceId )
{
- var standardInterval = jQuery('#repeatableProgramStageId option:selected').attr('standardInterval');
+ var standardInterval = jQuery('#repeatableProgramStage_' + programInstanceId + ' option:selected').attr('standardInterval');
var date = new Date();
var d = date.getDate() + eval(standardInterval);
var m = date.getMonth();
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm 2012-10-07 03:12:47 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm 2012-10-11 07:33:59 +0000
@@ -54,10 +54,12 @@
<tr>
<td>$i18n.getString( 'program_stage' )</td>
<td>
- <select id='repeatableProgramStageId' name='repeatableProgramStageId' onchange="setSuggestedDueDate('$programInstance.id')">
+ <select id='repeatableProgramStage_$!programInstance.id' name='repeatableProgramStageId_$!programInstance.id' onchange="setSuggestedDueDate('$programInstance.id')">
#foreach( $programStage in $programInstance.program.programStages )
#if( $programStage.irregular=='true')
<option value="$programStage.id" standardInterval='$programStage.standardInterval'>$!programStage.name</option>
+ #elseif( $programStage.autoGenerateEvent=='false')
+ <option value="$programStage.id" standardInterval='$programStage.minDaysFromStart'>$!programStage.name</option>
#end
#end
</select>
@@ -91,7 +93,7 @@
var i18n_create_new_event = '$encoder.jsEscape( $i18n.getString( "create_new_event" ) , "'" )';
var i18n_create_event_success = '$encoder.jsEscape( $i18n.getString( "create_event_success" ) , "'" )';
jQuery(document).ready( function(){
- var options = jQuery("#createNewEncounterDiv_$!programInstance.id [id=repeatableProgramStageId] option").length;
+ var options = jQuery("#repeatableProgramStage_$!programInstance.id option").length;
if( options==0 ){
jQuery("[name=newEncounterBtn]").addClass("hidden");
}