Styling in NG client

Forum to discuss the new web client version of Servoy.

Styling in NG client

Postby mj.vanzelst » Thu Jan 21, 2016 6:09 pm

Hi all,

To gain experience with NG client, I have created a Solution (Test_css) with a Module (Test_module). There is a file "ng_welcome.css" in the media folder of Solution "Test_css", and it is assigned to the solution with the stylesheet property.
A field that is in a form in the Forms directory of solution Test_css can use the Classes from the stylesheet.
A field that is in a form in the Froms directory of Module Test_module causes a warning 'Style class “field” in form “Testmod” is set but no style is assigned to form'. But when I try to assign stylesheet “ng_welcome.css” to the form the it is not possible to select the style sheet.
Is it possible to access the solution stylesheet from a module ?

Please advice me?
mj.vanzelst
 
Posts: 13
Joined: Mon Feb 02, 2015 5:47 pm

Re: Styling in NG client

Postby jcompagner » Fri Jan 22, 2016 12:43 am

currently you need to put the stylesheet in a module media
and that module is included in all other modules and those modules have all (that need it) selected that style sheet as there solution stylesheet (so not the form style sheet that is Web/Smart)

this could be a bit improved i guess, but it is tricky how.
Because a main solution style sheet is not known to the modules (if you would just open the module as stand alone, so as the active solution then it suddenly wouldn't find it anymore)

So we have to see how to handle multiply solutions(modules) with all there own stylesheet, we could include them all.. But that could be quite confusing and conflicts could happen easily
Also the solution and its modules are flattened at runtime so seen as 1 thing, which style sheet should then take be the one...
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Styling in NG client

Postby jdbruijn » Fri Jan 22, 2016 10:00 am

Ho Johan,

must that module be directly linked to each module, or is it ok if it is somewhere in the chain?
Let's say for instance that I have a module modGlobals where I put the style sheet in the media. This moduel is linked to my module modMain and that module is linked to my solution solApp.
Can I now link the css to solApp? Or do I need to directly link modGlobals to solApp for this to work?
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: Styling in NG client

Postby jcompagner » Fri Jan 22, 2016 12:41 pm

the css can be in 1 module and then included i all solutions or modules.

For now i think to get the properties view "styleClass" property to full work (that style cell editor) you have to specify the solution/module style sheet on all your modules.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 14 guests