|
391 | 391 | state.stepCount = $(".body", contentContainer).length;
|
392 | 392 | state.currentStep = getStepProperties(wizard, state.currentIndex);
|
393 | 393 |
|
394 |
| - updateIdentifiers(wizard, index); |
| 394 | + updateSteps(wizard, index); |
395 | 395 | refreshActionState(wizard);
|
396 | 396 |
|
397 | 397 | return true;
|
|
475 | 475 | state.stepCount = contentContainer.children(".body").length;
|
476 | 476 | state.currentStep = getStepProperties(wizard, state.currentIndex);
|
477 | 477 |
|
478 |
| - updateIdentifiers(wizard, index); |
| 478 | + updateSteps(wizard, index); |
479 | 479 | refreshActionState(wizard);
|
480 | 480 |
|
481 | 481 | return wizard;
|
|
828 | 828 | }
|
829 | 829 |
|
830 | 830 | /**
|
831 |
| - * Updates identifiers for step buttons and their related titles. |
| 831 | + * Updates step buttons and their related titles. |
832 | 832 | *
|
833 | 833 | * @private
|
834 |
| - * @method updateIdentifiers |
| 834 | + * @method updateSteps |
835 | 835 | * @param wizard {Object} A jQuery wizard object
|
836 | 836 | * @param index {Integer} The start point for updating ids
|
837 | 837 | */
|
838 |
| - function updateIdentifiers(wizard, index) |
| 838 | + function updateSteps(wizard, index) |
839 | 839 | {
|
| 840 | + var options = wizard.data("options"); |
| 841 | + |
840 | 842 | for (var i = index; i < wizard.data("state").stepCount; i++)
|
841 | 843 | {
|
842 |
| - $(".steps > ol > li:eq(" + i + ") > a", wizard).attr("href", "#" + getUniqueId(wizard) + "-" + i); |
843 |
| - $(".content > .title:eq(" + i + ")", wizard).attr("id", getUniqueId(wizard) + "-" + i); |
| 844 | + var title = $(".content > .title:eq(" + i + ")", wizard).attr("id", getUniqueId(wizard) + "-" + i); |
| 845 | + $(".steps > ol > li:eq(" + i + ") > a", wizard).attr("href", "#" + getUniqueId(wizard) + "-" + i) |
| 846 | + .html(renderTemplate(options.titleTemplate, { index: i + 1, title: title.html() })); |
844 | 847 | }
|
845 | 848 | }
|
846 | 849 |
|
|
0 commit comments