mirror of
https://github.com/moparisthebest/mail
synced 2024-12-24 08:18: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;
|
$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'
|
// mark selected message as 'read'
|
||||||
markAsRead(email);
|
markAsRead(email);
|
||||||
};
|
};
|
||||||
|
@ -14,6 +14,10 @@ define(function(require) {
|
|||||||
this.open = to;
|
this.open = to;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.lineEmpty = function(line) {
|
||||||
|
return line.replace(/>/g, '').trim().length === 0;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -62,12 +62,12 @@ define(function(require) {
|
|||||||
|
|
||||||
// fill text body
|
// fill text body
|
||||||
from = re.from[0].name || re.from[0].address;
|
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
|
// clean text from markup if to prevent injection in contenteditable
|
||||||
if (!re.html) {
|
if (!re.html) {
|
||||||
cleaned = angular.element('<p>' + re.body + '</p>').text();
|
cleaned = angular.element('<p>' + re.body + '</p>').text();
|
||||||
body += cleaned.split('\n').join('<br>');
|
body += cleaned.split('\n').join('<br>> ');
|
||||||
$scope.body = body;
|
$scope.body = body;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
.date {
|
.date {
|
||||||
color: $color-grey-light;
|
color: $color-grey-light;
|
||||||
font-size: $font-size-small;
|
font-size: $font-size-small;
|
||||||
margin-top: 0.5em;
|
margin-top: 0.25em;
|
||||||
margin-bottom: 1.5em;
|
margin-bottom: 1.5em;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
@ -37,7 +37,7 @@
|
|||||||
color: $color-grey-lighter;
|
color: $color-grey-lighter;
|
||||||
background-color: $color-grey-lighter;
|
background-color: $color-grey-lighter;
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
margin-bottom: 1.5em;
|
margin-bottom: 1.75em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.body {
|
.body {
|
||||||
@ -46,6 +46,10 @@
|
|||||||
line-height: 1.5em;
|
line-height: 1.5em;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
|
|
||||||
|
.empty-line {
|
||||||
|
line-height: 1em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
iframe {
|
iframe {
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
<div class="seperator-line"></div>
|
<div class="seperator-line"></div>
|
||||||
|
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<!-- Render parts of a text only email in paragraphs for easier styling -->
|
<!-- Render lines of a text-email in divs for easier styling -->
|
||||||
<span ng-repeat="line in state.mailList.selected.bodyDisplayLines track by $index">
|
<div ng-repeat="line in state.mailList.selected.body.split('\n') track by $index" ng-class="{'empty-line': lineEmpty(line)}">
|
||||||
{{line}}<br>
|
{{line}}<br>
|
||||||
</span>
|
</div>
|
||||||
</div><!--/.body-->
|
</div><!--/.body-->
|
||||||
</div><!--/.view-read-->
|
</div><!--/.view-read-->
|
Loading…
Reference in New Issue
Block a user