From 1d6f46d9bbcf84368be9cd3920e034387da27514 Mon Sep 17 00:00:00 2001 From: 8chan Date: Thu, 12 Jun 2014 15:36:01 +0000 Subject: Fix scroll to issues with post-hover.js, clean up highlightReply --- templates/main.js | 4 +++- templates/post_reply.html | 12 +++++------- templates/post_thread.html | 11 +++++------ 3 files changed, 13 insertions(+), 14 deletions(-) (limited to 'templates') diff --git a/templates/main.js b/templates/main.js index 231b8043..f7b99a42 100644 --- a/templates/main.js +++ b/templates/main.js @@ -155,7 +155,7 @@ function highlightReply(id) { if (post) post.className += ' highlighted'; } - return false; + return true; } function generatePassword() { @@ -187,6 +187,8 @@ function dopost(form) { function citeReply(id, with_link) { var textarea = document.getElementById('body'); + + if (!textarea) return false; if (document.selection) { // IE diff --git a/templates/post_reply.html b/templates/post_reply.html index 8ef3c1e8..8c182ad4 100644 --- a/templates/post_reply.html +++ b/templates/post_reply.html @@ -1,7 +1,8 @@ {% filter remove_whitespace %} {# tabs and new lines will be ignored #}
-

+

+ {% if not index %}{% endif %} - {% include 'post/poster_id.html' %} - - No. - - {{ post.id }} - + {% include 'post/poster_id.html' %}  + No. + {{ post.id }}

{% include 'post/fileinfo.html' %} {% include 'post/post_controls.html' %} diff --git a/templates/post_thread.html b/templates/post_thread.html index 335c1713..c246a16c 100644 --- a/templates/post_thread.html +++ b/templates/post_thread.html @@ -2,8 +2,9 @@ {# tabs and new lines will be ignored #}
+{% if not index %}{% endif %} {% include 'post/fileinfo.html' %} -
1%}style='clear:both'{%endif%}>

+

1%}style='clear:both'{%endif%}>

- {% include 'post/poster_id.html' %} - No. - - {{ post.id }} - + {% include 'post/poster_id.html' %}  + No. + {{ post.id }} {% if post.sticky %} {% if config.font_awesome %} -- cgit v1.3 From e856917b00b6ede3b5e163b38d4b85780d45664e Mon Sep 17 00:00:00 2001 From: 8chan Date: Thu, 12 Jun 2014 17:26:21 +0000 Subject: Add scripts to catalog page --- templates/themes/catalog/theme.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'templates') diff --git a/templates/themes/catalog/theme.php b/templates/themes/catalog/theme.php index cf2095d0..0a95c8df 100644 --- a/templates/themes/catalog/theme.php +++ b/templates/themes/catalog/theme.php @@ -60,6 +60,13 @@ $recent_posts[] = $post; } + $required_scripts = array('js/jquery.mixitup.min.js', 'js/jquery.tooltipster.min.js', 'js/catalog.js'); + + foreach($required_scripts as $i => $s) { + if (!in_array($s, $config['additional_javascript'])) + $config['additional_javascript'][] = $s; + } + file_write($config['dir']['home'] . $board_name . '/catalog.html', Element('themes/catalog/catalog.html', Array( 'settings' => $settings, 'config' => $config, -- cgit v1.3