[cle-release-team] Best practice for getting the tool.css?

Steve Swinsburg steve.swinsburg at gmail.com
Fri Feb 28 06:22:39 PST 2014


A crude way would be to just append skin.default and tool.css, which will
give you the string. There was an issue with the neo prefix property
though.

Presumably you don't want the full header, because what Adrian posted is
the proper way to get the skin and setup the header for a tool.

Cheers

sent from my mobile device
On 01/03/2014 12:34 AM, "Aaron Zeckoski" <azeckoski at unicon.net> wrote:

> Not exactly. That returns something like this (as an example):
>
> <link href="/library/skin/tool_base.css?version=" type="text/css"
> rel="stylesheet" media="all" />
> <link href="/library/skin/neo-default/tool.css?version="
> type="text/css" rel="stylesheet" media="all" />
> <script type="text/javascript"
> src="/library/js/headscripts.js?version="></script>
> <script type="text/javascript">var sakai = sakai || {}; sakai.editor =
> sakai.editor || {};  sakai.locale = sakai.locale || {};
> sakai.locale.userCountry = 'US';
> sakai.locale.userLanguage = 'en';
> sakai.locale.userLocale = 'en_US';
> sakai.editor.collectionId = '/user/admin/';
> sakai.editor.enableResourceSearch = false;</script>
> <script type="text/javascript">var
> CKEDITOR_BASEPATH='/library/editor/ckeditor/';
> </script>
> <script type="text/javascript"
> src="/library/editor/ckeditor/ckeditor.js?version="></script>
> <script type="text/javascript"
> src="/library/editor/ckeditor.launch.js?version="></script>
>
> What I really was hoping for was something that only gives me the
> tool.css path. I suppose I could try to parse that out of here but
> that's not really ideal in my mind.
>
> -AZ
>
>
>
> On Fri, Feb 28, 2014 at 8:14 AM, Adrian Fish <adrian.r.fish at gmail.com>
> wrote:
> > I include the portal head in YAFT's tool servlet like this:
> >
> > String sakaiHtmlHead = (String) request.getAttribute("sakai.html.head");
> >
> > I then include this in the page using Velocity (${sakaiHtmlHead}). This
> > includes the tool.css link.
> >
> > Is that what you meant?
> >
> >
> > On 28 February 2014 12:34, Aaron Zeckoski <azeckoski at unicon.net> wrote:
> >>
> >> Anyone have any pointers on the best practice for getting the tool.css
> >> in a contrib tool in a way that works for both 2.9.3 and 10+? 10 has
> >> the CSSUtils which seems to be the preferred mechanism but this
> >> doesn't exist in 2.9.3 or other 2.9 releases and all the 2.9 handling
> >> seems to happen in code that is generally unreachable by tools.
> >>
> >> What I really want is an "official" (i.e. API driven) way to deal with
> >> this that works for both 2.9 and 10 (and ideally for 2.8 as well)
> >> instead of the hacky way I am doing it now that involves copying and
> >> pasting a bunch of code from the portal.
> >>
> >> Any suggestions or thoughts?
> >> -AZ
> >>
> >>
> >> --
> >> Aaron Zeckoski - Software Architect - http://tinyurl.com/azprofile
> >> _______________________________________________
> >> cle-release-team mailing list
> >> cle-release-team at collab.sakaiproject.org
> >> http://collab.sakaiproject.org/mailman/listinfo/cle-release-team
> >
> >
>
>
>
> --
> Aaron Zeckoski - Software Architect - http://tinyurl.com/azprofile
> _______________________________________________
> cle-release-team mailing list
> cle-release-team at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/cle-release-team
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/cle-release-team/attachments/20140301/5017fb25/attachment.html 


More information about the cle-release-team mailing list