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

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

Issue 6990026: WebUI: Add password manager search feature. Also add tooltips for the URLs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
« no previous file with comments | « chrome/browser/resources/options/password_manager.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 ArrayDataModel = cr.ui.ArrayDataModel; 6 const ArrayDataModel = cr.ui.ArrayDataModel;
7 const DeletableItemList = options.DeletableItemList; 7 const DeletableItemList = options.DeletableItemList;
8 const DeletableItem = options.DeletableItem; 8 const DeletableItem = options.DeletableItem;
9 const List = cr.ui.List; 9 const List = cr.ui.List;
10 10
(...skipping 16 matching lines...) Expand all
27 __proto__: DeletableItem.prototype, 27 __proto__: DeletableItem.prototype,
28 28
29 /** @inheritDoc */ 29 /** @inheritDoc */
30 decorate: function(showPasswords) { 30 decorate: function(showPasswords) {
31 DeletableItem.prototype.decorate.call(this); 31 DeletableItem.prototype.decorate.call(this);
32 32
33 // The URL of the site. 33 // The URL of the site.
34 var urlLabel = this.ownerDocument.createElement('div'); 34 var urlLabel = this.ownerDocument.createElement('div');
35 urlLabel.classList.add('favicon-cell'); 35 urlLabel.classList.add('favicon-cell');
36 urlLabel.classList.add('url'); 36 urlLabel.classList.add('url');
37 urlLabel.setAttribute('title', this.url);
37 urlLabel.textContent = this.url; 38 urlLabel.textContent = this.url;
38 urlLabel.style.backgroundImage = url('chrome://favicon/' + this.url); 39 urlLabel.style.backgroundImage = url('chrome://favicon/' + this.url);
39 this.contentElement.appendChild(urlLabel); 40 this.contentElement.appendChild(urlLabel);
40 41
41 // The stored username. 42 // The stored username.
42 var usernameLabel = this.ownerDocument.createElement('div'); 43 var usernameLabel = this.ownerDocument.createElement('div');
43 usernameLabel.className = 'name'; 44 usernameLabel.className = 'name';
44 usernameLabel.textContent = this.username; 45 usernameLabel.textContent = this.username;
45 this.contentElement.appendChild(usernameLabel); 46 this.contentElement.appendChild(usernameLabel);
46 47
47 // The stored password. 48 // The stored password.
48 var passwordInputDiv = this.ownerDocument.createElement('div'); 49 var passwordInputDiv = this.ownerDocument.createElement('div');
49 passwordInputDiv.className = 'password'; 50 passwordInputDiv.className = 'password';
50 51
51 // The password input field. 52 // The password input field.
52 var passwordInput = this.ownerDocument.createElement('input'); 53 var passwordInput = this.ownerDocument.createElement('input');
53 passwordInput.type = 'password'; 54 passwordInput.type = 'password';
54 passwordInput.className = 'inactive-password'; 55 passwordInput.className = 'inactive-password';
55 passwordInput.readOnly = true; 56 passwordInput.readOnly = true;
56 passwordInput.value = showPasswords ? this.password : "********"; 57 passwordInput.value = showPasswords ? this.password : '********';
57 passwordInputDiv.appendChild(passwordInput); 58 passwordInputDiv.appendChild(passwordInput);
58 59
59 // The show/hide button. 60 // The show/hide button.
60 if (showPasswords) { 61 if (showPasswords) {
61 var button = this.ownerDocument.createElement('button'); 62 var button = this.ownerDocument.createElement('button');
62 button.classList.add('hidden'); 63 button.classList.add('hidden');
63 button.classList.add('password-button'); 64 button.classList.add('password-button');
64 button.textContent = localStrings.getString('passwordShowButton'); 65 button.textContent = localStrings.getString('passwordShowButton');
65 button.addEventListener('click', this.onClick_, true); 66 button.addEventListener('click', this.onClick_, true);
66 passwordInputDiv.appendChild(button); 67 passwordInputDiv.appendChild(button);
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 }, 266 },
266 }; 267 };
267 268
268 return { 269 return {
269 PasswordListItem: PasswordListItem, 270 PasswordListItem: PasswordListItem,
270 PasswordExceptionsListItem: PasswordExceptionsListItem, 271 PasswordExceptionsListItem: PasswordExceptionsListItem,
271 PasswordsList: PasswordsList, 272 PasswordsList: PasswordsList,
272 PasswordExceptionsList: PasswordExceptionsList, 273 PasswordExceptionsList: PasswordExceptionsList,
273 }; 274 };
274 }); 275 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/password_manager.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698