Files
roi-theme/wp-content/plugins/sociallocker-next-premium/plugin/admin/assets/js/notices.010000.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

/*!
* Notices
*
* @author Paul Kashtanoff <paul@byonepress.com>
* @copyright (c) 2015, OnePress Ltd
*
* @package factory-notices
* @since 1.0.0
*/
(function($){
var achievementPopups = {
init: function() {
var self = this;
$("#onp-sl-review .onp-sl-button-link, #onp-sl-review .onp-sl-button-primary").click(function(){
var $popup = $("#onp-sl-review");
$(".factory-popup-overlay").fadeOut(300);
$popup.fadeOut(300);
var data = {
achievementType: 'review',
achievementValue: $(this).data('achievement-value'),
action: "onp_sl_hide_achievement"
};
$.ajax({
url: ajaxurl,
type: "post",
data: data
});
self.setCookie("onp_sl_review_closed", 1, 1000);
if ( $(this).is(".onp-sl-button-primary") ) return true;
else return false;
});
},
setCookie: function (name, value, days) {
var expires;
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
expires = "; expires=" + date.toGMTString();
} else {
expires = "";
}
document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + expires + "; path=/";
},
getCookie: function(name) {
var nameEQ = encodeURIComponent(name) + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) === ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) === 0) return decodeURIComponent(c.substring(nameEQ.length, c.length));
}
return null;
}
};
$(function(){
achievementPopups.init();
});
})(jQuery);