locale parsing based on URL knowledge (because apache is not helping); aou.name trans...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 17 Apr 2008 18:54:50 +0000 (18:54 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 17 Apr 2008 18:54:50 +0000 (18:54 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@9373 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/conify/global/actor/org_unit.html
Open-ILS/web/conify/global/actor/org_unit.js
Open-ILS/web/conify/global/actor/org_unit_type.html

index b250faa..1264bd5 100644 (file)
                <script language='javascript' src='/opac/common/js/fmall.js' type='text/javascript'></script>
 
                <!-- Dojo goodness -->
-               <script type="text/javascript" src="/js/dojo/dojo/dojo.js" djConfig="parseOnLoad: true"></script>
+               <script type="text/javascript">
+                       var djConfig = { parseOnLoad : true };
+
+                       var _url_locale = location.href.replace(/^.*conify\/(.+)\/global.*$/, "$1").toLowerCase().replace(/-/,'_');
+                       if (_url_locale) djConfig.locale = _url_locale;
+                       else djConfig.locale = '<!--#echo var="locale"-->';
+
+               </script>
+
+               <script type="text/javascript" src="/js/dojo/dojo/dojo.js"></script>
                <script type="text/javascript" src="/js/dojo/dijit/dijit.js"></script>
 
                <script type="text/javascript" src="org_unit.js"></script>
                                                right_pane_toggler.show();
 
                                                current_ou = item;
+                                               window.current_fm_ou = new aou().fromStoreItem(item);
 
                                                highlighter.editor_pane.green.play();
                                                status_update( 'Now editing ' + this.store.getValue( item, 'name' ) );
                                                                                        if (current_ou) ou_list_store.setValue( current_ou, "name", this.getValue() );
                                                                                </script>
                                                                        </span>
+                                                                       <span dojoType="openils.I18N.translationWidget" targetObject="current_fm_ou" field="name"></span>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                        <div id="billing_address" dojoType="dijit.layout.ContentPane" title="Physical Address">
                                                                <table class="tundra" style="margin:10px;">
                                                                        <tr>
-                                                                               <th>Type</th><td colspan="3"><span jsId="billing_addr_type" style="width:100%;" dojoType="dijit.form.TextBox" onChange="current_billing_address.address_type( this.getValue() )"/></td>
+                                                                               <th>Type</th>
+                                                                               <td colspan="3">
+                                                                                       <span jsId="billing_addr_type" style="width:100%;" dojoType="dijit.form.TextBox" onChange="current_billing_address.address_type( this.getValue() )"/>
+                                                                               </td>
                                                                                <th>Valid</th><td>
                                                                                        <input
                                                                                          type="checkbox"
index fe5c257..ad00205 100644 (file)
@@ -16,6 +16,7 @@
 */
 
 dojo.require('fieldmapper.dojoData');
+dojo.require('openils.I18N');
 dojo.require('dojo.parser');
 dojo.require('dojo.data.ItemFileWriteStore');
 dojo.require('dojo.date.stamp');
index 029dba4..fce1551 100644 (file)
                <script language='javascript' src='/opac/common/js/fmall.js' type='text/javascript'></script>
 
                <!-- Dojo goodness -->
-               <script type="text/javascript" src="/js/dojo/dojo/dojo.js" djConfig="parseOnLoad: true"></script>
+               <script type="text/javascript">
+                       var djConfig = { parseOnLoad : true };
+
+                       var _url_locale = location.href.replace(/^.*conify\/(.+)\/global.*$/, "$1").toLowerCase().replace(/-/,'_');
+                       if (_url_locale) djConfig.locale = _url_locale;
+                       else djConfig.locale = '<!--#echo var="locale"-->';
+
+               </script>
+
+               <script type="text/javascript" src="/js/dojo/dojo/dojo.js"</script>
                <script type="text/javascript" src="/js/dojo/dijit/dijit.js"></script>
 
                <script type="text/javascript" src="org_unit_type.js"></script>