[open-ils-commits] r10753 - in trunk/Open-ILS/web/opac/skin/default/xml: common home

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Oct 3 14:52:44 EDT 2008


Author: erickson
Date: 2008-10-03 14:52:40 -0400 (Fri, 03 Oct 2008)
New Revision: 10753

Modified:
   trunk/Open-ILS/web/opac/skin/default/xml/common/fonts.xml
   trunk/Open-ILS/web/opac/skin/default/xml/home/homesearch.xml
Log:
using dojo locale instead of apache locale.  applying onchange handler after value is initually set

Modified: trunk/Open-ILS/web/opac/skin/default/xml/common/fonts.xml
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/xml/common/fonts.xml	2008-10-03 17:27:05 UTC (rev 10752)
+++ trunk/Open-ILS/web/opac/skin/default/xml/common/fonts.xml	2008-10-03 18:52:40 UTC (rev 10753)
@@ -8,12 +8,17 @@
 		<span style='vertical-align: top;'>&nbsp;<span style="font-weight:bold;">|</span>&nbsp;</span>
 		<span style='vertical-align: top;'>&common.language;</span>
 		<span id='translation_switch' dojoType="dijit.form.FilteringSelect" store="openils.I18N.localeStore"
-                    searchAttr="label" required="false" value='<!--#echo var="locale"-->'>
-			<script type="dojo/label" event="onChange">
-				if (this.getValue()) {
-					location.href = location.href.replace( /opac\/[^\/]+\/skin/, 'opac/' + this.getValue() + '/skin');
-				}
-			</script>
+            searchAttr="label" required="false" jsId='opacLocaleSelector'>
+            <script>
+                dojo.addOnLoad(function() {
+                    opacLocaleSelector.setValue(locale);
+                    dojo.connect(opacLocaleSelector, 'onChange', 
+                        function () {
+                            location.href = location.href.replace(/opac\/[^\/]+\/skin/, 'opac/' + this.getValue() + '/skin');
+                        }
+                    );
+                });
+            </script>
 		</span>
 	</div>
 	

Modified: trunk/Open-ILS/web/opac/skin/default/xml/home/homesearch.xml
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/xml/home/homesearch.xml	2008-10-03 17:27:05 UTC (rev 10752)
+++ trunk/Open-ILS/web/opac/skin/default/xml/home/homesearch.xml	2008-10-03 18:52:40 UTC (rev 10753)
@@ -109,12 +109,17 @@
             <tr><td align='center' valign='bottom' style='padding-top:10px;'>
 		        <span style='vertical-align: top;'>&common.language;</span>
 		        <span dojoType="dijit.form.FilteringSelect" store="openils.I18N.localeStore" 
-                    searchAttr="label" required="false" value='<!--#echo var="locale"-->'>
-			        <script type="dojo/label" event="onChange">
-				        if (this.getValue()) {
-					        location.href = location.href.replace( /opac\/[^\/]+\/skin/, 'opac/' + this.getValue() + '/skin');
-				        }
-			        </script>
+                    searchAttr="label" required="false" jsId='opacLocaleSelector'>
+                    <script>
+                        dojo.addOnLoad(function() {
+                            opacLocaleSelector.setValue(locale);
+                            dojo.connect(opacLocaleSelector, 'onChange', 
+                                function () {
+					                location.href = location.href.replace(/opac\/[^\/]+\/skin/, 'opac/' + this.getValue() + '/skin');
+                                }
+                            );
+                        });
+                    </script>
 		        </span>
             </td></tr>
 



More information about the open-ils-commits mailing list