dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #22051
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10571: minor fixes
------------------------------------------------------------
revno: 10571
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-04-16 10:30:28 +0700
message:
minor fixes
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/cacheManifest.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/cacheManifest.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/cacheManifest.vm 2013-04-15 07:57:01 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/cacheManifest.vm 2013-04-16 03:30:28 +0000
@@ -83,6 +83,7 @@
images/close.gif
images/data_entry.png
../images/delete.png
+../images/calendar-delete.png
images/flag-blue.png
images/open.gif
images/representative.png
=== 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-15 08:31:40 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2013-04-16 03:30:28 +0000
@@ -695,58 +695,55 @@
var programStageInstanceId = getFieldValue( 'programStageInstanceId' );
loadProgramStageInstance(programStageInstanceId ).done(function() {
+
+ } ).fail(function() {
+
+ } ).always(function() {
if( jQuery("#entryFormContainer") ) {
-
- // Display entry form if excution-date is not null
- if( jQuery("#executionDate").val() == '' )
- {
- hideById('entryForm');
- }
- else if( jQuery("#executionDate").val() != '' )
- {
- toggleContentForReportDate(true);
- }
-
- // Set buttons by completed-status of program-stage-instance
- var completed = $( "#entryFormContainer input[id='completed']" ).val();
- var blockEntry = $( "#entryFormContainer input[id='blockEntryForm']" ).val();
- if(completed == 'true'){
- disable('completeBtn');
- enable('uncompleteBtn');
- if( blockEntry == 'true'){
- blockEntryForm();
- }
- }
- else{
- enable('completeBtn');
- disable('uncompleteBtn');
- }
-
- jQuery("input[name='entryfield'],select[name='entryselect']").each(function(){
- jQuery(this).focus(function(){
+
+ // Display entry form if excution-date is not null
+ if ( jQuery( "#executionDate" ).val() == '' ) {
+ hideById( 'entryForm' );
+ }
+ else if ( jQuery( "#executionDate" ).val() != '' ) {
+ toggleContentForReportDate( true );
+ }
+
+ // Set buttons by completed-status of program-stage-instance
+ var completed = $( "#entryFormContainer input[id='completed']" ).val();
+ var blockEntry = $( "#entryFormContainer input[id='blockEntryForm']" ).val();
+
+ if ( completed == 'true' ) {
+ disable( 'completeBtn' );
+ enable( 'uncompleteBtn' );
+ if ( blockEntry == 'true' ) {
+ blockEntryForm();
+ }
+ }
+ else {
+ enable( 'completeBtn' );
+ disable( 'uncompleteBtn' );
+ }
+
+ jQuery( "input[name='entryfield'],select[name='entryselect']" ).each( function () {
+ jQuery( this ).focus( function () {
currentFocus = this;
- });
+ } );
- jQuery(this).addClass("inputText");
- });
+ jQuery( this ).addClass( "inputText" );
+ } );
TOGGLE.init();
- jQuery("#entryForm :input").each(function()
- {
- if( jQuery(this).attr( 'options' )!= null && jQuery(this).attr( 'options' )== 'true' )
- {
- autocompletedField(jQuery(this).attr('id'));
- }
- else if( jQuery(this).attr( 'username' )!= null && jQuery(this).attr( 'username' )== 'true' )
- {
- autocompletedUsernameField(jQuery(this).attr('id'));
- }
- });
-
+ jQuery( "#entryForm :input" ).each( function () {
+ if ( jQuery( this ).attr( 'options' ) != null && jQuery( this ).attr( 'options' ) == 'true' ) {
+ autocompletedField( jQuery( this ).attr( 'id' ) );
+ }
+ else if ( jQuery( this ).attr( 'username' ) != null && jQuery( this ).attr( 'username' ) == 'true' ) {
+ autocompletedUsernameField( jQuery( this ).attr( 'id' ) );
+ }
+ } );
}
- } ).fail(function() {
- console.log("failed, do something smart")
});
}