← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15339: cleanup

 

------------------------------------------------------------
revno: 15339
committer: Abyot Asalefew Gizaw abyota@xxxxxxxxx
branch nick: dhis2
timestamp: Wed 2014-05-21 18:13:41 +0200
message:
  cleanup
modified:
  dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js
  dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/directives.js
  dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.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-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js	2014-05-21 15:59:21 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js	2014-05-21 16:13:41 +0000
@@ -62,6 +62,8 @@
             TranslationService.translate();
             $scope.loadPrograms($scope.selectedOrgUnit);
             $scope.search($scope.searchMode.listAll);
+            
+            console.log('hi there...');
         }
     });
     
@@ -209,7 +211,7 @@
     $scope.showSearch = function(){        
         $scope.showSearchDiv = !$scope.showSearchDiv;
         $scope.showRegistrationDiv = false;
-        $scope.showTrackedEntityDiv = false;   
+        //$scope.showTrackedEntityDiv = false;   
         $scope.selectedProgram = '';
         $scope.emptySearchAttribute = false;
     };

=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/directives.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/directives.js	2014-04-03 12:27:23 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/directives.js	2014-05-21 16:13:41 +0000
@@ -23,49 +23,6 @@
         restrict: 'A',        
         link: function(scope, element, attrs){  
             
-            //when tree has loaded, get selected orgunit - if there is any - and inform angular           
-            $(function() {                 
-                
-                var adapters = [];
-                var partial_adapters = [];
-
-                if( dhis2.ou.memoryOnly ) {
-                    adapters = [ dhis2.storage.InMemoryAdapter ];
-                    partial_adapters = [ dhis2.storage.InMemoryAdapter ];
-                } else {
-                    adapters = [ dhis2.storage.IndexedDBAdapter, dhis2.storage.DomLocalStorageAdapter, dhis2.storage.InMemoryAdapter ];
-                    partial_adapters = [ dhis2.storage.IndexedDBAdapter, dhis2.storage.DomSessionStorageAdapter, dhis2.storage.InMemoryAdapter ];
-                }
-
-                dhis2.ou.store = new dhis2.storage.Store({
-                    name: OU_STORE_NAME,
-                    objectStores: [
-                        {
-                            name: OU_KEY,
-                            adapters: adapters
-                        },
-                        {
-                            name: OU_PARTIAL_KEY,
-                            adapters: partial_adapters
-                        }
-                    ]
-                });
-
-                dhis2.ou.store.open().done( function() {
-                    selection.load();
-                    $( "#orgUnitTree" ).one( "ouwtLoaded", function() {
-                        var selected = selection.getSelected()[0];
-                        selection.getOrganisationUnit(selected).done(function(data){                            
-                            if( data ){
-                                scope.selectedOrgUnit = {id: selected, name: data[selected].n};                                  
-                                scope.$apply();
-                            }                        
-                        });
-                    } );
-                    
-                });
-            });
-            
             //listen to user selection, and inform angular         
             selection.setListenerFunction( organisationUnitSelected );
             selection.responseReceived();

=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js	2014-05-19 11:33:07 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js	2014-05-21 16:13:41 +0000
@@ -118,7 +118,7 @@
         }
         else {
             setHeaderMessage(i18n_offline_notification);
-            selection.responseReceived(); //notify angular 
+            //selection.responseReceived(); //notify angular 
         }
     });
    
@@ -339,7 +339,7 @@
             dhis2.tc.storageManager.clear();
             log( 'Successfully uploaded local events' );      
             setHeaderDelayMessage( i18n_sync_success );
-            selection.responseReceived(); //notify angular 
+            //selection.responseReceived(); //notify angular 
         },
         error: function( xhr )
         {