Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have OSD viewer supplement simple viewer rather than replace #109

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion _includes/osd_iiif_image_viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
$(document).ready(function () {
var manifestUrl = "{{ include.manifest | absolute_url }}";
$.getJSON(manifestUrl, function(data) {
$('.item-view').style("display", "none");
$('.item-view .osd-browser').style("display", "inline");
var tileSources = [];
$.each(data.sequences[0].canvases, function(k, val) {
tileSources.push(val.images[0].resource.service['@id'] + '/info.json');
Expand All @@ -16,7 +18,7 @@
tileSources: tileSources,
homeFillsViewer: false,
showReferenceStrip: true
});
})
});
});
</script>
13 changes: 8 additions & 5 deletions _layouts/generic_collection_item.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,18 @@ <h3 alt="{{ page.label }}" class='item-label'>{{ page.label }}</h3>
{% endif %}

{% if viewer %}
<div class='item-view'>
<div class='item-view static-browser'>
<span class='pagination-link' id='prevlink'></span>
{% if viewer == 'openseadragon' %}
{% include osd_iiif_image_viewer.html manifest=page.manifest prevlink=prevlink nextlink=nextlink %}
{% else %}
{% include simple_image_viewer.html full_image=page.full prevlink=prevlink nextlink=nextlink %}
{% endif %}
<span class='pagination-link' id='nextlink'></span>
</div>
{% if viewer == 'openseadragon' %}
<div class='item-view osd-browser' style="display:none">
<span class='pagination-link' id='prevlink'></span>
{% include osd_iiif_image_viewer.html manifest=page.manifest prevlink=prevlink nextlink=nextlink %}
<span class='pagination-link' id='nextlink'></span>
</div>
{% endif %}
{% unless layout.pagination == false %}{% include item_pagination.html %}{% endunless %}
{% endif %}

Expand Down