mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-17 16:45:21 +00:00
send changes notebook.update [ok]
This commit is contained in:
9
node_modules/notebook.js
generated
vendored
9
node_modules/notebook.js
generated
vendored
@@ -125,6 +125,12 @@ var Notebook = {
|
||||
});
|
||||
},
|
||||
|
||||
updateNotebookTitle: function(notebookId, title, callback) {
|
||||
NB.update({NotebookId: notebookId}, {$set: {Title: title, IsDirty: true, UpdatedTime: new Date()}}, function(err, n) {
|
||||
callback(true);
|
||||
});
|
||||
},
|
||||
|
||||
// 修改笔记本
|
||||
updateNotebook: function(notebookId, callback) {
|
||||
|
||||
@@ -193,7 +199,7 @@ var Notebook = {
|
||||
},
|
||||
// 发送changes时用 api调用
|
||||
getServerNotebookIdByNotebookId: function(notebookId, callback) {
|
||||
if(!serverNotebookId) {
|
||||
if(!notebookId) {
|
||||
return callback(false);
|
||||
}
|
||||
NB.findOne({NotebookId: notebookId}, function(err, notebook) {
|
||||
@@ -267,6 +273,7 @@ var Notebook = {
|
||||
// 更新笔记本, NoteId可能也要更改
|
||||
// notebook是服务器传过来的
|
||||
updateNotebookForceForSendChange: function(notebookId, notebook, callback) {
|
||||
var me = this;
|
||||
notebook.IsDirty = false;
|
||||
notebook.LocalIsNew = false;
|
||||
notebook.ServerNotebookId = notebook.NotebookId;
|
||||
|
Reference in New Issue
Block a user