From 12efd7f35b3f025d998acbd7c10618a5053d6967 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Wed, 15 Jan 2014 23:32:15 +0000 Subject: simple hack to avoid weird effect of typeahead local caching git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1558608 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva-webapp/src/main/webapp/js/archiva/search.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'archiva-modules') diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js index 8378fd7eb..079d2bd94 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js @@ -33,7 +33,7 @@ define("archiva.search",["jquery","jquery.ui","i18n","jquery.tmpl","select2","kn this.repositoryId=repositoryId; this.feedsUrl=feedsUrl; displayGroupId=function(groupId){ - $.log("BrowseViewModel#displayGroupId,self.repositoryId:"+self.repositoryId); + $.log("BrowseViewModel#displayGroupId"+groupId+",self.repositoryId:"+self.repositoryId); if(self.repositoryId){ window.sammyArchivaApplication.setLocation("#browse~"+self.repositoryId+"/"+groupId); } else { @@ -1209,6 +1209,7 @@ define("archiva.search",["jquery","jquery.ui","i18n","jquery.tmpl","select2","kn success: function(applicationUrl){ var mainContent = $("#main-content"); + mainContent.empty(); mainContent.html($("#browse-tmpl" ).tmpl()); mainContent.find("#browse_result").html(mediumSpinnerImg()); var parentBrowseViewModel=new BrowseViewModel(null,null,groupId,repositoryId); @@ -1439,9 +1440,11 @@ define("archiva.search",["jquery","jquery.ui","i18n","jquery.tmpl","select2","kn browseBox.typeahead( { - name: 'browse-result', + name: 'browse-result-'+$.now() ,////hack to avoid local storage caching + local: [], remote: { url: url, + cache: false, beforeSend: function(jqXhr){ $.log("beforeSend browseBox.val():'"+browseBox.val()+"'"); }, -- cgit v1.2.3