cleanup WIP

This commit is contained in:
Synox 2018-06-22 23:10:19 +02:00
parent ac67bf1659
commit d1e5551cc2
2 changed files with 99 additions and 98 deletions

View File

@ -20,11 +20,12 @@ $mailIds = array_map(function ($mail) {
}, $emails); }, $emails);
$mailIdsJoinedString = filter_var(join('|', $mailIds), FILTER_SANITIZE_SPECIAL_CHARS); $mailIdsJoinedString = filter_var(join('|', $mailIds), FILTER_SANITIZE_SPECIAL_CHARS);
function niceDate($date){ function niceDate($date) {
// TODO: make nicer
return $date; return $date;
} }
?>
?>
<!doctype html> <!doctype html>
@ -79,7 +80,8 @@ function niceDate($date){
<button type="button" class="btn btn-outline-secondary" onclick="location.reload()"> <button type="button" class="btn btn-outline-secondary" onclick="location.reload()">
<i class="fas fa-sync"></i> <i class="fas fa-sync"></i>
Reload!</button> Reload!
</button>
</div> </div>
<!-- move the rest of the page a bit down to show all content --> <!-- move the rest of the page a bit down to show all content -->
@ -149,7 +151,6 @@ function niceDate($date){
</select> </select>
</div> </div>
</div> </div>
<div class="col-auto my-1"> <div class="col-auto my-1">
@ -168,13 +169,13 @@ function niceDate($date){
<div id="email-list" class="list-group"> <div id="email-list" class="list-group">
<?php foreach ($emails as $email) { <?php foreach ($emails as $email) {
$safe_email_id = filter_var($email->id, FILTER_VALIDATE_INT); $safe_email_id = filter_var($email->id, FILTER_VALIDATE_INT);
?> ?>
<a class="list-group-item list-group-item-action email-list-item" data-toggle="collapse" <a class="list-group-item list-group-item-action email-list-item" data-toggle="collapse"
href="#mail-box-<?php echo $email->id?>" href="#mail-box-<?php echo $email->id ?>"
role="button" role="button"
aria-expanded="false" aria-controls="mail-box-<?php echo $email->id?>"> aria-expanded="false" aria-controls="mail-box-<?php echo $email->id ?>">
<div class="media"> <div class="media">
<button class="btn btn-white open-collapse-button"> <button class="btn btn-white open-collapse-button">
@ -184,8 +185,9 @@ function niceDate($date){
<div class="media-body"> <div class="media-body">
<h6 class="list-group-item-heading"><?php echo filter_var($email->fromName, FILTER_SANITIZE_SPECIAL_CHARS)?><span class="text-muted"><?php echo filter_var($email->fromAddress, FILTER_SANITIZE_SPECIAL_CHARS)?></span> <h6 class="list-group-item-heading"><?php echo filter_var($email->fromName, FILTER_SANITIZE_SPECIAL_CHARS) ?>
<small class="float-right"><?php echo niceDate($email->date)?></small> <span class="text-muted"><?php echo filter_var($email->fromAddress, FILTER_SANITIZE_SPECIAL_CHARS) ?></span>
<small class="float-right"><?php echo niceDate($email->date) ?></small>
</h6> </h6>
<p class="list-group-item-text text-truncate"> <p class="list-group-item-text text-truncate">
<?php echo filter_var($email->subject, FILTER_SANITIZE_SPECIAL_CHARS); ?> <?php echo filter_var($email->subject, FILTER_SANITIZE_SPECIAL_CHARS); ?>
@ -205,7 +207,7 @@ function niceDate($date){
</div> </div>
</div> </div>
</a> </a>
<div id="mail-box-<?php echo $email->id?>" role="tabpanel" aria-labelledby="headingCollapse1" <div id="mail-box-<?php echo $email->id ?>" role="tabpanel" aria-labelledby="headingCollapse1"
class="card-collapse collapse" class="card-collapse collapse"
aria-expanded="true"> aria-expanded="true">
<div class="card-body"> <div class="card-body">
@ -340,7 +342,6 @@ function niceDate($date){
.attr('title', 'Copied!') .attr('title', 'Copied!')
.tooltip('_fixTitle') .tooltip('_fixTitle')
.tooltip('show') .tooltip('show')
.attr('title', 'Copy to clipboard')
.tooltip('_fixTitle'); .tooltip('_fixTitle');
e.clearSelection(); e.clearSelection();
}); });

View File

@ -92,7 +92,7 @@ footer {
} }
#new-content-avalable { #new-content-avalable {
/*display: none;*/ display: none;
text-align: center; text-align: center;
} }