| Index: chrome/browser/resources/options/password_manager_list.js
|
| diff --git a/chrome/browser/resources/options/password_manager_list.js b/chrome/browser/resources/options/password_manager_list.js
|
| index 505384cd7eb1eb836d5865d47cea627eb1f56734..b286e8e610c04a97fc03e556f339755de64cb033 100644
|
| --- a/chrome/browser/resources/options/password_manager_list.js
|
| +++ b/chrome/browser/resources/options/password_manager_list.js
|
| @@ -32,8 +32,8 @@ cr.define('options.passwordManager', function() {
|
|
|
| // The URL of the site.
|
| var urlLabel = this.ownerDocument.createElement('div');
|
| - urlLabel.className = 'url';
|
| urlLabel.classList.add('favicon-cell');
|
| + urlLabel.classList.add('url');
|
| urlLabel.textContent = this.url;
|
| urlLabel.style.backgroundImage = url('chrome://favicon/' + this.url);
|
| this.contentElement.appendChild(urlLabel);
|
| @@ -50,17 +50,19 @@ cr.define('options.passwordManager', function() {
|
|
|
| // The password input field.
|
| var passwordInput = this.ownerDocument.createElement('input');
|
| + passwordInput.type = 'password';
|
| passwordInput.className = 'inactive-password';
|
| passwordInput.readOnly = true;
|
| - passwordInput.type = 'password';
|
| passwordInput.value = this.password;
|
| passwordInputDiv.appendChild(passwordInput);
|
|
|
| // The show/hide button.
|
| - var buttonSpan = this.ownerDocument.createElement('span');
|
| - buttonSpan.className = 'hidden';
|
| - buttonSpan.addEventListener('click', this.onClick_, true);
|
| - passwordInputDiv.appendChild(buttonSpan);
|
| + var button = this.ownerDocument.createElement('button');
|
| + button.classList.add('hidden');
|
| + button.classList.add('password-button');
|
| + button.textContent = localStrings.getString('passwordShowButton');
|
| + button.addEventListener('click', this.onClick_, true);
|
| + passwordInputDiv.appendChild(button);
|
|
|
| this.contentElement.appendChild(passwordInputDiv);
|
| },
|
| @@ -70,13 +72,13 @@ cr.define('options.passwordManager', function() {
|
| var passwordInput = this.querySelector('input[type=password]');
|
| var textInput = this.querySelector('input[type=text]');
|
| var input = passwordInput || textInput;
|
| - var buttonSpan = input.nextSibling;
|
| + var button = input.nextSibling;
|
| if (this.selected) {
|
| input.classList.remove('inactive-password');
|
| - buttonSpan.classList.remove('hidden');
|
| + button.classList.remove('hidden');
|
| } else {
|
| input.classList.add('inactive-password');
|
| - buttonSpan.classList.add('hidden');
|
| + button.classList.add('hidden');
|
| }
|
| },
|
|
|
| @@ -86,11 +88,16 @@ cr.define('options.passwordManager', function() {
|
| * @private
|
| */
|
| onClick_: function(event) {
|
| - // The password is the input element previous to the button span.
|
| - var buttonSpan = event.currentTarget;
|
| - var passwordInput = buttonSpan.previousSibling;
|
| - var type = passwordInput.type;
|
| - passwordInput.type = type == 'password' ? 'text' : 'password';
|
| + // The password is the input element previous to the button.
|
| + var button = event.currentTarget;
|
| + var passwordInput = button.previousSibling;
|
| + if (passwordInput.type == 'password') {
|
| + passwordInput.type = 'text';
|
| + button.textContent = localStrings.getString('passwordHideButton');
|
| + } else {
|
| + passwordInput.type = 'password';
|
| + button.textContent = localStrings.getString('passwordShowButton');
|
| + }
|
| },
|
|
|
| /**
|
|
|