Skip to content

Commit

Permalink
#93: Bugfix und Zentralisierung der File-Service-Adresse
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Grüning committed Feb 7, 2021
1 parent 2dd03ae commit 6c321ce
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 12 deletions.
10 changes: 10 additions & 0 deletions src/js/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,13 @@ function openFormNewElement()
{
window.open(window.location.href.replace(window.location.search, ""), "_self");
}

function getServerUrl()
{
return "https://192.168.0.10";
}

function getFileServiceUrl()
{
return getServerUrl() + "/munins-archiv-file-service"
}
2 changes: 1 addition & 1 deletion src/js/views/Ablage/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ function UpdateGridData(funde) {
let kontextPath = fund.Kontext.Path;
let previewFileName = fund.FileName.substr(0, fund.FileName.lastIndexOf(".")) + ".preview" + fund.FileName.substr(fund.FileName.lastIndexOf("."));
let relativePreviewFilePath = kontextPath + "/" + previewFileName;
copy.PreviewImage = "https://localhost/munins-archiv-file-service/file.php?relativePath=/" + relativePreviewFilePath;
copy.PreviewImage = getFileServiceUrl() + "/file.php?relativePath=/" + relativePreviewFilePath;
}

copy.Anzahl = fund.Anzahl.replace("-", ">");
Expand Down
2 changes: 1 addition & 1 deletion src/js/views/Begehung/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ function UpdateGridData(funde) {
let kontextPath = fund.Kontext.Path;
let previewFileName = fund.FileName.substr(0, fund.FileName.lastIndexOf(".")) + ".preview" + fund.FileName.substr(fund.FileName.lastIndexOf("."));
let relativePreviewFilePath = kontextPath + "/" + previewFileName;
copy.PreviewImage = "https://localhost/munins-archiv-file-service/file.php?relativePath=/" + relativePreviewFilePath;
copy.PreviewImage = getFileServiceUrl() + "/file.php?relativePath=/" + relativePreviewFilePath;
}

copy.Anzahl = fund.Anzahl.replace("-", ">");
Expand Down
2 changes: 1 addition & 1 deletion src/js/views/Fund/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ function setFileName(fileName) {
let kontextPath = _viewModelFormFund.getKontext().Path;
let previewFileName = fileName.substr(0, fileName.lastIndexOf(".")) + ".preview" + fileName.substr(fileName.lastIndexOf("."));
let relativePreviewFilePath = kontextPath + "/" + previewFileName;
$("img.preview").attr("src", "https://localhost/munins-archiv-file-service/file.php?relativePath=/" +
$("img.preview").attr("src", getFileServiceUrl() + "/file.php?relativePath=/" +
relativePreviewFilePath);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/js/views/Fund/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ function UpdateGridData(funde) {
let kontextPath = fund.Kontext.Path;
let previewFileName = fund.FileName.substr(0, fund.FileName.lastIndexOf(".")) + ".preview" + fund.FileName.substr(fund.FileName.lastIndexOf("."));
let relativePreviewFilePath = kontextPath + "/" + previewFileName;
copy.PreviewImage = "https://localhost/munins-archiv-file-service/file.php?relativePath=/" + relativePreviewFilePath;
copy.PreviewImage = getFileServiceUrl() + "/file.php?relativePath=/" + relativePreviewFilePath;
}

copy.Anzahl = fund.Anzahl.replace("-", ">");
Expand Down
6 changes: 4 additions & 2 deletions src/pages/Ablage/Form.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@

<body>
<div class="w3-container">
<div class="w3-modal image-modal w3-animate-zoom" onclick="$(this).hide()">
<img class="w3-modal-content" src="">
<div class="w3-modal image-modal" onclick="$(this).hide()">
<div class="w3-modal-content w3-animate-zoom">
<img class="w3-modal-content" src="">
</div>
</div>
</div>
<div id=navigation class="notToPrint"></div>
Expand Down
6 changes: 4 additions & 2 deletions src/pages/Begehung/Form.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@

<body>
<div class="w3-container">
<div class="w3-modal image-modal w3-animate-zoom" onclick="$(this).hide()">
<img class="w3-modal-content" src="">
<div class="w3-modal image-modal" onclick="$(this).hide()">
<div class="w3-modal-content w3-animate-zoom">
<img class="w3-modal-content" src="">
</div>
</div>
</div>
<div id=navigation class="notToPrint"></div>
Expand Down
6 changes: 4 additions & 2 deletions src/pages/Fund/Form.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@

<body>
<div class="w3-container">
<div class="w3-modal image-modal w3-animate-zoom" onclick="$(this).hide()">
<img class="w3-modal-content" src="">
<div class="w3-modal image-modal" onclick="$(this).hide()">
<div class="w3-modal-content w3-animate-zoom">
<img class="w3-modal-content" src="">
</div>
</div>
</div>
<div id=navigation class="notToPrint"></div>
Expand Down
6 changes: 4 additions & 2 deletions src/pages/Fund/Search.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@

<body>
<div class="w3-container">
<div class="w3-modal image-modal w3-animate-zoom" onclick="$(this).hide()">
<img class="w3-modal-content" src="">
<div class="w3-modal image-modal" onclick="$(this).hide()">
<div class="w3-modal-content w3-animate-zoom">
<img class="w3-modal-content" src="">
</div>
</div>
</div>
<div id=navigation class="notToPrint"></div>
Expand Down

0 comments on commit 6c321ce

Please sign in to comment.