OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.supervisedUserOptions', function() { | 5 cr.define('options.supervisedUserOptions', function() { |
6 /** @const */ var List = cr.ui.List; | 6 /** @const */ var List = cr.ui.List; |
7 /** @const */ var ListItem = cr.ui.ListItem; | 7 /** @const */ var ListItem = cr.ui.ListItem; |
8 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; | 8 /** @const */ var ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; |
9 | 9 |
10 /** | 10 /** |
11 * Create a new supervised user list item. | 11 * Create a new supervised user list item. |
12 * @param {Object} entry The supervised user this item represents. | 12 * @param {Object} entry The supervised user this item represents. |
13 * It has the following form: | 13 * It has the following form: |
14 * supervisedUser = { | 14 * supervisedUser = { |
15 * id: "Supervised User ID", | 15 * id: "Supervised User ID", |
16 * name: "Supervised User Name", | 16 * name: "Supervised User Name", |
17 * iconURL: "chrome://path/to/icon/image", | 17 * iconURL: "chrome://path/to/icon/image", |
18 * onCurrentDevice: true or false, | 18 * onCurrentDevice: true or false, |
19 * needAvatar: true or false | 19 * needAvatar: true or false |
20 * } | 20 * } |
21 * @constructor | 21 * @constructor |
22 * @extends {cr.ui.ListItem} | 22 * @extends {cr.ui.ListItem} |
23 */ | 23 */ |
24 function SupervisedUserListItem(entry) { | 24 function SupervisedUserListItem(entry) { |
25 var el = cr.doc.createElement('div'); | 25 var el = cr.doc.createElement('div'); |
| 26 el.className = 'list-item'; |
26 el.supervisedUser_ = entry; | 27 el.supervisedUser_ = entry; |
27 el.__proto__ = SupervisedUserListItem.prototype; | 28 el.__proto__ = SupervisedUserListItem.prototype; |
28 el.decorate(); | 29 el.decorate(); |
29 return el; | 30 return el; |
30 } | 31 } |
31 | 32 |
32 SupervisedUserListItem.prototype = { | 33 SupervisedUserListItem.prototype = { |
33 __proto__: ListItem.prototype, | 34 __proto__: ListItem.prototype, |
34 | 35 |
35 /** | 36 /** |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 this.selectionModel = new ListSingleSelectionModel(); | 111 this.selectionModel = new ListSingleSelectionModel(); |
111 this.autoExpands = true; | 112 this.autoExpands = true; |
112 }, | 113 }, |
113 }; | 114 }; |
114 | 115 |
115 return { | 116 return { |
116 SupervisedUserListItem: SupervisedUserListItem, | 117 SupervisedUserListItem: SupervisedUserListItem, |
117 SupervisedUserList: SupervisedUserList, | 118 SupervisedUserList: SupervisedUserList, |
118 }; | 119 }; |
119 }); | 120 }); |
OLD | NEW |