mirror of
https://github.com/moparisthebest/mail
synced 2024-12-23 07:48:48 -05:00
fix margins and line height in reader and add > to before replies
This commit is contained in:
parent
d892b2c67f
commit
6b8dd9bc76
@ -62,11 +62,6 @@ define(function(require) {
|
||||
|
||||
$scope.state.mailList.selected = email;
|
||||
|
||||
// split text only emails into parts for easier rendering
|
||||
if (!email.html && typeof email.body === 'string') {
|
||||
email.bodyDisplayLines = email.body.split('\n');
|
||||
}
|
||||
|
||||
// mark selected message as 'read'
|
||||
markAsRead(email);
|
||||
};
|
||||
|
@ -14,6 +14,10 @@ define(function(require) {
|
||||
this.open = to;
|
||||
}
|
||||
};
|
||||
|
||||
$scope.lineEmpty = function(line) {
|
||||
return line.replace(/>/g, '').trim().length === 0;
|
||||
};
|
||||
};
|
||||
|
||||
//
|
||||
|
@ -62,12 +62,12 @@ define(function(require) {
|
||||
|
||||
// fill text body
|
||||
from = re.from[0].name || re.from[0].address;
|
||||
body = '<br><br>' + $filter('date')(re.sentDate, 'EEEE, MMM d, yyyy h:mm a') + ' ' + from + ' wrote:<br><br>';
|
||||
body = '<br><br>' + $filter('date')(re.sentDate, 'EEEE, MMM d, yyyy h:mm a') + ' ' + from + ' wrote:<br>> ';
|
||||
|
||||
// clean text from markup if to prevent injection in contenteditable
|
||||
if (!re.html) {
|
||||
cleaned = angular.element('<p>' + re.body + '</p>').text();
|
||||
body += cleaned.split('\n').join('<br>');
|
||||
body += cleaned.split('\n').join('<br>> ');
|
||||
$scope.body = body;
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
.date {
|
||||
color: $color-grey-light;
|
||||
font-size: $font-size-small;
|
||||
margin-top: 0.5em;
|
||||
margin-top: 0.25em;
|
||||
margin-bottom: 1.5em;
|
||||
padding: 0px;
|
||||
}
|
||||
@ -37,7 +37,7 @@
|
||||
color: $color-grey-lighter;
|
||||
background-color: $color-grey-lighter;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1.5em;
|
||||
margin-bottom: 1.75em;
|
||||
}
|
||||
|
||||
.body {
|
||||
@ -46,6 +46,10 @@
|
||||
line-height: 1.5em;
|
||||
height: 100%;
|
||||
overflow-y: scroll;
|
||||
|
||||
.empty-line {
|
||||
line-height: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
iframe {
|
||||
|
@ -20,9 +20,9 @@
|
||||
<div class="seperator-line"></div>
|
||||
|
||||
<div class="body">
|
||||
<!-- Render parts of a text only email in paragraphs for easier styling -->
|
||||
<span ng-repeat="line in state.mailList.selected.bodyDisplayLines track by $index">
|
||||
<!-- Render lines of a text-email in divs for easier styling -->
|
||||
<div ng-repeat="line in state.mailList.selected.body.split('\n') track by $index" ng-class="{'empty-line': lineEmpty(line)}">
|
||||
{{line}}<br>
|
||||
</span>
|
||||
</div>
|
||||
</div><!--/.body-->
|
||||
</div><!--/.view-read-->
|
Loading…
Reference in New Issue
Block a user