Do not display incorrect nick when switching to a non connected network
This commit is contained in:
parent
49a62c4015
commit
8f217ad3fb
@ -1157,6 +1157,7 @@ button,
|
||||
font: inherit;
|
||||
font-size: 11px;
|
||||
margin: 5px;
|
||||
margin-right: 10px;
|
||||
line-height: 26px;
|
||||
height: 24px;
|
||||
padding: 0 9px;
|
||||
@ -1167,6 +1168,14 @@ button,
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
#form #nick:empty {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#form #nick:after {
|
||||
content: ":";
|
||||
}
|
||||
|
||||
#form #input {
|
||||
border: 1px solid #ddd;
|
||||
font: inherit;
|
||||
|
@ -667,12 +667,7 @@ $(function() {
|
||||
document.title = title;
|
||||
|
||||
if (self.hasClass("chan")) {
|
||||
var nick = self
|
||||
.closest(".network")
|
||||
.data("nick");
|
||||
if (nick) {
|
||||
setNick(nick);
|
||||
}
|
||||
setNick(self.closest(".network").data("nick"));
|
||||
}
|
||||
|
||||
if (chan.data("needsNamesRefresh") === true) {
|
||||
@ -1069,13 +1064,10 @@ $(function() {
|
||||
|
||||
function setNick(nick) {
|
||||
var width = $("#nick")
|
||||
.html(nick + ":")
|
||||
.width();
|
||||
if (width) {
|
||||
width += 31;
|
||||
.html(nick)
|
||||
.outerWidth(true);
|
||||
input.css("padding-left", width);
|
||||
}
|
||||
}
|
||||
|
||||
function move(array, old_index, new_index) {
|
||||
if (new_index >= array.length) {
|
||||
|
Loading…
Reference in New Issue
Block a user