using dojo locale instead of apache locale. applying onchange handler after value...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 3 Oct 2008 18:52:40 +0000 (18:52 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 3 Oct 2008 18:52:40 +0000 (18:52 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10753 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/skin/default/xml/common/fonts.xml
Open-ILS/web/opac/skin/default/xml/home/homesearch.xml

index c2b7eff..8b3ce40 100644 (file)
@@ -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>
        
index a5c79e9..553f488 100644 (file)
             <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>