Files
roi-theme/wp-content/plugins/thrive-ab-page-testing/assets/js/modals/reset-stats.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

39 lines
784 B
JavaScript
Executable File

var _instance = null;
module.exports = TVE.modal.base.extend( {
events: function () {
return _.extend( {}, TVE.modal.base.prototype.events(), {
'click .tcb-modal-save': 'reset_stats'
} );
},
reset_stats: function () {
this.running_test = false;
if ( this.$( '#thrive-ab-reset-stats' ).is( ':checked' ) ) {
this.running_test = TVE.CONST.ajax.thrive_ab.running_test;
}
this.trigger('reset_stats', this.running_test );
TVE.main.overlay();
this.close();
},
after_initialize: function () {
this.$el.addClass( 'medium' );
}
}, {
/**
* "Singleton" implementation for modal instance
*
* @param el
*/
get_instance: function ( el ) {
if ( ! _instance ) {
_instance = new TVE.ResetStatsModal( {
el: el
} );
}
return _instance;
}
} );