mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-17 16:45:21 +00:00
批量导出html完成, 支持导出笔记本下所有笔记
This commit is contained in:
@@ -1149,7 +1149,7 @@ Notebook.init = function() {
|
||||
this.menu.append(this.rename);
|
||||
this.menu.append(this.del);
|
||||
|
||||
// 导入菜单
|
||||
// 导入菜单
|
||||
var importMenus = Api.getImportMenus();
|
||||
if(importMenus && importMenus.length) {
|
||||
var importSubmenus = new gui.Menu();
|
||||
@@ -1168,9 +1168,43 @@ Notebook.init = function() {
|
||||
submenu: importSubmenus,
|
||||
label: getMsg('Import notes')
|
||||
});
|
||||
this.menu.append(gui.getSeparatorMenu());
|
||||
this.menu.append(this.imports);
|
||||
}
|
||||
|
||||
// 导出
|
||||
var exportsSubMenus = new gui.Menu();
|
||||
var exportMenus = Api.getExportMenusForNotebook() || [];
|
||||
for(var i = 0; i < exportMenus.length; ++i) {
|
||||
(function(j) {
|
||||
|
||||
var menu = exportMenus[j];
|
||||
var clickBac = menu.click;
|
||||
|
||||
var menuItem = new gui.MenuItem({
|
||||
label: menu.label,
|
||||
click: function(e) {
|
||||
var notebookId = $(me.target).attr('notebookId');
|
||||
clickBac && clickBac(notebookId);
|
||||
}
|
||||
});
|
||||
|
||||
exportMenus[i].menu = menuItem;
|
||||
exportsSubMenus.append(menuItem);
|
||||
})(i);
|
||||
}
|
||||
|
||||
if(exportMenus.length > 0) {
|
||||
this.exports = new gui.MenuItem({
|
||||
label: getMsg('Export notes'),
|
||||
submenu: exportsSubMenus,
|
||||
click: function(e) {
|
||||
}
|
||||
});
|
||||
|
||||
this.menu.append(this.exports);
|
||||
}
|
||||
|
||||
this.enable = function(name, ok) {
|
||||
this[name].enabled = ok;
|
||||
}
|
||||
|
Reference in New Issue
Block a user