From 83bde0f54754ba68351f00ce512333f78a999f4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Mon, 17 Dec 2007 23:43:43 +0000 Subject: #193804 by starbow, Rob Loach, Wim Leers: add often used basePath setting by defualt to JS settings, also providing an elegant bugfix to #201248 --- modules/system/system.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/system/system.js b/modules/system/system.js index aa9db2c2c..a53fefc77 100644 --- a/modules/system/system.js +++ b/modules/system/system.js @@ -14,7 +14,7 @@ Drupal.behaviors.cleanURLsSettingsCheck = function(context) { if ($("#clean-url.clean-url-processed, #clean-url.install").size()) { return; } - var url = location.pathname +"admin/settings/clean-urls/check"; + var url = Drupal.settings.basePath +"admin/settings/clean-urls/check"; $("#clean-url .description span").html('
'+ Drupal.t('Testing clean URLs...') +"
"); $("#clean-url p").hide(); $.ajax({ @@ -42,7 +42,7 @@ Drupal.behaviors.cleanURLsSettingsCheck = function(context) { * are currently enabled. */ Drupal.cleanURLsInstallCheck = function() { - var url = location.protocol +"//"+ location.host + location.pathname.replace(/\/[^\/]*$/, "/") +"admin/settings/clean-urls/check"; + 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"); $.ajax({ @@ -85,7 +85,7 @@ Drupal.behaviors.copyFieldValue = function (context) { sourceField.addClass('copy-field-values-processed'); } } -} +}; /** * Show/hide custom format sections on the date-time settings page. -- cgit v1.2.3