HEX
Server: Apache
System: Linux webm005.cluster121.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: adventp (418412)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/adventp/www/wp-content/plugins/ut-shortcodes/vc/admin/assets/vc_extend/spacing.js
/* <![CDATA[ */
!(function($){
	
	"use strict";
	
    $(document).ready(function(){
        
        function assign_ut_css_editor() {
            
            if( $('#ut-css-editor').val() ) {
                
                var attributes = $('#ut-css-editor').val().split(';');
                
                for( var i = 0; i < attributes.length; i++ ) {
                    
                    var single_attribute = attributes[i].split(':');
                    var field_value      = single_attribute[1];
                    
                    if( single_attribute[1].indexOf('px') === -1 && single_attribute[1].indexOf('em') === -1 && single_attribute[1].indexOf('vw') === -1 && single_attribute[1].indexOf('vh') === -1 && single_attribute[1].indexOf('rem') === -1 ) {
                        field_value = field_value + 'px';
                    }
                    
                    $('.ut-css-editor-field[name="' + single_attribute[0].replace('-','_') + '"]').val( field_value );
                
                }
            
            }
        
        }       
        
        assign_ut_css_editor();
        
        function update_ut_css_editor() {
        
            var css = $('.ut-css-editor-field').map(function() { 
                
                if( this.value !== '' ) {
                    
                    if( this.value.indexOf('px') !== -1 || this.value.indexOf('em') !== -1 || this.value.indexOf('vw') !== -1 || this.value.indexOf('vh') !== -1 || this.value.indexOf('rem') !== -1 ) {
                        
                        return $(this).data('attribute') + ':' + this.value; 
                        
                    }
                    
                    return $(this).data('attribute') + ':' + this.value + 'px';                     
                        
                }
            
            }).get().join(';');
            
            $('#ut-css-editor').val( css );
        
        }
        
        $(document).on('keyup', '.ut-css-editor-field', function() {
            
            update_ut_css_editor();
            
        });
        
        $(document).on('change', '.ut-css-editor-field', function() {
            
            update_ut_css_editor();
            
        });
                          
        
    });    
        
})(window.jQuery);
 /* ]]> */