Make WordPress Core

Ticket #32886: 32886-strength-meter.patch

File 32886-strength-meter.patch, 1.6 KB (added by ocean90, 10 years ago)

debug

  • src/wp-admin/js/user-profile.js

     
    2626        }
    2727
    2828        function bindPass1() {
     29                console.log("bindPass1()");
    2930                var passStrength = $('#pass-strength-result')[0];
    3031                var currentPass = $pass1.val();
    3132
     
    4041                        .addClass( $pass1[0].className )
    4142                        .data( 'pw', $pass1.data( 'pw' ) )
    4243                        .val( $pass1.val() )
    43                         .on( 'input', function () {
     44                        .on( 'input propertychange', function () {
     45                                console.log("$pass1.val( $pass1Text.val() ).trigger( 'propertychange' );");
    4446                                $pass1.val( $pass1Text.val() ).trigger( 'propertychange' );
    4547                        } );
    4648
     
    5153                }
    5254
    5355                $pass1.on( 'input propertychange', function () {
     56                        console.log("$pass1.on( 'input propertychange')");
    5457                        if ( $pass1.val() === currentPass ) {
     58                                console.log("same password detected");
    5559                                return;
    5660                        }
    5761
     
    7579        }
    7680
    7781        function bindToggleButton() {
     82                console.log("bindToggleButton()");
    7883                var toggleButton = $pass1Row.find('.wp-hide-pw');
    7984                toggleButton.show().on( 'click', function () {
    8085                        if ( 1 === parseInt( toggleButton.data( 'toggle' ), 10 ) ) {
     
    120125        }
    121126
    122127        function bindPasswordForm() {
     128                console.log("bindPasswordForm()");
    123129                var $passwordWrapper,
    124130                        $generateButton,
    125131                        $cancelButton;
     
    196202        }
    197203
    198204        function check_pass_strength() {
     205                console.log("check_pass_strength()");
    199206                var pass1 = $('#pass1').val(), pass2 = $('#pass2').val(), strength;
    200207
    201208                $('#pass-strength-result').removeClass('short bad good strong');