DG RS; remove empty message from stream upon adding something
This commit is contained in:
parent
5722f85c85
commit
cf2a4c25ae
4 changed files with 19 additions and 10 deletions
|
|
@ -12,7 +12,7 @@
|
||||||
- for post in @posts
|
- for post in @posts
|
||||||
= render type_partial(post), :post => post unless post.class == Album
|
= render type_partial(post), :post => post unless post.class == Album
|
||||||
- if @posts.size == 0
|
- if @posts.size == 0
|
||||||
.empty_message
|
#empty_message
|
||||||
.null_arrow ⇧
|
.null_arrow ⇧
|
||||||
%h3 Nobody has said anything yet. Get the conversation started!
|
%h3 Nobody has said anything yet. Get the conversation started!
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,14 +59,23 @@
|
||||||
|
|
||||||
function processPost(className, html, aspectIds){
|
function processPost(className, html, aspectIds){
|
||||||
if(onPageForAspects(aspectIds)){
|
if(onPageForAspects(aspectIds)){
|
||||||
$("#stream").prepend(
|
var addPostToStream = function (html){
|
||||||
$(html).fadeIn("fast", function(){
|
$("#stream").prepend(
|
||||||
$("#stream label:first").inFieldLabels();
|
$(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){
|
function processPhotoInAlbum(photoHash){
|
||||||
if (location.href.indexOf(photoHash['album_id']) == -1){
|
if (location.href.indexOf(photoHash['album_id']) == -1){
|
||||||
return ;
|
return ;
|
||||||
|
|
|
||||||
|
|
@ -754,7 +754,7 @@ ul#settings_nav {
|
||||||
#left_pane ul li a:hover:after {
|
#left_pane ul li a:hover:after {
|
||||||
content: " ►"; }
|
content: " ►"; }
|
||||||
|
|
||||||
.empty_message {
|
#empty_message {
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #777777;
|
color: #777777;
|
||||||
|
|
@ -764,8 +764,8 @@ ul#settings_nav {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
border: 2px dashed #777777;
|
border: 2px dashed #777777;
|
||||||
border-radius: 5px; }
|
border-radius: 5px; }
|
||||||
.empty_message h3 {
|
#empty_message h3 {
|
||||||
color: #777777; }
|
color: #777777; }
|
||||||
.empty_message .null_arrow {
|
#empty_message .null_arrow {
|
||||||
font-size: 80px;
|
font-size: 80px;
|
||||||
display: inline-block; }
|
display: inline-block; }
|
||||||
|
|
|
||||||
|
|
@ -981,7 +981,7 @@ ul#settings_nav
|
||||||
&:after
|
&:after
|
||||||
:content " ►"
|
:content " ►"
|
||||||
|
|
||||||
.empty_message
|
#empty_message
|
||||||
:margin
|
:margin
|
||||||
:top 12px
|
:top 12px
|
||||||
:text
|
:text
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue