mstratman / jQuery-Smart-Wizard

flexible jQuery plug-in that gives wizard like interface
http://mstratman.github.com/jQuery-Smart-Wizard/
304 stars 164 forks source link

Next/Previous buttons don't get disabled if the corresponding step is disabled #57

Open TPucke opened 10 years ago

TPucke commented 10 years ago

I am using public api function disableStep to prevent the user from going back to a previous step once the wizard reaches a certain point in the use case. However, the Previous button does not become disabled and the user can simply click it to go back to the disabled step. It would appear that an additional test is called for in the internal function _adjustButton to only enable the Previous button in the case that the corresponding step itself is enabled. Same discussion obviously applies to the Next button.

update: My call to disableStep is in my showStep event handler. Maybe this issue relates not only to _adjustButton but also to disableStep for complete solution (since _adjustButton appears to be running before the showStep event handler.

Thanks for considering.

Sherman-Zhou commented 10 years ago

---原始邮件--- 发件人:"TPucke"notifications@github.com 发送时间:2014年4月15日 星期二 上午5:49 收件人:"mstratman/jQuery-Smart-Wizard"jQuery-Smart-Wizard@noreply.github.com 主题:[jQuery-Smart-Wizard] Next/Previous buttons don't get disabled if thecorresponding step is disabled (#57)

I believe this relates to your internal function _adjustButton.

I am using public api function disableStep to prevent the user from going back to a previous step once the wizard reaches a certain point in the use case. However, the Previous button does not become disabled and the user can click it to go back to the disabled step. It would appear that an additional test is called for in _adjustButton to only enable the Next/Previous buttons if the corresponding steps are enabled. Thanks for considering.

— Reply to this email directly orview it on GitHub.