Browse Source

优化部分细节

layui
yirenyishi 6 years ago
parent
commit
d38b4e2a3f
  1. 2
      views/T.nav.tpl
  2. 3
      views/iframe/note.html
  3. 10
      views/note.html
  4. 4
      views/unote.html

2
views/T.nav.tpl

@ -36,7 +36,7 @@
{{end}}
{{if .IsLogin }}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<a href="/me/blog" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
{{.NickName}}<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="/me/blog">个人中心</a></li>

3
views/iframe/note.html

@ -48,6 +48,9 @@
if (!{{.IsLogin}}) {
parent.location.href = "/login"
}
if ({{.NoteColl|len}} == 0) {
parent.location.href = "/me/note"
}
$("#saveBtn").click(function () {
var pid = $("#catory").val()
var title = $("#lable").val()

10
views/note.html

@ -56,6 +56,11 @@
</div> <!-- cd-main-content -->
<nav id="cd-lateral-nav">
{{if eq 0 (.NoteColls|len)}}
<ul class="cd-navigation cd-single-item-wrapper">
<li><a href="/me/note">新增文件夹</a></li>
</ul>
{{end}}
<ul class="cd-navigation">
{{range .NoteColls}}
<li class="item-has-children">
@ -69,11 +74,6 @@
</ul>
</li>
{{end}}
{{/*{{if len .NoteColls 0}}*/}}
{{/*<ul class="cd-navigation cd-single-item-wrapper">*/}}
{{/*<li><a href="javascript:void(0)">新增文件夹</a></li>*/}}
{{/*</ul>*/}}
{{/*{{end}}*/}}
</ul>
</nav>

4
views/unote.html

@ -89,6 +89,10 @@
}
$(function () {
if ({{.Note|len}} == 0){
layer.msg('请先添加文件夹', function () {
});
}
$("#newBtn").click(function () {
layer.prompt({title: '请输入文件夹名称'}, function (val, index) {
if (val.trim().length < 3) {

Loading…
Cancel
Save