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

View file

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

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}}}

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
{{#if invitedYou}}
you
{{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}}
to
{{{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>
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
<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}}
<i class="part-reason">({{{parse text}}})</i>
{{/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
{{{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
<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>
has left the channel
{{#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>
has quit
{{#if text}}

View file

@ -1,5 +1,5 @@
{{#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:
{{else}}
The topic is:

View file

@ -1,3 +1,3 @@
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}}

View file

@ -1,35 +1,35 @@
<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>:
<b>{{whois.real_name}}</b>
</div>
{{#if whois.account}}
<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>
</div>
{{/if}}
{{#if whois.channels}}
<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}}}
</div>
{{/if}}
{{#if whois.server}}
<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>
</div>
{{/if}}
{{#if whois.secure}}
<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
</div>
{{/if}}
{{#if whois.away}}
<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>
</div>
{{/if}}

View file

@ -4,7 +4,7 @@
</span>
<span class="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}}
</span>
{{#equal type "toggle"}}

View file

@ -13,7 +13,7 @@
{{/unless}}
<div class="user-mode {{modes mode}}">
{{/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}}
</div>
</div>