I've put together a plugin. This plugin, on a user group basis, helps restrict certain parts of a component i'm using in the MODX manager.
It's pretty low-fi. One part of the plugin hides some buttons used by the component via CSS using:
$modx->controller->addHTM
The other part (which isn't working at the moment) loads some custom jQuery just before the closing <head> tag in the manager, using:
$modx->controller->addLastJavascript('/assets/template/j/myScript.js');
In myScript.js, as an example, I have:
window.onload = function() {
jQuery(function($) {
$('.x-form-text').addClass('test');
});
}
The jQuery doesn't fire because there is no html output to manipulate, because it's being generated through ExtJs.
Question is, is there an ExtJs version of my jQuery, that would allow me to add a class name to html markup generated in the manager?
As you might be able to tell, I have zero knowledge in ExtJs - any tips, help, suggestions would be much appreciated.
(You can also find me on slack if you prefer to chat in real time)