]> source.dussan.org Git - sonarqube.git/commitdiff
highlight profile changelog when using permalink
authorStas Vilchik <vilchiks@gmail.com>
Tue, 28 Jul 2015 11:40:37 +0000 (13:40 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Tue, 28 Jul 2015 11:41:48 +0000 (13:41 +0200)
server/sonar-web/src/main/js/apps/quality-profiles/controller.js
server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js
server/sonar-web/src/main/less/components/ui.less

index 282d398dc3fbaf41bf2f3ac989a97a1669044a5c..987cb0b3728e76209d086b68df2942a54d47dac3 100644 (file)
@@ -93,6 +93,8 @@ define([
           anchor: that.anchor
         });
         that.options.app.layout.detailsRegion.show(profileDetailsView);
+
+        that.anchor = null;
       });
     },
 
index 108abbf2684aca84e201ec003a974f23c537900f..112c5b39b965e49071f87eb77db9036f764dca76 100644 (file)
@@ -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';
index 86799b7c71fa2d0cc391155e54e74c61863b5de5..a9bc85644df527ed55ceb9f8085bc1029b21c5bd 100644 (file)
     border-color: @blue;
   }
 }
+
+
+.flash {
+  background-color: transparent;
+  .trans(all, 0.5s ease);
+
+  &.in {
+    background-color: #fcf8e3;
+  }
+}