diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-01-25 13:27:43 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-01-25 13:27:43 -0500 |
commit | 54d2d46b6512a0369fd2f0521e8565e42ea358ea (patch) | |
tree | f59938002579cfa856a1f5ea30507a315957c5b2 /assets/js/src | |
parent | 746a3f8d235c073abba401f25ca9a379264d2b16 (diff) |
Store calendar filters per project
Diffstat (limited to 'assets/js/src')
-rw-r--r-- | assets/js/src/calendar.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/assets/js/src/calendar.js b/assets/js/src/calendar.js index ca76377e..ca47661c 100644 --- a/assets/js/src/calendar.js +++ b/assets/js/src/calendar.js @@ -1,5 +1,7 @@ Kanboard.Calendar = (function() { + var filter_storage_key = ""; + // Show the empty calendar function show_calendar() { @@ -65,7 +67,7 @@ Kanboard.Calendar = (function() { // Restore saved filters function load_filters() { - var filters = Kanboard.GetStorageItem('calendar_filters'); + var filters = Kanboard.GetStorageItem(filter_storage_key); if (filters !== "undefined" && filters !== "") { filters = JSON.parse(filters); @@ -89,12 +91,13 @@ Kanboard.Calendar = (function() { filters[$(this).attr("name")] = $(this).val(); }); - Kanboard.SetStorageItem("calendar_filters", JSON.stringify(filters)); + Kanboard.SetStorageItem(filter_storage_key, JSON.stringify(filters)); refresh_calendar(filters); } return { Init: function() { + filter_storage_key = "calendar_filters_" + $("#calendar").data("project-id"); show_calendar(); load_filters(); } |