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

[AdminBundle] Prevent duplicate reinits in same pagepart (reorder) #1106

Merged

Conversation

dannyvw
Copy link
Contributor

@dannyvw dannyvw commented Apr 11, 2016

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets

@jockri
Copy link
Contributor

jockri commented Apr 14, 2016

@diskwriter Can you take a look?

@diskwriter
Copy link
Contributor

Hi Danny

I just noticed there's some duplicate code in this file that shouldn't be there.
Could you please remove the reInit functionality from the $.ajax success handler (https://github.com/insiders/KunstmaanBundlesCMS/blob/bugfix/prevent-reinit-pagepart/src/Kunstmaan/AdminBundle/Resources/ui/js/_pagepart-editor.js#L96) and call the reInit method from there too?

I've also commented for a small improvement.

Thanks in advance

}
}
}
});

for (var i = 0; i < uniqueModules.length; i++) {
kunstmaanbundles[uniqueModules[i]].reInit();
Copy link
Contributor

Choose a reason for hiding this comment

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

No real need for an extra for loop here. You could also reInit the modules in the first for loop.

@dannyvw
Copy link
Contributor Author

dannyvw commented Apr 21, 2016

Pull request is updated

@diskwriter
Copy link
Contributor

Thanks, @dannyvw
Could you also rebase your commits? Then I can merge. Thanks!

@dannyvw dannyvw force-pushed the bugfix/prevent-reinit-pagepart branch from 731e4dc to 2d2ed24 Compare April 28, 2016 14:22
@dannyvw
Copy link
Contributor Author

dannyvw commented Apr 28, 2016

@diskwriter Done

@diskwriter diskwriter merged commit c483828 into Kunstmaan:master Apr 28, 2016
@diskwriter
Copy link
Contributor

@dannyvw Thanks!

@dannyvw dannyvw deleted the bugfix/prevent-reinit-pagepart branch May 31, 2016 08:13
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