Merge pull request #428 from thelounge/xpaw/span

Change nicks from links to spans everywhere
This commit is contained in:
Jérémie Astori 2016-06-25 00:09:28 -04:00 committed by GitHub
commit c29e0f98e2
16 changed files with 30 additions and 35 deletions

View File

@ -117,8 +117,7 @@ input {
outline: 0; outline: 0;
} }
button, button {
.user {
border: none; border: none;
background: none; background: none;
margin: 0; margin: 0;
@ -451,10 +450,6 @@ button,
width: 210px; width: 210px;
} }
#footer button {
border: 0;
}
#footer button.active { #footer button.active {
color: #fff; color: #fff;
} }
@ -635,11 +630,6 @@ button,
line-height: 1.4; line-height: 1.4;
} }
#chat button:hover,
.user:hover {
opacity: .6;
}
#chat .chat, #chat .chat,
#chat .sidebar { #chat .sidebar {
top: 58px; top: 58px;
@ -757,9 +747,14 @@ button,
/* Nicknames */ /* Nicknames */
#chat .user { #chat .user {
cursor: pointer;
color: #50a656; color: #50a656;
} }
#chat .user:hover {
opacity: .6;
}
#chat.colored-nicks .user.color-1 { color: #1396cf; } #chat.colored-nicks .user.color-1 { color: #1396cf; }
#chat.colored-nicks .user.color-2 { color: #ffcf89; } #chat.colored-nicks .user.color-2 { color: #ffcf89; }
#chat.colored-nicks .user.color-3 { color: #00dc5f; } #chat.colored-nicks .user.color-3 { color: #00dc5f; }
@ -1013,7 +1008,7 @@ button,
width: 100%; width: 100%;
} }
#chat .names button { #chat .names .user {
display: block; display: block;
line-height: 1.6; line-height: 1.6;
padding: 0 16px; padding: 0 16px;

View File

