$(document).ready(function(){ $('.request_friendship').click(function(){ var recipientID = this.id.substr(15); var $self=$(this); $( "
Kontaktanfrage senden?
" ).dialog( { buttons: { "Nein": function() { $(this).dialog("close"); }, "Ja": function() { var dialog = $(this); $.ajax({ type: "GET", url: "/pu_retter/ajax/sendFriendRequest.php", data: "&recipientID="+recipientID, success: function(msg){ $self.hide(); dialog.dialog("close"); } }); }, }, modal: true }); /*$.prompt( 'Kontaktanfrage senden?', { buttons: { Ja: true, Nein: false}, callback: function(v,m){ if(v){ } } });*/ }); $('.accept_friendship').click(function(){ var recipientID = this.id.substr(7); var $self=$(this); $( "
Kontaktanfrage bestätigen?
" ).dialog( { buttons: { "Nein": function() { $(this).dialog("close"); }, "Ja": function() { var dialog = $(this); $.ajax({ type: "GET", url: "/pu_retter/ajax/sendFriendAccept.php", data: "&recipientID="+recipientID, success: function(msg){ $self.parent().parent().parent().hide(200); dialog.dialog("close"); } }); }, }, modal: true }); /*$.prompt( 'Kontaktanfrage bestätigen?', { buttons: { Ja: true, Nein: false}, callback: function(v,m){ if(v){ $.ajax({ type: "GET", url: "/pu_retter/ajax/sendFriendAccept.php", data: "&recipientID="+recipientID, success: function(msg){ $self.parent().parent().parent().hide(200); } }); } } });*/ }); $('.deny_friendship').click(function(){ var recipientID = this.id.substr(5); var $self=$(this); $( "
Kontaktanfrage ablehnen?
" ).dialog( { buttons: { "Nein": function() { $(this).dialog("close"); }, "Ja": function() { var dialog = $(this); $.ajax({ type: "GET", url: "/pu_retter/ajax/sendFriendDeny.php", data: "&recipientID="+recipientID, success: function(msg){ $self.parent().parent().parent().hide(200); dialog.dialog("close"); } }); }, }, modal: true }); /*$.prompt( 'Kontaktanfrage ablehnen?', { buttons: { Ja: true, Nein: false}, callback: function(v,m){ if(v){ $.ajax({ type: "GET", url: "/pu_retter/ajax/sendFriendDeny.php", data: "&recipientID="+recipientID, success: function(msg){ $self.parent().parent().parent().hide(200); } }); } } });*/ }); $('.delete_friendship').live('click',function(){ var recipientID = this.id.substr(15); var $self=$(this); $( "
Kontakt entfernen?
" ).dialog( { buttons: { "Nein": function() { $(this).dialog("close"); }, "Ja": function() { var dialog = $(this); $.ajax({ type: "GET", url: "/pu_retter/ajax/sendFriendDelete.php", data: "&recipientID="+recipientID, success: function(msg){ dialog.dialog("close"); } }); }, }, modal: true }); /*$.prompt( 'Kontakt löschen?', { buttons: { Ja: true, Nein: false}, callback: function(v,m){ if(v){ $.ajax({ type: "GET", url: "/pu_retter/ajax/sendFriendDelete.php", data: "&recipientID="+recipientID, success: function(msg){ } }); } } });*/ }); }); function deleteFriendship(id) { var alert_dialog = $('
').attr('id', 'confirmDialog'); alert_dialog.appendTo(document.body); $('#confirmDialog').text('Kontakt entfernen?'); $('#confirmDialog').dialog( { buttons: { Abbrechen: function(){ $(this).dialog('close').remove(); }, Ja: function(){ $(this).dialog('close'); $.ajax ({ type: "GET", url: "/pu_retter/ajax/sendFriendDelete.php", data: "&recipientID="+id, success: function(msg) { $('#webuser_'+id).hide(500); } }); } }, close: function(){ $(this).dialog("destroy"); } }); return false; } function deleteGroupRequest(id) { var alert_dialog = $('
').attr('id', 'confirmDialog'); alert_dialog.appendTo(document.body); $('#confirmDialog').text('Gruppenanfrage ignorieren?'); $('#confirmDialog').dialog( { buttons: { Abbrechen: function(){ $(this).dialog('close').remove(); }, Ja: function(){ $(this).dialog('close'); $.ajax ({ type: "GET", url: "/pu_retter/ajax/deleteGroupRequest.php", data: "&groupid="+id, success: function(msg) { $('#group_request_'+id).hide(500); } }); } }, close: function(){ $(this).dialog("destroy"); } }); return false; } function acceptFriendship(id) { var alert_dialog = $('
').attr('id', 'confirmDialog'); alert_dialog.appendTo(document.body); $('#confirmDialog').text('Kontaktanfrage annehmen?'); $('#confirmDialog').dialog( { buttons: { Abbrechen: function(){ $(this).dialog('close').remove(); }, Ja: function(){ $(this).dialog('close'); $.ajax ({ type: "GET", url: "/pu_retter/ajax/sendFriendAccept.php", data: "&recipientID="+id, success: function(msg) { $('#webuser_'+id).hide(500); } }); } }, close: function(){ $(this).dialog("destroy"); } }); return false; } function denyFriendship(id) { var alert_dialog = $('
').attr('id', 'confirmDialog'); alert_dialog.appendTo(document.body); $('#confirmDialog').text('Kontaktanfrage ablehnen?'); $('#confirmDialog').dialog( { buttons: { Abbrechen: function(){ $(this).dialog('close').remove(); }, Ja: function(){ $(this).dialog('close'); $.ajax({ type: "GET", url: "/pu_retter/ajax/sendFriendDeny.php", data: "&recipientID="+id, success: function(msg){ $('#webuser_'+id).hide(500); } }); } }, close: function(){ $(this).dialog("destroy"); } }); return false; }