comparison popups.js @ 4:09e998f65556

Provides a mechanism for a form to explicitely opt out of being ajaxForm-ed
author Franck Deroche <franck@defr.org>
date Fri, 31 Dec 2010 14:03:41 +0100
parents 4215c43e74eb
children be7efc2a145e
comparison
equal deleted inserted replaced
3:5efa741592f9 4:09e998f65556
920 Drupal.attachBehaviors(popup.$popupBody()); 920 Drupal.attachBehaviors(popup.$popupBody());
921 // Adding collapse moves focus. 921 // Adding collapse moves focus.
922 popup.refocus(); 922 popup.refocus();
923 923
924 // If the popups contains a form, capture submits. 924 // If the popups contains a form, capture submits.
925 var $form = $('form', popup.$popupBody()); 925 var $form = $('form:not(.no-popup)', popup.$popupBody());
926 if ($form.length) { 926 if ($form.length) {
927 $form.ajaxForm({ 927 $form.ajaxForm({
928 dataType: 'json', 928 dataType: 'json',
929 beforeSubmit: Popups.beforeSubmit, 929 beforeSubmit: Popups.beforeSubmit,
930 beforeSend: Popups.beforeSend, 930 beforeSend: Popups.beforeSend,