[mw-devel] MW3 r1201 - trunk/webclient
dez at sucs.org
dez at sucs.org
Fri Oct 8 23:08:49 BST 2010
Author: dez
Date: 2010-10-08 23:08:49 +0100 (Fri, 08 Oct 2010)
New Revision: 1201
Modified:
trunk/webclient/mw.css
trunk/webclient/say.js
Log:
Fixes a bug with URI handling (couldn't cope with multiple URIs in one line)
Converts the <div> surrounding each line to a <p>
Modified: trunk/webclient/mw.css
===================================================================
--- trunk/webclient/mw.css 2010-10-08 21:15:46 UTC (rev 1200)
+++ trunk/webclient/mw.css 2010-10-08 22:08:49 UTC (rev 1201)
@@ -1,3 +1,7 @@
+p {
+ margin: 0;
+}
+
#textlist, #sayit, #textlist table {
font-family: Monaco, monospace;
font-size: 10pt;
@@ -14,6 +18,10 @@
overflow: auto;
}
+.idle {
+ color: #aaaaaa;
+}
+
#textlist, #sayit {
float: left;
border: 1px solid black;
Modified: trunk/webclient/say.js
===================================================================
--- trunk/webclient/say.js 2010-10-08 21:15:46 UTC (rev 1200)
+++ trunk/webclient/say.js 2010-10-08 22:08:49 UTC (rev 1201)
@@ -50,8 +50,8 @@
/* Detect URIs and convert to links */
var uris = escapedMsg.match(/https?:\/\/[^ ]*/g);
- for (one in uris) {
- escapedMsg = escapedMsg.replace(uris[one], "<a target=\"_new\" href=\""+uris[one]+"\">"+uris[one]+"</a>");
+ for (thisuri in uris) {
+ escapedMsg = escapedMsg.replace(uris[thisuri], "<a target=\"_new\" href=\""+uris[thisuri]+"\">"+uris[thisuri]+"</a>");
}
/* Detect username */
@@ -76,7 +76,7 @@
}
/* Output the processed line */
- $("#textlist").append( "<div class='msg"+type+" user_"+msg[one].username+"'>" + escapedMsg + "</div");
+ $("#textlist").append( "<p class='msg"+type+" user_"+msg[one].username+"'>" + escapedMsg + "</p");
}
}
var objDiv = document.getElementById("textlist");
@@ -182,10 +182,13 @@
function drawWhoList(data, stat)
{
+ var idleness;
$("li").remove();
data.sort(sortWho);
for (person in data) {
- $("#wholist").append("<li id=\"who_"+data[person].username+"\">"+data[person].username+"</li");
+ idleness="";
+ if (data[person].idle>3600) idleness=" idle";
+ $("#wholist").append("<li class=\"who"+idleness+"\" id=\"who_"+data[person].username+"\">"+data[person].username+"</li");
}
}
More information about the mw-devel
mailing list