|
1 | 1 | /*!
|
2 |
| - * jQuery Steps v1.0.2 - 08/25/2013 |
| 2 | + * jQuery Steps v1.1.0 - 09/28/2013 |
3 | 3 | * Copyright (c) 2013 Rafael Staib (http://www.jquery-steps.com)
|
4 | 4 | * Licensed under MIT http://www.opensource.org/licenses/MIT
|
5 | 5 | */
|
@@ -111,6 +111,22 @@ function format(value)
|
111 | 111 | return value;
|
112 | 112 | }
|
113 | 113 |
|
| 114 | +function getCurrentEnumKey(enumType, value) |
| 115 | +{ |
| 116 | + validateArgument("enumType", enumType); |
| 117 | + validateArgument("value", value); |
| 118 | + |
| 119 | + for (var key in enumType) |
| 120 | + { |
| 121 | + if (enumType[key] === value) |
| 122 | + { |
| 123 | + return key; |
| 124 | + } |
| 125 | + } |
| 126 | + |
| 127 | + throwError("Invalid enum value '{0}'.", value); |
| 128 | +} |
| 129 | + |
114 | 130 | function getStepAnchor(wizard, index)
|
115 | 131 | {
|
116 | 132 | var uniqueId = getUniqueId(wizard);
|
@@ -621,14 +637,16 @@ function render(wizard, options, state)
|
621 | 637 | var wrapperTemplate = "<{0} class=\"{1}\">{2}</{0}>",
|
622 | 638 | orientation = getValidEnumValue(stepsOrientation, options.stepsOrientation),
|
623 | 639 | verticalCssClass = (orientation === stepsOrientation.vertical) ? " vertical" : "",
|
| 640 | + effect = getValidEnumValue(transitionEffect, options.transitionEffect), |
| 641 | + effectCssClass = getCurrentEnumKey(transitionEffect, effect) + "Fx", |
624 | 642 | contentWrapper = $(format(wrapperTemplate, options.contentContainerTag, "content " + options.clearFixCssClass, wizard.html())),
|
625 | 643 | stepsWrapper = $(format(wrapperTemplate, options.stepsContainerTag, "steps " + options.clearFixCssClass, "<ul role=\"tablist\"></ul>")),
|
626 | 644 | stepTitles = contentWrapper.children(options.headerTag),
|
627 | 645 | stepContents = contentWrapper.children(options.bodyTag);
|
628 | 646 |
|
629 | 647 |
|
630 | 648 | wizard.attr("role", "application").empty().append(stepsWrapper).append(contentWrapper)
|
631 |
| - .addClass(options.cssClass + " " + options.clearFixCssClass + verticalCssClass); |
| 649 | + .addClass(options.cssClass + " " + effectCssClass + " " + options.clearFixCssClass + verticalCssClass); |
632 | 650 |
|
633 | 651 |
|
634 | 652 | stepContents.each(function (index)
|
@@ -1004,6 +1022,8 @@ var defaults = $.fn.steps.defaults = {
|
1004 | 1022 |
|
1005 | 1023 | autoFocus: false,
|
1006 | 1024 |
|
| 1025 | + dynamicHeight: false, |
| 1026 | + |
1007 | 1027 | enableAllSteps: false,
|
1008 | 1028 |
|
1009 | 1029 | enableKeyNavigation: true,
|
|
0 commit comments