From c7e83c4d41fcdb6f0d0079221d8425817e4af522 Mon Sep 17 00:00:00 2001 From: yackob03 Date: Wed, 2 Oct 2013 01:03:48 -0400 Subject: [PATCH] Show a loading spinner while we're waiting for subscription information. --- static/js/controllers.js | 6 ++++++ static/partials/user-admin.html | 5 ++++- templates/index.html | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/static/js/controllers.js b/static/js/controllers.js index 594c98ec7..9930dad0d 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -445,10 +445,16 @@ function UserAdminCtrl($scope, Restangular) { planDict[$scope.plans[i].stripeId] = $scope.plans[i]; } + $('.spin').spin(); + + $scope.loading = true; var getSubscription = Restangular.one('user/plan'); getSubscription.get().then(function(sub) { // User has a subscription $scope.subscription = sub; + $scope.loading = false; + }, function() { + $scope.loading = false; }); $scope.subscribe = function(planId) { diff --git a/static/partials/user-admin.html b/static/partials/user-admin.html index 7a006d92b..d93540136 100644 --- a/static/partials/user-admin.html +++ b/static/partials/user-admin.html @@ -1,5 +1,5 @@
-
+
@@ -18,4 +18,7 @@
+
+
+
\ No newline at end of file diff --git a/templates/index.html b/templates/index.html index abeacce51..118864f33 100644 --- a/templates/index.html +++ b/templates/index.html @@ -70,6 +70,7 @@