diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-07-19 22:08:07 -0230 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-07-19 22:08:07 -0230 |
commit | 833bd3f8a90b604f4ab289dab9366c0032ce5216 (patch) | |
tree | d9dba860b725a2c837fe1a640cafd0bd0b418e43 /assets | |
parent | 42ca8390d43080c7403c4ae4cdaf31296bc02576 (diff) |
Add Task CSV export and Kanboard CLI
Diffstat (limited to 'assets')
-rw-r--r-- | assets/js/app.js | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/assets/js/app.js b/assets/js/app.js index 2b65da99..bf98d689 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -28,8 +28,8 @@ var Kanboard = (function() { }, // Return true if the page is visible - IsVisible: function() - { + IsVisible: function() { + var property = ""; if (typeof document.hidden !== "undefined") { @@ -47,6 +47,17 @@ var Kanboard = (function() { } return true; + }, + + // Common init + Before: function() { + + // Datepicker + $(".form-date").datepicker({ + showOtherMonths: true, + selectOtherMonths: true, + dateFormat: 'yy-mm-dd' + }); } }; @@ -228,12 +239,7 @@ Kanboard.Task = (function() { return { Init: function() { - // Datepicker for the due date - $("#form-date_due").datepicker({ - showOtherMonths: true, - selectOtherMonths: true, - dateFormat: 'yy-mm-dd' - }); + Kanboard.Before(); // Image preview for attachments $(".file-popover").click(Kanboard.Popover); @@ -243,13 +249,28 @@ Kanboard.Task = (function() { })(); +// Project related functions +Kanboard.Project = (function() { + + return { + Init: function() { + Kanboard.Before(); + } + }; + +})(); + + // Initialization $(function() { if ($("#board").length) { Kanboard.Board.Init(); } - else { + else if ($("#task-section").length) { Kanboard.Task.Init(); } + else if ($("#project-section").length) { + Kanboard.Project.Init(); + } }); |