Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EditEmployee: Missing currently selected tab on postback #43

Closed
roman-yagodin opened this issue Oct 30, 2014 · 2 comments
Closed

EditEmployee: Missing currently selected tab on postback #43

roman-yagodin opened this issue Oct 30, 2014 · 2 comments
Labels

Comments

@roman-yagodin
Copy link
Member

When working with EditEmployee form, postback often causes switch to another tabs - this leads to losing user's focus on the current work and may lead to major data-entering errors.

@roman-yagodin
Copy link
Member Author

The issue is caused by dnnTabs jQuery plugin behavior - it stores currently selected tab in the cookie by 2 minutes by default, and (just my thinking) not updates it every time when tab is switched by user. This may be fine with AJAX-based queries, as then dnnTabs() is calling just once - but not with standard ASP.NET postbacks, as we need to call dnnTabs() function every single page load.

@roman-yagodin
Copy link
Member Author

The idea behind the fix: use ViewState to store selected tab number and pass it to dnnTabs () function every page load. Default value is 0 (no ViewState ~ first load), so first tab is selected by default. Then, for each postback event handler, we update ViewState to the number of tab, on which control (postback) is located.

Solution is not very elegant, but working. Also need check how it will work along with form validation, as dnnTabs () should automatically switch to the tab where invalidated messages appears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant