From: Fabrice Bellingard Date: Wed, 21 Nov 2012 11:27:37 +0000 (+0100) Subject: SONAR-2342 Don't display if browser does not support HTML5 localstorage X-Git-Tag: 3.4~307 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0ac1ccc3e34a7c1f54ecd6d586aadbdc35492f81;p=sonarqube.git SONAR-2342 Don't display if browser does not support HTML5 localstorage --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_resource_history.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_resource_history.html.erb index 46937d5d91b..ae8dfd5f849 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_resource_history.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_resource_history.html.erb @@ -1,17 +1,24 @@ - + + \ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb index a5c092c063d..55724f08950 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb @@ -1,7 +1,9 @@ <%= render :partial => 'tabs' -%> diff --git a/sonar-server/src/main/webapp/javascripts/application.js b/sonar-server/src/main/webapp/javascripts/application.js index 345802d5411..adb76a2821a 100644 --- a/sonar-server/src/main/webapp/javascripts/application.js +++ b/sonar-server/src/main/webapp/javascripts/application.js @@ -327,4 +327,12 @@ Treemap.prototype.onLoaded = function (componentsSize) { function closeModalWindow() { $j('#modal').dialog('close'); return false; +} + +function supports_html5_storage() { + try { + return 'localStorage' in window && window['localStorage'] !== null; + } catch (e) { + return false; + } } \ No newline at end of file diff --git a/sonar-server/src/main/webapp/javascripts/recent-history.js b/sonar-server/src/main/webapp/javascripts/recent-history.js index 986bc362d43..ad734f5ce0b 100644 --- a/sonar-server/src/main/webapp/javascripts/recent-history.js +++ b/sonar-server/src/main/webapp/javascripts/recent-history.js @@ -6,7 +6,7 @@ Sonar.RecentHistory = function (applicationContext) { this.addTranslation = function (key, value) { this.translations[key] = value; return this; - } + }; }; Sonar.RecentHistory.prototype.getRecentHistory = function() { diff --git a/sonar-server/src/main/webapp/stylesheets/layout.css b/sonar-server/src/main/webapp/stylesheets/layout.css index a3ce8614e73..af735aeb47c 100644 --- a/sonar-server/src/main/webapp/stylesheets/layout.css +++ b/sonar-server/src/main/webapp/stylesheets/layout.css @@ -148,6 +148,10 @@ body, a { padding: 0 5px 0 0; } +#sonar_recent_history_dropdown { + max-width: none !important; +} + #sonar_recent_history_dropdown a { color: #000 !important; display: inline !important;