[IMP] Tour: method names
bzr revid: ddm@openerp.com-20131121112312-2n8kd2tja6upji3i
This commit is contained in:
parent
ec4372ac23
commit
77c60a94be
|
@ -127,7 +127,7 @@
|
|||
];
|
||||
return this._super();
|
||||
},
|
||||
continueTour: function () {
|
||||
continue: function () {
|
||||
return (this.isCurrentStep('part-2') || this.isCurrentStep('show-tutorials')) && !this.tour.ended();
|
||||
},
|
||||
});
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
$('.popover.tour').remove();
|
||||
},
|
||||
start: function () {
|
||||
if (this.continueTour() || ((this.currentStepIndex() === 0) && !this.tour.ended())) {
|
||||
if (this.continue() || ((this.currentStepIndex() === 0) && !this.tour.ended())) {
|
||||
this.tour.start();
|
||||
}
|
||||
},
|
||||
|
@ -68,11 +68,11 @@
|
|||
window.location.replace(newUrl);
|
||||
}
|
||||
},
|
||||
continueTour: function () {
|
||||
continue: function () {
|
||||
// Override if necessary
|
||||
return this.currentStepIndex() === 0;
|
||||
},
|
||||
isTriggerUrl: function (url) {
|
||||
trigger: function (url) {
|
||||
// Override if necessary
|
||||
url = url || new website.UrlParser(window.location.href);
|
||||
var urlTrigger = this.id + "=true";
|
||||
|
@ -120,7 +120,7 @@
|
|||
tour.start();
|
||||
});
|
||||
menu.append($menuItem);
|
||||
if (tour.isTriggerUrl()) {
|
||||
if (tour.trigger()) {
|
||||
tour.start();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -107,11 +107,11 @@
|
|||
];
|
||||
return this._super();
|
||||
},
|
||||
continueTour: function () {
|
||||
continue: function () {
|
||||
return this.isCurrentStep('post-page') && !this.tour.ended();
|
||||
},
|
||||
isTriggerUrl: function () {
|
||||
return (this.continueTour() && this.testUrl(/^\/blog\/[0-9]+\/\?enable_editor=1/)) || this._super();
|
||||
trigger: function () {
|
||||
return (this.continue() && this.testUrl(/^\/blog\/[0-9]+\/\?enable_editor=1/)) || this._super();
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -74,11 +74,11 @@
|
|||
];
|
||||
return this._super();
|
||||
},
|
||||
continueTour: function () {
|
||||
continue: function () {
|
||||
return this.isCurrentStep('event-page') && !this.tour.ended();
|
||||
},
|
||||
isTriggerUrl: function () {
|
||||
return (this.continueTour() && this.testUrl(/^\/event\/[0-9]+\/\?enable_editor=1/)) || this._super();
|
||||
trigger: function () {
|
||||
return (this.continue() && this.testUrl(/^\/event\/[0-9]+\/\?enable_editor=1/)) || this._super();
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -83,11 +83,11 @@
|
|||
];
|
||||
return this._super();
|
||||
},
|
||||
continueTour: function () {
|
||||
continue: function () {
|
||||
return this.isCurrentStep('product-page') && !this.tour.ended();
|
||||
},
|
||||
isTriggerUrl: function (url) {
|
||||
return (this.continueTour() && this.testUrl(/^\/shop\/product\/[0-9]+\/\?enable_editor=1/)) || this._super();
|
||||
trigger: function (url) {
|
||||
return (this.continue() && this.testUrl(/^\/shop\/product\/[0-9]+\/\?enable_editor=1/)) || this._super();
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue