Reactivate "is_wap" for handheld browsers (iPhone, Opera, Nokia etc.).
authorMatt <matt@uncensored.citadel.org>
Sun, 6 Jul 2008 04:50:34 +0000 (04:50 +0000)
committerMatt <matt@uncensored.citadel.org>
Sun, 6 Jul 2008 04:50:34 +0000 (04:50 +0000)
Mobile templates end in .m.html

webcit/static/beginbox.m.html [new file with mode: 0644]
webcit/static/endbox.m.html [new file with mode: 0644]
webcit/static/head.m.html [new file with mode: 0644]
webcit/static/login.m.html [new file with mode: 0644]
webcit/static/mobile.css [new file with mode: 0644]
webcit/static/mobile.js [new file with mode: 0644]
webcit/static/richedit.m.html [new file with mode: 0644]
webcit/static/roombanner.m.html [new file with mode: 0644]
webcit/static/trailing.m.html [new file with mode: 0644]
webcit/subst.c

diff --git a/webcit/static/beginbox.m.html b/webcit/static/beginbox.m.html
new file mode 100644 (file)
index 0000000..593fefe
--- /dev/null
@@ -0,0 +1,5 @@
+<!-- start beginbox.html-->
+<div class="box">
+<div class="boxlabel"><?BOXTITLE></div>
+<div class="boxcontent">
+<!-- end beginbox.html-->
diff --git a/webcit/static/endbox.m.html b/webcit/static/endbox.m.html
new file mode 100644 (file)
index 0000000..e04ad1b
--- /dev/null
@@ -0,0 +1 @@
+</div></div>
diff --git a/webcit/static/head.m.html b/webcit/static/head.m.html
new file mode 100644 (file)
index 0000000..9e85a78
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+        "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title><?CURRENT_USER> - <?SERV_HUMANNODE></title>
+<meta name="MSSmartTagsPreventParsing" content="TRUE" >
+<meta name="keywords" content="groupware messaging collaboration" >
+<link href="static/mobile.css" rel="stylesheet" type="text/css">
+<script type="text/javascript" src="static/mobile.js"></script>
+<meta name="viewport" content="width=device-width"/>
+</head>
+<body>
+<div id="global">
+<!-- end head.html -->
diff --git a/webcit/static/login.m.html b/webcit/static/login.m.html
new file mode 100644 (file)
index 0000000..e05027b
--- /dev/null
@@ -0,0 +1,22 @@
+<?HELLO>
+<div class="login_message"><?MESG></div>
+<form action="login" method="POST"  class="box" id="login_form">
+        <label for="uname"><?USERNAME_BOX></label>
+        <input type="text" name="name" id="uname" >
+        <label for="pname"><?PASSWORD_BOX></label>
+        <input type="password" name="pass" id="pname" > 
+        <label for="lname"><?LANGUAGE_BOX></label>
+        <div><?DO_LANGUAGE_BOX></div>
+        <div class="logbuttons">
+        <input type="submit" name="login_action" value="<?LOGIN_BUTTON>" class="logbutton">
+        <?NEWUSER_BUTTON_PRE>
+        <input type="submit" name="newuser_action" value="<?NEWUSER_BUTTON>" class="logbutton" >
+        <?NEWUSER_BUTTON_POST>
+        <input type="submit" name="exit_action" value="<?EXIT_BUTTON>"  class="logbutton">
+        <br>
+        </div>
+</form>
+<?OFFER_OPENID_LOGIN>
+<div class="login_image"><img src="image&name=hello"></div>
+<div class="login_infos"><?LOGIN_INSTRUCTIONS></div>
+
diff --git a/webcit/static/mobile.css b/webcit/static/mobile.css
new file mode 100644 (file)
index 0000000..8b761fd
--- /dev/null
@@ -0,0 +1,39 @@
+#button li {
+       display: inline; 
+       padding-right: 5px;
+}
+#button li img {
+       display: none;
+}
+img {
+       border: none;
+       text-decoration: none;
+}
+#message_list div {
+       border-top: 1px solid black;
+       border-bottom: 1px solid black;
+       background-color: gray;
+}
+.subject {
+       font-style: italic;
+}
+body[orient="portrait"] {
+       max-width: 320px;
+}
+body {
+       font-family: sans-serif;
+}
+.msgview {
+       display: none;
+       background-color: white;
+}
+#login_form label, #login_form input, #login_form select, #login_form div{
+       display: list-item;
+       text-align: center !important;
+       margin: 0px auto;
+}
+#navbar ul li {
+       display: inline;
+       padding-right: 5px;
+}
+
diff --git a/webcit/static/mobile.js b/webcit/static/mobile.js
new file mode 100644 (file)
index 0000000..4181130
--- /dev/null
@@ -0,0 +1,26 @@
+var currentMsgDisplay = null;
+function CtdlLoadMsgMouseDown(event, msgnum) {
+       alert("CtdlLoadMsgMouseDown");
+       if (currentMsgDisplay != null) {
+               currentMsgDisplay.style.display = "none";
+       } 
+       var id = "m_"+msgnum;
+var preview_pane = document.getElementById(id);
+preview_pane.style.display = "block";
+preview_pane.innerHTML = "<i>Loading message</i>";
+currentMsgDisplay = preview_pane;
+var req = new XMLHttpRequest();
+req.open('GET', '/msg/'+msgnum, true);
+req.onreadystatechange = function (aEvt) {
+  if (req.readyState == 4) {
+     if(req.status == 200)
+      currentMsgDisplay.innerHTML = "<button onMouseDown=\"CtdlHideMsg()\">(Hide message)</button><br/>"+req.responseText;
+     else
+      currentMsgDisplay.innerHTML = "Error loading message";
+  }
+};
+req.send(null);
+}
+function CtdlHideMsg() {
+       currentMsgDisplay.style.display = "none";
+}
diff --git a/webcit/static/richedit.m.html b/webcit/static/richedit.m.html
new file mode 100644 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
diff --git a/webcit/static/roombanner.m.html b/webcit/static/roombanner.m.html
new file mode 100644 (file)
index 0000000..2fcfb2e
--- /dev/null
@@ -0,0 +1,13 @@
+<!-- start roombanner.html -->
+<div class="room_banner" >
+<?ROOMPIC>
+<h1><?ROOMNAME></h1>
+<?ROOMINFO>
+<p class="nummsgs"><?NUMMSGS></p>
+</div>
+<ul class="room_actions">
+<li class="start_page"><?START></li>
+<li class="search"><?SEARCHOMATIC></li>
+<li class="view"><?VIEWOMATIC></li>
+</ul>
+<!-- end roombanner.html -->
diff --git a/webcit/static/trailing.m.html b/webcit/static/trailing.m.html
new file mode 100644 (file)
index 0000000..84e807f
--- /dev/null
@@ -0,0 +1,3 @@
+<!-- start trailing.m.html -->
+</body>
+</html>
index e98001904489bad3dd50f0f5af971926b23c70cb..e3f57773276a2ea3c65b38f020d3175f858ce8d6 100644 (file)
@@ -358,7 +358,7 @@ void do_template(void *templatename) {
 
        strcpy(flat_filename, templatename);
        if (WC->is_wap)
-               strcat(flat_filename, ".wml");
+               strcat(flat_filename, ".m.html");
        else
                strcat(flat_filename, ".html");