prevent attribute inheritance cycle via template, closes #1077

This commit is contained in:
zadam
2020-06-04 12:27:41 +02:00
parent 7307ca385f
commit 1502b9ce66
3 changed files with 35 additions and 20 deletions

View File

@@ -4,7 +4,6 @@ const TPL = `
<table class="note-info-widget-table">
<style>
.note-info-widget-table {
table-layout: fixed;
width: 100%;
}
@@ -22,22 +21,23 @@ const TPL = `
<tr>
<th>Note ID:</th>
<td colspan="3" class="note-info-note-id"></td>
<td class="note-info-note-id"></td>
</tr>
<tr>
<th>Created:</th>
<td colspan="3" class="note-info-date-created"></td>
<td class="note-info-date-created"></td>
</tr>
<tr>
<th>Modified:</th>
<td colspan="3" class="note-info-date-modified"></td>
<td class="note-info-date-modified"></td>
</tr>
<tr>
<th>Type:</th>
<td class="note-info-type"></td>
<th>MIME:</th>
<td class="note-info-mime"></td>
<td>
<span class="note-info-type"></span>
<span class="note-info-mime"></span>
</td>
</tr>
</table>
`;
@@ -69,9 +69,12 @@ export default class NoteInfoWidget extends CollapsibleWidget {
this.$type.text(note.type);
this.$mime
.text(note.mime)
.attr("title", note.mime);
if (note.mime) {
this.$mime.text('(' + note.mime + ')');
}
else {
this.$mime.empty();
}
}
entitiesReloadedEvent({loadResults}) {