Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group options container cant be hidden #2718

Closed
danyj opened this issue Jul 27, 2017 · 5 comments

Comments

@danyj
Copy link
Contributor

commented Jul 27, 2017

Group container as described is mostly used to

"Group options into a wrapper div. Has no design. Usually used to show/hide a group of options from javascript"

http://manual.unyson.io/en/latest/options/introduction.html#containers

but if we do that and even add a class to our group container the class is pinned to inner container wich leaves this

http://prntscr.com/g1119k
http://prntscr.com/g111sq

try this in theme/options/posts/page.php

'some_group' => array(
	'type' => 'group',
        'attr' => array('class' => 'custom-class', 'data-foo' => 'bar'),
	'options' => array(
		// add some options
	),
),

you can see here

that only box gets additional data

@ViorelEremia

This comment has been minimized.

Copy link
Contributor

commented Aug 3, 2017

Hi, Dan
I try to understand you but I can't.
What I only understand is the line
'attr' => array('class' => 'custom-class', 'data-foo' => 'bar'), will not work http://manual.unyson.io/en/latest/options/introduction.html#Restrictions

Can you explain in other words

@danyj

This comment has been minimized.

Copy link
Contributor Author

commented Aug 3, 2017

@ViorelEremia I think I was detailed enough with code , and image blocks

in simple terms the class should be added to top container if we would to use it to show/hide the container via JS

add the class and see where the output is

the container class

<div class="parent SHOULD BE HERE BUT IT IS NOT">
 ...
</div>
@goran468

This comment has been minimized.

Copy link

commented Nov 2, 2017

Seems to be after last patch tabs not working in cpt-options.
For example, adding this to /theme/options/page.php:


$options = array(
         'general' => array(
		'title'   => __( 'General', 'unyson' ),
		'type'    => 'tab',
		'options' => array(
			'general-box' => array(
				'title'   => __( 'General Settings', 'unyson' ),
				'type'    => 'box',
				'options' => array(
					'logo'    => array(
						'label' => __( 'Logo', 'unyson' ),
						'desc'  => __( 'Write your website logo name', 'unyson' ),
						'type'  => 'text',
						'value' => get_bloginfo( 'name' )
					),
					'favicon' => array(
						'label' => __( 'Favicon', 'unyson' ),
						'desc'  => __( 'Upload a favicon image', 'unyson' ),
						'type'  => 'upload'
					)
				)
			),
		)
	)
);

not working at all.

If I insert just simple type => 'box' without tabs - all works.

Problem occurred today after update 2.7.9

@danyj

This comment has been minimized.

Copy link
Contributor Author

commented Nov 2, 2017

@goran468 this issue is here since July bud , please join testing so that things like this do not happen.
This should have been properly tested ThemeFuse/Unyson-Extensions-Approval#362

ViorelEremia added a commit that referenced this issue Nov 3, 2017
@goran468

This comment has been minimized.

Copy link

commented Nov 3, 2017

With new backend.php in Fix #2992 my problem solved, will wait for global update, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.