wDumpContent(0);
}
-
+/*
+ * Mobile browser view of message
+ *
+ * @param msg_num_as_string Message number as a string instead of as a long int
+ */
+void mobile_message_view(void) {
+ long msgnum = 0L;
+ msgnum = StrTol(WC->UrlFragment1);
+ output_headers(1, 0, 0, 0, 0, 1);
+ begin_burst();
+ do_template("msgcontrols");
+ read_message(msgnum,1, "");
+ wDumpContent(0);
+}
/**
* \brief Display a message's headers
(WC->summ[num].is_new ? "bold" : "normal"),
WC->summ[num].msgnum
);
- wprintf("<span>%s</span>",WC->summ[num].from);
+ wprintf("<span class=\"from\">%s</span>",WC->summ[num].from);
wprintf("<span style=\"float: right;\">");
webcit_fmt_date(datebuf, WC->summ[num].date, 1); /* brief */
- escputs(datebuf);
+ escputs(datebuf);
wprintf("</span><br/><span class=\"subject\">");
- wprintf(WC->summ[num].subj);
+ escputs(WC->summ[num].subj);
wprintf("</span></div><div id=\"m_%ld\" class=\"msgview\" onMouseDown=\"\"></div></div>",WC->summ[num].msgnum);
}
maxmsgs = 9999999;
}
- if (is_summary || WCC->is_mobile) { /**< fetch header summary */
+ if (is_summary) { /**< fetch header summary */
snprintf(cmd, sizeof(cmd), "MSGS %s|%s||1",
(!strcmp(oper, "do_search") ? "SEARCH" : "ALL"),
(!strcmp(oper, "do_search") ? bstr("query") : "")
}
if (WCC->is_mobile) {
maxmsgs = 20;
+ snprintf(cmd, sizeof(cmd), "MSGS %s|%s||1",
+ (!strcmp(oper, "do_search") ? "SEARCH" : "ALL"),
+ (!strcmp(oper, "do_search") ? bstr("query") : "")
+ );
SortBy = eRDate;
}
WebcitAddUrlHandler(HKEY("confirm_move_msg"), confirm_move_msg, 0);
WebcitAddUrlHandler(HKEY("msg"), embed_message, NEED_URL|AJAX);
WebcitAddUrlHandler(HKEY("printmsg"), print_message, NEED_URL);
+ WebcitAddUrlHandler(HKEY("mobilemsg"), mobile_message_view, NEED_URL);
WebcitAddUrlHandler(HKEY("msgheaders"), display_headers, NEED_URL);
return ;
}
);
svcallback("ROOMPIC", embed_room_graphic);
svcallback("ROOMINFO", readinfo);
- svcallback("VIEWOMATIC", embed_view_o_matic);
+ svcallback("VIEWOMATIC", embed_view_o_matic);
svcallback("SEARCHOMATIC", embed_search_o_matic);
- svcallback("START", offer_start_page);
-
+ svcallback("START", offer_start_page);
+
do_template("roombanner");
- if (navbar_style != navbar_none) {
+ // roombanner contains this for mobile
+ if (navbar_style != navbar_none && !WC->is_mobile) {
wprintf("<div id=\"navbar\"><ul>");
+body {
+}
#button li {
display: inline;
padding-right: 5px;
border: none;
text-decoration: none;
}
-#message_list div {
- border-top: 1px solid black;
- border-bottom: 1px solid black;
- background-color: gray;
+#message_list div div {
+ border-bottom: 1px dotted black;
+ padding: 5px 5px 5px 5px;
+ /* background-color: white; */
}
.subject {
- font-style: italic;
+ color: gray;
}
body[orient="portrait"] {
max-width: 320px;
}
.msgview {
display: none;
- background-color: white;
+ background-color: white !important;
+}
+.message_content {
+ background-color: white;
}
#login_form label, #login_form input, #login_form select, #login_form div{
display: list-item;
display: inline;
padding-right: 5px;
}
-
+#navbar ul li img {
+ vertical-align: middle;
+}
+#navbar ul li a {
+ text-decoration: none;
+}
+.sticky {
+ background-color: gray;
+ border: 1px solid black;
+ width: 100%;
+}
+#vcontent {
+}
+.roomname {
+ background-color: #022750;
+ color: white;
+ border-radius: 5px;
+}
+.roomname img{
+ vertical-align: middle;
+}
var currentMsgDisplay = null;
function CtdlLoadMsgMouseDown(event, msgnum) {
- if (currentMsgDisplay != null) {
+ /* if (currentMsgDisplay != null) {
currentMsgDisplay.style.display = "none";
}
var id = "m_"+msgnum;
currentMsgDisplay.innerHTML = "Error loading message";
}
};
-req.send(null);
+req.send(null); */
+ window.location = "/mobilemsg/"+msgnum;
}
function CtdlHideMsg() {
currentMsgDisplay.style.display = "none";
--- /dev/null
+<!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=980, initial-scale = 0.5"/>
+<base href="/"/>
+</head>
+<body>
+<div class="sticky">
+ <div class="mcontrols">
+ <button onmousedown="history.go(-1)">Back to message list</button> <button>Reply to this
+ message</button> <button>Move to trash</button>
+ </div>
+</div>
+<div id="vcontent">
<!-- start roombanner.html -->
<div class="room_banner" >
-<?ROOMPIC>
-<h1><?ROOMNAME></h1>
-<?ROOMINFO>
-<p class="nummsgs"><?NUMMSGS></p>
+<h1 class="roomname"><?ROOMPIC> <?ROOMNAME></h1>
+<p><?ROOMINFO> <?NUMMSGS></p>
+<p><?START> <?SEARCHOMATIC></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 -->
return 1;
} else if (strstr(user_agent, "Opera Mobi") != NULL) {
return 1;
- }
+ } else if (strstr(user_agent, "Firefox/2.0.0 Opera 9.51 Beta") != NULL) {
+ // For some reason a new install of Opera 9.51beta decided to spoof.
+ return 1;
+ }
return 0;
}