Skip to content

Commit

Permalink
Merge branch 'master' into fix/typo_in_config_doc
Browse files Browse the repository at this point in the history
  • Loading branch information
BFallert authored Aug 19, 2024
2 parents 674ffb1 + 520dbb9 commit 9d6d591
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 48 deletions.
60 changes: 32 additions & 28 deletions Classes/Controller/PageViewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -493,20 +493,22 @@ protected function addViewerJS(): void
$currentMeasureId = $docMeasures['measureCounterToMeasureId'][$this->requestData['docMeasure'][$i]];
}

$jsViewer .= 'tx_dlf_viewer[' . $i . '] = new dlfViewer({
controls: ["' . implode('", "', $this->controls) . '"],
div: "tx-dfgviewer-map-' . $i . '",
progressElementId: "' . $this->settings['progressElementId'] . '",
counter: "' . $i . '",
images: ' . json_encode($docImage) . ',
fulltexts: ' . json_encode($docFulltext) . ',
score: ' . json_encode($docScore) . ',
annotationContainers: ' . json_encode($docAnnotationContainers) . ',
measureCoords: ' . json_encode($docMeasures['measureCoordsCurrentSite']) . ',
useInternalProxy: ' . ($this->settings['useInternalProxy'] ? 1 : 0) . ',
currentMeasureId: "' . $currentMeasureId . '",
measureIdLinks: ' . json_encode($docMeasures['measureLinks']) . '
});
$viewer = [
'controls' => $this->controls,
'div' => "tx-dfgviewer-map-' . $i . '",
'progressElementId' => $this->settings['progressElementId'],
'counter' => $i,
'images' => $docImage,
'fulltexts' => $docFulltext,
'score' => $docScore,
'annotationContainers' => $docAnnotationContainers,
'measureCoords' => $docMeasures['measureCoordsCurrentSite'],
'useInternalProxy' => $this->settings['useInternalProxy'] ? 1 : 0,
'currentMeasureId' => $currentMeasureId,
'measureIdLinks' => $docMeasures['measureLinks']
];

$jsViewer .= 'tx_dlf_viewer[' . $i . '] = new dlfViewer(' . json_encode($viewer) . ');
';
$i++;
}
Expand All @@ -528,23 +530,25 @@ protected function addViewerJS(): void
$currentMeasureId = $docMeasures['measureCounterToMeasureId'][$this->requestData['measure']];
}

$viewer = [
'controls' => $this->controls,
'div' => $this->settings['elementId'],
'progressElementId' => $this->settings['progressElementId'],
'images' => $this->images,
'fulltexts' => $this->fulltexts,
'score' => $this->scores,
'annotationContainers' => $this->annotationContainers,
'measureCoords' => $docMeasures['measureCoordsCurrentSite'],
'useInternalProxy' => $this->settings['useInternalProxy'] ? 1 : 0,
'verovioAnnotations' => $this->verovioAnnotations,
'currentMeasureId' => $currentMeasureId,
'measureIdLinks' => $docMeasures['measureLinks']
];

// Viewer configuration.
$viewerConfiguration = '$(document).ready(function() {
if (dlfUtils.exists(dlfViewer)) {
tx_dlf_viewer = new dlfViewer({
controls: ["' . implode('", "', $this->controls) . '"],
div: "' . $this->settings['elementId'] . '",
progressElementId: "' . $this->settings['progressElementId'] . '",
images: ' . json_encode($this->images) . ',
fulltexts: ' . json_encode($this->fulltexts) . ',
score: ' . json_encode($this->scores) . ',
annotationContainers: ' . json_encode($this->annotationContainers) . ',
measureCoords: ' . json_encode($docMeasures['measureCoordsCurrentSite']) . ',
useInternalProxy: ' . ($this->settings['useInternalProxy'] ? 1 : 0) . ',
verovioAnnotations: ' . json_encode($this->verovioAnnotations) . ',
currentMeasureId: "' . $currentMeasureId . '",
measureIdLinks: ' . json_encode($docMeasures['measureLinks']) . '
});
tx_dlf_viewer = new dlfViewer(' . json_encode($viewer) . ');
}
});';
}
Expand Down
17 changes: 8 additions & 9 deletions Configuration/FlexForms/Navigation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<renderType>selectMultipleSideBySide</renderType>
<items>
<numIndex index="0">
<numIndex index="0">LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:plugins.navigation.flexform.features.doublepage</numIndex>
<numIndex index="1">doublepage</numIndex>
<numIndex index="0">LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:plugins.navigation.flexform.features.doublePage</numIndex>
<numIndex index="1">doublePage</numIndex>
</numIndex>
<numIndex index="1">
<numIndex index="0">LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:plugins.navigation.flexform.features.pageFirst</numIndex>
Expand All @@ -45,8 +45,8 @@
<numIndex index="1">pageStepBack</numIndex>
</numIndex>
<numIndex index="4">
<numIndex index="0">LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:plugins.navigation.flexform.features.pageselect</numIndex>
<numIndex index="1">pageselect</numIndex>
<numIndex index="0">LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:plugins.navigation.flexform.features.pageSelect</numIndex>
<numIndex index="1">pageSelect</numIndex>
</numIndex>
<numIndex index="5">
<numIndex index="0">LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:plugins.navigation.flexform.features.pageForward</numIndex>
Expand All @@ -61,8 +61,8 @@
<numIndex index="1">pageLast</numIndex>
</numIndex>
<numIndex index="8">
<numIndex index="0">LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:plugins.navigation.flexform.features.listview</numIndex>
<numIndex index="1">listview</numIndex>
<numIndex index="0">LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:plugins.navigation.flexform.features.listView</numIndex>
<numIndex index="1">listView</numIndex>
</numIndex>
<numIndex index="9">
<numIndex index="0">LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:plugins.navigation.flexform.features.zoom</numIndex>
Expand All @@ -81,15 +81,14 @@
<numIndex index="1">measureBack</numIndex>
</numIndex>
</items>
<default>doublepage,pageFirst,pageBack,pageStepBack,pageselect,pageForward,pageStepForward,pageLast,listview,zoom,rotation,measureForward,measureBack</default>
<default>doublePage,pageFirst,pageBack,pageStepBack,pageSelect,pageForward,pageStepForward,pageLast,listView,zoom,rotation,measureForward,measureBack</default>
<minitems>1</minitems>
</config>
</TCEforms>
</settings.features>
<settings.pageStep>
<TCEforms>
<exclude>1</exclude>
<displayCond>FIELD:settings.features:IN:pagestep</displayCond>
<label>LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:plugins.navigation.flexform.pageStep</label>
<config>
<type>input</type>
Expand All @@ -101,7 +100,7 @@
<settings.targetPid>
<TCEforms>
<exclude>1</exclude>
<displayCond>FIELD:settings.features:IN:listview</displayCond>
<displayCond>FIELD:settings.features:IN:listView</displayCond>
<label>LLL:EXT:dlf/Resources/Private/Language/locallang_be.xlf:flexform.targetPidListView</label>
<config>
<type>group</type>
Expand Down
1 change: 0 additions & 1 deletion Configuration/TypoScript/setup.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ plugin.tx_dlf {
}
settings {
storagePid = {$plugin.tx_dlf.persistence.storagePid}
useInternalProxy = 1
}
}

