You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ss...@apache.org on 2013/07/26 19:37:11 UTC

git commit: Prefer "ng-show" to jQuery accessors

Updated Branches:
  refs/heads/master 4281336bd -> 649f89948


Prefer "ng-show" to jQuery accessors

The loading GIF can be shown/hidden based on a scope variable without
involving jQuery (down w/ jQuery).

"#navbar" is never hidden, and so the "show()" call was unneeded.

Review: http://reviews.apache.org/r/12831


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/649f8994
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/649f8994
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/649f8994

Branch: refs/heads/master
Commit: 649f89948d8deef2f15bf934d2bcab60208d67c7
Parents: 4281336
Author: Ross Allen <re...@gmail.com>
Authored: Fri Jul 19 17:40:54 2013 -0700
Committer: Ross Allen <re...@gmail.com>
Committed: Fri Jul 26 10:37:06 2013 -0700

----------------------------------------------------------------------
 src/webui/master/static/index.html        | 2 +-
 src/webui/master/static/js/controllers.js | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/649f8994/src/webui/master/static/index.html
----------------------------------------------------------------------
diff --git a/src/webui/master/static/index.html b/src/webui/master/static/index.html
index 296547a..d0f5d8b 100644
--- a/src/webui/master/static/index.html
+++ b/src/webui/master/static/index.html
@@ -21,7 +21,7 @@
   </head>
 
   <body>
-    <div id="loading" style="width: 75px; margin: 0 auto; text-align: center;">
+    <div data-ng-show="doneLoading" style="width: 75px; margin: 0 auto; text-align: center;">
       <img src="/static/img/loading.gif" height="64" width="64" alt="">
     </div>
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/649f8994/src/webui/master/static/js/controllers.js
----------------------------------------------------------------------
diff --git a/src/webui/master/static/js/controllers.js b/src/webui/master/static/js/controllers.js
index dae12b6..7f89a41 100644
--- a/src/webui/master/static/js/controllers.js
+++ b/src/webui/master/static/js/controllers.js
@@ -260,9 +260,7 @@
   // active controller/view to easily access anything in scope (e.g.,
   // the state).
   mesosApp.controller('MainCntl', function($scope, $http, $route, $routeParams, $location, $timeout) {
-    // Turn off the loading gif, turn on the navbar.
-    $("#loading").hide();
-    $("#navbar").show();
+    $scope.doneLoading = true;
 
     // Adding bindings into scope so that they can be used from within
     // AngularJS expressions.