|
61 | 61 |
|
62 | 62 | <div class="page-header">
|
63 | 63 |
|
| 64 | + <div class="pull-right"> |
| 65 | + <div> |
| 66 | + <label> |
| 67 | + <input type="checkbox" name="toggle-code" class="toggle-code-blocks"> |
| 68 | + Toggle Code Blocks |
| 69 | + </label> |
| 70 | + </div> |
| 71 | + <div> |
| 72 | + <label> |
| 73 | + <input type="checkbox" name="toggle-private" class="toggle-private"> |
| 74 | + Toggle Private Methods/Function |
| 75 | + </label> |
| 76 | + </div> |
| 77 | + </div> |
| 78 | + |
64 | 79 | <h1>{{title}}{{#if description}} <small>{{description}}</small>{{/if}}</h1>
|
65 | 80 |
|
66 | 81 | </div>
|
|
77 | 92 |
|
78 | 93 | {{#if ctx}}
|
79 | 94 |
|
80 |
| - <li><a href="#{{formatId ctx.string}}">{{formatName ctx.string}}</a></li> |
| 95 | + <li class="scope-{{#if isPrivate}}private{{else}}public{{/if}}"> |
| 96 | + <a href="#{{formatId ctx.string}}">{{formatName ctx.string}}</a> |
| 97 | + </li> |
81 | 98 |
|
82 | 99 | {{/if}}
|
83 | 100 |
|
|
93 | 110 |
|
94 | 111 | {{#each methods}}
|
95 | 112 |
|
96 |
| - <div class="method"> |
| 113 | + {{#unless ignore}} |
97 | 114 |
|
98 |
| - {{#unless ignore}} |
| 115 | + {{#if ctx}} |
99 | 116 |
|
100 |
| - {{#if ctx}} |
| 117 | + <div class="method scope-{{#if isPrivate}}private{{else}}public{{/if}}"> |
101 | 118 |
|
102 | 119 | {{registerContext this}}
|
103 | 120 |
|
|
201 | 218 |
|
202 | 219 | {{/each}}
|
203 | 220 |
|
204 |
| - {{/if}} |
| 221 | + </div> |
205 | 222 |
|
206 |
| - {{/unless}} |
| 223 | + {{/if}} |
207 | 224 |
|
208 |
| - </div> |
| 225 | + {{/unless}} |
209 | 226 |
|
210 | 227 | {{/each}}
|
211 | 228 |
|
|
227 | 244 |
|
228 | 245 | </footer>
|
229 | 246 |
|
| 247 | +<script src="http://cdn.jsdelivr.net/jquery/2.1.1/jquery.min.js"></script> |
| 248 | +<script> |
| 249 | +
|
| 250 | +(function () { |
| 251 | +
|
| 252 | + var hash = window.location.hash, |
| 253 | + $hash_elem = $('[id="' + hash.replace(/#/, '') + '"]'), |
| 254 | + $code_block = $('.code'), |
| 255 | + $scope_private = $('.scope-private'), |
| 256 | + $toggle_code_blocks = $('.toggle-code-blocks') |
| 257 | + $toggle_private = $('.toggle-private'); |
| 258 | +
|
| 259 | + $toggle_code_blocks.on('click', function () { |
| 260 | +
|
| 261 | + if ($toggle_code_blocks.is(':checked')) { |
| 262 | + $code_block.show(); |
| 263 | + } else { |
| 264 | + $code_block.hide(); |
| 265 | + } |
| 266 | +
|
| 267 | + }); |
| 268 | +
|
| 269 | + $toggle_private.on('click', function () { |
| 270 | +
|
| 271 | + if ($toggle_private.is(':checked')) { |
| 272 | + $scope_private.show(); |
| 273 | + } else { |
| 274 | + $scope_private.hide(); |
| 275 | + } |
| 276 | +
|
| 277 | + }); |
| 278 | +
|
| 279 | + $code_block.hide(); |
| 280 | + $scope_private.hide(); |
| 281 | +
|
| 282 | + if ($hash_elem.length && !$hash_elem.is(':visible')) { |
| 283 | +
|
| 284 | + $toggle_private.trigger('click'); |
| 285 | +
|
| 286 | + } |
| 287 | +
|
| 288 | +}()); |
| 289 | +
|
| 290 | +</script> |
| 291 | + |
230 | 292 | </body>
|
231 | 293 | </html>
|
0 commit comments