changeset 180:f29be6c49501

mod_muc_log_http: default theme changed to "prosody", removed old default theme
author Thilo Cestonaro <thilo@cestona.ro>
date Thu, 17 Jun 2010 11:22:08 +0200
parents af6143756a9e
children 15bc93c85a08
files mod_muc_log_http/muc_log_http/mod_muc_log_http.lua mod_muc_log_http/muc_log_http/themes/default/components_bit.html mod_muc_log_http/muc_log_http/themes/default/components_body.html mod_muc_log_http/muc_log_http/themes/default/day_bann.html mod_muc_log_http/muc_log_http/themes/default/day_body.html mod_muc_log_http/muc_log_http/themes/default/day_dayLink.html mod_muc_log_http/muc_log_http/themes/default/day_kick.html mod_muc_log_http/muc_log_http/themes/default/day_message.html mod_muc_log_http/muc_log_http/themes/default/day_messageMe.html mod_muc_log_http/muc_log_http/themes/default/day_presence_join.html mod_muc_log_http/muc_log_http/themes/default/day_presence_leave.html mod_muc_log_http/muc_log_http/themes/default/day_presence_statusChange.html mod_muc_log_http/muc_log_http/themes/default/day_presence_statusText.html mod_muc_log_http/muc_log_http/themes/default/day_reason.html mod_muc_log_http/muc_log_http/themes/default/day_time.html mod_muc_log_http/muc_log_http/themes/default/day_title.html mod_muc_log_http/muc_log_http/themes/default/day_titleChange.html mod_muc_log_http/muc_log_http/themes/default/days_bit.html mod_muc_log_http/muc_log_http/themes/default/days_body.html mod_muc_log_http/muc_log_http/themes/default/doc.html mod_muc_log_http/muc_log_http/themes/default/month_day.html mod_muc_log_http/muc_log_http/themes/default/month_emptyDay.html mod_muc_log_http/muc_log_http/themes/default/month_footer.html mod_muc_log_http/muc_log_http/themes/default/month_header.html mod_muc_log_http/muc_log_http/themes/default/month_weekDay.html mod_muc_log_http/muc_log_http/themes/default/rooms_bit.html mod_muc_log_http/muc_log_http/themes/default/rooms_body.html mod_muc_log_http/muc_log_http/themes/default/year_title.html
diffstat 28 files changed, 30 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/mod_muc_log_http/muc_log_http/mod_muc_log_http.lua	Thu Jun 17 11:16:12 2010 +0200
+++ b/mod_muc_log_http/muc_log_http/mod_muc_log_http.lua	Thu Jun 17 11:22:08 2010 +0200
@@ -39,7 +39,7 @@
 * Default templates for the html output.
 ]]--
 local html = {};
-local theme = "default";
+local theme = "prosody";
 
 local function checkDatastorePathExists(node, host, today, create)
 	create = create or false;
--- a/mod_muc_log_http/muc_log_http/themes/default/components_bit.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-<a href="###COMPONENT###/">###COMPONENT###</a><br />
\ No newline at end of file
--- a/mod_muc_log_http/muc_log_http/themes/default/components_body.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<h2>Available Multi-User Chats:</h2><hr /><p>
-###COMPONENTS_STUFF###
-</p><hr />
\ No newline at end of file
--- a/mod_muc_log_http/muc_log_http/themes/default/day_bann.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-###TIME_STUFF###<span class="muc_bann"> *** ###VICTIM### got banned###REASON_STUFF###</span><br />
--- a/mod_muc_log_http/muc_log_http/themes/default/day_body.html	Thu Jun 17 11:16:12 2010 +0200
+++ b/mod_muc_log_http/muc_log_http/themes/default/day_body.html	Thu Jun 17 11:22:08 2010 +0200
@@ -2,8 +2,9 @@
 <p>###TITLE_STUFF###</p>
 <span class="join_link"><a href="http://speeqe.com/room/###JID###/" target="_blank">Join room via speeqe.com</a></span><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>
+<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>
 <hr /><div id="main" style="overflow: auto;">
 ###DAY_STUFF###
 </div><hr />
