diff --git a/.github/workflows/npm-grunt.yml b/.github/workflows/npm-grunt.yml
index a07f907c2..b196966a9 100644
--- a/.github/workflows/npm-grunt.yml
+++ b/.github/workflows/npm-grunt.yml
@@ -1,5 +1,52 @@
name: GruntComparison
+on:
+ push:
+ branches: [ "master", "6.x-ocr" ]
+ pull_request:
+ branches: [ "master", "6.x-ocr" ]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ node-version: [12.x]
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v3
+ with:
+ node-version: ${{ matrix.node-version }}
+ cache: npm
+ cache-dependency-path: './Build/package-lock.json'
+
+ - name: Install and run Grunt
+ working-directory: ./Build
+ run: |
+ npm install -g grunt-cli
+ npm audit fix
+ echo "Running `grunt less`"
+ grunt less
+ echo "Running `grunt terser`"
+ grunt terser
+
+ - name: Test for changes
+ working-directory: ./
+ run: |
+ git diff -- ./Resources/Public/
+ if [ -n "$(git status --porcelain -- ./Resources/Public/)" ]; then
+ echo "Changes detected in compiled files"
+ exit 1
+ else
+ echo "No changes detected in compiled files"
+ fi
+name: GruntComparison
+
on:
push:
branches: [ "master" ]
diff --git a/Build/package.json b/Build/package.json
index cba94b755..0622eb332 100644
--- a/Build/package.json
+++ b/Build/package.json
@@ -9,7 +9,7 @@
},
"repository": {
"type": "git",
- "url": "git@github.com:slub/dfg-viewer.git"
+ "url": "git@github.com:csidirop/dfg-viewer.git"
},
"author": "Alexander Bigga",
"license": "GPL-3.0-or-later",
diff --git a/Resources/Private/JavaScript/dfgviewerScripts.js b/Resources/Private/JavaScript/dfgviewerScripts.js
index d14e4e8b2..c9c50bf66 100644
--- a/Resources/Private/JavaScript/dfgviewerScripts.js
+++ b/Resources/Private/JavaScript/dfgviewerScripts.js
@@ -1,4 +1,4 @@
-/*!
+ /*!
Custom scripts
------------------------
@@ -20,11 +20,20 @@ $(document).ready(function() {
// menu toggles for offcanvas toc and metadata
$('.offcanvas-toggle').on(mobileEvent, function(event) {
+ // close nav on link or download if opened
+ close_all_submenus();
+
$(this).parent().toggleClass('open');
});
// active toggle for submenus
$('.document-functions li.submenu > a').on(mobileEvent, function(event) {
+ // close nav on link or download if opened
+ close_all_submenus('in-secondary-nav');
+
+ // close secondary nav if click on link or download
+ $('nav .secondary-nav').removeClass('open');
+
$('li.submenu.open a').not(this).parent().removeClass('open');
$(this).parent().toggleClass('open');
return false;
@@ -34,8 +43,18 @@ $(document).ready(function() {
$('nav .nav-toggle').on(mobileEvent, function(event) {
$(this).toggleClass('active');
$('nav .viewer-nav').toggleClass('open');
+
+ // close subnav if primary nav if opened
+ close_all_submenus('in-primary-nav');
+
+ });
+ // active toggle for subsubmenus
+ $('.document-functions li.subsubmenu > a').on(mobileEvent, function(event) {
+ $(this).parent().toggleClass('open');
+ return false;
});
+
// calendar dropdowns
$('.calendar-view .contains-issues').on(mobileEvent, function(event) {
$('.calendar-view table td.open').not($(this).parent()).removeClass('open');
@@ -104,6 +123,7 @@ $(document).ready(function() {
// enable click on fullscreen button
$('a.fullscreen').on(mobileEvent, function() {
+ close_all_submenus('all');
if($('body.fullscreen')[0]) {
exitFullscreen();
} else {
@@ -164,10 +184,80 @@ $(document).ready(function() {
$('body').removeClass('static');
}, 1000);
+ // Closing open menus in different situations
+ $('.tx-dlf-tools-imagetools').on('click', function (event) {
+ close_all_submenus('all');
+ });
+ $('.page-control').on('click', function (event) {
+ close_all_submenus('all');
+ });
+ $('.tx-dlf-map').on('click', function (event) {
+ close_all_submenus('all');
+ });
+
+ // Parse OCR options submenu
+ function parseOcrMenu() {
+ let lang = $('html').attr('lang').substr(0,2);
+ let ulid = $('#ocr-engine');
+ let enginesData = JSON.parse(Cookies.get('tx-dlf-ocrEngines')).ocrEngines;
+ /* Expected scheme:
+ {
+ "menu":[
+ {"name": "Tesseract", "de": "Tesseract", "en": "Tesseract", "class": "tesseract", "data": "tesseract-basic"
+ },
+ {"name": "Tess", "de": "Tess (de)", "en": "Tess (en)", "class": "tess", "data": "tess-basic"
+ }
+ ]}
+ */
+
+ // get cookie for ocrEngine
+ let ocrEngine = Cookies.get('tx-dlf-ocrEngine');
+ let active = '';
+
+ // Set listelement for remote fulltext (independent of the OCR engines):
+ if (Cookies.get('tx-dlf-ocr-remotepresent') === "Y") { // only if remote fulltext is present
+ active = ((ocrEngine === "originalremote") ? ' active' : ''); // set class active if this remote is active
+
+ // Build element:
+ $(ulid).append('
Original fulltext ');
+ $(ulid).append('
'); // Add a dividing line
+
+ if (active.length != 0) {
+ $('.ocr-create').addClass('disabled-item'); // deactivte OCR buttons
+ }
+
+ // add class active to subelement, store info in cookie and deactivate OCR buttons:
+ $('#ocr-on-demand-id-originalremote').on(mobileEvent, function(event) {
+ $('.subli a').removeClass('active');
+ $(this).addClass('active');
+ Cookies.set('tx-dlf-ocrEngine', "originalremote", { sameSite: 'lax' }); // store in cookie
+ $('.ocr-create').addClass('disabled-item');
+ });
+ }
+
+ // Set all other listelements (depending on the OCR engines):
+ for (let i=0; i'
+ + ''
+ + enginesData[i][lang] + '');
+
+ // add class active to subelement, store selected engine in cookie and reactivate OCR buttons:
+ $('#ocr-on-demand-id-' + enginesData[i].data).on(mobileEvent, function(event) {
+ $('.subli a').removeClass('active');
+ $(this).addClass('active');
+ Cookies.set('tx-dlf-ocrEngine', this.dataset.engine, { sameSite: 'lax' }); // store in cookie
+ $('.ocr-create').removeClass('disabled-item');
+ });
+ }
+ }
+ parseOcrMenu();
});
$(document).keyup(function(e) {
-
// Check if ESC key is pressed. Then end fullscreen mode or close SRU form.
if (e.keyCode == 27) {
if($('body.fullscreen')[0]) {
@@ -181,7 +271,6 @@ $(document).keyup(function(e) {
if (e.keyCode == 70 && !$('#tx-dfgviewer-sru-query').is(':focus')) {
return enterFullscreen();
}
-
});
// Activate fullscreen mode and set corresponding cookie
@@ -202,8 +291,21 @@ function exitFullscreen() {
// hide warning about outdated browser and save decision to cookie
function hideBrowserAlert(){
-
$('#browser-hint').addClass('hidden');
Cookies.set('tx-dlf-pageview-hidebrowseralert', 'true', { sameSite: 'lax' });
+}
+// Auto close submenus when other menus are opened
+function close_all_submenus(environment = '') {
+ // close nav on link or download if opened
+ if (environment !== 'in-secondary-nav') {
+ // Not with in-secondary-nav otherwise menus can no longer be closed
+ $('li.submenu.open a').parent().removeClass('open');
+ };
+ if ((environment === 'in-secondary-nav') || (environment === 'all') ) {
+ // close subnav if opend
+ $('nav .nav-toggle').removeClass('active');
+ $('nav .secondary-nav').removeClass('open');
+ $('nav ul.viewer-nav').removeClass('open');
+ };
}
diff --git a/Resources/Private/Language/de.locallang.xlf b/Resources/Private/Language/de.locallang.xlf
index 429beaffe..24497391e 100644
--- a/Resources/Private/Language/de.locallang.xlf
+++ b/Resources/Private/Language/de.locallang.xlf
@@ -45,6 +45,14 @@
+
+
+
+
+
+
+
+
diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf
index 94a1251b4..e1e96773f 100644
--- a/Resources/Private/Language/locallang.xlf
+++ b/Resources/Private/Language/locallang.xlf
@@ -26,6 +26,12 @@
+
+
+
+
+
+
@@ -35,6 +41,12 @@
+
+
+
+
+
+
diff --git a/Resources/Private/Less/components/controls.less b/Resources/Private/Less/components/controls.less
index 4d9ce562d..ac3ba3d18 100644
--- a/Resources/Private/Less/components/controls.less
+++ b/Resources/Private/Less/components/controls.less
@@ -174,16 +174,72 @@
}
}
}
+ &.links {
+ > a, > span {
+ background-position: 0px 0;
+ }
+ }
&.downloads {
> a, > span {
background-position: -40px 0;
}
}
&.fulltext {
+ span.fulltext {
+ 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: " ";
+ }
+ }
+ }
> a, > span {
background-position: -120px 0;
}
}
+ &.ocr-on-demand {
+ > a, > span {
+ background: #fff url("../Images/PageOCR.svg") no-repeat 0 0 !important;
+ }
+ > ul {
+ li {
+ &.ocr-page {
+ a, span {
+ &:before {
+ background: url('../Images/PageOCR-white.svg') no-repeat 0 0 !important;
+ }
+ }
+ &.disabled-item {
+ a {
+ opacity: 0.4; /* 40% opacity */
+ cursor: not-allowed; /* Show not-allowed cursor */
+ }
+ }
+ }
+ &.ocr-book {
+ a, span {
+ &:before {
+ background: url('../Images/BookOCR-white.svg') no-repeat 0 0 !important;
+ }
+ }
+ &.disabled-item {
+ a {
+ opacity: 0.4; /* 40% opacity */
+ cursor: not-allowed; /* Show not-allowed cursor */
+ }
+ }
+ }
+ }
+ }
+ }
&.doublepage {
display: none;
> a, > span {
@@ -226,24 +282,6 @@
}
}
}
- &.fulltext {
- span.fulltext {
- 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;
@@ -322,6 +360,138 @@
}
}
+/* ==============[ OCR-on-Demand Settings Submenu ]===================== */
+.subsubmenu.ocr-on-demand-sub {
+ > a {
+ ocr-menu {
+ &:before {
+ padding-right: 30px;
+ background: url('../Images/OCR-Options-white.svg') no-repeat 0 0;
+ }
+ }
+
+ &:after {
+ content: "+";
+ margin-left: 8px;
+ position: absolute;
+ right: 10px;
+ left: auto;
+ }
+ }
+
+ &.open {
+ > a:after {
+ content: "⌄";
+ }
+ }
+
+ ul.subunter {
+ position: absolute;
+ //left: 104%; // outside main box
+ left: 90%; // overlap with main box
+ right: auto;
+ background: fade(@base-blue,90%);
+ display: none;
+ top: auto;
+ }
+
+ &.open {
+ ul.subunter {
+ display: list-item;
+ }
+ }
+
+ #ocr-engine {
+ margin-right: 0;
+ padding-right: 0;
+ overflow-x: hidden;
+ overflow-y: auto;
+
+ li.subli {
+ width: 100%;
+ margin-right: 30px;
+
+ a {
+ width: 100%;
+
+ // OCR-Engine Icons:
+ &.originalremote {
+ .ocr-engine-setup('../Images/OCR-FT-remote-white.svg');
+ }
+ &.tesseract {
+ .ocr-engine-setup('../Images/OCR-Engines-Tesseract-white.svg');
+ }
+ &.OCRD {
+ .ocr-engine-setup('../Images/OCR-Engines-OCRD-white.svg');
+ }
+ &.kraken {
+ .ocr-engine-setup('../Images/OCR-Engines-Kraken-white.svg');
+ }
+
+ // OCR-Engine states:
+ &.active {
+ i.checks {
+ margin-left: 10px;
+
+ &:before {
+ position: absolute;
+ top: 0;
+ left: auto;
+ right: 0;
+ width: 40px;
+ height: 40px;
+ content: '';
+ background: url('../Images/checks.svg') no-repeat 0 0;
+ }
+ }
+ }
+
+ &.present::before {
+ position: absolute;
+ top: 2px;
+ left: 4px;
+ width: 8px;
+ height: 8px;
+ border-radius: 8px;
+ border: 2px solid #fff;
+ background: @okay-green;
+ display: block;
+ content: " ";
+ }
+
+ &.present:hover::after {
+ content: "Fulltext available";
+ position: absolute;
+ z-index: 1;
+ top: -12px;
+ left: 16px;
+ background-color: transparent;
+ padding-right: 5px;
+ padding-left: 5px;
+ border-radius: 261px;
+ color: @okay-green;
+ text-shadow:
+ -1px -1px 0 @base-blue, /* top-left */
+ 1px -1px 0 @base-blue, /* top-right */
+ -1px 1px 0 @base-blue, /* bottom-left */
+ 1px 1px 0 @base-blue; /* bottom-right */
+ }
+ }
+ }
+
+ // function for setting all ocr settings:
+ .ocr-engine-setup(@bgImage) {
+ background: url(@bgImage) no-repeat 0 0;
+ &:hover{
+ background-color: rgba(255,255,255,0.2);
+ }
+ &::before{ // overwrite parent
+ background: none;
+ }
+ }
+ }
+}
+
/* ==============[ view functions for zoom, rotate and other view related functions ]===== */
.view-functions {
ul {
diff --git a/Resources/Private/Less/modules/fulltext.less b/Resources/Private/Less/modules/fulltext.less
index 3add201ce..c1bfb72d5 100644
--- a/Resources/Private/Less/modules/fulltext.less
+++ b/Resources/Private/Less/modules/fulltext.less
@@ -47,7 +47,9 @@
padding: 0;
}
.textline {
+ display: block;
&:after {
+ display: block;
content: " ";
}
}
diff --git a/Resources/Private/Less/website/content.less b/Resources/Private/Less/website/content.less
index e18ae1783..53b1f680e 100644
--- a/Resources/Private/Less/website/content.less
+++ b/Resources/Private/Less/website/content.less
@@ -7,7 +7,7 @@
*
*/
-.website {
+ .website {
.page-container {
text-align: left;
line-height: 1.7;
@@ -127,6 +127,7 @@
border: 1px solid @light-blue;
border-width: 1px 0;
padding: 20px 0;
+ padding-top: 0px;
margin: 50px 0;
br {
display: none;
@@ -169,7 +170,7 @@
outline: 0 none;
}
}
- input[type="submit"], button[type="submit"], button[type="button"] {
+ input[type="submit"], button[type="submit"], button[type="button"], input[type="reset"], button[type="reset"] {
position: relative;
width: 100%;
margin-top: 20px;
@@ -214,10 +215,15 @@
padding: 0 150px;
form {
margin: 70px 0;
+ margin-top: 30px;
input[type="submit"], button[type="submit"] {
width: 32%;
float: right;
}
+ input[type="reset"], button[type="reset"] {
+ width: 32%;
+ float: left;
+ }
button[type="button"] {
width: 32%;
float: left;
diff --git a/Resources/Private/Less/website/home.less b/Resources/Private/Less/website/home.less
index 3f3446468..f75f35c27 100644
--- a/Resources/Private/Less/website/home.less
+++ b/Resources/Private/Less/website/home.less
@@ -183,8 +183,11 @@
}
}
@media screen and (min-width: @tabletViewportWidth) {
+ .header {
+ padding-top: 140px;
+ }
.header-image {
- height: 340px;
+ height: 140px;
&:after {
background-size: 50% auto;
}
@@ -200,8 +203,11 @@
}
}
@media screen and (min-width: @desktopViewportWidth) {
+ .header {
+ padding-top: 220px;
+ }
.header-image {
- height: 440px;
+ height: 220px;
}
.frame-layout-101 {
position: relative;
diff --git a/Resources/Private/Partials/ControlBar.html b/Resources/Private/Partials/ControlBar.html
index b08cb06bf..861b5830d 100644
--- a/Resources/Private/Partials/ControlBar.html
+++ b/Resources/Private/Partials/ControlBar.html
@@ -5,7 +5,7 @@
');if(e.error){$("",{class:"noresult",text:$("#tx-dfgviewer-sru-label-noresult").text()}).appendTo(n)}else{for(var i=0;i").append($("",{href:l,text:e[i].previewImage})).appendTo(n)}if(e[i].previewText){$("").append($("",{href:l,text:e[i].previewText})).appendTo(n)}}if(t.length===0){$("",{class:"noresult",text:$("#tx-dfgviewer-sru-label-noresult").text()}).appendTo(n)}}$("#tx-dfgviewer-sru-results").empty().append(n)}),"json").done((function(e){$("#tx-dfgviewer-sru-results-loading").hide();$("#tx-dfgviewer-sru-results-clearing").show()}))}));$("#tx-dfgviewer-sru-results-clearing").click((function(){$("#tx-dfgviewer-sru-results ul").remove();$(".sru-results-active-indicator").remove();$("#tx-dfgviewer-sru-query").val("")}))}));
/*!
Custom scripts
@@ -8,4 +8,4 @@
DFG viewer script for cookies, sidebar adaption eg.
!*/
-$(document).ready((function(){function e(){var e=false;(function(t){if(/(android|ipad|playbook|silk|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))e=true})(navigator.userAgent||navigator.vendor||window.opera);return e}var t=e()?"touchend":"click";$(".offcanvas-toggle").on(t,(function(e){$(this).parent().toggleClass("open")}));$(".document-functions li.submenu > a").on(t,(function(e){$("li.submenu.open a").not(this).parent().removeClass("open");$(this).parent().toggleClass("open");return false}));$("nav .nav-toggle").on(t,(function(e){$(this).toggleClass("active");$("nav .viewer-nav").toggleClass("open")}));$(".calendar-view .contains-issues").on(t,(function(e){$(".calendar-view table td.open").not($(this).parent()).removeClass("open");$(this).parent().toggleClass("open")}));$(".tx-dfgviewer-newspaper-calendar").parents("body").addClass("calendar");$(".tx-dfgviewer-newspaper-years").parents("body").addClass("calendar");$(".tx-dfgviewer-newspaper-calendar .calendar-list-selection a.select-calendar-view, .tx-dfgviewer-newspaper-calendar .calendar-view").addClass("active");$(".tx-dfgviewer-newspaper-calendar .calendar-list-selection a").on(t,(function(e){if(!$(this).hasClass("active")){var t="."+$(this).attr("class").replace("select-","");$(".tx-dfgviewer-newspaper-calendar .active").removeClass("active");$(this).addClass("active");$(t).addClass("active")}}));$(".provider img").each((function(){if(typeof this.naturalWidth!="undefined"&&this.naturalWidth==0||this.readyState=="uninitialized"){$(this).parents(".document-functions").addClass("missing-provider-image")}}));if($(".pages select option[selected]")[0]){const e=$(".pages select option[selected]").text();$("dl.mobile-meta").append('- No.
');$("dl.mobile-meta dd.mobile-page-number").text(e)}$(".provider").append('');$(".view-functions .pages form, .view-functions .zoom a.fullscreen, .fulltext-search-toggle").clone().appendTo(".provider .mobile-controls");shortenMobileMetaElement=$(".provider dl.mobile-meta dd.tx-dlf-title a");shortenMobileMetaTitle=shortenMobileMetaElement.text();if(shortenMobileMetaTitle.length>140){shortenMobileMetaTitle=shortenMobileMetaTitle.substr(0,140)+"...";shortenMobileMetaElement.text(shortenMobileMetaTitle)}if(!$(".submenu.downloads ul li")[0]){$("#tab-downloads").replaceWith((function(){return $("",{title:$(this).attr("title"),class:$(this).attr("class"),id:$(this).attr("id"),text:$(this).html()})}))}if(Cookies.get("tx-dlf-pageview-zoomFullscreen")==="true"){$("body").addClass("fullscreen static");$("a.fullscreen").addClass("active")}$("a.fullscreen").on(t,(function(){if($("body.fullscreen")[0]){exitFullscreen()}else{enterFullscreen()}}));if(Modernizr.touchevents){$(".fwds, .backs").on("touchstart",(function(){$(this).addClass("over");triggeredElement=$(this);setTimeout((function(){triggeredElement.addClass("enable-touchevent")}),250)})).on("touchend",(function(){localStorage.txDlfFromPage=$(this).attr("class").split(" ")[0]}));$("body").on("touchstart",(function(e){target=$(e.target);if(!target.closest(".page-control")[0]){$(".fwds, .backs").removeClass("over enable-touchevent");localStorage.clear()}}));if(localStorage.txDlfFromPage){$("."+localStorage.txDlfFromPage).addClass("no-transition over enable-touchevent");localStorage.clear()}}else{$(".fwds, .backs").on("mouseenter",(function(){$(this).addClass("over")})).on("mouseleave",(function(){$(this).removeClass("over")})).on("click",(function(){localStorage.txDlfFromPage=$(this).attr("class").split(" ")[0]}));if(localStorage.txDlfFromPage){$("."+localStorage.txDlfFromPage).addClass("no-transition over");localStorage.clear()}}if(Cookies.get("tx-dlf-pageview-hidebrowseralert")==="true"){$("#browser-hint").addClass("hidden")}setTimeout((function(){localStorage.clear();$(".fwds, .backs").removeClass("no-transition");$("body").removeClass("static")}),1e3)}));$(document).keyup((function(e){if(e.keyCode==27){if($("body.fullscreen")[0]){return exitFullscreen()}if($(".document-functions .search.open")[0]){$(".document-functions .search").removeClass("open")}}if(e.keyCode==70&&!$("#tx-dfgviewer-sru-query").is(":focus")){return enterFullscreen()}}));function enterFullscreen(){setTimeout((function(){window.dispatchEvent(new Event("resize"))}),220);$("body").addClass("fullscreen");$("a.fullscreen").addClass("active");Cookies.set("tx-dlf-pageview-zoomFullscreen","true",{sameSite:"lax"})}function exitFullscreen(){setTimeout((function(){window.dispatchEvent(new Event("resize"))}),220);$("body").removeClass("fullscreen");$("a.fullscreen").removeClass("active");Cookies.remove("tx-dlf-pageview-zoomFullscreen")}function hideBrowserAlert(){$("#browser-hint").addClass("hidden");Cookies.set("tx-dlf-pageview-hidebrowseralert","true",{sameSite:"lax"})}
\ No newline at end of file
+$(document).ready((function(){function e(){var e=false;(function(t){if(/(android|ipad|playbook|silk|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))e=true})(navigator.userAgent||navigator.vendor||window.opera);return e}var t=e()?"touchend":"click";$(".offcanvas-toggle").on(t,(function(e){close_all_submenus();$(this).parent().toggleClass("open")}));$(".document-functions li.submenu > a").on(t,(function(e){close_all_submenus("in-secondary-nav");$("nav .secondary-nav").removeClass("open");$("li.submenu.open a").not(this).parent().removeClass("open");$(this).parent().toggleClass("open");return false}));$("nav .nav-toggle").on(t,(function(e){$(this).toggleClass("active");$("nav .viewer-nav").toggleClass("open");close_all_submenus("in-primary-nav")}));$(".document-functions li.subsubmenu > a").on(t,(function(e){$(this).parent().toggleClass("open");return false}));$(".calendar-view .contains-issues").on(t,(function(e){$(".calendar-view table td.open").not($(this).parent()).removeClass("open");$(this).parent().toggleClass("open")}));$(".tx-dfgviewer-newspaper-calendar").parents("body").addClass("calendar");$(".tx-dfgviewer-newspaper-years").parents("body").addClass("calendar");$(".tx-dfgviewer-newspaper-calendar .calendar-list-selection a.select-calendar-view, .tx-dfgviewer-newspaper-calendar .calendar-view").addClass("active");$(".tx-dfgviewer-newspaper-calendar .calendar-list-selection a").on(t,(function(e){if(!$(this).hasClass("active")){var t="."+$(this).attr("class").replace("select-","");$(".tx-dfgviewer-newspaper-calendar .active").removeClass("active");$(this).addClass("active");$(t).addClass("active")}}));$(".provider img").each((function(){if(typeof this.naturalWidth!="undefined"&&this.naturalWidth==0||this.readyState=="uninitialized"){$(this).parents(".document-functions").addClass("missing-provider-image")}}));if($(".pages select option[selected]")[0]){const e=$(".pages select option[selected]").text();$("dl.mobile-meta").append('- No.
');$("dl.mobile-meta dd.mobile-page-number").text(e)}$(".provider").append('');$(".view-functions .pages form, .view-functions .zoom a.fullscreen, .fulltext-search-toggle").clone().appendTo(".provider .mobile-controls");shortenMobileMetaElement=$(".provider dl.mobile-meta dd.tx-dlf-title a");shortenMobileMetaTitle=shortenMobileMetaElement.text();if(shortenMobileMetaTitle.length>140){shortenMobileMetaTitle=shortenMobileMetaTitle.substr(0,140)+"...";shortenMobileMetaElement.text(shortenMobileMetaTitle)}if(!$(".submenu.downloads ul li")[0]){$("#tab-downloads").replaceWith((function(){return $("",{title:$(this).attr("title"),class:$(this).attr("class"),id:$(this).attr("id"),text:$(this).html()})}))}if(Cookies.get("tx-dlf-pageview-zoomFullscreen")==="true"){$("body").addClass("fullscreen static");$("a.fullscreen").addClass("active")}$("a.fullscreen").on(t,(function(){close_all_submenus("all");if($("body.fullscreen")[0]){exitFullscreen()}else{enterFullscreen()}}));if(Modernizr.touchevents){$(".fwds, .backs").on("touchstart",(function(){$(this).addClass("over");triggeredElement=$(this);setTimeout((function(){triggeredElement.addClass("enable-touchevent")}),250)})).on("touchend",(function(){localStorage.txDlfFromPage=$(this).attr("class").split(" ")[0]}));$("body").on("touchstart",(function(e){target=$(e.target);if(!target.closest(".page-control")[0]){$(".fwds, .backs").removeClass("over enable-touchevent");localStorage.clear()}}));if(localStorage.txDlfFromPage){$("."+localStorage.txDlfFromPage).addClass("no-transition over enable-touchevent");localStorage.clear()}}else{$(".fwds, .backs").on("mouseenter",(function(){$(this).addClass("over")})).on("mouseleave",(function(){$(this).removeClass("over")})).on("click",(function(){localStorage.txDlfFromPage=$(this).attr("class").split(" ")[0]}));if(localStorage.txDlfFromPage){$("."+localStorage.txDlfFromPage).addClass("no-transition over");localStorage.clear()}}if(Cookies.get("tx-dlf-pageview-hidebrowseralert")==="true"){$("#browser-hint").addClass("hidden")}setTimeout((function(){localStorage.clear();$(".fwds, .backs").removeClass("no-transition");$("body").removeClass("static")}),1e3);$(".tx-dlf-tools-imagetools").on("click",(function(e){close_all_submenus("all")}));$(".page-control").on("click",(function(e){close_all_submenus("all")}));$(".tx-dlf-map").on("click",(function(e){close_all_submenus("all")}));function n(){let e=$("html").attr("lang").substr(0,2);let n=$("#ocr-engine");let i=JSON.parse(Cookies.get("tx-dlf-ocrEngines")).ocrEngines;let o=Cookies.get("tx-dlf-ocrEngine");let r="";if(Cookies.get("tx-dlf-ocr-remotepresent")==="Y"){r=o==="originalremote"?" active":"";$(n).append('- Original fulltext
');$(n).append("
");if(r.length!=0){$(".ocr-create").addClass("disabled-item")}$("#ocr-on-demand-id-originalremote").on(t,(function(e){$(".subli a").removeClass("active");$(this).addClass("active");Cookies.set("tx-dlf-ocrEngine","originalremote",{sameSite:"lax"});$(".ocr-create").addClass("disabled-item")}))}for(let a=0;a'+''+i[a][e]+'');$("#ocr-on-demand-id-"+i[a].data).on(t,(function(e){$(".subli a").removeClass("active");$(this).addClass("active");Cookies.set("tx-dlf-ocrEngine",this.dataset.engine,{sameSite:"lax"});$(".ocr-create").removeClass("disabled-item")}))}}n()}));$(document).keyup((function(e){if(e.keyCode==27){if($("body.fullscreen")[0]){return exitFullscreen()}if($(".document-functions .search.open")[0]){$(".document-functions .search").removeClass("open")}}if(e.keyCode==70&&!$("#tx-dfgviewer-sru-query").is(":focus")){return enterFullscreen()}}));function enterFullscreen(){setTimeout((function(){window.dispatchEvent(new Event("resize"))}),220);$("body").addClass("fullscreen");$("a.fullscreen").addClass("active");Cookies.set("tx-dlf-pageview-zoomFullscreen","true",{sameSite:"lax"})}function exitFullscreen(){setTimeout((function(){window.dispatchEvent(new Event("resize"))}),220);$("body").removeClass("fullscreen");$("a.fullscreen").removeClass("active");Cookies.remove("tx-dlf-pageview-zoomFullscreen")}function hideBrowserAlert(){$("#browser-hint").addClass("hidden");Cookies.set("tx-dlf-pageview-hidebrowseralert","true",{sameSite:"lax"})}function close_all_submenus(e=""){if(e!=="in-secondary-nav"){$("li.submenu.open a").parent().removeClass("open")}if(e==="in-secondary-nav"||e==="all"){$("nav .nav-toggle").removeClass("active");$("nav .secondary-nav").removeClass("open");$("nav ul.viewer-nav").removeClass("open")}}
\ No newline at end of file
diff --git a/composer.json b/composer.json
index ff2f5afbc..b9e782873 100644
--- a/composer.json
+++ b/composer.json
@@ -1,8 +1,8 @@
{
- "name": "slub/dfgviewer",
+ "name": "ub-mannheim/dfgviewer",
"type": "typo3-cms-extension",
- "description": "Remote resources navigator for digital libraries. Reads METS/MODS and METS/TEI via OAI-PMH.",
- "homepage": "https://github.com/slub/dfg-viewer",
+ "description": "Remote resources navigator for digital libraries. Reads METS/MODS and METS/TEI via OAI-PMH..",
+ "homepage": "https://github.com/UB-Mannheim/dfg-viewer",
"keywords": [
"TYPO3",
"extension",
@@ -33,13 +33,19 @@
"name": "Erik Konrad",
"email": "typo3@slub-dresden.de",
"role": "Developer"
+ },
+ {
+ "name": "Christos Sidiropoulos",
+ "email": "christos.sidiropoulos@uni-mannheim.de",
+ "homepage": "https://www.bib.uni-mannheim.de",
+ "role": "Developer"
}
],
"license": "GPL-3.0-or-later",
"require": {
"typo3/cms-core": "^10.4.36|^11.5.30",
- "kitodo/presentation": "^4.0|dev-master",
- "slub/slub-digitalcollections": "^3.0|dev-master"
+ "ub-mannheim/presentation": "dev-4.x-ocr#f0ec63620642601ca77cdd33552908452eaed17e",
+ "ub-mannheim/ubma-digitalcollections": "dev-slubmaster#9618b46518ad6dd7786afe28db91814e70baf275"
},
"autoload": {
"psr-4": {
diff --git a/ext_emconf.php b/ext_emconf.php
index c19753cee..b6d5ddfb5 100644
--- a/ext_emconf.php
+++ b/ext_emconf.php
@@ -23,27 +23,27 @@
***************************************************************/
$EM_CONF[$_EXTKEY] = [
- 'title' => 'DFG Viewer',
+ 'title' => 'DFG Viewer - OCR-On-Demand',
'description' => 'Remote resources navigator for digital libraries. Reads METS/MODS and METS/TEI via OAI-PMH.',
'category' => 'distribution',
- 'author' => 'Sebastian Meyer',
- 'author_email' => 'typo3@slub-dresden.de',
- 'author_company' => 'Saxon State and University Library Dresden (SLUB)',
+ 'author' => 'Christos Sidiropoulos',
+ 'author_email' => 'christos.sidiropoulos@uni-mannheim.de',
+ 'author_company' => 'Universitätsbibliothek Mannheim',
'shy' => '',
'priority' => '',
'module' => '',
- 'state' => 'stable',
+ 'state' => 'dev',
'internal' => '',
'uploadfolder' => false,
'createDirs' => '',
'modify_tables' => '',
'clearCacheOnLoad' => false,
'lockType' => '',
- 'version' => '6.0.0',
+ 'version' => '6.0.0-ocr',
'constraints' => [
'depends' => [
'typo3' => '9.5.0-10.4.99',
- 'dlf' => '3.3.4-',
+ 'dlf' => '3.3.4-ocr',
],
'conflicts' => [
],