From fc7283235bb9e5ae4300714d03c0bf3723f4792b Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Mon, 27 Apr 2009 20:19:38 +0000 Subject: #444402 follow-up by kkaefer: Fix autocomplete, enforce code style for anonymous JS functions. --- includes/common.inc | 6 +++--- includes/locale.inc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'includes') diff --git a/includes/common.inc b/includes/common.inc index 85381326b..c52102b8b 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -2362,7 +2362,7 @@ function drupal_clear_css_cache() { * a new message arrived, by opening a pop up, alert box etc. This should only * be used for JavaScript which cannot be placed and executed from a file. * When adding inline code, make sure that you are not relying on $ being jQuery. - * Wrap your code in (function($) { ... })(jQuery); or use jQuery instead of $. + * Wrap your code in (function ($) { ... })(jQuery); or use jQuery instead of $. * * - Add external JavaScript ('external'): * Allows the inclusion of external JavaScript files that are not hosted on the @@ -2378,8 +2378,8 @@ function drupal_clear_css_cache() { * @code * drupal_add_js('misc/collapse.js'); * drupal_add_js('misc/collapse.js', 'file'); - * drupal_add_js('jQuery(document).ready(function(){alert("Hello!");});', 'inline'); - * drupal_add_js('jQuery(document).ready(function(){alert("Hello!");});', + * drupal_add_js('jQuery(document).ready(function () { alert("Hello!"); });', 'inline'); + * drupal_add_js('jQuery(document).ready(function () { alert("Hello!"); });', * array('type' => 'inline', 'scope' => 'footer', 'weight' => 5) * ); * drupal_add_js('http://example.com/example.js', 'external'); diff --git a/includes/locale.inc b/includes/locale.inc index a386bbc69..e7a3534a0 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -2391,7 +2391,7 @@ function _locale_rebuild_js($langcode = NULL) { $data = "Drupal.locale = { "; if (!empty($language->formula)) { - $data .= "'pluralFormula': function(\$n) { return Number({$language->formula}); }, "; + $data .= "'pluralFormula': function (\$n) { return Number({$language->formula}); }, "; } $data .= "'strings': " . drupal_to_js($translations) . " };"; -- cgit v1.2.3