Improve task summary sections
This commit is contained in:
18
assets/js/src/Accordion.js
Normal file
18
assets/js/src/Accordion.js
Normal file
@@ -0,0 +1,18 @@
|
||||
function Accordion(app) {
|
||||
this.app = app;
|
||||
}
|
||||
|
||||
Accordion.prototype.listen = function() {
|
||||
$(document).on("click", ".accordion-toggle", function(e) {
|
||||
e.preventDefault();
|
||||
var section = $(this).parents(".accordion-section");
|
||||
|
||||
if (section.hasClass("accordion-collapsed")) {
|
||||
section.find(".accordion-content").show();
|
||||
section.removeClass("accordion-collapsed");
|
||||
} else {
|
||||
section.find(".accordion-content").hide();
|
||||
section.addClass("accordion-collapsed");
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -11,6 +11,7 @@ function App() {
|
||||
this.subtask = new Subtask(this);
|
||||
this.column = new Column(this);
|
||||
this.file = new FileUpload(this);
|
||||
this.accordion = new Accordion(this);
|
||||
this.keyboardShortcuts();
|
||||
this.task.keyboardShortcuts();
|
||||
this.chosen();
|
||||
@@ -34,6 +35,7 @@ App.prototype.listen = function() {
|
||||
this.subtask.listen();
|
||||
this.column.listen();
|
||||
this.file.listen();
|
||||
this.accordion.listen();
|
||||
this.search.focus();
|
||||
this.autoComplete();
|
||||
this.datePicker();
|
||||
|
||||
Reference in New Issue
Block a user