summaryrefslogtreecommitdiff
path: root/assets/js/src
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-02-15 16:34:56 -0500
committerFrederic Guillot <fred@kanboard.net>2015-02-15 16:34:56 -0500
commit2491ada0db7a3ca7832260a9bc263bc24be300a0 (patch)
tree21abda0864f42b84c505a710001f947e6419ed5b /assets/js/src
parente84abb54987a497093ab2031a51fa1fe85ad2590 (diff)
Display subtask time tracking in the calendar
Diffstat (limited to 'assets/js/src')
-rw-r--r--assets/js/src/base.js4
-rw-r--r--assets/js/src/calendar.js23
2 files changed, 13 insertions, 14 deletions
diff --git a/assets/js/src/base.js b/assets/js/src/base.js
index 9fb44ce2..f182c8df 100644
--- a/assets/js/src/base.js
+++ b/assets/js/src/base.js
@@ -156,7 +156,7 @@ var Kanboard = (function() {
cache: false,
url: $("body").data("status-url"),
statusCode: {
- 401: function(data) {
+ 401: function() {
window.location = $("body").data("login-url");
}
}
@@ -195,7 +195,7 @@ var Kanboard = (function() {
// Tooltip for column description
$(".column-tooltip").tooltip({
- content: function(e) {
+ content: function() {
return '<div class="markdown">' + $(this).attr("title") + '</div>';
}
});
diff --git a/assets/js/src/calendar.js b/assets/js/src/calendar.js
index 2f731693..d9bc9a97 100644
--- a/assets/js/src/calendar.js
+++ b/assets/js/src/calendar.js
@@ -4,7 +4,7 @@ Kanboard.Calendar = (function() {
// Save the new due date for a moved task
function move_calendar_event(calendar_event)
- {
+ {
$.ajax({
cache: false,
url: $("#calendar").data("save-url"),
@@ -22,12 +22,12 @@ Kanboard.Calendar = (function() {
function show_user_calendar()
{
var calendar = $("#user-calendar");
- var translations = calendar.data("translations");
calendar.fullCalendar({
lang: $("body").data("js-lang"),
editable: false,
eventLimit: true,
+ height: Kanboard.Exists("dashboard-calendar") ? 500 : "auto",
defaultView: "agendaWeek",
header: {
left: 'prev,next today',
@@ -39,7 +39,7 @@ Kanboard.Calendar = (function() {
}
// Refresh the calendar events
- function refresh_user_calendar(filters)
+ function refresh_user_calendar()
{
var calendar = $("#user-calendar");
var url = calendar.data("check-url");
@@ -47,7 +47,7 @@ Kanboard.Calendar = (function() {
"start": calendar.fullCalendar('getView').start.format(),
"end": calendar.fullCalendar('getView').end.format(),
"user_id": calendar.data("user-id")
- }
+ };
for (var key in params) {
url += "&" + key + "=" + params[key];
@@ -55,7 +55,7 @@ Kanboard.Calendar = (function() {
$.getJSON(url, function(events) {
calendar.fullCalendar('removeEvents');
- calendar.fullCalendar('addEventSource', events);
+ calendar.fullCalendar('addEventSource', events);
calendar.fullCalendar('rerenderEvents');
});
}
@@ -64,13 +64,12 @@ Kanboard.Calendar = (function() {
function show_project_calendar()
{
var calendar = $("#calendar");
- var translations = calendar.data("translations");
calendar.fullCalendar({
lang: $("body").data("js-lang"),
editable: true,
eventLimit: true,
- defaultView: "agendaWeek",
+ defaultView: "month",
header: {
left: 'prev,next today',
center: 'title',
@@ -89,7 +88,7 @@ Kanboard.Calendar = (function() {
var params = {
"start": calendar.fullCalendar('getView').start.format(),
"end": calendar.fullCalendar('getView').end.format()
- }
+ };
jQuery.extend(params, filters);
@@ -99,7 +98,7 @@ Kanboard.Calendar = (function() {
$.getJSON(url, function(events) {
calendar.fullCalendar('removeEvents');
- calendar.fullCalendar('addEventSource', events);
+ calendar.fullCalendar('addEventSource', events);
calendar.fullCalendar('rerenderEvents');
});
}
@@ -108,7 +107,7 @@ Kanboard.Calendar = (function() {
function load_project_filters()
{
var filters = Kanboard.GetStorageItem(filter_storage_key);
-
+
if (filters !== "") {
filters = JSON.parse(filters);
@@ -127,10 +126,10 @@ Kanboard.Calendar = (function() {
{
var filters = {};
- $('.calendar-filter').each(function(index, element) {
+ $('.calendar-filter').each(function() {
filters[$(this).attr("name")] = $(this).val();
});
-
+
Kanboard.SetStorageItem(filter_storage_key, JSON.stringify(filters));
refresh_project_calendar(filters);
}