Return back to notes list when a note is deleted
This commit is contained in:
parent
ac750520e7
commit
9eb4fdb9cd
2 changed files with 16 additions and 9 deletions
|
@ -129,19 +129,26 @@
|
|||
// Try to use the state from the item save event
|
||||
let id = this.item.id;
|
||||
if (ids.includes(id)) {
|
||||
let state = extraData && extraData[id] && extraData[id].state;
|
||||
if (state) {
|
||||
if (extraData[id].noteEditorID !== this._editorInstance.instanceID) {
|
||||
this.initEditor(state);
|
||||
if (event == 'delete') {
|
||||
if (this._returnHandler) {
|
||||
this._returnHandler();
|
||||
}
|
||||
}
|
||||
else {
|
||||
let curValue = this.item.note;
|
||||
if (curValue !== this._lastHtmlValue) {
|
||||
this.initEditor();
|
||||
let state = extraData && extraData[id] && extraData[id].state;
|
||||
if (state) {
|
||||
if (extraData[id].noteEditorID !== this._editorInstance.instanceID) {
|
||||
this.initEditor(state);
|
||||
}
|
||||
}
|
||||
else {
|
||||
let curValue = this.item.note;
|
||||
if (curValue !== this._lastHtmlValue) {
|
||||
this.initEditor();
|
||||
}
|
||||
}
|
||||
this._lastHtmlValue = this.item.note;
|
||||
}
|
||||
this._lastHtmlValue = this.item.note;
|
||||
}
|
||||
|
||||
this._id('links-container').hidden = !(this.displayTags && this.displayRelated) || this._hideLinksContainer;
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 5222465e0a3080a6044d44c54d3a5099ccb6808c
|
||||
Subproject commit 3016a7dff16a68a72d91556381658ab752b90a57
|
Loading…
Reference in a new issue