|
@@ -20,6 +20,7 @@ export class SearchCtrl {
|
|
|
ignoreClose: any;
|
|
ignoreClose: any;
|
|
|
// triggers fade animation class
|
|
// triggers fade animation class
|
|
|
openCompleted: boolean;
|
|
openCompleted: boolean;
|
|
|
|
|
+ searchMode = 'browse';
|
|
|
|
|
|
|
|
/** @ngInject */
|
|
/** @ngInject */
|
|
|
constructor(private $scope, private $location, private $timeout, private backendSrv, private contextSrv, private $rootScope) {
|
|
constructor(private $scope, private $location, private $timeout, private backendSrv, private contextSrv, private $rootScope) {
|
|
@@ -105,6 +106,7 @@ export class SearchCtrl {
|
|
|
var localSearchId = this.currentSearchId;
|
|
var localSearchId = this.currentSearchId;
|
|
|
|
|
|
|
|
this.query.browseMode = this.queryHasNoFilters();
|
|
this.query.browseMode = this.queryHasNoFilters();
|
|
|
|
|
+ this.searchMode = this.queryHasNoFilters() ? 'browse': 'search';
|
|
|
|
|
|
|
|
return this.backendSrv.search(this.query).then((results) => {
|
|
return this.backendSrv.search(this.query).then((results) => {
|
|
|
if (localSearchId < this.currentSearchId) { return; }
|
|
if (localSearchId < this.currentSearchId) { return; }
|