diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-12-05 17:28:37 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-12-05 17:29:03 +0100 |
commit | d1a65e8c6cd5c5f3893e706b44e0ae9b7d68702b (patch) | |
tree | 998b15d425c6abf2b1503d627f7cab6912b3c83e /sonar-server | |
parent | afa80816370b0d9fa4e4f4272242330f3a2bba6b (diff) | |
download | sonarqube-d1a65e8c6cd5c5f3893e706b44e0ae9b7d68702b.tar.gz sonarqube-d1a65e8c6cd5c5f3893e706b44e0ae9b7d68702b.zip |
Fix treemaps on IE8
Diffstat (limited to 'sonar-server')
3 files changed, 28 insertions, 35 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/measures_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/measures_helper.rb index 5c8ceb97160..accc20e7455 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/measures_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/measures_helper.rb @@ -39,8 +39,10 @@ module MeasuresHelper measure = result.measure(column.metric) if column.period format_variation(measure, :index => column.period, :style => 'light') - else + elsif column.metric.numeric? format_measure(measure) + trend_icon(measure, :empty => true) + else + format_measure(measure) end elsif column.key=='name' diff --git a/sonar-server/src/main/webapp/javascripts/application.js b/sonar-server/src/main/webapp/javascripts/application.js index ccb3314dd39..8cf2fb24167 100644 --- a/sonar-server/src/main/webapp/javascripts/application.js +++ b/sonar-server/src/main/webapp/javascripts/application.js @@ -163,20 +163,10 @@ var Treemap = function (id, sizeMetric, colorMetric) { this.colorMetric = colorMetric; this.breadcrumb = []; treemaps[id] = this; - this.rootNode().height(this.rootNode().width() * 0.6); + this.rootNode().height(this.rootNode().width() * 0.55); this.initNodes(); }; -Treemap.prototype.changeSizeMetric = function (metric) { - this.sizeMetric = metric; - this.load(); - return false; -}; -Treemap.prototype.changeColorMetric = function (metric) { - this.colorMetric = metric; - this.load(); - return false; -}; Treemap.prototype.currentContext = function () { if (this.breadcrumb.length > 0) { return this.breadcrumb[this.breadcrumb.length - 1]; @@ -215,31 +205,33 @@ Treemap.prototype.initNodes = function () { }); }); $j('#tm-' + this.id).find('[rid]').each(function (index) { - this.on("contextmenu", function (event) { - event.preventDefault(); - // right click - if (self.breadcrumb.length > 1) { - self.breadcrumb.pop(); + this.on("contextmenu", function (event) { + event.stopPropagation(); + event.preventDefault(); + // right click + if (self.breadcrumb.length > 1) { + self.breadcrumb.pop(); + self.load(); + } else { + $j("#tm-loading-" + self.id).show(); + location.reload(); + } + return false; + }); + + this.on("click", function (event) { + var source = $j(this); + var rid = source.attr('rid'); + var has_leaves = !!(source.attr('l')); + if (!has_leaves) { + var context = new TreemapContext(rid, source.text()); + self.breadcrumb.push(context); self.load(); - } else { - location.reload(); } - return false; - }); - this.on("click", function (event) { - var source = $j(this); - var rid = source.attr('rid'); - var has_leaves = !!(source.attr('l')); - if (!has_leaves) { - var context = new TreemapContext(rid, source.text()); - self.breadcrumb.push(context); - self.load(); - } - } - ); - } - ); + } + ) + }); }; (function ($j) { diff --git a/sonar-server/src/main/webapp/stylesheets/layout.css b/sonar-server/src/main/webapp/stylesheets/layout.css index ad42bfad1b0..e65d973ceee 100644 --- a/sonar-server/src/main/webapp/stylesheets/layout.css +++ b/sonar-server/src/main/webapp/stylesheets/layout.css @@ -275,7 +275,6 @@ ul.sidebar select, ul.sidebar input { } .page-split-right { - position: relative; display: block; margin: 0; vertical-align: top; |