parent
306e3e5cf8
commit
4c2ec96e6b
5 changed files with 20 additions and 14 deletions
|
@ -190,9 +190,9 @@ hr {
|
|||
}
|
||||
|
||||
.reply {
|
||||
background: #D6DAF0;
|
||||
color: #000000;
|
||||
font-family: serif;
|
||||
background: #D6DAF0 !important;
|
||||
color: #000000 !important;
|
||||
font-family: serif !important;
|
||||
}
|
||||
|
||||
.replyhl {
|
||||
|
|
|
@ -572,6 +572,7 @@ if (!isset($_GET['delete']) && !isset($_GET['manage']) && (isset($_POST['name'])
|
|||
if (isset($_GET['res'])) {
|
||||
$html = fixLinksInRes($html);
|
||||
}
|
||||
|
||||
echo $html;
|
||||
die();
|
||||
// Check if the request is to auto-refresh a thread
|
||||
|
|
|
@ -176,7 +176,8 @@ function fixLinksInRes($html) {
|
|||
function _postLink($matches) {
|
||||
$post = postByID($matches[1]);
|
||||
if ($post) {
|
||||
return '<a href="res/' . ($post['parent'] == TINYIB_NEWTHREAD ? $post['id'] : $post['parent']) . '.html#' . $matches[1] . '">' . $matches[0] . '</a>';
|
||||
$is_op = $post['parent'] == TINYIB_NEWTHREAD;
|
||||
return '<a href="res/' . ($is_op ? $post['id'] : $post['parent']) . '.html#' . $matches[1] . '" class="' . ($is_op ? 'refop' : 'refreply') . '">' . $matches[0] . '</a>';
|
||||
}
|
||||
return $matches[0];
|
||||
}
|
||||
|
|
|
@ -441,7 +441,7 @@ function backlinks($post) {
|
|||
if ($return != '') {
|
||||
$return = ' ' . $return;
|
||||
}
|
||||
return ' <small><span id="reflinks' . $post['id'] . '" class="reflink">' . $return . '</span></small>';
|
||||
return ' <small><span id="backlinks' . $post['id'] . '" class="backlinks">' . $return . '</span></small>';
|
||||
}
|
||||
|
||||
function buildPost($post, $res, $compact=false) {
|
||||
|
|
22
js/tinyib.js
22
js/tinyib.js
|
@ -240,15 +240,15 @@ function setPostAttributes(element, autorefresh) {
|
|||
}
|
||||
|
||||
if (enablebacklinks && autorefresh) {
|
||||
reflinks = $('#reflinks' + m[1]);
|
||||
if (reflinks) {
|
||||
if (reflinks.html() == '') {
|
||||
reflinks.append(' ');
|
||||
backlinks = $('#backlinks' + m[1]);
|
||||
if (backlinks) {
|
||||
if (backlinks.html() == '') {
|
||||
backlinks.append(' ');
|
||||
} else {
|
||||
reflinks.append(', ');
|
||||
backlinks.append(', ');
|
||||
}
|
||||
reflinks.append('<a href="' + $(element).attr('postLink') + '">>>' + $(element).attr('postID') + '<a>');
|
||||
setPostAttributes(reflinks, false);
|
||||
backlinks.append('<a href="' + $(element).attr('postLink') + '">>>' + $(element).attr('postID') + '<a>');
|
||||
setPostAttributes(backlinks, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -275,11 +275,15 @@ function setPostAttributes(element, autorefresh) {
|
|||
} else if (refpost.html() && refpost.html() != undefined) {
|
||||
preview.className = 'hoverpost';
|
||||
$(preview).html(refpost.html());
|
||||
if (refpost.hasClass('reply')) {
|
||||
if (refpost.prop("tagName").toLowerCase() == 'td') {
|
||||
$(preview).addClass('reply');
|
||||
}
|
||||
} else {
|
||||
$(preview).html('<div class="hoverpost" style="padding: 14px;">Loading...</div>');
|
||||
extraclasses = '';
|
||||
if ($(this).hasClass('refreply')) {
|
||||
extraclasses = ' reply';
|
||||
}
|
||||
$(preview).html('<div class="hoverpost' + extraclasses + '" style="padding: 14px;">Loading...</div>');
|
||||
$(preview).fadeIn(125);
|
||||
$.ajax({
|
||||
url: base_url + $(this).attr('refID'),
|
||||
|
|
Loading…
Reference in a new issue