diff options
Diffstat (limited to 'server/sonar-web')
8 files changed, 87 insertions, 16 deletions
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-rule-meta.hbs b/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-rule-meta.hbs index 1b3603cdef4..41d6a6999a1 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-rule-meta.hbs +++ b/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-rule-meta.hbs @@ -2,8 +2,20 @@ <div class="page-actions"> <span class="note">{{key}}</span> - <a class="coding-rules-detail-permalink icon-link spacer-left" target="_blank" href="{{permalink}}" - data-toggle="tooltip" data-placement="left" title="Rule permalink"></a> + <a class="coding-rules-detail-permalink link-no-underline spacer-left" target="_blank" href="{{permalink}}" + data-toggle="tooltip" data-placement="left" title="Rule permalink"> + <svg + class="text-text-top" + xmlns="http://www.w3.org/2000/svg" + height=14 + width=14 + viewBox="0 0 16 16"> + <path + fill="currentColor" + d="M13.501 11.429q0-0.357-0.25-0.607l-1.857-1.857q-0.25-0.25-0.607-0.25-0.375 0-0.643 0.286 0.027 0.027 0.17 0.165t0.192 0.192 0.134 0.17 0.116 0.228 0.031 0.246q0 0.357-0.25 0.607t-0.607 0.25q-0.134 0-0.246-0.031t-0.228-0.116-0.17-0.134-0.192-0.192-0.165-0.17q-0.295 0.277-0.295 0.652 0 0.357 0.25 0.607l1.839 1.848q0.241 0.241 0.607 0.241 0.357 0 0.607-0.232l1.313-1.304q0.25-0.25 0.25-0.598zM7.224 5.134q0-0.357-0.25-0.607l-1.839-1.848q-0.25-0.25-0.607-0.25-0.348 0-0.607 0.241l-1.313 1.304q-0.25 0.25-0.25 0.598 0 0.357 0.25 0.607l1.857 1.857q0.241 0.241 0.607 0.241 0.375 0 0.643-0.277-0.027-0.027-0.17-0.165t-0.192-0.192-0.134-0.17-0.116-0.228-0.031-0.246q0-0.357 0.25-0.607t0.607-0.25q0.134 0 0.246 0.031t0.228 0.116 0.17 0.134 0.192 0.192 0.165 0.17q0.295-0.277 0.295-0.652zM15.215 11.429q0 1.071-0.759 1.813l-1.313 1.304q-0.741 0.741-1.813 0.741-1.080 0-1.821-0.759l-1.839-1.848q-0.741-0.741-0.741-1.813 0-1.098 0.786-1.866l-0.786-0.786q-0.768 0.786-1.857 0.786-1.071 0-1.821-0.75l-1.857-1.857q-0.75-0.75-0.75-1.821t0.759-1.813l1.313-1.304q0.741-0.741 1.813-0.741 1.080 0 1.821 0.759l1.839 1.848q0.741 0.741 0.741 1.813 0 1.098-0.786 1.866l0.786 0.786q0.768-0.786 1.857-0.786 1.071 0 1.821 0.75l1.857 1.857q0.75 0.75 0.75 1.821z" + /> + </svg> + </a> <a class="js-rule-filter link-no-underline spacer-left" href="#"> <i class="icon-filter icon-half-transparent"></i> <i class="icon-dropdown"></i> diff --git a/server/sonar-web/src/main/js/apps/web-api/components/Action.js b/server/sonar-web/src/main/js/apps/web-api/components/Action.js index 0d09aeb6973..a0f5999bb9d 100644 --- a/server/sonar-web/src/main/js/apps/web-api/components/Action.js +++ b/server/sonar-web/src/main/js/apps/web-api/components/Action.js @@ -27,6 +27,7 @@ import ResponseExample from './ResponseExample'; import ActionChangelog from './ActionChangelog'; import DeprecatedBadge from './DeprecatedBadge'; import InternalBadge from './InternalBadge'; +import LinkIcon from '../../../components/icons-components/LinkIcon'; import { TooltipsContainer } from '../../../components/mixins/tooltips-mixin'; import type { Action as ActionType, Domain as DomainType } from '../../../api/web-api'; @@ -89,7 +90,11 @@ export default class Action extends React.PureComponent { <div id={actionKey} className="web-api-action"> <TooltipsContainer> <header className="web-api-action-header"> - <Link to={{ pathname: '/web_api/' + actionKey }} className="spacer-right icon-link" /> + <Link + to={{ pathname: '/web_api/' + actionKey }} + className="spacer-right link-no-underline"> + <LinkIcon /> + </Link> <h3 className="web-api-action-title"> {verb} {actionKey} diff --git a/server/sonar-web/src/main/js/components/charts/TreeMapRect.js b/server/sonar-web/src/main/js/components/charts/TreeMapRect.js index 3ce42543291..871adc39980 100644 --- a/server/sonar-web/src/main/js/components/charts/TreeMapRect.js +++ b/server/sonar-web/src/main/js/components/charts/TreeMapRect.js @@ -21,6 +21,7 @@ import React from 'react'; import classNames from 'classnames'; import { scaleLinear } from 'd3-scale'; +import LinkIcon from '../icons-components/LinkIcon'; import Tooltip from '../controls/Tooltip'; const SIZE_SCALE = scaleLinear().domain([3, 15]).range([11, 18]).clamp(true); @@ -60,7 +61,7 @@ export default class TreeMapRect extends React.PureComponent { if (width >= 24 && height >= 24 && (width >= 48 || height >= 50)) { return ( <a className="treemap-link" href={link} onClick={this.handleLinkClick}> - <span className="icon-link" /> + <LinkIcon /> </a> ); } diff --git a/server/sonar-web/src/main/js/components/icons-components/LinkIcon.js b/server/sonar-web/src/main/js/components/icons-components/LinkIcon.js new file mode 100644 index 00000000000..b94b53d12f4 --- /dev/null +++ b/server/sonar-web/src/main/js/components/icons-components/LinkIcon.js @@ -0,0 +1,40 @@ +/* + * SonarQube + * Copyright (C) 2009-2017 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +// @flow +import React from 'react'; + +type Props = { className?: string, size?: number }; + +export default function LinkIcon({ className, size = 14 }: Props) { + /* eslint-disable max-len */ + return ( + <svg + xmlns="http://www.w3.org/2000/svg" + className={className} + height={size} + width={size} + viewBox="0 0 16 16"> + <path + fill="currentColor" + d="M13.501 11.429q0-0.357-0.25-0.607l-1.857-1.857q-0.25-0.25-0.607-0.25-0.375 0-0.643 0.286 0.027 0.027 0.17 0.165t0.192 0.192 0.134 0.17 0.116 0.228 0.031 0.246q0 0.357-0.25 0.607t-0.607 0.25q-0.134 0-0.246-0.031t-0.228-0.116-0.17-0.134-0.192-0.192-0.165-0.17q-0.295 0.277-0.295 0.652 0 0.357 0.25 0.607l1.839 1.848q0.241 0.241 0.607 0.241 0.357 0 0.607-0.232l1.313-1.304q0.25-0.25 0.25-0.598zM7.224 5.134q0-0.357-0.25-0.607l-1.839-1.848q-0.25-0.25-0.607-0.25-0.348 0-0.607 0.241l-1.313 1.304q-0.25 0.25-0.25 0.598 0 0.357 0.25 0.607l1.857 1.857q0.241 0.241 0.607 0.241 0.375 0 0.643-0.277-0.027-0.027-0.17-0.165t-0.192-0.192-0.134-0.17-0.116-0.228-0.031-0.246q0-0.357 0.25-0.607t0.607-0.25q0.134 0 0.246 0.031t0.228 0.116 0.17 0.134 0.192 0.192 0.165 0.17q0.295-0.277 0.295-0.652zM15.215 11.429q0 1.071-0.759 1.813l-1.313 1.304q-0.741 0.741-1.813 0.741-1.080 0-1.821-0.759l-1.839-1.848q-0.741-0.741-0.741-1.813 0-1.098 0.786-1.866l-0.786-0.786q-0.768 0.786-1.857 0.786-1.071 0-1.821-0.75l-1.857-1.857q-0.75-0.75-0.75-1.821t0.759-1.813l1.313-1.304q0.741-0.741 1.813-0.741 1.080 0 1.821 0.759l1.839 1.848q0.741 0.741 0.741 1.813 0 1.098-0.786 1.866l0.786 0.786q0.768-0.786 1.857-0.786 1.071 0 1.821 0.75l1.857 1.857q0.75 0.75 0.75 1.821z" + /> + </svg> + ); +} diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.js b/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.js index bca586eadd2..38e0043eba3 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.js +++ b/server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.js @@ -23,6 +23,7 @@ import { Link } from 'react-router'; import IssueChangelog from './IssueChangelog'; import IssueMessage from './IssueMessage'; import SimilarIssuesFilter from './SimilarIssuesFilter'; +import LinkIcon from '../../../components/icons-components/LinkIcon'; import LocationIndex from '../../common/LocationIndex'; import Tooltip from '../../controls/Tooltip'; import { getComponentIssuesUrl } from '../../../helpers/urls'; @@ -104,11 +105,12 @@ export default function IssueTitleBar(props: Props) { </li>} <li className="issue-meta"> <Link - className="js-issue-permalink icon-link" + className="js-issue-permalink link-no-underline" onClick={stopPropagation} target="_blank" - to={issueUrl} - /> + to={issueUrl}> + <LinkIcon /> + </Link> </li> {hasSimilarIssuesFilter && <li className="issue-meta"> diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueTitleBar-test.js.snap b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueTitleBar-test.js.snap index 5d61fbfb7d2..2d1ac03a834 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueTitleBar-test.js.snap +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueTitleBar-test.js.snap @@ -63,7 +63,7 @@ exports[`should render the titlebar correctly 1`] = ` className="issue-meta" > <Link - className="js-issue-permalink icon-link" + className="js-issue-permalink link-no-underline" onClick={[Function]} onlyActiveOnIndex={false} style={Object {}} @@ -78,7 +78,9 @@ exports[`should render the titlebar correctly 1`] = ` }, } } - /> + > + <LinkIcon /> + </Link> </li> </ul> </td> @@ -150,7 +152,7 @@ exports[`should render the titlebar with the filter 1`] = ` className="issue-meta" > <Link - className="js-issue-permalink icon-link" + className="js-issue-permalink link-no-underline" onClick={[Function]} onlyActiveOnIndex={false} style={Object {}} @@ -165,7 +167,9 @@ exports[`should render the titlebar with the filter 1`] = ` }, } } - /> + > + <LinkIcon /> + </Link> </li> <li className="issue-meta" diff --git a/server/sonar-web/src/main/js/components/workspace/templates/workspace-rule.hbs b/server/sonar-web/src/main/js/components/workspace/templates/workspace-rule.hbs index dbfd3ddd264..e8dc6a168fa 100644 --- a/server/sonar-web/src/main/js/components/workspace/templates/workspace-rule.hbs +++ b/server/sonar-web/src/main/js/components/workspace/templates/workspace-rule.hbs @@ -42,7 +42,18 @@ {{/if}} <li class="pull-right spacer-left"> - <a class="icon-link" target="_blank" href="{{link permalink}}"></a> + <a class="link-no-underline" target="_blank" href="{{link permalink}}"> + <svg + xmlns="http://www.w3.org/2000/svg" + height=14 + width=14 + viewBox="0 0 16 16"> + <path + fill="currentColor" + d="M13.501 11.429q0-0.357-0.25-0.607l-1.857-1.857q-0.25-0.25-0.607-0.25-0.375 0-0.643 0.286 0.027 0.027 0.17 0.165t0.192 0.192 0.134 0.17 0.116 0.228 0.031 0.246q0 0.357-0.25 0.607t-0.607 0.25q-0.134 0-0.246-0.031t-0.228-0.116-0.17-0.134-0.192-0.192-0.165-0.17q-0.295 0.277-0.295 0.652 0 0.357 0.25 0.607l1.839 1.848q0.241 0.241 0.607 0.241 0.357 0 0.607-0.232l1.313-1.304q0.25-0.25 0.25-0.598zM7.224 5.134q0-0.357-0.25-0.607l-1.839-1.848q-0.25-0.25-0.607-0.25-0.348 0-0.607 0.241l-1.313 1.304q-0.25 0.25-0.25 0.598 0 0.357 0.25 0.607l1.857 1.857q0.241 0.241 0.607 0.241 0.375 0 0.643-0.277-0.027-0.027-0.17-0.165t-0.192-0.192-0.134-0.17-0.116-0.228-0.031-0.246q0-0.357 0.25-0.607t0.607-0.25q0.134 0 0.246 0.031t0.228 0.116 0.17 0.134 0.192 0.192 0.165 0.17q0.295-0.277 0.295-0.652zM15.215 11.429q0 1.071-0.759 1.813l-1.313 1.304q-0.741 0.741-1.813 0.741-1.080 0-1.821-0.759l-1.839-1.848q-0.741-0.741-0.741-1.813 0-1.098 0.786-1.866l-0.786-0.786q-0.768 0.786-1.857 0.786-1.071 0-1.821-0.75l-1.857-1.857q-0.75-0.75-0.75-1.821t0.759-1.813l1.313-1.304q0.741-0.741 1.813-0.741 1.080 0 1.821 0.759l1.839 1.848q0.741 0.741 0.741 1.813 0 1.098-0.786 1.866l0.786 0.786q0.768-0.786 1.857-0.786 1.071 0 1.821 0.75l1.857 1.857q0.75 0.75 0.75 1.821z" + /> + </svg> + </a> </li> <li class="pull-right"> diff --git a/server/sonar-web/src/main/less/init/icons.less b/server/sonar-web/src/main/less/init/icons.less index 8a702fafd96..a0e0f30cbc3 100644 --- a/server/sonar-web/src/main/less/init/icons.less +++ b/server/sonar-web/src/main/less/init/icons.less @@ -522,10 +522,6 @@ a:hover > .icon-radio { content: "\f067"; font-size: @iconSmallFontSize; } -.icon-link:before { - content: "\f127"; - font-size: @iconSmallFontSize; -} .icon-move-down:before { content: "\f063"; color: @darkBlue; |