Skip to content

Commit

Permalink
added fluid unread count [#12 state:resolved]
Browse files Browse the repository at this point in the history
  • Loading branch information
ericw committed Aug 13, 2008
1 parent 6178adc commit f023638
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
18 changes: 18 additions & 0 deletions scripts/application.js
Expand Up @@ -62,12 +62,30 @@ OnelinerManager.prototype = {
}
});
},4000);

// unread count for fluid
if(window.fluid) {
this.unread = 0;
$(window).blur(function() {
self.countUnread = true;
})
$(window).focus(function() {
self.countUnread = false;
self.unread = 0;
window.fluid.dockBadge = null;
})
}

},
displayOneliner: function(oneliner) {
$('<li id="oneliner-'+oneliner.post_id+'"><span class="handle">'+ oneliner.handle +'</span> '+oneliner.text+' <a href="/'+this.channel+'#oneliner-'+oneliner.post_id+'" class="permalink" title="Permalink for this oneliner">#</a></li>')
.prependTo($('#oneliners'))
.hide()
.fadeIn();
if(window.fluid && this.countUnread) {
this.unread++;
window.fluid.dockBadge = this.unread;
}
},
};

Expand Down
15 changes: 5 additions & 10 deletions stylesheets/style.css
Expand Up @@ -158,14 +158,6 @@ ul#channel-cloud li {
line-height:24px;
}

#new_channel {}
#new_channel input[type=text] {
height:30px;
width:300px;
font-size:26px;
font-family:Georgia, serif;
margin:1em 0 1em 0; }

.size1 {
font-size:10px;
}
Expand All @@ -191,20 +183,23 @@ ul#channel-cloud li {
width:400px;
font-size:26px;
font-family:Georgia, serif;
margin:1em 1em 1em 1em;
margin:1em auto 1em auto;
border:0;
border-bottom:2px dotted #EC7BF4;
text-align: center;
display: block;
}

#handle {
height:30px;
width:400px;
width:300px;
font-size:26px;
font-family:Georgia, serif;
margin:1em auto 1em auto;
border:0;
border-bottom:2px dotted #EC7BF4;
display: block;
text-align: center;
}

#handle-page h1 {
Expand Down

0 comments on commit f023638

Please sign in to comment.