[open-ils-commits] r9403 - in branches/acq-experiment: .
Open-ILS/web/js/dojo/openils
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Apr 21 14:16:43 EDT 2008
Author: erickson
Date: 2008-04-21 13:37:44 -0400 (Mon, 21 Apr 2008)
New Revision: 9403
Modified:
branches/acq-experiment/
branches/acq-experiment/Open-ILS/web/js/dojo/openils/User.js
Log:
Merged revisions 9402 via svnmerge from
svn://svn.open-ils.org/ILS/trunk
........
r9402 | erickson | 2008-04-21 13:36:38 -0400 (Mon, 21 Apr 2008) | 1 line
added function to flesh out an OrgUnitFilteringSelect based on user perm orgs
........
Property changes on: branches/acq-experiment
___________________________________________________________________
Name: svnmerge-integrated
- /trunk:1-9400
+ /trunk:1-9402
Modified: branches/acq-experiment/Open-ILS/web/js/dojo/openils/User.js
===================================================================
--- branches/acq-experiment/Open-ILS/web/js/dojo/openils/User.js 2008-04-21 17:36:38 UTC (rev 9402)
+++ branches/acq-experiment/Open-ILS/web/js/dojo/openils/User.js 2008-04-21 17:37:44 UTC (rev 9403)
@@ -137,13 +137,37 @@
fieldmapper.standardRequest(
['open-ils.actor', 'open-ils.actor.user.work_perm.org_unit_list'],
- {
- params: [openils.User.authtoken, perm],
+ { params: [openils.User.authtoken, perm],
oncomplete: buildTreePicker,
async: true
}
)
}
+
+ /**
+ * Sets the store for an existing openils.widget.OrgUnitFilteringSelect
+ * using the orgs where the user has the requested permission.
+ * @param perm The permission to check
+ * @param selector The pre-created dijit.form.FilteringSelect object.
+ */
+ openils.User.buildPermOrgSelector = function(perm, selector) {
+
+ function buildTreePicker(r) {
+ var orgList = r.recv().content();
+ var store = new dojo.data.ItemFileReadStore({data:aou.toStoreData(orgList)});
+ selector.store = store;
+ selector.startup();
+ selector.setValue(openils.User.user.ws_ou());
+ }
+
+ fieldmapper.standardRequest(
+ ['open-ils.actor', 'open-ils.actor.user.work_perm.org_unit_list'],
+ { params: [openils.User.authtoken, perm],
+ oncomplete: buildTreePicker,
+ async: true
+ }
+ )
+ }
}
More information about the open-ils-commits
mailing list