Browse files

Added missing files.

  • Loading branch information...
1 parent 4548877 commit d88f30dec87fb9b37c4ecf381e3b50b5cf9ba56c Jan Sundman committed Sep 18, 2012
Showing with 12 additions and 7 deletions.
  1. +4 −0 changelog.txt
  2. +8 −7 js/jquery.form.wizard.js
View
4 changelog.txt
@@ -1,3 +1,7 @@
+September 18. 2012
+
+- Added event before_step_shown which is triggered before a step transition is started.
+
August 17. 2012
- Bug fix for data returned from the 'state' method. The 'firstStep' field contained invalid value if the first step was removed and the method 'update_steps' was called.
View
15 js/jquery.form.wizard.js
@@ -1,8 +1,8 @@
/*
- * jQuery wizard plug-in 3.0.6 (17-AUG-2011)
+ * jQuery wizard plug-in 3.0.7 (18-SEPT-2012)
*
*
- * Copyright (c) 2010 Jan Sundman (jan.sundman[at]aland.net)
+ * Copyright (c) 2012 Jan Sundman (jan.sundman[at]aland.net)
*
* http://www.thecodemine.org
*
@@ -260,15 +260,14 @@
}
},
- _animate : function(oldStep, newStep, stepToShowCallback, stepShownCallback){
+ _animate : function(oldStep, newStep, stepShownCallback){
this._disableNavigation();
var old = this.steps.filter("#" + oldStep);
var current = this.steps.filter("#" + newStep);
old.find(":input").not(".wizard-ignore").attr("disabled","disabled");
current.find(":input").not(".wizard-ignore").removeAttr("disabled");
var wizard = this;
old.animate(wizard.options.outAnimation, wizard.options.outDuration, wizard.options.easing, function(){
- stepToShowCallback.apply(wizard);
current.animate(wizard.options.inAnimation, wizard.options.inDuration, wizard.options.easing, function(){
if(wizard.options.focusFirstInput)
current.find(":input:first").focus();
@@ -334,9 +333,11 @@
this.previousStep = this.currentStep;
this._checkIflastStep(step);
this.currentStep = step;
- var stepShownCallback = function(){if(triggerStepShown)$(this.element).trigger('step_shown', $.extend({"isBackNavigation" : backwards},this._state()));};
- var stepToShowCallback = function(){if(triggerStepShown)$(this.element).trigger('step_to_show', $.extend({"isBackNavigation" : backwards},this._state()));};
- this._animate(this.previousStep, step, stepToShowCallback, stepShownCallback);
+ var stepShownCallback = function(){if(triggerStepShown){$(this.element).trigger('step_shown', $.extend({"isBackNavigation" : backwards},this._state()));}}
+ if(triggerStepShown){
+ $(this.element).trigger('before_step_shown', $.extend({"isBackNavigation" : backwards},this._state()));
+ }
+ this._animate(this.previousStep, step, stepShownCallback);
};

0 comments on commit d88f30d

Please sign in to comment.