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 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 * ManageProfileOverlay class | 10 * ManageProfileOverlay class |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 */ | 479 */ |
480 showDeleteDialog_: function(profileInfo) { | 480 showDeleteDialog_: function(profileInfo) { |
481 if (BrowserOptions.getCurrentProfile().isManaged) | 481 if (BrowserOptions.getCurrentProfile().isManaged) |
482 return; | 482 return; |
483 | 483 |
484 ManageProfileOverlay.setProfileInfo(profileInfo, 'manage'); | 484 ManageProfileOverlay.setProfileInfo(profileInfo, 'manage'); |
485 $('manage-profile-overlay-create').hidden = true; | 485 $('manage-profile-overlay-create').hidden = true; |
486 $('manage-profile-overlay-manage').hidden = true; | 486 $('manage-profile-overlay-manage').hidden = true; |
487 $('manage-profile-overlay-delete').hidden = false; | 487 $('manage-profile-overlay-delete').hidden = false; |
488 $('delete-profile-icon').style.content = | 488 $('delete-profile-icon').style.content = |
489 imageset(profileInfo.iconURL + '@scalefactorx'); | 489 getProfileAvatarIcon(profileInfo.iconURL); |
490 $('delete-profile-text').textContent = | 490 $('delete-profile-text').textContent = |
491 loadTimeData.getStringF('deleteProfileMessage', | 491 loadTimeData.getStringF('deleteProfileMessage', |
492 elide(profileInfo.name, /* maxLength */ 50)); | 492 elide(profileInfo.name, /* maxLength */ 50)); |
493 $('delete-managed-profile-addendum').hidden = !profileInfo.isManaged; | 493 $('delete-managed-profile-addendum').hidden = !profileInfo.isManaged; |
494 | 494 |
495 // Because this dialog isn't useful when refreshing or as part of the | 495 // Because this dialog isn't useful when refreshing or as part of the |
496 // history, don't create a history entry for it when showing. | 496 // history, don't create a history entry for it when showing. |
497 OptionsPage.showPageByName('manageProfile', false); | 497 OptionsPage.showPageByName('manageProfile', false); |
498 }, | 498 }, |
499 | 499 |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 return instance[name + '_'].apply(instance, arguments); | 783 return instance[name + '_'].apply(instance, arguments); |
784 }; | 784 }; |
785 }); | 785 }); |
786 | 786 |
787 // Export | 787 // Export |
788 return { | 788 return { |
789 ManageProfileOverlay: ManageProfileOverlay, | 789 ManageProfileOverlay: ManageProfileOverlay, |
790 CreateProfileOverlay: CreateProfileOverlay, | 790 CreateProfileOverlay: CreateProfileOverlay, |
791 }; | 791 }; |
792 }); | 792 }); |
OLD | NEW |