--- a/mod_muc_log_http/muc_log_http/themes/default/day_dayLink.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-<a href="../###DAY###/">###TEXT###</a>
\ No newline at end of file
--- a/mod_muc_log_http/muc_log_http/themes/default/day_kick.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-###TIME_STUFF###<span class="muc_kick"> *** ###VICTIM### got kicked###REASON_STUFF###</span><br />
--- a/mod_muc_log_http/muc_log_http/themes/default/day_message.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-###TIME_STUFF###<span class="muc_msg_nick">&lt;###NICK###&gt;</span> ###MSG###<br />
--- a/mod_muc_log_http/muc_log_http/themes/default/day_messageMe.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-###TIME_STUFF###<span class="muc_msg_me">*###NICK### ###MSG###</span><br />
--- a/mod_muc_log_http/muc_log_http/themes/default/day_presence_join.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-<div name="joinLeave" style="display: ###SHOWHIDE###;">###TIME_STUFF###<span class="muc_join"> *** ###NICK### has joined the room</span><br /></div>
--- a/mod_muc_log_http/muc_log_http/themes/default/day_presence_leave.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-<div name="joinLeave" style="display: ###SHOWHIDE###;">###TIME_STUFF###<span class="muc_leave"> *** ###NICK### has left the room</span><br /></div>
--- a/mod_muc_log_http/muc_log_http/themes/default/day_presence_statusChange.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-<div name="status" style="display: ###SHOWHIDE###;">###TIME_STUFF###<span class="muc_statusChange"> *** ###NICK### shows as "###SHOW###"###STATUS_STUFF###</span><br /></div>
--- a/mod_muc_log_http/muc_log_http/themes/default/day_presence_statusText.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
- and his status message is "###STATUS###"
\ No newline at end of file
--- a/mod_muc_log_http/muc_log_http/themes/default/day_reason.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-, the reason was "###REASON###"
\ No newline at end of file
--- a/mod_muc_log_http/muc_log_http/themes/default/day_time.html	Thu Jun 17 11:16:12 2010 +0200
+++ b/mod_muc_log_http/muc_log_http/themes/default/day_time.html	Thu Jun 17 11:22:08 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/default/day_title.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-Subject: <span class="muc_title">###TITLE###</span>
--- a/mod_muc_log_http/muc_log_http/themes/default/day_titleChange.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-###TIME_STUFF###<span class="muc_titleChange"> *** ###NICK### changed the title to "###TITLE###"</span><br />
--- a/mod_muc_log_http/muc_log_http/themes/default/days_bit.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-<a href="###BARE_DAY###/">###DAY###</a><br />
\ No newline at end of file
--- a/mod_muc_log_http/muc_log_http/themes/default/days_body.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<h2>Available days for ###JID###:</h2><hr /><div id="main" style="overflow: auto;">
-###DAYS_STUFF###
-</div><hr />
\ No newline at end of file
--- a/mod_muc_log_http/muc_log_http/themes/default/doc.html	Thu Jun 17 11:16:12 2010 +0200
+++ b/mod_muc_log_http/muc_log_http/themes/default/doc.html	Thu Jun 17 11:22:08 2010 +0200
@@ -4,6 +4,31 @@
 	<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());
+    }
+}
+
 function showHide(name) {
 	var eles = document.getElementsByName(name);
 	for (var i = 0; i < eles.length; i++) {
--- a/mod_muc_log_http/muc_log_http/themes/default/month_day.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-    <td class="day" valign="middle" align="center">###DAY###</td>
\ No newline at end of file
--- a/mod_muc_log_http/muc_log_http/themes/default/month_emptyDay.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-    <td class="day">&nbsp;</td>
\ No newline at end of file
--- a/mod_muc_log_http/muc_log_http/themes/default/month_footer.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-</tbody></table>
\ No newline at end of file
--- a/mod_muc_log_http/muc_log_http/themes/default/month_header.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-<table rules="groups" cellpadding="5">
-<thead><tr><td colspan="7"><center><H2><span class="month_title">###TITLE###</span></H2></center></td></tr></thead>
-<tbody style="border: solid black 1px;">
-<tr>
-###WEEKDAYS###</tr>
--- a/mod_muc_log_http/muc_log_http/themes/default/month_weekDay.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-    <th class="weekday" valign="middle" align="center">###DAY###</th>
\ No newline at end of file
--- a/mod_muc_log_http/muc_log_http/themes/default/rooms_bit.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-<a href="###ROOM###/">###ROOM###</a><br />
\ No newline at end of file
--- a/mod_muc_log_http/muc_log_http/themes/default/rooms_body.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-<h2>Available rooms on ###COMPONENT###:</h2><hr /><p>
-###ROOMS_STUFF###
-</p><hr />
\ No newline at end of file
--- a/mod_muc_log_http/muc_log_http/themes/default/year_title.html	Thu Jun 17 11:16:12 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-<center><span class="year_title"><a name="###YEAR###">###YEAR###</a></span></center>