support_tables.js 743 B

12345678910111213141516171819202122232425
  1. // TODO: This file was created by bulk-decaffeinate.
  2. // Sanity-check the conversion and remove this comment.
  3. /*
  4. * decaffeinate suggestions:
  5. * DS206: Consider reworking classes to avoid initClass
  6. * Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
  7. */
  8. //= require views/pages/base
  9. const Cls = (app.views.SupportTablesPage = class SupportTablesPage extends app.views.BasePage {
  10. static initClass() {
  11. this.events =
  12. {click: 'onClick'};
  13. }
  14. onClick(event) {
  15. if (!event.target.classList.contains('show-all')) { return; }
  16. $.stopEvent(event);
  17. let el = event.target;
  18. while (el.tagName !== 'TABLE') { el = el.parentNode; }
  19. el.classList.add('show-all');
  20. }
  21. });
  22. Cls.initClass();