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

fix(app): correct spinner show/hide #719

Merged
merged 1 commit into from
Mar 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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