Expand Down
2 changes: 1 addition & 1 deletion Documentation/Plugins/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ Navigation
:Default:
By default all features are activated. The selection is stored as comma separated list.

doublepage,pageFirst,pageBack,pageStepBack,pageselect,pageForward,pageStepForward,pageLast,listview,zoom,rotation,measureForward,measureBack
doublePage,pageFirst,pageBack,pageStepBack,pageSelect,pageForward,pageStepForward,pageLast,litView,zoom,rotation,measureForward,measureBack

- :Property:
pageStep
Expand Down
6 changes: 3 additions & 3 deletions Resources/Private/Language/de.locallang_be.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,11 @@
<source><![CDATA[Show selected navigation features]]></source>
<target><![CDATA[Zeige ausgewählte Navigations-Funktionen]]></target>
</trans-unit>
<trans-unit id="plugins.navigation.flexform.features.doublepage" approved="yes">
<trans-unit id="plugins.navigation.flexform.features.doublePage" approved="yes">
<source><![CDATA[Buttons for double page mode and recto/verso adjustment]]></source>
<target><![CDATA[Buttons für Doppelseitenansicht und Recto/Verso-Korrektur]]></target>
</trans-unit>
<trans-unit id="plugins.navigation.flexform.features.listview" approved="yes">
<trans-unit id="plugins.navigation.flexform.features.listView" approved="yes">
<source><![CDATA[Link to page with listview plugin]]></source>
<target><![CDATA[Link zur Listenansicht]]></target>
</trans-unit>
Expand Down Expand Up @@ -285,7 +285,7 @@
<source><![CDATA[Forward X pages]]></source>
<target><![CDATA[X Seiten vor]]></target>
</trans-unit>
<trans-unit id="plugins.navigation.flexform.features.pageselect" approved="yes">
<trans-unit id="plugins.navigation.flexform.features.pageSelect" approved="yes">
<source><![CDATA[Page navigation menu]]></source>
<target><![CDATA[Seitennavigation]]></target>
</trans-unit>
Expand Down
6 changes: 3 additions & 3 deletions Resources/Private/Language/locallang_be.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,13 @@
<trans-unit id="plugins.navigation.flexform.features.zoom">
<source><![CDATA[Buttons for zoom-in, zoom-out and full screen]]></source>
</trans-unit>
<trans-unit id="plugins.navigation.flexform.features.doublepage">
<trans-unit id="plugins.navigation.flexform.features.doublePage">
<source><![CDATA[Buttons for double page mode and recto/verso adjustment]]></source>
</trans-unit>
<trans-unit id="plugins.navigation.flexform.features.pageselect">
<trans-unit id="plugins.navigation.flexform.features.pageSelect">
<source><![CDATA[Page navigation menu]]></source>
</trans-unit>
<trans-unit id="plugins.navigation.flexform.features.listview">
<trans-unit id="plugins.navigation.flexform.features.listView">
<source><![CDATA[Link to page with listview plugin]]></source>
</trans-unit>
<trans-unit id="plugins.navigation.flexform.features.measureForward">
Expand Down
6 changes: 3 additions & 3 deletions Resources/Private/Templates/Navigation/Main.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</f:for>

<f:comment>One section for each feature.</f:comment>
<f:section name="render.doublepage">
<f:section name="render.doublePage">
<f:if condition="{numPages} > 0">
<f:then>
<f:if condition="{viewData.requestData.double}">
Expand Down Expand Up @@ -122,7 +122,7 @@
</div>
</f:section>

<f:section name="render.pageselect">
<f:section name="render.pageSelect">
<li class="pages">
<f:form method="post" action="pageSelect" controller="Navigation" name="pageSelectForm" object="{pageSelectForm}" addQueryString="1">
<f:if condition="{viewData.requestData.id}">
Expand Down Expand Up @@ -200,7 +200,7 @@
</div>
</f:section>

<f:section name="render.listview">
<f:section name="render.listView">
<div class="tx-dlf-navigation-listview">
<f:link.page pageUid="{settings.targetPid}" additionalParams="{lastSearchParams}">
<f:translate key="linkToList"/>
Expand Down

0 comments on commit 9d6d591

Please sign in to comment.