| 1 |
// $Id: pathauto.js,v 1.4 2008/03/06 02:56:05 greggles Exp $
|
| 2 |
if (Drupal.jsEnabled) {
|
| 3 |
$(document).ready(function() {
|
| 4 |
if ($("#edit-pathauto-perform-alias").size() && $("#edit-pathauto-perform-alias").attr("checked")) {
|
| 5 |
// Disable input and hide its description.
|
| 6 |
$("#edit-path").attr("disabled","disabled");
|
| 7 |
$("#edit-path-wrapper > div.description").hide(0);
|
| 8 |
}
|
| 9 |
$("#edit-pathauto-perform-alias").bind("click", function() {
|
| 10 |
if ($("#edit-pathauto-perform-alias").attr("checked")) {
|
| 11 |
// Auto-alias checked; disable input.
|
| 12 |
$("#edit-path").attr("disabled","disabled");
|
| 13 |
$("#edit-path-wrapper > div[class=description]").slideUp('fast');
|
| 14 |
}
|
| 15 |
else {
|
| 16 |
// Auto-alias unchecked; enable input.
|
| 17 |
$("#edit-path").removeAttr("disabled");
|
| 18 |
$("#edit-path")[0].focus();
|
| 19 |
$("#edit-path-wrapper > div[class=description]").slideDown('fast');
|
| 20 |
}
|
| 21 |
});
|
| 22 |
});
|
| 23 |
}
|