diff options
Diffstat (limited to 'apps/tasks')
-rw-r--r-- | apps/tasks/ajax/update_property.php | 4 | ||||
-rw-r--r-- | apps/tasks/js/tasks.js | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/apps/tasks/ajax/update_property.php b/apps/tasks/ajax/update_property.php index 2ce5f1a1f51..7128aee8d39 100644 --- a/apps/tasks/ajax/update_property.php +++ b/apps/tasks/ajax/update_property.php @@ -21,6 +21,10 @@ switch($property) { $summary = $_POST['summary']; $vtodo->setString('SUMMARY', $summary); break; + case 'description': + $description = $_POST['description']; + $vtodo->setString('DESCRIPTION', $description); + break; case 'due': $due = $_POST['due']; $due_date_only = $_POST['date']; diff --git a/apps/tasks/js/tasks.js b/apps/tasks/js/tasks.js index 684f671e41a..3647107eab8 100644 --- a/apps/tasks/js/tasks.js +++ b/apps/tasks/js/tasks.js @@ -64,6 +64,15 @@ OC.Tasks = { task_container.find('.task_more').click(OC.Tasks.moreClickHandler); var description = $('<textarea>') .addClass('description') + .blur(function(){ + var task = $(this).closest('.task').data('task'); + var description = $(this).val(); + $.post('ajax/update_property.php', {id:task.id, type:'description', description:description}, function(jsondata){ + if(jsondata.status == 'success') { + task.description = description; + } + }); + }) .text(task.description); var due = $('<span>') .addClass('due') |