mirror of
https://github.com/ExactTarget/fuelux.git
synced 2026-04-26 03:00:10 -04:00
wizard namespaced
This commit is contained in:
16
js/wizard.js
16
js/wizard.js
@@ -220,7 +220,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
this.$element.trigger('changed');
|
||||
this.$element.trigger('changed.fu.wizard');
|
||||
},
|
||||
|
||||
stepclicked: function (e) {
|
||||
@@ -235,9 +235,9 @@
|
||||
}
|
||||
|
||||
if( canMovePrev ) {
|
||||
var evt = $.Event('stepclick');
|
||||
var evt = $.Event('stepclick.fu.wizard');
|
||||
this.$element.trigger(evt, {step: index + 1});
|
||||
if (evt.isDefaultPrevented()) return;
|
||||
if (evt.isDefaultPrevented()) { return; }
|
||||
|
||||
this.currentStep = (index + 1);
|
||||
this.setState();
|
||||
@@ -271,7 +271,7 @@
|
||||
if (canMovePrev) {
|
||||
var e = $.Event('change');
|
||||
this.$element.trigger(e, {step: this.currentStep, direction: 'previous'});
|
||||
if (e.isDefaultPrevented()) return;
|
||||
if (e.isDefaultPrevented()) { return; }
|
||||
|
||||
this.currentStep -= 1;
|
||||
this.setState();
|
||||
@@ -286,13 +286,13 @@
|
||||
var e = $.Event('change');
|
||||
this.$element.trigger(e, {step: this.currentStep, direction: 'next'});
|
||||
|
||||
if (e.isDefaultPrevented()) return;
|
||||
if (e.isDefaultPrevented()) { return; }
|
||||
|
||||
this.currentStep += 1;
|
||||
this.setState();
|
||||
}
|
||||
else if (lastStep) {
|
||||
this.$element.trigger('finished');
|
||||
this.$element.trigger('finished.fu.wizard');
|
||||
}
|
||||
},
|
||||
|
||||
@@ -358,9 +358,9 @@
|
||||
|
||||
// WIZARD DATA-API
|
||||
|
||||
$('body').on('mouseover.wizard.data-api', '.wizard', function () {
|
||||
$('body').on('mouseover.fu.wizard.data-api', '.wizard', function () {
|
||||
var $this = $(this);
|
||||
if ($this.data('wizard')) return;
|
||||
if ($this.data('wizard')) { return; }
|
||||
$this.wizard($this.data());
|
||||
});
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ define(function(require){
|
||||
var $wizard = $(html).find('#MyWizard').wizard();
|
||||
var eventFired = false;
|
||||
|
||||
$wizard.on('changed', function (evt, data) {
|
||||
$wizard.on('changed.fu.wizard', function (evt, data) {
|
||||
eventFired = true;
|
||||
});
|
||||
|
||||
@@ -104,7 +104,7 @@ define(function(require){
|
||||
var $wizard = $(html).find('#MyWizard').wizard();
|
||||
var eventFired = false;
|
||||
|
||||
$wizard.on('stepclick', function (evt, data) {
|
||||
$wizard.on('stepclick.fu.wizard', function (evt, data) {
|
||||
eventFired = true;
|
||||
return evt.preventDefault(); // prevent action
|
||||
});
|
||||
@@ -126,7 +126,7 @@ define(function(require){
|
||||
var $wizard = $(html).find('#MyWizard').wizard();
|
||||
var eventFired = false;
|
||||
|
||||
$wizard.on('finished', function (evt, data) {
|
||||
$wizard.on('finished.fu.wizard', function (evt, data) {
|
||||
eventFired = true;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user