Tutorial improvements

- Skip the build-related tutorial steps when builds are disabled
- Make the styling of the tutorial more consistent with the new layout
This commit is contained in:
Joseph Schorr 2015-06-04 14:15:47 -04:00
parent 04678e4e64
commit 4347e2f344
8 changed files with 28 additions and 15 deletions

View file

@ -13,7 +13,7 @@
}, ['old-layout']);
}]);
function TutorialCtrl($scope, AngularTour, AngularTourSignals, UserService, Config) {
function TutorialCtrl($scope, AngularTour, AngularTourSignals, UserService, Config, Features) {
// Default to showing sudo on all commands if on linux.
var showSudo = navigator.appVersion.indexOf("Linux") != -1;
@ -149,8 +149,8 @@
'overlayable': true
},
{
'content': 'To view the permissions for a repository, click on the gear tab',
'element': '#settingTab',
'content': 'To view the permissions for a repository, click on the Gear tab',
'element': '#settingsTab',
'overlayable': true,
'signal': AngularTourSignals.elementVisible('*[id="repoPermissions"]')
},
@ -177,17 +177,20 @@
'content': 'Repositories can be automatically populated in response to a Dockerfile build. To view the build settings for a repository, click on the builds tab',
'element': '#buildsTab',
'overlayable': true,
'signal': AngularTourSignals.elementVisible('*[id="repoBuilds"]')
'signal': AngularTourSignals.elementVisible('*[id="repoBuilds"]'),
'skip': !Features.BUILD_SUPPORT
},
{
'content': 'New build triggers can be created by clicking the "Create Build Trigger" button.',
'element': '#addBuildTrigger',
'overlayable': true
'overlayable': true,
'skip': !Features.BUILD_SUPPORT
},
{
'content': 'The full build history can always be referenced and filtered in the builds list.',
'element': '#repoBuilds',
'overlayable': true
'overlayable': true,
'skip': !Features.BUILD_SUPPORT
},
{
'templateUrl': '/static/tutorial/done.html',

View file

@ -159,6 +159,10 @@ angular.module("angular-tour", [])
}
$scope.step = $scope.tour.steps[stepIndex];
if ($scope.step.skip) {
$scope.setStepIndex(stepIndex + 1);
return;
}
fireMixpanelEvent();