Skip to content

Commit

Permalink
Merge pull request #805 from paulwarren-wk/footnote-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
austinmatherne-wk authored Jan 27, 2025
2 parents ab399df + 66b5daa commit f135d5b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 15 deletions.
2 changes: 1 addition & 1 deletion iXBRLViewerPlugin/viewer/src/html/footnote-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
-->

<div>
<table class="fact-properties">
<table class="property-table fact-properties">
<tr class="value">
<th data-i18n="footnotes.footnote">Footnote</th>
<td><span class="value"></span> <button class="show-all inline-button">[...]</button></td>
Expand Down
6 changes: 6 additions & 0 deletions iXBRLViewerPlugin/viewer/src/js/footnote.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ export class Footnote {
return this.textContent();
}

readableValueHTML() {
const span = document.createElement("span");
span.append(document.createTextNode(this.textContent()));
return span;
}

isTextBlock() {
return false;
}
Expand Down
4 changes: 3 additions & 1 deletion iXBRLViewerPlugin/viewer/src/js/inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ export class Inspector {
const valueHTML = item.readableValueHTML();
const tr = $('tr.value', context);
const valueSpan = tr.find('td .value').empty();
if (!item.isNumeric() && !showAll) {
if (!(item instanceof Fact && item.isNumeric()) && !showAll) {
const vv = wrapLabel(valueHTML.textContent, 120);
if (vv.length > 1) {
tr.addClass("truncated");
Expand Down Expand Up @@ -1463,6 +1463,7 @@ export class Inspector {
}
else {
$('#inspector').removeClass('no-fact-selected').removeClass("hidden-fact").removeClass("html-hidden-fact");
$('#inspector .tags').show();

$('#inspector .fact-inspector')
.empty()
Expand Down Expand Up @@ -1512,6 +1513,7 @@ export class Inspector {
else if (cf instanceof Footnote) {
$('#inspector').addClass('footnote-mode');
$('#inspector .footnote-details .footnote-facts').empty().append(this._footnoteFactsHTML(cf));
$('#inspector .tags').hide();
}
$('.fact-details').localize();
}
Expand Down
27 changes: 14 additions & 13 deletions iXBRLViewerPlugin/viewer/src/less/inspector.less
Original file line number Diff line number Diff line change
Expand Up @@ -689,19 +689,6 @@
}
}

.select-icon {
float: right;
.square-button();
.clickable();

&:first-of-type {
margin-left: 0.5rem;
}

&::before {
.icon-select();
}
}

.more-results {
.clickable();
Expand Down Expand Up @@ -1297,6 +1284,20 @@
.fact-list-item {
.block-list-item();

.select-icon {
float: right;
.square-button();
.clickable();

&:first-of-type {
margin-left: 0.5rem;
}

&::before {
.icon-select();
}
}

.title {
color: var(--colour-text-title);
font-weight: bold;
Expand Down

0 comments on commit f135d5b

Please sign in to comment.