]> source.dussan.org Git - sonarqube.git/commitdiff
highlight current profile in inheritance card
authorStas Vilchik <vilchiks@gmail.com>
Wed, 13 Jul 2016 12:50:52 +0000 (14:50 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Wed, 13 Jul 2016 13:32:13 +0000 (15:32 +0200)
server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.js
server/sonar-web/src/main/less/init/tables.less

index 5751a3d32397e38dfe4679a52857533754223c29..73decce4627928071004fec9ffe45a80c1445f5a 100644 (file)
@@ -18,6 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import React from 'react';
+import classNames from 'classnames';
 import ProfileInheritanceBox from './ProfileInheritanceBox';
 import ChangeParentView from '../views/ChangeParentView';
 import { ProfileType } from '../propTypes';
@@ -78,6 +79,12 @@ export default class ProfileInheritance extends React.Component {
   }
 
   render () {
+    const highlightCurrent = !this.state.loading &&
+        (this.state.ancestors.length > 0 || this.state.children.length > 0);
+    const currentClassName = classNames('js-inheritance-current', {
+      selected: highlightCurrent
+    });
+
     return (
         <div className="quality-profile-inheritance">
           <header className="big-spacer-bottom clearfix">
@@ -108,7 +115,7 @@ export default class ProfileInheritance extends React.Component {
                       profile={this.state.profile}
                       depth={this.state.ancestors.length}
                       displayLink={false}
-                      className="js-inheritance-current"/>
+                      className={currentClassName}/>
 
                   {this.state.children.map(child => (
                       <ProfileInheritanceBox
index 905993a73c2b6340d4720e455774854164f7b885..e157aebfbd4be65b41d8252a35b39bdad802af3a 100644 (file)
@@ -35,7 +35,7 @@ table {
 .even.selected a,
 .even.selected span:not(.rating),
 .odd.selected span:not(.rating) {
-  background-color: @lightBlue;
+  background-color: #d9edf7;
   color: @baseFontColor;
 }
 
@@ -89,7 +89,7 @@ table.data.zebra-hover > tbody > tr:hover {
 }
 
 table.data.zebra > tbody > tr.selected {
-  background-color: @lightBlue !important;
+  background-color: #d9edf7 !important;
 }
 
 table.data.condensed > tbody > tr > td {