Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
fix(app): correct spinner show/hide
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-wilmer committed Mar 31, 2016
1 parent 5efd889 commit fdce007
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions app/scripts/query/query.controllers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ module ngApp.query.controllers {
}

refresh() {
this.participantsLoading = true;
this.filesLoading = true;

if (this.tabSwitch) {
if (this.QState.tabs.participants.active) {
this.QState.setActive("participants", "hasLoadedOnce");
Expand All @@ -95,6 +92,9 @@ module ngApp.query.controllers {
return;
}

this.participantsLoading = true;
this.filesLoading = true;

this.SearchService.getSummary().then((data) => {
this.summary = data;
});
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/query/templates/query.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h3 class="col-lg-9 col-md-8" data-ng-if="qc.participantsLoading && qc.filesLoad
Loading, please wait.. <i class="fa fa-spinner fa-spin"></i>
</h3>

<h3 class="col-lg-9 col-md-8" data-ng-if="!qc.participants.hits.length && !qc.files.hits.length && qc.participantsLoading && qc.filesLoading" data-translate>
<h3 class="col-lg-9 col-md-8" data-ng-if="!qc.participants.hits.length && !qc.files.hits.length && !qc.participantsLoading && !qc.filesLoading" data-translate>
No results found using those filters.
</h3>

Expand Down
6 changes: 3 additions & 3 deletions app/scripts/search/search.controllers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ module ngApp.search.controllers {
}

refresh() {
this.filesLoading = true;
this.participantsLoading = true;

if (this.tabSwitch) {
if (this.SearchState.tabs.participants.active) {
this.SearchState.setActive("tabs", "participants", "hasLoadedOnce");
Expand All @@ -120,6 +117,9 @@ module ngApp.search.controllers {
return;
}

this.filesLoading = true;
this.participantsLoading = true;

this.SearchService.getSummary().then((data) => {
this.summary = data;
this.tabSwitch = false;
Expand Down

0 comments on commit fdce007

Please sign in to comment.