edx/edx-platform — pull request #6268 by wedaly (2014-12-16 13:02:27+00:00)
Title: Inline underscore templates; add pre render step

I ran the numbers, and the underscore templates total about 16K (the total page size is ~250K, including these). For this reason, I've inlined the templates into the DOM -- when RequireJS optimizer is enabled in the LMS, these will be loaded asynchronously (and cached!). This simplifies the `StepView` considerably, and it avoids an extra round-trip to render each step.

In a separate PR, I'm going to need to modify the context of the template based on an AJAX request, so I've added a `preRender` method that allows this.

Reviewers: @AlasdairSwan @stephensanchez