Support » Plugin: Download Attachments » Plugin “Dowload Attachments by DFactory ” – Problem with drag and drop

  • Hi,
    the Drag and Drop don’t work correctly, from backend it is impossible to move the files correctly because it seems to be a css problem.

    Please check and correct soon!

    Good job!

    Thx

Viewing 6 replies - 1 through 6 (of 6 total)
  • !UPDATA!

    By disabling the Advanced Custom Fields plugin ( V. 5.7.6 ) , drag and drop continues to work.

    Disabling Advanced Custom Fields will indeed make the attachments meta box to work properly. But it needs to work with Advanced Custom Fields activated. Please look into this.

    i’ve the same problem. i needs to work with Advanced Custom Fields activated.

    Same problem: did anyone report that to the acf people?

    I reported the issue to the ACF people: i’m using acf pro on a customer website.

    Hey everyone, I have found a workaround while this is hopefully officially getting fixed.

    First make sure you have way a to inject css and javascript into the admin area. If you already have this setup, you can skip the following step:

    1. Create a admin.css and admin.js file within your theme and enqueue it through your functions.php like so:

    function my_admin_theme_style_and_script() {
    	wp_enqueue_style('my-admin-style', get_template_directory_uri() . '/admin.css', false, '1.0');
    	wp_enqueue_script( 'my-admin-script', get_template_directory_uri() . '/admin.js', false, '1.0' );
    }
    add_action('admin_enqueue_scripts', 'my_admin_theme_style_and_script');

    2. In your admin.css add the following lines:

    #download-attachments .ui-sortable > tr.ui-sortable-placeholder {
    	height: 54px;
    	display: block;
    }

    3. in your admin.js add the following lines:

    jQuery(document).ready(function( $ ) {
    
        if($("#download-attachments").length){
            $( '#da-files tbody' ).sortable( "option", { 
    		stop: function ( e, ui ) {
    			$(ui.item).attr("style","");  
    			$( '#da-add-new-file input' ).prop( 'disabled', false );
    			$( 'p.da-save-files input' ).prop( 'disabled', false );
    		}
    	} );
        }
        
    });

    That should do the trick! If you have a lot of custom meta fields, you might want to wrap this in a timeout function.

    • This reply was modified 1 year, 4 months ago by robinbenad.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Plugin “Dowload Attachments by DFactory ” – Problem with drag and drop’ is closed to new replies.