Files
roi-theme/wp-content/plugins/ajax-search-pro/backend/settings/assets/statistics.js
root a22573bf0b Commit inicial - WordPress Análisis de Precios Unitarios
- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 21:04:30 -06:00

74 lines
2.2 KiB
JavaScript
Executable File

jQuery(function ($) {
$("form[name='asp_stat_settings'] .wpdreamsYesNoInner").on("click", function () {
setTimeout(function () {
$("form[name='asp_stat_settings']").get(0).submit();
}, 500);
});
$('a[tabid=1]').trigger('click');
$('#wpdreams .deletekeyword').on('click', function() {
var del = confirm(msg('msg_del'));
var $this = $(this);
if (del) {
id = $(this).attr('keyword');
var data = {
action: 'ajaxsearchpro_deletekeyword',
asp_statistics_request_nonce: $('#asp_statistics_request_nonce').val(),
keywordid: id
};
jQuery.post(ajaxurl, data, function (response) {
if (response == 1) {
$this.parent().fadeOut();
}
});
}
});
if (line1.length > 0) {
var plot1 = $.jqplot('top20', [line1], {
title: msg('msg_t20'),
series: [
{renderer: $.jqplot.BarRenderer}
],
axesDefaults: {
tickRenderer: $.jqplot.CanvasAxisTickRenderer,
tickOptions: {
angle: -30,
fontSize: '10pt'
}
},
axes: {
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer
}
}
});
}
if (line2.length > 0) {
var plot2 = $.jqplot('last20', [line2], {
title: msg('msg_l20'),
series: [
{renderer: $.jqplot.BarRenderer}
],
axesDefaults: {
tickRenderer: $.jqplot.CanvasAxisTickRenderer,
tickOptions: {
angle: -30,
fontSize: '10pt'
}
},
axes: {
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer
}
}
});
}
// ------------------------------------------- ETC -----------------------------------------------------------------
function msg(k) {
return typeof ASP_STAT[k] != 'undefined' ? ASP_STAT[k] : '';
}
});