aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-07-28 13:40:37 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-07-28 13:41:48 +0200
commit13e8b934b5c229ef5eada4421873d370431cbe9d (patch)
tree56852c7107a2554c1cfdb24ad336dd048a080943 /server
parent2c80f051d983c2fd2dab4220223813cc836dc68e (diff)
downloadsonarqube-13e8b934b5c229ef5eada4421873d370431cbe9d.tar.gz
sonarqube-13e8b934b5c229ef5eada4421873d370431cbe9d.zip
highlight profile changelog when using permalink
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/controller.js2
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js12
-rw-r--r--server/sonar-web/src/main/less/components/ui.less10
3 files changed, 23 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/controller.js b/server/sonar-web/src/main/js/apps/quality-profiles/controller.js
index 282d398dc3f..987cb0b3728 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/controller.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/controller.js
@@ -93,6 +93,8 @@ define([
anchor: that.anchor
});
that.options.app.layout.detailsRegion.show(profileDetailsView);
+
+ that.anchor = null;
});
},
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js
index 108abbf2684..112c5b39b96 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js
@@ -37,7 +37,8 @@ define([
},
modelEvents: {
- 'change': 'render'
+ 'change': 'render',
+ 'flashChangelog': 'flashChangelog'
},
events: {
@@ -53,6 +54,7 @@ define([
this.comparisonRegion.show(new ProfileComparisonView({ model: this.model }));
if (this.options.anchor === 'changelog') {
this.scrollToChangelog();
+ this.flashChangelog();
}
if (this.options.anchor === 'comparison') {
this.scrollToComparison();
@@ -151,6 +153,14 @@ define([
});
},
+ flashChangelog: function () {
+ var changelogEl = this.$(this.changelogRegion.el);
+ changelogEl.addClass('flash in');
+ setTimeout(function () {
+ changelogEl.removeClass('in');
+ }, 2000);
+ },
+
serializeData: function () {
var key = this.model.get('key'),
rulesSearchUrl = '/coding_rules#qprofile=' + encodeURIComponent(key) + '|activation=true';
diff --git a/server/sonar-web/src/main/less/components/ui.less b/server/sonar-web/src/main/less/components/ui.less
index 86799b7c71f..a9bc85644df 100644
--- a/server/sonar-web/src/main/less/components/ui.less
+++ b/server/sonar-web/src/main/less/components/ui.less
@@ -225,3 +225,13 @@
border-color: @blue;
}
}
+
+
+.flash {
+ background-color: transparent;
+ .trans(all, 0.5s ease);
+
+ &.in {
+ background-color: #fcf8e3;
+ }
+}