Skip to content

Commit

Permalink
EDGECLOUD-2092 [Web UI] Put the Action button icon (hawkinser) in the…
Browse files Browse the repository at this point in the history
… same line as others parameters in Panel view (#172)
  • Loading branch information
jiyoonjung authored Mar 2, 2020
1 parent 8b32486 commit d852ffd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 21 deletions.
6 changes: 3 additions & 3 deletions src/container/accountsListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,14 @@ class AccountListView extends React.Component {
{Object.keys(item).map((value, j) => (
(value === 'Edit')?
String(item[value]) === 'null' ? <Table.Cell /> :
<Table.Cell key={j} textAlign='center' style={(this.state.selectUse == i)?{whiteSpace:'nowrap',background:'#444'} :{whiteSpace:'nowrap'} }>
<Table.Cell key={j} textAlign='center' style={{whiteSpace:'nowrap'} }>

<Button disabled={item.Username === 'mexadmin'} onClick={() => this.setState({openDelete: true, selected:item})}><Icon name={'trash alternate'}/></Button>

</Table.Cell>
:
(value === 'Type' && item[value])?
<Table.Cell key={j} textAlign='center' onClick={() => this.detailView(item)} style={(this.state.selectUse == i)?{whiteSpace:'nowrap',background:'#444'} :{whiteSpace:'nowrap'}} >
<Table.Cell key={j} textAlign='center' onClick={() => this.detailView(item)} style={{whiteSpace:'nowrap'}} >
{/*<div className="markBox">{this.typeMark(item[value])}</div>*/}
<span style={(item[value] == 'developer')?{color:'#9b9979'}:{color:'#7d969b'}}>{item[value]}</span>
</Table.Cell>
Expand Down Expand Up @@ -286,7 +286,7 @@ class AccountListView extends React.Component {
</Table.Cell>
:
(!( String(hideHeader).indexOf(value) > -1 )) ?
<Table.Cell key={j} textAlign={(value === 'Region')?'center':(j === 0 || value.indexOf('Name')!==-1)?'left':'center'} onClick={() => this.detailView(item)} style={(this.state.selectUse == i)?{cursor:'pointer',background:'#444'} :{cursor:'pointer'} }>
<Table.Cell key={j} textAlign={(value === 'Region')?'center':(j === 0 || value.indexOf('Name')!==-1)?'left':'center'} onClick={() => this.detailView(item)} style={{cursor:'pointer'} }>
<div ref={ref => this.tooltipref = ref} data-tip='tooltip' data-for='happyFace'>
{String(item[value])}
</div>
Expand Down
18 changes: 4 additions & 14 deletions src/container/developerListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ class DeveloperListView extends React.Component {
)
makeEditMenu = (item, j, i) => (
<div key={j} textalign='center'
style={(this.state.selectUse == i) ? { whiteSpace: 'nowrap', background: '#444' } : { whiteSpace: 'nowrap' }}>
style={{ whiteSpace: 'nowrap' }}>
{(this.props.siteId == 'Organization' && localStorage.selectRole !== 'AdminManager') ?
<Button className='stepOrgDeveloper1' color={(localStorage.selectOrg == item.Organization) ? 'teal' : (this.state.selectUse == i) ? 'teal' : null}
onClick={(evt) => this.onUseOrg(item, i, evt)}>
Expand Down Expand Up @@ -446,11 +446,7 @@ class DeveloperListView extends React.Component {
(value === 'Edit') ?
String(item[value]) === 'null' ? <Table.Cell /> :
<Table.Cell className="table_actions" key={j} textAlign='center'
style={(this.state.selectUse === i) ? {
whiteSpace: 'nowrap',
background: '#444',
overflow: 'visible'
} : { whiteSpace: 'nowrap', overflow: 'visible' }}>
style={ { whiteSpace: 'nowrap', overflow: 'visible' }}>

{(this.props.siteId === 'Organization' && localStorage.selectRole !== 'AdminManager') ?
<Button className='stepOrgDeveloper1'
Expand All @@ -469,10 +465,7 @@ class DeveloperListView extends React.Component {
:
(value === 'Type') ?
<Table.Cell key={j} textAlign='left' onClick={() => this.detailView(item)}
style={(this.state.selectUse === i) ? {
whiteSpace: 'nowrap',
background: '#444'
} : { whiteSpace: 'nowrap' }}>
style={{ whiteSpace: 'nowrap' }}>
{/*<div className="markBox">{this.typeMark(item[value])}</div>*/}
<span
style={(item[value] === 'developer') ? { color: '#9b9979' } : { color: '#7d969b' }}>{item[value]}</span>
Expand Down Expand Up @@ -529,10 +522,7 @@ class DeveloperListView extends React.Component {
<Table.Cell key={j}
textAlign={(value === 'Region') ? 'center' : (j === 0 || value.indexOf('Name') !== -1) ? 'left' : 'left'}
onClick={() => this.detailView(item)}
style={(this.state.selectUse === i) ? {
cursor: 'pointer',
background: '#444'
} : { cursor: 'pointer' }}>
style={ { cursor: 'pointer' }}>
<div ref={ref => this.tooltipref = ref}
data-tip='tooltip' data-for='happyFace'>
{String(item[value])}
Expand Down
8 changes: 4 additions & 4 deletions src/container/insideListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ class InsideListView extends React.Component {
</div>
)
makeEditMenu = (item, value, i, j) => (
<Table.Cell key={j} textAlign='center' style={(this.state.selectUse == i)?{whiteSpace:'nowrap',background:'#444'} :{whiteSpace:'nowrap'} }>
<Table.Cell key={j} textAlign='center' style={{whiteSpace:'nowrap'} }>
<Button disabled style={{display:'none'}} key={`key_${j}`} color='teal' onClick={() => this.onHandleClick(true, item)}><Icon name={'edit'}/></Button>
{(this.props.siteId == 'App')?
<Button className='launchButton' color='teal' disabled={this.props.dimmInfo.onlyView} onClick={() => this.appLaunch(item)}>
Expand All @@ -461,12 +461,12 @@ class InsideListView extends React.Component {
{Object.keys(item).map((value, j) => (
(value === 'Edit')?
String(item[value]) === 'null' ? <Table.Cell /> :
<Table.Cell className="table_actions" key={j} textAlign='center' style={(this.state.selectUse == i)?{whiteSpace:'nowrap',background:'#444', overflow:'visible'} :{whiteSpace:'nowrap', overflow:'visible'} }>
<Table.Cell className="table_actions" key={j} textAlign='center' style={{whiteSpace:'nowrap', overflow:'visible'} }>
{this.makeEditButtonGroup(item, value, j, i, item['NumOfOrganizations'] && item['NumOfOrganizations'])}
</Table.Cell>
:
(value === 'Type')?
<Table.Cell key={j} textAlign='center' onClick={() => this.detailView(item)} style={(this.state.selectUse == i)?{whiteSpace:'nowrap',background:'#444'} :{whiteSpace:'nowrap'}} >
<Table.Cell key={j} textAlign='center' onClick={() => this.detailView(item)} style={{whiteSpace:'nowrap'}} >
{/*<div className="markBox">{this.typeMark(item[value])}</div>*/}
<span style={(item[value] == 'developer')?{color:'#9b9979'}:{color:'#7d969b'}}>{item[value]}</span>
</Table.Cell>
Expand Down Expand Up @@ -508,7 +508,7 @@ class InsideListView extends React.Component {
</Table.Cell>
:
(!( String(hideHeader).indexOf(value) > -1 )) ?
<Table.Cell key={j} textAlign={(value === 'Region')?'center':(j === 0 || value.indexOf('Name')!==-1)?'left':'center'} onClick={() => this.detailView(item)} style={(this.state.selectUse == i)?{cursor:'pointer',background:'#444'} :{cursor:'pointer'} }>
<Table.Cell key={j} textAlign={(value === 'Region')?'center':(j === 0 || value.indexOf('Name')!==-1)?'left':'center'} onClick={() => this.detailView(item)} >
<div ref={ref => this.tooltipref = ref} data-tip='tooltip' data-for='happyFace' style={{wordBreak:'break-all'}}>
{String(item[value])}
</div>
Expand Down
7 changes: 7 additions & 0 deletions src/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -1319,6 +1319,7 @@ body, button, input, textarea, optgroup, select, textarea,
.contents_body .ui.table tbody tr {
display: flex;
width: 100%;
align-items: center;
}
.contents_body .ui.table tbody tr .table_actions {
display: flex;
Expand All @@ -1339,6 +1340,12 @@ body, button, input, textarea, optgroup, select, textarea,
border-bottom: 1px solid rgba(255,255,255,.05) !important;
}

.contents_body .ui.basic.striped.table tbody tr:hover {
background: #444 !important;
cursor: pointer;

}

.contents_body .ui.celled.table tr td,
.contents_body .ui.celled.table tr th {
border-left: none;
Expand Down

0 comments on commit d852ffd

Please sign in to comment.