Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions browser/main/Detail/MarkdownNoteDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,7 @@ class MarkdownNoteDetail extends React.Component {

}

handleContextButtonClick (e) {
let menu = new Menu()
menu.append(new MenuItem({
label: 'Delete',
click: (e) => this.handleDeleteMenuClick(e)
}))
menu.popup(remote.getCurrentWindow())
}

handleDeleteMenuClick (e) {
handleDeleteButtonClick (e) {
let index = dialog.showMessageBox(remote.getCurrentWindow(), {
type: 'warning',
message: 'Delete a note',
Expand Down Expand Up @@ -291,7 +282,7 @@ class MarkdownNoteDetail extends React.Component {
)
})()}
<button styleName='control-trashButton'
onClick={(e) => this.handleContextButtonClick(e)}
onClick={(e) => this.handleDeleteButtonClick(e)}
>
<svg height='17px' id='Capa_1' style={{enableBackground: 'new 0 0 753.23 753.23'}} width='17px' version='1.1' viewBox='0 0 753.23 753.23' x='0px' y='0px' xmlSpace='preserve'>
<g>
Expand Down
11 changes: 2 additions & 9 deletions browser/main/Detail/SnippetNoteDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,7 @@ class SnippetNoteDetail extends React.Component {

}

handleContextButtonClick (e) {
context.popup([{
label: 'Delete',
click: (e) => this.handleDeleteMenuClick(e)
}])
}

handleDeleteMenuClick (e) {
handleDeleteButtonClick (e) {
let index = dialog.showMessageBox(remote.getCurrentWindow(), {
type: 'warning',
message: 'Delete a note',
Expand Down Expand Up @@ -546,7 +539,7 @@ class SnippetNoteDetail extends React.Component {
</div>
<div styleName='info-right'>
<button styleName='control-trashButton'
onClick={(e) => this.handleContextButtonClick(e)}
onClick={(e) => this.handleDeleteButtonClick(e)}
>
<svg height='17px' id='Capa_1' style={{enableBackground: 'new 0 0 753.23 753.23'}} width='17px' version='1.1' viewBox='0 0 753.23 753.23' x='0px' y='0px' xmlSpace='preserve'>
<g>
Expand Down