This patch is in response to an IRC conversation between Roger, RobLoach, and myself. I believe this takes us in the direction we discussed, as well as adding a close command and some documentation changes.
The main points of interest are:
- Move anything not strickly dialog api related to another module (now called dialog_links)
- Renamed example folder and dialog_example module to "dialog_examples" (To address the fact that it is showing off multiple sub-modules now.)
- Added dialog_loading command to dialog.module
- Added dialog_close command to dialog.module and dialog.js
- Added and changed many code comments. Feel free to correct the language anywhere its needed.
Please review and let me know if anything needs changes for a commit.
This patch is against the D7 version, aka CVS HEAD.
Comments
Comment #1
te-brian commentedThis fixes one documentation length issue and one typo in the dialog_command_close() function.
Comment #2
te-brian commentedTitle typo
Comment #3
te-brian commentedAfter some IRC talk, I'm going to make some revisions to this patch. So feel free to comment on it in general, but don't commit.
Comment #4
robloachte-brain and I talked about having:
Comment #5
zroger commentedI like the direction of this.
I haven't yet played with it, but one initial thought is that we should be using 'dismiss' instead of 'close' for consistency with the 6.x branch.
Comment #6
te-brian commentedAlright, this patch accounts for recent IRC decisions as well as Roger's request to change 'close' to 'dismiss'.
It also adds the dialog_core module. This provides the means to use a 'use-dialog' class on links, as well as adding some special handling for logging in, registering, and requesting a password via the dialog. Left TODO on this functionality are some '#ajax' quirks, such as an enter key press not triggering the submit button's ajax functionality.
More generally, there are also some ajax problems to deal with such as 403 and 404s not being handled well in the dialog. Ideally, php errors during an ajax requests would prompt an error message, rather than send the user to a json reponse. These are probably to be solved outside this module, however.
[Edit]: Applying the patch leaves behind an empty 'example' folder (the real one is now 'examples'). I'm not sure how to deal with this in a patch.
Comment #7
robloachOkay, I built off of what te-brian did, and moved in some of the concepts that Roger brought up in the DRUPAL-6--1 branch as well as rearranged a couple things....
dialog_enabled.dialog_enabledor the custom menu callbacks. Dialog User and Dialog Example uses the menu callbacks, while the contextual links use dialog_enabled.Todo:
dialog_user_login_callback. You guys mind taking a look? The drupal_get_form() call is incorrect....Comment #8
andypostsubcribe
Comment #9
podaroksubscribe
Comment #10
devin carlson commentedThe 7.x-1.x branch of the Dialog module is unsupported.