Skip to content

Commit

Permalink
Fix path-related bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
blokhin committed Nov 24, 2024
1 parent f8001da commit 8087b5f
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-to-gh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: |
mkdir dist
cp ermac.min.js src_js/third_party/jquery.min.js dist
cp -r webassets oauth crystvis dist
cp -r webassets oauth crystvis labs dist
cp example_prod.html dist/index.html
- name: Deploy
Expand Down
2 changes: 1 addition & 1 deletion deploy/build_js.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ROOT=$(dirname $0)/../
JSCOMP=$ROOT/third_party/jscomp/compiler.jar
JSTARGET=$ROOT/ermac.min.js

cat $ROOT/src_js/third_party/jquery.min.js >> $JSTARGET
cat $ROOT/src_js/third_party/jquery.min.js > $JSTARGET

java -jar $JSCOMP --jscomp_off checkTypes --language_in ECMASCRIPT5_STRICT --js $ROOT/src_js/third_party/jquery.tablesorter.js --compilation_level WHITESPACE_ONLY >> $JSTARGET
java -jar $JSCOMP --jscomp_off checkTypes --language_in ECMASCRIPT5_STRICT --js $ROOT/src_js/third_party/wNumb.js >> $JSTARGET
Expand Down
2 changes: 1 addition & 1 deletion labs/view-phonons/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" />
<title>Phonon visualization</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<script type="text/javascript" src="/ermac/src_js/third_party/cifplayer.js"></script><!-- FIXME -->
<script type="text/javascript" src="/webassets/cifplayer.js"></script>
<style type="text/css">
*{margin:0;padding:0;}

Expand Down
14 changes: 7 additions & 7 deletions src_js/ptable.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ function refresh_ptable_results(elA, elB, elC){
if (els.length == 1){

if (wmgui.ptable.dtypes == 2){
iframe_addr = wmgui.engines_addrs[wmgui.engines]['cifplayer'];
iframe_addr = wmgui.engines_addrs['cifplayer'];
wmgui.ptable.vis_fixed = true;

} else if (wmgui.ptable.dtypes == 3){
iframe_addr = wmgui.engines_addrs[wmgui.engines]['visavis'];
iframe_addr = wmgui.engines_addrs['visavis'];
wmgui.ptable.vis_fixed = true;

} else
Expand All @@ -148,11 +148,11 @@ function refresh_ptable_results(elA, elB, elC){
ajax_download(null, wmgui.search_endpoint + '?q=' + JSON.stringify(query_pds), render_right);

} else if (wmgui.ptable.dtypes == 2){
iframe_addr = wmgui.engines_addrs[wmgui.engines]['cifplayer'];
iframe_addr = wmgui.engines_addrs['cifplayer'];
wmgui.ptable.vis_fixed = true;

} else if (wmgui.ptable.dtypes == 3){
iframe_addr = wmgui.engines_addrs[wmgui.engines]['visavis'];
iframe_addr = wmgui.engines_addrs['visavis'];
wmgui.ptable.vis_fixed = true;

} else
Expand All @@ -167,10 +167,10 @@ function refresh_ptable_results(elA, elB, elC){
iframe_addr = wmgui.v_pd_3d_addr + els.join('-');

} else if (wmgui.ptable.dtypes == 2){
iframe_addr = wmgui.engines_addrs[wmgui.engines]['cifplayer'];
iframe_addr = wmgui.engines_addrs['cifplayer'];

} else if (wmgui.ptable.dtypes == 3){
iframe_addr = wmgui.engines_addrs[wmgui.engines]['visavis'];
iframe_addr = wmgui.engines_addrs['visavis'];

} else
document.getElementById('ptable_vis').innerHTML = '';
Expand Down Expand Up @@ -225,7 +225,7 @@ function render_left(data){
target_addr = '#' + wmgui.phase_endpoint + '?phid=' + phid + '&struct=1';

if (target) target.contentWindow.location.hash = target_addr;
else document.getElementById('ptable_vis').innerHTML = '<iframe frameborder=0 scrolling="no" width="100%" height="850" src="' + wmgui.engines_addrs[wmgui.engines]['cifplayer'] + target_addr + '"></iframe>';
else document.getElementById('ptable_vis').innerHTML = '<iframe frameborder=0 scrolling="no" width="100%" height="850" src="' + wmgui.engines_addrs['cifplayer'] + target_addr + '"></iframe>';

} else document.getElementById('ptable_vis').innerHTML = '';

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion webassets/iframe_cifplayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
html, body{width:100%;height:100%;overflow:hidden;}
optimade-cifplayer-player{width:100%;height:100%;}
</style>
<script type="text/javascript" src="../src_js/third_party/cifplayer.js"></script>
<script type="text/javascript" src="/webassets/cifplayer.js"></script>
<script type="text/javascript">
"use strict";

Expand Down
2 changes: 1 addition & 1 deletion webassets/iframe_visavis.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<div id="main"></div>
<div id="switcher" title="Show interactive plot (experimental feature)"></div>

<script type="text/javascript" src="../src_js/third_party/visavis.js?090924"></script>
<script type="text/javascript" src="/webassets/visavis.js"></script>
<script type="text/javascript">
"use strict";

Expand Down
2 changes: 1 addition & 1 deletion webassets/pd_stub.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<body>

<div id="cross" title="Close"></div>
<div id="switcher" title="Show interactive plot (experimental feature)"></div>
<div id="switcher" title="Switch between static and dynamic"></div>

<script type="text/javascript">
if (document.location.hash.length){
Expand Down
File renamed without changes.

0 comments on commit 8087b5f

Please sign in to comment.