Skip to content

Commit 551c2cd

Browse files
author
Rafael J. Staib
committed
Add new behaviour for the internal id handling
1 parent 04a352e commit 551c2cd

9 files changed

+38
-9
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 1.0.2
4+
5+
- 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
6+
- Bug fix for having the same tag for titles and panels
7+
38
## 1.0.1
49

510
- Fixed an iframe border and scrolling issue for older browsers (IE8 and lower)

build/jquery.steps-1.0.1.zip

-12.5 KB
Binary file not shown.

build/jquery.steps-1.0.2.zip

12.6 KB
Binary file not shown.

build/jquery.steps.js

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* jQuery Steps v1.0.1 - 08/23/2013
2+
* jQuery Steps v1.0.2 - 08/25/2013
33
* Copyright (c) 2013 Rafael Staib (http://www.jquery-steps.com)
44
* Licensed under MIT http://www.opensource.org/licenses/MIT
55
*/
@@ -165,7 +165,14 @@ function getUniqueId(wizard)
165165

166166
if (uniqueId == null)
167167
{
168-
uniqueId = "steps-uid-".concat(++_uniqueId);
168+
uniqueId = wizard._getId();
169+
if (uniqueId == null)
170+
{
171+
uniqueId = "steps-uid-".concat(_uniqueId);
172+
wizard._setId(uniqueId);
173+
}
174+
175+
_uniqueId++;
169176
wizard.data("uid", uniqueId);
170177
}
171178

@@ -1089,6 +1096,11 @@ $.fn.extend({
10891096
return this.removeClass("current")._aria("selected", "false");
10901097
},
10911098

1099+
_getId: function ()
1100+
{
1101+
return this.attr("id");
1102+
},
1103+
10921104
_setId: function (id)
10931105
{
10941106
return this.attr("id", id);

build/jquery.steps.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "jquery-steps",
33
"title": "jQuery Steps",
4-
"version": "1.0.1",
4+
"version": "1.0.2",
55
"description": "A powerful jQuery wizard plugin that supports accessibility and HTML5",
66
"homepage": "http://www.jquery-steps.com",
77
"author": {
@@ -39,8 +39,8 @@
3939
"grunt-contrib-concat": "~0.3.0",
4040
"grunt-contrib-yuidoc": "~0.4.0",
4141
"grunt-contrib-clean": "~0.4.1",
42-
"grunt-regex-replace": "~0.2.5",
43-
"grunt-contrib-compress": "~0.5.2"
42+
"grunt-contrib-compress": "~0.5.2",
43+
"grunt-regex-replace": "~0.2.5"
4444
},
4545
"readmeFilename": "README.md",
4646
"gitHead": "0d9f4f8b6a0c3d3b8a73eabf6a4b8cececd52f7a",

src/helper.js

+5
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ $.fn.extend({
3939
return this.removeClass("current")._aria("selected", "false");
4040
},
4141

42+
_getId: function ()
43+
{
44+
return this.attr("id");
45+
},
46+
4247
_setId: function (id)
4348
{
4449
return this.attr("id", id);

src/privates.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,14 @@ function getUniqueId(wizard)
253253

254254
if (uniqueId == null)
255255
{
256-
uniqueId = "steps-uid-".concat(++_uniqueId);
256+
uniqueId = wizard._getId();
257+
if (uniqueId == null)
258+
{
259+
uniqueId = "steps-uid-".concat(_uniqueId);
260+
wizard._setId(uniqueId);
261+
}
262+
263+
_uniqueId++;
257264
wizard.data("uid", uniqueId);
258265
}
259266

steps.jquery.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"tabs",
1515
"steps"
1616
],
17-
"version": "1.0.1",
17+
"version": "1.0.2",
1818
"author": {
1919
"name": "Rafael Staib",
2020
"email": "me@rafaelstaib.com",

0 commit comments

Comments
 (0)