-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
Add IDs to toolbar elements #16408
Add IDs to toolbar elements #16408
Conversation
If toolbar elements i.e. have to be hidden in a class that extends MODx.grid.SettingsGrid, Ext.getCmp needs an ID to access the toolbar element. In modxcms#16089 the ID was removed. This PR fixes that but with an ID that is set variable with the Ext.id of the current MODx.grid.SettingsGrid. So multiple MODx.grid.SettingsGrid won't interfere with each other because of using the same ID multiple.
Guys - FYI, a number of filtering deficiencies are handled in #16369, albeit in a different way. (As I re-read your description, I see the issue has to do with extending the grid so I'll need to take a look at that.) Please note that the best practice is to avoid specifying ids for components unless absolutely necessary. There are other ways to access specific components that have an @Jako - I have Agenda installed in my dev install and will test to see what's happening there. What's the bare minimum I'd need to set up in Agenda to see the issue in action? |
@smg6511 You can also use CrossContextsSettings 1.2.4 for the check. The CMP of both extras has a dedicated system settings grid for the component. In this grid the namespace filter combo is hidden with the code examples above. This ID drop should have been documented somewhere. And it should not be changed in a patch release. If I read the documentation right, I just have to use the following code to avoid my patch:
|
Using The '&tab' url property set by the new settings grid properties interferes with other extras, that don't have a tab handling or use the statCache. |
Could you be more specific about this? Although the current change was not done by me, my open PR that I referenced also uses the |
Change the area in CrossContextsSettings 1.2.4 'system settings' tab (cog icon) to 'system'. Open the 'context settings' tab. Reload the manager. The 'system settings' tab is opened. This should be the case with every extra using an extended core grid that remembers open tabs etc. in the url. |
Is it possible to reactivate the id in 3.0.4, deprecate it and remove it in 3.1? |
What does it do?
Add IDs to toolbar elements in MODx.grid.SettingsGrid
Why is it needed?
If toolbar elements i.e. have to be hidden in a class that extends MODx.grid.SettingsGrid, Ext.getCmp needs an ID to access the toolbar element.
In #16089 the ID was removed. This PR fixes that, but with an ID that is variably set with the Ext.id of the current MODx.grid.SettingsGrid. This way multiple MODx.grid.SettingsGrid will not interfere with each other by using the same ID multiple times.
How to test
At the moment only in Agenda. There I extended the code to get the right toolbar elements.
before:
after:
Related issue(s)/PR(s)
#16089