Changeset

186:ba3837c565c9

mod_muc_log_http: prosody theme update
author Thilo Cestonaro <thilo@cestona.ro>
date Tue, 22 Jun 2010 11:29:48 +0200
parents 185:3bce55e453b1
children 187:670c99e96c52
files mod_muc_log_http/muc_log_http/themes/prosody/day_body.html mod_muc_log_http/muc_log_http/themes/prosody/day_dayLink.html mod_muc_log_http/muc_log_http/themes/prosody/day_time.html mod_muc_log_http/muc_log_http/themes/prosody/day_title.html mod_muc_log_http/muc_log_http/themes/prosody/days_body.html mod_muc_log_http/muc_log_http/themes/prosody/days_rooms_bit.html mod_muc_log_http/muc_log_http/themes/prosody/doc.html mod_muc_log_http/muc_log_http/themes/prosody/month_header.html mod_muc_log_http/muc_log_http/themes/prosody/rooms_bit.html
diffstat 9 files changed, 138 insertions(+), 97 deletions(-) [+]
line wrap: on
line diff
--- a/mod_muc_log_http/muc_log_http/themes/prosody/day_body.html	Tue Jun 22 11:03:27 2010 +0200
+++ b/mod_muc_log_http/muc_log_http/themes/prosody/day_body.html	Tue Jun 22 11:29:48 2010 +0200
@@ -1,9 +1,17 @@
-<h2>Logs for ###JID### on 20###YEAR###/###MONTH###/###DAY###</h2>
-<p>###TITLE_STUFF###</p>
-<font class="join_link"><a href="http://speeqe.com/room/###JID###/" target="_blank">Join room via speeqe.com</a></font><br />
-###PREVIOUS_LINK###   ###NEXT_LINK###<br />
-<input type="checkbox" onclick="showHide('joinLeave')" ###JOIN_CHECKED###/>show/hide joins and leaves</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<input type="checkbox" onclick="showHide('status')" ###STATUS_CHECKED###/>show/hide status changes</button>
-<hr /><div id="main" style="overflow: auto;">
-###DAY_STUFF###
-</div><hr />
+<div class="title">
+	<div class="date">###DATE###</div>
+	<div class="roomjid">###JID###</div>
+	<div class="links">(join via <a class="component" href="xmpp:###JID###?join">client</a> / <a class="component" href="http://speeqe.com/room/###JID###/">speeqe</a>)</div>
+</div>
+<div class="calendar">
+	<div style="text-align: center">
+		###PREVIOUS_LINK### <a class="nav" href="../">^</a>###NEXT_LINK###
+	</div>
+	###CALENDAR###
+</div>
+<div class="topic">###TITLE_STUFF###</div>
+<br />
+<input type="checkbox" onclick="showHide('joinLeave')" ###JOIN_CHECKED###/>show/hide joins and leaves</input>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+<input type="checkbox" onclick="showHide('status')" ###STATUS_CHECKED###/>show/hide status changes</input>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+<input type="checkbox" onclick="javascript:changeTimeDisplay()" />show time in local time, rather than in UTC</input>
+<div id="main" style="overflow: auto; border: 2px solid gray; padding: 3px;">###DAY_STUFF###</div>
--- a/mod_muc_log_http/muc_log_http/themes/prosody/day_dayLink.html	Tue Jun 22 11:03:27 2010 +0200
+++ b/mod_muc_log_http/muc_log_http/themes/prosody/day_dayLink.html	Tue Jun 22 11:29:48 2010 +0200
@@ -1,1 +1,1 @@
-<a href="../###DAY###/">###TEXT###</a>
\ No newline at end of file
+<a class="nav" href="../###DAY###/">###TEXT###</a>
--- a/mod_muc_log_http/muc_log_http/themes/prosody/day_time.html	Tue Jun 22 11:03:27 2010 +0200
+++ b/mod_muc_log_http/muc_log_http/themes/prosody/day_time.html	Tue Jun 22 11:29:48 2010 +0200
@@ -1,1 +1,1 @@
-<a name="###TIME###" href="####TIME###" class="timestuff">[###TIME###]</a> 
\ No newline at end of file
+<a name="###TIME###" href="####TIME###" class="timestuff">[<span name="time" id="###UTC###">###TIME###</span>]</a> 
--- a/mod_muc_log_http/muc_log_http/themes/prosody/day_title.html	Tue Jun 22 11:03:27 2010 +0200
+++ b/mod_muc_log_http/muc_log_http/themes/prosody/day_title.html	Tue Jun 22 11:29:48 2010 +0200
@@ -1,1 +1,1 @@
-Subject: <font class="muc_title">###TITLE###</font>
\ No newline at end of file
+###TITLE###
--- a/mod_muc_log_http/muc_log_http/themes/prosody/days_body.html	Tue Jun 22 11:03:27 2010 +0200
+++ b/mod_muc_log_http/muc_log_http/themes/prosody/days_body.html	Tue Jun 22 11:29:48 2010 +0200
@@ -1,42 +1,18 @@
-
-			<div class="title">	
-				<span class="date" />
-				<span class="room_jid">###ROOM###@<a class="component" href="###COMPONENT###/">###COMPONENT###</a></span><br />
-				<span class="join_links">(join via <a href="###xmpp-link###">client</a> / <a href="###speeqe-link###">speeqe</a>)</span>
-
-			</div>
-
-			<div>
-				<span class="calendar">
-					<table rules="groups" cellpadding="5">
-						<thead>
-							<tr>
-								<td colspan="7">
-									<center>
-
-										<a class="nav" href="###previous_room###">&lt;</a>
-										<a class="nav" href="###rooms_on_component###">^</a>
-										<a class="nav" href="###next_room###">&gt;</a>
-									</center>
-								</td>
-							</tr>
-						</thead>
-						<tbody style="border: solid black 1px;">
-
-							<tr>
-								<th class="weekday">List of rooms for this component</th>
-							</tr>
-						</tbody>
-					</table>
-				</span>
-				<span class="room_topic"> <!-- Topic sollte auf X Zeichen begrenzt und dann durch "..." Punkt beenedet werden.  -->
-					http://spectrum.im | Welcome to the Spectrum support channel! | We are looking for package maintainers. | Logs: http://logs.spectrum.im/spectrum/
-				</span><br /><br />
-
-			</div>
-			
-			<div class="clear"></div>
-			
-			<div class="logs">###DAYS_STUFF###</div>
-			
-			<div class="footer"><img alt="Powered by Prosody" src="http://prosody.im/files/powered_by_prosody_80x30.png"></div>
+<div class="title">
+	<div class="date">###SINCE### - ###TO###</div>
+	<div class="roomjid">###JID###</div>
+	<div class="links">(join via <a class="component" href="xmpp:###JID###?join">client</a> / <a class="component" href="http://speeqe.com/room/###JID###/">speeqe</a>)</div>
+</div>
+<div class="calendar">
+	<div style="text-align: center">
+		<a class="nav" href="../###PREVIOUS_ROOM###">&lt;</a>
+		<a class="nav" href="..">^</a>
+		<a class="nav" href="../###NEXT_ROOM###">&gt;</a>
+	</div>
+	<div class="weekday" style="margin-top: 50px; padding-left: 5px; padding-right: 5px; padding-top: 3px; text-align: center;">List of rooms for this component</div>
+	<div style="padding-left: 5px; padding-right: 5px; border: 1px solid black;">###ROOMS###</div>
+</div>
+<div class="topic">###ROOMTOPIC###</div>
+<div id="calender" style="overflow: auto;">
+###DAYS_STUFF###
+</div>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mod_muc_log_http/muc_log_http/themes/prosody/days_rooms_bit.html	Tue Jun 22 11:29:48 2010 +0200
@@ -0,0 +1,1 @@
+<a href="../###ROOM###/">###ROOM###</a><br />
--- a/mod_muc_log_http/muc_log_http/themes/prosody/doc.html	Tue Jun 22 11:03:27 2010 +0200
+++ b/mod_muc_log_http/muc_log_http/themes/prosody/doc.html	Tue Jun 22 11:29:48 2010 +0200
@@ -1,47 +1,104 @@
 <html>
-	<head>
-		<meta content="text/html; charset=ISO-8859-1"	http-equiv="content-type">
-
-		<title>###TITLE###</title>
-
-		<style type="text/css">
-			<!--
-				body, html {background-color: #FFFFFF;}
-				div.border {margin-left: 20pt; margin-right: 20pt;}
-				div.title {border-bottom: #f29b00 solid 3pt; padding-bottom: 3px; width: 100%;}
-				div.title {color: #000000; font-size: 24px; font-weight: bold; font-family: sans-serif; letter-spacing: 3px; text-decoration: none; margin-bottom: 3pt; }
-			
-				div.title .date {float:right; }
-			
-				div.footer {margin-top: 20pt; text-align: center;}
-			
-				.clear {clear: both;}
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
+<head>
+	<title>muc_log</title>
+</head>
+<script type="text/javascript"><!--
+var utc = true;
+var timezoneOffset = (parseInt((new Date()).getTimezoneOffset()) * 60) * (-1);
+function changeTimeDisplay() {
+    var eles = document.getElementsByName("time");
+    utc = !utc;
+    for (var i = 0; i < eles.length; i++) {
+        var tmp = eles[i].id.split(":");
+        var d;
+        if(tmp.length == 3) {
+            if(!utc)
+                tmp[2] = Number(tmp[2]) + timezoneOffset;
+            d = new Date(0, 0, 0, Number(tmp[0]), Number(tmp[1]), Number(tmp[2]));
+        }
+        else {
+            if(!utc)
+                tmp[0] = Number(tmp[0]) + timezoneOffset;
+            d = new Date(0, 0, 0, 0, 0, Number(tmp[0]));
+        }
+        
+        eles[i].innerHTML = (d.getHours() <= 9 ? "0" + d.getHours() : d.getHours()) + ":";
+        eles[i].innerHTML += (d.getMinutes() <= 9 ? "0" + d.getMinutes() : d.getMinutes()) + ":";
+        eles[i].innerHTML += (d.getSeconds() <= 9 ? "0" + d.getSeconds() : d.getSeconds());
+    }
+}
 
-				span.room_topic {color: #000000; font-size: 18px; font-family: sans-serif;}
-				span.room_jid {text-decoration: none;}
-				span.calendar {float: right; margin-left: 10pt;}
-				span.join_links {font-size: 9px; font-family: Verdana; letter-spacing: 1px;}
-				span.settings {}
+function showHide(name) {
+	var eles = document.getElementsByName(name);
+	for (var i = 0; i < eles.length; i++) {
+		eles[i].style.display = eles[i].style.display != "none" ? "none" : "";
+	}
+}
+--></script>
+<style type="text/css">
+<!--
+.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 {
+	float: right;
+}
+.title .links {
+	font-size: 9px; font-family: Verdana; letter-spacing: 1px;
+}
+.topic {
+	color: #000000; font-size: 18px; font-family: sans-serif;
+}
+.calendar {float: right; margin-left: 10pt;}
+a {color: #6197df; text-decoration: none;}
 
-				div.logs {}
-				div.muc_settings {}
-
-				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;}
 
-				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; }
+.timestuff {color: #AAAAAA; text-decoration: none;}
+.muc_join {color: #009900; font-style: italic;}
+.muc_leave {color: #009900; font-style: italic;}
+.muc_statusChange {color: #009900; font-style: italic;}
+.muc_title {color: #BBBBBB; font-size: 32px;}
+.muc_titleChange {color: #009900; font-style: italic;}
+.muc_kick {color: #009900; font-style: italic;}
+.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;}
+//-->
+</style>
+<body style="margin-left: 20pt; margin-right: 20pt;">
+###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>
+</body>
+<script><!--
+window.captureEvents(Event.RESIZE | Event.LOAD);
+window.onresize = resize;
+window.onload = load;
+function load(e) {
+	resize(e);
+}
 
-				.day {color: #DDDDDD; font: 12px Verdana; height: 17px; text-align: center; valign: middle;}
-				.weekday {font: 10px Verdana; height: 17px; color: #FFFFFF; background-color: #000000;}
-			//-->
-		</style>
-	</head>
+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;
+		}
+	}
+}
 
-	<body>
-		<div class="border">
-###BODY_STUFF###
-		</div><!-- /border -->
-	</body>
+--></script>
 </html>
-
--- a/mod_muc_log_http/muc_log_http/themes/prosody/month_header.html	Tue Jun 22 11:03:27 2010 +0200
+++ b/mod_muc_log_http/muc_log_http/themes/prosody/month_header.html	Tue Jun 22 11:29:48 2010 +0200
@@ -1,5 +1,4 @@
 <table rules="groups" cellpadding="5">
 <thead><tr><td colspan="7"><center><H2><font size="2" face="Verdana">###TITLE###</font></H2></center></td></tr></thead>
 <tbody style="border: solid black 1px;">
-<tr>
-###WEEKDAYS###</tr>
+<tr>###WEEKDAYS###</tr>
--- a/mod_muc_log_http/muc_log_http/themes/prosody/rooms_bit.html	Tue Jun 22 11:03:27 2010 +0200
+++ b/mod_muc_log_http/muc_log_http/themes/prosody/rooms_bit.html	Tue Jun 22 11:29:48 2010 +0200
@@ -1,1 +1,1 @@
-<a href="###ROOM###/">###ROOM###</a><br />
\ No newline at end of file
+<a href="###ROOM###/">###ROOM###</a><br />