Issues adding Javascript in newskin

This forum is for all Flare issues not related to any of the other categories.

Issues adding Javascript in newskin

Postby ktbCA57 on Tue Mar 24, 2015 6:41 am

We have been unable to add javascript within new skin that came with upgrade to Flare 11...

Since there's no toolbar (where we previously added js) within the section - so we tried this method in the Internal text editor...just before the </strings> element, we added the js we want to use - like this:

<Stylesheet />
<Script>$(document).ready(function(){
$("#header>a").after('<div id="header-title"></div>');
$("#header-title").text(document.title);
});

$(document).ready(function(){
$("#responsiveHeader>a").after('<div id="responsive-header-title"></div>');
$("#responsive-header-title").text(document.title);
});

$('<link>')
.appendTo($('head'))
.attr({type: 'text/css', rel: 'stylesheet'})
.attr('href', 'Content/Resources/Stylesheets/skin.css');

$('<link>')
.appendTo($('head'))
.attr({type: 'text/css', rel: 'stylesheet'})
.attr('href', 'content/resources/stylesheets/skin.css');
</Script>
<Strings />
</CatapultSkin><Strings />

but doing this did NOT work - basically, the script was not picked up... so is there another place or way we should be adding this to the skin editor?

Thanks
ktbCA57
Sr. Propeller Head
 
Posts: 444
Joined: Wed Feb 04, 2009 7:45 am

Re: Issues adding Javascript in newskin

Postby Dave Lee on Tue Mar 24, 2015 7:41 am

Well, I recognise the script, as it's the one I wrote for the v10 HTML5 skin - which is now called the 'Tripane' HTML5 skin in v11.
This script still works for the Tripane skin in v11, and you would add it in exactly the the same place on the Toolbar tab.

However, if you're not using the Tripane skin, and are using the top navigation and/or component skins; then why are you trying to add a script to the skin? These skins will generate a frameless single-page output, so if you want to add a script then just add it to the master page.
Dave Lee
Master Propellus Maximus
 
Posts: 5846
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: Issues adding Javascript in newskin

Postby ktbCA57 on Tue Mar 24, 2015 8:29 am

Thanks Dave,

ok.. we are going to try to make the changes in the Master Page... still unclear as to how it works but that's because I'm not very well skilled/schooled in the skinning HTML5 world...

so I will come back around with 1) more questions, or 2) a resolution that we solved our issues.

Thanks for your input!
ktbCA57
Sr. Propeller Head
 
Posts: 444
Joined: Wed Feb 04, 2009 7:45 am

Re: Issues adding Javascript in newskin

Postby Dave Lee on Tue Mar 24, 2015 9:30 am

That script will only be of use with the Tripane skin in v11. It adds a title to the header, and adds a skin stylesheet.
If you're not using a Tripane skin, then don't use that script.
Dave Lee
Master Propellus Maximus
 
Posts: 5846
Joined: Mon Mar 05, 2007 8:33 am
Location: UK


Return to Flare's General Discussion

Who is online

Users browsing this forum: No registered users and 16 guests