OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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', function() { | 5 cr.define('options', function() { |
6 var OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
7 var ArrayDataModel = cr.ui.ArrayDataModel; | 7 var ArrayDataModel = cr.ui.ArrayDataModel; |
8 | 8 |
9 /** | 9 /** |
10 * ManagedUserImportOverlay class. | 10 * ManagedUserImportOverlay class. |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 } | 112 } |
113 | 113 |
114 var avatarUrl = managedUser.needAvatar ? | 114 var avatarUrl = managedUser.needAvatar ? |
115 $('select-avatar-grid').selectedItem : managedUser.iconURL; | 115 $('select-avatar-grid').selectedItem : managedUser.iconURL; |
116 | 116 |
117 this.updateImportInProgress_(true); | 117 this.updateImportInProgress_(true); |
118 | 118 |
119 // 'createProfile' is handled by CreateProfileHandler. | 119 // 'createProfile' is handled by CreateProfileHandler. |
120 chrome.send('createProfile', [managedUser.name, avatarUrl, | 120 chrome.send('createProfile', [managedUser.name, avatarUrl, |
121 false, true, managedUser.id]); | 121 false, true, managedUser.id]); |
122 options.ManagedUserListData.reloadExistingManagedUsers(); | |
123 }, | 122 }, |
124 | 123 |
125 /** | 124 /** |
126 * Hides the 'managed user list' and shows the avatar grid instead. | 125 * Hides the 'managed user list' and shows the avatar grid instead. |
127 * It also updates the overlay text and title to instruct the user | 126 * It also updates the overlay text and title to instruct the user |
128 * to choose an avatar for the supervised user. | 127 * to choose an avatar for the supervised user. |
129 * @private | 128 * @private |
130 */ | 129 */ |
131 showAvatarGridHelper_: function() { | 130 showAvatarGridHelper_: function() { |
132 $('managed-user-list').hidden = true; | 131 $('managed-user-list').hidden = true; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 var instance = ManagedUserImportOverlay.getInstance(); | 226 var instance = ManagedUserImportOverlay.getInstance(); |
228 return instance[name + '_'].apply(instance, arguments); | 227 return instance[name + '_'].apply(instance, arguments); |
229 }; | 228 }; |
230 }); | 229 }); |
231 | 230 |
232 // Export | 231 // Export |
233 return { | 232 return { |
234 ManagedUserImportOverlay: ManagedUserImportOverlay, | 233 ManagedUserImportOverlay: ManagedUserImportOverlay, |
235 }; | 234 }; |
236 }); | 235 }); |
OLD | NEW |