search notebook for list [ok]
This commit is contained in:
1 parent
883ea1da62
commit
ca4eb3aef5
8 files changed
+179
-65
No files matched your search
@@ -82,9 +82,7 @@ function log(o) {
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-list" style="left: -200px;" >
|
||||
<!--
|
||||
<input type="text" placeholder="search notebook"/>
|
||||
-->
|
||||
<input type="text" placeholder="search notebook" class="form-control" id="searchNotebookForAdd"/>
|
||||
<ul class="clearfix" role="menu" aria-labelledby="dropdownMenu2" id="notebookNavForNewNote">
|
||||
</ul>
|
||||
</div>
|
||||
@@ -239,8 +237,12 @@ function log(o) {
|
||||
<i class="fa fa-plus" title="{{msg . "addNotebook"}}"></i>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="folderBody ztree" id="notebookList">
|
||||
</ul>
|
||||
|
||||
<div class="folderBody">
|
||||
<input type="text" class="form-control" id="searchNotebookForList" placeholder="search notebook"/>
|
||||
<ul class="ztree" id="notebookList"></ul>
|
||||
<ul class="ztree" id="notebookListForSearch"></ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="folderNote closed" id="myTag">
|
||||
|
||||
@@ -178,4 +178,27 @@
|
||||
.new-note-right {
|
||||
padding: 0 5px;
|
||||
padding-left: 3px
|
||||
}
|
||||
#leanoteMsg {
|
||||
line-height: 40px; margin-top: 10px; margin-left: 10px;
|
||||
}
|
||||
#newNoteWrap {
|
||||
line-height: 40px; margin-top: 10px;
|
||||
}
|
||||
|
||||
#searchNotebookForAdd {
|
||||
line-height: normal;
|
||||
width: 200px;
|
||||
margin: 0 10px;
|
||||
margin-bottom: 10px;
|
||||
height: 30px;
|
||||
border-color: #ebeff2;
|
||||
box-shadow: none;
|
||||
}
|
||||
#searchNotebookForList {
|
||||
height: 30px;
|
||||
width: 90%;
|
||||
margin: 3px auto;
|
||||
border-color: #ebeff2;
|
||||
box-shadow: none;
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(../../fonts/open-sans2/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(../../fonts/open-sans2/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(../../fonts/open-sans2/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;src:local('Open Sans Italic'),local('OpenSans-Italic'),url(../../fonts/open-sans2/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff) format('woff')}@font-face{font-family:leanoteregular;src:url(../../fonts/leanote/leanote-regular-webfont.eot);src:url(../../fonts/leanote/leanote-regular-webfont.eot?#iefix) format('embedded-opentype'),url(../../fonts/leanote/leanote-regular-webfont.woff) format('woff'),url(../../fonts/leanote/leanote-regular-webfont.ttf) format('truetype'),url(../../fonts/leanote/leanote-regular-webfont.svg#leanoteregular) format('svg');font-weight:400;font-style:normal}#logo{font-family:leanoteregular;font-size:36px}#logo:before{content:"a"}#switcher span{font-family:leanoteregular;border-radius:5px;display:inline-block;cursor:pointer;font-size:18px;height:34px;line-height:34px;margin-top:8px;padding:0 5px}#switcher span:before{content:"b"}.dropdown-menu{border-radius:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:1px solid #0fb264}.dropdown-menu li{list-style:none;padding-left:10px;width:100%;height:30px;line-height:30px}.dropdown-menu li>a{color:#000;display:block;padding-right:20px}.dropdown-menu>li>a{padding:3px 20px 3px 0}#noteList{position:absolute;bottom:0;top:0}.dropdown-submenu{position:relative}.dropdown-submenu>ul.dropdown-menu{top:0;left:100%;margin-left:-3px!important;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding-top:10px!important}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu:after{display:block;content:" ";position:absolute;right:0;top:10px;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#666}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.open>.dropdown-list{-webkit-transform:scale(1,1);transform:scale(1,1)}.dropdown-list{-webkit-transform-origin:left;transform-origin:top;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-transform:scale(0,0);display:block;transition:all .2s cubic-bezier(0.34,1.21,.4,1);-webkit-transition:all .2s cubic-bezier(0.34,1.21,.4,1)}.dropdown-list{width:530px;border-radius:3px}.dropdown-list ul{margin:0;padding:0}.dropdown-list ul li{float:left;width:120px;margin-left:10px;margin-bottom:10px;border:1px dashed #ccc}.new-note-right{padding:0 5px;padding-left:3px}::selection{background:#000;color:#fff}::-moz-selection{background:#000;color:#fff}::-webkit-selection{background:#000;color:#fff}*,body{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;font-weight:300;font-size:14px}h1,h2,h3{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;font-weight:300!important}a{color:#000;cursor:pointer}a:hover{text-decoration:none!important;color:#000}a.raw{color:#428bca}a.raw:hover{color:#2a6496}#header{height:60px;background-color:#25313e;color:#fff;border-bottom:1px solid #ebeff2;webkit-user-select:none;-webkit-app-region:drag}#header a{color:#ccc}#header li{color:#000}#header li a{color:#000}#logo,#logo span{line-height:50px}#logo{width:140px;height:59px;padding-left:10px;padding-top:0;border-bottom:1px solid transparent;border-color:rgba(255,255,255,.1)}#logo span{background-color:#000;border-radius:10px;display:inline-block;padding:4px 0;line-height:1}#switcher{line-height:50px;padding-top:6px;padding-right:5px;width:30px;text-align:center}#switcher i{font-size:16px;cursor:pointer}#switcher i:hover{color:#0fb264}#switcher span{border-radius:5px;background-color:#000;cursor:pointer;font-size:16px}#switcher span:hover{color:#0fb264}#searchNote{padding-left:0;line-height:60px;margin:0}#searchNote input{background-size:18px 13px;border-color:#ebeff2;border:none;color:#ccc;background-color:#000;padding-left:14px;border-radius:5px;width:250px;line-height:20px;box-shadow:none}#searchNote input:focus{outline:0!important;border-color:#0fb264;box-shadow:none}#header ul{margin:0;padding:0;list-style:none}#header ul li.dropdown{display:inline-block;height:60px}#header ul>li>a.dropdown-toggle{display:blockLine truncated
|
||||
@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(../../fonts/open-sans2/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(../../fonts/open-sans2/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(../../fonts/open-sans2/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;src:local('Open Sans Italic'),local('OpenSans-Italic'),url(../../fonts/open-sans2/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff) format('woff')}@font-face{font-family:leanoteregular;src:url(../../fonts/leanote/leanote-regular-webfont.eot);src:url(../../fonts/leanote/leanote-regular-webfont.eot?#iefix) format('embedded-opentype'),url(../../fonts/leanote/leanote-regular-webfont.woff) format('woff'),url(../../fonts/leanote/leanote-regular-webfont.ttf) format('truetype'),url(../../fonts/leanote/leanote-regular-webfont.svg#leanoteregular) format('svg');font-weight:400;font-style:normal}#logo{font-family:leanoteregular;font-size:36px}#logo:before{content:"a"}#switcher span{font-family:leanoteregular;border-radius:5px;display:inline-block;cursor:pointer;font-size:18px;height:34px;line-height:34px;margin-top:8px;padding:0 5px}#switcher span:before{content:"b"}.dropdown-menu{border-radius:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:1px solid #0fb264}.dropdown-menu li{list-style:none;padding-left:10px;width:100%;height:30px;line-height:30px}.dropdown-menu li>a{color:#000;display:block;padding-right:20px}.dropdown-menu>li>a{padding:3px 20px 3px 0}#noteList{position:absolute;bottom:0;top:0}.dropdown-submenu{position:relative}.dropdown-submenu>ul.dropdown-menu{top:0;left:100%;margin-left:-3px!important;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding-top:10px!important}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu:after{display:block;content:" ";position:absolute;right:0;top:10px;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#666}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.open>.dropdown-list{-webkit-transform:scale(1,1);transform:scale(1,1)}.dropdown-list{-webkit-transform-origin:left;transform-origin:top;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-transform:scale(0,0);display:block;transition:all .2s cubic-bezier(0.34,1.21,.4,1);-webkit-transition:all .2s cubic-bezier(0.34,1.21,.4,1)}.dropdown-list{width:530px;border-radius:3px}.dropdown-list ul{margin:0;padding:0}.dropdown-list ul li{float:left;width:120px;margin-left:10px;margin-bottom:10px;border:1px dashed #ccc}.new-note-right{padding:0 5px;padding-left:3px}#leanoteMsg{line-height:40px;margin-top:10px;margin-left:10px}#newNoteWrap{line-height:40px;margin-top:10px}#searchNotebookForAdd{line-height:normal;width:200px;margin:0 10px;margin-bottom:10px;height:30px;border-color:#ebeff2;box-shadow:none}#searchNotebookForList{height:30px;width:90%;margin:3px auto;border-color:#ebeff2;box-shadow:none}::selection{background:#000;color:#fff}::-moz-selection{background:#000;color:#fff}::-webkit-selection{background:#000;color:#fff}*,body{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;font-weight:300;font-size:14px}h1,h2,h3{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;font-weight:300!important}a{color:#000;cursor:pointer}a:hover{text-decoration:none!important;color:#000}a.raw{color:#428bca}a.raw:hover{color:#2a6496}#header{height:60px;background-color:#25313e;color:#fff;border-bottom:1px solid #ebeff2;webkit-user-select:none;-webkit-app-region:drag}#header a{color:#ccc}#header li{color:#000}#header li a{color:#000}#logo,#logo span{line-height:50px}#logo{width:140px;height:59px;padding-left:10px;padding-top:0;border-bottom:1px solid transparent;border-color:rgba(255,255,255,.1)}#logo span{background-color:#000;border-radius:10px;display:inline-block;padding:4px 0;line-height:1}#switcher{line-height:50px;padding-top:6px;padding-right:5px;width:30px;text-align:center}#switcher i{font-size:16px;cursor:pointer}#switcher i:hover{color:#0fb264}#switcher span{border-radius:5px;background-color:#000;cursor:pointer;font-size:16px}#switcher span:hover{color:#0fb264}#searchNote{padding-left:0;line-height:60px;margin:0}#searchNote input{background-size:18px 13px;border-color:#ebeff2;border:none;cLine truncated
|
||||
@@ -464,7 +464,7 @@ a.raw:hover {
|
||||
}
|
||||
|
||||
// 重命名, 添加notebook
|
||||
#notebookList input {
|
||||
#notebookList input, #notebookListForSearch input {
|
||||
border: 1px solid @borderColor;
|
||||
width: 90%;
|
||||
box-shadow: none;
|
||||
@@ -1144,12 +1144,7 @@ background-position:-1px -670px
|
||||
padding: 5px 0;
|
||||
}
|
||||
}
|
||||
#leanoteMsg {
|
||||
line-height: 40px; margin-top: 10px; margin-left: 10px;
|
||||
}
|
||||
#newNoteWrap {
|
||||
line-height: 40px; margin-top: 10px;
|
||||
}
|
||||
|
||||
#loading {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
|
||||
@@ -1 +1 @@
|
||||
@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(../../fonts/open-sans2/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(../../fonts/open-sans2/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(../../fonts/open-sans2/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;src:local('Open Sans Italic'),local('OpenSans-Italic'),url(../../fonts/open-sans2/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff) format('woff')}@font-face{font-family:leanoteregular;src:url(../../fonts/leanote/leanote-regular-webfont.eot);src:url(../../fonts/leanote/leanote-regular-webfont.eot?#iefix) format('embedded-opentype'),url(../../fonts/leanote/leanote-regular-webfont.woff) format('woff'),url(../../fonts/leanote/leanote-regular-webfont.ttf) format('truetype'),url(../../fonts/leanote/leanote-regular-webfont.svg#leanoteregular) format('svg');font-weight:400;font-style:normal}#logo{font-family:leanoteregular;font-size:36px}#logo:before{content:"a"}#switcher span{font-family:leanoteregular;border-radius:5px;display:inline-block;cursor:pointer;font-size:18px;height:34px;line-height:34px;margin-top:8px;padding:0 5px}#switcher span:before{content:"b"}.dropdown-menu{border-radius:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:1px solid #0fb264}.dropdown-menu li{list-style:none;padding-left:10px;width:100%;height:30px;line-height:30px}.dropdown-menu li>a{color:#000;display:block;padding-right:20px}.dropdown-menu>li>a{padding:3px 20px 3px 0}#noteList{position:absolute;bottom:0;top:0}.dropdown-submenu{position:relative}.dropdown-submenu>ul.dropdown-menu{top:0;left:100%;margin-left:-3px!important;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding-top:10px!important}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu:after{display:block;content:" ";position:absolute;right:0;top:10px;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#666}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.open>.dropdown-list{-webkit-transform:scale(1,1);transform:scale(1,1)}.dropdown-list{-webkit-transform-origin:left;transform-origin:top;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-transform:scale(0,0);display:block;transition:all .2s cubic-bezier(0.34,1.21,.4,1);-webkit-transition:all .2s cubic-bezier(0.34,1.21,.4,1)}.dropdown-list{width:530px;border-radius:3px}.dropdown-list ul{margin:0;padding:0}.dropdown-list ul li{float:left;width:120px;margin-left:10px;margin-bottom:10px;border:1px dashed #ccc}.new-note-right{padding:0 5px;padding-left:3px}::selection{background:#000;color:#fff}::-moz-selection{background:#000;color:#fff}::-webkit-selection{background:#000;color:#fff}*,body{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;font-weight:300;font-size:14px}h1,h2,h3{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;font-weight:300!important}a{color:#000;cursor:pointer}a:hover{text-decoration:none!important;color:#000}a.raw{color:#428bca}a.raw:hover{color:#2a6496}#header{height:60px;background-color:#fff;color:#fff;border-bottom:1px solid #ebeff2;webkit-user-select:none;-webkit-app-region:drag}#header{color:#000}#logo,#logo span{line-height:50px}#logo{width:140px;height:60px;padding-left:10px;padding-top:0;border-bottom:1px solid transparent;border-color:rgba(255,255,255,.1)}#logo span{background-color:#000;color:#fff;border-radius:10px;display:inline-block;padding:4px 0;line-height:1}#switcher{line-height:50px;padding-top:6px;padding-right:5px;width:30px;text-align:center}#switcher i{font-size:16px;cursor:pointer}#switcher i:hover{color:#0fb264}#switcher span{background-color:#000;color:#fff;border-radius:5px;cursor:pointer;font-size:14px}#switcher span:hover{color:#0fb264}#searchNote{padding-left:0;line-height:60px;margin:0}#searchNote input{background-size:18px 13px;border-color:#ebeff2;padding-left:14px;height:30px;width:250px;line-height:20px;box-shadow:none}#searchNote input:focus{outline:0!important;border-color:#0fb264;box-shadow:none}#header ul{margin:0;padding:0;list-style:none}#header ul li.dropdown{display:inline-block;height:60px}#header ul>li>a.dropdown-toggle{display:block;padding:15px 5px 0 0;position:relative}#header span.icon{display:inline-block;fLine truncated
|
||||
@font-face{font-family:'Open Sans';font-style:normal;font-weight:300;src:local('Open Sans Light'),local('OpenSans-Light'),url(../../fonts/open-sans2/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:400;src:local('Open Sans'),local('OpenSans'),url(../../fonts/open-sans2/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:normal;font-weight:700;src:local('Open Sans Bold'),local('OpenSans-Bold'),url(../../fonts/open-sans2/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff) format('woff')}@font-face{font-family:'Open Sans';font-style:italic;font-weight:400;src:local('Open Sans Italic'),local('OpenSans-Italic'),url(../../fonts/open-sans2/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff) format('woff')}@font-face{font-family:leanoteregular;src:url(../../fonts/leanote/leanote-regular-webfont.eot);src:url(../../fonts/leanote/leanote-regular-webfont.eot?#iefix) format('embedded-opentype'),url(../../fonts/leanote/leanote-regular-webfont.woff) format('woff'),url(../../fonts/leanote/leanote-regular-webfont.ttf) format('truetype'),url(../../fonts/leanote/leanote-regular-webfont.svg#leanoteregular) format('svg');font-weight:400;font-style:normal}#logo{font-family:leanoteregular;font-size:36px}#logo:before{content:"a"}#switcher span{font-family:leanoteregular;border-radius:5px;display:inline-block;cursor:pointer;font-size:18px;height:34px;line-height:34px;margin-top:8px;padding:0 5px}#switcher span:before{content:"b"}.dropdown-menu{border-radius:0;margin:0;-webkit-box-shadow:none;box-shadow:none;border:1px solid #0fb264}.dropdown-menu li{list-style:none;padding-left:10px;width:100%;height:30px;line-height:30px}.dropdown-menu li>a{color:#000;display:block;padding-right:20px}.dropdown-menu>li>a{padding:3px 20px 3px 0}#noteList{position:absolute;bottom:0;top:0}.dropdown-submenu{position:relative}.dropdown-submenu>ul.dropdown-menu{top:0;left:100%;margin-left:-3px!important;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding-top:10px!important}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu:after{display:block;content:" ";position:absolute;right:0;top:10px;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#666}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.open>.dropdown-list{-webkit-transform:scale(1,1);transform:scale(1,1)}.dropdown-list{-webkit-transform-origin:left;transform-origin:top;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-transform:scale(0,0);display:block;transition:all .2s cubic-bezier(0.34,1.21,.4,1);-webkit-transition:all .2s cubic-bezier(0.34,1.21,.4,1)}.dropdown-list{width:530px;border-radius:3px}.dropdown-list ul{margin:0;padding:0}.dropdown-list ul li{float:left;width:120px;margin-left:10px;margin-bottom:10px;border:1px dashed #ccc}.new-note-right{padding:0 5px;padding-left:3px}#leanoteMsg{line-height:40px;margin-top:10px;margin-left:10px}#newNoteWrap{line-height:40px;margin-top:10px}#searchNotebookForAdd{line-height:normal;width:200px;margin:0 10px;margin-bottom:10px;height:30px;border-color:#ebeff2;box-shadow:none}#searchNotebookForList{height:30px;width:90%;margin:3px auto;border-color:#ebeff2;box-shadow:none}::selection{background:#000;color:#fff}::-moz-selection{background:#000;color:#fff}::-webkit-selection{background:#000;color:#fff}*,body{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;font-weight:300;font-size:14px}h1,h2,h3{font-family:'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif;font-weight:300!important}a{color:#000;cursor:pointer}a:hover{text-decoration:none!important;color:#000}a.raw{color:#428bca}a.raw:hover{color:#2a6496}#header{height:60px;background-color:#fff;color:#fff;border-bottom:1px solid #ebeff2;webkit-user-select:none;-webkit-app-region:drag}#header{color:#000}#logo,#logo span{line-height:50px}#logo{width:140px;height:60px;padding-left:10px;padding-top:0;border-bottom:1px solid transparent;border-color:rgba(255,255,255,.1)}#logo span{background-color:#000;color:#fff;border-radius:10px;display:inline-block;padding:4px 0;line-height:1}#switcher{line-height:50px;padding-top:6px;padding-right:5px;width:30px;text-align:center}#switcher i{font-size:16px;cursor:pointer}#switcher i:hover{color:#0fb264}#switcher span{background-color:#000;color:#fff;border-radius:5px;cursor:pointer;font-size:14px}#switcher span:hover{color:#0fb264}#searchNote{padding-left:0;line-height:60px;margin:0}#searchNote input{background-size:18px 13px;border-color:#ebeff2;padding-left:14px;height:30px;width:250px;Line truncated
|
||||
@@ -443,7 +443,7 @@ a.raw:hover {
|
||||
}
|
||||
|
||||
// 重命名, 添加notebook
|
||||
#notebookList input {
|
||||
#notebookList input, #notebookListForSearch input {
|
||||
border: 1px solid @borderColor;
|
||||
width: 90%;
|
||||
box-shadow: none;
|
||||
@@ -1105,12 +1105,6 @@ background-position:-1px -670px
|
||||
}
|
||||
}
|
||||
|
||||
#leanoteMsg {
|
||||
line-height: 40px; margin-top: 10px; margin-left: 10px;
|
||||
}
|
||||
#newNoteWrap {
|
||||
line-height: 40px; margin-top: 10px;
|
||||
}
|
||||
#loading {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
|
||||
@@ -1294,6 +1294,17 @@ $(function() {
|
||||
Note.newNote(notebookId);
|
||||
}
|
||||
});
|
||||
$("#searchNotebookForAdd").click(function(e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
$("#searchNotebookForAdd").keyup(function() {
|
||||
var key = $(this).val();
|
||||
Notebook.searchNotebookForAddNote(key);
|
||||
});
|
||||
$("#searchNotebookForList").keyup(function() {
|
||||
var key = $(this).val();
|
||||
Notebook.searchNotebookForList(key);
|
||||
});
|
||||
|
||||
//---------------------------
|
||||
// 搜索, 按enter才搜索
|
||||
|
||||
+133
-44
@@ -43,24 +43,24 @@ Notebook.getNotebookTitle = function(notebookId) {
|
||||
<li><a class="active">Hadoop</a></li>
|
||||
<li><a>August 13, 2013</a></li>
|
||||
</ul>
|
||||
*/
|
||||
// TODO 层级
|
||||
Notebook.allNotebookId = "0";
|
||||
Notebook.trashNotebookId = "-1";
|
||||
Notebook.curNotebookIsTrashOrAll = function() {
|
||||
return Notebook.curNotebookId == Notebook.trashNotebookId || Notebook.curNotebookId == Notebook.allNotebookId ;
|
||||
}
|
||||
Notebook.renderNotebooks = function(notebooks) {
|
||||
*/
|
||||
|
||||
Notebook.getTreeSetting = function(isSearch){
|
||||
var noSearch = !isSearch;
|
||||
|
||||
var self = this;
|
||||
|
||||
if(!notebooks || typeof notebooks != "object" || notebooks.length < 0) {
|
||||
notebooks = [];
|
||||
// 添加自定义dom
|
||||
function addDiyDom(treeId, treeNode) {
|
||||
var spaceWidth = 5;
|
||||
var switchObj = $("#" + treeId + " #" + treeNode.tId + "_switch"),
|
||||
icoObj = $("#" + treeId + " #" + treeNode.tId + "_ico");
|
||||
switchObj.remove();
|
||||
icoObj.before(switchObj);
|
||||
if (treeNode.level > 1) {
|
||||
var spaceStr = "<span style='display: inline-block;width:" + (spaceWidth * treeNode.level)+ "px'></span>";
|
||||
switchObj.before(spaceStr);
|
||||
}
|
||||
}
|
||||
|
||||
notebooks = [{NotebookId: Notebook.allNotebookId, Title: getMsg("all"), drop:false, drag: false}].concat(notebooks);
|
||||
notebooks.push({NotebookId: Notebook.trashNotebookId, Title: getMsg("trash"), drop:false, drag: false});
|
||||
Notebook.notebooks = notebooks; // 缓存之
|
||||
|
||||
// 拖拽
|
||||
function beforeDrag(treeId, treeNodes) {
|
||||
for (var i=0,l=treeNodes.length; i<l; i++) {
|
||||
@@ -75,6 +75,10 @@ Notebook.renderNotebooks = function(notebooks) {
|
||||
}
|
||||
function onDrop(e, treeId, treeNodes, targetNode, moveType) {
|
||||
var treeNode = treeNodes[0];
|
||||
// 搜索不能drag
|
||||
if(!targetNode) {
|
||||
return;
|
||||
}
|
||||
var parentNode;
|
||||
var treeObj = self.tree;
|
||||
var ajaxData = {curNotebookId: treeNode.NotebookId};
|
||||
@@ -108,20 +112,7 @@ Notebook.renderNotebooks = function(notebooks) {
|
||||
}
|
||||
ajaxPost("/notebook/dragNotebooks", {data: JSON.stringify(ajaxData)});
|
||||
}
|
||||
// 添加自定义dom
|
||||
function addDiyDom(treeId, treeNode) {
|
||||
var spaceWidth = 5;
|
||||
var switchObj = $("#" + treeNode.tId + "_switch"),
|
||||
icoObj = $("#" + treeNode.tId + "_ico");
|
||||
switchObj.remove();
|
||||
icoObj.before(switchObj);
|
||||
if (treeNode.level > 1) {
|
||||
var spaceStr = "<span style='display: inline-block;width:" + (spaceWidth * treeNode.level)+ "px'></span>";
|
||||
switchObj.before(spaceStr);
|
||||
}
|
||||
}
|
||||
var setting = {
|
||||
|
||||
view: {
|
||||
showLine: false,
|
||||
showIcon: false,
|
||||
@@ -140,10 +131,10 @@ Notebook.renderNotebooks = function(notebooks) {
|
||||
showRemoveBtn: false,
|
||||
showRenameBtn: false,
|
||||
drag: {
|
||||
isMove: true,
|
||||
prev: true,
|
||||
inner: true,
|
||||
next: true
|
||||
isMove: noSearch,
|
||||
prev: noSearch,
|
||||
inner: noSearch,
|
||||
next: noSearch
|
||||
}
|
||||
},
|
||||
callback: {
|
||||
@@ -154,8 +145,6 @@ Notebook.renderNotebooks = function(notebooks) {
|
||||
var notebookId = treeNode.NotebookId;
|
||||
Notebook.changeNotebook(notebookId);
|
||||
},
|
||||
onRightClick: function(event, treeId, treeNode) {
|
||||
},
|
||||
beforeRename: function(treeId, treeNode, newName, isCancel) {
|
||||
if(newName == "") {
|
||||
if(treeNode.IsNew) {
|
||||
@@ -183,7 +172,29 @@ Notebook.renderNotebooks = function(notebooks) {
|
||||
}
|
||||
};
|
||||
|
||||
self.tree = $.fn.zTree.init($("#notebookList"), setting, notebooks);
|
||||
// 搜索不能拖拽
|
||||
if(isSearch) {
|
||||
}
|
||||
|
||||
return setting;
|
||||
}
|
||||
Notebook.allNotebookId = "0";
|
||||
Notebook.trashNotebookId = "-1";
|
||||
Notebook.curNotebookIsTrashOrAll = function() {
|
||||
return Notebook.curNotebookId == Notebook.trashNotebookId || Notebook.curNotebookId == Notebook.allNotebookId ;
|
||||
}
|
||||
Notebook.renderNotebooks = function(notebooks) {
|
||||
var self = this;
|
||||
|
||||
if(!notebooks || typeof notebooks != "object" || notebooks.length < 0) {
|
||||
notebooks = [];
|
||||
}
|
||||
|
||||
notebooks = [{NotebookId: Notebook.allNotebookId, Title: getMsg("all"), drop:false, drag: false}].concat(notebooks);
|
||||
notebooks.push({NotebookId: Notebook.trashNotebookId, Title: getMsg("trash"), drop:false, drag: false});
|
||||
Notebook.notebooks = notebooks; // 缓存之
|
||||
|
||||
self.tree = $.fn.zTree.init($("#notebookList"), self.getTreeSetting(), notebooks);
|
||||
|
||||
// 展开/折叠图标
|
||||
var $notebookList = $("#notebookList");
|
||||
@@ -227,6 +238,7 @@ Notebook.renderNav = function(nav) {
|
||||
var self = this;
|
||||
self.changeNav();
|
||||
return;
|
||||
|
||||
var navForListNote = "";
|
||||
var navForNewNote = "";
|
||||
var navForMoveNote = "";
|
||||
@@ -248,6 +260,47 @@ Notebook.renderNav = function(nav) {
|
||||
$("#notebookNavForMoveNote").html(navForMoveNote);
|
||||
}
|
||||
|
||||
// 搜索notebook
|
||||
Notebook.searchNotebookForAddNote = function(key) {
|
||||
var self = this;
|
||||
if(key) {
|
||||
var notebooks = self.tree.getNodesByParamFuzzy("Title", key);
|
||||
if(isEmpty(notebooks)) {
|
||||
$("#notebookNavForNewNote").html("");
|
||||
} else {
|
||||
$("#notebookNavForNewNote").html(self.getChangedNotebooks(notebooks));
|
||||
}
|
||||
} else {
|
||||
$("#notebookNavForNewNote").html(self.everNavForNewNote);
|
||||
}
|
||||
}
|
||||
|
||||
// 搜索notebook
|
||||
Notebook.searchNotebookForList = function(key) {
|
||||
var self = this;
|
||||
var $search = $("#notebookListForSearch");
|
||||
var $notebookList = $("#notebookList");
|
||||
if(key) {
|
||||
$search.show();
|
||||
$notebookList.hide();
|
||||
|
||||
var notebooks = self.tree.getNodesByParamFuzzy("Title", key);
|
||||
log(notebooks);
|
||||
if(isEmpty(notebooks)) {
|
||||
$search.html("");
|
||||
} else {
|
||||
var setting = self.getTreeSetting(true);
|
||||
self.tree2 = $.fn.zTree.init($search, setting, notebooks);
|
||||
}
|
||||
} else {
|
||||
self.tree2 = null;
|
||||
$search.hide();
|
||||
$notebookList.show();
|
||||
$("#notebookNavForNewNote").html(self.everNavForNewNote);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 修改,添加,删除notebook后调用
|
||||
// 改变nav
|
||||
// 直接从html中取!
|
||||
@@ -277,14 +330,21 @@ Notebook.getChangedNotebooks = function(notebooks) {
|
||||
}
|
||||
return navForNewNote;
|
||||
}
|
||||
|
||||
Notebook.everNavForNewNote = "";
|
||||
Notebook.everNotebooks = [];
|
||||
Notebook.changeNav = function() {
|
||||
var self = Notebook;
|
||||
var navForListNote = "";
|
||||
|
||||
var navForNewNote = "";
|
||||
|
||||
var notebooks = Notebook.tree.getNodes();
|
||||
var html = self.getChangedNotebooks(notebooks);
|
||||
|
||||
self.everNavForNewNote = html;
|
||||
self.everNotebooks = notebooks;
|
||||
|
||||
/*
|
||||
var i = 0;
|
||||
var $list = $("#notebookList li a");
|
||||
var len = $list.length - 1;
|
||||
@@ -309,6 +369,7 @@ Notebook.changeNav = function() {
|
||||
i++;
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
$("#notebookNavForListNote").html(html);
|
||||
$("#notebookNavForNewNote").html(html);
|
||||
@@ -589,21 +650,27 @@ Notebook.setNotebook2Blog = function(target) {
|
||||
Notebook.updateNotebookTitle = function(target) {
|
||||
var self = Notebook;
|
||||
var notebookId = $(target).attr("notebookId");
|
||||
self.tree.editName(self.tree.getNodeByTId(notebookId));
|
||||
|
||||
return;
|
||||
|
||||
var notebookTitle = $(target).text();
|
||||
var id = "editNotebookTitle";
|
||||
$(target).html(t('<input type="text" value="?" everValue="?" id="?" notebookId="?"/>', notebookTitle, notebookTitle, id, $(target).attr("notebookId")));
|
||||
$("#" + id).focus();
|
||||
if(self.tree2) {
|
||||
self.tree2.editName(self.tree2.getNodeByTId(notebookId));
|
||||
} else {
|
||||
self.tree.editName(self.tree.getNodeByTId(notebookId));
|
||||
}
|
||||
}
|
||||
Notebook.doUpdateNotebookTitle = function(notebookId, newTitle) {
|
||||
var self = Notebook;
|
||||
ajaxPost("/notebook/updateNotebookTitle", {notebookId: notebookId, title: newTitle}, function(ret) {
|
||||
// 修改缓存
|
||||
Notebook.cache[notebookId].Title = newTitle;
|
||||
// 改变nav
|
||||
Notebook.changeNav();
|
||||
|
||||
// 同步
|
||||
if(self.tree2) {
|
||||
var notebook = self.tree.getNodeByTId(notebookId);
|
||||
notebook.Title = newTitle;
|
||||
self.tree.updateNode(notebook);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -671,6 +738,9 @@ Notebook.deleteNotebook = function(target) {
|
||||
$(target).parent().remove();
|
||||
*/
|
||||
self.tree.removeNode(self.tree.getNodeByTId(notebookId));
|
||||
if(self.tree2) {
|
||||
self.tree2.removeNode(self.tree2.getNodeByTId(notebookId));
|
||||
}
|
||||
delete Notebook.cache[notebookId];
|
||||
|
||||
// 改变nav
|
||||
@@ -722,6 +792,23 @@ $(function() {
|
||||
children: "li a"
|
||||
}
|
||||
|
||||
var notebookListMenu2 = {
|
||||
width: 150,
|
||||
items: [
|
||||
{ text: "分享给好友", alias: 'shareToFriends', icon: "", faIcon: "fa-share-square-o", action: Notebook.listNotebookShareUserInfo},
|
||||
{ type: "splitLine" },
|
||||
{ text: "公开为博客", alias: 'set2Blog', icon: "", action: Notebook.setNotebook2Blog },
|
||||
{ text: "取消公开为博客", alias: 'unset2Blog', icon: "", action: Notebook.setNotebook2Blog }, // Unset
|
||||
{ type: "splitLine" },
|
||||
{ text: "重命名", icon: "", action: Notebook.updateNotebookTitle },
|
||||
{ text: "删除", icon: "", alias: 'delete', faIcon: "fa-trash-o", action: Notebook.deleteNotebook }
|
||||
],
|
||||
onShow: applyrule,
|
||||
onContextMenu: beforeContextMenu,
|
||||
parent: "#notebookListForSearch ",
|
||||
children: "li a"
|
||||
}
|
||||
|
||||
function applyrule(menu) {
|
||||
var notebookId = $(this).attr("notebookId");
|
||||
var notebook = Notebook.cache[notebookId];
|
||||
@@ -753,6 +840,8 @@ $(function() {
|
||||
}
|
||||
$("#notebookList li a").contextmenu(notebookListMenu);
|
||||
|
||||
$("#notebookListForSearch").contextmenu(notebookListMenu2);
|
||||
|
||||
//------------------
|
||||
// 添加notebook
|
||||
// 右键菜单
|
||||
|
||||
Reference in new issue
Block a user