← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11223: Retain the report-date when to click Complete-And-New button to register new single event without...

 

------------------------------------------------------------
revno: 11223
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-06-18 12:51:08 +0700
message:
  Retain the report-date when to click Complete-And-New button to register new single event without registration.
modified:
  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/javascript/anonymousRegistration.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js	2013-06-06 09:34:23 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js	2013-06-18 05:51:08 +0000
@@ -850,12 +850,11 @@
     searchEvents( eval( getFieldValue( 'listAll' ) ) );
 }
 
-function showAddEventForm() {
+function showAddEventForm( isCreateEvent ) {
     showById( 'eventActionMenu' );
     jQuery( "[name=eventActionLink]" ).hide();
     hideById( 'dataEntryMenu' );
     setInnerHTML( 'dataEntryFormDiv', '' );
-    setFieldValue( 'executionDate', '' );
     hideById( 'selectDiv' );
     hideById( 'searchDiv' );
     hideById( 'listDiv' );
@@ -864,8 +863,10 @@
     hideById( 'actionDiv' );
     showById( 'dataEntryInfor' );
     setFieldValue( 'programStageInstanceId', '0' );
-    byId( 'executionDate' ).style.backgroundColor = "#ffffff";
     setInnerHTML( 'programName', jQuery( '#programId option:selected' ).text() );
+	if( isCreateEvent != undefined ){
+		addNewEvent();
+	}
 }
 
 function addNewEvent() {

=== 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-05-31 07:03:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js	2013-06-18 05:51:08 +0000
@@ -591,7 +591,7 @@
                 hideLoader();
 
                 if ( isCreateEvent ) {
-                    showAddEventForm();
+                    showAddEventForm(isCreateEvent);
                 }
             } ).fail(function() {
                 if ( getProgramType() == 3 ) {
@@ -620,7 +620,7 @@
                         hideLoader();
 
                         if ( isCreateEvent ) {
-                            showAddEventForm();
+                            showAddEventForm( isCreateEvent );
                         }
                     }
                 }