Does Omeka Classic prevent JS files from running?


I am struggling with embedding an RTI (Reflectance Transference Imaging) webviewer on an Omeka page. This RTI WebViewer was developed by Gianpaolo Palma and is available at Reflectance Transformation Imaging - WebRTIViewer

Gianpaolo’s elegant code relies on two factors: placing a folder of pre-processed images on the site server, alongside a folder of javascript files from and through which the WebRTI Viewer is compiled on the fly.

I have done this for an omeka classic site: on a test page: test page for RTI viewer · Kat's Collection (the relevant subfolders are “mayanplaque” and “webViewer” and are placed in the files folder of the omeka installation)

for which I use the following code:

<script type="text/javascript" src="/files/webViewer/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="/files/webViewer/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="/files/webViewer/js/pep.min.js"></script>
<script type="text/javascript" src="/files/webViewer/spidergl/spidergl.js"></script>
<script type="text/javascript" src="/files/webViewer/spidergl/multires.js"></script>
<h1>Mayan Plaque</h1>
<div id="webViewer">
<script type="text/javascript">
				createRtiViewer("/files/webViewer", "/files/mayanplaque", 620, 600); 
<p id="instructions">To change the direction of the light source, place your cursor over the image and press and hold the left mouse button. Keep the button pressed as you move the cursor around the image.</p>
<p id="credit">WebRTIViewer courtesy of <a href="" target="_blank" rel="noopener">Visual Computing Lab - ISTI - CNR</a>.</p>

Alas, without satisfactory effect.

Might you have any idea or suggestion as to what I need to do to get this working?

Many thanks.

All best
Quint Gregory

I’ve gone ahead and edited your first post to fix the code sample.

On your sample site, if you open your browser’s JS console or web inspector, you’ll see there’s an error with your Javascript:

Uncaught Error: Syntax error, unrecognized expression: #/files/webViewer

From the link you shared, the first argument you pass to the createRtiViewer function should be the ID of the element you want the viewer to load into. So you should have webViewer there instead of /files/webViewer.

But it looks like from there you’ll have some other problems. I’m not familiar with this library but it doesn’t look to me like whatever’s happening here is Omeka’s doing.

Hi John,

Thank you so much for your response, and for flagging that error.

In addition, yes, I am not completely surprised that more complications await, but I was hoping their might be a relatively straightforward fix! I’ll keep noodling about.

All best