Rewrite the query string when removing browse criteria
Previously, any browse criteria created when searching remain in the generated URL even if they are removed. This commit fixes this behaviour such that the URL is correctly updated whenever the criteria change. Change-Id: I9a23801eae5527a56b9ac7b56a56f48ae1a50949
This commit is contained in:
parent
9de526ab6a
commit
e4137a2f53
|
@ -31,7 +31,8 @@
|
|||
tag-complete-option-template-url="'app/search/template/typeahead_criteria_item.html'"
|
||||
tag-complete-tag-template-url="'app/search/template/criteria_tag_item.html'"
|
||||
tag-complete-loading="loadingCriteria = isLoading"
|
||||
tag-complete-on-select="addCriteria(tag)">
|
||||
tag-complete-on-select="addCriteria(tag)"
|
||||
tag-remove-callback="rewriteQueryString()">
|
||||
</div>
|
||||
<span class="form-control-feedback text-muted">
|
||||
<i class="fa fa-search"
|
||||
|
|
|
@ -232,7 +232,7 @@ angular.module('sb.util').directive('tagComplete',
|
|||
var selectedTags = $scope.tagCompleteTags || [];
|
||||
|
||||
if (selectedTags.length > 0 && !$scope.newTagName) {
|
||||
selectedTags.pop();
|
||||
$scope.tagRemoveCallback(selectedTags.pop());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue