Shiny Updates: Disable body scrolling when filesystem request modal is open.

props ericlewis.
fixes #31607.
Built from https://develop.svn.wordpress.org/trunk@31753


git-svn-id: http://core.svn.wordpress.org/trunk@31734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2015-03-12 14:57:26 +00:00
parent 351ea2d6f8
commit 5c9656393a
3 changed files with 7 additions and 5 deletions

View File

@ -386,14 +386,15 @@ window.wp = window.wp || {};
wp.updates.requestFilesystemCredentials = function() {
if ( wp.updates.updateDoneSuccessfully === false ) {
wp.updates.updateLock = true;
$('#request-filesystem-credentials-dialog').show();
$( 'body' ).addClass( 'modal-open' );
$( '#request-filesystem-credentials-dialog' ).show();
}
};
// Bind various click handlers.
$( document ).ready( function() {
// File system credentials form submit noop-er / handler.
$('#request-filesystem-credentials-dialog form').on( 'submit', function() {
$( '#request-filesystem-credentials-dialog form' ).on( 'submit', function() {
// Persist the credentials input by the user for the duration of the page load.
wp.updates.filesystemCredentials.ftp.hostname = $('#hostname').val();
wp.updates.filesystemCredentials.ftp.username = $('#username').val();
@ -402,7 +403,8 @@ window.wp = window.wp || {};
wp.updates.filesystemCredentials.ssh.publicKey = $('#public_key').val();
wp.updates.filesystemCredentials.ssh.privateKey = $('#private_key').val();
$('#request-filesystem-credentials-dialog').hide();
$( '#request-filesystem-credentials-dialog' ).hide();
$( 'body' ).removeClass( 'modal-open' );
// Unlock and invoke the queue.
wp.updates.updateLock = false;

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.2-alpha-31752';
$wp_version = '4.2-alpha-31753';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.