]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1642378 Webstaff org selector misc. repairs
authorBill Erickson <berickxx@gmail.com>
Mon, 27 Feb 2017 21:43:09 +0000 (16:43 -0500)
committerKathy Lussier <klussier@masslnc.org>
Mon, 6 Mar 2017 22:09:51 +0000 (17:09 -0500)
commit354988bfab03a9bd1f99c67a22790ce72d6ee9fb
tree559e77f503927990e6e700420e8c0ebf27705702
parent6fa137e176b4f08f083828fcc454aefbc2e8118b
LP#1642378 Webstaff org selector misc. repairs

1. Always apply default values after egStartup.go() has completed.
   Among other things, this prevents the occaisonal "cannot call ws_ou()
   on an undefined value" errors bubbling up from the org selector
   when an attempt to set default values occured before egAuth had
   retrieved the user (which occurs during startup).

2. For consistency, always run the $scope.onchange handler on initial
   page load when a selected value and change handler are defined.
   Similar to #1 above, the initial onchange always fires after
   egStartup has completed.

3. Run the change handler in a $timeout so that the $scope.selected
   value has a chance to propagate to the calling controller's $scope.
   Otherwise, the the calling controller has to manually track the
   selected value (which partially defeats the purpose of having this
   directive in the first place).

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/web/js/ui/default/staff/services/ui.js