← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21240: tracker-capture: pressing enter key with empty search text now returns all tei

 

------------------------------------------------------------
revno: 21240
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-11-30 12:05:20 +0100
message:
  tracker-capture: pressing enter key with empty search text now returns all tei
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.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-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js	2015-11-17 13:20:40 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js	2015-11-30 11:05:20 +0000
@@ -224,13 +224,10 @@
         //check search mode
         if( $scope.selectedSearchMode === $scope.searchMode.freeText ){     
 
-            if(!$scope.searchText){                
-                $scope.emptySearchText = true;
-                $scope.teiFetched = false;
-                return;
-            }       
-            
-            $scope.queryUrl = 'query=LIKE:' + $scope.searchText;            
+            if( $scope.searchText ){
+                $scope.queryUrl = 'query=LIKE:' + $scope.searchText;
+            }            
+                        
             $scope.attributes = EntityQueryFactory.resetAttributesQuery($scope.attributes, $scope.enrollment);
             $scope.searchingOrgUnit = $scope.selectedOrgUnit;
         }