| 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 /** |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 /** | 89 /** |
| 90 * Create a new supervised users list. | 90 * Create a new supervised users list. |
| 91 * @constructor | 91 * @constructor |
| 92 * @extends {cr.ui.List} | 92 * @extends {cr.ui.List} |
| 93 */ | 93 */ |
| 94 var SupervisedUserList = cr.ui.define('list'); | 94 var SupervisedUserList = cr.ui.define('list'); |
| 95 | 95 |
| 96 SupervisedUserList.prototype = { | 96 SupervisedUserList.prototype = { |
| 97 __proto__: List.prototype, | 97 __proto__: List.prototype, |
| 98 | 98 |
| 99 /** @override */ | 99 /** |
| 100 * @override |
| 101 * @param {Object} entry |
| 102 */ |
| 100 createItem: function(entry) { | 103 createItem: function(entry) { |
| 101 return new SupervisedUserListItem(entry); | 104 return new SupervisedUserListItem(entry); |
| 102 }, | 105 }, |
| 103 | 106 |
| 104 /** @override */ | 107 /** @override */ |
| 105 decorate: function() { | 108 decorate: function() { |
| 106 List.prototype.decorate.call(this); | 109 List.prototype.decorate.call(this); |
| 107 this.selectionModel = new ListSingleSelectionModel(); | 110 this.selectionModel = new ListSingleSelectionModel(); |
| 108 this.autoExpands = true; | 111 this.autoExpands = true; |
| 109 }, | 112 }, |
| 110 }; | 113 }; |
| 111 | 114 |
| 112 return { | 115 return { |
| 113 SupervisedUserListItem: SupervisedUserListItem, | 116 SupervisedUserListItem: SupervisedUserListItem, |
| 114 SupervisedUserList: SupervisedUserList, | 117 SupervisedUserList: SupervisedUserList, |
| 115 }; | 118 }; |
| 116 }); | 119 }); |
| OLD | NEW |