summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system')
-rw-r--r--modules/system/system.js28
1 files changed, 14 insertions, 14 deletions
diff --git a/modules/system/system.js b/modules/system/system.js
index 0b424812a..3422cd879 100644
--- a/modules/system/system.js
+++ b/modules/system/system.js
@@ -1,5 +1,5 @@
// $Id$
-(function($) {
+(function ($) {
/**
* Internal function to check using Ajax if clean URLs can be enabled on the
@@ -9,7 +9,7 @@
* are currently enabled.
*/
Drupal.behaviors.cleanURLsSettingsCheck = {
- attach: function(context, settings) {
+ attach: function (context, settings) {
// This behavior attaches by ID, so is only valid once on a page.
// Also skip if we are on an install page, as Drupal.cleanURLsInstallCheck will handle
// the processing.
@@ -22,13 +22,13 @@ Drupal.behaviors.cleanURLsSettingsCheck = {
$.ajax({
url: location.protocol + '//' + location.host + url,
dataType: 'json',
- success: function() {
+ success: function () {
// Check was successful.
$('#clean-url input.form-radio').attr('disabled', false);
$('#clean-url .description span').append('<div class="ok">' + Drupal.t('Your server has been successfully tested to support this feature.') + '</div>');
$('#testing').hide();
},
- error: function() {
+ error: function () {
// Check failed.
$('#clean-url .description span').append('<div class="warning">' + Drupal.t('Your system configuration does not currently support this feature. The <a href="http://drupal.org/node/15365">handbook page on Clean URLs</a> has additional troubleshooting information.') + '</div>');
$('#testing').hide();
@@ -45,7 +45,7 @@ Drupal.behaviors.cleanURLsSettingsCheck = {
* This function is not used to verify whether or not clean URLs
* are currently enabled.
*/
-Drupal.cleanURLsInstallCheck = function() {
+Drupal.cleanURLsInstallCheck = function () {
var url = location.protocol + '//' + location.host + Drupal.settings.basePath + 'admin/settings/clean-urls/check';
// Submit a synchronous request to avoid database errors associated with
// concurrent requests during install.
@@ -53,7 +53,7 @@ Drupal.cleanURLsInstallCheck = function() {
async: false,
url: url,
dataType: 'json',
- success: function() {
+ success: function () {
// Check was successful.
$('#edit-clean-url').attr('value', 1);
}
@@ -67,14 +67,14 @@ Drupal.cleanURLsInstallCheck = function() {
* administrator e-mail address with the same value as the site e-mail address.
*/
Drupal.behaviors.copyFieldValue = {
- attach: function(context, settings) {
+ attach: function (context, settings) {
for (var sourceId in settings.copyFieldValue) {
// Get the list of target fields.
targetIds = settings.copyFieldValue[sourceId];
if (!$('#'+ sourceId + '.copy-field-values-processed', context).size()) {
// Add the behavior to update target fields on blur of the primary field.
sourceField = $('#' + sourceId);
- sourceField.bind('blur', function() {
+ sourceField.bind('blur', function () {
for (var delta in targetIds) {
var targetField = $('#'+ targetIds[delta]);
if (targetField.val() == '') {
@@ -92,17 +92,17 @@ Drupal.behaviors.copyFieldValue = {
* Show/hide custom format sections on the regional settings page.
*/
Drupal.behaviors.dateTime = {
- attach: function(context, settings) {
+ attach: function (context, settings) {
// Show/hide custom format depending on the select's value.
- $('select.date-format:not(.date-time-processed)', context).change(function() {
+ $('select.date-format:not(.date-time-processed)', context).change(function () {
$(this).addClass('date-time-processed').parents('div.date-container').children('div.custom-container')[$(this).val() == 'custom' ? 'show' : 'hide']();
});
// Attach keyup handler to custom format inputs.
- $('input.custom-format:not(.date-time-processed)', context).addClass('date-time-processed').keyup(function() {
+ $('input.custom-format:not(.date-time-processed)', context).addClass('date-time-processed').keyup(function () {
var input = $(this);
var url = settings.dateTime.lookup +(settings.dateTime.lookup.match(/\?q=/) ? '&format=' : '?format=') + Drupal.encodeURIComponent(input.val());
- $.getJSON(url, function(data) {
+ $.getJSON(url, function (data) {
$('div.description span', input.parent()).html(data);
});
});
@@ -116,8 +116,8 @@ Drupal.behaviors.dateTime = {
* Show the powered by Drupal image preview
*/
Drupal.behaviors.poweredByPreview = {
- attach: function(context, settings) {
- $('#edit-color, #edit-size').change(function() {
+ attach: function (context, settings) {
+ $('#edit-color, #edit-size').change(function () {
var path = settings.basePath + 'misc/' + $('#edit-color').val() + '-' + $('#edit-size').val() + '.png';
$('img.powered-by-preview').attr('src', path);
});