[IMP] Minor tutorial improvements
bzr revid: ddm@openerp.com-20131004100315-hshfanxesnm478n3
This commit is contained in:
parent
0dc3c46655
commit
e76ce7da82
|
@ -32,12 +32,12 @@
|
||||||
step.title = render('website.tour_title', { title: step.title });
|
step.title = render('website.tour_title', { title: step.title });
|
||||||
return step;
|
return step;
|
||||||
}));
|
}));
|
||||||
if (!self.doNotContinue()) {
|
if (self.canResume()) {
|
||||||
self.tour.start();
|
self.tour.start();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doNotContinue: function () {
|
canResume: function () {
|
||||||
return this.currentStepIndex() > 0 || this.tour.ended();
|
return this.currentStepIndex() === 0 && !this.tour.ended();
|
||||||
},
|
},
|
||||||
currentStepIndex: function () {
|
currentStepIndex: function () {
|
||||||
return parseInt(this.tourStorage.getItem(this.id+'_current_step'), 10);
|
return parseInt(this.tourStorage.getItem(this.id+'_current_step'), 10);
|
||||||
|
@ -185,10 +185,10 @@
|
||||||
];
|
];
|
||||||
return this._super();
|
return this._super();
|
||||||
},
|
},
|
||||||
doNotContinue: function () {
|
canResume: function () {
|
||||||
var currentStepIndex = this.currentStepIndex();
|
var currentStepIndex = this.currentStepIndex();
|
||||||
var secondPartIndex = this.indexOfStep('part-2');
|
var secondPartIndex = this.indexOfStep('part-2');
|
||||||
return currentStepIndex > 0 && currentStepIndex !== secondPartIndex;
|
return currentStepIndex === 0 || currentStepIndex === secondPartIndex;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -23,13 +23,13 @@
|
||||||
<li class="divider-vertical"></li>
|
<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><a data-action="promote-current-page" href="#"><span title="Promote page on the web">Promote</span></a></li>
|
||||||
<li class="dropdown">
|
<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">
|
<ul class="dropdown-menu" role="menu" id="customize-menu">
|
||||||
<!-- filled in JS -->
|
<!-- filled in JS -->
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="dropdown">
|
<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">
|
<ul class="dropdown-menu" role="menu" id="help-menu">
|
||||||
<!-- filled in JS -->
|
<!-- filled in JS -->
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in New Issue