From c327b4d407c0fc3ea74037789214b23d2b35e9a0 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 26 Mar 2010 18:58:12 +0000 Subject: - Patch #684846 by effulgentsia, rfay, quicksketch, aspilicious: AJAX triggered by non-submit element fails if any elements are validated. --- misc/ajax.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'misc/ajax.js') diff --git a/misc/ajax.js b/misc/ajax.js index 3d0357cbc..23179fd07 100644 --- a/misc/ajax.js +++ b/misc/ajax.js @@ -98,7 +98,7 @@ Drupal.ajax = function (base, element, element_settings) { type: 'bar', message: 'Please wait...' }, - button: {} + submit: {} }; $.extend(this, defaults, element_settings); @@ -121,7 +121,7 @@ Drupal.ajax = function (base, element, element_settings) { var ajax = this; var options = { url: ajax.url, - data: ajax.button, + data: ajax.submit, beforeSerialize: function (element_settings, options) { return ajax.beforeSerialize(element_settings, options); }, @@ -200,10 +200,6 @@ Drupal.ajax.prototype.beforeSubmit = function (form_values, element, options) { // Disable the element that received the change. $(this.element).addClass('progress-disabled').attr('disabled', true); - // Server-side code needs to know what element triggered the call, so it can - // find the #ajax binding. - form_values.push({ name: 'ajax_triggering_element', value: this.formPath }); - // Insert progressbar or throbber. if (this.progress.type == 'bar') { var progressBar = new Drupal.progressBar('ajax-progress-' + this.element.id, eval(this.progress.update_callback), this.progress.method, eval(this.progress.error_callback)); -- cgit v1.2.3