Files
Credit-Zombies/public/js/destinations-script.min.js
2026-06-24 18:29:01 +06:00

2 lines
7.3 KiB
JavaScript
Vendored

var options=[];function chooseDropDown(e){event.preventDefault(),$(e).parent().parent().parent().children("dd").children("div.mutliSelect").children("ul").slideToggle("fast"),$(".dropdown-x dd ul").hide(),$(e).parent().parent().next("dd").children("div").children("ul").show()}$(document).bind("click",function(e){$(e.target).parents().hasClass("dropdown-x")||$(".dropdown-x dd ul").hide()});var checkboxString="",attcheckboxString="";function getAddressList(e){var t=[];return t[1]=["EXPERIAN PO BOX 9701, ALLEN, TX 75013","EXPERIAN PO BOX 4500, ALLEN, TX 75013","OTHER"],t[2]=["EQUIFAX PO Box740256, ATLANTA,GA 30374-0256","EQUIFAX PO Box740241, ATLANTA,GA 30374-0241","OTHER"],t[3]=["Trans Union PO Box 2000, CHESTER, PA 19016-2000","Trans Union PO Box 1000, CHESTER, PA 19022-1000","Trans Union PO Box 2000, CHESTER, PA 19022-2000","OTHER"],t[4]=["INNOVIS PO Box 1640, Pittsburgh, PA 15230-1640","INNOVIS 875 Greentree Road, 8 Parkway Center, Pittsburgh, PA 15220","OTHER"],t[5]=["LexisNexis PO Box 105108, Atlanta, GA 30348","OTHER"],t[6]=[" SageStream, LLC, LexisNexis Risk Solutions Consumer Center P. O. Box 105108. Atlanta, Georgia 30348-5108","OTHER"],t[7]=["Chex Systems ATTN: Consumer Relations, 7805 Hudson Rd., Ste. 100, Woodbury, MN 55125","OTHER"],t[8]=["(US RESIDENTS) MIB Inc 50 Braintree Hill Park, Suite 400, Braintree, MA 02184-8734","(CANADIAN RESIDENTS) MIB Inc 330 university Avenue, Suite 501, Toronto, Canada M5G 1R7","OTHER"],t[9]=["FactorTrust PO Box 3653,Alpharhetta, GA 30023","OTHER"],t[e]}function getAddresses(e,t){var c=getAddressList(e),a='<dl class="dropdown-x" id="address_'+e+'"><dt><div><a onclick="chooseDropDown(this);" href="javascript:;" class="form-control"><span class="choose-dest">CHOOSE '+t+' ADDRESS</span><p class="multiSel"></p></a></div></dt><dd><div class="mutliSelect"><ul>';for(var i in c){var n=c[i];a="OTHER"==n?(n=-1,a+'<li><input onclick="getDestOption(this);" data-view="'+c[i]+'" type="checkbox" value = "'+n+'" name="destination_sub_menu_'+e+'[]"> '+c[i]+"</li>"):a+'<li><input onclick="getDestOption(this);" data-view="'+c[i]+'" type="checkbox" value = "'+c[i]+'" name="destination_sub_menu[]"> '+c[i]+"</li>",0}var r='<div class="remove-all"><div class="form-group"><label class="col-sm-5 control-label"></label><div class="col-sm-12">'+(a+="</ul></div></dd></dl>")+'</div></div><div class="form-group" id="address_other" style="display:none;"><label class="col-sm-5 control-label">OTHER</label><div class="col-sm-12"><textarea id="destination_sub_menu_other_'+e+'" class="form-control" name="destination_sub_menu_other_'+e+'"></textarea></div></div></div>';$("#address-div").append(r),$(".select2").select2()}function get_destination_name(e){return["","EXPERIAN DESTINATIONS","EQUIFAX DESTINATIONS","TRANS UNION DESTINATIONS","INNOVIS DESTINATIONS","LEXISNEXIS DESTINATIONS","SAGESTREAM LLC DESTINATIONS","CHEX SYSTEMS DESTINATIONS","MIB INC DESTINATIONS","FACTOR TRUST DESTINATIONS","OTHER"][e]}function otherAddress(e){var t=$(e).val(),c=e.name.replace("destination_sub_menu_","").replace("[]","");if(-1!==$.inArray("-1",t)){var a=get_destination_name(c),i=$(e).parent().parent().next("div");i.children("div").children("textarea").attr("placeholder",a),i.css("display","block")}else $(e).parent().parent().next("div").css("display","none")}function getOption(e){$(".view-allcheck").children().remove();var t=$("input[name=isFirst]").val();attAllcheck="";var c=$("#maindestination ul li input:checked").length;1<c&&(attAllcheck='<input data-id="'+c+'" style="margin-left: 10px;" type="checkbox" name=all_att_check_'+c+' id="all_att_check_'+c+'" onclick="setAllCheck(this)"><span> Check all</span>',$(".view-allcheck").append(attAllcheck));var a=$(e).data("view");if("EXPERIAN DESTINATIONS"==a)$(".check-exp").first().prop("checked",$(e).is(":checked"));else if("EQUIFAX DESTINATIONS"==a){$(".check-equ").first().prop("checked",$(e).is(":checked"))}else if("TRANS UNION DESTINATIONS"==a){$(".check-tra").first().prop("checked",$(e).is(":checked"))}else if("INNOVIS DESTINATIONS"==a){$(".check-ino").first().prop("checked",$(e).is(":checked"))}else if("LEXISNEXIS DESTINATIONS"==a){$(".check-lex").first().prop("checked",$(e).is(":checked"))}else if("SAGESTREAM LLC DESTINATIONS"==a){$(".check-sag").first().prop("checked",$(e).is(":checked"))}else if("CHEX SYSTEMS DESTINATIONS"==a){$(".check-chex").first().prop("checked",$(e).is(":checked"))}else if("MIB INC DESTINATIONS"==a){$(".check-mib").first().prop("checked",$(e).is(":checked"))}else if("FACTOR TRUST DESTINATIONS"==a){$(".check-fact").first().prop("checked",$(e).is(":checked"))}var i=$(e).val(),n="";if(11==i&&(n="dfclass"),$(e).is(":checked")){var r='<span class="hida" title="'+a+'">'+a+"</span>";$(e).parent().parent().parent().parent().prev("dt").children("div").children("a").children("p").append(r);var l='<div class="form-group remove-all" id="dest_other_'+i+'"><label class="col-sm-5 control-label">OTHER</label><div class="col-sm-12"><textarea id="input_order_address" class="form-control" name="other_address"></textarea></div></div></div>';10==i?$("#address-div").after(l):11!=i&&getAddresses(i,a);var s='<li><input onclick="makeAllCheck(this)" class="dest_check_'+i+" remove-all "+n+'" id="dest_check_'+i+'" name="dest_check_1[]" type="checkbox" value="'+i+'" /> '+a+"</li>",d='<li><input onclick="makeAllCheck(this)" class="att_check_'+i+' remove-all" id="att_check_'+i+'" name="att_check_1[]" type="checkbox" value="'+i+'" /> '+a+"</li>";11==i&&(d=""),checkboxString+=s,attcheckboxString+=d,$(".dest-checkbox").children("ul").append(s),$(".att-checkbox").children("ul").append(d),$(e).parent().parent().parent().parent().prev("dt").children("div").children("a").children("p.multiSel").prev("span").hide()}else{var o=$(e).val();$("#destination_sub_menu_other_"+o).parents("div#address_other").remove(),$(e).parent().parent().parent().parent().prev("dt").children("div").children("a").children("p").children('span[title="'+a+'"]').remove(),$checkStr='<li><input onclick="makeAllCheck(this)" class="dest_check_'+o+" remove-all "+n+'" id="dest_check_'+o+'" name="dest_check_1[]" type="checkbox" value="'+o+'" /> '+a+"</li>",11!=i&&($checkAttStr='<li><input onclick="makeAllCheck(this)" class="att_check_'+o+' remove-all" id="att_check_'+o+'" name="att_check_1[]" type="checkbox" value="'+o+'" /> '+a+"</li>"),checkboxString=checkboxString.replace($checkStr,""),attcheckboxString=attcheckboxString.replace($checkAttStr,""),$("#address_"+o).parent().parent().remove(),$(".dest_check_"+o).parent().remove(),$(".att_check_"+o).parent().remove(),$("#dest_other_"+o).remove()}if(1<$(e).parent().parent().parent().parent().prev("dt").children("div").children("a").children("p").children("span").length?$(".view-allcheck").show():$(".view-allcheck").hide(),$(".hida").is(":visible")||$(".choose-dest").show(),1==t){var h=1;$(".att-checkbox").each(function(){$(this).children("ul").children("li").each(function(){$(this).children("input").attr("name","att_check_"+h+"[]")}),h++})}}function getDestOption(e){var t=$(e).val(),c=$(e).data("view"),a=$(e).parent().parent().parent().parent().prev("dt").children("div").children("a").children("p.multiSel");$("#address_"+t).next("div");if($(e).is(":checked")){var i='<span class="hida" title="'+c+'">'+c+"</span>";a.append(i),a.prev("span.choose-dest").hide()}else a.children('span[title="'+c+'"]').remove();-1==t&&$(e).parents("dl").parent("div").parent("div").next("div").toggle()}