]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2342 Improve code
authorFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Mon, 3 Dec 2012 10:01:30 +0000 (11:01 +0100)
committerFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Mon, 3 Dec 2012 10:01:30 +0000 (11:01 +0100)
sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_user_panel.html.erb
sonar-server/src/main/webapp/javascripts/recent-history.js

index e1727eb5a77fda86cc4fb425d3eab1750c6dbb3f..34c65ffdf01efd08e14e1d2edb1fc7df84f84618 100644 (file)
@@ -1,6 +1,6 @@
 <script>
   if (supports_html5_storage()) {
-    var sonarRecentHistory = new Sonar.RecentHistory(baseUrl);
+    var sonarRecentHistory = new Sonar.RecentHistory();
   }
   var shouldUpdateRecentHistory = true;
 </script>
index d7eabd53a3727bd0287e9aa6ed122536bab74ad4..08fd5b23e743a695470ada8ee2f283fe0c610d93 100644 (file)
@@ -1,7 +1,6 @@
 window.Sonar = {};
 
-Sonar.RecentHistory = function (applicationContext) {
-  this.appContext = applicationContext;
+Sonar.RecentHistory = function () {
 };
 
 Sonar.RecentHistory.prototype.getRecentHistory = function() {
@@ -50,10 +49,10 @@ Sonar.RecentHistory.prototype.populateRecentHistoryPanel = function () {
   } else {    
     recentHistory.forEach(function (resource) {
       historyLinksList.append('<li><img width="16" height="16" src="'
-                            + sonarRecentHistory.appContext
+                            + baseUrl
                             + resource['iconPath']
                             + '"><a href="'
-                            + sonarRecentHistory.appContext
+                            + baseUrl
                             + '/dashboard/index/'
                             + resource['key']
                             + '"> '