| Server IP : 87.98.154.146 / Your IP : 216.73.216.165 Web Server : Apache System : Linux webm004.cluster126.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : ohklomafyi ( 52085) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/ohklomafyi/www/wp-content/themes/oceanwp/inc/customizer/controls/sortable/ |
Upload File : |
wp.customize.controlConstructor['oceanwp-sortable'] = wp.customize.Control.extend({
ready: function() {
'use strict';
var control = this;
// Set the sortable container.
control.sortableContainer = control.container.find( 'ul.sortable' ).first();
// Init sortable.
control.sortableContainer.sortable({
// Update value when we stop sorting.
stop: function() {
control.updateValue();
}
}).disableSelection().find( 'li' ).each( function() {
// Enable/disable options when we click on the eye of Thundera.
jQuery( this ).click( function() {
var $i = jQuery( this ).find( 'i.visibility' );
$i.toggleClass( 'dashicons-saved' );
$i.toggleClass( 'dashicons-no-alt' );
$i.toggleClass( 'dashicons-visibility-faint' ).parents( 'li:eq(0)' ).toggleClass( 'invisible' );
});
}).click( function() {
// Update value on click.
control.updateValue();
});
},
/**
* Updates the sorting list
*/
updateValue: function() {
'use strict';
var control = this,
newValue = [];
this.sortableContainer.find( 'li' ).each( function() {
if ( ! jQuery( this ).is( '.invisible' ) ) {
newValue.push( jQuery( this ).data( 'value' ) );
}
});
control.setting.set( newValue );
}
});