OLD | NEW |
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', function() { | 5 cr.define('options', function() { |
6 var Page = cr.ui.pageManager.Page; | 6 var Page = cr.ui.pageManager.Page; |
7 var PageManager = cr.ui.pageManager.PageManager; | 7 var PageManager = cr.ui.pageManager.PageManager; |
8 var ArrayDataModel = cr.ui.ArrayDataModel; | 8 var ArrayDataModel = cr.ui.ArrayDataModel; |
9 | 9 |
10 /** | 10 /** |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 this.receiveExistingSupervisedUsers_.bind(this), | 350 this.receiveExistingSupervisedUsers_.bind(this), |
351 this.onSigninError_.bind(this)); | 351 this.onSigninError_.bind(this)); |
352 }, | 352 }, |
353 | 353 |
354 /** | 354 /** |
355 * Callback which receives the list of existing supervised users. Checks if | 355 * Callback which receives the list of existing supervised users. Checks if |
356 * the currently entered name is the name of an already existing supervised | 356 * the currently entered name is the name of an already existing supervised |
357 * user. If yes, the user is prompted to import the existing supervised | 357 * user. If yes, the user is prompted to import the existing supervised |
358 * user, and the create button is disabled. | 358 * user, and the create button is disabled. |
359 * If the received list is empty, hides the "import" link. | 359 * If the received list is empty, hides the "import" link. |
360 * @param {Array.<Object>} The list of existing supervised users. | 360 * @param {Array.<Object>} supervisedUsers The list of existing supervised |
| 361 * users. |
361 * @private | 362 * @private |
362 */ | 363 */ |
363 receiveExistingSupervisedUsers_: function(supervisedUsers) { | 364 receiveExistingSupervisedUsers_: function(supervisedUsers) { |
364 $('import-existing-supervised-user-link').hidden = | 365 $('import-existing-supervised-user-link').hidden = |
365 supervisedUsers.length === 0; | 366 supervisedUsers.length === 0; |
366 if (!$('create-profile-supervised').checked) | 367 if (!$('create-profile-supervised').checked) |
367 return; | 368 return; |
368 | 369 |
369 var newName = $('create-profile-name').value; | 370 var newName = $('create-profile-name').value; |
370 var i; | 371 var i; |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 return instance[name + '_'].apply(instance, arguments); | 863 return instance[name + '_'].apply(instance, arguments); |
863 }; | 864 }; |
864 }); | 865 }); |
865 | 866 |
866 // Export | 867 // Export |
867 return { | 868 return { |
868 ManageProfileOverlay: ManageProfileOverlay, | 869 ManageProfileOverlay: ManageProfileOverlay, |
869 CreateProfileOverlay: CreateProfileOverlay, | 870 CreateProfileOverlay: CreateProfileOverlay, |
870 }; | 871 }; |
871 }); | 872 }); |
OLD | NEW |