Merge branch 'master' of github.com:leanote/desktop-app

This commit is contained in:
life
2017-05-16 18:36:15 +08:00
5 changed files with 10 additions and 12 deletions

8
node_modules/nedb_proxy.js generated vendored
View File

@@ -24,13 +24,12 @@ function DBProxy(dbname) {
this.dbname = dbname;
};
var token = 1;
var token = 0;
var token2Callback = {};
DBProxy.prototype.send = function(params, callback, method) {
token++;
var m = {
token: token,
token: ++token,
method: method,
dbname: this.dbname,
// 转为json字符串, 如果{[a], [a]}, 在main接收后变成了 {[a], [null]}, 对象引用问题
@@ -84,6 +83,7 @@ DBProxy.prototype.remove = function (params, callback) {
ipc.on('db-exec-ret', function(event, m) {
var token = m.token;
var callback = token2Callback[token];
delete token2Callback[token];
// console.log('clent 接收到消息');
// console.log(m);
// console.log('--------------');
@@ -93,4 +93,4 @@ ipc.on('db-exec-ret', function(event, m) {
callback && callback(m.err, m.ret);
});
module.exports = DBProxy;
module.exports = DBProxy;

View File

@@ -903,7 +903,7 @@ Note.renderChangedNote = function(changedNote) {
$leftNoteNav.find(".desc").html(trimTitle(changedNote.Desc));
}
if (changedNote.ImgSrc) {
$thumb = $leftNoteNav.find(".item-thumb");
var $thumb = $leftNoteNav.find(".item-thumb");
// 有可能之前没有图片
if ($thumb.length > 0) {
$thumb.find("img").attr("src", Note.fixImageSrc(changedNote.ImgSrc));
@@ -2500,8 +2500,6 @@ Note.initContextmenu = function() {
this.menu.append(this.exports);
}
T = this;
this.enable = function(name, ok) {
this[name].enabled = ok;
}

View File

@@ -710,7 +710,7 @@ Notebook.changeNotebook = function(notebookId, callback, needRendNoteId) {
var url = "/note/listNotes/";
var param = { notebookId: notebookId };
var cacheNotes = null;
// 废纸篓
if (Notebook.isTrashNotebookId(notebookId)) {
url = "/note/listTrashNotes";

View File

@@ -1037,7 +1037,7 @@ LeaAce = {
return true;
} else {
// 找到父是pre
$pre = $node.closest("pre");
var $pre = $node.closest("pre");
if ($pre.length == 0) {
return false;
}
@@ -1061,7 +1061,7 @@ LeaAce = {
return false;
} else {
// 找到父是pre
$pre = $node.closest("pre");
var $pre = $node.closest("pre");
if ($pre.length == 0) {
return false;
}

View File

@@ -23,7 +23,7 @@ var lang = {
}
var curLang = Config['lang'] || sysLang || defaultLang;
langData = me.readJson('public/langs/' + curLang + '.js');
var langData = me.readJson('public/langs/' + curLang + '.js');
if(!langData) {
langData = me.readJson('public/langs/' + defaultLang + '.js');
if (!langData) {
@@ -67,4 +67,4 @@ var lang = {
}
};
lang.init();
lang.init();