From: Bill Erickson Date: Thu, 24 Oct 2013 20:39:04 +0000 (-0400) Subject: staff web : navbar docs repair X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b415d07f8a3a2fb62c18e7fdc6c2483afe69ce90;p=evergreen%2Fequinox.git staff web : navbar docs repair Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/web/js/ui/default/staff/navbar.js b/Open-ILS/web/js/ui/default/staff/navbar.js index 1995c5c781..48de8f267e 100644 --- a/Open-ILS/web/js/ui/default/staff/navbar.js +++ b/Open-ILS/web/js/ui/default/staff/navbar.js @@ -19,16 +19,14 @@ function NavCtrl($scope, egStartup, egAuth) { * multiple times. If it's already started, we just pick up the * existing startup promise. * - * 2. Since we are returning a promise, whose success handler - * updates a value within our scope, we do not have to manually - * call $scope.$apply() in the handler to update the DOM.. When - * the promise is resolved, another $digest() loop will pick up - * our changes to $scope.username and apply them to the UI. + * 2. We are updating the $scope asynchronously, but since it's + * done inside a promise resolver, another $digest() loop will + * run and pick up our changes. No $scope.$apply() needed. */ - return egStartup.go().then( + egStartup.go().then( function() { - // login page will not have a cached + // login page will not have a cached user if (!egAuth.user()) return; $scope.username = egAuth.user().usrname();