1
0
mirror of https://github.com/moparisthebest/kaiwa synced 2024-11-25 18:52:20 -05:00

Always show unread count instead of only on hover. Fix unread count in bookmarks list

This commit is contained in:
Lance Stout 2013-09-25 10:39:57 -07:00
parent f49ef09c12
commit 0aa116e6f6
4 changed files with 18 additions and 9 deletions

View File

@ -38,6 +38,15 @@ module.exports = HumanModel.define({
return this.name || this.jid; return this.name || this.jid;
} }
}, },
displayUnreadCount: {
deps: ['unreadCount'],
fn: function () {
if (this.unreadCount > 0) {
return this.unreadCount.toString();
}
return '';
}
},
hasUnread: { hasUnread: {
deps: ['unreadCount'], deps: ['unreadCount'],
fn: function () { fn: function () {

View File

@ -14,7 +14,7 @@ module.exports = HumanView.extend({
}, },
textBindings: { textBindings: {
displayName: '.name', displayName: '.name',
unreadCount: '.unread' displayUnreadCount: '.unread'
}, },
events: { events: {
'click': 'handleClick' 'click': 'handleClick'

View File

@ -63,12 +63,12 @@
-webkit-transition: all .3s ease-in 0 -webkit-transition: all .3s ease-in 0
-moz-transition: all .3s ease-in 0 -moz-transition: all .3s ease-in 0
.unread:not(:empty)
display: block
&:hover &:hover
background: $sidebarActive background: $sidebarActive
.unread:not(:empty)
display: block
&.online, &.chat, &.dnd, &.away, &.xa &.online, &.chat, &.dnd, &.away, &.xa
&:after &:after
@ -175,4 +175,4 @@
50% 50%
opacity: 0.5 opacity: 0.5
100% 100%
opacity: 1.0 opacity: 1.0

View File

@ -380,14 +380,14 @@ h3 {
-webkit-transition: all 0.3s ease-in 0; -webkit-transition: all 0.3s ease-in 0;
-moz-transition: all 0.3s ease-in 0; -moz-transition: all 0.3s ease-in 0;
} }
#roster li .unread:not(:empty),
#bookmarks li .unread:not(:empty) {
display: block;
}
#roster li:hover, #roster li:hover,
#bookmarks li:hover { #bookmarks li:hover {
background: #1f2d49; background: #1f2d49;
} }
#roster li:hover .unread:not(:empty),
#bookmarks li:hover .unread:not(:empty) {
display: block;
}
#roster li.online:after, #roster li.online:after,
#bookmarks li.online:after, #bookmarks li.online:after,
#roster li.chat:after, #roster li.chat:after,