Hi,

I have the following suggestions for additional configuration options:

1) Option to enable / disable $overlay.click() in Drupal.popups.addOverlay.

2) Provide selector for elements to hide / show when opening a popup.

Example to hide divs with class 'flash' when showing the popup:

hideSelector: 'div.flash'
In Drupal.popups.addOverlay, call $(hideSelector).hide().
In Drupal.popups.close, call $(hideSelector).show().

3) Make popups compatible to jQuery.validate() or other error handler plugin.
As jQuery.validate() - or any other error handler plugin - adds an configurable error class to each invalid form element, popups should be configured to allow for an errorSelector, which disables the form-submit by popup.js.

Example: I have this code in the first line of Drupal.popups.beforeSubmit:

if($('#'+$($form).attr('id')+' .error').not('label').length) return false;

This counts the number of elements with class 'error' in my form, which are not of type . If any element is found, the form still hat errors in it an shows an validation message, so i don't want popups to submit this form by itself.

Comments

starbow’s picture

Status: Active » Closed (fixed)