. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 54.36.91.62 / Your IP :
216.73.216.168 [
Web Server : Apache System : Linux webm002.cluster127.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : eticmes ( 123698) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/eticmes/www/wp-content/themes/oceanwp/inc/customizer/controls/dimensions/ |
Upload File : |
var $ = jQuery;
wp.customize.controlConstructor['oceanwp-dimensions'] = wp.customize.Control.extend({
ready: function() {
'use strict';
var control = this;
control.container.on( 'change keyup paste', '.dimension-desktop_top', function() {
control.settings['desktop_top'].set( jQuery( this ).val() );
} );
control.container.on( 'change keyup paste', '.dimension-desktop_right', function() {
control.settings['desktop_right'].set( jQuery( this ).val() );
} );
control.container.on( 'change keyup paste', '.dimension-desktop_bottom', function() {
control.settings['desktop_bottom'].set( jQuery( this ).val() );
} );
control.container.on( 'change keyup paste', '.dimension-desktop_left', function() {
control.settings['desktop_left'].set( jQuery( this ).val() );
} );
control.container.on( 'change keyup paste', '.dimension-tablet_top', function() {
control.settings['tablet_top'].set( jQuery( this ).val() );
} );
control.container.on( 'change keyup paste', '.dimension-tablet_right', function() {
control.settings['tablet_right'].set( jQuery( this ).val() );
} );
control.container.on( 'change keyup paste', '.dimension-tablet_bottom', function() {
control.settings['tablet_bottom'].set( jQuery( this ).val() );
} );
control.container.on( 'change keyup paste', '.dimension-tablet_left', function() {
control.settings['tablet_left'].set( jQuery( this ).val() );
} );
control.container.on( 'change keyup paste', '.dimension-mobile_top', function() {
control.settings['mobile_top'].set( jQuery( this ).val() );
} );
control.container.on( 'change keyup paste', '.dimension-mobile_right', function() {
control.settings['mobile_right'].set( jQuery( this ).val() );
} );
control.container.on( 'change keyup paste', '.dimension-mobile_bottom', function() {
control.settings['mobile_bottom'].set( jQuery( this ).val() );
} );
control.container.on( 'change keyup paste', '.dimension-mobile_left', function() {
control.settings['mobile_left'].set( jQuery( this ).val() );
} );
}
});
$( document ).on( 'click', '.oceanwp-linked', function() {
// Set up variables
var $this = $( this );
// Remove linked class
$this.parent().parent( '.dimension-wrap' ).prevAll().slice(0,4).find( 'input' ).removeClass( 'linked' ).attr( 'data-element', '' );
// Remove class
$this.parent( '.link-dimensions' ).removeClass( 'unlinked' );
} );
// Unlinked button
$( document ).on( 'click', '.oceanwp-unlinked', function() {
// Set up variables
var $this = $( this ),
$element = $this.data( 'element' );
// Add linked class
$this.parent().parent( '.dimension-wrap' ).prevAll().slice(0,4).find( 'input' ).addClass( 'linked' ).attr( 'data-element', $element );
// Add class
$this.parent( '.link-dimensions' ).addClass( 'unlinked' );
} );
// Values linked inputs
$( document ).on( 'input', '.dimension-wrap .linked', function() {
var $data = $( this ).attr( 'data-element' ),
$val = $( this ).val();
$( '.linked[ data-element="' + $data + '" ]' ).each( function( key, value ) {
$( this ).val( $val ).change();
} );
} );