since the image fetching is now part of the added content plugin, apache now has...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 29 Aug 2007 20:37:21 +0000 (20:37 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 29 Aug 2007 20:37:21 +0000 (20:37 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@7744 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/examples/apache/eg_vhost.conf
Open-ILS/web/opac/common/js/added_content.js
Open-ILS/web/opac/skin/default/xml/common/js_common.xml

index 22212dd..aaae499 100644 (file)
@@ -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/
 
 </LocationMatch>
index f7be084..b575168 100644 (file)
@@ -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;
 }
 
index 8385e45..7e99539 100644 (file)
@@ -28,9 +28,9 @@
 
 
                <!-- set up some global JS config variables, read from the Apache config -->
-               var OILS_OPAC_IMAGES_HOST = null;
-               <!--#if expr="$OILS_OPAC_IMAGES_HOST"-->
-                       OILS_OPAC_IMAGES_HOST = '<!--#echo var="OILS_OPAC_IMAGES_HOST"-->extras/jacket/';
+               var OILS_OPAC_AC_HOST = null;
+               <!--#if expr="$OILS_OPAC_AC_HOST"-->
+                       OILS_OPAC_AC_HOST = '<!--#echo var="OILS_OPAC_AC_HOST"-->extras/ac/';
                <!--#endif -->
 
        </script>