robinbenad
Forum Replies Created
Viewing 1 replies (of 1 total)
-
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.cssandadmin.jsfile within your theme and enqueue it through yourfunctions.phplike 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.cssadd the following lines:#download-attachments .ui-sortable > tr.ui-sortable-placeholder { height: 54px; display: block; }3. in your
admin.jsadd 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 7 years, 7 months ago by robinbenad.
Viewing 1 replies (of 1 total)