Skip to content
Snippets Groups Projects
Commit 750b4b43 authored by danielvincent's avatar danielvincent
Browse files

empty message re-appears if all stream posts are deleted

parent 8daf2d0f
No related branches found
No related tags found
No related merge requests found
......@@ -12,10 +12,9 @@
- for post in @posts
= render type_partial(post), :post => post unless post.class == Album
- if @posts.size == 0
#empty_message
.null_arrow
%h3 Nobody has said anything yet. Get the conversation started!
#empty_message{:style => ("display:none" unless @posts.count == 0)}
.null_arrow
%h3 Nobody has said anything yet. Get the conversation started!
#pagination
= will_paginate @posts
......
......@@ -12,10 +12,9 @@
- for post in @posts
= render type_partial(post), :post => post unless post.class == Album
- if @posts.size == 0
#empty_message
.null_arrow
%h3 Nobody has said anything yet. Get the conversation started!
#empty_message{:style => ("display:none" unless @posts.count == 0)}
.null_arrow
%h3 Nobody has said anything yet. Get the conversation started!
#pagination
= will_paginate @posts
......
......@@ -37,9 +37,10 @@
});
function processRetraction(post_id){
$('#' + post_id ).fadeOut(500, function(){
$(this).remove;
});
$('#' + post_id ).fadeOut(500).remove();
if($("#stream")[0].childElementCount == 0){
$("#empty_message").fadeIn(200);
}
}
function processComment(post_id, html){
......@@ -67,8 +68,8 @@
)
};
if( $("#empty_message").length > 0 ){
$("#empty_message").fadeOut(400, addPostToStream(html)).remove();
if( $("#empty_message").is(":visible") ){
$("#empty_message").fadeOut(400, addPostToStream(html)).hide();
} else {
addPostToStream(html);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment