qxio-planet

Code du parrain :

'); if(obj.data == 0){ var $parent = $form.closest('li'); $parent.find('.code_existe_deja').html('

Ce parrain est deja utilisé

'); }else{ var $parent = $form.closest('li'); $parent.find('.at-liendesuivi').html(obj.data.refword); $parent.find('.link-liendesuivi').html(obj.data.link).attr('href',obj.data.link); $parent.find('.code_existe_deja').html(''); } }); }); $('.mod_mgwaffiliate_code_btn').click(function(e){ e.preventDefault(); var $form = $(this).closest('form'), code= $form.find('.mod_mgwaffiliate_code').val(), url = $form.attr('action'), data= {"module" : "mgwaffiliate", "option" : "com_ajax", "format" : "json", "code" : code}; if(code ==="") return; $.getJSON(url,data,function(obj){ $form.find('.mod_mgwaffiliate_message').html('
'+obj.data.message+'
'); // console.log(obj); }); }); $('.affiliate_payment_due_request').click(function(e){ e.preventDefault(); var $form = $(this).closest('form'), due= $form.find('.affiliate_payment_due').val(), url = $form.attr('action'), data= {"module" : "mgwaffiliate", "option" : "com_ajax", "format" : "json" }; data.due = +(due.replace(/,/,'.')); if(data.due > 0 ) { $.getJSON(url,data,function(obj){ $form.find('.mod_mgwaffiliate_message').html('
'+obj.data.message+'
'); console.log(obj); $('.mod_mgwaffiliate_message').html('
'); }); } }); $('[data-toggle="tooltip"]').tooltip(); $('.copyLink').click(function(e){ var $temp = $(""), link = $(this).closest('li').find('a').attr('href'); $("body").append($temp); $temp.val(link); $temp[0].select(); document.execCommand("copy"); $temp.remove(); $(this).css('background-color', '#1C274C'); setTimeout(() => { $(this).css('background-color', '#FFFFFF'); }, 100); }); $(".eye-icon").click(function(){ var clickedIcon = $(this); var otherIcon = $(".eye-icon").not(clickedIcon); var link = $("#link"); clickedIcon.hide(); otherIcon.show(); if (clickedIcon.attr("id") === "eye-open") { link.hide(); } else { link.show(); } }); });