[open-ils-commits] r7744 - in trunk/Open-ILS: examples/apache web/opac/common/js web/opac/skin/default/xml/common

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Aug 29 16:43:15 EDT 2007


Author: erickson
Date: 2007-08-29 16:37:21 -0400 (Wed, 29 Aug 2007)
New Revision: 7744

Modified:
   trunk/Open-ILS/examples/apache/eg_vhost.conf
   trunk/Open-ILS/web/opac/common/js/added_content.js
   trunk/Open-ILS/web/opac/skin/default/xml/common/js_common.xml
Log:
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

Modified: trunk/Open-ILS/examples/apache/eg_vhost.conf
===================================================================
--- trunk/Open-ILS/examples/apache/eg_vhost.conf	2007-08-29 20:36:10 UTC (rev 7743)
+++ trunk/Open-ILS/examples/apache/eg_vhost.conf	2007-08-29 20:37:21 UTC (rev 7744)
@@ -72,11 +72,13 @@
     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>

Modified: trunk/Open-ILS/web/opac/common/js/added_content.js
===================================================================
--- trunk/Open-ILS/web/opac/common/js/added_content.js	2007-08-29 20:36:10 UTC (rev 7743)
+++ trunk/Open-ILS/web/opac/common/js/added_content.js	2007-08-29 20:37:21 UTC (rev 7744)
@@ -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;
 }
 

Modified: trunk/Open-ILS/web/opac/skin/default/xml/common/js_common.xml
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/xml/common/js_common.xml	2007-08-29 20:36:10 UTC (rev 7743)
+++ trunk/Open-ILS/web/opac/skin/default/xml/common/js_common.xml	2007-08-29 20:37:21 UTC (rev 7744)
@@ -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>



More information about the open-ils-commits mailing list