diff options
Diffstat (limited to 'assets/js/src')
-rw-r--r-- | assets/js/src/base.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/assets/js/src/base.js b/assets/js/src/base.js index f48d0f41..7bf8a091 100644 --- a/assets/js/src/base.js +++ b/assets/js/src/base.js @@ -253,6 +253,26 @@ var Kanboard = (function() { $("form.search").submit(); }); + // Collapse sidebar + $(document).on("click", ".sidebar-collapse", function (e) { + e.preventDefault(); + $(".sidebar-container").addClass("sidebar-collapsed"); + $(".sidebar-expand").show(); + $(".sidebar h2").hide(); + $(".sidebar ul").hide(); + $(".sidebar-collapse").hide(); + }); + + // Expand sidebar + $(document).on("click", ".sidebar-expand", function (e) { + e.preventDefault(); + $(".sidebar-container").removeClass("sidebar-collapsed"); + $(".sidebar-collapse").show(); + $(".sidebar h2").show(); + $(".sidebar ul").show(); + $(".sidebar-expand").hide(); + }); + // Datepicker translation $.datepicker.setDefaults($.datepicker.regional[$("body").data("js-lang")]); |