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; var next = null;
$(".window").each(function() { $(".window").each(function() {
var z = $(this).css("z-index"); var z = $(this).css("z-index");
if (z == "auto") z = 0;
if (z > highest) { if (z > highest) {
highest = z; highest = z;
next = $(this); next = $(this);
} }
}); });
if (next != null) { if (next != null) {
next.addClass("active"); $("#channel-" + next.attr("id").replace("window-", "")).addClass("active");
next.bringToTop();
} }
return; return;
} }

View File

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