Skip to content
Draft
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
1 change: 0 additions & 1 deletion Configuration/TypoScript/Plugin/Kitodo/setup.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ plugin.tx_dlf_pageview {
settings {
features =
elementId = tx-dlf-map
multiViewType =
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
action="main"
pageUid="{settings.targetPid}"
additionalParams="{f:if(condition:'{child.id}', then:'{\'tx_dlf[id]\':child.id, \'tx_dlf[page]\':child.page}', else: '{\'tx_dlf[page]\':child.page}')}"
argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[measure]'}"
argumentsToBeExcludedFromQueryString="{0: 'tx_dlf[measure]', 1: 'tx_dlf[multiview]'}"
addQueryString="untrusted"
section="{child.section}"
title="{f:if(condition:'{child.title}', then: '{child.title}', else: '{child.type}')}">
Expand Down
53 changes: 24 additions & 29 deletions Resources/Private/Plugins/Kitodo/Templates/Navigation/Main.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@
<f:if condition="{viewData.requestData.double}">
<f:form.hidden name="tx_dlf[double]" value="{viewData.requestData.double}"/>
</f:if>
<f:if condition="{viewData.requestData.multiviewembedded} == 1">
<f:form.hidden name="tx_dlf[multiviewembedded]" value="{viewData.requestData.multiviewembedded}"/>
</f:if>
<label for="tx-dlf-page-{viewData.uniqueId}">
<f:translate key="selectPage"/>
</label>
Expand Down Expand Up @@ -210,18 +213,14 @@
</f:section>

<f:section name="render.zoom">
<f:if condition="{multiview} != 1">
<f:then>
<li class="zoom">
<a href="#" class="in" title="{f:translate(key: 'zoomIn')}" onclick="tx_dlf_viewer.map.zoomIn();">
<f:translate key="zoomIn"/>
</a>
<a href="#" class="out" title="{f:translate(key: 'zoomOut')}" onclick="tx_dlf_viewer.map.zoomOut();">
<f:translate key="zoomOut"/>
</a>
</li>
</f:then>
</f:if>
<li class="zoom">
<a href="#" class="in" title="{f:translate(key: 'zoomIn')}" onclick="tx_dlf_viewer.map.zoomIn();">
<f:translate key="zoomIn"/>
</a>
<a href="#" class="out" title="{f:translate(key: 'zoomOut')}" onclick="tx_dlf_viewer.map.zoomOut();">
<f:translate key="zoomOut"/>
</a>
</li>
<li class="fullscreen">
<a href="#" class="fullscreen" title="{f:translate(key: 'zoomFullscreen')}">
<f:translate key="zoomFullscreen"/>
Expand All @@ -230,27 +229,23 @@
</f:section>

<f:section name="render.rotation">
<f:if condition="{multiview} != 1">
<f:then>
<li class="rotate">
<a href="#" class="rotate-left" title="{f:translate(key: 'rotateLeft')}" onclick="tx_dlf_viewer.map.rotateLeft();">
<f:translate key="rotateLeft"/>
</a>
<a href="#" class="rotate-right" title="{f:translate(key: 'rotateRight')}" onclick="tx_dlf_viewer.map.rotateRight();">
<f:translate key="rotateRight"/>
</a>
<a href="#" class="upend" title="{f:translate(key: 'rotateReset')}" onclick="tx_dlf_viewer.map.resetRotation();">
<f:translate key="rotateReset"/>
</a>
</li>
</f:then>
</f:if>
<li class="rotate">
<a href="#" class="rotate-left" title="{f:translate(key: 'rotateLeft')}" onclick="tx_dlf_viewer.map.rotateLeft();">
<f:translate key="rotateLeft"/>
</a>
<a href="#" class="rotate-right" title="{f:translate(key: 'rotateRight')}" onclick="tx_dlf_viewer.map.rotateRight();">
<f:translate key="rotateRight"/>
</a>
<a href="#" class="upend" title="{f:translate(key: 'rotateReset')}" onclick="tx_dlf_viewer.map.resetRotation();">
<f:translate key="rotateReset"/>
</a>
</li>
</f:section>

<f:section name="render.measureBack">
<f:if condition="{numMeasures} > 0 && {double} != 1">
<f:then>
<div class="measureBacks" style="top: 100px;">
<div class="measureBacks">
<span class="prev">
<f:if condition="{currentMeasure} > 1">
<f:then>
Expand All @@ -275,7 +270,7 @@
<f:section name="render.measureForward">
<f:if condition="{numMeasures} > 0 && {double} != 1">
<f:then>
<div class="measureFwds" style="top: 200px;">
<div class="measureFwds">
<span class="next">
<f:if condition="{currentMeasure} < {numMeasures}">
<f:then>
Expand Down
20 changes: 18 additions & 2 deletions Resources/Private/Plugins/Kitodo/Templates/Toolbox/Main.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,28 @@
<f:if condition="{renderAddDocumentTool}">
<f:then>
<a href="#" title="{f:translate(key:'tools.adddocument.label', extensionName:'dlf')}">{f:translate(key:'tools.adddocument.label', extensionName:'dlf')}</a>
<f:form method="post" pluginName="pageview" action="addDocument" addQueryString="untrusted" name="formAddDocument" object="{formAddDocument}" extensionName="dlf" controller="PageView">
<form id="formAddDocument" >
<p class="add-document-description">{f:translate(key:'tools.adddocument.description', extensionName:'dlf')}</p>
<label for="location-field">{f:translate(key:'tools.adddocument.label', extensionName:'dlf')}</label>
<f:form.textfield property="location" id="location-field" placeholder="{f:translate(key:'tools.adddocument.placeholder', extensionName:'dlf')}" required="required" />
<f:form.button>{f:translate(key:'tools.adddocument.submit', extensionName:'dlf')}</f:form.button>
</f:form>
</form>
<script>
document.getElementById('formAddDocument').addEventListener('submit', function (e) {
e.preventDefault();
const url = new URL(window.location.href);
const params = [...url.searchParams.keys()];
const multiview = params.filter(p => p.startsWith("tx_dlf[multiview]"));
if (multiview.length === 0) {
url.searchParams.append("tx_dlf[multiview]", 1);
}
const multiViewSources = params.filter(p => p.startsWith("tx_dlf[multiViewSource]["));
const nextIndex = multiViewSources.length;
const urlValue = document.getElementById('location-field').value.trim();
url.searchParams.append(`tx_dlf[multiViewSource][${nextIndex}]`, urlValue);
window.location.href = url.toString();
});
</script>
</f:then>
</f:if>

Expand Down