(function($) { $(document).ready(function() { // Custom Select Search w/ Icons $("div[id$='ccn_icon_class'], div[id^='ccn_icon_class'], .ccn_icon_class").each(function() { $(this).find(".custom-select").each(function() { $(this).wrap("
"); $(this).find("option").each(function() { var $ccnIcon = $(this).attr("value"); $(this).attr("data-tokens", $ccnIcon).attr("data-icon", $ccnIcon).attr("data-subtext", $ccnIcon); }); $(this).addClass("selectpicker").attr("data-live-search", "true").attr("data-width", "100%").removeClass("custom-select"); }); }); if (window.location.search.indexOf('cocoon_live_customizer=1') == -1) { // Spectrum.js $("div[id$='ccn_spectrum_class'], div[id^='ccn_spectrum_class'], .ccn_spectrum_class").each(function() { $(this).find("input").spectrum({ color: $(this).attr("value"), preferredFormat: 'rgb', showInput: true, showAlpha: true }); }); } if ($(".ccn_context_dashboard .dashboard_sidebar.ccn_dashboard_scroll_drawer").length) { var $docHeight = Number($(document).height()) + Number(150); $(".ccn_context_dashboard .dashboard_sidebar.ccn_dashboard_scroll_drawer").css('min-height', $docHeight); } if ($(".ccn_receipt_handler").length) { $(".ccn_receipt_handler").click(function(event) { event.preventDefault(); var receiptID = $(this).attr("data-ccn-receipt-id"); var w = window.open("", "popupWindow", "width=650, height=450, scrollbars=yes"); var $w = $(w.document.body); $w.html($('#' + receiptID).html()); }); } if ($(".path-admin-report-overviewstats").length) { $(".chartslist").each(function() { $(this).addClass("row"); $(this).find(">li").each(function() { var href = $(this).find("a").attr('href'); $(this).find("a").contents().unwrap(); $(this).addClass("col-sm-6 col-md-6 col-lg-6 col-xl-3"); $(this).wrapInner(""); }); $(this).find(">li:nth-child(1) .ff_one").append("