wp-papi / papi

:rocket: WordPress Page Type API with custom fields
https://wp-papi.github.io
MIT License
263 stars 32 forks source link

CSS bug: Remove is hidden for repeater in flexible #184

Closed rasmusbe closed 8 years ago

rasmusbe commented 8 years ago

What I expected

Remove-buttons for the repeater

What happened instead

No remove buttons for the repeater https://www.dropbox.com/s/ot89tufzs8yyv1j/Screenshot%202016-08-15%2011.58.15.png?dl=0

Steps to reproduce

public function register() {

        $this->box( __( 'Excerpt', 'bbws-admin' ), [
            papi_property( [
                'type' => 'text',
                'sidebar' => false,
                'slug' => 'post_excerpt',
                'overwrite' => 'post_excerpt'
            ] )
        ] );

        $this->box( __( 'Content', 'bbws-admin' ), [
            papi_property(
                [
                    'sidebar' => false,
                    'type' => 'flexible',
                    'slug' => 'content',
                    'settings' => [
                        'layout' => 'row',
                        'items' => [
                            [
                                'title' => __( 'Column repeater', 'bbws-admin' ),
                                'slug' => 'columns',
                                'items' => [
                                    papi_property(
                                        [
                                            'title' => __( 'Image size', 'bbws-admin' ),
                                            'type' => 'dropdown',
                                            'slug' => 'size',
                                            'settings' => [
                                                'items' => [
                                                    'big' => 'big',
                                                    'small' => 'small'
                                                ]
                                            ]
                                        ]
                                    ),
                                    papi_property(
                                        [
                                            'type' => 'repeater',
                                            'slug' => 'column',
                                            'settings' => [
                                                'items' => [
                                                    papi_property(
                                                        [
                                                            'title' => __( 'Image', 'bbws-admin' ),
                                                            'type' => 'image',
                                                            'slug' => 'image'
                                                        ]
                                                    ),
                                                    papi_property(
                                                        [
                                                            'title' => __( 'Text', 'bbws-admin' ),
                                                            'type' => 'editor',
                                                            'slug' => 'text'
                                                        ]
                                                    )
                                                ]
                                            ]
                                        ]
                                    )
                                ]
                            ],
                            [
                                'title' => __( 'One column', 'bbws-admin' ),
                                'slug' => 'one_col',
                                'items' => [
                                    papi_property( [
                                        'title' => __( 'One column', 'bbws-admin' ),
                                        'type' => 'divider',
                                    ] ),
                                    papi_property( [
                                        'title' => __( 'Image', 'bbws-admin' ),
                                        'slug' => 'image',
                                        'type' => 'image'
                                    ] ),
                                    papi_property(
                                        [
                                            'title' => __( 'Heading', 'bbws-admin' ),
                                            'type' => 'string',
                                            'slug' => 'heading'
                                        ]
                                    ),
                                    papi_property(
                                        [
                                            'title' => __( 'Text', 'bbws-admin' ),
                                            'type' => 'text',
                                            'slug' => 'text'
                                        ]
                                    ),
                                    papi_property(
                                        [
                                            'title' => __( 'Button color', 'bbws-admin' ),
                                            'type' => 'dropdown',
                                            'slug' => 'color',
                                            'settings' => [
                                                'items' => [
                                                    'Green' => 'green',
                                                    'White border' => 'border'
                                                ]
                                            ]
                                        ]
                                    ),
                                    papi_property(
                                        [
                                            'title' => __( 'Button text', 'bbws-admin' ),
                                            'type' => 'string',
                                            'slug' => 'button'
                                        ]
                                    ),
                                ]
                            ]
                        ]
                    ]
                ]
            )
        ] );

    }

What versions of softwares are you using?

frozzare commented 8 years ago

Thanks, will be out in next release.