testing request acceptance on remote
This commit is contained in:
parent
08233a74c5
commit
b1dcc4cf43
1 changed files with 8 additions and 0 deletions
|
|
@ -16,6 +16,14 @@ $(function() {
|
||||||
|
|
||||||
$(".group ul").droppable({
|
$(".group ul").droppable({
|
||||||
drop: function(event, ui) {
|
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 = {};
|
var move = {};
|
||||||
move[ 'friend_id' ] = ui.draggable[0].id
|
move[ 'friend_id' ] = ui.draggable[0].id
|
||||||
move[ 'to' ] = $(this)[0].id;
|
move[ 'to' ] = $(this)[0].id;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue