stockbot-buyvm/tests/data/stock_files/whmcs-custom.min.js
2023-12-02 14:49:13 -05:00

1 line
3.5 KiB
JavaScript

$(document).ready(function(){$("[data-href]").on("click",function(t){t.preventDefault(),document.location.href=$(this).data("href")}),$("[submit-form]").on("click",function(){$(this).closest("form").submit()}),$("#subaccountActivate input").on("ifToggled",function(t){$("#subacct-container").collapse("toggle")}),$("#inputAllowSso").on("change",function(){var t=$(this).closest(".panel-switch").find(".loader");t.fadeIn(400),WHMCS.http.jqClient.post("clientarea.php",jQuery("#frmSingleSignOn").serialize()).promise().done(function(){t.fadeOut(400)})}),$(document).on("click","[data-trigger-click]",function(t){t.preventDefault;var a=$(this).data("target");$("body").find(a).trigger("click")}),$("[data-form]").on("click",function(t){t.preventDefault;var a=$(this).data("form");$("body").find(a).submit()});var t=$(".list-group-tab-nav, .page-clientareadomaindetails #Overview"),a=$.extend({getHashCallback:function(t){return t}});if($("a",t).on("click",function(){if("tab"===$(this).data("toggle")){var e=this.hash,i=e?'a[href*="'+e+'"]':"li:first-child > a",n=e.replace("tab","");$(t).find(".active").removeClass("active"),$("body").find(i).addClass("active"),$("body").find(n).addClass("active").siblings(".tab-pane").removeClass("active"),window.location.hash=a.getHashCallback(e)}}),window.location.hash&&t.length>0){var e=window.location.hash,i=e?'a[href*="'+e+'"]':"li:first-child > a";$("body").find(i).addClass("active");var n=e.replace("tab","");$("body").find(n).addClass("active").siblings(".tab-pane").removeClass("active")}if($(document).on("click","[data-btn-loader]",function(){$(this).find("span").not(".loader").addClass("invisible"),$(this).find(".loader").removeClass("hidden")}),$("[data-cc-popover-show]").on("mouseenter",function(){$(this).siblings("[data-cc-popover]").addClass("fade in").show()}),$("[data-cc-popover-show]").on("mouseout",function(){$(this).siblings("[data-cc-popover]").removeClass("fade in").hide()}),$("[data-radio-tab]").on("click",function(){$(this).find('input[type="radio"]').iCheck("update")}),$(".payment-form").length>0){var s=$(".payment-form").data("btntext"),o=$(".payment-form").data("btnsubscribetext");$(".payment-form").find('input[type="image"]').attr("type","submit").attr("value",s),$("#paynow").html(s).attr("style","color: #fff").addClass("btn");var c=$(".payment-form").find("form").length;2==c&&$(".payment-form").find("form:first").find('input[type="submit"]').attr("value",o)}var l=$(".btn-check-all"),d=$('.check-all-container input[type="checkbox"]').not(":disabled");l.on("click",function(t){t.preventDefault();var a=$(this).data("checkalltext"),e=$(this).data("uncheckalltext");$(this).hasClass("checked")?(d.iCheck("uncheck"),$(this).removeClass("checked"),$(this).text(a)):(d.iCheck("check"),$(this).addClass("checked"),$(this).text(e))}),$('input[name="canchangepin"]').closest("div").addClass("checkbox").css("margin-top","-5px"),$('input[name="canchangepin"]').iCheck({checkboxClass:"checkbox-styled",radioClass:"radio-styled",increaseArea:"40%"}),jQuery(".ssl-status.ssl-sync").each(function(){var t=jQuery(this);WHMCS.http.jqClient.post(WHMCS.utils.getRouteUrl("/domain/ssl-check"),{type:t.closest(".ssl-info").data("type"),domain:t.closest(".ssl-info").data("domain"),token:csrfToken},function(a){if(a.invalid)t.hide();else{var e=t.data("maintemplate");"undefined"==e&&(e="lagom");var i=a.image.replace("assets/img/ssl/","templates/"+e+"/assets/img/ssl/12x12/");i=i.replace(".png",".svg"),t.replaceWith('<img src="'+i+'" data-toggle="tooltip" title="'+a.tooltip+'" class="'+a.class+'">')}})})});