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,71 @@
var base_view = require( '../base' ),
page_search = require( './../../controls/page_search' );
module.exports = base_view.extend( {
className: 'test-item-form tvd-col tvd-s12',
template: TVE_Dash.tpl( 'goals/page' ),
type: null,
events: {
'click .thrive-ab-remove-page': 'remove_page'
},
initialize: function ( args ) {
if ( args.test && args.test instanceof Backbone.Model ) {
this.test = args.test
}
this.model.set('type', this.test.get('type'));
this.page_search_view = new page_search.view( {
model: this.model,
goal_pages: this.test.get('goal_pages')
} );
this.page_search_view.test = this.test;
this.goal_pages = this.test.get( 'goal_pages' );
if ( ! this.goal_pages ) {
this.goal_pages = {};
}
this.listenTo( this.model, 'change:revenue', this.onRevenueChange );
this.listenTo( this.model, 'change:post_id', this.onPostChange );
},
onPostChange: function () {
if ( this.model.get( 'post_id' ) != null ) {
this.goal_pages[this.model.get( 'post_id' )] = {
post_id: this.model.get( 'post_id' ),
post_title: this.model.get( 'post_title' ),
revenue: this.model.get( 'revenue' )
};
this.test.set( 'goal_pages', this.goal_pages );
}
},
onRevenueChange: function () {
if ( this.model.get( 'post_id' ) ) {
this.onPostChange();
}
},
render: function () {
this.$el.html( this.template( {item: this.page_search_view.model, test: this.test} ) );
setTimeout( _.bind( function () {
TVE_Dash.materialize( this.$el );
}, this ), 0 );
TVE_Dash.data_binder( this );
this.$( '.page-search' ).html( this.page_search_view.render().$el );
return this;
},
remove_page: function () {
delete this.goal_pages[this.model.get( 'post_id' )];
this.test.set( 'goal_pages', this.goal_pages );
this.$el.unbind();
this.remove();
}
} );

View File

@@ -0,0 +1,71 @@
var settings = require( './settings' );
( function ( $ ) {
module.exports = settings.extend( {
template: TVE_Dash.tpl( 'goals/monetary-settings' ),
events: function () {
var parent_settings = settings.prototype.events.apply( this, arguments );
return _.extend( parent_settings, {
'change #thrive-ab-monetary-services': 'on_service_change'
} );
},
render: function () {
this.$el.html( this.template( {item: this.model} ) );
this.$( '.thrive-ab-monetary-service' ).hide();
this.init_services();
this.render_goal_pages();
return this;
},
on_service_change: function ( event ) {
var $services = this.$( '.thrive-ab-monetary-service' ),
service = event.currentTarget.value;
$services.hide();
this.model.set( 'service', service );
if ( service.length <= 0 ) {
return;
}
$services.closest( '#' + service ).css( 'display', 'block' );
},
init_services: function () {
if ( typeof ThriveAB.monetary_services === 'undefined' || ThriveAB.monetary_services.length <= 0 ) {
return;
}
var $dropdown = this.$( '#thrive-ab-monetary-services' ),
services = Object.keys( ThriveAB.monetary_services );
_.each( ThriveAB.monetary_services, function ( service, slug ) {
var $option = $( '<option/>' )
.attr( 'value', slug )
.text( typeof service.label ? service.label : slug );
$dropdown.append( $option );
}, this );
if ( services.length === 1 ) {
$dropdown.val( services[ 0 ] ).change();
$dropdown.parents( '.tvd-row' ).first().hide();
}
}
} );
} )( jQuery );

View File

@@ -0,0 +1,12 @@
var base_view = require( '../base' );
module.exports = base_view.extend( {
template: TVE_Dash.tpl( 'goals/optins-settings' ),
render: function () {
this.$el.html( this.template() );
return this;
}
} );

View File

@@ -0,0 +1,65 @@
var base_view = require( '../base' ),
goal_page = require( './goal_page' ),
base_model = require( './../../models/base' ),
page_search = require( '../../controls/page_search' );
module.exports = base_view.extend( {
className: 'tvd-col tvd-s12',
events: function () {
return _.extend( base_view.prototype.events, {
'click .thrive-ab-add-new-goal': 'add_goal_page_field'
} );
},
initialize: function () {
this.item_form_views = [];
},
render: function () {
this.$el.html( this.template( {item: this.model} ) );
this.render_goal_pages();
return this;
},
render_goal_pages: function () {
var goal_pages = this.model.get( 'goal_pages' ),
form_view,
self = this;
if ( goal_pages ) {
_.each( goal_pages, function ( element, index ) {
form_view = new goal_page( {
test: self.model,
model: new base_model( element )
} );
self.item_form_views.push( form_view );
self.$( '#item-forms' ).append( self.create_goal_page( form_view ) );
} );
} else {
this.add_goal_page_field();
}
},
add_goal_page_field: function () {
var form_view = new goal_page( {
test: this.model,
model: new base_model()
} );
this.item_form_views.push( form_view );
this.$( '#item-forms' ).append( this.create_goal_page( form_view ) );
},
create_goal_page: function ( input_view ) {
return input_view.render().$el;
}
} );

View File

@@ -0,0 +1,6 @@
var settings = require( './settings' );
module.exports = settings.extend( {
template: TVE_Dash.tpl( 'goals/visits-settings' )
} );