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.
Return Genie Skin Name
-
- Profound User
- Posts: 25
- Joined: Mon Jul 03, 2017 1:35 pm
- First Name: Ed
- Last Name: Kidhardt
- Company Name: Conestoga Wood
- City: East Earl
- State / Province: Pennsylvania
- Country: United States
- Contact:
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Return Genie Skin Name
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.
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.
-
- Profound User
- Posts: 25
- Joined: Mon Jul 03, 2017 1:35 pm
- First Name: Ed
- Last Name: Kidhardt
- Company Name: Conestoga Wood
- City: East Earl
- State / Province: Pennsylvania
- Country: United States
- Contact:
Re: Return Genie Skin Name
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?
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?
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Return Genie Skin Name
Why not just use different class names (or other selectors, etc) so you don't have a conflict?
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Return Genie Skin Name
I looked in the code, and it looks like the skin name is available in a JavaScript variable named "pui.skin".
Code: Select all
var skinName = pui.skin;
-
- Profound User
- Posts: 25
- Joined: Mon Jul 03, 2017 1:35 pm
- First Name: Ed
- Last Name: Kidhardt
- Company Name: Conestoga Wood
- City: East Earl
- State / Province: Pennsylvania
- Country: United States
- Contact:
Re: Return Genie Skin Name
Awesome - made my afternoon. Thanks!
Who is online
Users browsing this forum: No registered users and 5 guests