diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-12-17 01:03:58 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-12-17 01:03:58 +0000 |
commit | eefb872c9416c10a891b0915cd5af32cdd9f4e52 (patch) | |
tree | a4958ffb012dc80d7bf804dbc818681b14e702c9 /includes/ajax.inc | |
parent | bc3f72a9787768c0efe9b95bc2b4ec4a6b1216c1 (diff) | |
download | brdo-eefb872c9416c10a891b0915cd5af32cdd9f4e52.tar.gz brdo-eefb872c9416c10a891b0915cd5af32cdd9f4e52.tar.bz2 |
- Patch #951262 by sun: move #ajax default settings from PHP into JS.
Diffstat (limited to 'includes/ajax.inc')
-rw-r--r-- | includes/ajax.inc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/includes/ajax.inc b/includes/ajax.inc index 899ab4547..af7e6da22 100644 --- a/includes/ajax.inc +++ b/includes/ajax.inc @@ -613,15 +613,10 @@ function ajax_pre_render_element($element) { $settings += array( 'path' => 'system/ajax', 'options' => array(), - 'selector' => '#' . $element['#id'], - 'effect' => 'none', - 'speed' => 'none', - 'method' => 'replaceWith', - 'progress' => array('type' => 'throbber'), ); // @todo Legacy support. Remove in Drupal 8. - if ($settings['method'] == 'replace') { + if (isset($settings['method']) && $settings['method'] == 'replace') { $settings['method'] = 'replaceWith'; } @@ -659,7 +654,7 @@ function ajax_pre_render_element($element) { } // Convert a simple #ajax['progress'] string into an array. - if (is_string($settings['progress'])) { + if (isset($settings['progress']) && is_string($settings['progress'])) { $settings['progress'] = array('type' => $settings['progress']); } // Change progress path to a full URL. |