From b1dcc4cf431e65fee89b3f1a161309c7a85e1f2c Mon Sep 17 00:00:00 2001 From: ilya Date: Sat, 11 Sep 2010 21:58:01 -0700 Subject: [PATCH] testing request acceptance on remote --- public/javascripts/group-edit.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/public/javascripts/group-edit.js b/public/javascripts/group-edit.js index e24ff9a47..4b2c43451 100644 --- a/public/javascripts/group-edit.js +++ b/public/javascripts/group-edit.js @@ -16,6 +16,14 @@ $(function() { $(".group ul").droppable({ drop: function(event, ui) { + if (ui.draggable[0].getAttribute('request_id') != null){ + $.ajax({ + type: "DELETE", + url: "/requests/" + ui.draggable[0].getAttribute('request_id') , + data: {"accept" : {"group_id" : $(this)[0].id }} + }); + alert("Sent the ajax, check it out!") + } var move = {}; move[ 'friend_id' ] = ui.draggable[0].id move[ 'to' ] = $(this)[0].id;