Skip to content

Commit

Permalink
Merge pull request jettro#12 from boompig/master
Browse files Browse the repository at this point in the history
fix to advanced search
  • Loading branch information
ENuge committed Jul 25, 2014
2 parents e8acf1f + 19b5f18 commit 54d0a19
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,12 @@ function SearchCtrl($scope, $sce, $routeParams, $location, elastic, configuratio
}

$scope.redirectSearch = function () {
$location.path("/search/" + $scope.search.simple);
if ($scope.search.advanced.searchSources.length === 0) {
$location.path("/search/" + $scope.search.simple);
} else {
// handle the case when sources are specified
$scope.restartSearch();
}
};

if ($routeParams.hasOwnProperty("searchStr") && $routeParams.searchStr) {
Expand Down

0 comments on commit 54d0a19

Please sign in to comment.