summaryrefslogtreecommitdiff
path: root/misc/authorize.js
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-15 21:19:31 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-15 21:19:31 +0000
commit6abcc47e25e936aea84c2f1e287bc5e1a045fff4 (patch)
tree800c3c256246f6c0399b9f3ec89d8a8aa83f5005 /misc/authorize.js
parent945fd9e269fd1ddee861a079660862c56ee54f74 (diff)
downloadbrdo-6abcc47e25e936aea84c2f1e287bc5e1a045fff4.tar.gz
brdo-6abcc47e25e936aea84c2f1e287bc5e1a045fff4.tar.bz2
#538660 by JacobSingh, dww, JoshuaRogers, adrian, Crell, chx, anarcat, and cwgordon7: Add a functioning Plugin Manager to core. Can you say module installation and updates through the UI? I knew you could! :D
Diffstat (limited to 'misc/authorize.js')
-rw-r--r--misc/authorize.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/misc/authorize.js b/misc/authorize.js
new file mode 100644
index 000000000..13daca652
--- /dev/null
+++ b/misc/authorize.js
@@ -0,0 +1,29 @@
+// $Id$
+
+/**
+ * @file
+ * Conditionally hide or show the appropriate settings and saved defaults
+ * on the file transfer connection settings form used by authorize.php.
+ */
+
+(function ($) {
+
+Drupal.behaviors.authorizeFileTransferForm = {
+ attach: function(context) {
+ $('#edit-connection-settings-authorize-filetransfer-default').change(function() {
+ $('.filetransfer').hide().filter('.filetransfer-' + $(this).val()).show();
+ });
+ $('.filetransfer').hide().filter('.filetransfer-' + $('#edit-connection-settings-authorize-filetransfer-default').val()).show();
+
+ // Removes the float on the select box (used for non-JS interface)
+ if($('.connection-settings-update-filetransfer-default-wrapper').length > 0) {
+ console.log($('.connection-settings-update-filetransfer-default-wrapper'));
+ $('.connection-settings-update-filetransfer-default-wrapper').css('float', 'none');
+ }
+ // Hides the submit button for non-js users
+ $('#edit-submit-connection').hide();
+ $('#edit-submit-process').show();
+ }
+}
+
+})(jQuery);