mirror of
https://github.com/leanote/desktop-app.git
synced 2025-12-12 02:01:28 +08:00
仅保存20条记录, ctrl+s, ctrl+e时保存历史记录. 自动保存时不添加到历史记录中
https://github.com/leanote/desktop-app/issues/70
This commit is contained in:
@@ -499,7 +499,7 @@ Note.curChangedSaveIt = function(force, callback) {
|
||||
}
|
||||
|
||||
callback && callback(ret);
|
||||
});
|
||||
}, force);
|
||||
|
||||
return hasChanged;
|
||||
|
||||
@@ -676,7 +676,7 @@ Note.changeNote = function(selectNoteId, isShare, needSaveChanged, callback) {
|
||||
needSaveChanged = true;
|
||||
}
|
||||
if(needSaveChanged) {
|
||||
Note.curChangedSaveIt();
|
||||
Note.curChangedSaveIt(true);
|
||||
}
|
||||
|
||||
// 2. 设空, 防止在内容得到之前又发生保存
|
||||
@@ -1095,7 +1095,7 @@ Note.newNote = function(notebookId, isShare, fromUserId, isMarkdown) {
|
||||
|
||||
Note.stopInterval();
|
||||
// 保存当前的笔记
|
||||
Note.curChangedSaveIt();
|
||||
Note.curChangedSaveIt(true);
|
||||
|
||||
Note.batch.reset();
|
||||
|
||||
@@ -1789,13 +1789,12 @@ Note.toggleReadOnly = function(needSave) {
|
||||
|
||||
// 保存之
|
||||
if (needSave) {
|
||||
Note.curChangedSaveIt();
|
||||
Note.curChangedSaveIt(true);
|
||||
}
|
||||
|
||||
Note.readOnly = true;
|
||||
LEA.readOnly = true;
|
||||
|
||||
|
||||
if(!note.IsMarkdown) {
|
||||
// 里面的pre也设为不可写
|
||||
$('#editorContent pre').each(function() {
|
||||
|
||||
Reference in New Issue
Block a user