{
$.mobile.pageLoading(true);
if (r.response && r.response.message && !r.response.message.error) {
- var data = r.response.message;
+ var data = r.response.message,
+ headers = $('#imp-message-headers tbody');
$('#imp-message-title').html(data.title);
$('#imp-message-subject').html(data.subject);
$('#imp-message-from').text(data.from[0].personal);
$('#imp-message-body').html(data.msgtext);
+ headers.text('');
$.each(data.headers, function(k, header) {
+ if (header.value) {
+ headers.append($('<tr>').append($('<td class="imp-header-label">').html(header.name + ':')).append($('<td>').html(header.value)));
+ }
if (header.id == 'Date') {
$('#imp-message-date').text(header.value);
}
orig = $(e.target),
id;
- while (elt) {
+ while (elt && elt != window.document) {
id = elt.attr('id');
switch (id) {
+ case 'imp-message-more':
+ elt.parent().hide();
+ elt.parent().next().show();
+ return;
+
+ case 'imp-message-less':
+ elt.parent().hide();
+ elt.parent().prev().show();
+ return;
}
if (elt.hasClass('imp-folder')) {
var link = elt.find('a[mailbox]');
ImpMobile.toMailbox(link.attr('mailbox'), link.text());
- break;
+ return;
} else if (elt.hasClass('imp-message')) {
ImpMobile.toMessage(elt.attr('data-imp-mailbox'), elt.attr('data-imp-uid'));
- break;
+ return;
}
elt = elt.parent();
<small id="imp-message-date"></small>
</div>
<div class="ui-body ui-body-c">
- <a href="#" style="float:right;margin:0" data-role="button" data-icon="arrow-d" data-iconpos="notext"><?php echo _("Show more") ?></a>
+ <a id="imp-message-more" href="#" data-role="button" data-icon="arrow-d" data-iconpos="notext"><?php echo _("Show more") ?></a>
<?php echo _("From:") ?> <span id="imp-message-from"></span>
</div>
+ <div class="ui-body ui-body-c">
+ <a id="imp-message-less" href="#" data-role="button" data-icon="arrow-u" data-iconpos="notext"><?php echo _("Show less") ?></a>
+ <table id="imp-message-headers"><tbody></tbody></table>
+ </div>
<div id="imp-message-body" data-role="content"></div>
</div>
+/* Mailbox */
#mailbox .ui-btn-innner {
padding-top: 0.4em;
padding-bottom: 0.4em;
margin: 0;
}
+/* Message */
#message .ui-body-c {
border-top-width: 0;
}
+.imp-header-label {
+ font-weight: bold;
+}
+#imp-message-more, #imp-message-less {
+ float: right;
+ margin: 0;
+}
/* Style for HTML data iframe. */
.htmlMsgData {
width: 100%;
}
-.mimePartInfo {
+.mimePartInfo, .mimeStatusMessage {
display: none;
}