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>
This commit is contained in:
root
2025-11-03 21:04:30 -06:00
commit a22573bf0b
24068 changed files with 4993111 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,194 @@
jQuery(document).ready(function () {
//selectpicker global jquery
// jQuery('select').selectpicker();
//tooltip
// tippy('[data-toggle="tooltip"]');
//Datepicker Jquery
// jQuery('#from-date').datepicker({
// dateFormat: 'yy-mm-dd',
// }).on('change', function(){
// $('.datepicker').hide();
// });
// jQuery('#to-date').datepicker({
// dateFormat: 'yy-mm-dd',
// }).on('change', function(){
// $('.datepicker').hide();
// });
// jQuery('input[data-type="date"]')
// .datepicker({
// dateFormat: 'dd/mm/yyyy'
// })
// .on('change', function() {
// $('.datepicker').hide();
// });
//Icheck Jquery
// jQuery('input[type=radio]:not(".noicheck"), input[type=checkbox]:not(".noicheck,.ios-switch")').iCheck({
// checkboxClass: 'icheckbox_square-green',
// radioClass: 'iradio_square-green',
// increaseArea: '20%' // optional
// });
jQuery("#upgrade_notices_csv_bro").click(function () {
// jQuery.ajax({
// type: "post",
// url: ajaxurl, //this is wordpress ajax file which is already avaiable in wordpress
// data: {
// action:'upgrade_notices_csv_bro' //this value is first parameter of add_action
// },
// success: function(msg){
// console.log(msg);
// }
// });
jQuery.ajax({
type: "post",
url: window.smack_nonce_object.url, // Use the URL from the localized object
data: {
action: "upgrade_notices_csv_bro",
nonce: window.smack_nonce_object.url, // Include the nonce in the data
},
success: function (msg) {
location.reload();
},
});
});
// Setting Page Slide Menu jQuery
jQuery(".setting-tab-list").click(function () {
jQuery(this).siblings().removeClass("active");
jQuery(this).addClass("active");
var data = jQuery(this).data("setting");
jQuery("." + data)
.siblings()
.removeClass("active");
jQuery("." + data).addClass("active");
});
jQuery(".custom-fields-tab-list").click(function () {
jQuery(this).siblings().removeClass("active");
jQuery(this).addClass("active");
var data = jQuery(this).data("tab");
jQuery("." + data)
.siblings()
.removeClass("active");
jQuery("." + data).addClass("active");
});
jQuery(".browse-btn").click(function () {
alert("hai");
jQuery(".drop_file").trigger("click");
});
// jQuery('.advanced-filter input[type="checkbox"]').on('change', function(){
// alert('');
// });
jQuery('.advanced-filter input[type="checkbox"]').on(
"ifChecked",
function () {
jQuery(this).parent().parent().siblings(".row").slideDown();
}
);
jQuery('.advanced-filter input[type="checkbox"]').on(
"ifUnchecked",
function () {
jQuery(this).parent().parent().siblings(".row").slideUp();
}
);
jQuery(".split-record").on("ifChecked", function () {
jQuery(this).parent().parent().siblings("input").show();
});
jQuery(".split-record").on("ifUnchecked", function () {
jQuery(this).parent().parent().siblings("input").hide();
});
jQuery('.custom-size input[type="checkbox"]')
.on("ifChecked", function () {
jQuery(".custom-image-sizes").slideDown();
})
.on("ifUnchecked", function () {
jQuery(".custom-image-sizes").slideUp();
});
jQuery(".btn-add-size").on("click", function () {
var clone_row = jQuery(
"table.media-handle-image-size tbody tr#original-row"
).clone();
jQuery(clone_row).removeAttr("id");
jQuery(clone_row).children().children(".form-control").removeAttr("value");
jQuery(clone_row).appendTo("table.media-handle-image-size tbody");
jQuery("table.media-handle-image-size tbody tr td.delete").on(
"click",
function () {
var row_length = jQuery(
"table.media-handle-image-size tbody tr"
).length;
if (row_length > 1) {
jQuery(this).parent().remove();
} else {
return;
}
}
);
});
jQuery("#media-handle").on("change", function () {
if (jQuery(this).is(":checked")) {
jQuery(".media-fields").addClass("active");
} else {
jQuery(".media-fields").removeClass("active");
}
});
jQuery(".table-mapping .action-icon").on("click", function () {
jQuery(".manipulation-screen").removeClass("active");
jQuery(this).children(".manipulation-screen").addClass("active");
// jQuery(this).children('.manipulation-screen').show();
});
jQuery(".manipulation-screen .close").on("click", function () {
// console.log('clicked');
jQuery(this).parent().removeClass("active");
// console.log('here');
});
// open calender when click icon
jQuery(".input-icon").on("click", function () {
jQuery(this).siblings(".form-control").focus();
});
dragableDroppable();
});
// mapping accordon jQuery
function toggle_func(id) {
jQuery("#" + id + "-body").slideToggle("slow");
//jQuery('#icon'+id).toggleClass("icon-circle-down").toggleClass("icon-circle-up");
jQuery("#" + id).toggleClass("bg-white active");
jQuery("#" + id + " span").toggleClass("active");
}
// Dragable JS (Advance Mapping Page)
var dragableDroppable = function () {
jQuery(".draggable").draggable({
//revert: true,
helper: "clone",
containment: "document",
helper: function () {
return jQuery(this).clone().appendTo("body").css({
zIndex: 5,
});
},
start: function (event, ui) {
jQuery(this).fadeTo("fast", 0.5);
},
stop: function (event, ui) {
jQuery(this).fadeTo(0, 1);
},
});
jQuery(".droppable").droppable({
hoverClass: "active",
drop: function (event, ui) {
this.value += "{" + jQuery(ui.draggable).text() + "}";
},
});
};

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,80 @@
jQuery(document).ready(function(){
document.getElementById('click_get_started').onclick = function () {
jQuery(this).html('<img src = ' + `${window.smack_nonce_object.imagePath}ajax-loader.gif`+ '>');
var addons = ['Users','WooCommerce','Exporter'];
jQuery.ajax({
type: 'POST',
url: smack_nonce_object.url,
data: {
'action' : 'install_plugins',
'addons' : addons,
'securekey' : smack_nonce_object.nonce,
},
success: function(data){
window.location.replace(window.location.origin + ajaxurl+ '/../admin.php?page=com.smackcoders.csvimporternew.menu');
},
error: function(errorThrown){
}
});
}
$("#Useraddon").click(function() {
jQuery(this).html('<img src = ' + `${window.smack_nonce_object.imagePath}ajax-loader.gif`+ '>');
jQuery.ajax({
type: 'POST',
url: smack_nonce_object.url,
data: {
'action' : 'install_addon',
'addons' : 'Users',
'securekey' : smack_nonce_object.nonce,
},
success: function(response){
$("#Useraddon").html('Activated');
},
error: function(errorThrown){
}
});
});
$("#WooCommerceaddon").click(function() {
jQuery(this).html('<img src = ' + `${window.smack_nonce_object.imagePath}ajax-loader.gif`+ '>');
jQuery.ajax({
type: 'POST',
url: smack_nonce_object.url,
data: {
'action' : 'install_addon',
'addons' : 'WooCommerce',
'securekey' : smack_nonce_object.nonce,
},
success: function(response){
$("#WooCommerceaddon").html('Activated');
},
error: function(errorThrown){
}
});
});
$("#Exporteraddon").click(function() {
jQuery(this).html('<img src = ' + `${window.smack_nonce_object.imagePath}ajax-loader.gif`+ '>');
jQuery.ajax({
type: 'POST',
url: smack_nonce_object.url,
data: {
'action' : 'install_addon',
'addons' : 'Exporter',
'securekey' : smack_nonce_object.nonce,
},
success: function(response){
$("#Exporteraddon").html('Activated');
},
error: function(errorThrown){
}
});
});
});

