mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-26 09:08:41 +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'];
|
$id = $_POST['id'];
|
||||||
$delta = $_POST['delta'];
|
$delta = $_POST['delta'];
|
||||||
$type = $_POST['type'];
|
$type = $_POST['type'];
|
||||||
|
$show_text = isset($_POST['show-text']) && $_POST['show-text'] != 'false';
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'B':
|
case 'B':
|
||||||
@ -65,4 +66,4 @@
|
|||||||
$cnt = $row['zan'];
|
$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
|
// click zan
|
||||||
function click_zan(zan_id, zan_type, zan_delta, node) {
|
function click_zan(zan_id, zan_type, zan_delta, node) {
|
||||||
var loading_node = $('<div class="uoj-click-zan-block text-muted">loading...</div>');
|
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);
|
$(node).replaceWith(loading_node);
|
||||||
$.post(zan_link + '/click-zan', {
|
$.post(zan_link + '/click-zan', {
|
||||||
id : zan_id,
|
id : zan_id,
|
||||||
delta : zan_delta,
|
delta : zan_delta,
|
||||||
type : zan_type
|
type : zan_type,
|
||||||
|
'show-text': show_text,
|
||||||
}, function(ret) {
|
}, function(ret) {
|
||||||
$(loading_node).replaceWith($(ret).click_zan_block());
|
$(loading_node).replaceWith($(ret).click_zan_block());
|
||||||
}).fail(function() {
|
}).fail(function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user