Add Task CSV export and Kanboard CLI

This commit is contained in:
Frédéric Guillot
2014-07-19 22:08:07 -02:30
parent 42ca8390d4
commit 833bd3f8a9
25 changed files with 555 additions and 89 deletions

View File

@@ -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();
}
});