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/themes/brooklyn/unite-custom/admin/assets/js/unite-megamenu-widgets.js
/* <![CDATA[ */
;(function($){
	
	"use strict";
	
    $(document).ready(function(){
                
        String.prototype.contains = function(substr) {
            return this.indexOf(substr) > -1;
        }
        
        function check_if_valid_widget( $widget ) {
            
            var i = 0;
            
            for (i = 0; i < unite_menu_widgets.widgets.length; i++) {
                
                if( $widget.attr('id').contains( unite_menu_widgets.widgets[i] ) ) {
                    
                    return true;
                    
                }
                
            }
            
            return false;
        
        }        
                
        $('#navigation-widget-area').sortable({

            update: function( evt, ui ) {
                               
                $(this).children().each(function() {
                                            
                    var $widget = $(this);
                    
                    setTimeout( function(){  
                    
                        if( $widget.attr('id') === undefined ) {
                            return;
                        }                    
                        
                        if( !check_if_valid_widget( $widget ) ) {
                            
                            $widget.remove();
                            
                            modal({
                                type: 'info',
                                title: unite_js_translation.info,
                                text: unite_js_translation.widget_message,
                                autoclose: false,
                            });                         
                            
                        }
                    
                    }, 100 );                    
                    
                });
                
            }
        
        });
        
    });
	
})(jQuery);
 /* ]]> */