aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-03-23 09:05:25 +0100
committerStas Vilchik <vilchiks@gmail.com>2015-03-23 09:05:25 +0100
commitd871fdd2dda38b9768367c3ab6ba71fba3ccb10b (patch)
tree2be95c5a962956e497f77467de9ebbd4efaf9e97 /server/sonar-web/src/main/js
parent9e7c5906972bf84e48fd31db071f928665906278 (diff)
downloadsonarqube-d871fdd2dda38b9768367c3ab6ba71fba3ccb10b.tar.gz
sonarqube-d871fdd2dda38b9768367c3ab6ba71fba3ccb10b.zip
fix quality flaws
Diffstat (limited to 'server/sonar-web/src/main/js')
-rw-r--r--server/sonar-web/src/main/js/coding-rules/facets/characteristic-facet.js1
-rw-r--r--server/sonar-web/src/main/js/components/navigator/models/state.js12
-rw-r--r--server/sonar-web/src/main/js/sortable.js2
-rw-r--r--server/sonar-web/src/main/js/source-viewer/measures-overlay.js1
-rw-r--r--server/sonar-web/src/main/js/source-viewer/popups/duplication-popup.js1
5 files changed, 8 insertions, 9 deletions
diff --git a/server/sonar-web/src/main/js/coding-rules/facets/characteristic-facet.js b/server/sonar-web/src/main/js/coding-rules/facets/characteristic-facet.js
index 5275d260317..c7485ba0572 100644
--- a/server/sonar-web/src/main/js/coding-rules/facets/characteristic-facet.js
+++ b/server/sonar-web/src/main/js/coding-rules/facets/characteristic-facet.js
@@ -48,7 +48,6 @@ define([
obj.has_debt_characteristic = null;
obj[property] = this.getValue();
}
- console.log(obj);
this.options.app.state.updateFilter(obj);
},
diff --git a/server/sonar-web/src/main/js/components/navigator/models/state.js b/server/sonar-web/src/main/js/components/navigator/models/state.js
index 0f0ddf5f4ca..c9e4fcf6b85 100644
--- a/server/sonar-web/src/main/js/components/navigator/models/state.js
+++ b/server/sonar-web/src/main/js/components/navigator/models/state.js
@@ -20,11 +20,13 @@
define(function () {
return Backbone.Model.extend({
- defaults: {
- page: 1,
- maxResultsReached: false,
- query: {},
- facets: []
+ defaults: function () {
+ return {
+ page: 1,
+ maxResultsReached: false,
+ query: {},
+ facets: []
+ };
},
nextPage: function () {
diff --git a/server/sonar-web/src/main/js/sortable.js b/server/sonar-web/src/main/js/sortable.js
index cfe3c07a89e..b9100ed585d 100644
--- a/server/sonar-web/src/main/js/sortable.js
+++ b/server/sonar-web/src/main/js/sortable.js
@@ -39,7 +39,7 @@
}).get();
Array.prototype.sort.call(sortArray, function(a, b) {
- if (isNaN(a.value) || isNaN(a.value)) {
+ if (isNaN(a.value) || isNaN(b.value)) {
return order * (a.value > b.value ? 1 : -1);
} else {
return order * (a.value - b.value);
diff --git a/server/sonar-web/src/main/js/source-viewer/measures-overlay.js b/server/sonar-web/src/main/js/source-viewer/measures-overlay.js
index 5887c20af28..37822ac56bc 100644
--- a/server/sonar-web/src/main/js/source-viewer/measures-overlay.js
+++ b/server/sonar-web/src/main/js/source-viewer/measures-overlay.js
@@ -128,7 +128,6 @@ define([
measures: measures,
measuresToDisplay: that.prepareMetrics(metrics)
});
- console.log(that.model.get('measuresToDisplay'));
});
},
diff --git a/server/sonar-web/src/main/js/source-viewer/popups/duplication-popup.js b/server/sonar-web/src/main/js/source-viewer/popups/duplication-popup.js
index e1479daa14d..4564bfd8d1d 100644
--- a/server/sonar-web/src/main/js/source-viewer/popups/duplication-popup.js
+++ b/server/sonar-web/src/main/js/source-viewer/popups/duplication-popup.js
@@ -35,7 +35,6 @@ define([
goToFile: function (e) {
var uuid = $(e.currentTarget).data('uuid'),
line = $(e.currentTarget).data('line');
- console.log(uuid);
if (Workspace == null) {
Workspace = require('workspace/main');
}