silverstripe-scienceninjas/silverstripe-cms — comment on commit 7ad9eff0d01173cd557f10cfb25ae44e71c13a73
File: javascript/AssetAdmin.js line 64
By stojg:

Yup, I will extract as much code to be generic and add possibility to make it "smarter" on what target gridfields to use.

What do you feel about in injecting entwine/javasript attributes via PHP? Is this something we moved away from in 3.0?

```php
// Pseudo code in filterform()
Requirements::javascriptTemplate('gridfieldinjectedfilter.js', array('target'=>'#Form_EditForm_File');
```

```php
// Or Requirements::customScript()
Requirements::customScript('$("ss").entwine(".cms-filter-form").setTarget("#Form_EditForm_File");');
```