mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-16 08:01:53 +00:00
send changes note.delete [ok]
TODO: 图片/attach的同步
This commit is contained in:
@@ -1054,14 +1054,16 @@ Note.deleteNote = function(target, contextmenuItem, isShared) {
|
||||
// 2
|
||||
var note = Note.cache[noteId];
|
||||
var url = "/note/deleteNote"
|
||||
var serverFunc = NoteService.deleteNote;
|
||||
if(note.IsTrash) {
|
||||
url = "/note/deleteTrash";
|
||||
serverFunc = NoteService.deleteTrash;
|
||||
} else {
|
||||
// 减少数量
|
||||
Notebook.minusNotebookNumberNotes(note.NotebookId);
|
||||
}
|
||||
|
||||
ajaxGet(url, {noteId: noteId, userId: note.UserId, isShared: isShared}, function(ret) {
|
||||
|
||||
serverFunc.call(NoteService, noteId, function(ret) {
|
||||
if(ret) {
|
||||
Note.changeToNext(target);
|
||||
|
||||
|
Reference in New Issue
Block a user