htmlburger / carbon-fields

WordPress Custom Fields Library ✨
https://carbonfields.net/
Other
1.38k stars 244 forks source link

Media Gallery - add order support #701

Open georgeHtmlBurger opened 5 years ago

georgeHtmlBurger commented 5 years ago

Version

Expected Behavior

After I add images to the Gallery field I'd like to be able to drag-and-drop to reorder them.

Actual Behavior

Dragging over the images simply selects the content in the admin panel.

Container definition

Container::make( 'post_meta', __( 'Project Settings', 'crb' ) )
    ->where( 'post_type', '=', 'crb_project' )
    ->add_fields( array(
        Field::make( 'media_gallery', 'crb_project_slider', __( 'Slider', 'crb' ) )
    ) );
vladcosorg commented 4 years ago

Did it get removed in the 3rd version? I think the line

"The Media Gallery supports sorting via drag and drop and the selected attachments' metadata can be edited inline." https://docs.carbonfields.net/#/fields/media-gallery

should be removed while this is not available, as it will cause a lot of dead nerve cells for the developers trying to understand why it says that it works while it does not on their projects :)

lstoyanoff commented 4 years ago

Hi, drag-and-drop sorting is supported. The "dragging handle" is not the attachment preview, but the attachment name (label). Here is a short video showing how it is currently working -- carbon-fields-media-gallery

TakahashiEi commented 3 years ago

strange behavier

製品の編集 ‹ シャリオ会 — WordPress (1)

sometimes good, but sometimes bad.