Using regular .dialog() from jQuery UI with concrete5?
PermalinkI knew you're a php god, but you're a javascript/jquery god now too for me!
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!
http://docs.jquery.com/Using_jQuery_with_Other_Libraries...
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...
-Steve
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 5.4.1.2
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:
$("#mydialogbox").jdialog();
Hope this helps :)
Garry
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.
http://www.concrete5.org/community/forums/customizing_c5/jquery-ui-...
I have just done some quick initial tests, and looking good :)
All the best.
Garry
Just to be clear, however: concrete5 was in development before the jQuery dialog class existed. Hence, our own solution.