diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-05-10 19:55:24 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-05-10 19:55:24 +0000 |
commit | 258c653f56ce7dd7dddcbe7c3a46c678dcb79b36 (patch) | |
tree | a30e00872d523d70b1b1ff901b7d7717cc9f3937 /modules/system/system.js | |
parent | 571013af8cac7f8c47bb8028495be2e0393d5150 (diff) | |
download | brdo-258c653f56ce7dd7dddcbe7c3a46c678dcb79b36.tar.gz brdo-258c653f56ce7dd7dddcbe7c3a46c678dcb79b36.tar.bz2 |
- Patch #141637 by merlinofchaos, gabor, et al: provide a site config form at the end of install to collect data, plus allow profiles to modify and add more.
Diffstat (limited to 'modules/system/system.js')
-rw-r--r-- | modules/system/system.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/modules/system/system.js b/modules/system/system.js index a77c7ac99..0c88c9f06 100644 --- a/modules/system/system.js +++ b/modules/system/system.js @@ -24,3 +24,35 @@ Drupal.cleanURLsSettingsCheck = function() { } }}); } + +/** + * Internal function to check using Ajax if clean URLs can be enabled on the + * install page. + * + * This function is not used to verify whether or not clean URLs + * are currently enabled. + */ +Drupal.cleanURLsInstallCheck = function() { + var pathname = location.pathname +""; + var url = pathname.replace(/\/[^\/]*?$/, '/') +"node"; + $("#clean-url .description").append('<span><div id="testing">'+ Drupal.settings.cleanURL.testing +"</div></span>"); + $("#clean-url.install").css("display", "block"); + $.ajax({url: location.protocol +"//"+ location.host + url, type: "GET", data: " ", complete: function(response) { + $("#testing").toggle(); + if (response.status == 200) { + // Check was successful. + $("#clean-url input.form-radio").attr("disabled", ""); + $("#clean-url .description span").append('<div class="ok">'+ Drupal.settings.cleanURL.success +"</div>"); + $("#clean-url input.form-radio").attr("checked", 1); + } + else { + // Check failed. + $("#clean-url .description span").append('<div class="warning">'+ Drupal.settings.cleanURL.failure +"</div>"); + } + }}); +} + +Drupal.installDefaultTimezone = function() { + var offset = new Date().getTimezoneOffset() * -60; + $("#edit-date-default-timezone").val(offset); +} |