updated core to 7.58 (right after the site was hacked)
This commit is contained in:
29
sites/all/modules/examples/ajax_example/ajax_example.js
Normal file
29
sites/all/modules/examples/ajax_example/ajax_example.js
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* @file
|
||||
* JavaScript for ajax_example.
|
||||
*
|
||||
* See @link ajax_example_dependent_dropdown_degrades @endlink for
|
||||
* details on what this file does. It is not used in any other example.
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
|
||||
// Re-enable form elements that are disabled for non-ajax situations.
|
||||
Drupal.behaviors.enableFormItemsForAjaxForms = {
|
||||
attach: function() {
|
||||
// If ajax is enabled.
|
||||
if (Drupal.ajax) {
|
||||
$('.enabled-for-ajax').removeAttr('disabled');
|
||||
}
|
||||
|
||||
// Below is only for the demo case of showing with js turned off.
|
||||
// It overrides the behavior of the CSS that would normally turn off
|
||||
// the 'ok' button when JS is enabled. Here, for demonstration purposes,
|
||||
// we have AJAX disabled but JS turned on, so use this to simulate.
|
||||
if (!Drupal.ajax) {
|
||||
$('html.js .next-button').show();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
Reference in New Issue
Block a user