-
Re: What's the best way to style an app to be consistent with hosted Jive 7/8 instance?
gdinning Mar 14, 2014 9:43 AM (in response to cgum)Anything used by Jive should be available to your add-on on the client side. If your add-on is contributing content to the page, that content should have access to all the styles and scripts that already exist on the page. I've written plugins (I know, not the same thing) that make use of Jive's styles and haven't had any problems.
-
Re: What's the best way to style an app to be consistent with hosted Jive 7/8 instance?
cgum Mar 14, 2014 10:01 AM (in response to gdinning)In Apps, you are running inside of an iframe and you don't get access to everything on the content page. In Jive 4,5,6 plugins, it wasn't an issue, but with apps, you don't have all that stuff available to you (as far as I can tell).
-
Re: What's the best way to style an app to be consistent with hosted Jive 7/8 instance?
gdinning Mar 14, 2014 10:11 AM (in response to cgum)Forgot they run in iframes. Can you just include the necessary Jive scripts and styles in your own content? They should all be accessible through HTTP from the Jive server.
-
Re: What's the best way to style an app to be consistent with hosted Jive 7/8 instance?
cgum Mar 14, 2014 10:22 AM (in response to gdinning)Unfortunately...
The scripts get combined together into the auto-generated file names, like /scripts/gen/<someGUID>.js
The stylesheets have version information included in the path. On the cloud-hosted version, they upgrade quarterly and the paths would change.
-
Re: What's the best way to style an app to be consistent with hosted Jive 7/8 instance?
gdinning Mar 14, 2014 10:33 AM (in response to cgum)The scripts get all mashed up together when they're downloaded but in the on-prem, they're all still accessible individually from the server. I'm not sure if it's different on cloud-hosted, but can you access <your-hostname>/resources/scripts/jive.js? If you can see that, I think you should be able to see everything.
-
Re: What's the best way to style an app to be consistent with hosted Jive 7/8 instance?
cgum Mar 14, 2014 2:52 PM (in response to gdinning)Yep, they're there. I downloaded the source to see what all is in there - there's a lot!
-
Re: Re: What's the best way to style an app to be consistent with hosted Jive 7/8 instance?
cgum Mar 14, 2014 3:45 PM (in response to gdinning)Here's how I got the styles so that it's host-independent...
jiveUrl = opensocial.getEnvironment().jiveUrl;
var jiveBaseCss = jiveUrl + "/styles/jive-base.css";
var jiveCss = jiveUrl + "/styles/jive.css";
var jiveIconsCss = jiveUrl + "/styles/jive-icons.css";
$("head").append('<link rel="stylesheet" type="text/css" media="all" href="' + jiveBaseCss + '"/>')
$("head").append('<link rel="stylesheet" type="text/css" media="all" href="' + jiveIconsCss + '"/>')
$("head").append('<link rel="stylesheet" type="text/css" media="all" href="' + jiveCss + '"/>')
-
Re: What's the best way to style an app to be consistent with hosted Jive 7/8 instance?
Ryan Rutan Mar 17, 2014 2:02 PM (in response to cgum)Casey Gum - The CSS files you are referencing are in fact the ones that you need to reference. I've not had to worry about multiple hosts in the past, so I've done simply <link> ref's to them; however, your way will definitely work for multi-host applications.
-
-
-
-
-
-