[open-ils-commits] r7501 - 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
Mon Jul 2 09:50:50 EDT 2007
Author: erickson
Date: 2007-07-02 09:47:23 -0400 (Mon, 02 Jul 2007)
New Revision: 7501
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:
gave the OPAC the ability to use an alternate host for images. will likely add the same for CSS and JS. added example config setting the apache config
Modified: trunk/Open-ILS/examples/apache/eg_vhost.conf
===================================================================
--- trunk/Open-ILS/examples/apache/eg_vhost.conf 2007-07-02 01:41:29 UTC (rev 7500)
+++ trunk/Open-ILS/examples/apache/eg_vhost.conf 2007-07-02 13:47:23 UTC (rev 7501)
@@ -64,6 +64,12 @@
SetEnvIf Request_URI "/en-US/" locale=en-US
SetEnvIf Request_URI "/fr/" locale=fr
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=images.example.org/opac/extras/jacket/
+
</LocationMatch>
Modified: trunk/Open-ILS/web/opac/common/js/added_content.js
===================================================================
--- trunk/Open-ILS/web/opac/common/js/added_content.js 2007-07-02 01:41:29 UTC (rev 7500)
+++ trunk/Open-ILS/web/opac/common/js/added_content.js 2007-07-02 13:47:23 UTC (rev 7501)
@@ -5,9 +5,9 @@
*/
function buildISBNSrc(isbn, size) {
- //return "http://images.amazon.com/images/P/" + isbn + ".01._SCMZZZZZZZ_.jpg";
- //return '../../../../jackets/'+isbn;
size = (size) ? size : 'small';
+ if(OILS_OPAC_IMAGES_HOST)
+ return location.protocol + '//' + OILS_OPAC_IMAGES_HOST + size + '/' + isbn;
return '../../../../extras/jacket/'+size+'/'+isbn;
}
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-07-02 01:41:29 UTC (rev 7500)
+++ trunk/Open-ILS/web/opac/skin/default/xml/common/js_common.xml 2007-07-02 13:47:23 UTC (rev 7501)
@@ -4,9 +4,6 @@
<script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/utils.js'> </script>
<script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/config.js'> </script>
<script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/CGI.js'> </script>
- <!--
- <script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/Cookie.js'> </script>
- -->
<script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/Cookies.js'> </script>
<script language='javascript' src='<!--#echo var="OILS_JS_BASE"-->/md5.js'> </script>
@@ -24,10 +21,20 @@
<!-- Some global js -->
<script language='javascript'>
+
config.css.color_1 = "color_1";
config.css.color_2 = "color_2";
config.css.color_3 = "color_3";
+
+
+ <!-- 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"-->';
+ <!--#endif -->
+
</script>
+
</div>
More information about the open-ils-commits
mailing list