This commit is contained in:
Mattias Erming 2014-04-10 23:34:53 +02:00
parent 7c3cf140d8
commit 30ea34ffd3
4 changed files with 19 additions and 11 deletions

View File

@ -17,7 +17,9 @@ h2 {
.user { .user {
color: #f00; color: #f00;
cursor: pointer; cursor: pointer;
-webkit-user-select: none; }
.user:hover {
color: #999;
} }
#wrap, #wrap,
#viewport { #viewport {
@ -232,20 +234,20 @@ h2 {
} }
#viewport { #viewport {
-webkit-transition: -webkit-transform .2s ease-out; -webkit-transition: -webkit-transform .2s ease-out;
transition: transform .2s ease-out; transition: transform .2s ease-out;
-webkit-transform: translateX(0); -webkit-transform: translateX(0);
transform: translateX(0); transform: translateX(0);
height: 100%; height: 100%;
margin-left: -200px; margin-left: -200px;
width: 100%; width: 100%;
} }
#viewport.left { #viewport.left {
-webkit-transform: translateX(200px); -webkit-transform: translateX(200px);
transform: translateX(200px); transform: translateX(200px);
} }
#viewport.right { #viewport.right {
-webkit-transform: translateX(-160px); -webkit-transform: translateX(-160px);
transform: translateX(-160px); transform: translateX(-160px);
} }
#chat { #chat {
width: 100%; width: 100%;
@ -293,4 +295,4 @@ h2 {
#chat .users a { #chat .users a {
line-height: 1.8em; line-height: 1.8em;
} }
} }

View File

@ -39,7 +39,6 @@
<input type="checkbox" value="nick"/> <input type="checkbox" value="nick"/>
<input type="checkbox" value="quit"/> <input type="checkbox" value="quit"/>
<input type="checkbox" value="mode"/> <input type="checkbox" value="mode"/>
<input type="checkbox" value="kick"/>
</div> </div>
</div> </div>
</div> </div>

View File

@ -215,9 +215,17 @@ $(function() {
}); });
}); });
chat.on("mousedown", ".user", function(e) {
return false;
});
chat.on("dblclick", ".user", function() { chat.on("dblclick", ".user", function() {
var link = $(this); var link = $(this);
var id = parseInt(link.closest(".window").attr("id").replace("window-", "")); var id = parseInt(link.closest(".window").attr("id").replace("window-", ""));
var name = link.text().trim();
if (name == "-!-" || name.indexOf(".") != -1) {
return;
}
socket.emit("input", { socket.emit("input", {
id: id, id: id,
text: "/whois " + link.text().trim(), text: "/whois " + link.text().trim(),

View File

@ -11,7 +11,7 @@
(function($) { (function($) {
$.fn.tabComplete = function(list, options) { $.fn.tabComplete = function(list, options) {
var settings = $.extend({ var settings = $.extend({
appendSpace: false, after: '',
caseSensitive: false, caseSensitive: false,
}, options); }, options);
@ -56,11 +56,10 @@
} }
if (match.length) { if (match.length) {
last = match[i]; text.push(match[i]);
self.val(text.join(' ') + settings.after);
} }
text.push(last);
self.val(text.join(' ') + (settings.appendSpace ? ' ' : ''));
return false; return false;
}); });
}; };