We did some talking around this and we've had to add a bunch of custom templates for blueprints, branches, etc that's only purpose is to extend generic-edit.pt to load a javascript module that runs on the page.
The best way to get at this would be to create a new generic-edit-withjs.pt which adds two attributes to the python View.
1. JS Module name
2. JS View class name
Then this .pt could be hard wired to create a YUI block that includes the proper JS module from the python View property and runs the simple two line bootstrap:
var view = new $classname()
view.render();
Since we've got YUI 3.5 and we've started to use YUI View objects the API would be consistant and it would also help enforce that all JS goes into a JS file that can be tested vs the .pt file which isn't.
We did some talking around this and we've had to add a bunch of custom templates for blueprints, branches, etc that's only purpose is to extend generic-edit.pt to load a javascript module that runs on the page.
The best way to get at this would be to create a new generic- edit-withjs. pt which adds two attributes to the python View.
1. JS Module name
2. JS View class name
Then this .pt could be hard wired to create a YUI block that includes the proper JS module from the python View property and runs the simple two line bootstrap:
var view = new $classname()
view.render();
Since we've got YUI 3.5 and we've started to use YUI View objects the API would be consistant and it would also help enforce that all JS goes into a JS file that can be tested vs the .pt file which isn't.