Changeset 34539
- Timestamp:
- 09/25/2015 01:53:04 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/user-profile.js
r34371 r34539 99 99 } 100 100 101 function resetToggle() { 102 $toggleButton 103 .data( 'toggle', 0 ) 104 .attr({ 105 'aria-label': userProfileL10n.ariaHide 106 }) 107 .find( '.text' ) 108 .text( userProfileL10n.hide ) 109 .end() 110 .find( '.dashicons' ) 111 .removeClass( 'dashicons-visibility' ) 112 .addClass( 'dashicons-hidden' ); 113 114 $pass1Text.focus(); 115 116 $pass1Label.attr( 'for', 'pass1-text' ); 117 } 118 101 119 function bindToggleButton() { 102 120 $toggleButton = $pass1Row.find('.wp-hide-pw'); … … 104 122 if ( 1 === parseInt( $toggleButton.data( 'toggle' ), 10 ) ) { 105 123 $pass1Wrap.addClass( 'show-password' ); 106 $toggleButton 107 .data( 'toggle', 0 ) 108 .attr({ 109 'aria-label': userProfileL10n.ariaHide 110 }) 111 .find( '.text' ) 112 .text( userProfileL10n.hide ) 113 .end() 114 .find( '.dashicons' ) 115 .removeClass('dashicons-visibility') 116 .addClass('dashicons-hidden'); 117 118 $pass1Text.focus(); 119 120 $pass1Label.attr( 'for', 'pass1-text' ); 124 125 resetToggle(); 121 126 122 127 if ( ! _.isUndefined( $pass1Text[0].setSelectionRange ) ) { … … 234 239 $generateButton.show(); 235 240 $passwordWrapper.hide(); 241 242 resetToggle(); 236 243 237 244 // Clear password field to prevent update
Note: See TracChangeset
for help on using the changeset viewer.