mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2025-01-31 03:16:42 +01:00
#1: Improved visual feedback that a search is in progress.
This commit is contained in:
parent
4585eb712e
commit
d73a0d006d
2 changed files with 9 additions and 5 deletions
|
@ -8,15 +8,14 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<section class="search-results pfm-popup" id="search-results">
|
<section class="search-results pfm-popup" id="search-results">
|
||||||
<div ng-hide="searchInProgress">
|
<p ng-show="!searchInProgress && !searchComplete" class="empty-box">Type something to begin searching!</p>
|
||||||
<p class="empty-box">Type something to begin searching!</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div ng-show="searchInProgress">
|
<p ng-show="searchInProgress" class="empty-box">Searching…</p>
|
||||||
|
|
||||||
|
<div ng-show="!searchInProgress && searchComplete">
|
||||||
<div class="-column1">
|
<div class="-column1">
|
||||||
<h3 class="-section-header">Matching tracks</h3>
|
<h3 class="-section-header">Matching tracks</h3>
|
||||||
<pfm-tracks-list tracks="tracks"></pfm-tracks-list>
|
<pfm-tracks-list tracks="tracks"></pfm-tracks-list>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="-column2">
|
<div class="-column2">
|
||||||
|
|
|
@ -26,6 +26,7 @@ angular.module('ponyfm').directive 'pfmSearch', () ->
|
||||||
($scope, search) ->
|
($scope, search) ->
|
||||||
$scope.searchQuery = ''
|
$scope.searchQuery = ''
|
||||||
$scope.searchInProgress = false
|
$scope.searchInProgress = false
|
||||||
|
$scope.searchComplete = false
|
||||||
|
|
||||||
$scope.tracks = []
|
$scope.tracks = []
|
||||||
$scope.albums = []
|
$scope.albums = []
|
||||||
|
@ -44,6 +45,7 @@ angular.module('ponyfm').directive 'pfmSearch', () ->
|
||||||
if searchQuery.length <3
|
if searchQuery.length <3
|
||||||
clearResults()
|
clearResults()
|
||||||
$scope.searchInProgress = false
|
$scope.searchInProgress = false
|
||||||
|
$scope.searchComplete = false
|
||||||
return
|
return
|
||||||
|
|
||||||
$scope.searchInProgress = true
|
$scope.searchInProgress = true
|
||||||
|
@ -51,6 +53,9 @@ angular.module('ponyfm').directive 'pfmSearch', () ->
|
||||||
search.searchAllContent(searchQuery)
|
search.searchAllContent(searchQuery)
|
||||||
.then (results)->
|
.then (results)->
|
||||||
clearResults()
|
clearResults()
|
||||||
|
$scope.searchInProgress = false
|
||||||
|
$scope.searchComplete = true
|
||||||
|
|
||||||
for track in results.tracks
|
for track in results.tracks
|
||||||
$scope.tracks.push(track)
|
$scope.tracks.push(track)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue