mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 12:58:40 +00:00
fix: 82ca33db5e
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
82ca33db5e
commit
af2b8a437a
@ -24,6 +24,7 @@
|
||||
$id = $_POST['id'];
|
||||
$delta = $_POST['delta'];
|
||||
$type = $_POST['type'];
|
||||
$show_text = isset($_POST['show-text']) && $_POST['show-text'] != 'false';
|
||||
|
||||
switch ($type) {
|
||||
case 'B':
|
||||
@ -65,4 +66,4 @@
|
||||
$cnt = $row['zan'];
|
||||
}
|
||||
?>
|
||||
<?= getClickZanBlock($type, $id, $cnt, $cur) ?>
|
||||
<?= getClickZanBlock($type, $id, $cnt, $cur, $show_text) ?>
|
||||
|
@ -259,11 +259,13 @@ $.fn.uoj_blog_tag = function() {
|
||||
// click zan
|
||||
function click_zan(zan_id, zan_type, zan_delta, node) {
|
||||
var loading_node = $('<div class="uoj-click-zan-block text-muted">loading...</div>');
|
||||
var show_text = Boolean($(node).data('show-text'));
|
||||
$(node).replaceWith(loading_node);
|
||||
$.post(zan_link + '/click-zan', {
|
||||
id : zan_id,
|
||||
delta : zan_delta,
|
||||
type : zan_type
|
||||
type : zan_type,
|
||||
'show-text': show_text,
|
||||
}, function(ret) {
|
||||
$(loading_node).replaceWith($(ret).click_zan_block());
|
||||
}).fail(function() {
|
||||
|
Loading…
Reference in New Issue
Block a user