From b2ee2f701958c67c8e5c9a44ee58c1758f16a9be Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Fri, 20 Jan 2012 23:17:15 +0000 Subject: [PATCH] update location from server response as user can user relative path when adding a repository. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1234200 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva-web/archiva-webapp-js/src/main/webapp/index.html | 3 ++- .../src/main/webapp/js/archiva/repositories.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html index 53e695b7a..10bd6aa7b 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html @@ -43,7 +43,8 @@ require.config({ baseUrl: "js/" }); - $LAB.setGlobalDefaults({AlwaysPreserveOrder:true,BasePath:"js/",explicit_preloading:false}); + // CacheBust is for dev purpose use false in prod env ! + $LAB.setGlobalDefaults({AlwaysPreserveOrder:true,BasePath:"js/",explicit_preloading:false,CacheBust:true}); $LAB .script("jquery.tmpl.js").wait() .script("archiva/utils.js").wait() diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js index 5db7906fd..9932c50bf 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js @@ -190,6 +190,7 @@ $(function() { data: "{\"managedRepository\": " + ko.toJSON(managedRepository)+"}", dataType: 'json', success: function(data) { + curManagedRepository.location(data.managedRepository.location); self.managedRepositoriesViewModel.managedRepositories.push(curManagedRepository); displaySuccessMessage($.i18n.prop('managedrepository.added')); activateManagedRepositoriesGridTab();