| 1 |
// $Id: authorize.js,v 1.1 2009/10/15 21:19:31 webchick Exp $
|
| 2 |
|
| 3 |
/**
|
| 4 |
* @file
|
| 5 |
* Conditionally hide or show the appropriate settings and saved defaults
|
| 6 |
* on the file transfer connection settings form used by authorize.php.
|
| 7 |
*/
|
| 8 |
|
| 9 |
(function ($) {
|
| 10 |
|
| 11 |
Drupal.behaviors.authorizeFileTransferForm = {
|
| 12 |
attach: function(context) {
|
| 13 |
$('#edit-connection-settings-authorize-filetransfer-default').change(function() {
|
| 14 |
$('.filetransfer').hide().filter('.filetransfer-' + $(this).val()).show();
|
| 15 |
});
|
| 16 |
$('.filetransfer').hide().filter('.filetransfer-' + $('#edit-connection-settings-authorize-filetransfer-default').val()).show();
|
| 17 |
|
| 18 |
// Removes the float on the select box (used for non-JS interface).
|
| 19 |
if ($('.connection-settings-update-filetransfer-default-wrapper').length > 0) {
|
| 20 |
console.log($('.connection-settings-update-filetransfer-default-wrapper'));
|
| 21 |
$('.connection-settings-update-filetransfer-default-wrapper').css('float', 'none');
|
| 22 |
}
|
| 23 |
// Hides the submit button for non-js users.
|
| 24 |
$('#edit-submit-connection').hide();
|
| 25 |
$('#edit-submit-process').show();
|
| 26 |
}
|
| 27 |
}
|
| 28 |
|
| 29 |
})(jQuery);
|