Consolidate <script> tags in the diff viewer and reviews.
Review Request #4384 — Created Aug. 3, 2013 and submitted
Consolidate <script> tags in the diff viewer and reviews. Every time the browser encounters a <script> tag, it blocks any downloads or processing of files until that tag has finished. In our case, it also makes things difficult for require.js, because most of our <script> tags depend on our objects, which may not be loaded yet. Now, we just move all the initialization into the same <script> that sets up the page. That helps code readability and solves a lot of these issues. In the case of the diff viewer, I've also moved the scripts-post block to the end of the file, to put it in page order. Along with that, I removed the file index at the footer, since it no longer works and will be replaced anyway.
Tested each of the pages to make sure they loaded correctly.
Description | From | Last Updated |
---|---|---|
Typo. |
david |
-
This is a review from Review Bot. Tool: Pyflakes Processed Files: Ignored Files: reviewboard/templates/diffviewer/view_diff.html reviewboard/templates/reviews/review_detail.html reviewboard/templates/reviews/reviewable_page_data.js
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: Ignored Files: reviewboard/templates/diffviewer/view_diff.html reviewboard/templates/reviews/review_detail.html reviewboard/templates/reviews/reviewable_page_data.js