diff mod_muc_log_http/muc_log_http/themes/prosody/doc.html @ 348:03e1dc036a28

mod_muc_log_http: HTML overhaul. Replacing deprecated elements and style-attributes.
author Florian Zeitz <florob@babelmonkeys.de>
date Sun, 27 Mar 2011 05:34:09 +0200
parents ba3837c565c9
children 7dbde05b48a9
line wrap: on
line diff
--- a/mod_muc_log_http/muc_log_http/themes/prosody/doc.html	Thu Mar 24 19:49:42 2011 +0000
+++ b/mod_muc_log_http/muc_log_http/themes/prosody/doc.html	Sun Mar 27 05:34:09 2011 +0200
@@ -30,36 +30,62 @@
 }
 
 function showHide(name) {
-	var eles = document.getElementsByName(name);
+	var eles = document.getElementsByClassName(name);
 	for (var i = 0; i < eles.length; i++) {
 		eles[i].style.display = eles[i].style.display != "none" ? "none" : "";
 	}
 }
+
+/* IE compat: */
+onload=function(){
+	if (document.getElementsByClassName == undefined) {
+		document.getElementsByClassName = function(className)
+		{
+			var hasClassName = new RegExp("(?:^|\\s)" + className + "(?:$|\\s)");
+			var allElements = document.getElementsByTagName("*");
+			var results = [];
+
+			var element;
+			for (var i = 0; (element = allElements[i]) != null; i++) {
+				var elementClass = element.className;
+				if (elementClass && elementClass.indexOf(className) != -1 && hasClassName.test(elementClass))
+					results.push(element);
+			}
+
+			return results;
+		}
+	}
+}
 --></script>
 <style type="text/css">
-<!--
-.title {
+#title {
 	border-bottom: #f29b00 solid 3pt; padding-bottom: 3px; width: 100%;
 	color: #000000; font-size: 24px; font-weight: bold; font-family: sans-serif; letter-spacing: 3px; text-decoration: none; margin-bottom: 3pt;
 }
-.title .date {
+#date {
 	float: right;
 }
-.title .links {
+#links {
 	font-size: 9px; font-family: Verdana; letter-spacing: 1px;
 }
-.topic {
+#topic {
 	color: #000000; font-size: 18px; font-family: sans-serif;
 }
-.calendar {float: right; margin-left: 10pt;}
+#calendar {float: right; margin-left: 10pt;}
+#navigation {text-align: center}
+#roomList {padding-left: 5px; padding-right: 5px; border: 1px solid black;}
+
+#main {overflow: auto; border: 2px solid gray; padding: 3px; margin-top: 1em}
+
 a {color: #6197df; text-decoration: none;}
 
 a.nav {color: #6197df; font-family: monospace; letter-spacing: 7px; font-size: 24px; text-decoration: none;}
 a.log {color: #6197df; text-decoration: none;}
 a.log_today {color: #f29b00; text-decoration: none;}
 
-.day { font: 12px Verdana; height: 17px; }
-.weekday { font: 10px Verdana; height: 17px; color: #FFFFFF; background-color: #000000; }
+.day { font: 12px Verdana; height: 17px; color: #BBBBBB}
+.weekday { font: 10px Verdana; height: 17px; color: #FFFFFF; background-color: #000000; margin-top: 50px;
+	padding-left: 5px; padding-right: 5px; padding-top: 3px; text-align: center;}
 .timestuff {color: #AAAAAA; text-decoration: none;}
 .muc_join {color: #009900; font-style: italic;}
 .muc_leave {color: #009900; font-style: italic;}
@@ -70,35 +96,18 @@
 .muc_bann {color: #009900; font-style: italic;}
 .muc_msg_nick {color: #0000AA;}
 .muc_msg_me {color: #0000AA;}
-.join_link {font-height: 9px;}
 .month_title {font: 10pt Verdana;}
 .year_title {font: bold 16px Verdana;}
 .footer {margin-top: 20pt; text-align: center;}
-//-->
+
+label {margin-right: 2em}
+thead {font: 25pt bold; text-align: center}
+tbody {border: solid black 1px;}
+img {border: 0px}
+body {margin-left: 20pt; margin-right: 20pt;}
 </style>
-<body style="margin-left: 20pt; margin-right: 20pt;">
+<body>
 ###BODY_STUFF###
-<div class="footer"><a href="http://prosody.im"><img alt="Powered by Prosody" src="http://prosody.im/files/powered_by_prosody_80x30.png" border="0"></a></div>
+<div class="footer"><a href="http://prosody.im"><img alt="Powered by Prosody" src="http://prosody.im/files/powered_by_prosody_80x30.png"/></a></div>
 </body>
-<script><!--
-window.captureEvents(Event.RESIZE | Event.LOAD);
-window.onresize = resize;
-window.onload = load;
-function load(e) {
-	resize(e);
-}
-
-function resize(e) {
-	var ele = document.getElementById("main");
-	ele.style.height = window.innerHeight - ele.offsetTop - 100;
-	
-	var yearDivs = document.getElemetsByName("yearDiv");
-	if(yearDivs) {
-		for each (var year in yearDivs) {
-			year.style.width = window.innerWidth - year.style.padding;
-		}
-	}
-}
-
---></script>
 </html>