增加帮助文档页面的打开功能以及鼠标点击复制功能

This commit is contained in:
zhangwei
2018-11-02 16:35:02 +08:00
parent 5b4c0c8af4
commit ef7c3201f0
3 changed files with 980 additions and 1 deletions

View File

@@ -85,7 +85,35 @@ $(function(){
html +="</div>";
top.$.jBox(html,{height:450,width:600,title:"<i class='icon-book-open'></i> Log Info",showIcon:false,opacity:0.5});
})
});
//表格中的tooltips鼠标点击复制完整的内容
$("td>.tooltips").on("click",function(){
//$(this).attr("data-clipboard-action","copy");
$(this).attr("data-clipboard-text",$(this).attr("data-original-title"));
var clipboard = new ClipboardJS('td >.tooltips');
clipboard.on('success', function(e) {
top.$.jBox.tip("Copyied!",'copy',{opacity:0.5,persistent:false});
console.log(e);
e.clearSelection();
});
clipboard.on('error', function(e) {
console.log(e);
});
});
//表格中的title鼠标点击复制完整内容
$("td[title]").on("click",function(){
//$(this).attr("data-clipboard-action","copy");
$(this).attr("data-clipboard-text",$(this).attr("title"));
var clipboard = new ClipboardJS('td[title]');
clipboard.on('success', function(e) {
top.$.jBox.tip("Copyied!",'copy',{opacity:0.5,persistent:false});
console.log(e);
e.clearSelection();
});
clipboard.on('error', function(e) {
console.log(e);
});
});
var tree2 = $("select[name=lableTest]").treeMultiselect({
searchable: true,
hideSidePanel:true,
@@ -1608,6 +1636,16 @@ var validateEffectiveRuleLimit=function(path,serviceId){
});
return flag;
}
//打开帮助文档页面
function openHelp(url){
top.$.jBox("iframe:"+url,{
width: $(document).width()*0.9,
height:$(document).height()*0.8,
top: '10%',
draggable:false,
title: "online help", buttons:{ "close":true}
});
}
function heightDiv(type){
var hei=document.documentElement.clientHeight;
hei=hei-91;