AJAX API Access?

Permalink
Does C5 have an AJAX API or library that could be opened up for customizing dashboard and block functionality? I'm currently developing and extending blocks to use it and would hate to be wasting time if something is already in place.

Thanks,

Eric

EricPrime
 
Remo replied on at Permalink Reply
Remo
c5 uses jQuery all the time and jQuery has some wonderful ajax functions..
EricPrime replied on at Permalink Reply
EricPrime
Cool. I'll look into it.
macgillivary replied on at Permalink Reply
macgillivary
Just started toying with jquery.

I'm looking to have a modal dialog as a result of a click on a link in a block.

1 - where do I put the js code (in auto.js?)
2 - I put some of the script in my block's view.php for now, but could only seem to get the default ccm-dialog.

Anyone have a very basic example of what I could use in a block's view.php to open up a dialog? Is there some c5/ccm very specific things I need to do, or can I follow typical jquery tutorial?

I have the document.ready function firing on click of an anchor, but my $("mydiv").dialog seems to do nothing now. An alert on the next line works though.

This is more a jquery learning issue more than a C5 problem, but thought I'd ask here in case there is some extra stuff that can be taken advantage of - like the dialog-title attribute etc...
andrew replied on at Permalink Reply
andrew
We haven't really tried to extend the built-in c5 javascript stuff to make it easy to do things like what you're describing. Ideally, we'd have our dialog class be generic and nicely documented enough so that you could use it for all your modal dialog needs, things like that...unfortunately I don't know if it's really ready for that.

For example, the only way it can load items currently is by passing a target URL - it can't just load DOM content on a page.

We've had good results for this site by integrating with custom 3rd party jquery dialogs for things like the forum post window, etc... In this case we just create a /js/ folder off the root and leave our stuff there, where c5 isn't going to touch it in an upgrade.
macgillivary replied on at Permalink Reply
macgillivary
that's quite alright. I may be attempting to use c5 in a manner that it wasn't fully meant to be used. That said, it isn't terribly difficult to add on what I'm doing, just thought like the o/p that I wouldn't redo stuff that you guys potentially already had implemented. I really like the ease of installation, dashboard, user/permissions/groups model, and the slickness of it all, so I I'll continue on developing my little app with C5. doc_root/js folder created.