Showing the changes to assets/javascripts (2 of 12 files). Show all
Unified · Split
| @@ -1,5 +1,8 @@ | ||
| 1 | 1 | [ |
| 2 | 2 | [ |
| 3 | + "2016-04-10", | |
| 4 | + "New documentation: <a href=\"/browser_support_tables/\">Support tables (caniuse.com)</a>" | |
| 5 | + ], [ | |
| 3 | 6 | "2016-03-27", |
| 4 | 7 | "New documentation: <a href=\"/typescript/\">TypeScript</a>" |
| 5 | 8 | ], [ |
| @@ -0,0 +1,14 @@ | ||
| 1 | +#= require views/pages/base | |
| 2 | + | |
| 3 | +class app.views.SupportTablesPage extends app.views.BasePage | |
| 4 | + @events: | |
| 5 | + click: 'onClick' | |
| 6 | + | |
| 7 | + onClick: (event) -> | |
| 8 | + return unless event.target.classList.contains 'show-all' | |
| 9 | + $.stopEvent(event) | |
| 10 | + | |
| 11 | + el = event.target | |
| 12 | + el = el.parentNode until el.tagName is 'TABLE' | |
| 13 | + el.classList.add 'show-all' | |
| 14 | + return | |