I have a project I've been working on that started out as an entirely dynamic adhoc system. Reports/files were listed in a west nav pane and would add tabs to the center. Each tab contained a dynamic grid. All of this code is in one main.js script. I would just pass the configs to the dynamic grid and it handled any file I threw at it.
Now I'm finding that the users actually want more of a custom report per page, especially since they'll want grouping and summaries. I can't figure out how to add that to my dynamic grid, so I figure my best bet is to write a .js per report tab.
How can I keep my main.js with the basic viewport. The nav is loaded via JSON, so reports will show up when available. I need to have other report1.js, report2.js, report3.js, etc files that I can drop into my application folder and then have the main.js use them when the user clicks their report. I don't want to load all of these reports, just have them available to go.
Does that make sense? All help appreciated.