Commit 184ee833 authored by barth23's avatar barth23
Browse files

Merge commit 'd63735d6'

* commit 'd63735d6':
  switch back docker image
  change sade docker image
  update exist source / change test-stage to java 11
  add tei caching to post-install
  see #293
  see #295
  see #294, #295, #296, #297
  see #291, #292, #293
parents ec30af3e d63735d6
xquery version "3.1";
import module namespace transformXML="https://sade.textgrid.de/ns/transform" at "../modules/architrave/transform.xqm";
import module namespace elastic="http://elastic.io" at "../modules/elastic.xqm";
let $r := elastic:setup()
return $r
let $c := transformXML:cacheAllEditions()
let $i := elastic:setup()
let $r := elastic:refresh()
return $r
\ No newline at end of file
......@@ -219,7 +219,31 @@ declare function transformXML:importFromTGRep($tgURI as xs:string, $filenameOutp
return $output
)
else (
let $output := local:milestone-chunk-ns-last($input//tei:pb[@n=string($counterPages)], ($input//tei:pb[@n="1"]/following-sibling::*[last()]),$input)
let $from := $input//tei:pb[@n=string($counterPages)]
(: let $to := ($input//tei:pb[@n="1"]/following-sibling::*[last()]):)
let $to := if ($tgURI = '3qr4f.2') then
let $elements := $input//tei:closer
let $amount := count($elements)
return $elements[$amount]
else if ($tgURI = '3r3nn.3') then
let $elements := $input//tei:closer
let $amount := count($elements)
return $elements[$amount]
else if ($tgURI = '3r0fv') then
let $elements := $input//tei:ab
let $amount := count($elements)
return $elements[$amount]
else if ($tgURI = '34zs7.3') then
let $x := 12 (: makes the editor syntax error go away :)
return $from
else if ($tgURI = '3q4rq.3') then
let $x := 12 (: makes the editor syntax error go away :)
return $from
else
$input//*[last()]
let $output := local:milestone-chunk-ns-last($from, $to, $input)
(: let $output := local:milestone-chunk-ns-last($input//tei:pb[@n=string($counterPages)], ($input//tei:pb[@n="1"]/following-sibling::*[last()]),$input) :)
let $outputXML := code-view:main($output)
let $output := local:magic($output, "")
let $filenameOutputPage := $filenameOutput || '_p' || string($i)
......
......@@ -183,7 +183,9 @@ declare function elastic:build-ref-map($locale) {
let $targets :=
for $r in $refs
let $target := data($r/@target)
let $id := substring($target, 2)
let $clean-target := fn:replace($target, ' .+', '')
(: let $x := util:log-system-out($clean-target):)
let $id := substring($clean-target, 2)
return $id
for $target-id in $targets
......
......@@ -130,7 +130,9 @@ let $path := $system-path
let $user := util:system-property("user.name")
let $message1 := $path || " is not available. Create it and make sure " || $user || " can write there."
let $message2 := "Could not write to " || $path || "."
let $indexing_msg := util:log-system-out("indexing edition pages and registers ...")
let $tei-cache-msg := util:log-system-out("caching edition TEI files in '/textgrid' ...")
let $tei-cache := transformXML:cacheAllEditions()
let $indexing-msg := util:log-system-out("indexing edition pages and registers ...")
let $indexing := elastic:setup()
let $map-tiles-msg := util:log-system-out("importing paris map tiles ...")
let $map-tiles := local:inject-map-tiles('/var/www/map-tiles.git/raster')
......
......@@ -342,6 +342,10 @@ w.hover {
flex-grow: 1;
}
#edition-container {
display: inline-block;
}
body.hide-refs #edition-container .fa-external-link-square-alt,
body.hide-refs #translation-container .fa-external-link-square-alt {
display: none;
......
......@@ -43,16 +43,15 @@
<script type="text/javascript" src="templates/js/search.js"/>
<script>
// keeps bootstrap tab functionality and changes the uri fragment
function toTab(tab) {
const url = AtUrl.current()
url.updateHashParams({'tab': tab})
document.location.hash = url.formatHash()
url.setHashPath(`nav-${tab}`)
url.replaceState()
}
// triggers correct tab loading on page load
window.addEventListener('DOMContentLoaded', event =&gt; {
const tab = AtUrl.current().hashParams()['tab'] || 'transcription'
window.addEventListener('DOMContentLoaded', event => {
const tab = document.location.hash.split('-')[1] || 'transcription'
jQuery(`#nav-${tab}-tab`).tab('show')
jQuery('#nav-tab, #nav-tabContent').show()
})
......
templates/images/ANR07-HD-300dpi.jpg

75.4 KB | W: | H:

templates/images/ANR07-HD-300dpi.jpg

23 KB | W: | H:

templates/images/ANR07-HD-300dpi.jpg
templates/images/ANR07-HD-300dpi.jpg
templates/images/ANR07-HD-300dpi.jpg
templates/images/ANR07-HD-300dpi.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -31,6 +31,10 @@ function doFinalBrowserTest() {
}
doFinalBrowserTest();
function isProd() {
return !!document.location.href.match(/architrave\.eu(?!\/dev\/)/)
}
function isStaging() {
return !!document.location.href.match(/architrave\.eu\/dev\//)
}
......@@ -1015,7 +1019,44 @@ function dropTooltips() {
element.innerHTML = ''
}
function handleSpecial(containerSelector) {
const container = document.querySelector(containerSelector)
const url = AtUrl.current()
const edition = url.params()['edition']
const view = url.params()['page']
const locale = url.params()['lang']
if (edition == '34zs7') { // sturm, this code is run for both containers
if (view == '101') {
// see #296
const ref = container.querySelector('ref')
ref.setAttribute('target', ref.getAttribute('target').split(' ')[0])
}
// see #295
if (locale == 'de') {
if (view == '73') {
const hi = container.
querySelector("rs[ref='wrk:textgrid:3q7d5 wrk:textgrid:3qkv8']").
nextElementSibling
const br = document.createElement('br')
hi.before(br)
}
if (view == '84') {
const placename = container.
querySelector("placename[ref='plc:textgrid:3pg0p']")
const br = document.createElement('br')
placename.after(br)
}
}
}
}
function augment(containerSelector) {
handleSpecial(containerSelector)
dropTooltips()
wrapOuterDiv(containerSelector)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment