Skip to content

Commit

Permalink
Keep inline notes from duplicating when the page resizes
Browse files Browse the repository at this point in the history
  • Loading branch information
craigdietrich committed Jul 6, 2023
1 parent 83792e8 commit d057efb
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,9 @@

addInlineNoteElementForLink: function(link) {

link.wrap('<div class="inlineNoteBody body_copy"></div>');
if (!link.parent().is('.inlineNoteBody')) {
link.wrap('<div class="inlineNoteBody body_copy"></div>');
}
link.text('Go to note').attr('href', $('link#parent').attr('href')+link.attr('resource'));
var wrapper = link.parent();
var slug = link.attr('resource');
Expand Down Expand Up @@ -511,6 +513,7 @@
}
}
scalarapi.loadNode(slug, true, function(node) {
wrapper.find('.content, .description, .title').remove();
for (uri in node) {
var version_uri = node[uri]['http://purl.org/dc/terms/hasVersion'][0].value;
var version = node[version_uri];
Expand Down

0 comments on commit d057efb

Please sign in to comment.