Bugfix active channel

This commit is contained in:
Mattias Erming 2014-04-21 23:04:16 +02:00
parent 4bcc1d503a
commit 55172d40db
2 changed files with 3 additions and 3 deletions

View file

@ -75,13 +75,15 @@ $(function() {
var next = null;
$(".window").each(function() {
var z = $(this).css("z-index");
if (z == "auto") z = 0;
if (z > highest) {
highest = z;
next = $(this);
}
});
if (next != null) {
next.addClass("active");
$("#channel-" + next.attr("id").replace("window-", "")).addClass("active");
next.bringToTop();
}
return;
}

View file

@ -382,10 +382,8 @@ function event(event, data) {
});
break;
}
var name = data[1].nickname;
var chan = channels.findWhere({name: name}) || channels.add({type: "query", name: name});
var i = 0;
for (var k in data[1]) {
if (i++ == 5) break;