I'm using a JS script for UI purposes in the CMS area by using a decorator for LeftAndMain
.
class LeftAndMainTweaks extends LeftAndMainExtension {
public function init() {
parent::init();
// My JS script
Requirements::javascript('mymodule/js/myscript.js');
}
}
The script is loaded only once and not again for each AJAX call (like browsing through pages or ModelAdmin's) which breaks some of the JS functionalities.
How do you force the an external JS script to be reloaded after each AJAX call?