From: erickson Date: Wed, 29 Aug 2007 20:37:21 +0000 (+0000) Subject: since the image fetching is now part of the added content plugin, apache now has... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=287ef8e18eadc3851c2ccddbe518da8b7becffc9;p=Evergreen.git since the image fetching is now part of the added content plugin, apache now has the option to specify an alternate added content server. committing config changes git-svn-id: svn://svn.open-ils.org/ILS/trunk@7744 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf index 22212dd7af..aaae499154 100644 --- a/Open-ILS/examples/apache/eg_vhost.conf +++ b/Open-ILS/examples/apache/eg_vhost.conf @@ -72,11 +72,13 @@ RewriteRule /opac/extras/jacket/large/(.*) \ SetEnvIf Request_URI "/fr-CA/" locale=fr-CA SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/ - # This gives you the option to configure a different host to serve OPAC images from - # Specify the hostname (withouth protocol) and path to the images. Protocol will - # be determined at runtime - #SetEnvIf Request_URI ".*" OILS_OPAC_IMAGES_HOST=static.example.org/opac/ + # The following environment variables are optional. They specify + # alternate servers for various static data + # Added Content server + #SetEnvIf Request_URI ".*" OILS_OPAC_AC_HOST=static.example.org/opac/ + # Static CSS files server #SetEnvIf Request_URI ".*" OILS_OPAC_CSS_HOST=static.example.org/opac/ + # Static JavaScript files server #SetEnvIf Request_URI ".*" OILS_OPAC_JS_HOST=static.example.org/opac/ diff --git a/Open-ILS/web/opac/common/js/added_content.js b/Open-ILS/web/opac/common/js/added_content.js index f7be084239..b575168e0a 100644 --- a/Open-ILS/web/opac/common/js/added_content.js +++ b/Open-ILS/web/opac/common/js/added_content.js @@ -6,14 +6,16 @@ function buildISBNSrc(isbn, size) { size = (size) ? size : 'small'; - if(OILS_OPAC_IMAGES_HOST) - return location.protocol + '//' + OILS_OPAC_IMAGES_HOST + size + '/' + isbn; - return '../../../../extras/jacket/'+size+'/'+isbn; + if(OILS_OPAC_AC_HOST) + return location.protocol + '//' + OILS_OPAC_AC_HOST + 'jacket/' + size + '/' + isbn; + return '../../../../extras/ac/jacket/'+size+'/'+isbn; } function acMakeURL(type, key) { + if(OILS_OPAC_AC_HOST) + return location.protocol + '//' + OILS_OPAC_AC_HOST + type + '/html/' + key; return '../../../../extras/ac/' + type + '/html/' + key; } diff --git a/Open-ILS/web/opac/skin/default/xml/common/js_common.xml b/Open-ILS/web/opac/skin/default/xml/common/js_common.xml index 8385e453ae..7e9953985e 100644 --- a/Open-ILS/web/opac/skin/default/xml/common/js_common.xml +++ b/Open-ILS/web/opac/skin/default/xml/common/js_common.xml @@ -28,9 +28,9 @@ - var OILS_OPAC_IMAGES_HOST = null; - - OILS_OPAC_IMAGES_HOST = 'extras/jacket/'; + var OILS_OPAC_AC_HOST = null; + + OILS_OPAC_AC_HOST = 'extras/ac/';