(feat) pimped the mail part viewers

This commit is contained in:
Ludovic Marcotte
2015-08-07 20:38:26 -04:00
parent ce8a4b6d8a
commit 704307e6d6
5 changed files with 39 additions and 20 deletions
@@ -177,6 +177,7 @@
var _this = this,
parts = [],
_visit = function(part) {
part.msgclass = 'msg-attachment-other';
if (part.type == 'UIxMailPartAlternativeViewer') {
_visit(_.find(part.content, function(alternatePart) {
return part.preferredPart == alternatePart.contentType;
@@ -231,6 +232,9 @@
});
}
if (part.type == 'UIxMailPartImageViewer')
part.msgclass = 'msg-attachment-image';
// Trusted content that can be compiled (Angularly-speaking)
part.compile = true;
parts.push(part);
@@ -36,6 +36,27 @@
.msg-date {
text-align: right;
}
.msg-attachment-image {
@media (min-width: $layout-breakpoint-sm) {
flex: 0 0 100%;
max-width: 100%;
}
@media (min-width: $layout-breakpoint-md) {
flex: 0 0 66.66%;
max-width: 66%;
}
@media (min-width: $layout-breakpoint-lg) {
flex: 0 0 33.33%;
max-width: 33%;
}
}
.msg-attachment-other {
flex: 0 0 100%;
max-width: 100%;
}
// sg-md title don't fit in message headers
.sg-md-title-msg {
@extend .sg-md-title;