markdown sync问题

markdown fixConflict有问题
          原因, changeNote保存了笔记, 在nodejs端判断title, content, tags是否修改了,
若修改了才算是dirty [ok]
 markdown 莫名变成了非markdown editor 更新了其它非markdown笔记导致
          send changes 后, server端总会返回IsMarkdown为false [ok]
This commit is contained in:
life
2015-03-01 21:16:58 +08:00
parent 6453959413
commit 2b4b9b3114
6 changed files with 138 additions and 46 deletions

10
node_modules/tag.js generated vendored
View File

@@ -97,6 +97,16 @@ var Tag = {
});
},
// 添加tag后的返回, 更新usn
updateTagForce: function(tag, callback) {
var me = this;
tag.IsDirty = false;
var userId = User.getCurActiveUserId();
Tags.update({UserId: userId, Tag: tag.Tag}, {$set: tag}, function() {
callback && callback();
});
},
// 服务器上更新过来, 已经存在了
setNotDirty: function(title) {
var me = this;