Prevent JavaScript error on non-Novelist sites
authorDan Scott <dscott@laurentian.ca>
Fri, 21 Jun 2013 18:49:27 +0000 (14:49 -0400)
committerBen Shum <bshum@biblio.org>
Fri, 21 Jun 2013 20:19:40 +0000 (16:19 -0400)
Unless the Evergreen site in question is signed up and configured to
support Novelist added content, every details page will generate a
JavaScript error due to the reference to an undefined JavaScript
function. Guard against that by testing for the presence of the Novelist
URL.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/templates/opac/parts/acjs.tt2

index 9cf83ec..3b057dc 100644 (file)
@@ -50,6 +50,7 @@
                 [% END; # IF status unknown
             END  %] 
 
+[%- IF ENV.OILS_NOVELIST_URL -%]
             /* Load novelist content */
             novSelect.loadContentForQuery(
                 {
@@ -65,6 +66,7 @@
                     dojo.byId('novelist-loading').innerHTML = '';
                 }
             );
+[%- END; # Novelist -%]
 
         [% END; # IF ident
     %]