aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabrice Bellingard <bellingard@gmail.com>2011-09-07 10:50:29 +0200
committerFabrice Bellingard <bellingard@gmail.com>2011-09-07 10:50:29 +0200
commit633d579416a0c44bc3ed32d27dc68e8422346ce7 (patch)
tree64700f8029a8492d2ffba392c521f0219a67bd60
parent63329ceca3d640a65c1507853eb1ff9892ad2425 (diff)
downloadsonarqube-633d579416a0c44bc3ed32d27dc68e8422346ce7.tar.gz
sonarqube-633d579416a0c44bc3ed32d27dc68e8422346ce7.zip
SONAR-2074 Remove the "Date" label.
Based on Simon's feedback, it's true that it's useless and does not help much on usability.
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/timeline.html.erb7
-rwxr-xr-xsonar-server/src/main/webapp/javascripts/protovis-sonar.js11
2 files changed, 1 insertions, 17 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/timeline.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/timeline.html.erb
index 945ee82d7c1..58f6fe9376d 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/timeline.html.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/timeline.html.erb
@@ -108,11 +108,6 @@
end
js_events = js_events.chomp(',') + "]"
end
-
- # And prepare translations for labels
- js_translations = "{"
- js_translations += "\"date\":\"" + message("date") + "\""
- js_translations += "}"
%>
@@ -135,14 +130,12 @@
var data = <%= js_data -%>;
var snapshots = <%= js_snapshots -%>;
var metrics = <%= js_metrics -%>;
- var translations = <%= js_translations -%>;
var events = <%= js_events ? js_events : "null" -%>;
var timeline = new SonarWidgets.Timeline('timeline-chart-<%= widget.id -%>')
.height(<%= chartHeight -%>)
.data(data)
.snapshots(snapshots)
.metrics(metrics)
- .translations(translations)
.events(events);
timeline.render();
diff --git a/sonar-server/src/main/webapp/javascripts/protovis-sonar.js b/sonar-server/src/main/webapp/javascripts/protovis-sonar.js
index 7f9340638ab..0aee692325c 100755
--- a/sonar-server/src/main/webapp/javascripts/protovis-sonar.js
+++ b/sonar-server/src/main/webapp/javascripts/protovis-sonar.js
@@ -13,7 +13,6 @@ window.SonarWidgets = {}
* maps must be sorted by ascending date.
* - events: array of maps {sid,d,l[{n}]} where sid is the snapshot id corresponding to an event, d is the (JS) date of the event, and l
* is an array containing the different event names for this date.
- * - translations: array of l10n words/expressions to display in the chart
* - height: height of the chart area (notice header excluded). Defaults to 80.
*
* Example: displays 2 metrics:
@@ -32,14 +31,12 @@ var events = [
{sid:1,d:d(2011,5,15,0,1,0),l:[{n:"0.6-SNAPSHOT"},{n:"Sun checks"}]},
{sid:30,d:d(2011,6,21,0,1,0),l:[{n:"0.7-SNAPSHOT"}]}
];
-var translations = {"date":"Date"};
var timeline = new SonarWidgets.Timeline('timeline-chart-20')
.height(160)
.data(data)
.snapshots(snapshots)
.metrics(metrics)
- .translations(translations)
.events(events);
timeline.render();
</code>
@@ -52,7 +49,6 @@ SonarWidgets.Timeline = function (divId) {
this.wData;
this.wSnapshots;
this.wMetrics;
- this.wTranslations;
this.wEvents;
this.height = function(height) {
this.wHeight = height;
@@ -70,10 +66,6 @@ SonarWidgets.Timeline = function (divId) {
this.wMetrics = metrics;
return this;
}
- this.translations = function(translations) {
- this.wTranslations = translations;
- return this;
- }
this.events = function(events) {
this.wEvents = events;
return this;
@@ -85,7 +77,6 @@ SonarWidgets.Timeline.prototype.render = function() {
var trendData = this.wData;
var metrics = this.wMetrics;
var snapshots = this.wSnapshots;
- var translations = this.wTranslations;
var events = this.wEvents;
var widgetDiv = $(this.wDivId);
@@ -159,7 +150,7 @@ SonarWidgets.Timeline.prototype.render = function() {
.left(w/2)
.top(16)
.font(footerFont)
- .text(function() {return translations.date + ": " + snapshots[idx].d;});
+ .text(function() {return snapshots[idx].d;});
/* The event labels */
if (events) {