mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-02 05:31:25 +01:00
Lose the clunky setTimeout()
code and just track the password value changes.
see #32886 Built from https://develop.svn.wordpress.org/trunk@33465 git-svn-id: http://core.svn.wordpress.org/trunk@33432 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a4e751abc7
commit
959f36699b
@ -27,6 +27,7 @@
|
||||
|
||||
function bindPass1() {
|
||||
var passStrength = $('#pass-strength-result')[0];
|
||||
var currentPass = $pass1.val();
|
||||
|
||||
$pass1Wrap = $pass1.parent();
|
||||
|
||||
@ -50,23 +51,26 @@
|
||||
}
|
||||
|
||||
$pass1.on( 'input propertychange', function () {
|
||||
setTimeout( function () {
|
||||
$pass1Text.val( $pass1.val() );
|
||||
$pass1.add( $pass1Text ).removeClass( 'short bad good strong' );
|
||||
if ( $pass1.val() === currentPass ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( passStrength.className ) {
|
||||
$pass1.add( $pass1Text ).addClass( passStrength.className );
|
||||
if ( 'short' === passStrength.className || 'bad' === passStrength.className ) {
|
||||
if ( ! $weakCheckbox.prop( 'checked' ) ) {
|
||||
$submitButtons.prop( 'disabled', true );
|
||||
}
|
||||
$weakRow.show();
|
||||
} else {
|
||||
$submitButtons.prop( 'disabled', false );
|
||||
$weakRow.hide();
|
||||
currentPass = $pass1.val();
|
||||
$pass1Text.val( currentPass );
|
||||
$pass1.add( $pass1Text ).removeClass( 'short bad good strong' );
|
||||
|
||||
if ( passStrength.className ) {
|
||||
$pass1.add( $pass1Text ).addClass( passStrength.className );
|
||||
if ( 'short' === passStrength.className || 'bad' === passStrength.className ) {
|
||||
if ( ! $weakCheckbox.prop( 'checked' ) ) {
|
||||
$submitButtons.prop( 'disabled', true );
|
||||
}
|
||||
$weakRow.show();
|
||||
} else {
|
||||
$submitButtons.prop( 'disabled', false );
|
||||
$weakRow.hide();
|
||||
}
|
||||
}, 1 );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
|
2
wp-admin/js/user-profile.min.js
vendored
2
wp-admin/js/user-profile.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.3-beta4-33464';
|
||||
$wp_version = '4.3-beta4-33465';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user