mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-19 21:03:54 -07:00
Minor improvements (#1141)
This commit is contained in:
parent
c046e8a8c1
commit
7d6d9adff2
2 changed files with 59 additions and 28 deletions
|
@ -1473,9 +1473,9 @@ CREATE TABLE IF NOT EXISTS `buf_last_seeder`
|
||||||
DROP TABLE IF EXISTS `bb_thx`;
|
DROP TABLE IF EXISTS `bb_thx`;
|
||||||
CREATE TABLE IF NOT EXISTS `bb_thx`
|
CREATE TABLE IF NOT EXISTS `bb_thx`
|
||||||
(
|
(
|
||||||
`topic_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
|
`topic_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
|
||||||
`user_id` MEDIUMINT(8) NOT NULL DEFAULT '0',
|
`user_id` MEDIUMINT(8) NOT NULL DEFAULT '0',
|
||||||
`time` INT(11) NOT NULL DEFAULT '0',
|
`time` INT(11) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`topic_id`)
|
PRIMARY KEY (`topic_id`)
|
||||||
)
|
)
|
||||||
ENGINE = MyISAM
|
ENGINE = MyISAM
|
||||||
|
|
|
@ -366,66 +366,98 @@ $('#tor-filelist-btn').click(function(){
|
||||||
|
|
||||||
<!-- IF $bb_cfg['tor_thank'] -->
|
<!-- IF $bb_cfg['tor_thank'] -->
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
#thx-block { width: 95%; margin: 12px auto 0; }
|
#thx-block {
|
||||||
#thx-block .sp-wrap { width: 100% !important; }
|
width: 95%;
|
||||||
#thx-btn-div { text-align: center; margin: 0 0 12px; }
|
margin: 12px auto 0;
|
||||||
#thx-list a { text-decoration: none; }
|
}
|
||||||
#thx-list b { font-size: 11px; color: #2E2E2E; white-space: nowrap; }
|
|
||||||
#thx-list i { font-weight: normal; color: #000000; }
|
#thx-block .sp-wrap {
|
||||||
#thx-list u { display: none; }
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#thx-btn-div {
|
||||||
|
text-align: center;
|
||||||
|
margin: 0 0 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#thx-list a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#thx-list b {
|
||||||
|
font-size: 11px;
|
||||||
|
color: #2E2E2E;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
#thx-list i {
|
||||||
|
font-weight: normal;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#thx-list u {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
BB.thx_btn_clicked = false;
|
BB.thx_btn_clicked = false;
|
||||||
|
|
||||||
ajax.thx = function(mode) {
|
ajax.thx = function (mode) {
|
||||||
ajax.exec({
|
ajax.exec({
|
||||||
action : 'thx',
|
action: 'thx',
|
||||||
mode : mode,
|
mode: mode,
|
||||||
topic_id : {TOPIC_ID}
|
topic_id: {TOPIC_ID}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
ajax.callback.thx = function(data) {
|
ajax.callback.thx = function (data) {
|
||||||
if (data.mode == 'add') {
|
if (data.mode === 'add') {
|
||||||
$('#thx-btn').hide().after('<h2 style="color: green;">{$lang['THANKS_GRATITUDE']}!<h2>');
|
$('#thx-btn').hide().after('<h2 style="color: green;">{$lang['THANKS_GRATITUDE']}!<h2>');
|
||||||
BB.thx_btn_clicked = true;
|
BB.thx_btn_clicked = true;
|
||||||
}
|
}
|
||||||
$('#thx-list').html(data.html);
|
$('#thx-list').html(data.html);
|
||||||
$('#thx-list b').after(' ');
|
$('#thx-list b').after(' ');
|
||||||
open_thx_list();
|
open_thx_list();
|
||||||
$('#thx-list b').each(function(){
|
$('#thx-list b').each(function () {
|
||||||
var uid = $(this).find('u').text();
|
var uid = $(this).find('u').text();
|
||||||
if (uid > 0) {
|
if (uid > 0) {
|
||||||
$(this).wrap('<a href="./profile.php?mode=viewprofile&u='+ uid +'"></a>');
|
$(this).wrap('<a href="./profile.php?mode=viewprofile&u=' + uid + '"></a>');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$(function(){
|
$(function () {
|
||||||
$thx_head = $('#thx-block').find('.sp-head');
|
$thx_head = $('#thx-block').find('.sp-head');
|
||||||
close_thx_list();
|
close_thx_list();
|
||||||
$('#thx-btn').one('click', function(){
|
$('#thx-btn').one('click', function () {
|
||||||
$(this).prop({disabled: true});
|
$(this).prop({disabled: true});
|
||||||
ajax.thx('add');
|
ajax.thx('add');
|
||||||
});
|
});
|
||||||
$thx_head.one('click', function(){
|
$thx_head.one('click', function () {
|
||||||
if (!BB.thx_btn_clicked) {
|
if (!BB.thx_btn_clicked) {
|
||||||
ajax.thx('get');
|
ajax.thx('get');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
function thx_is_visible () {
|
|
||||||
|
function thx_is_visible() {
|
||||||
return $('#thx-list').is(':visible');
|
return $('#thx-list').is(':visible');
|
||||||
}
|
}
|
||||||
function open_thx_list () {
|
|
||||||
if (!thx_is_visible()){ $thx_head.click(); }
|
function open_thx_list() {
|
||||||
|
if (!thx_is_visible()) {
|
||||||
|
$thx_head.click();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function close_thx_list () {
|
|
||||||
if (thx_is_visible()){ $thx_head.click(); }
|
function close_thx_list() {
|
||||||
|
if (thx_is_visible()) {
|
||||||
|
$thx_head.click();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="thx-block">
|
<div id="thx-block">
|
||||||
<div id="thx-btn-div">
|
<div id="thx-btn-div">
|
||||||
<input id="thx-btn" type="button" class="bold" style="width: 200px;" value='{$lang['THANK_TOPIC']}' />
|
<input id="thx-btn" type="button" class="bold" style="width: 200px;" value='{$lang['THANK_TOPIC']}'/>
|
||||||
</div>
|
</div>
|
||||||
<div class="sp-wrap">
|
<div class="sp-wrap">
|
||||||
<div id="thx-list" class="sp-body" title="{$lang['LAST_LIKES']}"></div>
|
<div id="thx-list" class="sp-body" title="{$lang['LAST_LIKES']}"></div>
|
||||||
|
@ -433,7 +465,6 @@ $('#tor-filelist-btn').click(function(){
|
||||||
</div>
|
</div>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
||||||
|
|
||||||
<div class="spacer_12"></div>
|
<div class="spacer_12"></div>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- END tor_reged -->
|
<!-- END tor_reged -->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue