Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Side by Side Diff: chrome/browser/resources/options2/password_manager_list.js

Issue 9706036: settings - share inline list button style between different list types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options.passwordManager', function() { 5 cr.define('options.passwordManager', function() {
6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; 6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
7 /** @const */ var DeletableItemList = options.DeletableItemList; 7 /** @const */ var DeletableItemList = options.DeletableItemList;
8 /** @const */ var DeletableItem = options.DeletableItem; 8 /** @const */ var DeletableItem = options.DeletableItem;
9 /** @const */ var List = cr.ui.List; 9 /** @const */ var List = cr.ui.List;
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 passwordInput.type = 'password'; 56 passwordInput.type = 'password';
57 passwordInput.className = 'inactive-password'; 57 passwordInput.className = 'inactive-password';
58 passwordInput.readOnly = true; 58 passwordInput.readOnly = true;
59 passwordInput.value = showPasswords ? this.password : '********'; 59 passwordInput.value = showPasswords ? this.password : '********';
60 passwordInputDiv.appendChild(passwordInput); 60 passwordInputDiv.appendChild(passwordInput);
61 61
62 // The show/hide button. 62 // The show/hide button.
63 if (showPasswords) { 63 if (showPasswords) {
64 var button = this.ownerDocument.createElement('button'); 64 var button = this.ownerDocument.createElement('button');
65 button.hidden = true; 65 button.hidden = true;
66 button.className = 'password-button custom-appearance'; 66 button.className = 'list-inline-button custom-appearance';
67 button.textContent = localStrings.getString('passwordShowButton'); 67 button.textContent = localStrings.getString('passwordShowButton');
68 button.addEventListener('click', this.onClick_, true); 68 button.addEventListener('click', this.onClick_, true);
69 passwordInputDiv.appendChild(button); 69 passwordInputDiv.appendChild(button);
70 } 70 }
71 71
72 this.contentElement.appendChild(passwordInputDiv); 72 this.contentElement.appendChild(passwordInputDiv);
73 }, 73 },
74 74
75 /** @inheritDoc */ 75 /** @inheritDoc */
76 selectionChanged: function() { 76 selectionChanged: function() {
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 }, 274 },
275 }; 275 };
276 276
277 return { 277 return {
278 PasswordListItem: PasswordListItem, 278 PasswordListItem: PasswordListItem,
279 PasswordExceptionsListItem: PasswordExceptionsListItem, 279 PasswordExceptionsListItem: PasswordExceptionsListItem,
280 PasswordsList: PasswordsList, 280 PasswordsList: PasswordsList,
281 PasswordExceptionsList: PasswordExceptionsList, 281 PasswordExceptionsList: PasswordExceptionsList,
282 }; 282 };
283 }); 283 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698