Browse Source

Fix post-filter, remove lainchan postcontainer

pull/40/head
discomrade 3 years ago
parent
commit
c7ccb683bf
  1. 2
      js/auto-reload.js
  2. 4
      js/post-filter.js
  3. 54
      templates/post_reply.html

2
js/auto-reload.js

@ -248,7 +248,7 @@ $(document).ready(function(){
}
}
if ($("div.post").length > 1){
$(this).parent().insertAfter($('div.post:not(.post-hover):last').parent().next()).after('<br class="clear">');
$(this).insertAfter($('div.post:not(.post-hover):last').next()).after('<br class="clear">');
}
else {
$(this).insertAfter($('div.post:not(.post-hover):last')).after('<br class="clear">');

4
js/post-filter.js

@ -228,7 +228,7 @@ if (active_page === 'thread' || active_page === 'index' || active_page === 'cata
var ele = e.target.parentElement.parentElement;
var $ele = $(ele);
var threadId = $ele.parent().attr('id').replace('thread_', '');
var threadId = $ele.parent('.thread').attr('id').replace('thread_', '');
var boardId = $ele.parent().data('board');
var postId = $ele.find('.post_no').not('[id]').text();
if (pageData.hasUID) {
@ -608,7 +608,7 @@ if (active_page === 'thread' || active_page === 'index' || active_page === 'cata
'#filter-list th:nth-child(2) {text-align: left;}\n' +
'#filter-list th:nth-child(3) {text-align: center; width: 58px;}\n' +
'#filter-list tr:not(#header) {height: 22px;}\n' +
'#filter-list tr:nth-child(even) {background-color:rgba(255, 255, 255, 0.5);}\n' +
'#filter-list tr:nth-child(even) {background-color:rgba(255, 255, 255, 0.2);}\n' +
'#filter-list td:nth-child(1) {text-align: center; width: 70px;}\n' +
'#filter-list td:nth-child(3) {text-align: center; width: 58px;}\n' +
'#confirm {text-align: right; margin-bottom: -18px; padding-top: 2px; font-size: 14px; color: #FF0000;}';

54
templates/post_reply.html

@ -1,33 +1,31 @@
{% filter remove_whitespace %}
{# tabs and new lines will be ignored #}
<div class="postcontainer" id="pc{{ post.id }}" data-board="{{ board.uri }}">
<div class="sidearrows">&gt;&gt;</div>
<div class="post reply" id="reply_{{ post.id }}">
<p class="intro">
{% 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 }}" />
<label for="delete_{{ post.id }}">
{% include 'post/subject.html' %}
{% include 'post/name.html' %}
{% include 'post/ip.html' %}
{% include 'post/flag.html' %}
{% include 'post/time.html' %}
</label>
{% include 'post/poster_id.html' %}&nbsp;
<a class="post_no" id="post_no_{{ post.id }}" onclick="highlightReply({{ post.id }})" href="{% if isnoko50 %}{{ post.link('', config.file_page50) }}{% else %}{{ post.link }}{% endif %}">No.</a>
<a class="post_no" onclick="citeReply({{ post.id }})" href="{% if isnoko50 %}{{ post.link('q', config.file_page50) }}{% else %}{{ post.link('q') }}{% endif %}">{{ post.id }}</a>
</p>
{% include 'post/fileinfo.html' %}
{% include 'post/post_controls.html' %}
<div class="body" {% if post.files|length > 1 %}style="clear:both"{% endif %}>
{% endfilter %}{% if index %}{{ post.body|truncate_body(post.link) }}{% else %}{{ post.body }}{% endif %}{% filter remove_whitespace %}
{% if post.modifiers['ban message'] %}
{{ config.mod.ban_message|sprintf(post.modifiers['ban message']) }}
{% endif %}
{% if post.modifiers['warning message'] %}
{{ config.mod.warning_message|sprintf(post.modifiers['warning message']) }}
{% endif %}
</div>
<div class="post reply" id="reply_{{ post.id }}" data-board="{{ board.uri }}">
<p class="intro">
{% 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 }}" />
<label for="delete_{{ post.id }}">
{% include 'post/subject.html' %}
{% include 'post/name.html' %}
{% include 'post/ip.html' %}
{% include 'post/flag.html' %}
{% include 'post/time.html' %}
</label>
{% include 'post/poster_id.html' %}&nbsp;
<a class="post_no" id="post_no_{{ post.id }}" onclick="highlightReply({{ post.id }})" href="{% if isnoko50 %}{{ post.link('', config.file_page50) }}{% else %}{{ post.link }}{% endif %}">No.</a>
<a class="post_no" onclick="citeReply({{ post.id }})" href="{% if isnoko50 %}{{ post.link('q', config.file_page50) }}{% else %}{{ post.link('q') }}{% endif %}">{{ post.id }}</a>
</p>
{% include 'post/fileinfo.html' %}
{% include 'post/post_controls.html' %}
<div class="body" {% if post.files|length > 1 %}style="clear:both"{% endif %}>
{% endfilter %}{% if index %}{{ post.body|truncate_body(post.link) }}{% else %}{{ post.body }}{% endif %}{% filter remove_whitespace %}
{% if post.modifiers['ban message'] %}
{{ config.mod.ban_message|sprintf(post.modifiers['ban message']) }}
{% endif %}
{% if post.modifiers['warning message'] %}
{{ config.mod.warning_message|sprintf(post.modifiers['warning message']) }}
{% endif %}
</div>
</div>
</br>
{% endfilter %}

Loading…
Cancel
Save