Page 1 of 1

To have both text field,check box for an element

Posted: Tue Aug 09, 2016 3:09 pm
by Raga Mounika
Hi Team,

I need to work on CSS changes for a new GUI.
Consider <image> element.I should have both the attributes scale and scalefit for this.
In scale I used oxy_textfield where as in scalefit I used oxy_checkbox.When an <image> is inserted it should have both the attributes(scale,scalefit)I am getting only checkbox here( text field is not coming).
And on selection of any these attributes the other one should diasappear.
Example: If I enter 10 in scale text field, checkbox should disappear and vice versa.

Please help me in resolving this issue.

Thanks and Regards,
Mounika

Re: To have both text field,check box for an element

Posted: Tue Aug 09, 2016 4:51 pm
by alex_jitianu
Hi Mounika,

You should be able to control this behavior through CSS rules. I don't know how the rules you've tried look like but here are some CSS rules that I believe work as you desire:

Code: Select all

*[class~="topic/image"]:before {
content: "Scale: " oxy_textfield(edit, '@scale', width, 10em)
"Scalefit: " oxy_checkbox(edit, '@scalefit', values, 'yes') "\A "
}

*[class~="topic/image"][scale]:not([scalefit]):before {
content: "Scale: " oxy_textfield(edit, '@scale', width, 10em)
}


*[class~="topic/image"][scalefit]:not([scale]):before {
content: "Scalefit: " oxy_checkbox(edit, '@scalefit', values, 'yes')
}
Best regards,
Alex

Re: To have both text field,check box for an element

Posted: Fri Aug 12, 2016 4:21 pm
by Raga Mounika
Hi Alex,

Thank you for your reply!

The solution provided is working proper :)

Is it possible to hide all the check boxes and drop-downs in No-tag mode in oXygen?

Regards,
Mounika

Re: To have both text field,check box for an element

Posted: Wed Aug 17, 2016 11:08 am
by alex_jitianu
Hi Mounika,

Unfortunately not. Changing the tags display mode only affects the little markers we paint to mark the beginning and end of an element. What you could do is to create an alternate CSS and put the special rules there. When the users select this CSS from the Styles item on the toolbar, the CSS rules from it will activate and could hide the check boxes etc.

Best regards,
Alex