laravelfile-management

Laravel unisharp file manager how to disable multi-select


Laravel unisharp file manager how to disable multi-select

In Laravel 9 , Unshirp File Managaer I can not disable this button, how I can delete it or disable it, I shoould write script or just change inside lfm config file can somebody give me advice how I can


Solution

  • First After Install Package

    php artisan vendor:publish --tag=lfm_public
    

    Then Inside vendor/file-filemanager/js/script.js

    var myParam = location.search.split('multiple=')[1];//new
    
    if(myParam == 'false'){ //new
            multi_selection_enabled = multi_selection_enabled;//
        }else{
            multi_selection_enabled = !multi_selection_enabled;//here
      }
    

    Instead Of This Code

    multi_selection_enabled = !multi_selection_enabled
    

    Then Inside vendor/file-filemanager/js/stand-alone-button.js

     window.open(route_prefix + '?type=' + type+'?&multiple=false',
     'FileManager', 'width=900,height=600');
    
    

    Instead Of This Code

     window.open(route_prefix + '?type=' + type', 'FileManager', 'width=900,height=600');
    
    

    Then Inside Vendor Laravel File Manager src/views/index.blade.php,you should uncomment this script line

       <script src="{{ asset('vendor/laravel-filemanager/js/script.js') }}"></script>
    
    

    It helped Me , You can try this .