← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10524: minor changes

 

------------------------------------------------------------
revno: 10524
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-04-12 11:35:50 +0700
message:
  minor changes
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.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/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java	2013-04-12 04:20:19 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java	2013-04-12 04:35:50 +0000
@@ -251,9 +251,6 @@
     public String execute()
         throws Exception
     {
-        organisationUnit = organisationUnitId == null ? selectedStateManager.getSelectedOrganisationUnit() :
-            organisationUnitService.getOrganisationUnit( organisationUnitId );
-
         if ( programStageInstanceId != null )
         {
             programStageInstance = programStageInstanceService.getProgramStageInstance( programStageInstanceId );
@@ -293,6 +290,9 @@
 
         if ( programStageInstance != null )
         {
+            organisationUnit = organisationUnitId == null ? selectedStateManager.getSelectedOrganisationUnit() :
+                organisationUnitService.getOrganisationUnit( organisationUnitId );
+
             if ( program.isRegistration() )
             {
                 patient = programStageInstance.getProgramInstance().getPatient();

=== 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-12 04:20:19 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js	2013-04-12 04:35:50 +0000
@@ -102,14 +102,6 @@
 
         updateProgramList( programs );
     } );
-
-    /*
-    // try online first, then fallback to what we have stored in browser
-    dhis2.storage.Store.plugins['online-anonymous-programs'].call( {}, function ( arr ) {
-        updateProgramList( arr );
-    }, function () {
-    } );
-    */
 }
 
 function updateProgramList( arr ) {
@@ -652,7 +644,6 @@
 var service = (function () {
     var executionDateStoreInitialized = false;
     var dataValueStoreInitialized = false;
-    var formStoreInitialized = false;
 
     var executionDateStore = new dhis2.storage.Store( {name: 'anonymousExecutionDate' }, function ( store ) {
         executionDateStoreInitialized = true;
@@ -662,10 +653,6 @@
         dataValueStoreInitialized = true;
     } );
 
-    var formStore = new dhis2.storage.Store( {name: 'anonymousForm', adapter: 'dom-ss'}, function ( store ) {
-        formStoreInitialized = true;
-    } );
-
     return {
         saveExecutionDate: function( programId, programStageInstanceId, executionDate, organisationUnitId ) {
             $.ajax( {