Skip to content

Commit

Permalink
EDGECLOUD-2117 WEB UI - Mouse over menu Icons in clappased mode shoul…
Browse files Browse the repository at this point in the history
…d show text for the icon (#170)

* EDGECLOUD-2117 WEB UI - Mouse over menu Icons in clappased mode should show text for the icon

* Appear popup only left menu collapsed

* code improved
  • Loading branch information
jiyoonjung authored Mar 2, 2020
1 parent d852ffd commit 250885e
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions src/sites/siteFour/siteFour.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,20 @@ class SiteFour extends React.Component {
this.setState({learned: false})
}

menuItemViewHide = (item, i, activeItem) => (
(this.state.hideLeftMenu)?
<Popup
className="table_actions_tooltip"
content={item.label}
position='right center'
trigger={
this.menuItemView(item, i, activeItem)
}
/>
:
this.menuItemView(item, i, activeItem)
)

//compute page menu view
menuItemView = (item, i, activeItem) => (
<Menu.Item
Expand Down Expand Up @@ -703,8 +717,8 @@ class SiteFour extends React.Component {
</div>

</div>

</Menu.Item>

)

searchClick = (e) => {
Expand Down Expand Up @@ -1039,8 +1053,7 @@ class SiteFour extends React.Component {
{
this.OrgMenu.map((item, i) => (
(item.label === 'Accounts' && localStorage.selectRole !== 'AdminManager') ? null
: (localStorage.selectRole === 'AdminManager') ? this.menuItemView(item, i, localStorage.selectMenu)
: this.menuItemView(item, i, localStorage.selectMenu)
: this.menuItemViewHide(item, i, localStorage.selectMenu)
))
}
</div>
Expand All @@ -1049,17 +1062,17 @@ class SiteFour extends React.Component {
{
(localStorage.selectRole === 'AdminManager') ?
this.menuItemsAll.map((item, i) => (
this.menuItemView(item, i, localStorage.selectMenu)
this.menuItemViewHide(item, i, localStorage.selectMenu)
))
:
(localStorage.selectRole === 'DeveloperManager' || localStorage.selectRole === 'DeveloperContributor' || localStorage.selectRole === 'DeveloperViewer') ?
this.menuItems.map((item, i) => (
this.menuItemView(item, i, localStorage.selectMenu)
this.menuItemViewHide(item, i, localStorage.selectMenu)
))
:
(localStorage.selectRole === 'OperatorManager' || localStorage.selectRole === 'OperatorContributor' || localStorage.selectRole === 'OperatorViewer') ?
this.auth_three.map((item, i) => (
this.menuItemView(item, i, localStorage.selectMenu)
this.menuItemViewHide(item, i, localStorage.selectMenu)
))
:
null
Expand Down Expand Up @@ -1146,7 +1159,7 @@ class SiteFour extends React.Component {
disabled={this.props.viewBtn.onlyView}
onClick={() => this.onHandleRegistry()}
>
{(this.state.page.indexOf('create') === -1 && this.state.page.indexOf('edit') === -1 && this.state.page !== 'pg=newOrg') ? 'New' : 'reset'}
{(this.state.page.indexOf('create') === -1 && this.state.page.indexOf('edit') === -1 && this.state.page !== 'pg=newOrg') ? 'New' : 'Reset'}
</Button>
: null
}
Expand Down

0 comments on commit 250885e

Please sign in to comment.