diff --git a/note.html b/note.html
index 8753d311..0877d400 100755
--- a/note.html
+++ b/note.html
@@ -240,6 +240,10 @@ function log(o) {
+
+
+
+
+
diff --git a/public/js/app/note.js b/public/js/app/note.js
index ebacc8b2..b90d06b7 100644
--- a/public/js/app/note.js
+++ b/public/js/app/note.js
@@ -3221,6 +3221,38 @@ $(function() {
Notebook.searchNotebookForList(key);
});
+ // 切换列表视图
+ $("#viewModeDropdown").click(function() {
+ console.log("*******");
+ var themeSubmenus = new gui.Menu();
+ themeSubmenus.append(new gui.MenuItem({
+ checked: Config.view === "summary",
+ label: "摘要视图",
+ type: "checkbox",
+ click: function() {
+ Config.view = 'summary';
+ Notebook.renderCurNotebook();
+ Api.writeConfig(Config);
+ }
+ }));
+ themeSubmenus.append(new gui.MenuItem({
+ checked: Config.view === "list",
+ label: "列表视图",
+ type: "checkbox",
+ click: function() {
+ Config.view = 'list';
+ Notebook.renderCurNotebook();
+ Api.writeConfig(Config);
+ }
+ }));
+
+ var $this = $(this);
+ var x = $this.offset().left;
+ var y = $this.offset().top + $this.height();
+ themeSubmenus.popup(gui.getCurrentWindow(), Math.round(x), Math.round(y));
+ });
+
+
//---------------------------
// 搜索, 按enter才搜索
/*
diff --git a/public/themes/default.css b/public/themes/default.css
index a0ebed24..6e46a811 100644
--- a/public/themes/default.css
+++ b/public/themes/default.css
@@ -1448,6 +1448,15 @@ h3 {
.close:focus {
outline: none;
}
+#viewModeDropdown {
+ width: 30px;
+ height:35px;
+ line-height: 30px;
+ text-align: center;
+ position: relative;
+ z-index: 10000;
+ cursor: pointer;
+}
#newMyNote {
position: absolute;
right: 3px;