WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => jQuery => Topic started by: noname8 on November 08, 2011, 09:19:58 AM

Title: jquery ui mandatory
Post by: noname8 on November 08, 2011, 09:19:58 AM
I see that the jquery is quite old and giving alot of errors. Now i'd like to know that if i have site frontend template that the jquery is needed but no ui, how can i disable the jquery-ui ?

And is the admin-section using the jquery & jquery-ui to something? can i update it ?

wb version that i have is 2.8.1 and older. Dont want to update to that 2.8.2 because it's bloated and giving too much pain
Title: Re: jquery ui mandatory
Post by: Argos on November 08, 2011, 01:04:05 PM
In your template(s) just replace
Code: [Select]
<?php 
// automatically include optional WB module files (frontend.css, frontend.js)
if (function_exists(&#39;register_frontend_modfiles&#39;)) {
register_frontend_modfiles(&#39;css&#39;);
register_frontend_modfiles(&#39;jquery&#39;);
register_frontend_modfiles(&#39;js&#39;);

?>
with
Code: [Select]
<?php 
// automatically include optional WB module files (frontend.css, frontend.js)
if (function_exists(&#39;register_frontend_modfiles&#39;)) {
register_frontend_modfiles(&#39;css&#39;);
register_frontend_modfiles(&#39;js&#39;);

?>

Now WB doesn't load the internal jQuery stuff anymore, so you can add your own lines and preferred files.

As far as I know jQuery is not used in a the backend. If it's loaded anyway (I didn't check), just disable it and see what happens.
Title: Re: jquery ui mandatory
Post by: BlackBird on November 08, 2011, 05:57:32 PM
The jQuery Core is included in the Backend by default in 2.8.1, so you would have to change the BE Theme to remove it. Look into footer.htt. As far as I know, it is not used in the BE.

You may use lib_jquery and LibraryAdmin to load jQuery on demand.
Title: Re: jquery ui mandatory
Post by: noname8 on November 09, 2011, 10:04:34 PM
I updated the jquery to most new and removed the jquery-ui but left the jquery-insert so that the colorbox will work. Seems to work fine..

Edited the frontend.functions. php in framework -folder.