Ticket #32886: 32886-strength-meter.patch
File 32886-strength-meter.patch, 1.6 KB (added by , 10 years ago) |
---|
-
src/wp-admin/js/user-profile.js
26 26 } 27 27 28 28 function bindPass1() { 29 console.log("bindPass1()"); 29 30 var passStrength = $('#pass-strength-result')[0]; 30 31 var currentPass = $pass1.val(); 31 32 … … 40 41 .addClass( $pass1[0].className ) 41 42 .data( 'pw', $pass1.data( 'pw' ) ) 42 43 .val( $pass1.val() ) 43 .on( 'input', function () { 44 .on( 'input propertychange', function () { 45 console.log("$pass1.val( $pass1Text.val() ).trigger( 'propertychange' );"); 44 46 $pass1.val( $pass1Text.val() ).trigger( 'propertychange' ); 45 47 } ); 46 48 … … 51 53 } 52 54 53 55 $pass1.on( 'input propertychange', function () { 56 console.log("$pass1.on( 'input propertychange')"); 54 57 if ( $pass1.val() === currentPass ) { 58 console.log("same password detected"); 55 59 return; 56 60 } 57 61 … … 75 79 } 76 80 77 81 function bindToggleButton() { 82 console.log("bindToggleButton()"); 78 83 var toggleButton = $pass1Row.find('.wp-hide-pw'); 79 84 toggleButton.show().on( 'click', function () { 80 85 if ( 1 === parseInt( toggleButton.data( 'toggle' ), 10 ) ) { … … 120 125 } 121 126 122 127 function bindPasswordForm() { 128 console.log("bindPasswordForm()"); 123 129 var $passwordWrapper, 124 130 $generateButton, 125 131 $cancelButton; … … 196 202 } 197 203 198 204 function check_pass_strength() { 205 console.log("check_pass_strength()"); 199 206 var pass1 = $('#pass1').val(), pass2 = $('#pass2').val(), strength; 200 207 201 208 $('#pass-strength-result').removeClass('short bad good strong');