aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/helpers/measures_helper.rb4
-rw-r--r--sonar-server/src/main/webapp/javascripts/application.js58
-rw-r--r--sonar-server/src/main/webapp/stylesheets/layout.css1
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;