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

View File

@@ -0,0 +1,35 @@
/**
* General Archive Modal
*/
module.exports = TVE_Dash.views.Modal.extend( {
template: TVE_Dash.tpl( 'modals/html-archive' ),
events: {
'click .tvd-modal-submit': 'submit'
},
initialize: function ( args ) {
TVE_Dash.views.Modal.prototype.initialize.apply( this, arguments );
this.$el.addClass( 'tvd-red' );
},
render: function () {
TVE_Dash.views.Modal.prototype.render.apply( this, arguments );
this.$( '.tvd-modal-close' ).addClass( 'tvd-white-text' );
return this;
},
submit: function () {
if ( typeof this.data['submit'] !== 'function' ) {
throw new Error( 'Submit data not implemented' );
}
this.data.submit.apply( this, arguments );
this.close();
}
} );

View File

@@ -0,0 +1,60 @@
/**
* Created by PhpStorm.
* User: Ovidiu
* Date: 12/14/2017
* Time: 1:04 PM
*/
module.exports = TVE_Dash.views.Modal.extend( {
template: TVE_Dash.tpl( 'modals/html-change-automatic-winner' ),
events: {
'click .tvd-modal-submit': 'submit'
},
afterInitialize: function ( args ) {
TVE_Dash.views.Modal.prototype.afterInitialize.apply( this, arguments );
this.listenTo( this.model, 'change:auto_win_enabled', this.toggle_settings_input );
},
afterRender: function () {
TVE_Dash.views.Modal.prototype.afterRender.apply( this, arguments );
TVE_Dash.data_binder( this );
this.toggle_settings_input();
},
toggle_settings_input: function () {
var _inputs = this.$( '#auto-win-settings input' ),
_auto_win = this.model.get( 'auto_win_enabled' );
this.$( '#auto-win-enabled' ).prop( 'checked', _auto_win == 1 );
if ( _inputs.length ) {
if ( _auto_win == 1 ) {
_inputs.removeAttr( 'disabled' );
} else {
var defaults = this.model.defaults();
delete defaults.id;
this.model.set( defaults );
_inputs.attr( 'disabled', 'disabled' );
}
}
},
submit: function () {
if ( ! this.model.isValid( {step: 'winner_settings'} ) ) {
return;
}
var save_options = {
save_test_settings: true
};
this.model.save( save_options, {
success: _.bind( function () {
this.close();
}, this ),
error: _.bind( function () {
this.close();
}, this )
} );
}
} );

View File

@@ -0,0 +1,35 @@
/**
* General Delete Modal
*/
module.exports = TVE_Dash.views.Modal.extend( {
template: TVE_Dash.tpl( 'modals/html-delete' ),
events: {
'click .tvd-modal-submit': 'submit'
},
initialize: function ( args ) {
TVE_Dash.views.Modal.prototype.initialize.apply( this, arguments );
this.$el.addClass( 'tvd-red' );
},
render: function () {
TVE_Dash.views.Modal.prototype.render.apply( this, arguments );
this.$( '.tvd-modal-close' ).addClass( 'tvd-white-text' );
return this;
},
submit: function () {
if ( typeof this.data['submit'] !== 'function' ) {
throw new Error( 'Submit data not implemented' );
}
this.data.submit.apply( this, arguments );
this.close();
}
} );

View File

@@ -0,0 +1,33 @@
module.exports = TVE_Dash.views.Modal.extend( {
initialize: function ( args ) {
if ( this.model.get( 'type' ) === 'monetary' && this.model.get( 'goal_pages' ) === 'sendowl' ) {
this.template = TVE_Dash.tpl( 'modals/goal/sendowl' );
} else {
this.template = TVE_Dash.tpl( 'modals/goal/' + this.model.get( 'type' ) );
}
TVE_Dash.views.Modal.prototype.initialize.apply( this, arguments );
},
render: function () {
TVE_Dash.views.Modal.prototype.render.apply( this, arguments );
var _tpl;
if ( this.model.get( 'type' ) === 'monetary' ) {
_tpl = TVE_Dash.tpl( 'modals/goal/revenue-row' );
} else if ( this.model.get( 'type' ) === 'visits' ) {
_tpl = TVE_Dash.tpl( 'modals/goal/page-row' );
}
if ( _tpl ) {
this.collection.each( function ( item ) {
this.$( '.thrive-ap-goal-pages' ).append( _tpl( {model: item} ) );
}, this );
}
return this;
},
} );

View File

@@ -0,0 +1,38 @@
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;
}
} );

View File

