added the private feature

This commit is contained in:
SJ
2016-02-10 14:57:30 +01:00
parent 93e1d0e7fe
commit 2fbb41264c
20 changed files with 117 additions and 2 deletions

View File

@ -328,6 +328,23 @@ var Piler =
},
mark_as_private:function(id)
{
Piler.log("[mark_as_private]", id);
Piler.poor_mans_keepalive_for_dummy_browsers();
jQuery.ajax('index.php?route=message/private', {
data: { id: id },
type: "POST"
})
.done( function( a ) {})
.fail(function(a, b) { alert("Problem retrieving XML data:" + b) });
Piler.show_message('messagebox1', "OK", 0.8);
},
restore_message:function(id)
{
Piler.log("[restore_message]");

View File

@ -1690,6 +1690,7 @@ html,body{height:auto !important;height:100%;min-height:100%;}
.resultrow{font-style:italic;cursor:pointer;}
.resultrow.new{font-style:normal;}
.xxx{color:#aaa;}
.private{color:red;}
.table-striped tbody>tr.resultrow.selected:nth-child(odd)>td{background-color:#ffffdd;}
.table-striped tbody>tr.resultrow.selected:nth-child(even)>td{background-color:#ffffdd;}
table#resultstable{margin-bottom:0;}

View File

@ -25,6 +25,9 @@
<?php if($message['has_journal'] == 1 && Registry::get('auditor_user') == 1 && SHOW_ENVELOPE_JOURNAL == 1) { ?>
| <a class="messagelink" href="#" onclick="Piler.view_journal(<?php print $id; ?>);"><i class="icon-envelope-alt"></i>&nbsp;<?php print $text_view_journal_envelope; ?></a>
<?php } ?>
<?php if(Registry::get('auditor_user') == 1) { ?>
| <a class="messagelink" href="#" onclick="Piler.mark_as_private(<?php print $id; ?>);"><i class="icon-bookmark-empty"></i>&nbsp;<?php print $text_private; ?></a>
<?php } ?>
<?php if($spam == 1) { ?>
| <a class="messagelink" href="#" onclick="Piler.not_spam(<?php print $id; ?>);"><i class="icon-exclamation-sign"></i>&nbsp;<?php print $text_not_spam; ?></a>
<?php } ?>

View File

@ -51,7 +51,7 @@
<td id="c4_r<?php print $i; ?>" class="resultcell from"><?php if($message['from'] != $message['shortfrom']) { ?><span title="<?php print $message['from']; ?>"><?php print $message['shortfrom']; ?></span><?php } else { print $message['from']; } ?></td>
<td id="c5_r<?php print $i; ?>" class="resultcell to"><?php if($message['to'] != $message['shortto']) { ?><span title="<?php print $message['to']; ?>"><?php print $message['shortto']; ?>&nbsp;<i class=" muted icon-group"></i></span><?php } else { print $message['to']; } ?></td>
<td id="c6_r<?php print $i; ?>" class="resultcell subject"><a href="#" <?php if($message['deleted'] == 1) { ?>class="xxx"<?php } ?>><?php print $message['subject']; ?></a><?php if(ENABLE_REFERENCES == 1 && $message['reference']) { ?> <a href="#" <?php if($message['deleted'] == 1) { ?>class="xxx"<?php } ?> title="<?php print $text_conversation_available; ?>" onclick="$('#ref').val('<?php print $message['reference']; ?>'); Piler.expert(this);">[+]</span></a><?php } ?></td>
<td id="c6_r<?php print $i; ?>" class="resultcell subject"><a href="#" <?php if($message['deleted'] == 1) { ?>class="xxx"<?php } ?>><?php print $message['subject']; ?></a><?php if(ENABLE_REFERENCES == 1 && $message['reference']) { ?> <a href="#" <?php if($message['deleted'] == 1) { ?>class="xxx"<?php } ?> title="<?php print $text_conversation_available; ?>" onclick="$('#ref').val('<?php print $message['reference']; ?>'); Piler.expert(this);">[+]</span></a><?php } ?><?php if($message['private'] == 1) { ?> <span class="private">P</span><?php } ?></td>
<td id="c7_r<?php print $i; ?>" class="resultcell size"><?php print $message['size']; ?></td>
<td id="c8_r<?php print $i; ?>" class="resultcell end"><?php if($message['spam'] == 1) { ?><i class="spam icon-warning-sign icon-large" title="<?php print $text_spam_flag; ?>"></i><?php } else { ?>&nbsp;<?php } ?></td>