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 {

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