summaryrefslogtreecommitdiffstats
path: root/apps/tasks/js
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-04-23 22:13:35 +0200
committerBart Visscher <bartv@thisnet.nl>2012-04-23 22:13:35 +0200
commitb704ff1bc7053e5b8b1a83be58466e8627f849fa (patch)
tree7f9f8371b0239670b65ad19d8f18ba6881a714bf /apps/tasks/js
parent728e6a6bf9540b845073c4c8fb96dd7eb1dffa3a (diff)
downloadnextcloud-server-b704ff1bc7053e5b8b1a83be58466e8627f849fa.tar.gz
nextcloud-server-b704ff1bc7053e5b8b1a83be58466e8627f849fa.zip
Tasks: Simple add task action
Diffstat (limited to 'apps/tasks/js')
-rw-r--r--apps/tasks/js/tasks.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/tasks/js/tasks.js b/apps/tasks/js/tasks.js
index bf28626d09b..40b4f5140a1 100644
--- a/apps/tasks/js/tasks.js
+++ b/apps/tasks/js/tasks.js
@@ -420,11 +420,11 @@ $(document).ready(function(){
return false;
});
- $('#tasks_newtask').click(function(){
- $.getJSON('ajax/addtaskform.php',{},function(jsondata){
+ $('#tasks_addtask').click(function(){
+ var input = $('#tasks_newtask').val();
+ $.getJSON('ajax/addtask.php',{text:input},function(jsondata){
if(jsondata.status == 'success'){
- $('#task_details').data('id','');
- $('#task_details').html(jsondata.data.page);
+ $('#tasks_list').append(OC.Tasks.create_task_div(jsondata.task));
}
else{
alert(jsondata.data.message);