plugins 异步加载模块

This commit is contained in:
life
2015-10-27 18:23:51 +08:00
parent 848f1aff92
commit 0e0697e50b
8 changed files with 80 additions and 23 deletions

View File

@@ -19,9 +19,8 @@ Before submitting HTML content over the EDAM API the client application is expec
*/
define(function() {
var async = require('async');
var enml = nodeRequire('./public/plugins/export_evernote/enml');
var async; // = require('async');
var enml; // = nodeRequire('./public/plugins/export_evernote/enml');
//==============
// tpls
@@ -93,6 +92,12 @@ define(function() {
_inited: false,
init: function() {
var me = this;
if (me._inited) {
return;
}
async = require('async');
enml= nodeRequire('./public/plugins/export_evernote/enml');
me._inited = true;
},
@@ -547,6 +552,7 @@ define(function() {
},
click: (function() {
return function(noteIds) {
me.init();
me.exportEvernote(noteIds);
}
})()
@@ -560,6 +566,7 @@ define(function() {
},
click: (function() {
return function(notebookId) {
me.init();
me.exportEvernoteForNotebook(notebookId);
}
})()