[open-ils-commits] r12547 - trunk/Open-ILS/xul/staff_client/server/admin (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Mar 16 15:58:59 EDT 2009
Author: erickson
Date: 2009-03-16 15:58:55 -0400 (Mon, 16 Mar 2009)
New Revision: 12547
Modified:
trunk/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js
Log:
better handling of sets of work_ou's. will probably shove some of this logic into User.js at some point. Added support for UPDATE_ORG_UNIT_SETTING_ALL perm checking
Modified: trunk/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js 2009-03-16 19:58:04 UTC (rev 12546)
+++ trunk/Open-ILS/xul/staff_client/server/admin/org_unit_settings.js 2009-03-16 19:58:55 UTC (rev 12547)
@@ -78,7 +78,13 @@
fieldmapper.aou.descendantNodeList(orgList[i]));
}
- var store = new dojo.data.ItemFileReadStore({data:aou.toStoreData(orgNodeList)});
+ var list = [];
+ dojo.forEach(orgNodeList, function(item) {
+ if(list.filter(function(i){return (i.id() == item.id())}).length == 0)
+ list.push(item);
+ });
+
+ var store = new dojo.data.ItemFileReadStore({data:aou.toStoreData(list)});
osContextSelector.store = store;
osContextSelector.startup();
osContextSelector.setValue(user.user.ws_ou());
@@ -155,7 +161,10 @@
function osLaunchEditor(name) {
osEditDialog._osattr = name;
osEditDialog.show();
- user.buildPermOrgSelector('UPDATE_ORG_UNIT_SETTING.' + name, osEditContextSelector, osSettings[name].context);
+ user.buildPermOrgSelector(
+ ['UPDATE_ORG_UNIT_SETTING.' + name, 'UPDATE_ORG_UNIT_SETTING_ALL'],
+ osEditContextSelector, osSettings[name].context
+ );
dojo.byId('os-edit-name').innerHTML = osSettings[name].label;
dojo.byId('os-edit-desc').innerHTML = osSettings[name].desc || '';
More information about the open-ils-commits
mailing list