Minor changes
This commit is contained in:
parent
81b75086d4
commit
53257ee2b2
@ -95,11 +95,6 @@ button::-moz-focus-inner {
|
|||||||
background-color: #ebedef;
|
background-color: #ebedef;
|
||||||
color: #526476;
|
color: #526476;
|
||||||
}
|
}
|
||||||
#sidebar .badge {
|
|
||||||
color: #bdc3c7;
|
|
||||||
font: 12px sans-serif;
|
|
||||||
line-height: 21px;
|
|
||||||
}
|
|
||||||
#menu,
|
#menu,
|
||||||
#networks {
|
#networks {
|
||||||
margin: 20px;
|
margin: 20px;
|
||||||
@ -110,7 +105,20 @@ button::-moz-focus-inner {
|
|||||||
padding-top: 14px;
|
padding-top: 14px;
|
||||||
}
|
}
|
||||||
#networks .badge {
|
#networks .badge {
|
||||||
|
background: #f7f9fa;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #aeb6bf;
|
||||||
float: right;
|
float: right;
|
||||||
|
font: 12px sans-serif;
|
||||||
|
line-height: 21px;
|
||||||
|
padding: 0 6px;
|
||||||
|
}
|
||||||
|
#networks .badge.highlight {
|
||||||
|
background: #f8f5f5;
|
||||||
|
color: #e74c3c;
|
||||||
|
}
|
||||||
|
#networks .badge:empty {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
#footer {
|
#footer {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
@ -110,6 +110,7 @@ $(function() {
|
|||||||
sidebar.find(".active").removeClass("active");
|
sidebar.find(".active").removeClass("active");
|
||||||
button.addClass("active")
|
button.addClass("active")
|
||||||
.find(".badge")
|
.find(".badge")
|
||||||
|
.removeClass("highlight")
|
||||||
.empty();
|
.empty();
|
||||||
$(target).css("z-index", z++)
|
$(target).css("z-index", z++)
|
||||||
.find("input")
|
.find("input")
|
||||||
@ -118,11 +119,14 @@ $(function() {
|
|||||||
|
|
||||||
chat.on("append", ".messages", function() {
|
chat.on("append", ".messages", function() {
|
||||||
var messages = $(this);
|
var messages = $(this);
|
||||||
var id = messages.closest(".window").find(".form").data("target");
|
var id = messages.closest(".window").find(".input").parent().data("target");
|
||||||
var badge = $("#channel-" + id + ":not(.active) .badge");
|
var badge = $("#channel-" + id + ":not(.active) .badge");
|
||||||
if (badge.length != 0) {
|
if (badge.length != 0) {
|
||||||
var i = (parseInt(badge.html()) || 0) + 1;
|
var i = (parseInt(badge.html()) || 0) + 1;
|
||||||
badge.html(i);
|
badge.html(i);
|
||||||
|
if (messages.children().last().hasClass("highlight")) {
|
||||||
|
badge.addClass("highlight");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -134,7 +138,7 @@ $(function() {
|
|||||||
|
|
||||||
chat.on("click", ".user", function() {
|
chat.on("click", ".user", function() {
|
||||||
var user = $(this);
|
var user = $(this);
|
||||||
var id = user.closest(".window").find(".form").data("target");
|
var id = user.closest(".window").find(".input").parent().data("target");
|
||||||
var name = user.html().replace(/[\s+@]/g, "");
|
var name = user.html().replace(/[\s+@]/g, "");
|
||||||
if (name.match(/[#.]|-!-/) != null) {
|
if (name.match(/[#.]|-!-/) != null) {
|
||||||
return;
|
return;
|
||||||
@ -163,7 +167,6 @@ $(function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
Handlebars.registerHelper(
|
Handlebars.registerHelper(
|
||||||
"partial", function(id) {
|
"partial", function(id) {
|
||||||
return new Handlebars.SafeString(render(id, this));
|
return new Handlebars.SafeString(render(id, this));
|
||||||
|
Loading…
Reference in New Issue
Block a user