mirror of https://github.com/mindoc-org/mindoc.git
parent
31cb464dc2
commit
f616985036
|
@ -88,6 +88,10 @@
|
||||||
<div class="tab-navg">
|
<div class="tab-navg">
|
||||||
<span data-mode="view" class="navg-item active"><i class="fa fa-align-justify"></i><b class="text">目录</b></span>
|
<span data-mode="view" class="navg-item active"><i class="fa fa-align-justify"></i><b class="text">目录</b></span>
|
||||||
<span data-mode="search" class="navg-item"><i class="fa fa-search"></i><b class="text">搜索</b></span>
|
<span data-mode="search" class="navg-item"><i class="fa fa-search"></i><b class="text">搜索</b></span>
|
||||||
|
<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>
|
||||||
|
<span class="pull-right" style="padding-top: 4px;">展开</span>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-util">
|
<div class="tab-util">
|
||||||
<span class="manual-fullscreen-switch">
|
<span class="manual-fullscreen-switch">
|
||||||
|
@ -290,6 +294,43 @@ $(function () {
|
||||||
return $(body).highlight(window.keyword);
|
return $(body).highlight(window.keyword);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
window.menuControl = true;
|
||||||
|
window.menuSetting = "open" ;
|
||||||
|
if (menuSetting == 'open' || menuSetting == 'first') {
|
||||||
|
$('#handlerMenuShow').find('span').text('收起');
|
||||||
|
$('#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){
|
||||||
|
$(this).find('span').text('展开')
|
||||||
|
$(this).find('i').attr("class","fa fa-angle-left")
|
||||||
|
window.menuControl = false
|
||||||
|
window.jsTree.jstree('close_all')
|
||||||
|
}else{
|
||||||
|
window.menuControl = true
|
||||||
|
$(this).find('span').text('收起')
|
||||||
|
$(this).find('i').attr("class","fa fa-angle-down")
|
||||||
|
window.jsTree.jstree().open_all()
|
||||||
|
}
|
||||||
|
})
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{{.Scripts}}
|
{{.Scripts}}
|
||||||
|
|
|
@ -56,7 +56,8 @@
|
||||||
<div class="m-manual manual-editor">
|
<div class="m-manual manual-editor">
|
||||||
<div class="manual-head" id="editormd-tools" style="min-width: 1200px; position:absolute;">
|
<div class="manual-head" id="editormd-tools" style="min-width: 1200px; position:absolute;">
|
||||||
<div class="editormd-group">
|
<div class="editormd-group">
|
||||||
<a href="{{urlfor "BookController.Index"}}" data-toggle="tooltip" data-title="返回"><i class="fa fa-chevron-left" aria-hidden="true"></i></a>
|
<!--a href="{{urlfor "BookController.Index"}}" data-toggle="tooltip" data-title="返回"><i class="fa fa-chevron-left" aria-hidden="true"></i></a-->
|
||||||
|
<a href="javascript:" onclick="self.location=document.referrer;" data-toggle="tooltip" data-title="返回"><i class="fa fa-chevron-left" aria-hidden="true"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="editormd-group">
|
<div class="editormd-group">
|
||||||
<a href="javascript:;" id="markdown-save" data-toggle="tooltip" data-title="保存" class="disabled save"><i class="fa fa-save first" aria-hidden="true" name="save"></i></a>
|
<a href="javascript:;" id="markdown-save" data-toggle="tooltip" data-title="保存" class="disabled save"><i class="fa fa-save first" aria-hidden="true" name="save"></i></a>
|
||||||
|
|
Loading…
Reference in New Issue