I created a little accessory to insert a row anywhere in a Grid field. This works great with the exception of when the grid has a File field. When I create the row the Add File link does not get handled. I managed to dig through the compressed EE JavaScript code and was able to figure out manually process the Add File link with this.
$.ee_filebrowser.add_trigger
Using this I was able to populate the file image thumbnail and name to match what EE does. Although this seems to work it seems like a really bad idea for future compatibility with EE. The other issue I am having is handling the Remove File link.
So I have a couple of questions:
1) How can I use/call the existing EE JavaScript code to handle the Add File functionality?
2) How can I use/call the existing EE JavaScript code to handle the Remove File functionality?