View File

@@ -0,0 +1,221 @@
function showSubmit(){
var reason = document.getElementsByName('selected-reason')
for(i = 0; i < reason.length; i++) {
if(reason[i].checked){
if(reason[i].value == 1){
document.getElementById('input-reason2').style.display="none"
document.getElementById('input-reason5').style.display="none"
}else if(reason[i].value == 2){
document.getElementById('input-reason2').style.display="block"
document.getElementById('input-reason2').focus();
document.getElementById('input-reason5').style.display="none"
}else if(reason[i].value == 3){
document.getElementById('input-reason2').style.display="none"
document.getElementById('input-reason5').style.display="none"
}else if(reason[i].value == 4){
document.getElementById('input-reason2').style.display="none"
document.getElementById('input-reason5').style.display="none"
}else if(reason[i].value == 5){
document.getElementById('input-reason5').style.display="block"
document.getElementById('input-reason5').focus();
document.getElementById('input-reason2').style.display="none"
}
}
}
document.getElementById('skipanddeactivate').style.display="none";
document.getElementById('mailsubmit').setAttribute('style','margin-right:10px;');
}
function hideSubmit(){
document.getElementById('mailsubmit').style.display="none";
document.getElementById('skipanddeactivate').setAttribute('style','margin-right:10px;');
}
function submitReason(){
var mailReason = ""
var reason = document.getElementsByName('selected-reason')
for(i = 0; i < reason.length; i++) {
if(reason[i].checked){
if(reason[i].value == 1){
mailReason = "The plugin did not work"
}else if(reason[i].value == 2){
mailReason = "I found a better plugin.\n"
var iReason = document.getElementById('input-reason2');
if(iReason.value == ""){
alert("Please Enter the plugin name!")
iReason.focus();
return false;
}else{
mailReason += iReason.value;
}
}else if(reason[i].value == 3){
mailReason = "I do not like to share my information with you"
}else if(reason[i].value == 4){
mailReason = "It is a temporary deactivation. I am just debugging an issue"
}else if(reason[i].value == 5){
mailReason = "Reason type : Other.\n"
var iReason = document.getElementById('input-reason5');
if(iReason.value == ""){
alert("Please Enter the reason to deactivate this plugin!")
iReason.focus();
return false;
}else{
mailReason += iReason.value;
}
}
}
}
document.getElementById('myModal').style.display='none'
document.getElementById("loader").style.display = 'block';
var formData = new FormData();
formData.append('action', 'DeactivateMail');
formData.append('reason', mailReason);
formData.append("securekey", window.smack_nonce_object.nonce);
var xhttp = new XMLHttpRequest();
xhttp.open("POST",ajaxurl,true);
xhttp.send(formData);
xhttp.onreadystatechange = function() {
if (xhttp.readyState === 4) {
document.getElementById("skipanddeactivate").click();
document.getElementById("loader").style.display = 'none';
}
}
return true;
}
window.onload = function(){
var popUp = document.querySelector('[data-slug="wp-ultimate-csv-importer"] .deactivate a');
if (typeof(popUp) != 'undefined' && popUp != null){
var urlRedirect = popUp.getAttribute('href');
popUp.onclick = function(event){
event.preventDefault()
var removeModal = document.getElementById("myModal");
if (typeof(removeModal) != 'undefined' && removeModal != null){
}else{
popupModal();
}
document.getElementById('myModal').style.display='block'
}
}
function popupModal(){
var loaderdiv = document.createElement('div');
loaderdiv.setAttribute('id','loader');
document.body.appendChild(loaderdiv);
var maindiv = document.createElement('div');
maindiv.setAttribute('id','myModal');
maindiv.setAttribute('class','myModal');
document.body.appendChild(maindiv);
var modalContent = document.createElement("div");
modalContent.setAttribute('class','modal-content');
maindiv.appendChild(modalContent);
var header = document.createElement("div")
header.setAttribute('style','display:flex;align-items:center;justify-content:space-between;')
var headerhead = document.createElement("h3");
var headerheadS = document.createElement("strong");
headerheadS.innerHTML = "Quick Feedback";
headerhead.appendChild(headerheadS);
header.appendChild(headerhead);
var close = document.createElement("span");
close.setAttribute('class',"close-button");
close.setAttribute('onclick',"document.getElementById('myModal').style.display='none'")
close.innerHTML = "×";
header.appendChild(close);
modalContent.appendChild(header);
var body = document.createElement('div');
body.setAttribute('class','card cardView');
modalContent.appendChild(body);
var bodyhead = document.createElement("h4");
var bodyheadS = document.createElement("strong");
bodyheadS.innerHTML = "If you have a moment, please let us know why you are deactivating:";
bodyhead.appendChild(bodyheadS);
body.appendChild(bodyhead);
var ul = document.createElement("ul");
body.appendChild(ul);
var li = [];
var br = [];
var label = [];
var span = [];
var input = [];
var inputReason = [];
var spanContent = [];
for (i = 1; i <= 5; i++) {
li[i] = document.createElement("li");
ul.appendChild(li[i]);
label[i] = document.createElement("label");
li[i].appendChild(label[i]);
span[i] = document.createElement("span");
label[i].appendChild(span[i]);
input[i] = document.createElement("input");
input[i].setAttribute('type','radio');
input[i].setAttribute('name','selected-reason');
input[i].setAttribute('id','selected-reason'+i);
input[i].setAttribute('value',i);
input[i].setAttribute('onchange','showSubmit()');
span[i].appendChild(input[i]);
br[i] = document.createElement("br");
li[i].appendChild(br[i]);
inputReason[i] = document.createElement("input");
inputReason[i].setAttribute('type','text');
inputReason[i].setAttribute('id','input-reason'+i);
inputReason[i].setAttribute('name','input-reason'+i);
inputReason[i].setAttribute('style','display:none;margin-left:20px;margin-top:10px;margin-bottom:5px;width:70%;');
li[i].appendChild(inputReason[i]);
spanContent[i] = document.createElement("span");
label[i].appendChild(spanContent[i]);
}
document.getElementById('input-reason2').setAttribute('placeholder',"What's the plugin's name?")
document.getElementById('input-reason5').setAttribute('placeholder',"Kindly tell us the reason so we can improve?")
spanContent[1].innerHTML = "The plugin didn't work";
spanContent[2].innerHTML = "I found a better plugin";
spanContent[3].innerHTML = "I don't like to share my information with you";
spanContent[4].innerHTML = "It's a temporary deactivation. I'm just debugging an issue";
spanContent[5].innerHTML = "Other";
var footer = document.createElement("div");
footer.setAttribute('style','float:right');
modalContent.appendChild(footer);
var submitBtn = document.createElement('input');
submitBtn.setAttribute('type','button');
submitBtn.setAttribute('id','mailsubmit');
submitBtn.setAttribute('name','mailsubmit');
submitBtn.setAttribute('class','button button-secondary button-deactivate allow-deactivate');
submitBtn.setAttribute('value','Submit & Deactivate');
submitBtn.setAttribute('onclick','submitReason()')
submitBtn.setAttribute('style','display:none;margin-right:10px;');
footer.appendChild(submitBtn);
var skipBtn = document.createElement('a');
skipBtn.setAttribute('id','skipanddeactivate');
skipBtn.setAttribute('class','button button-secondary button-deactivate allow-deactivate');
skipBtn.setAttribute('style','margin-right:10px;');
skipBtn.setAttribute('href',urlRedirect)
skipBtn.innerHTML = "Skip &amp; Deactivate";
footer.appendChild(skipBtn);
var cancelBtn = document.createElement('span');
cancelBtn.setAttribute('class','button button-secondary button-close');
cancelBtn.setAttribute('onclick',"document.getElementById('myModal').style.display='none'");
cancelBtn.innerHTML = "Cancel";
footer.appendChild(cancelBtn);
}
}