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>