mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-24 07:30:10 +01:00
Fix scroll to issues with post-hover.js, clean up highlightReply
Conflicts: templates/post_reply.html templates/post_thread.html
This commit is contained in:
parent
73177fcffc
commit
8d8563a20d
@ -66,6 +66,7 @@ onready(function(){
|
|||||||
var $newPost = $post.clone();
|
var $newPost = $post.clone();
|
||||||
$newPost.find('>.reply, >br').remove();
|
$newPost.find('>.reply, >br').remove();
|
||||||
$newPost.find('span.mentioned').remove();
|
$newPost.find('span.mentioned').remove();
|
||||||
|
$newPost.find('a.post_anchor').remove();
|
||||||
|
|
||||||
$newPost
|
$newPost
|
||||||
.attr('id', 'post-hover-' + id)
|
.attr('id', 'post-hover-' + id)
|
||||||
|
@ -25,7 +25,7 @@ a.post_no {
|
|||||||
p.intro a.post_no {
|
p.intro a.post_no {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
p.intro a.post_no, p.intro a.email {
|
p.intro a.post_no, p.intro a.email, p.intro a.post_anchor {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
p.intro a.email span.name {
|
p.intro a.email span.name {
|
||||||
|
@ -155,7 +155,7 @@ function highlightReply(id) {
|
|||||||
if (post)
|
if (post)
|
||||||
post.className += ' highlighted';
|
post.className += ' highlighted';
|
||||||
}
|
}
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function generatePassword() {
|
function generatePassword() {
|
||||||
@ -188,6 +188,8 @@ function dopost(form) {
|
|||||||
function citeReply(id, with_link) {
|
function citeReply(id, with_link) {
|
||||||
var textarea = document.getElementById('body');
|
var textarea = document.getElementById('body');
|
||||||
|
|
||||||
|
if (!textarea) return false;
|
||||||
|
|
||||||
if (document.selection) {
|
if (document.selection) {
|
||||||
// IE
|
// IE
|
||||||
textarea.focus();
|
textarea.focus();
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{% filter remove_whitespace %}
|
{% filter remove_whitespace %}
|
||||||
{# tabs and new lines will be ignored #}
|
{# tabs and new lines will be ignored #}
|
||||||
<div class="post reply" id="reply_{{ post.id }}">
|
<div class="post reply" id="reply_{{ post.id }}">
|
||||||
|
<p class="intro">
|
||||||
<p class="intro"{% if not index %} id="{{ post.id }}"{% endif %}>
|
{% if not index %}<a id="{{ post.id }}" class="post_anchor"></a>{% endif %}
|
||||||
<input type="checkbox" class="delete" name="delete_{{ post.id }}" id="delete_{{ post.id }}" />
|
<input type="checkbox" class="delete" name="delete_{{ post.id }}" id="delete_{{ post.id }}" />
|
||||||
<label for="delete_{{ post.id }}">
|
<label for="delete_{{ post.id }}">
|
||||||
{% include 'post/subject.html' %}
|
{% include 'post/subject.html' %}
|
||||||
@ -11,12 +11,9 @@
|
|||||||
{% include 'post/flag.html' %}
|
{% include 'post/flag.html' %}
|
||||||
{% include 'post/time.html' %}
|
{% include 'post/time.html' %}
|
||||||
</label>
|
</label>
|
||||||
{% include 'post/poster_id.html' %}
|
{% include 'post/poster_id.html' %}
|
||||||
|
<a class="post_no" id="post_no_{{ post.id }}" onclick="highlightReply({{ post.id }})" href="{{ post.link }}">No.</a>
|
||||||
<a class="post_no" onclick="return document.querySelectorAll('div.banner').length ? highlightReply({{ post.id }}) : true;" href="{{ post.link }}">No.</a>
|
<a class="post_no" onclick="citeReply({{ post.id }})" href="{{ post.link('q') }}">{{ post.id }}</a>
|
||||||
<a class="post_no" onclick="return document.querySelectorAll('div.banner').length ? citeReply({{ post.id }}) : true;" href="{{ post.link('q') }}">
|
|
||||||
{{ post.id }}
|
|
||||||
</a>
|
|
||||||
</p>
|
</p>
|
||||||
{% if post.embed %}
|
{% if post.embed %}
|
||||||
{{ post.embed }}
|
{{ post.embed }}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
{# tabs and new lines will be ignored #}
|
{# tabs and new lines will be ignored #}
|
||||||
|
|
||||||
<div id="thread_{{ post.id }}" data-board="{{ board.uri }}">
|
<div id="thread_{{ post.id }}" data-board="{{ board.uri }}">
|
||||||
|
{% if not index %}<a id="{{ post.id }}" class="post_anchor"></a>{% endif %}
|
||||||
|
|
||||||
{% if post.embed %}
|
{% if post.embed %}
|
||||||
{{ post.embed }}
|
{{ post.embed }}
|
||||||
@ -33,7 +34,7 @@
|
|||||||
</span></p>
|
</span></p>
|
||||||
{% include "post/image.html" %}
|
{% include "post/image.html" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="post op"><p class="intro"{% if not index %} id="{{ post.id }}"{% endif %}>
|
<div class="post op"><p class="intro">
|
||||||
<input type="checkbox" class="delete" name="delete_{{ post.id }}" id="delete_{{ post.id }}" />
|
<input type="checkbox" class="delete" name="delete_{{ post.id }}" id="delete_{{ post.id }}" />
|
||||||
<label for="delete_{{ post.id }}">
|
<label for="delete_{{ post.id }}">
|
||||||
{% include 'post/subject.html' %}
|
{% include 'post/subject.html' %}
|
||||||
@ -42,11 +43,9 @@
|
|||||||
{% include 'post/flag.html' %}
|
{% include 'post/flag.html' %}
|
||||||
{% include 'post/time.html' %}
|
{% include 'post/time.html' %}
|
||||||
</label>
|
</label>
|
||||||
{% include 'post/poster_id.html' %}
|
{% include 'post/poster_id.html' %}
|
||||||
<a class="post_no" onclick="return document.querySelectorAll('div.banner').length ? highlightReply({{ post.id }}) : true;" href="{{ post.link }}">No.</a>
|
<a class="post_no" id="post_no_{{ post.id }}" onclick="highlightReply({{ post.id }})" href="{{ post.link }}">No.</a>
|
||||||
<a class="post_no" onclick="return document.querySelectorAll('div.banner').length ? citeReply({{ post.id }}) : true;" href="{{ post.link('q') }}">
|
<a class="post_no" onclick="citeReply({{ post.id }})" href="{{ post.link('q') }}">{{ post.id }}</a>
|
||||||
{{ post.id }}
|
|
||||||
</a>
|
|
||||||
{% if post.sticky %}
|
{% if post.sticky %}
|
||||||
{% if config.font_awesome %}
|
{% if config.font_awesome %}
|
||||||
<i class="fa fa-thumb-tack"></i>
|
<i class="fa fa-thumb-tack"></i>
|
||||||
|
Loading…
Reference in New Issue
Block a user