Skip to content

Commit

Permalink
update eXist backend URL
Browse files Browse the repository at this point in the history
  • Loading branch information
olvidalo committed Apr 20, 2021
1 parent a252aba commit 3fd3b2d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
22 changes: 14 additions & 8 deletions css/epidoc_c.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
@namespace file url('http://exist-db.org/xquery/file');
@namespace tei url('http://www.tei-c.org/ns/1.0');

@backendUrl: "http://papyri.uni-koeln.de:8080/exist/apps/papyri";

oxy|document {
background-color: #BBBBBB !important;
padding-left: 1em !important;
Expand Down Expand Up @@ -554,21 +556,25 @@ note[type=publication]:not([subtype=struct]) {
oxy_editor(type, text, edit, "#text", columns, 30);
visibility: -oxy-collapse-text;
}
note[type=publication] idno {


@publicationLabels: oxy_xpath("doc('@{backendUrl}/modules/oxygen-tools.xql?what=choosePub-labels')/data(.)");
@publicationValues: oxy_xpath("doc('@{backendUrl}/modules/oxygen-tools.xql?what=choosePub-values')/data(.)");
note[type=publication] idno {
content:oxy_label(text, "Publikation: ", width, 10em, text-align, right)
oxy_combobox(
edit, "@corresp",
editable, false,
columns, 20,
labels, oxy_xpath("doc('http://papyri.uni-koeln.de:8080/apps/papyri/modules/oxygen-tools.xql?what=choosePub-labels')/data(.)"),
values, oxy_xpath("doc('http://papyri.uni-koeln.de:8080/apps/papyri/modules/oxygen-tools.xql?what=choosePub-values')/data(.)"),
tooltips, oxy_xpath("doc('http://papyri.uni-koeln.de:8080/apps/papyri/modules/oxygen-tools.xql?what=choosePub-labels')/data(.)"),
labels, @publicationLabels,
values, @publicationValues,
tooltips, @publicationLabels,
onChange, oxy_action(
name, 'Insert',
operation, 'XQueryUpdateOperation',
arg-script, `"\
arg-script, "let $backendURL = \"{@backendURL}\" " `"\
let $pubId := substring-after(@corresp, '#') \
let $pubDesc := doc('http://papyri.uni-koeln.de:8080/apps/papyri/modules/oxygen-tools.xql?what=pubIdno&id='||$pubId) \
let $pubDesc := doc('$backendURL/modules/oxygen-tools.xql?what=pubIdno&id='||$pubId) \
return replace value of node . with $pubDesc \
"`
)
Expand Down Expand Up @@ -620,7 +626,7 @@ note[type=publication][subtype=struct]:after(2){
content: oxy_xpath(
oxy_concat(
oxy_concat(
"doc('http://papyri.uni-koeln.de:8080/apps/papyri/modules/oxygen-tools.xql?what=pubdesc&key=",
"doc('@{backendUrl}/modules/oxygen-tools.xql?what=pubdesc&key=",
oxy_xpath("tei:bibl/tei:idno/text()")),
"')//text()")
);
Expand Down Expand Up @@ -1786,7 +1792,7 @@ surface {
content:
oxy_label(text, "Bild verknüpfen: ", width, 8.5em, text-align, right)
oxy_editor(type, combo, edit, "@temp-url", editable, false,
values, oxy_xpath(oxy_concat("doc('http://papyri.uni-koeln.de:8080/apps/papyri/modules/oxygen-tools.xql?what=values&id=", oxy_xpath("root()/TEI/@xml:id/data(.)") ,"&dir=", oxy_substring(oxy_substring(oxy_base-uri(), oxy_lastindexof(oxy_base-uri(), '/')), 1) ,"')//text()"))
values, oxy_xpath(oxy_concat("doc('@{backendUrl}/modules/oxygen-tools.xql?what=values&id=", oxy_xpath("root()/TEI/@xml:id/data(.)") ,"&dir=", oxy_substring(oxy_substring(oxy_base-uri(), oxy_lastindexof(oxy_base-uri(), '/')), 1) ,"')//text()"))
)
oxy_editor(type, button, actionID, choose_graphic, transparent, true, color, #FFFFFF)
oxy_editor(type, button, actionID, insert_all_graphics, transparent, true);
Expand Down
4 changes: 2 additions & 2 deletions epidoc_c.framework
Original file line number Diff line number Diff line change
Expand Up @@ -5821,7 +5821,7 @@ declare namespace file="http://exist-db.org/xquery/file";

let $cfn := tokenize(document-uri(), "/")[last()]
let $id := //tei:TEI/@xml:id/data(.)
let $url := concat("http://papyri.uni-koeln.de:8080/apps/papyri/modules/oxygen-tools.xql?what=file&dir=", $cfn, "&id=",$id)
let $url := concat("http://papyri.uni-koeln.de:8080/exist/apps/papyri/modules/oxygen-tools.xql?what=file&dir=", $cfn, "&id=",$id)
let $graphics := doc($url)/graphics/tei:graphic
return $graphics</String>
</entry>
Expand Down Expand Up @@ -5939,7 +5939,7 @@ declare namespace file="http://exist-db.org/xquery/file";

let $filename := //surface/@temp-url/data(.)
let $id := //TEI/@xml:id/data(.)
let $url := "http://papyri.uni-koeln.de:8080/apps/papyri/modules/oxygen-tools.xql?what=file&amp;#038;dir="||tokenize(document-uri(), "/")[last()]||"&amp;amp;file="||$filename||"&amp;amp;id="||$id
let $url := "http://papyri.uni-koeln.de:8080/exist/apps/papyri/modules/oxygen-tools.xql?what=file&amp;#038;dir="||tokenize(document-uri(), "/")[last()]||"&amp;amp;file="||$filename||"&amp;amp;id="||$id

let $graphic := doc($url)
return $graphic</String>
Expand Down

0 comments on commit 3fd3b2d

Please sign in to comment.