mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
Change a name showlockbutton to togglelockbutton
This commit is contained in:
@@ -82,7 +82,7 @@ class MarkdownEditor extends React.Component {
|
||||
this.refs.code.blur()
|
||||
this.refs.preview.focus()
|
||||
}
|
||||
eventEmitter.emit('topbar:showlockbutton')
|
||||
eventEmitter.emit('topbar:togglelockbutton')
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -99,7 +99,7 @@ class MarkdownEditor extends React.Component {
|
||||
this.refs.preview.focus()
|
||||
this.refs.preview.scrollTo(cursorPosition.line)
|
||||
})
|
||||
eventEmitter.emit('topbar:showlockbutton')
|
||||
eventEmitter.emit('topbar:togglelockbutton')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ class MarkdownEditor extends React.Component {
|
||||
}, () => {
|
||||
this.refs.code.focus()
|
||||
})
|
||||
eventEmitter.emit('topbar:showlockbutton')
|
||||
eventEmitter.emit('topbar:togglelockbutton')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ class MarkdownEditor extends React.Component {
|
||||
} else {
|
||||
this.refs.code.focus()
|
||||
}
|
||||
eventEmitter.emit('topbar:showlockbutton')
|
||||
eventEmitter.emit('topbar:togglelockbutton')
|
||||
}
|
||||
|
||||
reload () {
|
||||
|
||||
@@ -31,7 +31,7 @@ class MarkdownNoteDetail extends React.Component {
|
||||
}
|
||||
this.dispatchTimer = null
|
||||
|
||||
this.showLockButton = this.handleShowLockButton.bind(this)
|
||||
this.toggleLockButton = this.handleToggleLockButton.bind(this)
|
||||
}
|
||||
|
||||
focus () {
|
||||
@@ -39,7 +39,7 @@ class MarkdownNoteDetail extends React.Component {
|
||||
}
|
||||
|
||||
componentDidMount () {
|
||||
ee.on('topbar:showlockbutton', this.showLockButton)
|
||||
ee.on('topbar:togglelockbutton', this.toggleLockButton)
|
||||
}
|
||||
|
||||
componentWillReceiveProps (nextProps) {
|
||||
@@ -59,7 +59,7 @@ class MarkdownNoteDetail extends React.Component {
|
||||
}
|
||||
|
||||
componentDidUnmount () {
|
||||
ee.off('topbar:lock', this.showLockButton)
|
||||
ee.off('topbar:togglelockbutton', this.toggleLockButton)
|
||||
}
|
||||
|
||||
findTitle (value) {
|
||||
@@ -230,7 +230,7 @@ class MarkdownNoteDetail extends React.Component {
|
||||
if (e.keyCode === 27) this.handleDeleteCancelButtonClick(e)
|
||||
}
|
||||
|
||||
handleShowLockButton () {
|
||||
handleToggleLockButton () {
|
||||
this.setState({editorStatus: this.refs.content.state.status})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user