aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2017-11-20 14:24:01 +0100
committerStas Vilchik <stas.vilchik@sonarsource.com>2017-11-20 15:38:01 +0100
commite5c1caf4e92363ad05804abe12a156b2590f85f8 (patch)
treed3044cb6747246d82e854d6e59758e37ca1e7ed5 /server/sonar-web/src
parent73248d9d2a53f6c0ea3613fbd57b8c9482bb6072 (diff)
downloadsonarqube-e5c1caf4e92363ad05804abe12a156b2590f85f8.tar.gz
sonarqube-e5c1caf4e92363ad05804abe12a156b2590f85f8.zip
fix ActionsDropdown menu position
Diffstat (limited to 'server/sonar-web/src')
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.js2
-rw-r--r--server/sonar-web/src/main/js/components/controls/ActionsDropdown.tsx10
2 files changed, 9 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.js b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.js
index b26471cec14..93ed50a596b 100644
--- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.js
+++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.js
@@ -80,7 +80,7 @@ export default class ProjectActivityAnalysis extends React.PureComponent {
{(canAddVersion || canAddEvent || canDeleteAnalyses) && (
<div className="project-activity-analysis-actions big-spacer-right">
- <ActionsDropdown small={true} toggleClassName="js-analysis-actions">
+ <ActionsDropdown menuPosition="left" small={true} toggleClassName="js-analysis-actions">
{canAddVersion && (
<AddEventForm
addEvent={this.props.addVersion}
diff --git a/server/sonar-web/src/main/js/components/controls/ActionsDropdown.tsx b/server/sonar-web/src/main/js/components/controls/ActionsDropdown.tsx
index 04a4426cf44..c23f62d0f94 100644
--- a/server/sonar-web/src/main/js/components/controls/ActionsDropdown.tsx
+++ b/server/sonar-web/src/main/js/components/controls/ActionsDropdown.tsx
@@ -26,11 +26,12 @@ import SettingsIcon from '../icons-components/SettingsIcon';
interface Props {
className?: string;
children: React.ReactNode;
+ menuPosition?: 'left' | 'right';
small?: boolean;
toggleClassName?: string;
}
-export default function ActionsDropdown(props: Props) {
+export default function ActionsDropdown({ menuPosition = 'right', ...props }: Props) {
return (
<div className={classNames('dropdown', props.className)}>
<button
@@ -41,7 +42,12 @@ export default function ActionsDropdown(props: Props) {
<SettingsIcon className="text-text-bottom" />
<i className="icon-dropdown little-spacer-left" />
</button>
- <ul className="dropdown-menu">{props.children}</ul>
+ <ul
+ className={classNames('dropdown-menu', {
+ 'dropdown-menu-right': menuPosition === 'right'
+ })}>
+ {props.children}
+ </ul>
</div>
);
}