-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
177 lines (175 loc) · 6.41 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0, maximum-scale=1.0">
<title>mtMonkeyJs</title>
<link rel="stylesheet" href="./css/isaac.table.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.2.3/gh-fork-ribbon.min.css" />
<style>
html{
background: #333;
}
#tb-f{
max-width: 1000px;
height: 600px;
margin: 0 auto;
margin-top: 200px;
}
#tb-f h1,#tb-f h4{
text-align: center;
color: #fff;
}
#tb-f h4 span{
font-weight: normal;
}
#tb-f h4 a{
color: #97ebf9;
font-weight: normal;
}
#tb-f h1 span,#tb-f h4 span{
text-shadow: 0px -3px 0px #000000;
}
#tb-g{
border: 7px solid #212121;
max-width: 1000px;
overflow: auto;
}
.rcopy{
text-decoration-line: underline !important;
}
.isaac_table{
width: 986px;
}
#isaacTable_basefooter_0{
width: 976px;
}
.tooltip{
font-size: 10px;
color: #fff;
}
.tooltip .tooltip-arrow{
width: 0;
height: 0;
border: 4px solid;
border-color: transparent green transparent transparent;
float: left;
margin-top: 6px;
}
.tooltip .tooltip-inner{
padding: 2px 3px;
background: green;
float: left;
}
.success .tooltip-arrow{
border-color: transparent green transparent transparent;
}
.success .tooltip-inner{
background: green;
}
.error .tooltip-arrow{
border-color: transparent red transparent transparent;
}
.error .tooltip-inner{
background: red;
}
</style>
<script type="text/javascript" src="./lib/jquery-1.9.1.js"></script>
<script type="text/javascript" src="./lib/isaac.table.js"></script>
<script src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js"></script>
<script src="https://unpkg.com/popper.js@^1"></script>
<script src="https://unpkg.com/tooltip.js@^1"></script>
<script type="text/javascript">
let baseurl = window.location.href;
let option={
multipleSelect: true,
checkBox:false,
param: { page: 1, rp: 10 },
columns: [[
{ title: "序号", field: "id",width:"100px" },
{ title: "名称", field: "name",width:"200px" },
{ title: "链接", field: "url" },
{ title: "操作", field: "url",width:"120px",formatter:function(val){
return '<a class="rcopy" href="javascript:;" data-clipboard-text="'+val+'">复制链接</a>'
} }
]],
data:{
"rows":[
{"id":1,"name":"portal考勤提醒","url":baseurl+"src/jetPortal.js"},
{"id":2,"name":"测速网去广告","url":baseurl+"src/speedtest.js"},
{"id":3,"name":"unicode-table去广告","url":baseurl+"src/unicodetable.js"},
{"id":4,"name":"markdown文档插图解决方案","url":baseurl+"src/lightshotSave.js"},
{"id":5,"name":"泛微自动登录","url":baseurl+"src/dpark_fw.js"},
{"id":6,"name":"DomPortal自动登录","url":baseurl+"src/dpark_domportal.js"},
{"id":7,"name":"HRM自动登录","url":baseurl+"src/dpark_hrm.js"},
{"id":8,"name":"苏州大学成教在线教学平台","url":baseurl+"src/sudaxuexi.js"}
],
"total":8
}
};
$(function(){
let tooltip=null;
let toolTipS={};
$("#tb1").isaacTable(option);
$(".rcopy").each((c,e)=>{
let clipboard=new ClipboardJS(e);
clipboard.on('success', function() {
if(toolTipS.hasOwnProperty(c.toString())){
window.setTimeout(()=>{
toolTipS[c.toString()].show();
},200);
}else{
let xx = new Tooltip(e,{
placement:'right',
title:'复制成功',
trigger:'manual',
container:document.querySelector('.success')
});
window.setTimeout(()=>{
xx.show();
},200);
toolTipS[c.toString()]=xx;
}
});
clipboard.on('error', function() {
if(toolTipS.hasOwnProperty(c.toString())){
toolTipS[c.toString()].updateTitleContent('复制失败');
window.setTimeout(()=>{
toolTipS[c.toString()].show();
},200);
}else{
let xx = new Tooltip(e,{
placement:'right',
title:'复制失败',
trigger:'manual',
container:document.querySelector('.error')
});
window.setTimeout(()=>{
xx.show();
},200);
toolTipS[c.toString()]=xx;
}
});
$(e).mouseout(()=>{
if(toolTipS.hasOwnProperty(c.toString())){
window.setTimeout(()=>{
toolTipS[c.toString()].hide();
},100)
}
})
});
})
</script>
</head>
<body>
<div id="tb-f">
<h1><span>目录列表</span></h1>
<div id="tb-g">
<table id="tb1"></table>
</div>
<div class="success"></div>
<div class="error"></div>
<a class="github-fork-ribbon" href="https://github.com/meterXu/mtMonkeyJs" data-ribbon="Fork me on GitHub" title="Fork me on GitHub">Fork me on GitHub</a>
</div>
</body>
</html>