1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Move note between folders

This commit is contained in:
Sosuke Suzuki
2017-04-01 02:36:48 +09:00
parent 6904c192e4
commit 720f07f62c
5 changed files with 71 additions and 7 deletions

View File

@@ -349,8 +349,13 @@ class NoteList extends React.Component {
})
}
handleDragStart (e, note) {
const noteData = JSON.stringify(note)
e.dataTransfer.setData("note", noteData)
}
render () {
let { location, notes, config } = this.props
let { location, notes, config, dispatch } = this.props
let sortFunc = config.sortBy === 'CREATED_AT'
? sortByCreatedAt
: config.sortBy === 'ALPHABETICAL'
@@ -382,6 +387,7 @@ class NoteList extends React.Component {
key={key}
handleNoteClick={this.handleNoteClick.bind(this)}
handleNoteContextMenu={this.handleNoteContextMenu.bind(this)}
handleDragStart={this.handleDragStart.bind(this)}
/>
)
}
@@ -393,6 +399,7 @@ class NoteList extends React.Component {
key={key}
handleNoteClick={this.handleNoteClick.bind(this)}
handleNoteContextMenu={this.handleNoteContextMenu.bind(this)}
handleDragStart={this.handleDragStart.bind(this)}
/>
)
})