diff options
Diffstat (limited to 'misc/ajax.js')
-rw-r--r-- | misc/ajax.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/misc/ajax.js b/misc/ajax.js index 616195463..87f567fcd 100644 --- a/misc/ajax.js +++ b/misc/ajax.js @@ -231,6 +231,17 @@ Drupal.ajax.prototype.beforeSubmit = function (form_values, element, options) { form_values.push({ name: 'ajax_html_ids[]', value: this.id }); }); + // Allow Drupal to return new JavaScript and CSS files to load without + // returning the ones already loaded. + form_values.push({ name: 'ajax_page_state[theme]', value: Drupal.settings.ajaxPageState.theme }); + form_values.push({ name: 'ajax_page_state[theme_token]', value: Drupal.settings.ajaxPageState.themeToken }); + for (var key in Drupal.settings.ajaxPageState.css) { + form_values.push({ name: 'ajax_page_state[css][' + key + ']', value: 1 }); + } + for (var key in Drupal.settings.ajaxPageState.js) { + form_values.push({ name: 'ajax_page_state[js][' + key + ']', value: 1 }); + } + // 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)); |