| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 self.updateImportInProgress_(false); | 59 self.updateImportInProgress_(false); |
| 60 | 60 |
| 61 // 'cancelCreateProfile' is handled by CreateProfileHandler. | 61 // 'cancelCreateProfile' is handled by CreateProfileHandler. |
| 62 chrome.send('cancelCreateProfile'); | 62 chrome.send('cancelCreateProfile'); |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 $('managed-user-import-ok').onclick = | 65 $('managed-user-import-ok').onclick = |
| 66 this.showAvatarGridOrSubmit_.bind(this); | 66 this.showAvatarGridOrSubmit_.bind(this); |
| 67 | 67 |
| 68 $('create-new-user-link').onclick = function(event) { | 68 $('create-new-user-link').onclick = function(event) { |
| 69 options.ManagedUserListData.removeObserver(self); |
| 69 OptionsPage.navigateToPage('createProfile'); | 70 OptionsPage.navigateToPage('createProfile'); |
| 70 }; | 71 }; |
| 71 }, | 72 }, |
| 72 | 73 |
| 73 /** | 74 /** |
| 74 * @override | 75 * @override |
| 75 */ | 76 */ |
| 76 didShowPage: function() { | 77 didShowPage: function() { |
| 77 options.ManagedUserListData.requestExistingManagedUsers().then( | 78 options.ManagedUserListData.requestExistingManagedUsers().then( |
| 78 this.receiveExistingManagedUsers_, this.onSigninError_.bind(this)); | 79 this.receiveExistingManagedUsers_, this.onSigninError_.bind(this)); |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 var instance = ManagedUserImportOverlay.getInstance(); | 235 var instance = ManagedUserImportOverlay.getInstance(); |
| 235 return instance[name + '_'].apply(instance, arguments); | 236 return instance[name + '_'].apply(instance, arguments); |
| 236 }; | 237 }; |
| 237 }); | 238 }); |
| 238 | 239 |
| 239 // Export | 240 // Export |
| 240 return { | 241 return { |
| 241 ManagedUserImportOverlay: ManagedUserImportOverlay, | 242 ManagedUserImportOverlay: ManagedUserImportOverlay, |
| 242 }; | 243 }; |
| 243 }); | 244 }); |
| OLD | NEW |