dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #22137
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10623: lots of minor fixes
------------------------------------------------------------
revno: 10623
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-04-18 20:24:10 +0700
message:
lots of minor fixes
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm
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/anonymousRegistration.js
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/anonymousRegistration.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2013-04-15 12:48:18 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2013-04-18 13:24:10 +0000
@@ -163,11 +163,11 @@
<div id='dataEntryFormDiv'></div>
<div id='actionDiv' class="page inputCriteria" style="width:700px;height:29px;">
- <input type="button" onclick="completedAndAddNewEvent();" value="$i18n.getString('complete_and_add_new_event')" id="completeAndNewBtn" style="width:150px;">
- <input type="button" onclick="doComplete()" value="$i18n.getString('complete')" id="completeBtn">
- <input type="button" onclick="doUnComplete()" value="$i18n.getString('incomplete')" id="uncompleteBtn" >
- <input type="button" value="$i18n.getString('run_validation')" onclick="javascript: runValidation();">
- <input type="button" onclick="removeCurrentEvent();" value="$i18n.getString('remove')" id="completeBtn">
+ <input type="button" id="completeAndNewBtn" onclick="completedAndAddNewEvent();" value="$i18n.getString('complete_and_add_new_event')" style="width:150px;">
+ <input type="button" id="completeBtn" onclick="doComplete()" value="$i18n.getString('complete')">
+ <input type="button" id="uncompleteBtn" onclick="doUnComplete()" value="$i18n.getString('incomplete')">
+ <input type="button" id="validateBtn" value="$i18n.getString('run_validation')" onclick="javascript: runValidation();">
+ <input type="button" id="completeBtn" onclick="removeCurrentEvent();" value="$i18n.getString('remove')">
</div>
</div>
=== 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 2013-04-15 08:20:20 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm 2013-04-18 13:24:10 +0000
@@ -81,10 +81,10 @@
#end
</div>
-<div id='inputCriteriaDiv' class="page inputCriteria hidden" style="width:490px;height:29px;">
- <input type="button" class='button' id="completeBtn" value="$i18n.getString('complete')" onClick="doComplete()">
+<div id='inputCriteriaDiv' class="page inputCriteria hidden" style="width:490px; height:29px;">
+ <input type="button" id="completeBtn" class="button" value="$i18n.getString('complete')" onClick="doComplete()">
<input type="button" id="uncompleteBtn" value="$i18n.getString('incomplete')" onclick="doUnComplete()">
- <input type="button" class='button' id="validationBtn" value="$i18n.getString('run_validation')" onClick="javascript: runValidation();">
+ <input type="button" id="validateBtn" class='button' id="validationBtn" value="$i18n.getString('run_validation')" onClick="javascript: runValidation();">
</div>
</div>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2013-04-18 12:50:37 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2013-04-18 13:24:10 +0000
@@ -168,6 +168,7 @@
enableFiltering();
searchEvents( eval( getFieldValue( 'listAll' ) ) );
$('#commentInput').removeAttr('disabled');
+ $('#validateBtn').removeAttr('disabled');
}
else {
var form = [
@@ -188,6 +189,7 @@
$( document ).bind( 'dhis2.offline', function () {
setHeaderMessage( i18n_offline_notification );
$('#commentInput').attr('disabled', true);
+ $('#validateBtn').attr('disabled', true);
disableFiltering();
} );
} );
=== 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 2013-04-18 12:50:37 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2013-04-18 13:24:10 +0000
@@ -670,19 +670,22 @@
if(arr.length > 0 ) {
var obj = arr[0];
- _.each( _.keys(obj.values), function(key, idx) {
- var fieldId = getProgramStageUid() + '-' + key + '-val';
- var field = $('#' + fieldId);
+ if(obj.values !== undefined ) {
+ _.each( _.keys(obj.values), function(key, idx) {
+ var fieldId = getProgramStageUid() + '-' + key + '-val';
+ var field = $('#' + fieldId);
- if ( field ) {
- field.val( obj.values[key].value );
- }
- });
+ if ( field ) {
+ field.val( obj.values[key].value );
+ }
+ });
+ }
}
- $('#commentInput').attr('disabled', true)
-
if( always ) always();
+
+ $('#commentInput').attr('disabled', true);
+ $('#validateBtn').attr('disabled', true);
});
} else {
return $.ajax({
@@ -693,8 +696,6 @@
type: 'GET',
dataType: 'json'
} ).done(function(data) {
- $('#commentInput').removeAttr('disabled');
-
$( "#programStageInstanceId" ).val( data.id );
$( "#entryFormContainer input[id='programStageInstanceId']" ).val( data.id );
$( "#entryFormContainer input[id='incidentDate']" ).val( data.programInstance.dateOfIncident );
@@ -759,6 +760,9 @@
} );
if( always ) always();
+
+ $('#commentInput').removeAttr('disabled');
+ $('#validateBtn').removeAttr('disabled');
} );
}
}