[mw-devel] MW3 r1221 - in trunk/webclient: . templates

dez at sucs.org dez at sucs.org
Sun Oct 10 19:51:29 BST 2010


Author: dez
Date: 2010-10-10 19:51:29 +0100 (Sun, 10 Oct 2010)
New Revision: 1221

Modified:
   trunk/webclient/mw.css
   trunk/webclient/say.js
   trunk/webclient/templates/front.html
Log:
More faffing with padding
Fixes the scrolling issue that was created by all the CSS faffage


Modified: trunk/webclient/mw.css
===================================================================
--- trunk/webclient/mw.css	2010-10-10 18:05:26 UTC (rev 1220)
+++ trunk/webclient/mw.css	2010-10-10 18:51:29 UTC (rev 1221)
@@ -21,17 +21,26 @@
 	float: right;
 	background-color: #000000;
 	color: #d6d6d6;
+	width: 11em;
 	height: 100%;
+	overflow: auto;
 }
 
 #wholist {
-	width: 11em;
+	width: 100%;
 	list-style: none;
 	margin: 0;
-	padding: 5px;
-	overflow: auto;
+	padding: 0;
+	padding-top: 5px;
+	padding-bottom: 5px;
+
 }
 
+#wholist li {
+	padding-left: 5px;
+	padding-right: 5px;
+}
+
 #textouter, #sayit {
 	float: left;
 	overflow: auto;

Modified: trunk/webclient/say.js
===================================================================
--- trunk/webclient/say.js	2010-10-10 18:05:26 UTC (rev 1220)
+++ trunk/webclient/say.js	2010-10-10 18:51:29 UTC (rev 1221)
@@ -91,7 +91,7 @@
 				}
 			}
 		}
-		var objDiv = document.getElementById("textlist");
+		var objDiv = document.getElementById("textouter");
 		if (objDiv!=null) objDiv.scrollTop = objDiv.scrollHeight;
 		return tmo;
 	}
@@ -230,8 +230,7 @@
 	$.getJSON("send.php", {send: cmd}, handle);
 }
 
-function sendCmd(cmd)
-{
+function sendCmd(cmd) {
 	$.getJSON("send.php", {send: cmd});
 }
 
@@ -243,21 +242,23 @@
     return str;
 }
 
-function submitenter(myfield,e)
-{
+function submitenter(myfield,e) {
 	var keycode;
 	if (window.event) keycode = window.event.keyCode;
 	else if (e) keycode = e.which;
 	else return true;
-	if (keycode == 13)
-	{
+	switch (keycode) {
+	case 13:
 		var text = $('#sayit').val();
 		$('#sayit').val("");
 		sendSay(text);
 		return false;
+	case 27:
+		insertEscape();
+		return false;
+	default:
+		return true;
 	}
-	else
-	return true;
 }
 
 function insertEscape() {
@@ -283,5 +284,4 @@
 myField.focus();
 }
 
-
 $(document).ready(function(){waitForMsg();});

Modified: trunk/webclient/templates/front.html
===================================================================
--- trunk/webclient/templates/front.html	2010-10-10 18:05:26 UTC (rev 1220)
+++ trunk/webclient/templates/front.html	2010-10-10 18:51:29 UTC (rev 1221)
@@ -3,7 +3,7 @@
 <table id="milliways" cellspacing="2" cellpadding="0" border="0">
 <tr><td>
 <div id="textouter"><div id="textlist"><p class="welcome">Milliways III - Web Edition</p></div></div>
-</td><td style="width: 12em; padding-left: 1px;">
+</td><td style="width: 11em; padding-left: 3px;">
 <div id="whoouter">
 <ul id="wholist">
 </ul>
@@ -11,7 +11,7 @@
 </td></tr>
 <tr><td style="height: 4em;">
 <form action="" id="sayform">
-	<textarea name="sayit" id="sayit" onKeyPress="return submitenter(this,event)"></textarea>
+	<textarea name="sayit" id="sayit" onKeyUp="return submitenter(this,event)"></textarea>
 </form>
 </td><td>
 <form action="{$self}" method="post" id="logoutform">




More information about the mw-devel mailing list