You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
devdocs/assets/javascripts/views/pages/sqlite.js

35 lines
937 B

// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS002: Fix invalid constructor
* DS206: Consider reworking classes to avoid initClass
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
//= require views/pages/base
app.views.SqlitePage = class SqlitePage extends app.views.BasePage {
static initClass() {
1 year ago
this.events = { click: "onClick" };
}
onClick(event) {
let el, id;
1 year ago
if (!(id = event.target.getAttribute("data-toggle"))) {
return;
}
if (!(el = this.find(`#${id}`))) {
return;
}
$.stopEvent(event);
1 year ago
if (el.style.display === "none") {
el.style.display = "block";
event.target.textContent = "hide";
} else {
1 year ago
el.style.display = "none";
event.target.textContent = "show";
}
}
};
app.views.SqlitePage.initClass();