diff options
author | Olivier Lamy <olamy@apache.org> | 2014-01-15 23:32:15 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2014-01-15 23:32:15 +0000 |
commit | 12efd7f35b3f025d998acbd7c10618a5053d6967 (patch) | |
tree | ff17a3d5d50f4f2ba1d24c508ad00a3eaaac2df4 | |
parent | 4f45ddf84ea02b6366818ea298a1bf9a77f3d6be (diff) | |
download | archiva-12efd7f35b3f025d998acbd7c10618a5053d6967.tar.gz archiva-12efd7f35b3f025d998acbd7c10618a5053d6967.zip |
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
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/search.js | 7 |
1 files changed, 5 insertions, 2 deletions
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()+"'"); }, |