fix auto save

This commit is contained in:
2018-12-08 00:49:56 +01:00
parent 389fd02f08
commit e5950d89ad
2 changed files with 34 additions and 29 deletions

View File

@@ -42,15 +42,15 @@
{
if(typeof oSaveTimer != 'undefined') clearTimeout(oSaveTimer);
var bSave = (oEditor.keystrokes % 20 == 0 || bForce);
if(bSave) {
if(self.tmp('saving')) {
oSaveTimer = setTimeout(function(){save(true);}, 500);
}
else {
self.tmp('saving', true);
var sContent = oEditor.getContent();
if(!oEditor.isEmpty() || oEditor.id != 0) {
self.tmp('saving', true);
oMyThoughts.onFeedback('info', 'Saving...');
getInfo(
'update',