[mw-devel] MW3 r1199 - trunk/webclient

dez at sucs.org dez at sucs.org
Fri Oct 8 17:58:02 BST 2010


Author: dez
Date: 2010-10-08 17:58:02 +0100 (Fri, 08 Oct 2010)
New Revision: 1199

Modified:
   trunk/webclient/mw.css
   trunk/webclient/say.js
Log:
Adds rudimentary who-list updating (simply refetches the who list when a checkonoff event is received)
Improves layout CSS marginally by using px instead of em for div padding


Modified: trunk/webclient/mw.css
===================================================================
--- trunk/webclient/mw.css	2010-10-08 16:30:16 UTC (rev 1198)
+++ trunk/webclient/mw.css	2010-10-08 16:58:02 UTC (rev 1199)
@@ -9,13 +9,15 @@
 	border: 1px solid black;
 	list-style: none;
 	margin: 0;
-	padding: 0.5em;
+	padding: 5px;;
+	height: 70%;
+	overflow: auto;
 }
 
 #textlist, #sayit {
 	float: left;
 	border: 1px solid black;
-	padding: 0.5em;
+	padding: 5px;
 	overflow: auto;
 	white-space: pre-wrap;
 }

Modified: trunk/webclient/say.js
===================================================================
--- trunk/webclient/say.js	2010-10-08 16:30:16 UTC (rev 1198)
+++ trunk/webclient/say.js	2010-10-08 16:58:02 UTC (rev 1199)
@@ -20,7 +20,10 @@
 			}
 		} else {
 			for (one in msg) {
-				if (msg[one].state == 23) return tmo; // CheckOnOff
+				if (msg[one].state == 23) { // CheckOnOff
+					sendCmdHandle('who', drawWhoList);
+					return tmo;
+				}
 				if (msg[one].state == 14) { // IPC_KICK
 					var what = "<div class='msgkick user_system'>";
 					if (msg[one].text.substr(0,1) == "m") {
@@ -172,6 +175,7 @@
 
 function drawWhoList(data, stat)
 {
+	$("li").remove();
 	for (person in data) {
 		$("#wholist").append("<li id=\"who_"+data[person].username+"\">"+data[person].username+"</li");
 	}




More information about the mw-devel mailing list