From a2faa081f662bc2597364708c5986dd2d29f0aa1 Mon Sep 17 00:00:00 2001 From: xiaoz Date: Thu, 24 Dec 2020 21:46:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=BA=9BBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/default/index.php | 3 -- templates/default/static/embed.js | 58 ++++++++++++++++++++---------- templates/default/static/style.css | 23 ++++++++++++ version.txt | 2 +- 4 files changed, 64 insertions(+), 22 deletions(-) diff --git a/templates/default/index.php b/templates/default/index.php index 1454e42..6c494f9 100644 --- a/templates/default/index.php +++ b/templates/default/index.php @@ -157,9 +157,6 @@ - diff --git a/templates/default/static/embed.js b/templates/default/static/embed.js index 3466e31..2b756fb 100644 --- a/templates/default/static/embed.js +++ b/templates/default/static/embed.js @@ -56,11 +56,12 @@ function get_domain(){ } //弹窗 function msg(text){ + // alert('dfd'); $html = '
' + text + '
'; $("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() { 'cssClass':'show_qrcode', 'content':'' }); + }}, + "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({ 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':'' + }); + }}, "copy":{name:"复制链接",icon:"copy",callback:function(){ link_url = $(this).attr('link-url'); // 复制按钮 @@ -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':'' - }); }} + } }); // 加载游客右键菜单END diff --git a/templates/default/static/style.css b/templates/default/static/style.css index ce5acc0..a9e6310 100644 --- a/templates/default/static/style.css +++ b/templates/default/static/style.css @@ -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; } \ No newline at end of file diff --git a/version.txt b/version.txt index 3b922c6..5e5fae1 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -v0.9.7-20201223 \ No newline at end of file +v0.9.8-20201224 \ No newline at end of file