[IMP] Minor tutorial improvements

bzr revid: ddm@openerp.com-20131004100315-hshfanxesnm478n3
This commit is contained in:
ddm 2013-10-04 12:03:15 +02:00
parent 0dc3c46655
commit e76ce7da82
2 changed files with 7 additions and 7 deletions

View File

@ -32,12 +32,12 @@
step.title = render('website.tour_title', { title: step.title });
return step;
}));
if (!self.doNotContinue()) {
if (self.canResume()) {
self.tour.start();
}
},
doNotContinue: function () {
return this.currentStepIndex() > 0 || this.tour.ended();
canResume: function () {
return this.currentStepIndex() === 0 && !this.tour.ended();
},
currentStepIndex: function () {
return parseInt(this.tourStorage.getItem(this.id+'_current_step'), 10);
@ -185,10 +185,10 @@
];
return this._super();
},
doNotContinue: function () {
canResume: function () {
var currentStepIndex = this.currentStepIndex();
var secondPartIndex = this.indexOfStep('part-2');
return currentStepIndex > 0 && currentStepIndex !== secondPartIndex;
return currentStepIndex === 0 || currentStepIndex === secondPartIndex;
}
});

View File

@ -23,13 +23,13 @@
<li class="divider-vertical"></li>
<li><a data-action="promote-current-page" href="#"><span title="Promote page on the web">Promote</span></a></li>
<li class="dropdown">
<a id="customize-menu-button" class="dropdown-toggle" data-toggle="dropdown" href="#">Customize<span class="caret"></span></a>
<a id="customize-menu-button" class="dropdown-toggle" data-toggle="dropdown" href="#">Customize <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu" id="customize-menu">
<!-- filled in JS -->
</ul>
</li>
<li class="dropdown">
<a id="help-menu-button" class="dropdown-toggle" data-toggle="dropdown" href="#">Help<span class="caret"></span></a>
<a id="help-menu-button" class="dropdown-toggle" data-toggle="dropdown" href="#">Help <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu" id="help-menu">
<!-- filled in JS -->
</ul>