2017-04-30 22:13:12 +08:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="zh-CN">
|
|
|
|
|
<head>
|
2018-01-27 13:34:48 +08:00
|
|
|
|
|
2018-07-24 18:23:09 +08:00
|
|
|
|
<title>{{.Title}} - Powered by MinDoc</title>
|
2018-01-27 13:34:48 +08:00
|
|
|
|
|
2017-04-30 22:13:12 +08:00
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2018-01-27 13:34:48 +08:00
|
|
|
|
<meta name="renderer" content="webkit">
|
|
|
|
|
<meta name="author" content="Minho" />
|
|
|
|
|
<meta name="site" content="https://www.iminho.me" />
|
2018-09-19 16:12:32 +08:00
|
|
|
|
<meta name="keywords" content="MinDoc,文档在线管理系统,WIKI,wiki,wiki在线,文档在线管理,接口文档在线管理,接口文档管理,{{.Model.BookName}},{{.Title}}">
|
2018-07-25 14:46:56 +08:00
|
|
|
|
<meta name="description" content="{{.Title}}-{{if .Description}}{{.Description}}{{else}}{{.Model.Description}}{{end}}">
|
2017-04-30 22:13:12 +08:00
|
|
|
|
|
|
|
|
|
<!-- Bootstrap -->
|
2017-05-12 14:21:29 +08:00
|
|
|
|
<link href="{{cdncss "/static/bootstrap/css/bootstrap.min.css"}}" rel="stylesheet">
|
2018-06-06 19:52:49 +08:00
|
|
|
|
|
2017-05-12 14:21:29 +08:00
|
|
|
|
<link href="{{cdncss "/static/jstree/3.3.4/themes/default/style.min.css"}}" rel="stylesheet">
|
2018-07-10 16:26:25 +08:00
|
|
|
|
<link href="{{cdncss "/static/font-awesome/css/font-awesome.min.css"}}" rel="stylesheet">
|
2017-05-12 14:21:29 +08:00
|
|
|
|
<link href="{{cdncss "/static/nprogress/nprogress.css"}}" rel="stylesheet">
|
2018-09-06 16:36:29 +08:00
|
|
|
|
<link href="{{cdncss "/static/css/kancloud.css" "version"}}" rel="stylesheet">
|
2018-01-19 20:10:54 +08:00
|
|
|
|
<link href="{{cdncss "/static/css/jstree.css"}}" rel="stylesheet">
|
2018-09-06 16:36:29 +08:00
|
|
|
|
<link href="{{cdncss "/static/editor.md/lib/sequence/sequence-diagram-min.css" "version"}}" rel="stylesheet">
|
|
|
|
|
<link href="{{cdncss "/static/editor.md/css/editormd.preview.css" "version"}}" rel="stylesheet">
|
2018-08-15 15:33:22 +08:00
|
|
|
|
<link href="{{cdncss "/static/css/markdown.preview.css" "version"}}" rel="stylesheet">
|
|
|
|
|
<link href="{{cdncss (print "/static/editor.md/lib/highlight/styles/" .HighlightStyle ".css") "version"}}" rel="stylesheet">
|
2018-01-27 10:56:23 +08:00
|
|
|
|
<link href="{{cdncss "/static/katex/katex.min.css"}}" rel="stylesheet">
|
2018-08-15 15:33:22 +08:00
|
|
|
|
<link href="{{cdncss "/static/css/print.css" "version"}}" media="print" rel="stylesheet">
|
2018-07-10 16:26:25 +08:00
|
|
|
|
|
2021-10-09 18:22:43 +08:00
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
window.IS_ENABLE_IFRAME = '{{conf "enable_iframe" }}' === 'true';
|
|
|
|
|
window.BASE_URL = '{{urlfor "HomeController.Index" }}';
|
|
|
|
|
</script>
|
2018-08-17 17:33:45 +08:00
|
|
|
|
<script type="text/javascript">window.book={"identify":"{{.Model.Identify}}"};</script>
|
2021-03-18 15:02:19 +08:00
|
|
|
|
<style>
|
|
|
|
|
.btn-mobile {
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: 10px;
|
|
|
|
|
top: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media screen and (min-width: 840px) {
|
|
|
|
|
.btn-mobile{
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
2017-04-30 22:13:12 +08:00
|
|
|
|
</head>
|
|
|
|
|
<body>
|
2017-05-13 17:41:17 +08:00
|
|
|
|
<div class="m-manual manual-mode-view manual-reader">
|
2017-04-30 22:13:12 +08:00
|
|
|
|
<header class="navbar navbar-static-top manual-head" role="banner">
|
|
|
|
|
<div class="container-fluid">
|
|
|
|
|
<div class="navbar-header pull-left manual-title">
|
|
|
|
|
<span class="slidebar" id="slidebar"><i class="fa fa-align-justify"></i></span>
|
2017-05-13 17:41:17 +08:00
|
|
|
|
<a href="{{urlfor "DocumentController.Index" ":key" .Model.Identify}}" title="{{.Model.BookName}}" class="book-title">{{.Model.BookName}}</a>
|
2017-04-30 22:13:12 +08:00
|
|
|
|
<span style="font-size: 12px;font-weight: 100;"></span>
|
|
|
|
|
</div>
|
2021-04-11 01:20:47 +08:00
|
|
|
|
<a href="{{urlfor "HomeController.Index"}}" class="btn btn-default btn-mobile"> <i class="fa fa-home" aria-hidden="true"></i> {{i18n .Lang "common.home"}}</a>
|
2017-04-30 22:13:12 +08:00
|
|
|
|
<div class="navbar-header pull-right manual-menu">
|
2021-04-11 01:20:47 +08:00
|
|
|
|
<div class="dropdown pull-left" style="margin-right: 10px;">
|
|
|
|
|
<a href="{{urlfor "HomeController.Index"}}" class="btn btn-default"><i class="fa fa-home" aria-hidden="true"></i> {{i18n .Lang "common.home"}}</a>
|
|
|
|
|
</div>
|
2018-01-25 19:18:59 +08:00
|
|
|
|
{{if gt .Member.MemberId 0}}
|
|
|
|
|
{{if eq .Model.RoleId 0 1 2}}
|
2021-04-11 01:20:47 +08:00
|
|
|
|
<div class="dropdown pull-left" style="margin-right: 10px;">
|
2021-04-12 21:12:26 +08:00
|
|
|
|
<a href="{{urlfor "DocumentController.Edit" ":key" .Model.Identify ":id" ""}}" class="btn btn-danger"><i class="fa fa-edit" aria-hidden="true"></i> {{i18n .Lang "blog.edit"}}</a>
|
2018-11-14 15:57:55 +08:00
|
|
|
|
{{if eq .Model.RoleId 0 1}}
|
2021-04-11 01:20:47 +08:00
|
|
|
|
<a href="{{urlfor "BookController.Users" ":key" .Model.Identify}}" class="btn btn-success"><i class="fa fa-user" aria-hidden="true"></i> {{i18n .Lang "blog.member"}}</a>
|
|
|
|
|
<a href="{{urlfor "BookController.Setting" ":key" .Model.Identify}}" class="btn btn-primary"><i class="fa fa-gear" aria-hidden="true"></i> {{i18n .Lang "common.setting"}}</a>
|
2018-11-14 15:57:55 +08:00
|
|
|
|
{{end}}
|
2018-01-25 19:18:59 +08:00
|
|
|
|
</div>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{end}}
|
2021-04-11 01:20:47 +08:00
|
|
|
|
<a href="javascript:window.print();" id="printSinglePage" class="btn btn-default" style="margin-right: 10px;"><i class="fa fa-print"></i> {{i18n .Lang "doc.print"}}</a>
|
2018-01-25 19:18:59 +08:00
|
|
|
|
<div class="dropdown pull-right" style="margin-right: 10px;">
|
|
|
|
|
{{if eq .Model.PrivatelyOwned 0}}
|
2018-03-13 19:20:50 +08:00
|
|
|
|
{{if .Model.IsEnableShare}}
|
2021-04-11 01:20:47 +08:00
|
|
|
|
<button type="button" class="btn btn-success" data-toggle="modal" data-target="#shareProject"><i class="fa fa-share-square" aria-hidden="true"></i> {{i18n .Lang "doc.share"}}</button>
|
2018-01-25 19:18:59 +08:00
|
|
|
|
{{end}}
|
2018-03-13 19:20:50 +08:00
|
|
|
|
{{end}}
|
2018-01-25 19:18:59 +08:00
|
|
|
|
</div>
|
2018-02-28 15:47:00 +08:00
|
|
|
|
{{if .Model.IsDownload}}
|
2018-01-25 19:18:59 +08:00
|
|
|
|
<div class="dropdown pull-right" style="margin-right: 10px;">
|
|
|
|
|
<button type="button" class="btn btn-primary" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
2021-04-11 01:20:47 +08:00
|
|
|
|
<i class="fa fa-cloud-download" aria-hidden="true"></i> {{i18n .Lang "doc.download"}} <span class="caret"></span>
|
2017-04-30 22:13:12 +08:00
|
|
|
|
</button>
|
2018-01-25 19:18:59 +08:00
|
|
|
|
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel" style="margin-top: -5px;">
|
|
|
|
|
<li><a href="{{urlfor "DocumentController.Export" ":key" .Model.Identify "output" "pdf"}}" target="_blank">PDF</a> </li>
|
|
|
|
|
<li><a href="{{urlfor "DocumentController.Export" ":key" .Model.Identify "output" "epub"}}" target="_blank">EPUB</a> </li>
|
|
|
|
|
<li><a href="{{urlfor "DocumentController.Export" ":key" .Model.Identify "output" "mobi"}}" target="_blank">MOBI</a> </li>
|
2018-01-26 17:17:38 +08:00
|
|
|
|
<li><a href="{{urlfor "DocumentController.Export" ":key" .Model.Identify "output" "docx"}}" target="_blank">Word</a> </li>
|
2018-03-12 18:24:58 +08:00
|
|
|
|
{{if eq .Model.Editor "markdown"}}
|
|
|
|
|
<li><a href="{{urlfor "DocumentController.Export" ":key" .Model.Identify "output" "markdown"}}" target="_blank">Markdown</a> </li>
|
|
|
|
|
{{end}}
|
2017-04-30 22:13:12 +08:00
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2018-02-28 15:47:00 +08:00
|
|
|
|
{{end}}
|
2017-04-30 22:13:12 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</header>
|
|
|
|
|
<article class="container-fluid manual-body">
|
|
|
|
|
<div class="manual-left">
|
|
|
|
|
<div class="manual-tab">
|
|
|
|
|
<div class="tab-navg">
|
2021-04-11 01:20:47 +08:00
|
|
|
|
<span data-mode="view" class="navg-item active"><i class="fa fa-align-justify"></i><b class="text">{{i18n .Lang "doc.contents"}}</b></span>
|
|
|
|
|
<span data-mode="search" class="navg-item"><i class="fa fa-search"></i><b class="text">{{i18n .Lang "doc.search"}}</b></span>
|
2021-03-24 09:40:27 +08:00
|
|
|
|
<span id="handlerMenuShow" style="float: right;display: inline-block;padding: 5px;cursor: pointer;">
|
|
|
|
|
<i class="fa fa-angle-left" style="font-size: 20px;padding-right: 5px;"></i>
|
2021-04-11 01:20:47 +08:00
|
|
|
|
<span class="pull-right" style="padding-top: 4px;">{{i18n .Lang "doc.expand"}}</span>
|
2021-03-24 09:40:27 +08:00
|
|
|
|
</span>
|
2017-04-30 22:13:12 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-util">
|
|
|
|
|
<span class="manual-fullscreen-switch">
|
2021-04-11 01:20:47 +08:00
|
|
|
|
<b class="open fa fa-angle-right" title="{{i18n .Lang "doc.expand"}}"></b>
|
|
|
|
|
<b class="close fa fa-angle-left" title="{{i18n .Lang "doc.close"}}"></b>
|
2017-04-30 22:13:12 +08:00
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-wrap">
|
|
|
|
|
<div class="tab-item manual-catalog">
|
|
|
|
|
<div class="catalog-list read-book-preview" id="sidebar">
|
2017-05-13 12:12:37 +08:00
|
|
|
|
{{.Result}}
|
2017-04-30 22:13:12 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
2017-05-13 17:41:17 +08:00
|
|
|
|
<div class="tab-item manual-search">
|
|
|
|
|
<div class="search-container">
|
|
|
|
|
<div class="search-form">
|
|
|
|
|
<form id="searchForm" action="{{urlfor "DocumentController.Search" ":key" .Model.Identify}}" method="post">
|
|
|
|
|
<div class="form-group">
|
2021-04-11 01:20:47 +08:00
|
|
|
|
<input type="search" placeholder="{{i18n .Lang "message.search_placeholder"}}" class="form-control" name="keyword">
|
2017-05-15 14:31:17 +08:00
|
|
|
|
<button type="submit" class="btn btn-default btn-search" id="btnSearch">
|
2017-05-13 17:41:17 +08:00
|
|
|
|
<i class="fa fa-search"></i>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="search-result">
|
2017-05-15 14:31:17 +08:00
|
|
|
|
<div class="search-empty">
|
|
|
|
|
<i class="fa fa-search-plus" aria-hidden="true"></i>
|
2021-04-11 01:20:47 +08:00
|
|
|
|
<b class="text">{{i18n .Lang "message.no_search_result"}}</b>
|
2017-05-15 14:31:17 +08:00
|
|
|
|
</div>
|
|
|
|
|
<ul class="search-list" id="searchList">
|
2017-05-13 17:41:17 +08:00
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2017-04-30 22:13:12 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="m-copyright">
|
|
|
|
|
<p>
|
2021-04-21 20:40:54 +08:00
|
|
|
|
<div id="view_count">{{i18n .Lang "doc.view_count"}}:{{.ViewCount}}</div>
|
|
|
|
|
{{i18n $.Lang "doc.doc_publish_by"}} <a href="https://www.iminho.me" target="_blank">MinDoc</a> {{i18n $.Lang "doc.doc_publish"}}
|
2017-04-30 22:13:12 +08:00
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="manual-right">
|
|
|
|
|
<div class="manual-article">
|
|
|
|
|
<div class="article-head">
|
|
|
|
|
<div class="container-fluid">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-2">
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-8 text-center">
|
|
|
|
|
<h1 id="article-title">{{.Title}}</h1>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-2">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="article-content">
|
|
|
|
|
<div class="article-body {{if eq .Model.Editor "markdown"}}markdown-body editormd-preview-container{{else}}editor-content{{end}}" id="page-content">
|
|
|
|
|
{{.Content}}
|
|
|
|
|
</div>
|
2017-05-16 15:50:12 +08:00
|
|
|
|
<div class="jump-top">
|
|
|
|
|
<a href="javascript:;" class="view-backtop"><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
|
|
|
|
|
</div>
|
2017-04-30 22:13:12 +08:00
|
|
|
|
</div>
|
2017-05-01 12:15:55 +08:00
|
|
|
|
|
2017-04-30 22:13:12 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="manual-progress"><b class="progress-bar"></b></div>
|
|
|
|
|
</article>
|
|
|
|
|
<div class="manual-mask"></div>
|
|
|
|
|
</div>
|
2018-03-13 19:20:50 +08:00
|
|
|
|
{{if .Model.IsEnableShare}}
|
2018-01-25 19:18:59 +08:00
|
|
|
|
<!-- 分享项目 -->
|
2017-04-30 22:13:12 +08:00
|
|
|
|
<div class="modal fade" id="shareProject" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
|
|
|
<div class="modal-dialog">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
2021-04-11 01:20:47 +08:00
|
|
|
|
<h4 class="modal-title" id="myModalLabel">{{i18n .Lang "doc.share_project"}}</h4>
|
2017-04-30 22:13:12 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
2017-05-13 13:04:53 +08:00
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-sm-12 text-center" style="padding-bottom: 15px;">
|
|
|
|
|
<img src="{{urlfor "DocumentController.QrCode" ":key" .Model.Identify}}" alt="扫一扫手机阅读" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2017-04-30 22:13:12 +08:00
|
|
|
|
<div class="form-group">
|
2021-04-11 01:20:47 +08:00
|
|
|
|
<label for="password" class="col-sm-2 control-label">{{i18n .Lang "doc.share_url"}}</label>
|
2017-04-30 22:13:12 +08:00
|
|
|
|
<div class="col-sm-10">
|
2021-04-11 01:20:47 +08:00
|
|
|
|
<input type="text" value="{{urlfor "DocumentController.Index" ":key" .Model.Identify}}" class="form-control" onmouseover="this.select()" id="projectUrl" title="{{i18n .Lang "doc.share_url"}}">
|
2017-04-30 22:13:12 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
2021-04-11 01:20:47 +08:00
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{i18n .Lang "doc.close"}}</button>
|
2017-04-30 22:13:12 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2018-03-13 19:20:50 +08:00
|
|
|
|
{{end}}
|
2018-01-25 19:18:59 +08:00
|
|
|
|
<!-- 下载项目 -->
|
|
|
|
|
<div class="modal fade" id="downloadBookModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
|
|
|
<div class="modal-dialog">
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
2021-04-11 01:20:47 +08:00
|
|
|
|
<h4 class="modal-title" id="myModalLabel">{{i18n .Lang "doc.share_project"}}</h4>
|
2018-01-25 19:18:59 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-sm-12 text-center" style="padding-bottom: 15px;">
|
|
|
|
|
<img src="{{urlfor "DocumentController.QrCode" ":key" .Model.Identify}}" alt="扫一扫手机阅读" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
2021-04-11 01:20:47 +08:00
|
|
|
|
<label for="password" class="col-sm-2 control-label">{{i18n .Lang "doc.share_url"}}</label>
|
2018-01-25 19:18:59 +08:00
|
|
|
|
<div class="col-sm-10">
|
2021-04-11 01:20:47 +08:00
|
|
|
|
<input type="text" value="{{urlfor "DocumentController.Index" ":key" .Model.Identify}}" class="form-control" onmouseover="this.select()" id="projectUrl" title="{{i18n .Lang "doc.share_url"}}">
|
2018-01-25 19:18:59 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
2021-04-11 01:20:47 +08:00
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{i18n .Lang "doc.close"}}</button>
|
2018-01-25 19:18:59 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2017-05-12 14:21:29 +08:00
|
|
|
|
<script src="{{cdnjs "/static/jquery/1.12.4/jquery.min.js"}}"></script>
|
|
|
|
|
<script src="{{cdnjs "/static/bootstrap/js/bootstrap.min.js"}}"></script>
|
2017-05-13 17:41:17 +08:00
|
|
|
|
<script src="{{cdnjs "/static/js/jquery.form.js"}}" type="text/javascript"></script>
|
2018-01-25 19:18:59 +08:00
|
|
|
|
<script src="{{cdnjs "/static/layer/layer.js"}}" type="text/javascript"></script>
|
2017-05-12 14:21:29 +08:00
|
|
|
|
<script src="{{cdnjs "/static/jstree/3.3.4/jstree.min.js"}}" type="text/javascript"></script>
|
2018-01-08 16:36:30 +08:00
|
|
|
|
<script src="{{cdnjs "/static/nprogress/nprogress.js"}}" type="text/javascript"></script>
|
2018-08-07 17:19:56 +08:00
|
|
|
|
<script src="{{cdnjs "/static/editor.md/lib/highlight/highlight.js"}}" type="text/javascript"></script>
|
2018-01-19 20:10:54 +08:00
|
|
|
|
<script src="{{cdnjs "/static/js/jquery.highlight.js"}}" type="text/javascript"></script>
|
2018-08-15 15:33:22 +08:00
|
|
|
|
<script src="{{cdnjs "/static/js/kancloud.js" "version"}}" type="text/javascript"></script>
|
|
|
|
|
<script src="{{cdnjs "/static/js/splitbar.js" "version"}}" type="text/javascript"></script>
|
2021-10-09 18:22:43 +08:00
|
|
|
|
<script src="{{cdnjs "/static/js/custom-elements-builtin-0.6.5.min.js"}}" type="text/javascript"></script>
|
|
|
|
|
<script src="{{cdnjs "/static/js/x-frame-bypass-1.0.2.js"}}" type="text/javascript"></script>
|
2017-04-30 22:13:12 +08:00
|
|
|
|
<script type="text/javascript">
|
2017-05-26 14:19:27 +08:00
|
|
|
|
$(function () {
|
|
|
|
|
$("#searchList").on("click","a",function () {
|
|
|
|
|
var id = $(this).attr("data-id");
|
|
|
|
|
var url = "{{urlfor "DocumentController.Read" ":key" .Model.Identify ":id" ""}}/" + id;
|
|
|
|
|
$(this).parent("li").siblings().find("a").removeClass("active");
|
|
|
|
|
$(this).addClass("active");
|
|
|
|
|
loadDocument(url,id,function (body) {
|
|
|
|
|
return $(body).highlight(window.keyword);
|
2017-05-15 14:31:17 +08:00
|
|
|
|
});
|
2017-04-30 22:13:12 +08:00
|
|
|
|
});
|
2021-03-24 09:40:27 +08:00
|
|
|
|
|
|
|
|
|
window.menuControl = true;
|
|
|
|
|
window.menuSetting = "open" ;
|
|
|
|
|
if (menuSetting == 'open' || menuSetting == 'first') {
|
2021-04-11 01:20:47 +08:00
|
|
|
|
$('#handlerMenuShow').find('span').text('{{i18n .Lang "doc.fold"}}');
|
2021-03-24 09:40:27 +08:00
|
|
|
|
$('#handlerMenuShow').find('i').attr("class","fa fa-angle-down");
|
|
|
|
|
if (menuSetting == 'open') {
|
|
|
|
|
window.jsTree.jstree().open_all()
|
|
|
|
|
}
|
|
|
|
|
if (menuSetting == 'first') {
|
|
|
|
|
window.jsTree.jstree('close_all')
|
|
|
|
|
var $target = $('.jstree-container-ul').children('li').filter(function(index){
|
|
|
|
|
if($(this).attr('aria-expanded')==false||$(this).attr('aria-expanded')){
|
|
|
|
|
return $(this)
|
|
|
|
|
}else{
|
|
|
|
|
delete $(this)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
$target.children('i').trigger('click')
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
menuControl = false;
|
|
|
|
|
window.jsTree.jstree('close_all')
|
|
|
|
|
}
|
|
|
|
|
$('#handlerMenuShow').on('click', function(){
|
|
|
|
|
if(menuControl){
|
2021-04-11 01:20:47 +08:00
|
|
|
|
$(this).find('span').text('{{i18n .Lang "doc.expand"}}')
|
2021-03-24 09:40:27 +08:00
|
|
|
|
$(this).find('i').attr("class","fa fa-angle-left")
|
|
|
|
|
window.menuControl = false
|
|
|
|
|
window.jsTree.jstree('close_all')
|
|
|
|
|
}else{
|
|
|
|
|
window.menuControl = true
|
2021-04-11 01:20:47 +08:00
|
|
|
|
$(this).find('span').text('{{i18n .Lang "doc.fold"}}')
|
2021-03-24 09:40:27 +08:00
|
|
|
|
$(this).find('i').attr("class","fa fa-angle-down")
|
|
|
|
|
window.jsTree.jstree().open_all()
|
|
|
|
|
}
|
|
|
|
|
})
|
2017-05-26 14:19:27 +08:00
|
|
|
|
});
|
2017-04-30 22:13:12 +08:00
|
|
|
|
</script>
|
2018-09-11 15:57:03 +08:00
|
|
|
|
{{.Scripts}}
|
2017-04-30 22:13:12 +08:00
|
|
|
|
</body>
|
|
|
|
|
</html>
|