dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18356
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7708: Allow enter data values for new event as soon as it is created.
------------------------------------------------------------
revno: 7708
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-07-26 10:58:09 +0700
message:
Allow enter data values for new event as soon as it is created.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js
--
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/dataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm 2012-07-18 03:46:42 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm 2012-07-26 03:58:09 +0000
@@ -133,8 +133,8 @@
<div id='inputCriteriaDiv' class="page inputCriteria" style="display:none;width:490px;height:29px;">
<input type="button" class='button' id="completeInBelowBtn" value="$i18n.getString('complete')" onClick="doComplete()" disabled="disabled">
- <input type="button" onclick="doUnComplete()" value="$i18n.getString('incomplete')" id="uncompleteBelowBtn">
- <input type="button" class='button' id="validationInBelowBtn" value="$i18n.getString('run_validation')" onClick="javascript: runValidation();" >
+ <input type="button" onclick="doUnComplete()" value="$i18n.getString('incomplete')" id="uncompleteBelowBtn" disabled="disabled">
+ <input type="button" class='button' id="validationInBelowBtn" value="$i18n.getString('run_validation')" onClick="javascript: runValidation();" disabled="disabled">
</div>
</div>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2012-07-18 03:52:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2012-07-26 03:58:09 +0000
@@ -41,7 +41,7 @@
hideById('executionDateTB');
var type = jQuery('#dataRecordingSelectDiv [name=programId] option:selected').attr('type');
- if( type == 1 && json.programStageInstances.length > 1 )
+ if( type == 1 )
{
showById('colorHelpLink');
for ( i in json.programStageInstances )
@@ -782,6 +782,7 @@
disable('newEncounterBtn');
var programStageName = jQuery(".stage-object-selected").attr('psname');
+ var elementId = prefixId + programStageInstanceId;
var flag = false;
jQuery("#programStageIdTR input[name='programStageBtn']").each(function(i,item){
var element = jQuery(item);
@@ -789,7 +790,6 @@
if( dueDate < dueDateInStage && !flag)
{
- var elementId = prefixId + programStageInstanceId;
jQuery('<td><input name="programStageBtn" '
+ 'id="' + elementId + '" '
+ 'psid="' + programStageInstanceId + '" '
@@ -805,6 +805,21 @@
flag = true;
}
});
+
+ if( !flag )
+ {
+ jQuery("#programStageIdTR").append('<td><img src="images/rightarrow.png"></td>'
+ + '<td><input name="programStageBtn" '
+ + 'id="' + elementId + '" '
+ + 'psid="' + programStageInstanceId + '" '
+ + 'psname="' + programStageName + '" '
+ + 'dueDate="' + dueDate + '" '
+ + 'value="'+ programStageName + ' ' + dueDate + '" '
+ + 'onclick="javascript:loadDataEntry(' + programStageInstanceId + ')" '
+ + 'type="button" class="stage-object" '
+ + '></td>');
+ setEventColorStatus( elementId, 3 );
+ }
});
}
@@ -890,13 +905,17 @@
if(disabled){
disable('completeBtn');
disable('completeAndAddNewBtn');
+ disable('completeInBelowBtn');
enable('uncompleteBtn');
enable('uncompleteAndAddNewBtn');
+ enable('uncompleteBelowBtn');
}
else{
enable('completeBtn');
enable('completeAndAddNewBtn');
+ enable('completeInBelowBtn');
disable('uncompleteBtn');
disable('uncompleteAndAddNewBtn');
+ disable('uncompleteBelowBtn');
}
}