Browse Source

修复一些BUG

pull/4/merge
xiaoz 4 years ago
parent
commit
a2faa081f6
  1. 3
      templates/default/index.php
  2. 58
      templates/default/static/embed.js
  3. 23
      templates/default/static/style.css
  4. 2
      version.txt

3
templates/default/index.php

@ -157,9 +157,6 @@ @@ -157,9 +157,6 @@
</footer>
<!-- footerend -->
</body>
<script>
//var inst = new mdui.Drawer(selector, options);
</script>
<script src = 'https://libs.xiaoz.top/jquery/2.2.4/jquery.min.js'></script>
<script src = 'https://libs.xiaoz.top/jQuery-contextMenu/2.9.2/jquery.contextMenu.min.js'></script>
<script src = 'https://libs.xiaoz.top/clipBoard.js/clipBoard.min.js'></script>

58
templates/default/static/embed.js

@ -56,11 +56,12 @@ function get_domain(){ @@ -56,11 +56,12 @@ function get_domain(){
}
//弹窗
function msg(text){
// alert('dfd');
$html = '<div class = "msg">' + text + '</div>';
$("body").append($html);
$(".msg").fadeIn();
$(".msg").fadeOut(5000);
$(".msg").remove();
$(".msg").fadeOut(3000);
// $(".msg").remove();
}
function admin_menu() {
@ -123,7 +124,27 @@ function admin_menu() { @@ -123,7 +124,27 @@ function admin_menu() {
'cssClass':'show_qrcode',
'content':'<img src = "https://qr.png.pub/v1/?text=' + url + '" />'
});
}},
"copy":{name:"复制链接",icon:"copy",callback:function(){
link_url = $(this).attr('link-url');
// 复制按钮
var copy = new clipBoard($(".context-menu-icon-copy"), {
beforeCopy: function() {
},
copy: function() {
return link_url;
},
afterCopy: function() {
//msg('链接已复制!');
mdui.alert('链接已复制!');
}
});
// 复制按钮END
}}
}
});
// 加载右键菜单END
@ -148,6 +169,21 @@ $.contextMenu({ @@ -148,6 +169,21 @@ $.contextMenu({
tempwindow.location='index.php?c=click&id='+link_id;
}},
"sep1": "---------",
"qrcode": {name: "二维码", icon:"fa-qrcode",callback:function(data,status){
var link_title = $(this).attr('link-title');
// link_title = link_title.substr(0,8);
// link_title = link_title + '...';
var link_id = $(this).attr('id');
link_id = link_id.replace('id_','');
var domain = get_domain();
var url = domain + '/click/' + link_id;
mdui.dialog({
'title':link_title,
'cssClass':'show_qrcode',
'content':'<img src = "https://qr.png.pub/v1/?text=' + url + '" />'
});
}},
"copy":{name:"复制链接",icon:"copy",callback:function(){
link_url = $(this).attr('link-url');
// 复制按钮
@ -160,28 +196,14 @@ $.contextMenu({ @@ -160,28 +196,14 @@ $.contextMenu({
},
afterCopy: function() {
// msg('链接已复制!');
//msg('链接已复制!');
mdui.alert('链接已复制!');
}
});
// 复制按钮END
}},
"qrcode": {name: "二维码", icon:"fa-qrcode",callback:function(data,status){
var link_title = $(this).attr('link-title');
link_title = link_title.substr(0,8);
link_title = link_title + '...';
var link_id = $(this).attr('id');
link_id = link_id.replace('id_','');
var domain = get_domain();
var url = domain + '/index.php?c=click&id=' + link_id;
mdui.dialog({
'title':link_title,
'cssClass':'show_qrcode',
'content':'<img src = "https://qr.png.pub/v1/?text=' + url + '" />'
});
}}
}
});
// 加载游客右键菜单END

23
templates/default/static/style.css

@ -98,4 +98,27 @@ footer a{ @@ -98,4 +98,27 @@ footer a{
text-align: center;
max-height: 200px;
max-width: 200px;
}
/* msg弹窗提醒 */
.msg{
width:40%;
line-height: 16px;
text-align: center;
padding:16px;
position: fixed;
top:30%;
left:30%;
/* color:#FFFFFF; */
/* border: 1px #009933 solid; */
background-color:rgba(0, 0, 0, 0.3);
/* box-shadow:2px 2px 2px #aaa; */
border-radius: 2px;
display: none;
}
.mdui-dialog-title{
overflow:hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow:ellipsis;
}

2
version.txt

@ -1 +1 @@ @@ -1 +1 @@
v0.9.7-20201223
v0.9.8-20201224
Loading…
Cancel
Save