Updates: Better handling when the credential form is long (such as when SSH is active).

Merges the JS changes from [32777] to the 4.2 branch
See #32435

Built from https://develop.svn.wordpress.org/branches/4.2@33304


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2015-07-17 04:03:26 +00:00
parent 3f40fe30a8
commit c33661c857
2 changed files with 6 additions and 2 deletions

View File

@ -467,6 +467,11 @@ window.wp = window.wp || {};
wp.updates.requestForCredentialsModalCancel();
});
// Hide SSH fields when not selected
$( '#request-filesystem-credentials-dialog input[name="connection_type"]' ).on( 'change', function() {
$( this ).parents( 'form' ).find( '#private_key, #public_key' ).parents( 'label' ).toggle( ( 'ssh' == $( this ).val() ) );
}).change();
// Click handler for plugin updates in List Table view.
$( '.plugin-update-tr' ).on( 'click', '.update-link', function( e ) {
e.preventDefault();
@ -490,7 +495,6 @@ window.wp = window.wp || {};
wp.updates.updatePlugin( $button.data( 'plugin' ), $button.data( 'slug' ) );
} );
//
$( '#plugin_update_from_iframe' ).on( 'click' , function( e ) {
var target, data;

File diff suppressed because one or more lines are too long