From d13973dab564e74de0087ca7d5c105724d528550 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Mon, 10 Sep 2012 14:39:13 +0000 Subject: [PATCH] escape in case of repo id with dot git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1382890 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/webapp/js/archiva/repositories.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 29f89bd2e..8123cc39b 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 @@ -446,7 +446,7 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery if ($(calculatePopoverId(managedRepository)).html()){ // we ask stats all the time ? if no uncomment return //return; - $("#managedrepository-stats-"+managedRepository.id()).append(smallSpinnerImg()); + $("#managedrepository-stats-"+escapeDot(managedRepository.id())).append(smallSpinnerImg()); } var curRepo=managedRepository; var url = "restServices/archivaServices/managedRepositoriesService/getManagedRepositoryStatistics/"+managedRepository.id(); @@ -462,16 +462,16 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery var archivaRepositoryStatistics=mapArchivaRepositoryStatistics(data); archivaRepositoryStatistics.managedRepository=curRepo; var mainContent = $("#main-content"); - mainContent.find("#managedrepository-stats-"+curRepo.id()).append($("#managed-repository-stats-tmpl").tmpl(archivaRepositoryStatistics)); - mainContent.find("#managedrepository-stats-img-"+curRepo.id()).attr("data-content",$(calculatePopoverId(curRepo)).html()); - mainContent.find("#managedrepository-stats-img-"+curRepo.id()).popover( + mainContent.find("#managedrepository-stats-"+escapeDot(curRepo.id())).append($("#managed-repository-stats-tmpl").tmpl(archivaRepositoryStatistics)); + mainContent.find("#managedrepository-stats-img-"+escapeDot(curRepo.id())).attr("data-content",$(calculatePopoverId(curRepo)).html()); + mainContent.find("#managedrepository-stats-img-"+escapeDot(curRepo.id())).popover( { placement: "left", html: true } ); - mainContent.find("#managedrepository-stats-img-"+curRepo.id()).popover('show'); + mainContent.find("#managedrepository-stats-img-"+escapeDot(curRepo.id())).popover('show'); removeSmallSpinnerImg(); }, error: function(data) { @@ -485,7 +485,7 @@ define("archiva.repositories",["jquery","i18n","jquery.tmpl","bootstrap","jquery } calculatePopoverId=function(managedRepository){ - return "#main-content #managedrepository-stats-"+managedRepository.id() + " #managedrepository-stats-"+managedRepository.id()+"-popover"; + return "#main-content #managedrepository-stats-"+escapeDot(managedRepository.id()) + " #managedrepository-stats-"+escapeDot(managedRepository.id())+"-popover"; } hideStats=function(managedRepository){