From 42e1a5230d542f96219dfc0752e221aa1685bbf1 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Wed, 13 Jul 2016 14:50:52 +0200 Subject: [PATCH] highlight current profile in inheritance card --- .../apps/quality-profiles/details/ProfileInheritance.js | 9 ++++++++- server/sonar-web/src/main/less/init/tables.less | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.js b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.js index 5751a3d3239..73decce4627 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritance.js @@ -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 (
@@ -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 => ( tbody > tr:hover { } table.data.zebra > tbody > tr.selected { - background-color: @lightBlue !important; + background-color: #d9edf7 !important; } table.data.condensed > tbody > tr > td { -- 2.39.5