diff --git a/CHANGELOG.md b/CHANGELOG.md index de399a3..a136477 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 1.1.0 + +- Adding an id to the outer control wrapper tag will have as of now an impact on the internal uniqueid handling and therefore to the sub tag ids as well +- Bug fix for having the same tag for titles and panels +- AJAX crawling scheme support for SEO +- History support for newer browsers (pushState) [#5](https://github.com/rstaib/jquery-steps/issues/5) +- Dynamic height calculation [#8](https://github.com/rstaib/jquery-steps/issues/8) +- AMD support + ## 1.0.1 - Fixed an iframe border and scrolling issue for older browsers (IE8 and lower) diff --git a/CNAME b/CNAME deleted file mode 100644 index 64e4540..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -www.jquery-steps.com \ No newline at end of file diff --git a/build/jquery.steps-1.0.1.zip b/build/jquery.steps-1.0.1.zip deleted file mode 100644 index bd0519f..0000000 Binary files a/build/jquery.steps-1.0.1.zip and /dev/null differ diff --git a/build/jquery.steps-1.1.0.zip b/build/jquery.steps-1.1.0.zip new file mode 100644 index 0000000..97aae28 Binary files /dev/null and b/build/jquery.steps-1.1.0.zip differ diff --git a/build/jquery.steps.js b/build/jquery.steps.js index f7c5928..7441755 100644 --- a/build/jquery.steps.js +++ b/build/jquery.steps.js @@ -1,5 +1,5 @@ /*! - * jQuery Steps v1.0.1 - 08/23/2013 + * jQuery Steps v1.1.0 - 09/28/2013 * Copyright (c) 2013 Rafael Staib (http://www.jquery-steps.com) * Licensed under MIT http://www.opensource.org/licenses/MIT */ @@ -111,6 +111,22 @@ function format(value) return value; } +function getCurrentEnumKey(enumType, value) +{ + validateArgument("enumType", enumType); + validateArgument("value", value); + + for (var key in enumType) + { + if (enumType[key] === value) + { + return key; + } + } + + throwError("Invalid enum value '{0}'.", value); +} + function getStepAnchor(wizard, index) { var uniqueId = getUniqueId(wizard); @@ -165,7 +181,14 @@ function getUniqueId(wizard) if (uniqueId == null) { - uniqueId = "steps-uid-".concat(++_uniqueId); + uniqueId = wizard._getId(); + if (uniqueId == null) + { + uniqueId = "steps-uid-".concat(_uniqueId); + wizard._setId(uniqueId); + } + + _uniqueId++; wizard.data("uid", uniqueId); } @@ -614,6 +637,8 @@ function render(wizard, options, state) var wrapperTemplate = "<{0} class=\"{1}\">{2}", orientation = getValidEnumValue(stepsOrientation, options.stepsOrientation), verticalCssClass = (orientation === stepsOrientation.vertical) ? " vertical" : "", + effect = getValidEnumValue(transitionEffect, options.transitionEffect), + effectCssClass = getCurrentEnumKey(transitionEffect, effect) + "Fx", contentWrapper = $(format(wrapperTemplate, options.contentContainerTag, "content " + options.clearFixCssClass, wizard.html())), stepsWrapper = $(format(wrapperTemplate, options.stepsContainerTag, "steps " + options.clearFixCssClass, "")), stepTitles = contentWrapper.children(options.headerTag), @@ -621,7 +646,7 @@ function render(wizard, options, state) wizard.attr("role", "application").empty().append(stepsWrapper).append(contentWrapper) - .addClass(options.cssClass + " " + options.clearFixCssClass + verticalCssClass); + .addClass(options.cssClass + " " + effectCssClass + " " + options.clearFixCssClass + verticalCssClass); stepContents.each(function (index) @@ -997,6 +1022,8 @@ var defaults = $.fn.steps.defaults = { autoFocus: false, + dynamicHeight: false, + enableAllSteps: false, enableKeyNavigation: true, @@ -1089,6 +1116,11 @@ $.fn.extend({ return this.removeClass("current")._aria("selected", "false"); }, + _getId: function () + { + return this.attr("id"); + }, + _setId: function (id) { return this.attr("id", id); diff --git a/build/jquery.steps.min.js b/build/jquery.steps.min.js index 93c9895..1a9603d 100644 --- a/build/jquery.steps.min.js +++ b/build/jquery.steps.min.js @@ -1,6 +1,6 @@ /*! - * jQuery Steps v1.0.1 - 08/23/2013 + * jQuery Steps v1.1.0 - 09/28/2013 * Copyright (c) 2013 Rafael Staib (http://www.jquery-steps.com) * Licensed under MIT http://www.opensource.org/licenses/MIT */ -!function(a,b){function c(a,b){m(a).push(b)}function d(d,e,f){var g=d.children(e.headerTag),h=d.children(e.bodyTag);g.length>h.length?P(X,"contents"):g.lengthb||b>=c.length)&&P(W),c[b]}function o(a){var b=a.data("uid");return null==b&&(b="steps-uid-".concat(++R),a.data("uid",b)),b}function p(a,c){if(Q("enumType",a),Q("keyOrValue",c),"string"==typeof c){var d=a[c];return d===b&&P("The enum key '{0}' does not exist.",c),d}if("number"==typeof c){for(var e in a)if(a[e]===c)return c;P("Invalid enum value '{0}'.",c)}else P("Invalid key or value type.")}function q(a,b,c){return z(a,b,c,t(c,1))}function r(a,b,c){return z(a,b,c,e(c,1))}function s(a,b,c,d){if((0>d||d>=c.stepCount)&&P(W),!(b.forceMoveForward&&de||e>d.stepCount)&&P(W),f=a.extend({},_,f),w(b,e,f),d.currentIndex>=e&&(d.currentIndex++,M(b,c,d)),d.stepCount++;var h=b.find(".content"),j=a(g("<{0}>{1}",c.headerTag,f.title)),k=a(g("<{0}>",c.bodyTag));return(null==f.contentMode||f.contentMode===Y.html)&&k.html(f.content),0===e?h.prepend(k).prepend(j):i(b,e-1).after(k).after(j),I(b,k,e),L(b,c,d,j,e),D(b,c,d,e),B(b,c,d),b}function w(a,b,c){m(a).splice(b,0,c)}function x(b){var c=a(this),d=k(c),e=l(c);if(d.suppressPaginationOnFocus&&c.find(":focus").is(":input"))return b.preventDefault(),!1;var f={left:37,right:39};b.keyCode===f.left?(b.preventDefault(),r(c,d,e)):b.keyCode===f.right&&(b.preventDefault(),q(c,d,e))}function y(b,c,d){if(d.stepCount>0){var e=n(b,d.currentIndex);if(!c.enableContentCache||!e.contentLoaded)switch(p(Y,e.contentMode)){case Y.iframe:b.find(".content > .body").eq(d.currentIndex).empty().html('