Fix active window after closing

This commit is contained in:
Mattias Erming 2014-04-14 14:54:17 +02:00
parent b5caaf44a9
commit 0c20e29c41
2 changed files with 13 additions and 1 deletions

View File

@ -85,6 +85,18 @@ $(function() {
var id = json.data.id;
if (json.action == "remove") {
$("#channel-" + id + ", #window-" + id).remove();
var highest = 0;
var next = null;
$(".window").each(function() {
var z = $(this).css("z-index");
if (z > highest) {
highest = z;
next = $(this);
}
});
if (next != null) {
next.addClass("active");
}
return;
}

@ -1 +1 @@
Subproject commit e5178ce29594a11c3fdb453de35a167f0a49619b
Subproject commit e4ceb5e03529fd5d56d0e4077dd424ad64c13336