| OLD | NEW |
| 1 /** | 1 /** |
| 2 * @fileoverview This file is the controller for generating extension | 2 * @fileoverview This file is the controller for generating extension |
| 3 * doc pages. | 3 * doc pages. |
| 4 * | 4 * |
| 5 * It expects to have available via XHR (relative path): | 5 * It expects to have available via XHR (relative path): |
| 6 * 1) API_TEMPLATE which is the main template for the api pages. | 6 * 1) API_TEMPLATE which is the main template for the api pages. |
| 7 * 2) A file located at SCHEMA which is shared with the extension system and | 7 * 2) A file located at SCHEMA which is shared with the extension system and |
| 8 * defines the methods and events contained in one api. | 8 * defines the methods and events contained in one api. |
| 9 * 3) (Possibly) A static version of the current page url in /static/. I.e. | 9 * 3) (Possibly) A static version of the current page url in /static/. I.e. |
| 10 * if called as ../foo.html, it will look for ../static/foo.html. | 10 * if called as ../foo.html, it will look for ../static/foo.html. |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 } | 182 } |
| 183 }); | 183 }); |
| 184 | 184 |
| 185 // Render to template | 185 // Render to template |
| 186 var input = new JsEvalContext(pageData); | 186 var input = new JsEvalContext(pageData); |
| 187 var output = document.getElementsByTagName("body")[0]; | 187 var output = document.getElementsByTagName("body")[0]; |
| 188 jstProcess(input, output); | 188 jstProcess(input, output); |
| 189 | 189 |
| 190 selectCurrentPageOnLeftNav(); | 190 selectCurrentPageOnLeftNav(); |
| 191 | 191 |
| 192 document.title = getPageTitle(); | 192 document.title = getPageTitle() + " - Google Chrome Extensions - Google Code"; |
| 193 // Show | 193 // Show |
| 194 if (window.postRender) | 194 if (window.postRender) |
| 195 window.postRender(); | 195 window.postRender(); |
| 196 | 196 |
| 197 if (parent && parent.done) | 197 if (parent && parent.done) |
| 198 parent.done(); | 198 parent.done(); |
| 199 } | 199 } |
| 200 | 200 |
| 201 function removeJsTemplateAttributes(root) { | 201 function removeJsTemplateAttributes(root) { |
| 202 var jsattributes = ["jscontent", "jsselect", "jsdisplay", "transclude", | 202 var jsattributes = ["jscontent", "jsselect", "jsdisplay", "transclude", |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 | 383 |
| 384 function sortByName(a, b) { | 384 function sortByName(a, b) { |
| 385 if (a.name < b.name) { | 385 if (a.name < b.name) { |
| 386 return -1; | 386 return -1; |
| 387 } | 387 } |
| 388 if (a.name > b.name) { | 388 if (a.name > b.name) { |
| 389 return 1; | 389 return 1; |
| 390 } | 390 } |
| 391 return 0; | 391 return 0; |
| 392 } | 392 } |
| OLD | NEW |