File: /home/imensosw/www/imenso.co/dev/impactify-it/js/project_sponser.js
// $(document).on('click','.project_start',function(){
function projectStart(){
$('#startProject_modal').modal("show");
$.ajax({
url: url+"/user/project/getStart",
type:"GET",
data:{project_id:project_id},
success: function(html){
$('#startProject_modal').find('.modal-content').html(html);
}
});
}
// });
$(document).on('click','.invite_sponser',function(){
$('#invite_sponser_modal').modal('show');
$.ajax({
url: url+"/user/project/invitesponser",
type:"get",
data:{project_id:project_id},
success: function(html){
$('#invite_sponser_modal').find('.modal-content').html(html);
},
dataType:"html"
});
});
$(document).on('click','#invite_sponser_submit',function(){
var saveData = $('#invite_sponser_form').serializeArray();
$.ajax({
url: url+"/user/project/invitesponser",
type:"post",
data:saveData,
success: function(result){
htm="<tr><td>"+result.name+"</td>";
htm+="<td class='text-center width_70'>";
htm+="<a href='javascript:;' class='invite_delete' data-id="+result.id+">";
htm+="<i class='fa fa-trash-o' aria-hidden='true'></i>";
htm+="</a></td></tr>";
$('#invite_sponser_tbody').prepend(htm);
},
error:function(data){
res = $.parseJSON(data.responseText);
ajax_error(res);
},
dataType: 'json',
});
});
$(document).on('click','.invite_delete',function(){
var id= $(this).attr('data-id');
var self=$(this);
$.ajax({
url: url+"/user/project/invitedelete",
type:"post",
data:{_token:csrf_token,id:id},
success: function(data){
self.closest('tr').remove();
},
dataType: 'json',
});
});
;