staff web : navbar docs repair
authorBill Erickson <berick@esilibrary.com>
Thu, 24 Oct 2013 20:39:04 +0000 (16:39 -0400)
committerBill Erickson <berick@esilibrary.com>
Thu, 24 Oct 2013 20:39:04 +0000 (16:39 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/web/js/ui/default/staff/navbar.js

index 1995c5c..48de8f2 100644 (file)
@@ -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();