diff --git a/public/templates/directives/search.html b/public/templates/directives/search.html index 079f023a..84a4e6d3 100644 --- a/public/templates/directives/search.html +++ b/public/templates/directives/search.html @@ -8,15 +8,14 @@ />
-
-

Type something to begin searching!

-
+

Type something to begin searching!

-
+

Searching…

+ +

Matching tracks

-
diff --git a/resources/assets/scripts/app/directives/search.coffee b/resources/assets/scripts/app/directives/search.coffee index 673123d0..c08dddc3 100644 --- a/resources/assets/scripts/app/directives/search.coffee +++ b/resources/assets/scripts/app/directives/search.coffee @@ -26,6 +26,7 @@ angular.module('ponyfm').directive 'pfmSearch', () -> ($scope, search) -> $scope.searchQuery = '' $scope.searchInProgress = false + $scope.searchComplete = false $scope.tracks = [] $scope.albums = [] @@ -44,6 +45,7 @@ angular.module('ponyfm').directive 'pfmSearch', () -> if searchQuery.length <3 clearResults() $scope.searchInProgress = false + $scope.searchComplete = false return $scope.searchInProgress = true @@ -51,6 +53,9 @@ angular.module('ponyfm').directive 'pfmSearch', () -> search.searchAllContent(searchQuery) .then (results)-> clearResults() + $scope.searchInProgress = false + $scope.searchComplete = true + for track in results.tracks $scope.tracks.push(track)