tweaks to comment/forum css, fix forum post response js
This commit is contained in:
@@ -9,6 +9,8 @@ div.comments-for-post {
|
||||
width: 12em;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
margin-right: 2em;
|
||||
word-wrap: break-word;
|
||||
|
||||
h1 {
|
||||
display: block;
|
||||
@@ -17,8 +19,7 @@ div.comments-for-post {
|
||||
}
|
||||
|
||||
div.content {
|
||||
margin-left: 2em;
|
||||
width: 35em;
|
||||
width: 40em;
|
||||
float: left;
|
||||
|
||||
menu {
|
||||
|
||||
@@ -3,13 +3,14 @@ div.list-of-forum-posts {
|
||||
margin-bottom: 3em;
|
||||
|
||||
div.author {
|
||||
width: 20%;
|
||||
width: 12em;
|
||||
float: left;
|
||||
margin-right: 2em;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
div.content {
|
||||
margin-left: 2em;
|
||||
width: 30em;
|
||||
width: 40em;
|
||||
float: left;
|
||||
|
||||
menu {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
$("#forum_post_body").val(<%= raw @forum_post.body.to_json %>);
|
||||
$("#new-topic-response").show();
|
||||
$("#topic-response").show();
|
||||
|
||||
$('html, body').animate({
|
||||
scrollTop: $("#forum_post_body").offset().top - 100
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
|
||||
<%= render "forum_posts/listing", :forum_posts => @forum_posts %>
|
||||
|
||||
<p><%= link_to "Reply »".html_safe, new_forum_post_path(:topic_id => @forum_topic.id) %></p>
|
||||
<p><%= link_to "Reply »".html_safe, new_forum_post_path(:topic_id => @forum_topic.id), :id => "new-response-link" %></p>
|
||||
|
||||
<div id="topic-response">
|
||||
<div style="display: none;" id="topic-response">
|
||||
<%= render "forum_posts/form", :forum_post => ForumPost.new(:topic_id => @forum_topic.id) %>
|
||||
</div>
|
||||
|
||||
@@ -29,4 +29,21 @@
|
||||
|
||||
<%= content_for(:page_title) do %>
|
||||
Forum - <%= @forum_topic.title %> - <%= Danbooru.config.app_name %>
|
||||
<% end %>
|
||||
|
||||
<%= content_for(:html_header) do %>
|
||||
<script>
|
||||
$(function() {
|
||||
$("#new-response-link").click(function(e) {
|
||||
$("#forum_post_body").val("");
|
||||
$("#topic-response").show();
|
||||
|
||||
$('html, body').animate({
|
||||
scrollTop: $("#forum_post_body").offset().top - 100
|
||||
}, 500);
|
||||
|
||||
e.preventDefault();
|
||||
})
|
||||
});
|
||||
</script>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user