@@ -0,0 +1,133 @@
var optins_settings = require( '../views/goals/optins-settings' ),
monetary_settings = require( '../views/goals/monetary-settings' ),
visits_settings = require( '../views/goals/visits-settings' );
module.exports = TVE_Dash.views.ModalSteps.extend( {
className: 'tvd-modal tvd-modal-fixed-footer',
template: TVE_Dash.tpl( 'modals/html-test' ),
events: function () {
return _.extend( TVE_Dash.views.ModalSteps.prototype.events, {
'click .tvd-modal-submit': 'submit',
'click .thrive-ab-goal': function ( event ) {
if ( event.currentTarget.classList.contains( 'thrive-ab-disabled' ) ) {
return false;
}
this.$( ".thrive-ab-goal" ).removeClass( "thrive-ab-selected" );
event.currentTarget.classList.add( "thrive-ab-selected" );
jQuery( '.tvd-modal-content' ).animate( {
scrollTop: jQuery( "#thrive-ab-goal-settings" ).offset().top
}, 500 );
this.model.set( 'type', event.currentTarget.dataset.goal );
}
} );
},
initialize: function ( args ) {
TVE_Dash.views.ModalSteps.prototype.initialize.apply( this, arguments );
this.listenTo( this.model, 'change:type', this.render_goal_settings );
this.listenTo( this.model, 'change:auto_win_enabled', this.toggle_settings_input );
},
afterRender: function () {
TVE_Dash.views.ModalSteps.prototype.afterRender.apply( this, arguments );
TVE_Dash.data_binder( this );
this.toggle_settings_input();
var has_forms = this.model.get( 'items' ).where( {has_form: false} ).length > 0;
},
gotoStep: function ( index ) {
TVE_Dash.views.ModalSteps.prototype.gotoStep.apply( this, arguments );
var _tabs = this.$step.find( '.tvd-tab' );
if ( _tabs.length ) {
_tabs.addClass( 'tvd-disabled' );
jQuery( _tabs[ index ] ).removeClass( 'tvd-disabled' ).find( 'a' ).first().trigger( 'click' );
}
return this;
},
beforeNext: function () {
return this.model.isValid( {
step: this.currentStep
} );
},
toggle_settings_input: function () {
if ( this.model.get( 'auto_win_enabled' ) === true ) {
this.$( '#auto-win-settings' ).show();
} else {
this.model.set( this.model.defaults() );
this.$( '#auto-win-settings' ).hide();
}
},
render_goal_settings: function () {
var _options = {
model: this.model
};
delete this.model.attributes.service;
if ( this.goal_settings_view ) {
this.goal_settings_view.remove();
}
switch ( this.model.get( 'type' ) ) {
case 'monetary':
this.goal_settings_view = new monetary_settings( _options );
break;
case 'visits':
this.goal_settings_view = new visits_settings( _options );
break;
case 'optins':
this.goal_settings_view = new optins_settings( _options );
break;
}
this.$( '#thrive-ab-goal-settings' ).html( this.goal_settings_view.render().$el );
},
submit: function () {
if ( ! this.model.isValid() ) {
return false;
}
TVE_Dash.showLoader( true );
this.model.save( null, {
success: _.bind( function () {
location.href = ThriveAB.page.edit_link;
}, this ),
error: _.bind( function () {
TVE_Dash.hideLoader();
TVE_Dash.err( 'Test could not be saved' );
} )
} );
}
} );

View File

@@ -0,0 +1,22 @@
module.exports = TVE_Dash.views.Modal.extend( {
events: {
'click .tvd-modal-submit': function () {
TVE_Dash.showLoader( true );
location.reload();
}
},
template: TVE_Dash.tpl( 'modals/variation-winner' ),
afterInitialize: function () {
this.model.set( 'label', TVE_Dash.sprintf( ThriveAB.t.variation_winner, this.model.get( 'title' ) ) );
/**
* add custom class to modal
*/
this.$el.addClass( 'thrive-ab-set-winner' );
}
} );

View File

@@ -0,0 +1,37 @@
var test_table = require( './../views/test/table' ),
variation_winner_modal = require( './variation-winner' );
module.exports = TVE_Dash.views.Modal.extend( {
template: TVE_Dash.tpl( 'modals/html-winner' ),
afterInitialize: function () {
this.model.on( 'winner_selected', function ( test, item ) {
this.close();
TVE_Dash.modal( variation_winner_modal, {
model: item,
title: '',
no_close: true,
dismissible: false
} );
}, this );
return this;
},
afterRender: function () {
var item_template_name = 'modals/winner/test/item/' + this.model.get( 'type' );
var test_view = new test_table( {
model: this.model,
collection: this.collection,
item_template_name: item_template_name
} );
test_view.template = TVE_Dash.tpl( 'modals/winner/test/' + this.model.get( 'type' ) );
this.$( '#test-view' ).html( test_view.render().$el );
}
} );