From b415d07f8a3a2fb62c18e7fdc6c2483afe69ce90 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 24 Oct 2013 16:39:04 -0400 Subject: [PATCH] staff web : navbar docs repair Signed-off-by: Bill Erickson --- Open-ILS/web/js/ui/default/staff/navbar.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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(); -- 2.11.0