Added Tags support in the org_unit_settings display page.
authorJoseph Lewis <joehms22@gmail.com>
Tue, 7 Jun 2011 17:34:20 +0000 (11:34 -0600)
committerJason Etheridge <jason@esilibrary.com>
Thu, 15 Sep 2011 16:17:07 +0000 (12:17 -0400)
Signed-off-by: Joseph Lewis <joehms22@gmail.com>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/xul/staff_client/server/admin/org_unit_settings.js
Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml

index 31a6a4a..696c8e7 100644 (file)
@@ -23,13 +23,18 @@ var osSettings = {};
 var ouSettingValues = {};
 var osEditAutoWidget;
 var perm_codes = {};
+var osGroups = {};
 
 function osInit(data) {
     authtoken = new openils.CGI().param('ses') || dojo.cookie('ses');
     user = new openils.User({authtoken:authtoken});
     contextOrg = user.user.ws_ou();
     openils.User.authtoken = authtoken;
+    
+    var grps = new openils.PermaCrud({authtoken:authtoken}).retrieveAll('csg');
+    dojo.forEach(grps, function(grp) { osGroups[grp.name()] = grp.label(); });
 
+    
     var connect = function() { 
         dojo.connect(contextOrg, 'onChange', osChangeContext); 
 
@@ -71,7 +76,6 @@ function osDraw(specific_setting) {
             names.push(key);
 
     } else {
-
         var types = new openils.PermaCrud({authtoken:authtoken}).retrieveAll('coust');
 
         dojo.forEach(types, 
@@ -81,7 +85,8 @@ function osDraw(specific_setting) {
                     desc : type.description(),
                     type : type.datatype(),
                     fm_class : type.fm_class(),
-                    update_perm : type.update_perm()
+                    update_perm : type.update_perm(),
+                    grp : osGroups[type.grp()]
                 }
             }
         );
index 017ab39..16cdabf 100644 (file)
@@ -23,7 +23,7 @@
     <head>
         <title>&staff.server.admin.org_unit_settings.title;</title>
         <link type='text/css' rel='stylesheet' href='admin.css'/>
-        <script type="text/javascript" src='/IDL2js?aou,aout,pgt,au,coust,aous'></script>
+        <script type="text/javascript" src='/IDL2js?aou,aout,pgt,au,coust,aous,csg'></script>
         <script type="text/javascript" djConfig="parseOnLoad: true,isDebug:false" src="/js/dojo/dojo/dojo.js"></script>
         <script type="text/javascript" djConfig="parseOnLoad: true,isDebug:false" src="/js/dojo/dojo/openils_dojo.js"></script>
         <script type="text/javascript" src='org_unit_settings.js'></script>
@@ -53,6 +53,7 @@
                                 get: osGetEditLink, 
                                 formatter : osFormatEditLink
                             },
+                            {name: 'Group', get: osGetGridData, field:'grp'},
                             {name: 'Setting', get: osGetGridData, field:'label', width:'auto', styles:'text-align:left;'},
                             {name: 'Context', get: osGetGridData, field:'context'},
                             {name: 'Value', get: osGetGridData, field:'value', width:'auto'},
         <span id='os-true' class='hidden'>&common.true;</span>
         <span id='os-false' class='hidden'>&common.false;</span>
         <div dojoType="openils.widget.ProgressDialog" jsId="progressDialog" indeterminate="true"></div>
+        <div class="hidden"></div>
     </body>
 </html>