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

Support for musical sources (and prototype annotations) #230

Merged
merged 59 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
0bbb959
Verovio Integration
May 25, 2022
26a1143
Add full texts features
hizclick Aug 18, 2022
dd52acc
Styles for score rendering
roewenstrunk Jan 20, 2023
375cd12
Add features for measures to pagecontrol.
haogatyp Apr 27, 2023
70c33b2
Use annotation plugin.
haogatyp Jun 18, 2023
89d0cdb
Add multiview parameter and hide information to have more space
chrizzor Jul 14, 2023
75fd343
Add gridstack html and page/measure navigation to pageview template
chrizzor Jul 14, 2023
ef9146a
CSS update: score, svg hover and drag styling for gridstack item
chrizzor Jul 14, 2023
0bae391
Merge pull request #231 from effective-webwork/Full-text-features-main
sebastian-meyer Sep 14, 2023
1b7e1b0
Hotfixes 16.10.
sebastian-meyer Oct 16, 2023
70eaab7
Merge pull request #1 from sebastian-meyer/Full-text-features-main
sebastian-meyer Oct 16, 2023
8233bd1
Change position of gridstack item navigation
chrizzor Oct 24, 2023
a4cf372
Show gridstack if more than one document is given
chrizzor Oct 24, 2023
bcd9fa7
Merge pull request #9 from effective-webwork/Full-text-features-main
sebastian-meyer Nov 14, 2023
800917d
Add controlbar in multiview
chrizzor Feb 9, 2024
91fb54b
Fix multiview global navigation
chrizzor Feb 9, 2024
dfc63c5
remove empty gridstack item
chrizzor Feb 9, 2024
0cd7f71
Add scoretool for each gridstack item
chrizzor Feb 12, 2024
0ee231a
Merge branch 'project-musical-sources' into Full-text-features-main
sebastian-meyer Feb 14, 2024
1ee05a6
Merge pull request #19 from opencultureconsulting/Full-text-features-…
sebastian-meyer Feb 14, 2024
3122d48
Merge pull request #1 from sebastian-meyer/project-musical-sources
chrizzor Feb 15, 2024
245c4d0
Add map counter on single view
chrizzor Feb 15, 2024
d9cfbd1
Fix dfg-viewer-map elementId
chrizzor Feb 16, 2024
62a3b59
Minor adjustments to the score.less file
gnuj Feb 29, 2024
8e8ce0a
Add new icons and improve sprite integration
gnuj Mar 6, 2024
4ca5b99
Add midi player styling and its toggle functions
gnuj Mar 6, 2024
a216799
Enhance zoom and player for score view
gnuj Mar 6, 2024
82f585c
Make score icon also available to inactive state
gnuj Mar 7, 2024
77b96fe
Aligning hover and active states for the measures
gnuj Mar 7, 2024
79144a3
Add styling and functions for measure navigation
gnuj Mar 7, 2024
d6a9565
Minor LESS fix for th UI of the score button
gnuj Mar 8, 2024
4365d40
Add button styling and icon for sync view function
gnuj Mar 8, 2024
5c7d76f
Final UI adjustments for the new music UI
gnuj Mar 8, 2024
0316f57
Merge pull request #2 from gnuj/add-music-ui
chrizzor Mar 12, 2024
1bebda7
Template remove button
chrizzor Mar 15, 2024
a127598
Change min width and height for gridstack items
chrizzor Mar 15, 2024
59b0499
remove min height and width per gridstack item and add class "removeD…
chrizzor Mar 15, 2024
b544eb5
Improve HTML markup for the multi view
gnuj Apr 10, 2024
bde9c4d
Update markup for multi view and add some icons
gnuj Apr 15, 2024
70979b3
Add complex styling for multiview
gnuj Apr 15, 2024
93ac98f
Add some title attributes on multiview elements
gnuj Apr 16, 2024
d9e543a
Some minor UI consolidation for multiview
gnuj Apr 16, 2024
7f82aed
Add styling and JS functions for new sidebar
gnuj Apr 18, 2024
ceeb23c
Insert skeleton markup for new control bar
gnuj Apr 18, 2024
f1f4fee
Merge pull request #3 from gnuj/add-grid-ui
chrizzor Apr 19, 2024
46ac335
Merge branch 'Full-text-features-main' into improve-sidebar
gnuj Apr 19, 2024
ede5781
Merge pull request #4 from gnuj/improve-sidebar
chrizzor Apr 19, 2024
2fda4d4
Update ControlBar.html
sebastian-meyer May 6, 2024
a0656f7
Merge pull request #5 from sebastian-meyer/patch-1
chrizzor May 7, 2024
db6fedf
Improve NPM config to avoid terser crashes
gnuj May 17, 2024
157e2bb
Add new meta data toggle function and appearance
gnuj May 17, 2024
429653b
Merge pull request #6 from gnuj/metadata-ui-fixes
chrizzor May 22, 2024
18c2c29
Show spinner on page or measure browsing
chrizzor Jun 11, 2024
b222013
Merge branch 'slub_master' into Full-text-features-main
chrizzor Jun 18, 2024
8696461
Merge branch 'master' into Full-text-features-main
chrizzor Jul 8, 2024
d6867aa
Apply suggestions from code review
chrizzor Jul 9, 2024
1575a47
Codacy fix
chrizzor Jul 10, 2024
8ad49d1
Merge branch 'Full-text-features-main' of github.com:effective-webwor…
chrizzor Jul 10, 2024
96656ff
Apply suggestions from code review
chrizzor Jul 10, 2024
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
472 changes: 256 additions & 216 deletions Build/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Classes/Controller/UriController.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class UriController extends \Kitodo\Dlf\Controller\AbstractController
public function mainAction()
{
// Load current document.

$this->loadDocument($this->requestData);

if ($this->document === null) {
Expand Down
2 changes: 1 addition & 1 deletion Configuration/TypoScript/Config/config.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ config {
removeDefaultJS = 1

# concatenate all Javascript files by default
concatenateJs = 1
concatenateJs = 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be changed.

# concatenate all CSS files by default
concatenateCss = 1

Expand Down
1 change: 1 addition & 0 deletions Configuration/TypoScript/Page/header.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ page {
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
annotations = EXT:dfgviewer/Resources/Public/Css/annotationStyles.css
}
includeJSFooterlibs {
jQuery = EXT:dfgviewer/Resources/Public/JavaScript/jQuery/jquery-3.6.0.min.js
Expand Down
3 changes: 3 additions & 0 deletions Configuration/TypoScript/Page/page.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ page {

gp-pagegrid = TEXT
gp-pagegrid.data = GP:tx_dlf|pagegrid

gp-multiview = TEXT
gp-multiview.data = GP:tx_dlf|multiview
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions Configuration/TypoScript/Plugins/dfgviewer.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ plugin.tx_dfgviewer_newspaperyears {
}
}

plugin.tx_dlf_annotation < tt_content.list.20.dlf_annotation
plugin.tx_dlf_annotation {
settings {
}
}

plugin.tx_dfgviewer_newspapercalendar < tt_content.list.20.dlf_calendar
plugin.tx_dfgviewer_newspapercalendar {
switchableControllerActions {
Expand Down
9 changes: 8 additions & 1 deletion Configuration/TypoScript/Plugins/kitodo.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ lib.kitodo.navigation.pagecontrol < tt_content.list.20.dlf_navigation
lib.kitodo.navigation.pagecontrol {
settings {
pageStep = 10
features = pageFirst,pageBack,pageStepBack,pageForward,pageStepForward,pageLast
features = measureBack,measureForward,pageFirst,pageBack,pageStepBack,pageForward,pageStepForward,pageLast
}
}

Expand Down Expand Up @@ -168,6 +168,13 @@ plugin.tx_dlf_fulltexttool {
}
}

plugin.tx_dlf_scoretool < plugin.tx_dlf_toolbox
plugin.tx_dlf_scoretool {
settings {
tools = scoretool
}
}

plugin.tx_dlf_imagemanipulationtool < plugin.tx_dlf_toolbox
plugin.tx_dlf_imagemanipulationtool {
settings {
Expand Down
13 changes: 11 additions & 2 deletions Resources/Private/Layouts/KitodoPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,18 @@
/>

<div class="main-wrapper">
<f:render section="ControlBar" partial="ControlBar" arguments="{_all}" />
<f:if condition="{gp-multiview}">
<f:then>
<f:render section="PageView" partial="PageView" arguments="{_all}" />
</f:then>
<f:else>
<f:render section="ControlBar" partial="ControlBar" arguments="{_all}" />

<f:render section="PageView" partial="PageView" arguments="{_all}" />
<f:render section="PageView" partial="PageView" arguments="{_all}" />

<f:render section="AnnotationBar" partial="AnnotationsBar" arguments="{_all}" />
</f:else>
</f:if>
</div>

<f:comment><!-- Old browsers (IE11) will show the browser hint as the nomodule attribute is not understood. --></f:comment>
Expand Down
3 changes: 2 additions & 1 deletion Resources/Private/Less/all.less
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@

// Modules
@import "modules/fulltext.less";
@import "modules/score.less";
@import "modules/gridview.less";
@import "modules/sidebar.less";

// EOF
// EOF
23 changes: 23 additions & 0 deletions Resources/Private/Less/components/controls.less
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@
background-position: -120px 0;
}
}
&.score {
> a, > span {
background-position: -120px 0;
}
}
&.doublepage {
display: none;
> a, > span {
Expand Down Expand Up @@ -228,6 +233,24 @@
}
}
}
&.score {
span.score {
a.select {
&.active:before {
position: absolute;
top: 2px;
right: 0px;
width: 8px;
height: 8px;
border-radius: 8px;
border: 2px solid #fff;
background: @okay-green;
display: block;
content: " ";
}
}
}
}
&.grid {
> a, > span {
background-position: -160px 0;
Expand Down
13 changes: 13 additions & 0 deletions Resources/Private/Less/modules/fulltext.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
bottom: 0;
background: #fff;
text-align: left;

display: none;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fulltext can't be hidden. It breaks one of the main functionalities of DFG Viewer!


&:has(> .score-visible) {
display: block;
width: 50%;
}

&:before, &:after {
position: absolute;
right: 0;
Expand Down Expand Up @@ -46,6 +54,7 @@
line-height: 1.6em;
font-size: 16px;
color: @font-grey;
display: none;
&:empty {
padding: 0;
}
Expand All @@ -60,10 +69,14 @@
.sp {
word-spacing: -4px;
}
.fulltext-visible & {
display: block;
}
}
@media screen and (min-width: @tabletLandscapeViewportWidth) {
top: 0;
max-width: 50%;
width: 50%;
&:before {
height: 100px;
.vertgrad(rgba(255,255,255,1), rgba(255,255,255,0),60%,100%);
Expand Down
111 changes: 111 additions & 0 deletions Resources/Private/Less/modules/score.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
/*
*
* Score
* ================================================
* Specials for the Score view
*
* Author: Thomas Jung <thomas@tjwd.de>
* License: All rights reserved
sebastian-meyer marked this conversation as resolved.
Show resolved Hide resolved
*
*/

.score-container {
position: absolute;
top: 60px;
right: 0;
bottom: 0;
background: #fff;
text-align: left;
display: none;

&:has(> .score-visible) {
display: block;
width: 50%;
}

&:before, &:after {
position: absolute;
right: 0;
left: 0;
content: " ";
z-index: 1;
}
&:before {
top: 0;
height: 60px;
.vertgrad(rgba(255,255,255,1), rgba(255,255,255,0),40%,100%);
}
&:after {
bottom: 0;
height: 120px;
.vertgrad(rgba(255,255,255,0), rgba(255,255,255,1),0,40%);
}

*[id^="tx-dlf-score"] {
position: relative;
top: 0;
right: 0;
width: 100%;
height: 100%;
padding: 60px 20px;
overflow: hidden;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
line-height: 1.6em;
font-size: 16px;
color: @font-grey;
&:empty {
padding: 0;
}
.textline {
&:after {
content: " ";
}
}
.string {
padding-right: 4px;
}
.sp {
word-spacing: -4px;
}
.score-visible & {
display: block;
}
}
@media screen and (min-width: @tabletLandscapeViewportWidth) {
top: 0;
max-width: 50%;

&:before {
height: 100px;
.vertgrad(rgba(255,255,255,1), rgba(255,255,255,0),60%,100%);
}
&:after {
height: 80px;
.vertgrad(rgba(255,255,255,0), rgba(255,255,255,1),0,80%);
}
#tx-dlf-score {
padding: 90px 80px 30px 30px;
line-height: 1.8;
.textline {
&.highlight {
background: lighten(@light-blue,10%);
}
}
}
}

}
/*
@media only screen and (min-width: 1024px) {
#tx-dlf-score {
width: 100%;
height: 80%;
overflow: scroll;
padding-right: 20%;
margin-top: 25%;
}
}

*/
// EOF
11 changes: 11 additions & 0 deletions Resources/Private/Partials/AnnotationsBar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
data-namespace-typo3-fluid="true"
lang="en">

<f:section name="AnnotationBar">
<div class="annotation-bar">
<f:cObject typoscriptObjectPath="plugin.tx_dlf_annotation" />
</div>
</f:section>

</html>
31 changes: 30 additions & 1 deletion Resources/Private/Partials/PageView.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ <h2>
<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" />
<div class="fulltext-container">
<div id="tx-dlf-fulltextselection"></div>
</div>
<f:comment>
<div class="score-container">
<div id="tx-dlf-score"></div>
</div>
<div id="player"></div>
</f:comment>
</f:else>
</f:if>
</f:else>
Expand Down Expand Up @@ -255,6 +266,24 @@ <h2>
</f:if>
</li>
</f:if>
<f:if condition="{dc:xpath(xpath:'(//mets:fileSec/mets:fileGrp[@USE=\'SCORE\']/mets:file[1]/mets:FLocat/@xlink:href)[1]')}">
<li class="score">
<f:if condition="{gp-double} == 1">
<f:then>
</f:then>
<f:else>
<f:if condition="{gp-pagegrid} == 1">
<f:then>
<span class="select switchoff" id="tx-dlf-tools-score" title="{f:translate(key:'score.no_score_gridpage', extensionName:'dfgviewer')}"><f:translate key='score.no_score_gridpage' extensionName='dfgviewer' /></span>
</f:then>
<f:else>
<f:cObject typoscriptObjectPath="plugin.tx_dlf_scoretool" />
</f:else>
</f:if>
</f:else>
</f:if>
</li>
</f:if>
<li class="grid">
<f:if
condition="{dc:xpath(xpath:'(//mets:fileSec/mets:fileGrp[@USE=\'THUMBS\']/mets:file[1]/mets:FLocat/@xlink:href)[1]')}">
Expand Down Expand Up @@ -318,4 +347,4 @@ <h2>
</div>
</f:section>

</html>
</html>
21 changes: 21 additions & 0 deletions Resources/Private/Plugins/Dfgviewer/Sru.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- ###TEMPLATE### begin -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not even sure what has happend here...

<div class="sru-searchfield">
<form id="tx-dfgviewer-sru-form" action="###ACTION_URL###" method="post">
<label for="tx-dfgviewer-sru-query">###LABEL_QUERY###</label>
<!-- Never change the @id of this input field! Otherwise search suggestions won't work! -->
<input type="text" id="tx-dfgviewer-sru-query" name="###FIELD_QUERY###" value="###QUERY###" placeholder="###LABEL_QUERY###" />
<input type="submit" value="call demo" />
<input type="hidden" name="tx_dfgviewer[L]" value="###LANG_ID###" />
<input type="hidden" name="tx_dfgviewer[sru]" value="###SRU_URL###" />
<input type="hidden" name="tx_dfgviewer[id]" value="###CURRENT_DOCUMENT###" />
<input type="hidden" name="tx_dfgviewer[action]" value="###ACTION_URL###" />
</form>
<!-- The following element is needed for the result list -->
<div id="tx-dfgviewer-sru-results-loading" style="display: none;">###LABEL_LOADING###...</div>
<div id="tx-dfgviewer-sru-results-clearing">###LABEL_DELETE_SEARCH###...</div>
<div id="tx-dfgviewer-sru-results"></div>
<div id="tx-dfgviewer-sru-labels" style="display:none;">
<span id="tx-dfgviewer-sru-label-noresult">###LABEL_NORESULT###</span>
</div>
</div>
<!-- ###TEMPLATE### end -->
Loading