File "dashboard.min.js"

Full Path: /home/tekvhqgl/public_html/dev2024_old_skip/wp-content/themes/customify/assets/js/admin/dashboard.min.js
File size: 1.18 KB
MIME-type: text/plain
Charset: utf-8

jQuery(document).ready(function(n){function s(t,a){_.isUndefined(a)&&(a="success"),e&&clearTimeout(e),n("#toast-container").length<=0&&n("body").append('<div id="toast-container" class="toast-top-right"></div>');const o=n('<div class="toast-message toast-'+a+'">'+t+'<button type="button" class="toast-close-button" role="button">×</button></div>');n("#toast-container").html(o),n("#toast-container").show(),o.on("click",function(t){n("#toast-container").hide()}),e=setTimeout(function(){n("#toast-container").hide()},1500)}var e;n(document).on("change",".auto-save",function(a){a.preventDefault();var o=n(this);if(!o.is(":disabled")){var e=o.attr("name"),a=o.attr("type");o.attr("disabled","disabled");let t="";switch(a){case"checkbox":t=o.is(":checked")?"on":"off";break;case"radio":t=n('input[name="'+e+'"]:checked').val();break;default:t=o.val()}console.log("Type",t),s(Customify_Dashboard.updating,"info"),n.ajax({url:ajaxurl,type:"post",data:{action:"customify_dashboard_settings",option:e,value:t,_nonce:Customify_Dashboard._nonce}}).done(function(t){s(Customify_Dashboard.updated,"success")}).fail(function(t){s(Customify_Dashboard.error,"warning")}).always(function(){o.removeAttr("disabled")})}})});