@ -771,7 +771,7 @@ $(function() {
chat.on("input", ".search", function() { chat.on("input", ".search", function() {
var value = $(this).val().toLowerCase(); var value = $(this).val().toLowerCase();
var names = $(this).closest(".users").find(".names"); var names = $(this).closest(".users").find(".names");
names.find("button").each(function() { names.find(".user").each(function() {
var btn = $(this); var btn = $(this);
var name = btn.text().toLowerCase().replace(/[+%@~]/, ""); var name = btn.text().toLowerCase().replace(/[+%@~]/, "");
if (name.indexOf(value) === 0) { if (name.indexOf(value) === 0) {

View File

@ -1,2 +1,2 @@
<a href="#" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</a> <span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</span>
<span class="action-text">{{{parse text}}}</span> <span class="action-text">{{{parse text}}}</span>

View File

@ -1,2 +1,2 @@
<a href="#" class="user {{colorClass from}}" data-name="{{from}}">{{from}}</a> <span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{from}}</span>
<b>{{ctcpType}}</b> {{{parse ctcpMessage}}} <b>{{ctcpType}}</b> {{{parse ctcpMessage}}}

View File

@ -1,9 +1,9 @@
<a href="#" class="user {{colorClass from}}" data-name="{{from}}">{{from}}</a> <span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{from}}</span>
invited invited
{{#if invitedYou}} {{#if invitedYou}}
you you
{{else}} {{else}}
<a href="#" class="user {{colorClass invited}}" data-name="{{invited}}">{{invited}}</a> <span role="button" class="user {{colorClass invited}}" data-name="{{invited}}">{{invited}}</span>
{{/if}} {{/if}}
to to
{{{parse channel}}} {{{parse channel}}}

View File

@ -1,3 +1,3 @@
<a href="#" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</a> <span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</span>
<i class="hostmask">({{hostmask}})</i> <i class="hostmask">({{hostmask}})</i>
has joined the channel has joined the channel

View File

@ -1,6 +1,6 @@
<a href="#" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</a> <span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</span>
has kicked has kicked
<a href="#" class="user {{colorClass target}}" data-name="{{target}}">{{target}}</a> <span role="button" class="user {{colorClass target}}" data-name="{{target}}">{{target}}</span>
{{#if text}} {{#if text}}
<i class="part-reason">({{{parse text}}})</i> <i class="part-reason">({{{parse text}}})</i>
{{/if}} {{/if}}

View File

@ -1,3 +1,3 @@
<a href="#" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</a> <span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</span>
sets mode sets mode
{{{parse text}}} {{{parse text}}}

View File

@ -1,3 +1,3 @@
<a href="#" class="user {{colorClass nick}}" data-name="{{nick}}">{{mode}}{{nick}}</a> <span role="button" class="user {{colorClass nick}}" data-name="{{nick}}">{{mode}}{{nick}}</span>
is now known as is now known as
<a href="#" class="user {{colorClass new_nick}}" data-name="{{new_nick}}">{{mode}}{{new_nick}}</a> <span role="button" class="user {{colorClass new_nick}}" data-name="{{new_nick}}">{{mode}}{{new_nick}}</span>

View File

@ -1,4 +1,4 @@
<a href="#" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</a> <span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</span>
<i class="hostmask">({{hostmask}})</i> <i class="hostmask">({{hostmask}})</i>
has left the channel has left the channel
{{#if text}} {{#if text}}

View File

@ -1,4 +1,4 @@
<a href="#" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</a> <span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</span>
<i class="hostmask">({{hostmask}})</i> <i class="hostmask">({{hostmask}})</i>
has quit has quit
{{#if text}} {{#if text}}

View File

@ -1,5 +1,5 @@
{{#if from}} {{#if from}}
<a href="#" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</a> <span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</span>
has changed the topic to: has changed the topic to:
{{else}} {{else}}
The topic is: The topic is:

View File

@ -1,3 +1,3 @@
Topic set by Topic set by
<a href="#" class="user {{colorClass nick}}" data-name="{{nick}}">{{mode}}{{nick}}</a> <span role="button" class="user {{colorClass nick}}" data-name="{{nick}}">{{mode}}{{nick}}</span>
on {{localeDate when}} on {{localeDate when}}

View File

@ -1,35 +1,35 @@
<div> <div>
<a href="#" class="user {{colorClass whois.nick}}" data-name="{{whois.nick}}">{{whois.nick}}</a> <span role="button" class="user {{colorClass whois.nick}}" data-name="{{whois.nick}}">{{whois.nick}}</span>
<i class="hostmask">({{whois.user}}@{{whois.host}})</i>: <i class="hostmask">({{whois.user}}@{{whois.host}})</i>:
<b>{{whois.real_name}}</b> <b>{{whois.real_name}}</b>
</div> </div>
{{#if whois.account}} {{#if whois.account}}
<div> <div>
<a href="#" class="user {{colorClass whois.nick}}" data-name="{{whois.nick}}">{{whois.nick}}</a> <span role="button" class="user {{colorClass whois.nick}}" data-name="{{whois.nick}}">{{whois.nick}}</span>
is logged in as <b>{{whois.account}}</b> is logged in as <b>{{whois.account}}</b>
</div> </div>
{{/if}} {{/if}}
{{#if whois.channels}} {{#if whois.channels}}
<div> <div>
<a href="#" class="user {{colorClass whois.nick}}" data-name="{{whois.nick}}">{{whois.nick}}</a> <span role="button" class="user {{colorClass whois.nick}}" data-name="{{whois.nick}}">{{whois.nick}}</span>
is on the following channels: {{{parse whois.channels}}} is on the following channels: {{{parse whois.channels}}}
</div> </div>
{{/if}} {{/if}}
{{#if whois.server}} {{#if whois.server}}
<div> <div>
<a href="#" class="user {{colorClass whois.nick}}" data-name="{{whois.nick}}">{{whois.nick}}</a> <span role="button" class="user {{colorClass whois.nick}}" data-name="{{whois.nick}}">{{whois.nick}}</span>
is connected to {{whois.server}} <i>({{whois.server_info}})</i> is connected to {{whois.server}} <i>({{whois.server_info}})</i>
</div> </div>
{{/if}} {{/if}}
{{#if whois.secure}} {{#if whois.secure}}
<div> <div>
<a href="#" class="user {{colorClass whois.nick}}" data-name="{{whois.nick}}">{{whois.nick}}</a> <span role="button" class="user {{colorClass whois.nick}}" data-name="{{whois.nick}}">{{whois.nick}}</span>
is using a secure connection is using a secure connection
</div> </div>
{{/if}} {{/if}}
{{#if whois.away}} {{#if whois.away}}
<div> <div>
<a href="#" class="user {{colorClass whois.nick}}" data-name="{{whois.nick}}">{{whois.nick}}</a> <span role="button" class="user {{colorClass whois.nick}}" data-name="{{whois.nick}}">{{whois.nick}}</span>
is away <i>({{whois.away}})</i> is away <i>({{whois.away}})</i>
</div> </div>
{{/if}} {{/if}}

View File

@ -4,7 +4,7 @@
</span> </span>
<span class="from"> <span class="from">
{{#if from}} {{#if from}}
<a href="#" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</a> <span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</span>
{{/if}} {{/if}}
</span> </span>
{{#equal type "toggle"}} {{#equal type "toggle"}}

View File

@ -13,7 +13,7 @@
{{/unless}} {{/unless}}
<div class="user-mode {{modes mode}}"> <div class="user-mode {{modes mode}}">
{{/diff}} {{/diff}}
<button class="user {{colorClass name}}" data-name="{{name}}">{{mode}}{{name}}</button> <span role="button" class="user {{colorClass name}}" data-name="{{name}}">{{mode}}{{name}}</span>
{{/each}} {{/each}}
</div> </div>
</div> </div>