support_tables.js 775 B

123456789101112131415161718192021222324252627282930
  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. app.views.SupportTablesPage = class SupportTablesPage extends (
  10. app.views.BasePage
  11. ) {
  12. static initClass() {
  13. this.events = { click: "onClick" };
  14. }
  15. onClick(event) {
  16. if (!event.target.classList.contains("show-all")) {
  17. return;
  18. }
  19. $.stopEvent(event);
  20. let el = event.target;
  21. while (el.tagName !== "TABLE") {
  22. el = el.parentNode;
  23. }
  24. el.classList.add("show-all");
  25. }
  26. };
  27. app.views.SupportTablesPage.initClass();