Skip to content

Commit

Permalink
Rearrange and move prominent action icons to the front
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Nov 5, 2018
1 parent d09a16d commit ec7d398
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions frontend/my/src/Campaigns.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,6 @@ class Campaigns extends React.PureComponent {
render: (text, record) => {
return (
<div className="actions">
<Tooltip title="Preview campaign" placement="bottom">
<a role="button" onClick={() => {
this.handlePreview(record)
}}><Icon type="search" /></a>
</Tooltip>

<Tooltip title="Clone campaign" placement="bottom">
<a role="button" onClick={() => {
let r = { ...record, lists: record.lists.map((i) => { return i.id }) }
this.handleToggleCloneForm(r)
}}><Icon type="copy" /></a>
</Tooltip>

{ ( record.status === cs.CampaignStatusPaused ) &&
<Popconfirm title="Are you sure?" onConfirm={() => this.handleUpdateStatus(record, cs.CampaignStatusRunning)}>
<Tooltip title="Resume campaign" placement="bottom"><a role="button"><Icon type="rocket" /></a></Tooltip>
Expand Down Expand Up @@ -161,6 +148,19 @@ class Campaigns extends React.PureComponent {
</Popconfirm>
}

<Tooltip title="Preview campaign" placement="bottom">
<a role="button" onClick={() => {
this.handlePreview(record)
}}><Icon type="search" /></a>
</Tooltip>

<Tooltip title="Clone campaign" placement="bottom">
<a role="button" onClick={() => {
let r = { ...record, lists: record.lists.map((i) => { return i.id }) }
this.handleToggleCloneForm(r)
}}><Icon type="copy" /></a>
</Tooltip>

{ ( record.status === cs.CampaignStatusDraft || record.status === cs.CampaignStatusScheduled ) &&
<Popconfirm title="Are you sure?" onConfirm={() => this.handleDeleteRecord(record)}>
<Tooltip title="Delete campaign" placement="bottom"><a role="button"><Icon type="delete" /></a></Tooltip>
Expand Down

0 comments on commit ec7d398

Please sign in to comment.