summaryrefslogtreecommitdiff
path: root/assets/js/src
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-02-17 21:29:11 -0500
committerFrederic Guillot <fred@kanboard.net>2015-02-17 21:29:11 -0500
commit8214aae1d6c60b3d6726729d7532d8ee0df629ce (patch)
treee0cb5a86b1c43a00df3612cdf3efdf40949d60b7 /assets/js/src
parent10debb3f6c442f12d77175d7b16d4e633f6e0bca (diff)
Enable event drop for user calendar
Diffstat (limited to 'assets/js/src')
-rw-r--r--assets/js/src/calendar.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/assets/js/src/calendar.js b/assets/js/src/calendar.js
index d9bc9a97..9ee5100d 100644
--- a/assets/js/src/calendar.js
+++ b/assets/js/src/calendar.js
@@ -5,9 +5,11 @@ Kanboard.Calendar = (function() {
// Save the new due date for a moved task
function move_calendar_event(calendar_event)
{
+ var url = $("#calendar").data("save-url") || $("#user-calendar").data("save-url");
+
$.ajax({
cache: false,
- url: $("#calendar").data("save-url"),
+ url: url,
contentType: "application/json",
type: "POST",
processData: false,
@@ -25,7 +27,7 @@ Kanboard.Calendar = (function() {
calendar.fullCalendar({
lang: $("body").data("js-lang"),
- editable: false,
+ editable: true,
eventLimit: true,
height: Kanboard.Exists("dashboard-calendar") ? 500 : "auto",
defaultView: "agendaWeek",
@@ -34,7 +36,8 @@ Kanboard.Calendar = (function() {
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
- viewRender: refresh_user_calendar
+ viewRender: refresh_user_calendar,
+ eventDrop: move_calendar_event
});
}