Import legacy nurinda.co.id website

This commit is contained in:
dirga committed 2026-10-01 14:27:19 +07:00
1 parent 3f59bb9038
commit 6e21646ac4
13389 files changed
+3246690

No files matched your search

@@ -0,0 +1 @@
$gf = jQuery.noConflict(); $gf(document).ready(function () { $gf('body').on('click', '#refresh-google-fonts', function () { $gf(this).next('.spinner').css({'display':'inline-block','float':'none','vertical-align': 'middle'}); var data = { action: 'ultimate_google_fonts_refresh', security: uavc.google_font_nonce, }; // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php $gf.post(ajaxurl, data, function(response) { var object = jQuery.parseJSON(response); var count = object.count; var msg = object.message; if(count == 0) { var dmsg = msg; } else { var dmsg = msg+' Please wait, Page is reloading.'; window.location.reload(true); } $gf('#vc-gf-msg').html('<div class="updated">'+dmsg+'</div>').hide(); $gf('#vc-gf-msg').slideDown(300); $gf('#refresh-google-fonts').next('.spinner').css({'display':'none'}); setTimeout(function(){ $gf('#vc-gf-msg').slideUp(300); },4000); }); }); $gf('body').on('click', '.add-google-font', function () { var button = $gf(this); var font_family = $gf(this).attr('data-font_family'); var font_name = $gf(this).attr('data-font_name'); if(!button.hasClass('font-added')) { var variants_array = new Array(); button.parent().find('.variants').find('.font-variant').each(function (iv, variant) { $v = $gf(variant); var temp_arr = {}; var variant_value = $v.find('.font-variant-inputs').val(); temp_arr['variant_value'] = variant_value; if ($v.find('.font-variant-inputs').is(':checked')) { temp_arr['variant_selected'] = true; } else { temp_arr['variant_selected'] = false; } variants_array.push(temp_arr); }); var data = { action: 'add_google_font', font_family: font_family, font_name: font_name, variants: variants_array, security: uavc.add_google_fonts }; $gf.post(ajaxurl, data, function(response) { //console.log(response); button.val('Added in collection'); button.addClass('font-added'); //if(variants_array.length > 0) if(variants_array.length > 0) var xclass = 'have-variants'; else var xclass = ''; var gshtml = '<div class="selected-font"><div class="selected-font-top fopened '+xclass+'"><div class="font-header" style="font-family:\''+font_name+'\'">'+font_name+'</div>'; if(variants_array.length > 0) gshtml += '<i class="dashicons dashicons-arrow-down"></i>'; gshtml += '<div class="clear"></div></div><span class="font-delete" data-font_name="'+font_name+'"><i class="dashicons dashicons-no-alt"></i></span>'; if(variants_array.length > 0) { if(temp = font_name.split(' ')) { var ctemp = temp.length; var temp_id = ''; $gf.each(temp,function (i, val) { temp_id += val; if ((ctemp-1) != i) temp_id += '-'; }) } else var temp_id = font_name; gshtml += '<div class="selected-font-content" style="display:block">'; $gf.each(variants_array, function(index, variant){ var lid = temp_id+'-dynamic-'+variant.variant_value+'-'+index; var font_style = 'font-family:\''+font_name+'\';'; if(/italic/i.test(variant.variant_value)) { font_style += 'font-style:italic;'; } var weight = 'normal'; if (weight = variant.variant_value.match(/\d+/)) { font_style += 'font-weight:'+weight+';'; } gshtml += '<span class="font-variant"><input type="checkbox" id="'+lid+'" value="'+variant.variant_value+'" class="selected-variant-checkbox" /><label style="'+font_style+'" for="'+lid+'">'+variant.variant_value+'</label></span>'; }); gshtml += '<input type="button" class="button alignleft update-google-font-button" value="Update font" data-font_name="'+font_name+'" /><span class="spinner fspinner"></span><div class="clear"></div></div>'; } gshtml += '</div>'; $gf('#fonts-selected-wrapper').prepend(gshtml); }); } }); $gf('body').on('click', '.font-delete', function () { $gf('.google-font-overlay').remove(); $gf('.google-font-confirmation').remove(); var button = $gf(this); var font_name = $gf(this).attr('data-font_name'); $gf('body').append('<div class="google-font-overlay"></div>'); $gf('body').append('<div class="google-font-confirmation"><div class="google-font-confirmation-header"><h3>Are you sure?</h3></div><div class="google-font-message"><input type="button" id="" data-gfont_name="'+font_name+'" class="google-font-message-buttons google-font-message-delete gfont-buttons" value="Yes, Please delete font"/><input type="button" id="" class="google-font-message-buttons google-font-message-no-delete gfont-buttons" value="No, Keep it"/></div><a href="javacript:void(0)" class="gfont-anchor-buttons gfont-buttons google-font-message-no-delete"><i class="dashicons dashicons-no-alt"></i></a></div>'); $gf('.google-font-oveLine truncated