summaryrefslogtreecommitdiff
path: root/modules/file
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 /modules/file
parent7205ff14cac0472acb9247297d13477ab9cc5a97 (diff)
downloadbrdo-fa39282ef779a331ba2e3096f791c5a663994e16.tar.gz
brdo-fa39282ef779a331ba2e3096f791c5a663994e16.tar.bz2
- Patch #1056108 by 1V: consistent use of 'JavaScript' and 'Ajax'.
Diffstat (limited to 'modules/file')
-rw-r--r--modules/file/file.field.inc10
-rw-r--r--modules/file/file.js6
-rw-r--r--modules/file/file.module6
-rw-r--r--modules/file/tests/file.test10
4 files changed, 16 insertions, 16 deletions
diff --git a/modules/file/file.field.inc b/modules/file/file.field.inc
index 385114c00..89d0eaa51 100644
--- a/modules/file/file.field.inc
+++ b/modules/file/file.field.inc
@@ -448,7 +448,7 @@ function file_field_widget_form(&$form, &$form_state, $field, $instance, $langco
'description' => '',
);
- // Retrieve any values set in $form_state, as will be the case during AJAX
+ // Retrieve any values set in $form_state, as will be the case during Ajax
// rebuilds of this form.
if (isset($form_state['values'])) {
$path = array_merge($element['#field_parents'], array($field['field_name'], $langcode));
@@ -650,7 +650,7 @@ function file_field_widget_process($element, &$form_state, $form) {
);
}
- // Adjust the AJAX settings so that on upload and remove of any individual
+ // Adjust the Ajax settings so that on upload and remove of any individual
// file, the entire group of file fields is updated together.
if ($field['cardinality'] != 1) {
$parents = array_slice($element['#array_parents'], 0, -1);
@@ -681,7 +681,7 @@ function file_field_widget_process($element, &$form_state, $form) {
/**
* An element #process callback for a group of file_generic fields.
*
- * Adds the weight field to each row so it can be ordered and adds a new AJAX
+ * Adds the weight field to each row so it can be ordered and adds a new Ajax
* wrapper around the entire group so it can be replaced all at once.
*/
function file_field_widget_process_multiple($element, &$form_state, $form) {
@@ -710,7 +710,7 @@ function file_field_widget_process_multiple($element, &$form_state, $form) {
}
}
- // Add a new wrapper around all the elements for AJAX replacement.
+ // Add a new wrapper around all the elements for Ajax replacement.
$element['#prefix'] = '<div id="' . $element['#id'] . '-ajax-wrapper">';
$element['#suffix'] = '</div>';
@@ -770,7 +770,7 @@ function theme_file_widget($variables) {
$element = $variables['element'];
$output = '';
- // The "form-managed-file" class is required for proper AJAX functionality.
+ // The "form-managed-file" class is required for proper Ajax functionality.
$output .= '<div class="file-widget form-managed-file clearfix">';
if ($element['fid']['#value'] != 0) {
// Add the file size after the file name.
diff --git a/modules/file/file.js b/modules/file/file.js
index 15629df5b..094abbc78 100644
--- a/modules/file/file.js
+++ b/modules/file/file.js
@@ -5,7 +5,7 @@
* Provides JavaScript additions to the managed file field type.
*
* This file provides progress bar support (if available), popup windows for
- * file previews, and disabling of other file fields during AJAX uploads (which
+ * file previews, and disabling of other file fields during Ajax uploads (which
* prevents separate file fields from accidentally uploading files).
*/
@@ -90,7 +90,7 @@ Drupal.file = Drupal.file || {
disableFields: function (event){
var clickedButton = this;
- // Only disable upload fields for AJAX buttons.
+ // Only disable upload fields for Ajax buttons.
if (!$(clickedButton).hasClass('ajax-processed')) {
return;
}
@@ -105,7 +105,7 @@ Drupal.file = Drupal.file || {
// working with. Filter out fields that are already disabled so that they
// do not get enabled when we re-enable these fields at the end of behavior
// processing. Re-enable in a setTimeout set to a relatively short amount
- // of time (1 second). All the other mousedown handlers (like Drupal's AJAX
+ // of time (1 second). All the other mousedown handlers (like Drupal's Ajax
// behaviors) are excuted before any timeout functions are called, so we
// don't have to worry about the fields being re-enabled too soon.
// @todo If the previous sentence is true, why not set the timeout to 0?
diff --git a/modules/file/file.module b/modules/file/file.module
index 13a8024b2..500a3cbbc 100644
--- a/modules/file/file.module
+++ b/modules/file/file.module
@@ -221,7 +221,7 @@ function file_file_download($uri, $field_type = 'file') {
}
/**
- * Menu callback; Shared AJAX callback for file uploads and deletions.
+ * Menu callback; Shared Ajax callback for file uploads and deletions.
*
* This rebuilds the form element for a particular field item. As long as the
* form processing is properly encapsulated in the widget element the form
@@ -265,7 +265,7 @@ function file_ajax_upload() {
$form = $form[$parent];
}
- // Add the special AJAX class if a new file was added.
+ // Add the special Ajax class if a new file was added.
if (isset($form['#file_upload_delta']) && $current_file_count < $form['#file_upload_delta']) {
$form[$current_file_count]['#attributes']['class'][] = 'ajax-new-content';
}
@@ -453,7 +453,7 @@ function file_managed_file_process($element, &$form_state, $form) {
);
}
- // Prefix and suffix used for AJAX replacement.
+ // Prefix and suffix used for Ajax replacement.
$element['#prefix'] = '<div id="' . $element['#id'] . '-ajax-wrapper">';
$element['#suffix'] = '</div>';
diff --git a/modules/file/tests/file.test b/modules/file/tests/file.test
index 9794ea7c1..c619ca773 100644
--- a/modules/file/tests/file.test
+++ b/modules/file/tests/file.test
@@ -254,7 +254,7 @@ class FileManagedFileElementTestCase extends FileFieldTestCase {
$this->drupalPost($path . '/' . $last_fid, array(), t('Save'));
$this->assertRaw(t('The file id is %fid.', array('%fid' => $last_fid)), t('Empty submission did not change an existing file.'));
- // Now, test the Upload and Remove buttons, with and without AJAX.
+ // Now, test the Upload and Remove buttons, with and without Ajax.
foreach (array(FALSE, TRUE) as $ajax) {
// Upload, then Submit.
$last_fid_prior = $this->getLastFileId();
@@ -302,7 +302,7 @@ class FileManagedFileElementTestCase extends FileFieldTestCase {
}
/**
- * Test class to test file field widget, single and multi-valued, with and without AJAX, with public and private files.
+ * Test class to test file field widget, single and multi-valued, with and without Ajax, with public and private files.
*/
class FileFieldWidgetTestCase extends FileFieldTestCase {
public static function getInfo() {
@@ -314,7 +314,7 @@ class FileFieldWidgetTestCase extends FileFieldTestCase {
}
/**
- * Tests upload and remove buttons, with and without AJAX, for a single-valued File field.
+ * Tests upload and remove buttons, with and without Ajax, for a single-valued File field.
*/
function testSingleValuedWidget() {
// Use 'page' instead of 'article', so that the 'article' image field does
@@ -371,7 +371,7 @@ class FileFieldWidgetTestCase extends FileFieldTestCase {
}
/**
- * Tests upload and remove buttons, with and without AJAX, for a multi-valued File field.
+ * Tests upload and remove buttons, with and without Ajax, for a multi-valued File field.
*/
function testMultiValuedWidget() {
// Use 'page' instead of 'article', so that the 'article' image field does
@@ -390,7 +390,7 @@ class FileFieldWidgetTestCase extends FileFieldTestCase {
// Visit the node creation form, and upload 3 files. Since the field has
// cardinality of 3, ensure the "Upload" button is displayed until after
// the 3rd file, and after that, isn't displayed.
- // @todo This is only testing a non-AJAX upload, because drupalPostAJAX()
+ // @todo This is only testing a non-Ajax upload, because drupalPostAJAX()
// does not yet emulate jQuery's file upload.
$this->drupalGet("node/add/$type_name");
for ($delta = 0; $delta < 3; $delta++) {