Added message counter
This commit is contained in:
parent
158abd7526
commit
2516dce8cb
22
client/css/bootstrap.css
vendored
22
client/css/bootstrap.css
vendored
@ -240,14 +240,14 @@ img {
|
|||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
.img-rounded {
|
.img-rounded {
|
||||||
border-radius: 6px;
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
.img-thumbnail {
|
.img-thumbnail {
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
line-height: 1.42857143;
|
line-height: 1.42857143;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border: 1px solid #dddddd;
|
border: 1px solid #dddddd;
|
||||||
border-radius: 4px;
|
border-radius: 2px;
|
||||||
-webkit-transition: all 0.2s ease-in-out;
|
-webkit-transition: all 0.2s ease-in-out;
|
||||||
transition: all 0.2s ease-in-out;
|
transition: all 0.2s ease-in-out;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -286,7 +286,7 @@ hr {
|
|||||||
padding: 6px 12px;
|
padding: 6px 12px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 1.42857143;
|
line-height: 1.42857143;
|
||||||
border-radius: 4px;
|
border-radius: 2px;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
-moz-user-select: none;
|
-moz-user-select: none;
|
||||||
-ms-user-select: none;
|
-ms-user-select: none;
|
||||||
@ -604,19 +604,19 @@ fieldset[disabled] .btn-link:focus {
|
|||||||
padding: 10px 16px;
|
padding: 10px 16px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
line-height: 1.33;
|
line-height: 1.33;
|
||||||
border-radius: 6px;
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
.btn-sm {
|
.btn-sm {
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
border-radius: 3px;
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
.btn-xs {
|
.btn-xs {
|
||||||
padding: 1px 5px;
|
padding: 1px 5px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
border-radius: 3px;
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
.btn-block {
|
.btn-block {
|
||||||
display: block;
|
display: block;
|
||||||
@ -644,7 +644,7 @@ input[type="button"].btn-block {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #999999;
|
background-color: #999999;
|
||||||
border-radius: 10px;
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
.badge:empty {
|
.badge:empty {
|
||||||
display: none;
|
display: none;
|
||||||
@ -684,13 +684,13 @@ a.list-group-item.active > .badge,
|
|||||||
border: 1px solid #dddddd;
|
border: 1px solid #dddddd;
|
||||||
}
|
}
|
||||||
.list-group-item:first-child {
|
.list-group-item:first-child {
|
||||||
border-top-right-radius: 4px;
|
border-top-right-radius: 2px;
|
||||||
border-top-left-radius: 4px;
|
border-top-left-radius: 2px;
|
||||||
}
|
}
|
||||||
.list-group-item:last-child {
|
.list-group-item:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
border-bottom-right-radius: 4px;
|
border-bottom-right-radius: 2px;
|
||||||
border-bottom-left-radius: 4px;
|
border-bottom-left-radius: 2px;
|
||||||
}
|
}
|
||||||
.list-group-item > .badge {
|
.list-group-item > .badge {
|
||||||
float: right;
|
float: right;
|
||||||
|
@ -3,13 +3,6 @@ body {
|
|||||||
font: 12px Consolas, monospace;
|
font: 12px Consolas, monospace;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
a {
|
|
||||||
color: inherit;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
ul,
|
ul,
|
||||||
li {
|
li {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
@ -31,6 +24,14 @@ h2 {
|
|||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
}
|
}
|
||||||
|
#sidebar .list-group-item {
|
||||||
|
padding: 10px 12px;
|
||||||
|
}
|
||||||
|
#sidebar .list-group-item .badge {
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: normal;
|
||||||
|
margin-top: -1px;
|
||||||
|
}
|
||||||
#chat {
|
#chat {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 200px;
|
left: 200px;
|
||||||
@ -103,7 +104,7 @@ h2 {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0px;
|
right: 0px;
|
||||||
top: 43px;
|
top: 43px;
|
||||||
width: 159px;
|
width: 160px;
|
||||||
}
|
}
|
||||||
#chat .users .user {
|
#chat .users .user {
|
||||||
clear: both;
|
clear: both;
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
<div class="network list-group" data-id="{{id}}">
|
<div class="network list-group" data-id="{{id}}">
|
||||||
{{#channels}}
|
{{#channels}}
|
||||||
<a href="" class="channel list-group-item" data-id="{{id}}">
|
<a href="" class="channel list-group-item" data-id="{{id}}">
|
||||||
|
<span class="badge pull-right"></span>
|
||||||
{{name}}
|
{{name}}
|
||||||
</a>
|
</a>
|
||||||
{{/channels}}
|
{{/channels}}
|
||||||
|
@ -86,11 +86,22 @@ $(function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
chat.on("append", ".window", function() {
|
||||||
|
var id = $(this).data("id");
|
||||||
|
var badge = sidebar.find(".channel[data-id='" + id + "']:not(.active) .badge");
|
||||||
|
badge.html((parseInt(badge.html()) + 1) || "1");
|
||||||
|
});
|
||||||
|
|
||||||
sidebar.on("click", ".channel", function(e) {
|
sidebar.on("click", ".channel", function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
sidebar.find(".active").removeClass("active");
|
sidebar.find(".active").removeClass("active");
|
||||||
$(this).addClass("active");
|
var item = $(this)
|
||||||
chat.find(".window[data-id='" + $(this).data("id") + "']")
|
.addClass("active")
|
||||||
|
.find(".badge")
|
||||||
|
.html("")
|
||||||
|
.end();
|
||||||
|
var id = item.data("id");
|
||||||
|
chat.find(".window[data-id='" + id + "']")
|
||||||
.bringToTop();
|
.bringToTop();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user