Skip to content

Commit

Permalink
Fixes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
slominskir committed Jan 4, 2024
1 parent 600c8c5 commit 3761acc
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ Wildfly must be pre-configured before the first deployment of the app. The [wild
### Runtime
Uses the [Smoothness Environment Variables](https://github.com/JeffersonLab/smoothness#environment-variables).

Additionally, the scheme, host name and port of the CEBAF Element Database (CED) server is configured with environment variable `CED_SERVER_URL`.

## Build
This project is built with [Java 17](https://adoptium.net/) (compiled to Java 11 bytecode), and uses the [Gradle 7](https://gradle.org/) build tool to automatically download dependencies and build the project from source:

Expand Down
6 changes: 3 additions & 3 deletions src/main/webapp/WEB-INF/tags/page.tag
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
<jsp:invoke fragment="stylesheets"/>
</jsp:attribute>
<jsp:attribute name="scripts">
<script>
jlab.cedServerUrl = '${env["CED_SERVER_URL"]}';
</script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/v${initParam.releaseNumber}/js/cnm.js"></script>
<jsp:invoke fragment="scripts"/>
</jsp:attribute>
<jsp:attribute name="footnote">
<b>Note:</b> The CED is only accessible from onsite
</jsp:attribute>
<jsp:attribute name="primaryNavigation">
<ul>
<li${'/overview' eq currentPath ? ' class="current-primary"' : ''}>
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/views/generator/step-five.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

<p>The following names are already taken:</p>
<ul></ul>
<a target="_blank" href="http://ced.acc.jlab.org/inventory/?q=${fn:escapeXml(system.getSCode())}${fn:escapeXml(type.getVvCode())}${fn:escapeXml(sector.getXxCode())}*">CED Inventory</a>
<a target="_blank" href="${env['CED_SERVER_URL']}/inventory/?q=${fn:escapeXml(system.getSCode())}${fn:escapeXml(type.getVvCode())}${fn:escapeXml(sector.getXxCode())}*">CED Inventory</a>


<p>Want to reserve your new element name? <a href="mailto:cedadm@jlab.org?subject=Nomenclature">Contact the CED administrator</a></p>
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/WEB-INF/views/translator.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
});
$(document).on("click", "#ced-link", function() {
var query = $("#name-input").val();
window.open('https://ced.acc.jlab.org/inventory?q=' + encodeURIComponent(query) + '*');
window.open(jlab.cedServerUrl + '/inventory?q=' + encodeURIComponent(query) + '*');
return false;
});
</script>
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/resources/js/sector.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,5 +163,5 @@ $(document).on("click", "#open-edit-row-dialog-button", function() {
});
$(document).on("click", "#inventory-button", function() {
var code = $(".editable-row-table tr.selected-row td:first-child").text();
window.open("http://ced.acc.jlab.org/inventory/?z=&t=LineElem&ng=___" + code + "%25");
window.open(jlab.cedServerUrl + "/inventory/?z=&t=LineElem&ng=___" + code + "%25");
});
2 changes: 1 addition & 1 deletion src/main/webapp/resources/js/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,5 @@ $(document).on("click", "#open-edit-row-dialog-button", function() {
});
$(document).on("click", "#inventory-button", function() {
var code = $(".editable-row-table tr.selected-row td:first-child").text();
window.open("http://ced.acc.jlab.org/inventory/?z=&t=LineElem&ng=" + code + "%25");
window.open(jlab.cedServerUrl + "/inventory/?z=&t=LineElem&ng=" + code + "%25");
});
2 changes: 1 addition & 1 deletion src/main/webapp/resources/js/type.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ $(document).on("click", "#open-edit-row-dialog-button", function () {
$(document).on("click", "#inventory-button", function () {
var scode = $(".editable-row-table tr.selected-row td:first-child").text(),
vvcode = $(".editable-row-table tr.selected-row td:nth-child(2)").text();
window.open("http://ced.acc.jlab.org/inventory/?z=&t=LineElem&ng=" + scode + vvcode + "%25");
window.open(jlab.cedServerUrl + "/inventory/?z=&t=LineElem&ng=" + scode + vvcode + "%25");
});
$(document).on("click", "#editable-attributes-button", function () {
var $dialog = $("#editable-attributes-dialog"),
Expand Down

0 comments on commit 3761acc

Please sign in to comment.