move locale parsing out to a separate javascript file; translations of group names...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 17 Apr 2008 19:21:56 +0000 (19:21 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 17 Apr 2008 19:21:56 +0000 (19:21 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@9374 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/conify/global/actor/org_unit.html
Open-ILS/web/conify/global/actor/org_unit_type.html
Open-ILS/web/conify/global/admin.js [new file with mode: 0644]
Open-ILS/web/conify/global/permission/grp_tree.html
Open-ILS/web/conify/global/permission/grp_tree.js

index 1264bd5..4c79655 100644 (file)
                <script language='javascript' src='/opac/common/js/fmall.js' type='text/javascript'></script>
 
                <!-- Dojo goodness -->
-               <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="../admin.js"></script>
 
                <script type="text/javascript" src="/js/dojo/dojo/dojo.js"></script>
                <script type="text/javascript" src="/js/dojo/dijit/dijit.js"></script>
index fce1551..1c7e88b 100644 (file)
                <script language='javascript' src='/opac/common/js/fmall.js' type='text/javascript'></script>
 
                <!-- Dojo goodness -->
-               <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="../admin.js"></script>
                <script type="text/javascript" src="/js/dojo/dojo/dojo.js"</script>
                <script type="text/javascript" src="/js/dojo/dijit/dijit.js"></script>
 
diff --git a/Open-ILS/web/conify/global/admin.js b/Open-ILS/web/conify/global/admin.js
new file mode 100644 (file)
index 0000000..e3b4ae2
--- /dev/null
@@ -0,0 +1,6 @@
+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"-->';
+
index f8ea5ca..723a6c9 100644 (file)
@@ -64,7 +64,8 @@
                <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" src="../admin.js"></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="grp_tree.js"></script>
                                                right_pane_toggler.show();
 
                                                current_group = item;
+                                               window.current_fm_group = new pgt().fromStoreItem(item);
 
                                                perm_map_model.query = { grp : current_group ? current_group.id[0] : -1 };
                                                perm_map_model.refresh();
                                                                                        }
                                                                                </script>
                                                                        </span>
+                                                                       <span dojoType="openils.I18N.translationWidget" targetObject="current_fm_group" field="name"></span>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <th>Description</th>
                                                                <td>
-                                                                       <textarea
-                                                                         id="editor_pane_description"
-                                                                         dojoType="dijit.form.Textarea"
-                                                                         jsId="editor_pane_description"
-                                                                         onChange="if (current_group) group_store.setValue( current_group, "description", this.getValue() );"
-                                                                       ></textarea>
+                                                                       <span>
+                                                                               <textarea
+                                                                                 id="editor_pane_description"
+                                                                                 dojoType="dijit.form.Textarea"
+                                                                                 jsId="editor_pane_description"
+                                                                                 onChange="if (current_group) group_store.setValue( current_group, "description", this.getValue() );"
+                                                                               ></textarea>
+                                                                       </span>
+                                                                       <span dojoType="openils.I18N.translationWidget" targetObject="current_fm_group" field="description"></span>
                                                                </td>
                                                        </tr>
                                                        <tr>
index 05d3dbd..151a343 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');