Using regular .dialog() from jQuery UI with concrete5?
Just to be clear, however: concrete5 was in development before the jQuery dialog class existed. Hence, our own solution.
and it will be automatically loaded when you're logged in so just execute the function nobody keeps you from doing it.
i've yet to figure out how to get around this without messing up built in c5 functionality.
if anyone have any suggestions, feel free to share!
Technically you'd be using jQuery with another instance of itself, but only load what modules you need and not the entire library twice.
I completely understand that C5's dialog plug-in was first on the scene, but given jQuery's popularity, I think the onus is on the C5 team to resolve this issue and make C5 developers' lives easier. If I get some time, I will look into a namespace work-around as ijessup suggests; but really, a developer shouldn't have to bend over backward to use (or not use) the native jQuery dialog plug-in. Just my $0.02 USD...
anyway, i can see how it's not getting any immediate attention as there are probably a lot of other things that get prioritized.
in the meantime, i'll probably too play around a bit with the noConflict() function. (btw, that last suggestion on the jquery page was just awful).
another suggestion which i might end up using myself is the dozens of other non-official jquery dialog plugins.
I'm trying to use the latest jquery ui widget and themeroller to integrate with the auto-nav feature to have a multi-level accordion nav menu. So far I haven't succeeded because the jquery libraries that are needed are interfering with the jquery libs C5 uses.
Has anyone solved that problem and is anything being done by C5 development to make use of the latest jquery ui, widgets and effects possible ??
When it gets to the point of many developers having to fiddle with workarounds, what was once considered a quirk is becoming a bug.
Despite the historical precedent that C5 was there first, the cleanest solution for the future would be for C5 to have its own namespace for all javasctipt and css used for the dashboard and edit mode, including jQuery plugins and jQuery UI.
So that's my request for Concrete 220.127.116.11
I copied the jQuery UI Dialog section from the UI script. Then inserted it into another file to load separately. Most importantly, I changed all instances of ".dialog" to ".jdialog".
My use of it is now:
Hope this helps :)
In the mean time, I have plenty of other problems to solve, so had put this to the back in the hope that C5 sorts it out before I need it in a production system. If the next release of C5 does not, I suspect I will end up doing something like the hack you have suggested.
I have just done some quick initial tests, and looking good :)
All the best.