Improve task summary sections

This commit is contained in:
Frederic Guillot
2016-03-18 21:00:14 -04:00
parent 68fba8fb64
commit 854457baf0
34 changed files with 355 additions and 396 deletions

View 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");
}
});
};

View File

@@ -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();