[open-ils-commits] r12661 - trunk/Open-ILS/web/js/dojo/openils/widget (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Mar 24 17:27:23 EDT 2009


Author: erickson
Date: 2009-03-24 17:27:18 -0400 (Tue, 24 Mar 2009)
New Revision: 12661

Modified:
   trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
Log:
unless otherwise specified, use the workstation ou as the value for the org unit selector

Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2009-03-24 21:11:18 UTC (rev 12660)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2009-03-24 21:27:18 UTC (rev 12661)
@@ -251,11 +251,13 @@
             this.widget.searchAttr = 'shortname';
             this.widget.labelAttr = 'shortname';
             this.widget.parentField = 'parent_ou';
+            var user = new openils.User();
+            if(this.widgetValue == null) 
+                this.widgetValue = user.user.ws_ou();
             
             // if we have a limit perm, find the relevent orgs (async)
             if(this.orgLimitPerms && this.orgLimitPerms.length > 0) {
                 this.async = true;
-                var user = new openils.User();
                 var self = this;
                 user.getPermOrgList(this.orgLimitPerms, 
                     function(orgList) {



More information about the open-ils-commits mailing list