Added webkit inspector to menu
This commit is contained in:
parent
3d1768540d
commit
f3bb2efbc0
5 changed files with 53 additions and 13 deletions
|
@ -42,6 +42,23 @@ a {
|
|||
border-radius: 8px;
|
||||
}
|
||||
|
||||
#sidebar .unread_mentions {
|
||||
color: white;
|
||||
background: red;
|
||||
border: 2px solid white;
|
||||
border-radius: 1em;
|
||||
box-shadow: 0 0 1em black;
|
||||
padding: 0 0.3em;
|
||||
position: absolute;
|
||||
top: 100px;
|
||||
right: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#sidebar .unread_mentions:empty {
|
||||
/*display: none;*/
|
||||
}
|
||||
|
||||
#content {
|
||||
margin-left: 62px;
|
||||
}
|
||||
|
|
|
@ -33,6 +33,11 @@ function(HostApp, Paths, Cache) {
|
|||
this.body.appendChild(this.menu.entityProfile);
|
||||
this.body.appendChild(this.menu.search);
|
||||
|
||||
this.unreadMentionsSpan = document.createElement("span");
|
||||
this.unreadMentionsSpan.className = "unread_mentions";
|
||||
this.menu.mentions.appendChild(this.unreadMentionsSpan);
|
||||
this.setUnreadMentions(0);
|
||||
|
||||
document.getElementById("sidebar").appendChild(this.body);
|
||||
|
||||
this.setEntityAvatar();
|
||||
|
@ -158,6 +163,15 @@ function(HostApp, Paths, Cache) {
|
|||
img.src = img.src_active;
|
||||
}
|
||||
|
||||
Sidebar.prototype.setUnreadMentions = function(count) {
|
||||
this.unreadMentionsSpan.innerHTML = count == 0 ? "" : count;
|
||||
if (count > 0) {
|
||||
$(this.unreadMentionsSpan).show();
|
||||
} else {
|
||||
$(this.unreadMentionsSpan).hide();
|
||||
}
|
||||
}
|
||||
|
||||
Sidebar.prototype.onEntity = function() {
|
||||
bungloo.entityProfile.showProfileForEntity();
|
||||
this.onEntityProfile();
|
||||
|
@ -191,6 +205,9 @@ function(HostApp, Paths, Cache) {
|
|||
bungloo.conversation.logout();
|
||||
bungloo.entityProfile.logout();
|
||||
bungloo.search.logout();
|
||||
|
||||
document.getElementById("sidebar").innerHTML = "";
|
||||
document.getElementById("content").innerHTML = "";
|
||||
}
|
||||
|
||||
return Sidebar;
|
||||
|
|
Reference in a new issue