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 6 years, 1 month ago by robinbenad.