Browse Source

Update text and end slide case when in manual mode and pushing play to show tour again.

pull/149/head
Evan Theurer 11 years ago
parent
commit
4ddc998504
  1. 9
      static/js/directives/helptour.js
  2. 2
      static/partials/helpoverlay.html

9
static/js/directives/helptour.js

@ -46,15 +46,18 @@ define(['jquery', 'text!partials/helpoverlay.html', 'text!partials/helptour.html @@ -46,15 +46,18 @@ define(['jquery', 'text!partials/helpoverlay.html', 'text!partials/helptour.html
inStep(i);
}, displayTime * i, true);
timeoutAutoStepsOut[i] = $timeout(function() {
outStep(i);
outStep();
if ($scope.steps.length === i + 1) {
$scope.togglePause();
}
}, displayTime * (i + 1), true);
};
var autoTour = function(startIndex) {
// start again from the beginning
if (startIndex === undefined || startIndex === $scope.steps.length - 1) {
if (!startIndex) {
startIndex = 0;
// start again from the beginning and ensure window is hidden
} else if (startIndex === $scope.steps.length - 1) {
outStep();
startIndex = 0;
}
$scope.steps.each(function(i, x) {

2
static/partials/helpoverlay.html

@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
</div>
</div>
<div class="popover in tourControl" ng-if="currentIndex !== null">
<div class="arrow"></div><h3 class="popover-title ng-binding">Tour Control - {{currentIndex + 1}} of {{steps.length}}</h3>
<div class="arrow"></div><h3 class="popover-title ng-binding">{{_('Tour Control')}} / {{_('Window %d of %d', currentIndex + 1, steps.length)}}</h3>
<div class="popover-content ng-binding">
<div class="btn-group">
<button class="btn btn-default" ng-click="exitTour()"><i class="fa fa-stop"></i></button>

Loading…
Cancel
Save