]> source.dussan.org Git - archiva.git/commitdiff
escape in case of repo id with dot
authorOlivier Lamy <olamy@apache.org>
Mon, 10 Sep 2012 14:39:13 +0000 (14:39 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 10 Sep 2012 14:39:13 +0000 (14:39 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1382890 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js

index 29f89bd2e463560ce7fee972fb1c8b11a2aa420e..8123cc39b58fd7b354b45d4643413a2da2873307 100644 (file)
@@ -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){