Merge pull request #832 from thelounge/astorije/context-aware-placeholder

Remind channel name or nick in input placeholder
This commit is contained in:
Jérémie Astori 2016-12-21 18:16:06 -05:00 committed by GitHub
commit 0489d0f2ae
3 changed files with 44 additions and 10 deletions

View File

@ -1035,6 +1035,12 @@ $(function() {
} }
document.title = title; document.title = title;
var placeholder = "";
if (chan.data("type") === "channel" || chan.data("type") === "query") {
placeholder = "Write to " + chan.data("title") + "...";
}
input.attr("placeholder", placeholder);
if (self.hasClass("chan")) { if (self.hasClass("chan")) {
$("#chat-container").addClass("active"); $("#chat-container").addClass("active");
setNick(self.closest(".network").data("nick")); setNick(self.closest(".network").data("nick"));

View File

@ -46,11 +46,6 @@ body {
padding: 15px 16px; padding: 15px 16px;
} }
#chat .search::-webkit-input-placeholder {
color: #99a2b4;
opacity: .5;
}
/* Borders */ /* Borders */
#chat .from, #chat .from,
#windows .header, #windows .header,
@ -235,3 +230,22 @@ body {
border-radius: 0; border-radius: 0;
margin: 0; margin: 0;
} }
/* Form elements */
#chat-container ::-moz-placeholder {
color: #99a2b4;
opacity: .5;
}
#chat-container ::-webkit-input-placeholder {
color: #99a2b4;
opacity: .5;
}
#chat-container :-ms-input-placeholder {
color: #99a2b4;
opacity: .5;
}
/* End form elements */

View File

@ -72,11 +72,6 @@ body {
padding: 15px 16px; padding: 15px 16px;
} }
#chat .search::-webkit-input-placeholder {
color: #d2d39b;
opacity: .5;
}
/* Borders */ /* Borders */
#chat .from, #chat .from,
#windows .header, #windows .header,
@ -261,3 +256,22 @@ body {
border-radius: 0; border-radius: 0;
margin: 0; margin: 0;
} }
/* Form elements */
#chat-container ::-moz-placeholder {
color: #d2d39b;
opacity: .5;
}
#chat-container ::-webkit-input-placeholder {
color: #d2d39b;
opacity: .5;
}
#chat-container :-ms-input-placeholder {
color: #d2d39b;
opacity: .5;
}
/* End form elements */