diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js index bdf45ee41..90a1f9c7c 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js @@ -724,7 +724,9 @@ $(function() { advancedSearch=function(){ self.search("restServices/archivaServices/searchService/searchArtifacts"); } - + removeFilter=function(){ + self.resultViewModel.artifacts(self.resultViewModel.originalArtifacts); + } this.search=function(url){ var mainContent=$("#main-content"); @@ -756,11 +758,13 @@ $(function() { displayWarningMessage( $.i18n.prop("search.artifact.noresults")); return; } else { + self.resultViewModel.originalArtifacts=artifacts; self.resultViewModel.artifacts(artifacts); if (!searchResultsGrid.attr("data-bind")){ searchResultsGrid.attr("data-bind", "simpleGrid: gridViewModel,simpleGridTemplate:'search-results-view-grid-tmpl',pageLinksId:'search-results-view-grid-pagination'"); ko.applyBindings(self.resultViewModel,searchResultsGrid.get(0)); + ko.applyBindings(self,mainContent.find("#remove-filter-id" ).get(0)); } activateSearchResultsTab(); diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html index 4c1b98637..e24694035 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html @@ -267,6 +267,8 @@
+ remove filter +