jquery ui progressbar

Permalink
I have a problem with jquery ui progressbar. I load the jquery ui fromhttp://code.jquery.com/ui/1.9.0/jquery-ui.min.js.... But when I am logged in, i get conflicts with the jquery ui of C5. If I only use the C5 jquery UI I get the following error message:

Uncaught TypeError: Object [object Object] has no method 'progressbar' main.js: 2
(anonymous function) main.js: 2
n jquery.js: 2
o.fireWith jquery.js: 2
e.extend.ready jquery.js: 2
c.addEventListener.B


I have looked in the documentation of C5 and the progress bar is support.
http://www.concrete5.org/documentation/how-tos/developers/javascrip...

Anyone have any idea what's going wrong?

View Replies: View Best Answer
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
You should only ever load the c5 built in version of jQuery.UI using the method addHedaeItem(). Anything else and you will get conflicts when c5 or any addon needs jQuery.UI.

Unfortunately the c5 copy of UI is a version of UI that did not have the progressbar (off the top of my head I think it is 1.7.2). So for a progress bar you would probably find it easiest to go for a separate plugin, or to re-work the 1.9 ui progressbar code to be in a separate namespace and be compatible with 1.7.2.
rayjohn66 replied on at Permalink Reply
I've been going through the same thing with the accordion, doc says it's in there but it's not. No matter what I did I ended up with css problems when logged in. Only solution I've thought of was to switch out the jquery.ui when when an admin person is logged in. Assuming you can live without the progressbar in the backend. The code I found which I put in the header (but the footer works also) came from:
http://www.weblicating.com/doku/doku.php?id=cheatsheet/#if_logged_i...
There is probably a better was but I don't know it. Something to think about anyway, and you may have already found another solution. I'm no expert but I hope this helps.
mikrov replied on at Permalink Reply
I missed the progressbar as well - tried to download a complete jQuery UI package here:
http://jqueryui.com/download/
I didn't include any themes.

Installed in [site-root]/js (and the css files in [site-root]/css). Just make sure the files are named jquery.ui.js and jquery.ui.css respectively. I actually just renamed the minified js-file, and so far I haven't seen anything not behaving as it shouldn't.

Actually I stumbled upon this:
http://andrewembler.com/posts/javascript-jquery-and-concrete5/#comm...
which actually recommends this solution :)

Best Regards,
Lars