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

[FEATURE] Migration to the changed 3d viewer implementation of Kitodo.Presentation #295

Merged
merged 2 commits into from
Aug 15, 2024
Merged
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
2 changes: 0 additions & 2 deletions Configuration/TypoScript/Page/header.typoscript
Original file line number Diff line number Diff line change
@@ -7,8 +7,6 @@ page {
includeCSS {
style = EXT:dfgviewer/Resources/Public/Css/webStyles.css
highlight = EXT:dfgviewer/Resources/Public/JavaScript/Highlight/styles/magula.css
3DViewer = EXT:dfgviewer/Resources/Public/Css/3DViewer/main.css
3DViewerSpinner = EXT:dfgviewer/Resources/Public/Css/3DViewer/spinner.css
}
includeJSFooterlibs {
jQuery = EXT:dfgviewer/Resources/Public/JavaScript/jQuery/jquery-3.6.0.min.js
31 changes: 22 additions & 9 deletions Configuration/TypoScript/Plugins/kitodo.typoscript
Original file line number Diff line number Diff line change
@@ -67,15 +67,10 @@ plugin.tx_dlf_pageview {
}

# --------------------------------------------------------------------------------------------------------------------
# 3D objects view
# embedded 3D viewer
# --------------------------------------------------------------------------------------------------------------------
plugin.tx_dlf_view3d < tt_content.list.20.dlf_view3d
plugin.tx_dlf_view3d {
pages = {$config.storagePid}
excludeOther = 0
features =
elementId = tx-dfgviewer-3d-view
fileGrpImages = THUMBS,DEFAULT
plugin.tx_dlf_embedded3dviewer < tt_content.list.20.dlf_embedded3dviewer
plugin.tx_dlf_embedded3dviewer {
}

# --------------------------------------------------------------------------------------------------------------------
@@ -159,6 +154,7 @@ lib.kitodo.navigation.viewfunction {
# fulltextdownloadtool
# imagedownloadtool
# imagemanipulationtool
# modeldownloadtool
# pdfdownloadtool
# searchindocumenttool

@@ -169,6 +165,14 @@ plugin.tx_dlf_toolbox {
}
}

plugin.tx_dlf_modeldownloadtool < plugin.tx_dlf_toolbox
plugin.tx_dlf_modeldownloadtool {
settings {
fileGrpsModelDownload = DEFAULT
tools = modeldownloadtool
}
}

plugin.tx_dlf_fulltexttool < plugin.tx_dlf_toolbox
plugin.tx_dlf_fulltexttool {
settings {
@@ -204,9 +208,18 @@ plugin.tx_dlf_audioplayer {
}

# --------------------------------------------------------------------------------------------------------------------
# newspaper navigation
# 3d object
# --------------------------------------------------------------------------------------------------------------------
[getDocumentType({$config.storagePid}) == "object"]
page.10.variables {
is3dObject = TEXT
is3dObject.value = 1
}
[END]

# --------------------------------------------------------------------------------------------------------------------
# newspaper navigation
# --------------------------------------------------------------------------------------------------------------------
[getDocumentType({$config.storagePid}) == "ephemera" or getDocumentType({$config.storagePid}) == "newspaper"]
page.10.variables {
isNewspaper = TEXT
6 changes: 5 additions & 1 deletion Resources/Private/Less/components/controls.less
Original file line number Diff line number Diff line change
@@ -140,6 +140,7 @@
&.persistence-page:before {
background-position: -320px -80px;
}
&.tx-dlf-tools-modeldownload:before,
&.tx-dlf-tools-imagedownload:before {
background-position: -320px -40px;
}
@@ -153,6 +154,9 @@
left: -40px;
}
}
&.tx-dlf-tools-modeldownload {
opacity: 1;
}
}
span {
opacity: 0.5;
@@ -974,4 +978,4 @@ body.dfgviewer.calendar {
position: relative;
top: -80px;
}
}
}
24 changes: 5 additions & 19 deletions Resources/Private/Partials/ControlBar.html
Original file line number Diff line number Diff line change
@@ -19,31 +19,17 @@ <h1><f:link.page pageUid="{rootPageId}" title="DFG-Viewer" class="dfgviewer-logo
</nav>
</div>

<f:if condition="{isObject3D} == 'object'">
<f:then>
<div class="metadata-wrapper" style="height: 100%">
</f:then>
<f:else>
<div class="metadata-wrapper">
</f:else>
</f:if>
<div class="metadata-wrapper">
<div class="tx-dlf-metadata">
<f:cObject typoscriptObjectPath="plugin.tx_dlf_metadata" />
</div>
<div class="offcanvas-toggle" title="<f:translate key='metadata' extensionName='dfgviewer' />"></div>
</div>

<f:if condition="{isObject3D} == 'object'">
<f:then>
<!-- it's a 3D object - no need for ToC here! -->
</f:then>
<f:else>
<div class="toc-wrapper">
<f:cObject typoscriptObjectPath="plugin.tx_dlf_tableofcontents" />
<div class="offcanvas-toggle" title="<f:translate key='toc' extensionName='dfgviewer' />"></div>
</div>
</f:else>
</f:if>
<div class="toc-wrapper">
<f:cObject typoscriptObjectPath="plugin.tx_dlf_tableofcontents" />
<div class="offcanvas-toggle" title="<f:translate key='toc' extensionName='dfgviewer' />"></div>
</div>
</div>
</f:section>

53 changes: 25 additions & 28 deletions Resources/Private/Partials/PageView.html
Original file line number Diff line number Diff line change
@@ -16,49 +16,46 @@ <h2>
</div>
</div>

<f:if condition="{gp-pagegrid} == 1">
<div class="document-functions">
<f:render partial="Provider" arguments="{_all}"/>
<f:render partial="Submenu" arguments="{_all}"/>
</div>

<f:if condition="{is3dObject} == 1">
<f:then>
<f:cObject typoscriptObjectPath="plugin.tx_dlf_pagegrid" />
<f:cObject typoscriptObjectPath="plugin.tx_dlf_embedded3dviewer"/>
</f:then>
<f:else>
<f:if condition="{isNewspaper} == 'newspaper_anchor'">
<f:if condition="{gp-pagegrid} == 1">
<f:then>
<f:cObject typoscriptObjectPath="plugin.tx_dfgviewer_newspaperyears" />
<f:cObject typoscriptObjectPath="plugin.tx_dlf_pagegrid" />
</f:then>
<f:else>
<f:if condition="{isNewspaper} == 'newspaper_year'">
<f:if condition="{isNewspaper} == 'newspaper_anchor'">
<f:then>
<f:cObject typoscriptObjectPath="plugin.tx_dfgviewer_newspapercalendar" />
<f:cObject typoscriptObjectPath="plugin.tx_dfgviewer_newspaperyears" />
</f:then>
<f:else>
<f:if condition="{isNewspaper} == 'newspaper_issue'">
<!-- it's a newspaper! -->
<f:if condition="{isNewspaper} == 'newspaper_year'">
<f:then>
<f:cObject typoscriptObjectPath="plugin.tx_dfgviewer_newspapercalendar" />
</f:then>
<f:else>
<f:if condition="{isNewspaper} == 'newspaper_issue'">
<!-- it's a newspaper! -->
</f:if>
<f:cObject typoscriptObjectPath="plugin.tx_dlf_pageview" />
<f:cObject typoscriptObjectPath="plugin.tx_dlf_audioplayer" />
<div class="fulltext-container">
<div id="tx-dlf-fulltextselection"></div>
</div>
</f:else>
</f:if>
<f:cObject typoscriptObjectPath="plugin.tx_dlf_pageview" />
<f:cObject typoscriptObjectPath="plugin.tx_dlf_audioplayer" />
<f:cObject typoscriptObjectPath="plugin.tx_dlf_view3d" />
<div class="fulltext-container">
<div id="tx-dlf-fulltextselection"></div>
</div>
</f:else>
</f:if>
</f:else>
</f:if>
</f:else>
</f:if>

<div class="document-functions">
<f:render partial="Provider" arguments="{_all}"/>

<f:if condition="{3d}">
<f:else>
<f:render partial="Submenu" arguments="{_all}"/>
</f:else>
</f:if>
</div>

<f:if condition="{3d}">
<f:else>
<div class="view-functions">
<f:if condition="{gp-pagegrid} == 1">
<f:else>
Loading