Page 1 of 1
Contentbox - Multiple Selectable Styles? [done]
Posted: Mon Oct 11, 2021 10:41 am
by pmjd
Rather than having one style for all contentboxes, could there be a tickbox/field to choose to apply a custom style to the contentbox instead of a "default" style?
Re: Contentbox - Multiple Selectable Styles?
Posted: Tue Oct 12, 2021 5:14 pm
by kev1n
Use jQuery/CSS to style objects.
Re: Contentbox - Multiple Selectable Styles?
Posted: Wed Oct 13, 2021 2:40 am
by pmjd
I understand that you can use JQuery/CSS, thanks for the previous info on JQuery styling.
However the point was to make it easier to apply different styles to Contentboxes. In the same way I could previously create a content box by adding a custom div to an html object, instead you made a good improvement of adding the Contentbox as an object type.
So the suggestion is to extend it further. Have "Contentbox" in the Object menu and have a checkbox option to use a custom style (these are defined in CSS in the header). If checked enter the CSS selector to append to the Contentbox ID.
The same idea could also be applied to button, Rather than having to get the object ID and paste in the custom code for every button on every custom form, why not include styling as a part of the button menu option? If you need to alter the style you only need to change the CSS code in the header once for it to apply to all buttons/contentboxes, instead of having to change all of them individually?
Re: Contentbox - Multiple Selectable Styles?
Posted: Wed Oct 13, 2021 10:02 am
by kev1n
Since the contentbox consists of two child objects nuContentBoxTitle and nuContentBoxContent we would need a possibility to apply a style/class to either of them.
I need to figure out the best way to do that.
Re: Contentbox - Multiple Selectable Styles?
Posted: Fri Oct 15, 2021 10:10 am
by kev1n
The latest from Github allows you to apply custom css styles to an object:
https://forums.nubuilder.cloud/viewtopic.php?f=31&t=11294
Re: Contentbox - Multiple Selectable Styles?
Posted: Fri Oct 15, 2021 5:32 pm
by pmjd
Outstanding work, thank you kev1n