We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Javascripts | Forum

matt
matt Jan 22 '13
Hiya,

I wonder if anyone can point me to the best workflow to put javascript libraries into the system?

If I have a bunch of Javascripts that I would like to call, say in a html widget. Where is the best place to put them in the system?

Thanks for your help!

matt
Purusothaman Ramanujam
In the head section. You can add them in the page setings from admin.
matt
matt Jan 23 '13
Thanks Puru.

Opening the subject back up to the community...

I found that by placing .js calls in the header - the 'customise this page' (on the front page) stopped working.

Anyone else found this behaviour? Or perhaps its just the specific scripts I am using. I'd like to hear from others, in case I have discovered a bug to report.

matt
matt
matt Jan 23 '13
Ah! Ok, this issue seems to be related....

http://www.oxwall.org/forum/topic/8012
Purusothaman Ramanujam
How you placed the .js file? You were using the exact full link?

How you were adding the class to each element to have the js effect?
The Forum post is edited by Purusothaman Ramanujam Jan 23 '13
cit27
cit27 Jan 23 '13
some specific scripts from external  may not be compatible with scripts that have been installed in oxwalland can cause several problems such as not clickable and others..
matt
matt Jan 23 '13
@ Puru - The scripts were added to ow_userfiles in a folder which has .htaccess.

The classes get defined in the scripts. Actually, the scripts work fine, but disable some of the oxwall scripts, as cit27 mentions.


tracy
tracy Jan 23 '13
add it to the dindex.html in your masterpages if you want it just to effect your dashboard, or main, i can't remember, but add it to general.html in the same folder for effect in all pages...
matt
matt Jan 25 '13
Thanks Tracy, I will give it a whirl :)

Cheers,

Matt
matt
matt Jan 25 '13
No luck, Im thinking that the Jquery '$' might need the noconflict thing applying to it, so that I can use prototype.js.

Can anyone  comment?

Cheers,

matt
Michael I.
Michael I. Feb 1 '13

Use this method, Matt. Add it to the file you need.


OW::GetDocument()->addScript(URL)