summaryrefslogtreecommitdiffstats
path: root/client/components/swimlanes/swimlanes.js
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-11-17 01:20:26 +0200
committerLauri Ojansivu <x@xet7.org>2019-11-17 01:20:26 +0200
commit26e0bbce172f89baa380ddae19b7b495519db40f (patch)
treee9d7613160be5eee74b510cef5a471c04e78b06d /client/components/swimlanes/swimlanes.js
parenta6366114718f0faf0e1c600374ffdd8745a3d9ff (diff)
downloadwekan-26e0bbce172f89baa380ddae19b7b495519db40f.tar.gz
wekan-26e0bbce172f89baa380ddae19b7b495519db40f.tar.bz2
wekan-26e0bbce172f89baa380ddae19b7b495519db40f.zip
Swimlanes collapsed by default.
TODO: - Add count. - Move list names to top, if possible. I did not get it working yet. - Try to fit collapse+swimlane name etc at same row. Related #2804
Diffstat (limited to 'client/components/swimlanes/swimlanes.js')
-rw-r--r--client/components/swimlanes/swimlanes.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/client/components/swimlanes/swimlanes.js b/client/components/swimlanes/swimlanes.js
index f2fa882f..0b94174d 100644
--- a/client/components/swimlanes/swimlanes.js
+++ b/client/components/swimlanes/swimlanes.js
@@ -134,6 +134,22 @@ BlazeComponent.extendComponent({
}
initSortable(boardComponent, $listsDom);
+
+ // Minimize swimlanes start https://www.w3schools.com/howto/howto_js_accordion.asp
+ var acc = document.getElementsByClassName("accordion");
+ var i;
+ for (i = 0; i < acc.length; i++) {
+ acc[i].addEventListener("click", function() {
+ this.classList.toggle("active");
+ var panel = this.nextElementSibling;
+ if (panel.style.maxHeight) {
+ panel.style.maxHeight = null;
+ } else {
+ panel.style.maxHeight = panel.scrollHeight + "px";
+ }
+ });
+ }
+ // Minimize swimlanes end https://www.w3schools.com/howto/howto_js_accordion.asp
},
onCreated() {
this.draggingActive = new ReactiveVar(false);