diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-10-14 22:02:35 -0400 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-10-14 22:02:35 -0400 |
commit | 286b1935663ef3071ad6a0aae3078ad3a42b48e4 (patch) | |
tree | 80469612ac9feba9bea28c1ac7f263e680f52d49 /assets/js | |
parent | d0e6d2e1f177cfe533ea7819bf79b0469b8d0cc2 (diff) |
Add a dashboard (first version)
Diffstat (limited to 'assets/js')
-rw-r--r-- | assets/js/app.js | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/assets/js/app.js b/assets/js/app.js index 395dfb6e..7dcf04eb 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -67,6 +67,15 @@ var Kanboard = (function() { dateFormat: 'yy-mm-dd', constrainInput: false }); + + // Project select box + $("#board-selector").chosen({ + width: 180 + }); + + $("#board-selector").change(function() { + window.location = "?controller=board&action=show&project_id=" + $(this).val(); + }); } }; @@ -229,17 +238,11 @@ Kanboard.Board = (function() { return { Init: function() { - board_load_events(); - filter_load_events(); - // Project select box - $("#board-selector").chosen({ - width: 180 - }); + Kanboard.Before(); - $("#board-selector").change(function() { - window.location = "?controller=board&action=show&project_id=" + $(this).val(); - }); + board_load_events(); + filter_load_events(); } }; @@ -274,6 +277,18 @@ Kanboard.Project = (function() { })(); +// Dashboard related functions +Kanboard.Dashboard = (function() { + + return { + Init: function() { + Kanboard.Before(); + } + }; + +})(); + + // Initialization $(function() { if ($("#board").length) { @@ -282,6 +297,9 @@ $(function() { else if ($("#task-section").length) { Kanboard.Task.Init(); } + else if ($("#dashboard").length) { + Kanboard.Dashboard.Init(); + } else if ($("#project-section").length) { Kanboard.Project.Init(); } |