Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
gogobody committed Oct 15, 2020
1 parent 94dd38b commit 5180aaa
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 10 deletions.
9 changes: 9 additions & 0 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ public static function admin_writepost_scripts($post){
public static function Widget_Archive_beforeRender($archive)
{
$option = Helper::options()->plugin('SmmsForTypecho');
if(Helper::options()->theme == 'onecircle'){ // this only for onecircle theme, to display in all pages
echo '<link rel="stylesheet" href="'.SMMS_URL . 'css/smms.diy.min.css'.'" type="text/css"/>';
return;
}
if (!$option->Comment_){
return;
}
Expand All @@ -168,6 +172,11 @@ public static function Widget_Archive_beforeRender($archive)
public static function Widget_Archive_afterRender($archive)
{
$option = Helper::options()->plugin('SmmsForTypecho');
if(Helper::options()->theme == 'onecircle'){ // this only for onecircle theme, to display in all pages
echo '<script src="'. SMMS_URL . 'js/comment.min.js'. '"></script>';

return;
}
if (!$option->Comment_){
return;
}
Expand Down
1 change: 0 additions & 1 deletion css/input.min.min.css

This file was deleted.

1 change: 0 additions & 1 deletion css/modal.min.min.css

This file was deleted.

1 change: 1 addition & 0 deletions css/smms.diy.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ input#zz-img-file {
width: 60px;
height: 60px;
display: flex;
border-radius: 5px;
}

.chevereto-pup-button-icon svg {
Expand Down
2 changes: 1 addition & 1 deletion css/smms.diy.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion css/smms.diy.min.min.css

This file was deleted.

4 changes: 3 additions & 1 deletion js/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ smms = {
$("#zz-img-add").text('上传图片');
$('#zz-img-show').append('<img src="' + res.data.url + '" />');
//$('textarea[name="comment"]').val($('textarea[name="comment"]').val() + '<img src="' + res.data.url + '" />').focus();
$(comment_selector_).insertAtCaret('<img src="' + res.data.url + '" />');
if (typeof comment_selector_!="undefined" ){
$(comment_selector_).insertAtCaret('<img src="' + res.data.url + '" />');
}
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion js/comment.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion js/comment.min.min.js

This file was deleted.

1 change: 0 additions & 1 deletion js/content.min.min.js

This file was deleted.

1 change: 0 additions & 1 deletion js/jquery.min.min.js

This file was deleted.

1 change: 0 additions & 1 deletion js/modal.min.min.js

This file was deleted.

0 comments on commit 5180aaa

Please sign in to comment.