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

[NodeBundle] Fix page edit tab logic #646

Merged
merged 1 commit into from
Aug 22, 2015

Conversation

jockri
Copy link
Contributor

@jockri jockri commented Aug 20, 2015

Q A
Bug fix? yes
New feature? yes
BC breaks? no
Deprecations? no
Fixed tickets
  • When you click on a tab, the url changes (?currenttab=menu) [new feature]
  • When you have the tab in the url, the tab will be activated [this was broken]
  • When you submit the form, when the page refreshes, the tab will be opened again [this was broken]

@roderik
Copy link
Contributor

roderik commented Aug 20, 2015

@diskwriter js,ok?

@@ -18,6 +21,44 @@ kunstmaanbundles.autoCollapseTabs = (function($, window, undefined) {
}); // when window is resized
};

initTabLogic = function () {
// If there is a tab defined in the url, we activate it
if ($('#currenttab') && $('#currenttab').val().length > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe save $('#currenttab') to a var so it does not have to be re-selected all the time.

@jockri
Copy link
Contributor Author

jockri commented Aug 21, 2015

I have added a check that history.pushState is supported or not.
On IE9, when you click on a tab, the url will not be change. If you submit the form, the correct tab will still be activated.

roderik pushed a commit that referenced this pull request Aug 22, 2015
[NodeBundle] Fix page edit tab logic
@roderik roderik merged commit d2791f0 into Kunstmaan:master Aug 22, 2015
@jockri jockri deleted the fix-page-edit-tab-logic branch August 24, 2015 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants