Skip to content

Commit

Permalink
Add:评论@锚点平滑移动 & PJAX加载超时对话框
Browse files Browse the repository at this point in the history
  • Loading branch information
ZigZagK committed Mar 25, 2020
1 parent d808dae commit 77cf3a4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion css/MDUI2333css.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
div#comments form {margin-bottom:0;}
#commentcontent > .comment-list {margin:16px 0;}
#commentcontent > .comment-list > .mdui-panel > .mdui-panel-item > .mdui-panel-item-body > .comment-children {margin-top:16px;}
#commentcontent .mdui-panel-item p img {max-height:400px;}
#commentcontent .mdui-panel-item p img {max-height:400px;vertical-align:middle;}
div.cancel-comment-reply a:hover:before,div.cancel-comment-reply a:focus:before {display:none!important;}
#QAQ {height:75%!important;max-height:400px!important;}
#QAQ .mdui-dialog-content {height:calc(100% - 100px)!important;}
Expand Down
4 changes: 3 additions & 1 deletion js/commentjs.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@
return false;
}
};
$('.haveat a').click(function(){if (location.hostname==this.hostname && location.pathname==this.pathname){var target=$(this.hash);if (target.length) {$('html,body').animate({scrollTop:target.offset().top},'fast');return false;}}});
var QAQTab=new mdui.Tab('#QAQTab');
$('#QAQ').on('open.mdui.dialog',function(){QAQTab.handleUpdate();});
Smilies={
var Smilies={
dom:function(id) {return document.getElementById(id);},
grin:function(tag){
tag=' '+tag+' ';myField=this.dom('commenttextarea');
Expand Down Expand Up @@ -107,6 +108,7 @@
});
mdui.mutation();$('html,body').animate({scrollTop:$(target).offset().top},'fast');
mdui.snackbar({message:'<?php echo $this->options->commentsuccess; ?>',position:'right-bottom'});
$('.haveat a').click(function(){if (location.hostname==this.hostname && location.pathname==this.pathname){var target=$(this.hash);if (target.length) {$('html,body').animate({scrollTop:target.offset().top},'fast');return false;}}});
}
}
});
Expand Down
10 changes: 6 additions & 4 deletions js/footerjs.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,13 @@ function handleAnimationEnd(){
animatecss('#pjax-progress','fadeOut','0.5s',function(){$('#pjax-progress').css('display','none');});
});
$(document).on('pjax:end',function(){
mdui.mutation();
<?php if (array_key_exists('Meting',$plugin['activated'])){ ?>
loadMeting();
<?php } ?>
mdui.mutation();<?php if (array_key_exists('Meting',$plugin['activated'])){ ?>loadMeting();<?php } ?>
<?php echo $this->options->pjaxreload; ?>
});
$(document).on('pjax:error',function(){
animatecss('#pjax-overlay','fadeOut','0.5s',function(){$('#pjax-overlay').css('display','none');});
animatecss('#pjax-progress','fadeOut','0.5s',function(){$('#pjax-progress').css('display','none');});
mdui.alert('PJAX加载超时,请检查网络','加载失败');this.preventDefault();
});
</script>
<?php if ($this->options->customjs) echo $this->options->customjs; ?>

0 comments on commit 77cf3a4

Please sign in to comment.