aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src
diff options
context:
space:
mode:
authorJenkins CI <ci@sonarsource.com>2015-03-26 08:00:57 +0100
committerJenkins CI <ci@sonarsource.com>2015-03-26 08:00:57 +0100
commit6b362931afc95b3a571bdcbbb355f316bcd38efd (patch)
treeda139d4ef3c91794494f62d3f5a6e200a9528daa /server/sonar-web/src
parent46dfa139944cb0ff94e5f05f18a55533b489ef10 (diff)
parentb8962af7e846abbd93e8840326b5e16a22c694bf (diff)
downloadsonarqube-6b362931afc95b3a571bdcbbb355f316bcd38efd.tar.gz
sonarqube-6b362931afc95b3a571bdcbbb355f316bcd38efd.zip
Automatic merge from branch-5.1
* origin/branch-5.1: Improve javadoc of org.sonar.api.utils.log.Logger apply rules feedback
Diffstat (limited to 'server/sonar-web/src')
-rw-r--r--server/sonar-web/src/main/hbs/coding-rules/coding-rules-rule-details.hbs2
-rw-r--r--server/sonar-web/src/main/js/coding-rules/rule-details-view.js9
-rw-r--r--server/sonar-web/src/main/js/nav/global-navbar-view.js6
3 files changed, 11 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-rule-details.hbs b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-rule-details.hbs
index c4eca54f63d..f889780e6c6 100644
--- a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-rule-details.hbs
+++ b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-rule-details.hbs
@@ -10,7 +10,7 @@
{{else}}
<button class="js-edit-custom" id="coding-rules-detail-custom-rule-change">{{t 'edit'}}</button>
{{/if}}
- <button class="js-delete" id="coding-rules-detail-rule-delete" class="button-red">{{t 'delete'}}</button>
+ <button class="button-red js-delete" id="coding-rules-detail-rule-delete" class="button-red">{{t 'delete'}}</button>
</div>
</div>
{{/if}}
diff --git a/server/sonar-web/src/main/js/coding-rules/rule-details-view.js b/server/sonar-web/src/main/js/coding-rules/rule-details-view.js
index 433acd69bf5..2f608db03a3 100644
--- a/server/sonar-web/src/main/js/coding-rules/rule-details-view.js
+++ b/server/sonar-web/src/main/js/coding-rules/rule-details-view.js
@@ -66,6 +66,7 @@ define([
if (this.model.get('isTemplate')) {
this.fetchCustomRules();
}
+ this.listenTo(this.options.app.state, 'change:selectedIndex', this.select);
},
onRender: function () {
@@ -129,12 +130,10 @@ define([
var that = this;
key('up', 'details', function () {
that.options.app.controller.selectPrev();
- that.options.app.controller.showDetailsForSelected();
return false;
});
key('down', 'details', function () {
that.options.app.controller.selectNext();
- that.options.app.controller.showDetailsForSelected();
return false;
});
key('left, backspace', 'details', function () {
@@ -177,6 +176,12 @@ define([
});
},
+ select: function () {
+ var selected = this.options.app.state.get('selectedIndex'),
+ selectedRule = this.options.app.list.at(selected);
+ this.options.app.controller.showDetails(selectedRule);
+ },
+
serializeData: function () {
var isManual = this.model.get('isManual'),
isCustom = this.model.has('templateKey'),
diff --git a/server/sonar-web/src/main/js/nav/global-navbar-view.js b/server/sonar-web/src/main/js/nav/global-navbar-view.js
index 6103084b73c..64b199752a1 100644
--- a/server/sonar-web/src/main/js/nav/global-navbar-view.js
+++ b/server/sonar-web/src/main/js/nav/global-navbar-view.js
@@ -83,9 +83,9 @@ define([
userName: window.SS.userName,
isUserAdmin: window.SS.isUserAdmin,
- canManageGlobalDashboards: window.SS.user != null,
- canManageIssueFilters: window.SS.user != null,
- canManageMeasureFilters: window.SS.user != null
+ canManageGlobalDashboards: !!window.SS.user,
+ canManageIssueFilters: !!window.SS.user,
+ canManageMeasureFilters: !!window.SS.user
});
}
});