summaryrefslogtreecommitdiff
path: root/modules/system/system.js
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-04-26 19:18:46 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-04-26 19:18:46 +0000
commitbda52632a5aa033d44151c224a39236b223c6b0e (patch)
treeda56b8095f58963707655312071d41de95adca84 /modules/system/system.js
parenta4dc8467bbe69ba984be31309f536af74dc64e73 (diff)
downloadbrdo-bda52632a5aa033d44151c224a39236b223c6b0e.tar.gz
brdo-bda52632a5aa033d44151c224a39236b223c6b0e.tar.bz2
#444402 by kkaefer and RobLoach: Enforce coding standards on all core JavaScript.
Diffstat (limited to 'modules/system/system.js')
-rw-r--r--modules/system/system.js40
1 files changed, 20 insertions, 20 deletions
diff --git a/modules/system/system.js b/modules/system/system.js
index 3015a2a8a..0b424812a 100644
--- a/modules/system/system.js
+++ b/modules/system/system.js
@@ -13,28 +13,28 @@ Drupal.behaviors.cleanURLsSettingsCheck = {
// 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.
- if ($(".clean-url-processed, #edit-clean-url.install").size()) {
+ if ($('.clean-url-processed, #edit-clean-url.install').size()) {
return;
}
- var url = settings.basePath +"admin/settings/clean-urls/check";
- $("#clean-url .description span").html('<div id="testing">'+ Drupal.t('Testing clean URLs...') +"</div>");
- $("#clean-url p").hide();
+ var url = settings.basePath + 'admin/settings/clean-urls/check';
+ $('#clean-url .description span').html('<div id="testing">' + Drupal.t('Testing clean URLs...') + '</div>');
+ $('#clean-url p').hide();
$.ajax({
- url: location.protocol +"//"+ location.host + url,
+ 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();
+ $('#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() {
// 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();
+ $('#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();
}
});
- $("#clean-url").addClass('clean-url-processed');
+ $('#clean-url').addClass('clean-url-processed');
}
};
@@ -46,19 +46,19 @@ Drupal.behaviors.cleanURLsSettingsCheck = {
* are currently enabled.
*/
Drupal.cleanURLsInstallCheck = function() {
- var url = location.protocol +"//"+ location.host + Drupal.settings.basePath +"admin/settings/clean-urls/check";
+ 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.
$.ajax({
async: false,
url: url,
dataType: 'json',
- success: function () {
+ success: function() {
// Check was successful.
- $("#edit-clean-url").attr("value", 1);
- },
+ $('#edit-clean-url').attr('value', 1);
+ }
});
- $("#edit-clean-url").addClass('clean-url-processed');
+ $('#edit-clean-url').addClass('clean-url-processed');
};
/**
@@ -95,15 +95,15 @@ Drupal.behaviors.dateTime = {
attach: function(context, settings) {
// Show/hide custom format depending on the select's value.
$('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"]();
+ $(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() {
var input = $(this);
- var url = settings.dateTime.lookup +(settings.dateTime.lookup.match(/\?q=/) ? "&format=" : "?format=") + Drupal.encodeURIComponent(input.val());
+ var url = settings.dateTime.lookup +(settings.dateTime.lookup.match(/\?q=/) ? '&format=' : '?format=') + Drupal.encodeURIComponent(input.val());
$.getJSON(url, function(data) {
- $("div.description span", input.parent()).html(data);
+ $('div.description span', input.parent()).html(data);
});
});