Page 1 of 1
Return Genie Skin Name
Posted: Wed Nov 08, 2017 2:37 pm
by ekidhardt
Simple question:
Is there a constant in JavaScript that contains the Genie skin name? Or maybe a function to return it?
Looked through the docs and couldn't find one.
Re: Return Genie Skin Name
Posted: Wed Nov 08, 2017 4:23 pm
by Scott Klement
I can't think of anything that is available on the JavaScript side of things that specifies the skin name. (It's possible that something exists and I just don't know about it, though... but you couldn't find it in the docs, either, so good chance there isn't.)
On the server, however, you can get it by calling PUISETENV. So you could run a program on the server that would get it, and then send it (via a hidden field on a display, for example) to the JavaScript code.
Re: Return Genie Skin Name
Posted: Wed Nov 08, 2017 4:44 pm
by ekidhardt
So no go on the name of the skin - let me explain what I am trying to do.
We are trying to integrate Genie and Rich Displays, but are running into collisions with CSS - ideally we want a CSS sheet for Genie and one for Rich Displays. I was trying to find the name of the Genie skin to get at the Genie style sheet and disable it via the DOM; toggle it off when a Rich Display is loaded - toggle it on when we return to Genie.
Is there an easier way to achieve this behavior?
Re: Return Genie Skin Name
Posted: Wed Nov 08, 2017 4:54 pm
by Scott Klement
Why not just use different class names (or other selectors, etc) so you don't have a conflict?
Re: Return Genie Skin Name
Posted: Wed Nov 08, 2017 6:30 pm
by Scott Klement
I looked in the code, and it looks like the skin name is available in a JavaScript variable named "pui.skin".
Re: Return Genie Skin Name
Posted: Fri Nov 10, 2017 4:48 pm
by ekidhardt
Awesome - made my afternoon. Thanks!