summaryrefslogtreecommitdiff
path: root/views/new-post.php
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2016-12-24 09:46:10 -0800
committerAaron Parecki <aaron@parecki.com>2016-12-24 09:46:10 -0800
commit29dcea294d4288d20842accad695852c62bdc3a1 (patch)
tree4a5925c8d704728e9b9cccdce8de9389b2df3d31 /views/new-post.php
parent1bfeb8793496dc64050835941f77fe0a47be9270 (diff)
fix reply context display for long posts
closes #62
Diffstat (limited to 'views/new-post.php')
-rw-r--r--views/new-post.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/views/new-post.php b/views/new-post.php
index d75d6b4..bc77191 100644
--- a/views/new-post.php
+++ b/views/new-post.php
@@ -17,6 +17,7 @@
<div>
<img src="" class="post-img hidden">
<div class="author"><span class="name"></span> <span class="url"></span></div>
+ <h4 class="post-name hidden"></h4>
<span class="content"></span>
</div>
</div>
@@ -140,6 +141,8 @@
border: 1px #ccc solid;
border-radius: 4px;
background: #f4f4f4;
+ max-height: 140px;
+ overflow-y: hidden;
}
.reply-context img.author-img {
border-radius: 4px;
@@ -342,8 +345,13 @@ $(function(){
}
$(".reply-context .content").text(data.entry.content.text);
- $(".reply-context .name").text(data.entry.author.name);
- $(".reply-context .url").text(data.entry.author.url);
+ if(data.entry.name) {
+ $(".reply-context .post-name").text(data.entry.name).removeClass('hidden');
+ } else {
+ $(".reply-context .post-name").addClass('hidden');
+ }
+ $(".reply-context .author .name").text(data.entry.author.name);
+ $(".reply-context .author .url").text(data.entry.author.url);
$(".reply-context img.author-img").attr('src', data.entry.author.photo);
if(data.entry.photo) {
$(".reply-context img.post-img").attr('src', data.entry.photo[0]).removeClass('hidden');