Add a dashboard (first version)

This commit is contained in:
Frédéric Guillot
2014-10-14 22:02:35 -04:00
parent d0e6d2e1f1
commit 286b193566
23 changed files with 218 additions and 44 deletions

View File

@@ -1119,6 +1119,22 @@ tr td.task-orange,
color: #555;
}
/* dashboard */
#dashboard table {
font-size: 0.95em;
}
.dashboard-left-column {
width: 55%;
float: left;
}
.dashboard-right-column {
margin-left: 5%;
width: 40%;
float: left;
}
/* confirmation box */
.confirm {
max-width: 700px;

View File

@@ -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() {
Kanboard.Before();
board_load_events();
filter_load_events();
// Project select box
$("#board-selector").chosen({
width: 180
});
$("#board-selector").change(function() {
window.location = "?controller=board&action=show&project_id=" + $(this).val();
});
}
};
@@ -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();
}