From eae21f32699ed01dd632d28c4ca7ff497c713a1f Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Fri, 4 May 2012 17:27:10 +0200 Subject: Tasks: Fix ajax calls in javascript --- apps/tasks/js/tasks.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'apps') diff --git a/apps/tasks/js/tasks.js b/apps/tasks/js/tasks.js index 7bd210a8a61..1db3f87e37e 100644 --- a/apps/tasks/js/tasks.js +++ b/apps/tasks/js/tasks.js @@ -66,7 +66,7 @@ OC.Tasks = { .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){ + $.post(OC.filePath('tasks', 'ajax', 'update_property.php'), {id:task.id, type:'description', description:description}, function(jsondata){ if(jsondata.status == 'success') { task.description = description; } @@ -109,7 +109,7 @@ OC.Tasks = { .blur(function(){ var task = $(this).closest('.task').data('task'); var categories = $(this).val(); - $.post('ajax/update_property.php', {id:task.id, type:'categories', categories:categories}, function(jsondata){ + $.post(OC.filePath('tasks', 'ajax', 'update_property.php'), {id:task.id, type:'categories', categories:categories}, function(jsondata){ if(jsondata.status == 'success') { task.categories = categories.split(','); $categories.empty(); @@ -129,7 +129,7 @@ OC.Tasks = { .blur(function(){ var task = $(this).closest('.task').data('task'); var location = $(this).val(); - $.post('ajax/update_property.php', {id:task.id, type:'location', location:location}, function(jsondata){ + $.post(OC.filePath('tasks', 'ajax', 'update_property.php'), {id:task.id, type:'location', location:location}, function(jsondata){ if(jsondata.status == 'success') { task.location = location; task_container.find('.location').text(location); @@ -214,7 +214,7 @@ OC.Tasks = { var old_summary = task.summary; task.summary = $(this).val(); OC.Tasks.setSummary(summary_container, task); - $.post('ajax/update_property.php', {id:task.id, type:'summary', summary:task.summary}, function(jsondata){ + $.post(OC.filePath('tasks', 'ajax', 'update_property.php'), {id:task.id, type:'summary', summary:task.summary}, function(jsondata){ if(jsondata.status != 'success') { task.summary = old_summary; OC.Tasks.setSummary(summary_container, task); @@ -245,7 +245,7 @@ OC.Tasks = { } due = date.getTime()/1000; } - $.post('ajax/update_property.php', {id:task.id, type:'due', due:due, date:date_only?1:0}, function(jsondata){ + $.post(OC.filePath('tasks', 'ajax', 'update_property.php'), {id:task.id, type:'due', due:due, date:date_only?1:0}, function(jsondata){ if(jsondata.status != 'success') { task.due = old_due; } @@ -277,7 +277,7 @@ OC.Tasks = { var $task = $(this).closest('.task'), task = $task.data('task'), checked = $(this).is(':checked'); - $.post('ajax/update_property.php', {id:task.id, type:'complete', checked:checked?1:0}, function(jsondata){ + $.post(OC.filePath('tasks', 'ajax', 'update_property.php'), {id:task.id, type:'complete', checked:checked?1:0}, function(jsondata){ if(jsondata.status == 'success') { task = jsondata.data; $task.data('task', task) -- cgit v1.2.3