From 2c28cad1a7bb57da3b3aab5ba77bf7a911084725 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Thu, 15 May 2014 16:27:14 +0200 Subject: [PATCH] SONAR-5209 UI improvements --- .../coffee/component-viewer/header.coffee | 8 +++-- .../header/_coverage-header.hbs | 33 ++++++++++-------- .../header/_issues-header.hbs | 10 ++++++ .../src/main/less/component-viewer.less | 27 +++++++------- sonar-server/src/main/less/icons.less | 8 +++++ sonar-server/src/main/webapp/fonts/sonar.woff | Bin 16336 -> 16568 bytes 6 files changed, 56 insertions(+), 30 deletions(-) diff --git a/sonar-server/src/main/coffee/component-viewer/header.coffee b/sonar-server/src/main/coffee/component-viewer/header.coffee index 9e2d5140327..a6df231d1fc 100644 --- a/sonar-server/src/main/coffee/component-viewer/header.coffee +++ b/sonar-server/src/main/coffee/component-viewer/header.coffee @@ -87,11 +87,15 @@ define [ @toggleSetting e, @options.main.showWorkspace, @options.main.hideWorkspace - filterByLinesToCover: -> + filterByLinesToCover: (e) -> + @$('.component-viewer-header-expanded-bar-section-list .active').removeClass 'active' + $(e.currentTarget).addClass 'active' @options.main.filterLinesByLinesToCover() - filterByUncoveredLines: -> + filterByUncoveredLines: (e) -> + @$('.component-viewer-header-expanded-bar-section-list .active').removeClass 'active' + $(e.currentTarget).addClass 'active' @options.main.filterLinesByUncoveredLines() diff --git a/sonar-server/src/main/hbs/component-viewer/header/_coverage-header.hbs b/sonar-server/src/main/hbs/component-viewer/header/_coverage-header.hbs index 02fd444f3eb..e160d217d56 100644 --- a/sonar-server/src/main/hbs/component-viewer/header/_coverage-header.hbs +++ b/sonar-server/src/main/hbs/component-viewer/header/_coverage-header.hbs @@ -1,25 +1,28 @@
Unit Tests
@@ -27,17 +30,19 @@
Integration Tests
\ No newline at end of file diff --git a/sonar-server/src/main/hbs/component-viewer/header/_issues-header.hbs b/sonar-server/src/main/hbs/component-viewer/header/_issues-header.hbs index b502a06c1e3..f13b40a9ec7 100644 --- a/sonar-server/src/main/hbs/component-viewer/header/_issues-header.hbs +++ b/sonar-server/src/main/hbs/component-viewer/header/_issues-header.hbs @@ -4,14 +4,17 @@
  • Array designators "[]" should be located after the type in method signatures 2 +
  • Avoid Array Loops 1 +
  • Useless Operation On Immutable 4 +
  • @@ -20,22 +23,27 @@
  • {{t 'severity.BLOCKER'}} {{component.measures.blocker_issues}} +
  • {{t 'severity.CRITICAL'}} {{component.measures.critical_issues}} +
  • {{t 'severity.MAJOR'}} {{component.measures.major_issues}} +
  • {{t 'severity.MINOR'}} {{component.measures.minor_issues}} +
  • {{t 'severity.INFO'}} {{component.measures.info_issues}} +
  • @@ -43,10 +51,12 @@ \ No newline at end of file diff --git a/sonar-server/src/main/less/component-viewer.less b/sonar-server/src/main/less/component-viewer.less index 71d22027155..e5aec7cee48 100644 --- a/sonar-server/src/main/less/component-viewer.less +++ b/sonar-server/src/main/less/component-viewer.less @@ -408,26 +408,19 @@ display: none; .clearfix; margin-top: -1px; - padding: 10px; border: 1px solid @barBorderColor; border-top: none; background-color: #fff; } .component-viewer-header-expanded-bar-section { - float: left; - min-width: 150px; - max-width: 250px; -} - -.component-viewer-header-expanded-bar-section + .component-viewer-header-expanded-bar-section { - margin-left: 20px; - padding-left: 20px; - border-left: 1px solid @barBorderColor; + display: inline-block; + vertical-align: top; + width: 250px; } .component-viewer-header-expanded-bar-section-title { - margin-bottom: 6px; + padding: 10px 10px 6px 10px; color: #777; font-size: @smallFontSize; } @@ -437,21 +430,27 @@ & > li > .item { position: relative; display: block; - padding: 2px 25px 2px 5px; + padding: 4px 60px 4px 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; & > .number { position: absolute; - right: 5px; + right: 25px; + } + + & > i { + position: absolute; + right: 10px; } } - & > li > a { + & > li > a.item { .trans; &:hover { background-color: @barBackgroundColor; } + &:active, &.active { background-color: @lightBlue; } } } diff --git a/sonar-server/src/main/less/icons.less b/sonar-server/src/main/less/icons.less index 72522d1336f..be2938b5eb6 100644 --- a/sonar-server/src/main/less/icons.less +++ b/sonar-server/src/main/less/icons.less @@ -429,6 +429,14 @@ a[class^="icon-"], a[class*=" icon-"] { content: "\f08e"; font-size: @iconSmallFontSize; } +.icon-chevron-left:before { + content: "\f104"; + font-size: @iconSmallFontSize; +} +.icon-chevron-right:before { + content: "\f105"; + font-size: @iconSmallFontSize; +} /* diff --git a/sonar-server/src/main/webapp/fonts/sonar.woff b/sonar-server/src/main/webapp/fonts/sonar.woff index 68c08a52534dc22adc2ddd910f5823b6624b5f23..fac51f900b880460f70238175c43f630581c0faf 100755 GIT binary patch delta 616 zcmY+C!D|yi6vp2qyX~ZvY?P*l&;`MwQmWmwX&cNY23aGB8nHq2Ai8KVmuv$~FrpAe z$Ruo&O*f}&4wgM1aS$gqxB)u>-4WQq{hHFCpHUG=&IWv#!GXNP8 zI`$^)yJ;>Xi+{r&x}!jL(Y%4|H`a4Po+nXn79l_)g7vr%9hS~zbA=MJOXw94`ZALm zc$G6tXm~t}O#^)y=fN^_i^!0ZLqZ#uk9PA*%LN?%;cE9(P*YR@&+J~@!G~My!9F<2 z4N{ZHS#qKCflQJ?EmBN{wOPLH8TXz5gR9;<0qu1-6yBVEAIZ!;o4*@<*Lm(;(8_-f zy1#y^LAz38RYrToUePV~3UY(hnO#9zsaC0F$&9fYmNsIC_MW;ex$4v$yJMQrwf@DTiLdD~C8|s)suEJb{}#OcM-bs# zx{n9r%Gl#82hLno^zSe%2@Cl6==R3$mnY-%#Neg)79|#hP=h?1P>Ip0BupMk;t0s|KV5ZHGxFit*bD>hMwtKMo01B2C;xh`UC{=xc2 z3=GyQfC>^om~Rr_rsUkj0tN;f4h9BB9uQ7y5`UGRSPT@i6#=RNii5F0MrvXTP)r8M zHv?g&na`CofPz4=5FlR#ggLlbd@^!NDu7}@%m^}*~5)7@Q}&Fm`Uf z$f(0OnVngY*@3}nvNm%ykD;^?t8t&{EwgRre>QJp4mQ|)-b9^)hv5fMs}+L+0}F%H zWF}kP$%eKzlk;t@cs2N?`6c-N@$F<_1_zVL{1*n&S h;rxt?!7zHVf}J^|)8q)d50eAzWf`3|=h=HP0s!^UTfG1P -- 2.39.5