diff --git a/src/components/widgets/Sidebar/LoadingMenuItem/LoadingMenuItem.js b/src/components/widgets/Sidebar/LoadingMenuItem/LoadingMenuItem.js
index 34461c877..4ecea9a40 100644
--- a/src/components/widgets/Sidebar/LoadingMenuItem/LoadingMenuItem.js
+++ b/src/components/widgets/Sidebar/LoadingMenuItem/LoadingMenuItem.js
@@ -2,14 +2,13 @@ import React from 'react';
import { FormattedMessage } from 'react-intl';
import { LoadingIcon } from '../../../icons';
+import styles from '../Sidebar.less';
+
const LoadingMenuItem = () => (
-
+
diff --git a/src/components/widgets/Sidebar/MenuAvatar/MenuAvatar.js b/src/components/widgets/Sidebar/MenuAvatar/MenuAvatar.js
index 2b6a45dcc..58852c388 100644
--- a/src/components/widgets/Sidebar/MenuAvatar/MenuAvatar.js
+++ b/src/components/widgets/Sidebar/MenuAvatar/MenuAvatar.js
@@ -2,18 +2,10 @@ import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
-import styles from './MenuAvatar.less';
+import styles from '../Sidebar.less';
import AvatarContainer from '../../../../containers/AvatarContainer/AvatarContainer';
-const MenuAvatar = ({
- title,
- avatarUrl,
- firstName,
- notificationsCount = 0,
- isActive = false,
- useGravatar = false,
- onClick,
-}) => (
+const MenuAvatar = ({ title, avatarUrl, firstName, notificationsCount = 0, isActive = false, onClick }) => (
+ className={styles.cursorPointer}>
-
- {title}
-
+ {title}
{notificationsCount > 0 && {notificationsCount}}
@@ -51,7 +36,6 @@ MenuAvatar.propTypes = {
onClick: PropTypes.func,
notificationsCount: PropTypes.number,
isActive: PropTypes.bool,
- useGravatar: PropTypes.bool,
};
export default MenuAvatar;
diff --git a/src/components/widgets/Sidebar/MenuAvatar/MenuAvatar.less b/src/components/widgets/Sidebar/MenuAvatar/MenuAvatar.less
deleted file mode 100644
index 52b545aed..000000000
--- a/src/components/widgets/Sidebar/MenuAvatar/MenuAvatar.less
+++ /dev/null
@@ -1,3 +0,0 @@
-.avatar {
- margin-right: 6px;
-}
diff --git a/src/components/widgets/Sidebar/MenuGroup/MenuGroup.js b/src/components/widgets/Sidebar/MenuGroup/MenuGroup.js
index e89558061..4cb255da4 100644
--- a/src/components/widgets/Sidebar/MenuGroup/MenuGroup.js
+++ b/src/components/widgets/Sidebar/MenuGroup/MenuGroup.js
@@ -10,6 +10,8 @@ import { isLoading } from '../../../../redux/helpers/resourceManager';
import { getLocalizedName } from '../../../../helpers/localizedData';
import Icon from '../../../icons';
+import styles from '../Sidebar.less';
+
class MenuGroup extends Component {
state = {
open: null,
@@ -44,11 +46,6 @@ class MenuGroup extends Component {
intl: { locale },
} = this.props;
- const dropdownStyles = {
- overflowY: 'auto',
- overflowX: 'hidden',
- };
-
const itemsNotificationsCount = item => notifications[item.getIn(['data', 'id'])];
const notificationsCount = items.reduce((acc, item) => acc + itemsNotificationsCount(item), 0);
@@ -60,20 +57,13 @@ class MenuGroup extends Component {
})}>
-
- {title}
-
+ {title}
{notificationsCount > 0 && {notificationsCount}}
-
+
-
+
{items.map((item, key) =>
isLoading(item) ? (
diff --git a/src/components/widgets/Sidebar/MenuItem/MenuItem.js b/src/components/widgets/Sidebar/MenuItem/MenuItem.js
index b5583b118..e333e9d05 100644
--- a/src/components/widgets/Sidebar/MenuItem/MenuItem.js
+++ b/src/components/widgets/Sidebar/MenuItem/MenuItem.js
@@ -5,6 +5,7 @@ import { withRouter } from 'react-router';
import { Link } from 'react-router-dom';
import Icon from '../../../icons';
+import styles from '../Sidebar.less';
const MenuItem = ({
title,
@@ -24,14 +25,7 @@ const MenuItem = ({
})}>
-
- {title}
-
+ {title}
{notificationsCount > 0 && {notificationsCount}}
diff --git a/src/components/widgets/Sidebar/Sidebar.less b/src/components/widgets/Sidebar/Sidebar.less
new file mode 100644
index 000000000..1ea88c300
--- /dev/null
+++ b/src/components/widgets/Sidebar/Sidebar.less
@@ -0,0 +1,22 @@
+.avatar {
+ margin-right: 6px;
+}
+
+.menuItem {
+ white-space: normal;
+ display: inline-block;
+ vertical-align: top;
+}
+
+.cursorPointer {
+ cursor: pointer;
+}
+
+.arrowIcon {
+ height: 15px !important;
+}
+
+.dropdown {
+ overflow-y: auto;
+ overflow-x: hidden;
+}
diff --git a/src/containers/CAS/AuthenticationButtonContainer.js b/src/containers/CAS/AuthenticationButtonContainer.js
index d9c07938f..bfdecca27 100644
--- a/src/containers/CAS/AuthenticationButtonContainer.js
+++ b/src/containers/CAS/AuthenticationButtonContainer.js
@@ -7,7 +7,7 @@ import withLinks from '../../helpers/withLinks';
const makeAbsolute = url =>
typeof window === 'undefined' ? url : `${window.location.origin}/${url.indexOf('/') === 0 ? url.substr(1) : url}`;
-const ensureAbsoluteUrl = url => (url.match('^(https?:)?//.+') !== null ? url : makeAbsolute(url));
+const ensureAbsoluteUrl = url => (url.match('^https?://.+') !== null ? url : makeAbsolute(url));
class AuthenticationButtonContainer extends Component {
constructor(props, context) {
diff --git a/src/pages/routes.js b/src/pages/routes.js
index 48ec1210b..24339b6ea 100644
--- a/src/pages/routes.js
+++ b/src/pages/routes.js
@@ -198,7 +198,7 @@ const createLink = path => {
const res = [...tokens]; // make a copy of URL path tokens (so we can fill in parameters)
index.forEach(idx => (res[idx] = params.shift())); // fill in parameters using indexed positions
while (res.length > 0 && !res[res.length - 1]) {
- // remove empty parameters at the end
+ // remove empty parameters at the end (params.shift() will fill in undefined for every missing parameter)
res.pop();
}
res.unshift(URL_PATH_PREFIX);