Browse Source

fix clicking on post ids with dynamically loaded javascript

pull/40/head
czaks 10 years ago
parent
commit
c23c792a21
  1. 2
      templates/main.js
  2. 12
      templates/post_reply.html

2
templates/main.js

@ -155,6 +155,7 @@ function highlightReply(id) {
if (post) if (post)
post.className += ' highlighted'; post.className += ' highlighted';
} }
return false;
} }
function generatePassword() { function generatePassword() {
@ -207,6 +208,7 @@ function citeReply(id, with_link) {
$(window).trigger('cite', [id, with_link]); $(window).trigger('cite', [id, with_link]);
$(textarea).change(); $(textarea).change();
} }
return false;
} }
function rememberStuff() { function rememberStuff() {

12
templates/post_reply.html

@ -38,16 +38,8 @@
{% if config.poster_ids %} {% if config.poster_ids %}
ID: {{ post.ip|poster_id(post.thread) }} ID: {{ post.ip|poster_id(post.thread) }}
{% endif %} {% endif %}
<a class="post_no" {% if not index %}onclick="highlightReply({{ post.id }})" {% endif %}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" <a class="post_no" onclick="return document.querySelectorAll('div.banner').length ? citeReply({{ post.id }}) : true;" href="{{ post.link('q') }}">
{% if not index %}
onclick="citeReply({{ post.id }});"
{% endif %}
href="{% if index %}
{{ post.link('q') }}
{% else %}
javascript:void(0);
{% endif %}">
{{ post.id }} {{ post.id }}
</a> </a>
</p> </p>

Loading…
Cancel
Save