????JFIF??x?x????'
| Server IP : 172.67.174.47 / Your IP : 216.73.216.145 Web Server : LiteSpeed System : Linux premium151.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : tempvsty ( 647) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/./self/cwd/wp-content/themes/sinatra/inc/customizer/controls/sortable/ |
Upload File : |
;(function($) {
"use strict";
wp.customize.controlConstructor['sinatra-sortable'] = wp.customize.Control.extend({
ready: function() {
'use strict';
var control = this;
// Setup sortable.
if ( control.params.sortable ) {
control.container.find( 'ul' ).sortable({
items: '> .sinatra-sortable-item',
intersect: 'pointer',
axis: 'y',
update: function() {
control.update();
}
});
}
// Set visibility.
control.container.on( 'click', '.dashicons-visibility', function(){
$(this).closest( '.sinatra-sortable-item' ).toggleClass( 'invisible' );
control.update();
});
},
update: function() {
var items = this.container.find( '.sinatra-sortable-item' ),
new_val = {},
$item;
if ( ! _.isEmpty( items ) ) {
_.each( items, function( item ){
$item = $(item);
new_val[ $item.data( 'value' ) ] = ! $item.hasClass( 'invisible' );
});
}
this.setting.set( {} );
this.setting.set( new_val );
}
});
})(jQuery);