2020-04-07 13:03:04 +00:00
|
|
|
( function( api ) {
|
2021-07-25 23:25:02 +00:00
|
|
|
api.controlConstructor[ 'gp-background-images' ] = api.Control.extend( {
|
|
|
|
ready() {
|
2020-04-07 13:03:04 +00:00
|
|
|
var control = this;
|
2021-07-25 23:25:02 +00:00
|
|
|
|
2020-04-07 13:03:04 +00:00
|
|
|
control.container.on( 'change', '.generatepress-backgrounds-repeat select',
|
|
|
|
function() {
|
2021-07-25 23:25:02 +00:00
|
|
|
control.settings.repeat.set( jQuery( this ).val() );
|
2020-04-07 13:03:04 +00:00
|
|
|
}
|
|
|
|
);
|
2021-07-25 23:25:02 +00:00
|
|
|
|
2020-04-07 13:03:04 +00:00
|
|
|
control.container.on( 'change', '.generatepress-backgrounds-size select',
|
|
|
|
function() {
|
2021-07-25 23:25:02 +00:00
|
|
|
control.settings.size.set( jQuery( this ).val() );
|
2020-04-07 13:03:04 +00:00
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
control.container.on( 'change', '.generatepress-backgrounds-attachment select',
|
|
|
|
function() {
|
2021-07-25 23:25:02 +00:00
|
|
|
control.settings.attachment.set( jQuery( this ).val() );
|
2020-04-07 13:03:04 +00:00
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
control.container.on( 'input', '.generatepress-backgrounds-position input',
|
|
|
|
function() {
|
2021-07-25 23:25:02 +00:00
|
|
|
control.settings.position.set( jQuery( this ).val() );
|
2020-04-07 13:03:04 +00:00
|
|
|
}
|
|
|
|
);
|
2021-07-25 23:25:02 +00:00
|
|
|
},
|
2020-04-07 13:03:04 +00:00
|
|
|
} );
|
2021-07-25 23:25:02 +00:00
|
|
|
}( wp.customize ) );
|