Takes advantage of some of the stuff in Drupal 7:

Developer notes:

  • Wanted to try it out without needing the additional menu callbacks to make things a tad bit easier. You can still use hook_ajax_render_alter() to change how the dialog react as demonstrated with the random size changes for the Simple Test link. The good thing about this is that it now acts like the Overlay out of the box :-P .
  • It only acts on links right now. Has to also process buttons for confirm_form() when you click on the Delete buttons and stuff.
  • It doesn't move the buttons from the form into the dialog yet.
  • I left in a bunch of your old code (dialog2.js vs dialog.js) as I'm sure we'll want to adapt it in. Like the button stuff.
CommentFileSizeAuthor
dialog7.patch18.76 KBrobloach

Comments

robloach’s picture

robloach’s picture

Some things missing from the core AJAX Framework that would help this:

  • Instead of having Drupal.ajax bind on an event, have it run immediately. This would help us so that we could implement the observer pattern instead of calling Drupal.ajax on each and every link.
  • Ability to load up additional CSS and JavaScript through ajax_render. It currently just loads up additional JavaScript settings.
neclimdul’s picture

hot stuff!

robloach’s picture

http://head.robloach.net/dialog/example
http://drupalcode.org/viewvc/drupal/contributions/modules/dialog/

It now uses xLazyLoader to load up the additional CSS and JavaScript. Doesn't seem to work when the JavaScript is aggregated though :-( .

zroger’s picture

Version: » 7.x-1.x-dev
Status: Needs work » Fixed

I created the 6.x branch and committed this to head.

I'm marking this as fixed. lets open new issues for specific drupal 7 issues.

thx Rob.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.