新增编辑在帮助文档功能

This commit is contained in:
wangwenrui
2019-01-25 14:19:00 +08:00
parent 52fe56b59d
commit 1d5905fe47
522 changed files with 118497 additions and 3 deletions

View File

@@ -39,7 +39,13 @@ $(document).ready(function(){
//隐藏没有分配父节点权限,却有子节点权限的叶子节点
//$("#menuTree").children("li:not(:eq(0))").hide();
});
var helpHrefVal=null;
function showHelp(helpHref) {
var editBtn=$("#editHelp");
if(editBtn!=null&&editBtn!=undefined){
editBtn.remove();
}
if(helpHref!=''){
var lang = "${cookie.Language.value }".toLowerCase();
if(lang=="" || lang.indexOf("en")!=-1) {
@@ -49,9 +55,27 @@ function showHelp(helpHref) {
}else if(lang.indexOf("ru")!=-1) {
helpHref += ".html";
}
$(".help").load("${pageContext.request.contextPath}"+helpHref);
helpHrefVal=helpHref;
$(".help").load("${pageContext.request.contextPath}"+helpHref+"?time="+new Date().getTime());
var permission="${fns:getUser().isAdmin() }";
if(permission!=null&&permission!=undefined&&permission=="true"){
$("#menuTree").parent().after('<button class="btn btn-default" id="editHelp" style="margin-left:15px;"onclick="javascript:editHelp();"><spring:message code="edit"/></button>');
}
}
};
var helpInfo=null;
function editHelp(){
helpInfo=null;
var editBtn=$("#editHelp");
if(editBtn!=null&&editBtn!=undefined){
editBtn.remove();
}
helpInfo=$(".help").html();
$(".help").load("${pageContext.request.contextPath}/online-help/editHelp.html");
};
</script>
</head>
<body>
@@ -64,8 +88,8 @@ function showHelp(helpHref) {
<div id="menuTree" class="ztree" style="margin-top:3px;float:left;"></div>
</div>
<div class="col-md-10 help">
</div>
</div>
</div>
</body>