mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-14 07:00:53 +00:00
Put view switching button to left.
This commit is contained in:
@@ -240,6 +240,10 @@ function log(o) {
|
|||||||
<div class="pull-left" id="tagSearch" style="line-height: 38px">
|
<div class="pull-left" id="tagSearch" style="line-height: 38px">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="viewModeDropdown">
|
||||||
|
<span class="fa fa-th-list" title="Switch view"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="newMyNote">
|
<div id="newMyNote">
|
||||||
<a id="newNoteBtn" title="New note">
|
<a id="newNoteBtn" title="New note">
|
||||||
<span class="new-note-text" title="New note">+</span>
|
<span class="new-note-text" title="New note">+</span>
|
||||||
|
@@ -3221,6 +3221,38 @@ $(function() {
|
|||||||
Notebook.searchNotebookForList(key);
|
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才搜索
|
// 搜索, 按enter才搜索
|
||||||
/*
|
/*
|
||||||
|
@@ -1448,6 +1448,15 @@ h3 {
|
|||||||
.close:focus {
|
.close:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
#viewModeDropdown {
|
||||||
|
width: 30px;
|
||||||
|
height:35px;
|
||||||
|
line-height: 30px;
|
||||||
|
text-align: center;
|
||||||
|
position: relative;
|
||||||
|
z-index: 10000;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
#newMyNote {
|
#newMyNote {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 3px;
|
right: 3px;
|
||||||
|
Reference in New Issue
Block a user