From 895a00de3163d84022a7dedbd6bbd14a55c9a0a0 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 13 Feb 2014 18:15:19 -0500 Subject: [PATCH] Handle the case where the user has not selected the correct namespace in the repo list --- static/js/controllers.js | 15 +++++++++++---- static/tutorial/waiting-repo-list.html | 7 +++++++ 2 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 static/tutorial/waiting-repo-list.html diff --git a/static/js/controllers.js b/static/js/controllers.js index 99cc1781a..9111a4566 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -66,9 +66,11 @@ function TutorialCtrl($scope, AngularTour, AngularTourSignals, UserService) { 'title': 'Sign in to get started', 'templateUrl': '/static/tutorial/signup.html', 'signal': function($tourScope) { - $tourScope.username = UserService.currentUser().username; - $tourScope.email = UserService.currentUser().email; - return !UserService.currentUser().anonymous; + var user = UserService.currentUser(); + $tourScope.username = user.username; + $tourScope.email = user.email; + $tourScope.inOrganization = user.organizations && user.organizations.length > 0; + return !user.anonymous; } }, { @@ -121,7 +123,12 @@ function TutorialCtrl($scope, AngularTour, AngularTourSignals, UserService) { 'mixpanelEvent': 'tutorial_push_complete' }, { - 'content': 'Waiting for the page to load', + 'templateUrl': '/static/tutorial/view-repo.html', + 'signal': AngularTourSignals.matchesLocation('/repository/'), + 'overlayable': true + }, + { + 'templateUrl': '/static/tutorial/waiting-repo-list.html', 'signal': AngularTourSignals.elementAvaliable('*[data-repo="{{username}}/{{repoName}}"]'), 'overlayable': true }, diff --git a/static/tutorial/waiting-repo-list.html b/static/tutorial/waiting-repo-list.html new file mode 100644 index 000000000..c02090b89 --- /dev/null +++ b/static/tutorial/waiting-repo-list.html @@ -0,0 +1,7 @@ +

+ Waiting for your repository to be listed. +

+ +

+ Please make sure the {{ tour.tourScope.username }} namespace is selected. +