summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2011-02-19 00:09:11 +0000
committerDries Buytaert <dries@buytaert.net>2011-02-19 00:09:11 +0000
commitfa39282ef779a331ba2e3096f791c5a663994e16 (patch)
treecbbff5ddd220781bd7398e0531750a2e7404ee95 /misc
parent7205ff14cac0472acb9247297d13477ab9cc5a97 (diff)
downloadbrdo-fa39282ef779a331ba2e3096f791c5a663994e16.tar.gz
brdo-fa39282ef779a331ba2e3096f791c5a663994e16.tar.bz2
- Patch #1056108 by 1V: consistent use of 'JavaScript' and 'Ajax'.
Diffstat (limited to 'misc')
-rw-r--r--misc/ajax.js40
-rw-r--r--misc/drupal.js10
2 files changed, 25 insertions, 25 deletions
diff --git a/misc/ajax.js b/misc/ajax.js
index 389208373..e09c92fae 100644
--- a/misc/ajax.js
+++ b/misc/ajax.js
@@ -2,25 +2,25 @@
(function ($) {
/**
- * Provides AJAX page updating via jQuery $.ajax (Asynchronous JavaScript and XML).
+ * Provides Ajax page updating via jQuery $.ajax (Asynchronous JavaScript and XML).
*
- * AJAX is a method of making a request via Javascript while viewing an HTML
+ * Ajax is a method of making a request via JavaScript while viewing an HTML
* page. The request returns an array of commands encoded in JSON, which is
* then executed to make any changes that are necessary to the page.
*
* Drupal uses this file to enhance form elements with #ajax['path'] and
* #ajax['wrapper'] properties. If set, this file will automatically be included
- * to provide AJAX capabilities.
+ * to provide Ajax capabilities.
*/
Drupal.ajax = Drupal.ajax || {};
/**
- * Attaches the AJAX behavior to each AJAX form element.
+ * Attaches the Ajax behavior to each Ajax form element.
*/
Drupal.behaviors.AJAX = {
attach: function (context, settings) {
- // Load all AJAX behaviors specified in the settings.
+ // Load all Ajax behaviors specified in the settings.
for (var base in settings.ajax) {
if (!$('#' + base + '.ajax-processed').length) {
var element_settings = settings.ajax[base];
@@ -37,7 +37,7 @@ Drupal.behaviors.AJAX = {
}
}
- // Bind AJAX behaviors to all items showing the class.
+ // Bind Ajax behaviors to all items showing the class.
$('.use-ajax:not(.ajax-processed)').addClass('ajax-processed').each(function () {
var element_settings = {};
// Clicked links look better with the throbber than the progress bar.
@@ -53,11 +53,11 @@ Drupal.behaviors.AJAX = {
Drupal.ajax[base] = new Drupal.ajax(base, this, element_settings);
});
- // This class means to submit the form to the action using AJAX.
+ // This class means to submit the form to the action using Ajax.
$('.use-ajax-submit:not(.ajax-processed)').addClass('ajax-processed').each(function () {
var element_settings = {};
- // AJAX submits specified in this manner automatically submit to the
+ // Ajax submits specified in this manner automatically submit to the
// normal form action.
element_settings.url = $(this.form).attr('action');
// Form submit button clicks need to tell the form what was clicked so
@@ -75,13 +75,13 @@ Drupal.behaviors.AJAX = {
};
/**
- * AJAX object.
+ * Ajax object.
*
- * All AJAX objects on a page are accessible through the global Drupal.ajax
+ * All Ajax objects on a page are accessible through the global Drupal.ajax
* object and are keyed by the submit button's ID. You can access them from
* your module's JavaScript file to override properties or functions.
*
- * For example, if your AJAX enabled button has the ID 'edit-submit', you can
+ * For example, if your Ajax enabled button has the ID 'edit-submit', you can
* redefine the function that is called to insert the new content like this
* (inside a Drupal.behaviors attach block):
* @code
@@ -134,7 +134,7 @@ Drupal.ajax = function (base, element, element_settings) {
this.wrapper = '#' + element_settings.wrapper;
// If there isn't a form, jQuery.ajax() will be used instead, allowing us to
- // bind AJAX to links as well.
+ // bind Ajax to links as well.
if (this.element.form) {
this.form = $(this.element.form);
}
@@ -179,7 +179,7 @@ Drupal.ajax = function (base, element, element_settings) {
return ajax.eventResponse(this, event);
});
- // If necessary, enable keyboard submission so that AJAX behaviors
+ // If necessary, enable keyboard submission so that Ajax behaviors
// can be triggered through keyboard input as well as e.g. a mousedown
// action.
if (element_settings.keypress) {
@@ -192,7 +192,7 @@ Drupal.ajax = function (base, element, element_settings) {
/**
* Handle a key press.
*
- * The AJAX object will, if instructed, bind to a key press response. This
+ * The Ajax object will, if instructed, bind to a key press response. This
* will test to see if the key press is valid to trigger this event and
* if it is, trigger it for us and prevent other keypresses from triggering.
* In this case we're handling RETURN and SPACEBAR keypresses (event codes 13
@@ -214,10 +214,10 @@ Drupal.ajax.prototype.keypressResponse = function (element, event) {
};
/**
- * Handle an event that triggers an AJAX response.
+ * Handle an event that triggers an Ajax response.
*
- * When an event that triggers an AJAX response happens, this method will
- * perform the actual AJAX call. It is bound to the event using
+ * When an event that triggers an Ajax response happens, this method will
+ * perform the actual Ajax call. It is bound to the event using
* bind() in the constructor, and it uses the options specified on the
* ajax object.
*/
@@ -315,7 +315,7 @@ Drupal.ajax.prototype.beforeSubmit = function (form_values, element, options) {
}
/**
- * Prepare the AJAX request before it is sent.
+ * Prepare the Ajax request before it is sent.
*/
Drupal.ajax.prototype.beforeSend = function (xmlhttprequest, options) {
// For forms without file inputs, the jQuery Form plugin serializes the form
@@ -347,7 +347,7 @@ Drupal.ajax.prototype.beforeSend = function (xmlhttprequest, options) {
}
// Disable the element that received the change to prevent user interface
- // interaction while the AJAX request is in progress. ajax.ajaxing prevents
+ // interaction while the Ajax request is in progress. ajax.ajaxing prevents
// the element from triggering a new request, but does not prevent the user
// from changing its value.
$(this.element).addClass('progress-disabled').attr('disabled', true);
@@ -488,7 +488,7 @@ Drupal.ajax.prototype.commands = {
// sufficiently tested whether attachBehaviors() can be successfully called
// with a context object that includes top-level text nodes. However, to
// give developers full control of the HTML appearing in the page, and to
- // enable AJAX content to be inserted in places where DIV elements are not
+ // enable Ajax content to be inserted in places where DIV elements are not
// allowed (e.g., within TABLE, TR, and SPAN parents), we check if the new
// content satisfies the requirement of a single top-level element, and
// only use the container DIV created above when it doesn't. For more
diff --git a/misc/drupal.js b/misc/drupal.js
index 598cec32d..484b636b2 100644
--- a/misc/drupal.js
+++ b/misc/drupal.js
@@ -11,7 +11,7 @@ jQuery.noConflict();
* Attach all registered behaviors to a page element.
*
* Behaviors are event-triggered actions that attach to page elements, enhancing
- * default non-Javascript UIs. Behaviors are registered in the Drupal.behaviors
+ * default non-JavaScript UIs. Behaviors are registered in the Drupal.behaviors
* object using the method 'attach' and optionally also 'detach' as follows:
* @code
* Drupal.behaviors.behaviorName = {
@@ -25,7 +25,7 @@ jQuery.noConflict();
* @endcode
*
* Drupal.attachBehaviors is added below to the jQuery ready event and so
- * runs on initial page load. Developers implementing AHAH/AJAX in their
+ * runs on initial page load. Developers implementing AHAH/Ajax in their
* solutions should also call this function after new page content has been
* loaded, feeding in an element to be processed, in order to attach all
* behaviors to the new content.
@@ -61,7 +61,7 @@ Drupal.attachBehaviors = function (context, settings) {
/**
* Detach registered behaviors from a page element.
*
- * Developers implementing AHAH/AJAX in their solutions should call this
+ * Developers implementing AHAH/Ajax in their solutions should call this
* function before page content is about to be removed, feeding in an element
* to be processed, in order to allow special behaviors to detach from the
* content.
@@ -89,7 +89,7 @@ Drupal.attachBehaviors = function (context, settings) {
* IFRAME elements reload their "src" when being moved within the DOM,
* behaviors bound to IFRAME elements (like WYSIWYG editors) may need to
* take some action.
- * - serialize: When an AJAX form is submitted, this is called with the
+ * - serialize: When an Ajax form is submitted, this is called with the
* form as the context. This provides every behavior within the form an
* opportunity to ensure that the field elements have correct content
* in them before the form is serialized. The canonical use-case is so
@@ -302,7 +302,7 @@ Drupal.getSelection = function (element) {
};
/**
- * Build an error message from an AJAX response.
+ * Build an error message from an Ajax response.
*/
Drupal.ajaxError = function (xmlhttp, uri) {
var statusCode, statusText, pathText, responseText, readyStateText, message;