Skip to content

Commit 59534df

Browse files
author
Brendon
committed
* Fixed hook issue
1 parent 1fba49d commit 59534df

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Ajax.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Drupal.Ajax.plugins = {};
1616

1717
Drupal.Ajax.pass = true;
1818

19+
Drupal.Ajax.firstRun = false;
20+
1921
/**
2022
* Init function.
2123
* This is being executed by Drupal behaviours.
@@ -27,7 +29,10 @@ Drupal.Ajax.pass = true;
2729
Drupal.Ajax.init = function(context) {
2830
var f, s;
2931
if (f = $('.ajax-form', context)) {
30-
Drupal.Ajax.invoke('init');
32+
if (!Drupal.Ajax.firstRun) {
33+
Drupal.Ajax.invoke('init');
34+
Drupal.Ajax.firstRun = true;
35+
}
3136
s = $('.ajax-trigger', f);
3237
s.click(function(){
3338
this.form.ajax_activator = $(this);
@@ -96,6 +101,7 @@ Drupal.Ajax.go = function(formObj, submitter) {
96101
async: true,
97102
dataType: 'json',
98103
success: function(data){
104+
console.log(1);
99105
submitter.val(submitterVal);
100106
Drupal.Ajax.response(submitter, formObj, data);
101107
}

0 commit comments

Comments
 (0)