Fall back to application/octet-stream when no specific mime-type display is available.
This commit is contained in:
parent
9b50df1570
commit
7cc62688f9
|
@ -208,6 +208,6 @@ img.avatar {
|
|||
max-height: 30vh;
|
||||
}
|
||||
|
||||
.post-item.application-octet-stream .post-item-body-container td {
|
||||
.post-item .post-item-body-container table.application-octet-stream td {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<table>
|
||||
<table class="application-octet-stream">
|
||||
<tr>
|
||||
<td><a href="{{itemURL}}"><img src="/Text-x-generic.svg"></a></td>
|
||||
</tr>
|
||||
|
|
|
@ -769,18 +769,23 @@
|
|||
};
|
||||
|
||||
during inbound(uiTemplate("post-item.html", $postItemTemplate)) {
|
||||
during inbound(uiTemplate("post-item-" + contentClass + ".html", $entry)) {
|
||||
assert uiContext.html(containerSelector, Mustache.render(postItemTemplate, itemInfo));
|
||||
on asserted uiContext.fragmentVersion(_) {
|
||||
var innerContext = uiContext.context('item-body');
|
||||
assert innerContext.html('#' + itemId + ' .post-item-body-container',
|
||||
Mustache.render(entry, itemInfo));
|
||||
if (!postInfo.isDraft) {
|
||||
on asserted innerContext.fragmentVersion(_) {
|
||||
if ((this.latestPostTimestamp === postInfo.timestamp) &&
|
||||
(this.latestPostId === postInfo.postId)) {
|
||||
setTimeout(function () { $("#post-" + postInfo.postId)[0].scrollIntoView(false); }, 1);
|
||||
}
|
||||
field this.entry = false;
|
||||
on asserted inbound(uiTemplate("post-item-" + contentClass + ".html", $entry)) {
|
||||
if (entry) this.entry = entry;
|
||||
}
|
||||
on asserted inbound(uiTemplate("post-item-application-octet-stream.html", $entry)) {
|
||||
if (entry && !this.entry) this.entry = entry;
|
||||
}
|
||||
assert uiContext.html(containerSelector, Mustache.render(postItemTemplate, itemInfo));
|
||||
on asserted uiContext.fragmentVersion(_) {
|
||||
var innerContext = uiContext.context('item-body');
|
||||
assert innerContext.html('#' + itemId + ' .post-item-body-container',
|
||||
Mustache.render(this.entry, itemInfo)) when (this.entry);
|
||||
if (!postInfo.isDraft) {
|
||||
on asserted innerContext.fragmentVersion(_) {
|
||||
if ((this.latestPostTimestamp === postInfo.timestamp) &&
|
||||
(this.latestPostId === postInfo.postId)) {
|
||||
setTimeout(function () { $("#post-" + postInfo.postId)[0].scrollIntoView(false); }, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue