Révision ac1bc5de
Ajouté par Assos Assos il y a plus de 9 ans
drupal7/sites/all/modules/captcha/image_captcha/image_captcha.js | ||
---|---|---|
6 | 6 |
// Helper function to show/hide noise level widget. |
7 | 7 |
var noise_level_shower = function(speed) { |
8 | 8 |
speed = (typeof speed == 'undefined') ? 'slow' : speed; |
9 |
if ($("#edit-image-captcha-dot-noise").is(":checked") |
|
10 |
|| $("#edit-image-captcha-line-noise").is(":checked")) { |
|
9 |
if ($("#edit-image-captcha-dot-noise").is(":checked") || $("#edit-image-captcha-line-noise").is(":checked")) { |
|
11 | 10 |
$(".form-item-image-captcha-noise-level").show(speed); |
12 | 11 |
} else { |
13 | 12 |
$(".form-item-image-captcha-noise-level").hide(speed); |
14 | 13 |
} |
15 |
} |
|
14 |
};
|
|
16 | 15 |
// Add onclick handler to the dot and line noise check boxes. |
17 | 16 |
$("#edit-image-captcha-dot-noise").click(noise_level_shower); |
18 | 17 |
$("#edit-image-captcha-line-noise").click(noise_level_shower); |
... | ... | |
27 | 26 |
} else { |
28 | 27 |
$(".form-item-image-captcha-bilinear-interpolation").hide(speed); |
29 | 28 |
} |
30 |
} |
|
29 |
};
|
|
31 | 30 |
// Add onchange handler to the distortion level select widget. |
32 | 31 |
$("#edit-image-captcha-distortion-amplitude").change( |
33 | 32 |
smooth_distortion_shower); |
34 | 33 |
// Show or hide appropriately on page load. |
35 |
smooth_distortion_shower(0) |
|
34 |
smooth_distortion_shower(0);
|
|
36 | 35 |
|
37 | 36 |
} |
38 | 37 |
}; |
Formats disponibles : Unified diff
Weekly update of contrib modules