From 438aa990180b85bf1fb0ea862b6ef3ee91cf6663 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 4 Apr 2009 00:35:46 +0000 Subject: - Patch #392362 by Xano, Dave Reid: remove clean URL option from the installation process -- automatically enable clean URLs when possible, or hide the option when clean URLs cannot be enabled. --- modules/system/system.js | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'modules/system') diff --git a/modules/system/system.js b/modules/system/system.js index c6b6fc4ee..3015a2a8a 100644 --- a/modules/system/system.js +++ b/modules/system/system.js @@ -13,7 +13,7 @@ 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.clean-url-processed, #clean-url.install").size()) { + if ($(".clean-url-processed, #edit-clean-url.install").size()) { return; } var url = settings.basePath +"admin/settings/clean-urls/check"; @@ -47,8 +47,6 @@ Drupal.behaviors.cleanURLsSettingsCheck = { */ Drupal.cleanURLsInstallCheck = function() { var url = location.protocol +"//"+ location.host + Drupal.settings.basePath +"admin/settings/clean-urls/check"; - $("#clean-url .description").append('
'+ Drupal.settings.cleanURL.testing +"
"); - $("#clean-url.install").css("display", "block"); // Submit a synchronous request to avoid database errors associated with // concurrent requests during install. $.ajax({ @@ -57,18 +55,10 @@ Drupal.cleanURLsInstallCheck = function() { dataType: 'json', success: function () { // Check was successful. - $("#clean-url input.form-radio").attr("disabled", false); - $("#clean-url input.form-radio").attr("checked", 1); - $("#clean-url .description span").append('
'+ Drupal.settings.cleanURL.success +"
"); - $("#testing").hide(); + $("#edit-clean-url").attr("value", 1); }, - error: function() { - // Check failed. - $("#clean-url .description span").append('
'+ Drupal.settings.cleanURL.failure +"
"); - $("#testing").hide(); - } }); - $("#clean-url").addClass('clean-url-processed'); + $("#edit-clean-url").addClass('clean-url-processed'); }; /** @@ -134,4 +124,4 @@ Drupal.behaviors.poweredByPreview = { } }; -})(jQuery); \ No newline at end of file +})(jQuery); -- cgit v1.2.3