Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
f9605d80
Commit
f9605d80
authored
Feb 13, 2007
by
Dries Buytaert
Browse files
- Patch
#97213
by neclimdul: usability improvement: implemented clean URL test with jQuery.
parent
153b5fcb
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/system/system.js
0 → 100644
View file @
f9605d80
/**
* Internal function to check using Ajax if clean URLs can be enabled on the
* settings page.
*
* This function is not used to verify whether or not clean URLs
* are currently enabled.
*/
Drupal
.
cleanURLsSettingsCheck
=
function
()
{
var
url
=
location
.
pathname
+
"
admin/settings/clean-urls
"
;
$
(
"
#clean-url .description span
"
).
html
(
'
<div id="testing">
'
+
Drupal
.
settings
.
cleanURL
.
testing
+
"
</div>
"
);
$
(
"
#clean-url p
"
).
hide
();
$
.
ajax
({
url
:
location
.
protocol
+
"
//
"
+
location
.
hostname
+
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>
"
);
}
else
{
// Check failed.
$
(
"
#clean-url .description span
"
).
append
(
'
<div class="warning">
'
+
Drupal
.
settings
.
cleanURL
.
failure
+
"
</div>
"
);
}
}});
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment