DG RS; remove empty message from stream upon adding something

This commit is contained in:
danielvincent 2010-10-14 15:19:37 -07:00
parent 5722f85c85
commit cf2a4c25ae
4 changed files with 19 additions and 10 deletions

View file

@ -12,7 +12,7 @@
- for post in @posts
= render type_partial(post), :post => post unless post.class == Album
- if @posts.size == 0
.empty_message
#empty_message
.null_arrow ⇧
%h3 Nobody has said anything yet. Get the conversation started!

View file

@ -59,14 +59,23 @@
function processPost(className, html, aspectIds){
if(onPageForAspects(aspectIds)){
$("#stream").prepend(
$(html).fadeIn("fast", function(){
$("#stream label:first").inFieldLabels();
})
);
var addPostToStream = function (html){
$("#stream").prepend(
$(html).fadeIn("fast", function(){
$("#stream label:first").inFieldLabels();
})
)
};
if( $("#empty_message").length > 0 ){
$("#empty_message").fadeOut(400, addPostToStream(html)).remove();
} else {
addPostToStream(html);
}
}
}
function processPhotoInAlbum(photoHash){
if (location.href.indexOf(photoHash['album_id']) == -1){
return ;

View file

@ -754,7 +754,7 @@ ul#settings_nav {
#left_pane ul li a:hover:after {
content: " ►"; }
.empty_message {
#empty_message {
margin-top: 12px;
text-align: center;
color: #777777;
@ -764,8 +764,8 @@ ul#settings_nav {
width: 80%;
border: 2px dashed #777777;
border-radius: 5px; }
.empty_message h3 {
#empty_message h3 {
color: #777777; }
.empty_message .null_arrow {
#empty_message .null_arrow {
font-size: 80px;
display: inline-block; }

View file

@ -981,7 +981,7 @@ ul#settings_nav
&:after
:content ""
.empty_message
#empty_message
:margin
:top 12px
:text