diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2014-07-29 10:19:55 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2014-07-29 10:36:29 +0200 |
commit | 0e52f9b94431d39ec0daad9f1a3992d54187e9aa (patch) | |
tree | e9acea613b83de1cf3b2496949687fb08f39fc41 /server/sonar-web | |
parent | 4e8e3124d0c03f8cdb420627a33589a504ab4524 (diff) | |
download | sonarqube-0e52f9b94431d39ec0daad9f1a3992d54187e9aa.tar.gz sonarqube-0e52f9b94431d39ec0daad9f1a3992d54187e9aa.zip |
SONAR-5468 Improve rendering of duplications that are on the same file
Diffstat (limited to 'server/sonar-web')
-rw-r--r-- | server/sonar-web/src/main/hbs/component-viewer/cw-duplication-popup.hbs | 16 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/common/handlebars-extensions.js | 15 | ||||
-rw-r--r-- | server/sonar-web/src/main/less/icons.less | 5 | ||||
-rwxr-xr-x | server/sonar-web/src/main/webapp/fonts/sonar.eot | bin | 18568 -> 18360 bytes | |||
-rwxr-xr-x | server/sonar-web/src/main/webapp/fonts/sonar.svg | 1 | ||||
-rwxr-xr-x | server/sonar-web/src/main/webapp/fonts/sonar.ttf | bin | 18412 -> 18204 bytes | |||
-rwxr-xr-x | server/sonar-web/src/main/webapp/fonts/sonar.woff | bin | 18532 -> 18292 bytes |
7 files changed, 19 insertions, 18 deletions
diff --git a/server/sonar-web/src/main/hbs/component-viewer/cw-duplication-popup.hbs b/server/sonar-web/src/main/hbs/component-viewer/cw-duplication-popup.hbs index 8ae13b172a6..bf134d7fd62 100644 --- a/server/sonar-web/src/main/hbs/component-viewer/cw-duplication-popup.hbs +++ b/server/sonar-web/src/main/hbs/component-viewer/cw-duplication-popup.hbs @@ -2,19 +2,11 @@ <div class="bubble-popup-title">{{t 'component_viewer.transition.duplication'}}</div> {{#each duplications}} <div class="bubble-popup-section"> - {{#notEq file.project ../component.project}} - <div class="component-viewer-popup-label"> - <i class="icon-cross-project"></i> - {{file.projectName}} - {{#if file.subProjectName}} - / {{file.subProjectName}} - {{/if}} + {{#notEqComponents file ../component}} + <div class="component-viewer-popup-label" title="{{projectFullName file}}"> + <i class="icon-qualifier-trk"></i> {{projectFullName file}} </div> - {{else}} - {{#notEq file.subProject ../../component.subProject}} - <div class="component-viewer-popup-label">{{file.projectName}} / {{file.subProjectName}}</div> - {{/notEq}} - {{/notEq}} + {{/notEqComponents}} {{#notEq file.key ../component.key}} <a class="link-action" data-key="{{file.key}}" title="{{file.name}}"> diff --git a/server/sonar-web/src/main/js/common/handlebars-extensions.js b/server/sonar-web/src/main/js/common/handlebars-extensions.js index cf16e5968ca..1ef0bc46aa1 100644 --- a/server/sonar-web/src/main/js/common/handlebars-extensions.js +++ b/server/sonar-web/src/main/js/common/handlebars-extensions.js @@ -341,4 +341,19 @@ define(['handlebars', 'moment'], function (Handlebars, moment) { } }); + Handlebars.registerHelper('eqComponents', function (a, b, options) { + var notEq = a && b && ((a.project !== b.project) || (a.subProject !== b.subProject)); + return notEq ? options.inverse(this) : options.fn(this); + }); + + Handlebars.registerHelper('notEqComponents', function (a, b, options) { + var notEq = a && b && ((a.project !== b.project) || (a.subProject !== b.subProject)); + return notEq ? options.fn(this) : options.inverse(this); + }); + + Handlebars.registerHelper('projectFullName', function (component) { + var name = component.projectName + (component.subProjectName ? (' / ' + component.subProjectName) : ''); + return name; + }); + }); diff --git a/server/sonar-web/src/main/less/icons.less b/server/sonar-web/src/main/less/icons.less index 271a0045538..08b7cccc175 100644 --- a/server/sonar-web/src/main/less/icons.less +++ b/server/sonar-web/src/main/less/icons.less @@ -509,11 +509,6 @@ a[class^="icon-"], a[class*=" icon-"] { content: "\f016"; font-size: @iconFontSize; } -.icon-cross-project:before { - content: "\f0ec"; - color: @purple; - font-size: @iconFontSize; -} /* diff --git a/server/sonar-web/src/main/webapp/fonts/sonar.eot b/server/sonar-web/src/main/webapp/fonts/sonar.eot Binary files differindex ba3b9187a7f..6ca49648665 100755 --- a/server/sonar-web/src/main/webapp/fonts/sonar.eot +++ b/server/sonar-web/src/main/webapp/fonts/sonar.eot diff --git a/server/sonar-web/src/main/webapp/fonts/sonar.svg b/server/sonar-web/src/main/webapp/fonts/sonar.svg index 562f4b05bd8..9383951117a 100755 --- a/server/sonar-web/src/main/webapp/fonts/sonar.svg +++ b/server/sonar-web/src/main/webapp/fonts/sonar.svg @@ -67,7 +67,6 @@ <glyph unicode="" d="M585.143 265.143q0-14.857-10.857-25.714t-25.714-10.857h-512q-14.857 0-25.714 10.857t-10.857 25.714 10.857 25.714l256 256q10.857 10.857 25.714 10.857t25.714-10.857l256-256q10.857-10.857 10.857-25.714z" horiz-adv-x="585" /> <glyph unicode="" d="M365.714 704v-512q0-14.857-10.857-25.714t-25.714-10.857-25.714 10.857l-256 256q-10.857 10.857-10.857 25.714t10.857 25.714l256 256q10.857 10.857 25.714 10.857t25.714-10.857 10.857-25.714z" horiz-adv-x="366" /> <glyph unicode="" d="M329.143 448q0-14.857-10.857-25.714l-256-256q-10.857-10.857-25.714-10.857t-25.714 10.857-10.857 25.714v512q0 14.857 10.857 25.714t25.714 10.857 25.714-10.857l256-256q10.857-10.857 10.857-25.714z" horiz-adv-x="366" /> -<glyph unicode="" d="M1024 283.429v-109.714q0-7.429-5.429-12.857t-12.857-5.429h-786.286v-109.714q0-7.429-5.429-12.857t-12.857-5.429q-6.857 0-13.714 5.714l-182.286 182.857q-5.143 5.143-5.143 12.571 0 8 5.143 13.143l182.857 182.857q5.143 5.143 13.143 5.143 7.429 0 12.857-5.429t5.429-12.857v-109.714h786.286q7.429 0 12.857-5.429t5.429-12.857zM1024 594.286q0-8-5.143-13.143l-182.857-182.857q-5.143-5.143-13.143-5.143-7.429 0-12.857 5.429t-5.429 12.857v109.714h-786.286q-7.429 0-12.857 5.429t-5.429 12.857v109.714q0 7.429 5.429 12.857t12.857 5.429h786.286v109.714q0 8 5.143 13.143t13.143 5.143q6.857 0 13.714-5.714l182.286-182.286q5.143-5.143 5.143-13.143z" /> <glyph unicode="" d="M731.643 283.429v-36.57c0-5.334-1.714-9.715-5.143-13.144s-7.81-5.143-13.143-5.143h-402.286c-5.333 0-9.714 1.714-13.143 5.143s-5.143 7.81-5.143 13.144v36.57c0 5.334 1.714 9.715 5.143 13.144s7.81 5.143 13.143 5.143h402.287c5.333 0 9.714-1.714 13.143-5.143s5.142-7.81 5.142-13.144zM731.643 429.714v-36.571c0-5.333-1.714-9.714-5.143-13.143s-7.81-5.143-13.143-5.143h-402.286c-5.333 0-9.714 1.714-13.143 5.143s-5.143 7.81-5.143 13.143v36.571c0 5.333 1.714 9.715 5.143 13.144s7.81 5.143 13.143 5.143h402.287c5.333 0 9.714-1.715 13.143-5.143s5.142-7.811 5.142-13.144zM219.643 82.286h585.143v438.857h-237.714c-15.238 0-28.19 5.334-38.857 16s-16 23.619-16 38.857v237.714h-292.571l-0.001-731.428zM585.357 594.286h214.856c-3.81 11.047-7.999 18.857-12.571 23.429l-178.856 178.857c-4.571 4.571-12.381 8.761-23.429 12.571v-214.857zM877.929 576v-512c0-15.238-5.333-28.19-16-38.857s-23.618-16-38.856-16h-621.715c-15.238 0-28.19 5.334-38.857 16s-16 23.619-16 38.857v768c0 15.238 5.333 28.19 16 38.857s23.619 16 38.857 16h365.714c15.237 0 32-3.81 50.286-11.429s32.762-16.762 43.429-27.429l178.286-178.286c10.667-10.667 19.81-25.143 27.429-43.429s11.429-35.048 11.429-50.286l-0.002 0.002z" horiz-adv-x="1019" /> <glyph unicode="" d="M358.286 173.714q0-7.429-5.714-13.143l-28.571-28.571q-5.714-5.714-13.143-5.714t-13.143 5.714l-266.286 266.286q-5.714 5.714-5.714 13.143t5.714 13.143l266.286 266.286q5.714 5.714 13.143 5.714t13.143-5.714l28.571-28.571q5.714-5.714 5.714-13.143t-5.714-13.143l-224.571-224.571 224.571-224.571q5.714-5.714 5.714-13.143zM577.714 173.714q0-7.429-5.714-13.143l-28.571-28.571q-5.714-5.714-13.143-5.714t-13.143 5.714l-266.286 266.286q-5.714 5.714-5.714 13.143t5.714 13.143l266.286 266.286q5.714 5.714 13.143 5.714t13.143-5.714l28.571-28.571q5.714-5.714 5.714-13.143t-5.714-13.143l-224.571-224.571 224.571-224.571q5.714-5.714 5.714-13.143z" horiz-adv-x="585" /> <glyph unicode="" d="M340 411.429q0-7.429-5.714-13.143l-266.286-266.286q-5.714-5.714-13.143-5.714t-13.143 5.714l-28.571 28.571q-5.714 5.714-5.714 13.143t5.714 13.143l224.571 224.571-224.571 224.571q-5.714 5.714-5.714 13.143t5.714 13.143l28.571 28.571q5.714 5.714 13.143 5.714t13.143-5.714l266.286-266.286q5.714-5.714 5.714-13.143zM559.429 411.429q0-7.429-5.714-13.143l-266.286-266.286q-5.714-5.714-13.143-5.714t-13.143 5.714l-28.571 28.571q-5.714 5.714-5.714 13.143t5.714 13.143l224.571 224.571-224.571 224.571q-5.714 5.714-5.714 13.143t5.714 13.143l28.571 28.571q5.714 5.714 13.143 5.714t13.143-5.714l266.286-266.286q5.714-5.714 5.714-13.143z" horiz-adv-x="585" /> diff --git a/server/sonar-web/src/main/webapp/fonts/sonar.ttf b/server/sonar-web/src/main/webapp/fonts/sonar.ttf Binary files differindex cf9bd8fb9a2..6d672598d25 100755 --- a/server/sonar-web/src/main/webapp/fonts/sonar.ttf +++ b/server/sonar-web/src/main/webapp/fonts/sonar.ttf diff --git a/server/sonar-web/src/main/webapp/fonts/sonar.woff b/server/sonar-web/src/main/webapp/fonts/sonar.woff Binary files differindex b32c6ddbdba..dd58a26a975 100755 --- a/server/sonar-web/src/main/webapp/fonts/sonar.woff +++ b/server/sonar-web/src/main/webapp/fonts/sonar.woff |